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 scene import * | |
class MyScene (Scene): | |
def setup(self): | |
self.white = False | |
def draw(self): | |
if self.white == True: | |
background(1, 1, 1) | |
else: |
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 sys | |
s = {} | |
for i in range(1, 6): | |
s[i] = sys.maxsize | |
for i in range(5): | |
while True: |
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
--3demo | |
--simple 3d demo | |
cube = {{{-1,-1,-1}, --points | |
{-1,-1,1}, | |
{1,-1,1}, | |
{1,-1,-1}, | |
{-1,1,-1}, | |
{-1,1,1}, | |
{1,1,1}, | |
{1,1,-1}, |
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
--3demo | |
--simple 3d demo | |
-- Here is the data for the 3d model | |
-- The first section is the 3d location | |
-- of each point on the cube, and the | |
-- second section is the lines that | |
-- connect the points | |
cube = {{{-1,-1,-1}, -- points | |
{-1,-1,1}, |
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
@0 | |
@1 | |
MOV UP, DOWN | |
@2 | |
##AOC DAY 1.1 | |
@3 |
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
@0 | |
@1 | |
TOP:MOV UP, ACC | |
SUB 40 | |
JLZ DONE | |
MOV ACC, DOWN | |
JMP TOP | |
DONE: |
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
class Node(object): | |
def __init__(self, code): | |
self.code = code.split('\n') | |
self.line = 0 | |
self.pin = {'UP': None, | |
'DOWN': None, | |
'LEFT': None, | |
'RIGHT': None} | |
self.pout = {'UP': None, | |
'DOWN': None, |
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
public class Evaluator { | |
public class ParseException extends Exception { | |
public ParseException () { | |
super("Error parsing string"); | |
} | |
public ParseException(String msg) { | |
super(msg); | |
} | |
} |
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
# -*- coding: utf-8 -*- | |
from requests import get | |
from bs4 import BeautifulSoup | |
import time | |
import Foundation | |
import objc | |
NSUserNotification = objc.lookUpClass('NSUserNotification') | |
NSUserNotificationCenter = objc.lookUpClass('NSUserNotificationCenter') |
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 turtle, sys, math | |
def dragon_curve(t, n, l): | |
sqrt2over2 = math.sqrt(2)/2 | |
i = [1 for i in range(n)] | |
def r(n, l): | |
if n == 0: | |
t.forward(l) | |
else: | |
_ = 1 |
OlderNewer