This file contains 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 twisted.web.server import Site, NOT_DONE_YET | |
from twisted.web.resource import Resource | |
from twisted.internet import reactor, defer | |
from twisted.python import log | |
from PIL import Image | |
import random | |
import sys | |
import io |
This file contains 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 urllib | |
import sys | |
import os | |
def tourlpath(a): | |
drive, path = os.path.abspath(a).replace('\\', '/').split('/', 1) | |
return 'file:///' + drive + '/' + urllib.quote(path) | |
This file contains 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 urllib | |
import os | |
def tourlpath(a): | |
drive, path = os.path.abspath(a).replace('\\', '/').split('/', 1) | |
return 'file:///' + drive + '/' + urllib.quote(path) | |
directory = '.' |
This file contains 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 json | |
def colorize(a, indent=1, seenobjects=None): | |
if a is True: return color('true') + 'true' + color('reset') | |
if a is False: return color('false') + 'false' + color('reset') | |
if a is None: return color('none') + 'null' + color('reset') | |
if isinstance(a, int): return color('int') + str(a) + color('reset') | |
if isinstance(a, float): return color('float') + str(a) + color('reset') | |
#if seenobjects is None: seenobjects = [] |
This file contains 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
This is a test to see if it works |
This file contains 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
#include <Keyboard.h> | |
#include <Mouse.h> | |
byte invert = 0, active = 0, mactive = 0, state = 0, mstate = 0; | |
int ontimer = 0, offtimer = 0; | |
//#define dodebug | |
void setup() { | |
pinMode(5, INPUT_PULLUP); | |
pinMode(6, INPUT_PULLUP); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 os | |
from PIL import Image | |
import numpy as np | |
width, height = 800, 600 | |
grid = np.zeros((height, width), dtype=np.uint8) | |
x = y = int(width / 2) |
This file contains 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 os | |
from PIL import Image | |
import numpy as np | |
def getneigh(x, y): | |
return ( | |
(x, y - 1), # N | |
(x + 1, y - 1), # NE |
This file contains 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 os | |
from PIL import Image, ImageDraw | |
import numpy as np | |
os.chdir(os.path.split(__file__)[0] or '.') | |
gsize = 100, 100 | |
grid = np.random.randint(0, 2, gsize, dtype=np.uint8) |
OlderNewer