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
/* | |
A Verilog implementation of a finite state machine to determine the | |
modulus of any number by three, in realtime. | |
The number can be input in most significant bit (MSB) first or least | |
significant bit (LSB) first order. The msb_modulus and lsb_modulus | |
modules return the modulus of the number as the number is entered. | |
Uses only and, or, not, xor, and nand gates. Also uses a clock to | |
coordinate the modules. |
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
{ | |
"pep8": false, | |
"sublimelinter_disable": [ | |
"python", | |
"pep8" | |
], | |
"javascript_linter": "jshint", | |
"jshint_options": { | |
"white": false, | |
"indent": 4, |
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 networkx as nx | |
def draw_graph(G): | |
from matplotlib import pyplot | |
pos = nx.graphviz_layout(G, prog='dot') | |
labels = dict((n, '%d' % n) for n, d in G.nodes(data=True)) | |
edge_labels = dict(((u, v,), d['op']) for u, v, d in G.edges(data=True)) | |
nx.draw_networkx(G, pos=pos, labels=labels, node_size=1000, | |
width=2, node_color='white', edge_color='blue') |
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
#!/usr/bin/env python | |
import numpy | |
import linecache | |
out_str = "" | |
def picklines(thefile, whatlines): | |
return [x for i, x in enumerate(thefile) if i in whatlines] |
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
#!/usr/bin/env python | |
import random | |
fname = 'test-input.txt' | |
fout = None | |
debug = False | |
def write(out): | |
global fout |
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
"routes": [{ | |
"id": "Hillsborough Area Regional Transit_6", | |
"textColor": "FFFFFF", | |
"color": "09346D", | |
"description": "", | |
"longName": "56th Street", | |
"shortName": "6", | |
"type": 3, | |
"agencyId": "Hillsborough Area Regional Transit", | |
"url": "http://www.gohart.org/routes/hart/06.html" |
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
void Dump( unsigned char* *mem, unsigned int stop ) { | |
cout << "mem = " << mem << endl; | |
unsigned char * p = reinterpret_cast< unsigned char*>( mem ); | |
for ( int i = 0; i < n; i++ ) { | |
std::cout << " " << i << " " << (mem+i) << " " << std::hex << int(p[i]) << std::dec << " " << endl; | |
} | |
} |
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
#!/usr/bin/env python | |
""" Example: | |
Enter command to run when a matched file changes: | |
g++ hashing.cpp - o main & & ./main | |
Enter space seperated list of file extensions to monitor: | |
.cpp .h | |
""" | |
import os |
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
/* spark a animation */ | |
@keyframes pound1 { | |
0% { | |
transform: rotateX(90deg) scale(0); | |
} | |
100% { | |
transform: rotateX(0deg) scaleX(1) scaleY(1) scaleZ(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
/** | |
* Darkens or lightens a CSS RGB color. Derived from http://www.sitekickr.com/coda/jquery/darken-background-color-element.html | |
* @param {string} rgb "rgb(26,26,26)"" | |
* @param {string} type "darken" or "lighten" | |
* @param {int} percent | |
* @return {string} returns the altered RGB color | |
*/ | |
function alterColor(rgb, type, percent) { | |
rgb = rgb.replace('rgb(', '').replace(')', '').split(','); |