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 __future__ import absolute_import, division, print_function | |
# might make this work on py2 | |
from builtins import * | |
# Copyright (c) 2014, Varian Medical Systems, Inc. (VMS) | |
# All rights reserved. | |
# | |
# ximReader is an open source tool for reading .xim file (both compressed and uncompressed) | |
# HND compression algorithm is used to compress xim files. For a brief description of HND | |
# compression algorithm please refer to the xim_readme.txt file. |
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 numpy as np | |
from itertools import product | |
from random import shuffle,random | |
def blank_road(**args): | |
lanes, cells = args['lanes'], args['cells'] | |
return np.zeros((lanes, cells)) |
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 __future__ import absolute_import, division, print_function | |
# might make this work on py2 | |
from builtins import * | |
# Copyright (c) 2014, Varian Medical Systems, Inc. (VMS) | |
# All rights reserved. | |
# | |
# ximReader is an open source tool for reading .xim file (both compressed and uncompressed) | |
# HND compression algorithm is used to compress xim files. For a brief description of HND | |
# compression algorithm please refer to the xim_readme.txt file. |
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 random | |
from string import ascii_lowercase | |
# a bit of a hacky solution to change the board names to be a bit better | |
from boards import easy as easy_board | |
from boards import hard as hard_board | |
WORD_FILENAME = 'wordlist.txt' |
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 __future__ import print_function | |
# updated to work with py3 using only standard lib modules | |
# unsure if it will work with py2 still... | |
import plistlib | |
import struct | |
import sys | |
from binascii import hexlify |
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 collections import defaultdict | |
import csv | |
csv.field_size_limit(999999999) | |
def get_csv(filename): | |
# get data from csv | |
# don't use built ins, like input, as variable names | |
with open('filename', 'r') as file_handle: | |
reader = csv.reader(file_handle, delimiter='|') |
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
class Message(): | |
'''mockup for discord message''' | |
def __init__(self, user, incoming): | |
self.user = user | |
self.incoming = incoming | |
def send_message(self, what): | |
print('{}: {}'.format(self.user, what)) |
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 requests | |
from bs4 import BeautifulSoup | |
import sqlite3 | |
import sys | |
import time | |
GROUPS = { | |
'Grenade':(52,55), | |
'Other':(55,56), |
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 __future__ import print_function | |
from builtins import input | |
#!/bin/py | |
#Python 2.7.6 | |
"""A text-based Python 2.7.6 implementation of the game Rock-Paper-Scissors. | |
Game play: | |
* each round, both players select from: rock, paper, or scissors | |
* rock beats scissors, scissors beats paper, paper beats rock |
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
class Node(object): | |
"""The class the handles the Node objects""" | |
def __init__(self, data=None, prev=None, next=None): | |
self.data = data | |
self.prev = prev | |
self.next = next | |
def __str__(self): | |
return "Node[Data = %s]" % (self.data,) |
NewerOlder