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
writer = shapefile.Writer(shapeType=shapefile.POINT) | |
writer.autoBalance = 1 | |
# iterate through the entire dataset and extract the field names | |
headers = {} | |
for row in data: | |
headers.update({k.replace('PID_', '').split(' ')[0]: type(v) for k, v in row.items() if v is not None}) | |
del headers['pos'] | |
writer.field('latitude', 'N', '32', 15) | |
writer.field('longitude', 'N', '32', 15) | |
header_map = { |
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 flask import Flask | |
from flask_sockets import Sockets | |
import json | |
from random import randint | |
app = Flask(__name__) | |
sockets = Sockets(app) | |
current_players = {} | |
game_x_min = 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
ser = serial.Serial(path, baudrate=38400, timeout=1) | |
ser_io = io.TextIOWrapper(io.BufferedRandom(ser), | |
newline='\r', | |
line_buffering=False, | |
encoding='ascii') |
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
#!/usr/bin/python2 | |
#####################################NOTICE###################################### | |
### This program is free software: you can redistribute it and/or modify ### | |
### it under the terms of the GNU General Public License as published by ### | |
### the Free Software Foundation, either version 3 of the License, or ### | |
### (at your option) any later version. ### | |
### This program is distributed in the hope that it will be useful, ### | |
### ### | |
### but WITHOUT ANY WARRANTY; without even the implied warranty of ### | |
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ### |
This file has been truncated, but you can view the full 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
var Dictionary = new Set([ | |
"a", | |
"aah", | |
"aardvark", | |
"aardvarks", | |
"ab", | |
"aback", | |
"abacus", | |
"abacuses", | |
"abaft", |
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
/** | |
* Created by mack0242 on 6/04/17. | |
*/ | |
var TrieNode = function (parent, value) { | |
this.parent = parent; | |
this.children = new Array(26); | |
this.isWord = false; | |
if (parent !== undefined) { | |
parent.children[value.charCodeAt(0) - 97] = this; | |
} |
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
/** | |
* Created by mack0242 on 5/04/17. | |
*/ | |
var Node = function(value, row, col) { | |
this.value = value | |
this.row = row | |
this.col = col | |
} | |
var Path = function() { |
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
var Dictionary = new Set([ | |
"a", | |
"aah", | |
"aardvark", | |
"aardvarks", | |
"ab", | |
"aback", | |
"abacus", | |
"abacuses", | |
"abaft", |
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
<pyopencl.Device 'Tonga' on 'AMD Accelerated Parallel Processing' at 0x749460> | |
Repeating [test_overwrite_ecb()] 1000 times.... | |
Function [test_overwrite_ecb] finished in average of 0:00:00.003962 | |
Repeating [test_overwrite_efb()] 1000 times.... | |
Function [test_overwrite_efb] finished in average of 0:00:00.002380 | |
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 PIL import Image | |
import numpy as np | |
import pyprind | |
import random | |
import os | |
import pygame | |
from collections import defaultdict, Counter | |
class MarkovChain(object): |