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
# Custom Dictonary | |
import struct | |
class CustomDict(dict): | |
def __init__(self, *args, **kwargs): | |
super().__init__(*args, **kwargs) | |
# Additional initialization code if needed | |
self.ss = None | |
self.bdata = None |
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
# File: tk_graphic.py | |
# Author: Jake Robinson | |
# Date: 27SEP2018 | |
from Tkinter import * | |
import datetime | |
import random | |
import time | |
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
# File: tk_base.py | |
# Author: Jake Robinson | |
# Date: 09AUG2018 | |
from Tkinter import * | |
import datetime | |
class App: | |
def __init__(self, master): | |
frame = Frame(master) |
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
""" | |
Pygame base template for opening a window | |
""" | |
import pygame | |
from datetime import datetime | |
# Define some colors | |
BLACK = (0, 0, 0) |
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
""" | |
Pygame base template for opening a window | |
""" | |
import pygame | |
# Define some colors | |
BLACK = (0, 0, 0) | |
WHITE = (255, 255, 255) |
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
# Chip 8 OpCode Reader | |
# Loads a chip 8 rom and reads the opcodes | |
# Displays a human readable discribtion of the opcode | |
rom = open("pong", "rb") | |
data = [] | |
simple_codes = [1,2,3,4,5,6,7,9,10,11,12,13] |
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 multiprocessing | |
from multiprocessing import Pool | |
def say_hello(nums): | |
return sum([x**x for x in xrange(nums[0], nums[1])]) | |
if __name__ == '__main__': | |
num_processors = multiprocessing.cpu_count() | |
print 'You have {0:1d} CPUs'.format(num_processors) |
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 | |
import requests | |
from requests_oauthlib import OAuth1 | |
consumer_key='key' | |
consumer_secret='secret' | |
access_token_key='t_key' | |
access_token_secret='t_secret' |
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
# File: simpletk_base.py | |
# Programmer: Jake Robinson | |
# Date: 03MAR2013 | |
from Tkinter import * | |
from ttk import * | |
class App: | |
def __init__(self, master): | |
frame = Frame(master) |
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 Tkinter import * | |
import math | |
c = Canvas(width=200, height=200) | |
c.pack() | |
# a square | |
xy = [(50, 50), (150, 50), (150, 150), (50, 150)] |
NewerOlder