This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dct = {} | |
x, dct[x], x, dct[x], x, dct[x], x, dct[x], x, dct[x], x, dct[x], x, dct[x],\ | |
x, dct[x], x, dct[x], x, dct[x], x, dct[x], x, dct[x] = \ | |
'\u0101\u0200\u0201\u0100'\ | |
'\u0102\u0148\u0103\u0157\u0104\u012c\u0105\u0120\u0106\u0121'\ | |
'\u0202\u0265\u0203\u026c\u0204\u026f\u0205\u0272\u0206\u0264' | |
def decode(inp): | |
state = '\x01' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######iw]iyf######l(ipjf################## | |
# mi)t o )nroo # | |
# pt e=r =. iir THIS SIDE UP # | |
# ohar lnn # | |
# r s( x ( ]t(x # | |
# t f [ +(x # | |
import sys | |
with open( sys. argv[1 | |
]) as f: l = list( | |
iter(f )) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division | |
import subprocess | |
from docopt import docopt | |
import os | |
import shutil | |
import tempfile | |
import json | |
from pprint import pprint | |
import time | |
import numpy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import numpy | |
from functools import reduce | |
import time | |
# I am terribly sorry for what is about to follow | |
initial_state = "random" # possible values: glider, random | |
if initial_state == "glider": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division | |
from collections import namedtuple | |
import pygame | |
import math | |
import numpy as np | |
W,H=640,480#screen resolution | |
DIST=10#distance of the horizon | |
Y_SHIFT=200#how much to shift the plane down | |
Y_UNDU=100#how much to undulate the plane up and down |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import codecs | |
import os.path | |
import sys | |
import json | |
import email.parser | |
import email.generator | |
import parsedatetime.parsedatetime as pdt | |
import cStringIO as StringIO | |
import time | |
#import parsedatetime.parsedatetime_consts as pdc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
pygame.init() | |
screen=pygame.display.set_mode((640,480)) | |
while True: | |
for event in pygame.event.get(): | |
if event.type==pygame.QUIT: | |
raise SystemExit() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kassa | |
import inspect | |
import pytest | |
import random | |
def test_classes(): | |
assert inspect.isclass(kassa.Product) | |
def test_getprice(): | |
p=kassa.Product(name="TestProduct",prijs=4.80,barcode="0001234567017") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 330 core | |
in vec2 pos; | |
out vec4 color_out; | |
void main() | |
{ | |
color_out=vec4(1.0,0.0,0.0,1.0); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function lerp(a,b,t) | |
return {(a[1]*(1-t))+(b[1]*t),(a[2]*(1-t))+(b[2]*t)} | |
end | |
function bezier(p0,p1,p2,p3,t) | |
local p4=lerp(p0,p1,t) | |
local p5=lerp(p2,p3,t) | |
local p6=lerp(p4,p5,t) | |
return p6 | |
end |
NewerOlder