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
function CheckTestForm (intTryNum) { | |
var strSessionTime; | |
if (blnSubmitClicked) { | |
return; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script> | |
<script src="http://builds.emberjs.com.s3.amazonaws.com/tags/v1.0.0/ember.js"></script> | |
<meta charset=utf-8 /> | |
<script src="https://bitbucket.org/cetir/catcher/raw/0199a325eb50128dbf68c4e6a90af87efd3cc8ae/static/catcher/js/data.utils.js"></script> | |
<title>JS Bin</title> | |
</head> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script> | |
<script src="http://builds.emberjs.com.s3.amazonaws.com/tags/v1.0.0/ember.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> |
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
""" | |
pip install fake-factory | |
""" | |
from faker import Faker | |
fake = Faker() | |
with open('location.csv', 'wb') as f: |
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
def dfs(graph, start, result=[]): | |
""" | |
Depth First Search | |
Follow each path in depth until | |
there are no more unvisted nodes. | |
Then reverse until we find an unvisited | |
node and continue to the depth of that path. | |
Repeat until there are no more unvisted nodes. | |
""" |
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 os | |
import re | |
import sys | |
from functools import partial | |
def f(host=u'', x=None): | |
""" | |
Returns string | |
""" |
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
Show hidden characters
[ | |
{ | |
"button": "button1", "modifiers": ["alt"], | |
"press_command": "drag_select", | |
"press_args": {"by": "columns"} | |
} | |
] |
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
# manage.py in Django project | |
import re | |
def read_env(): | |
""" | |
Pulled from Honcho code with minor updates, reads local default | |
environment variables from a .env file located in the project root | |
directory. | |
""" | |
try: |
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
v = 'True' | |
def bool2(): | |
v[0].lower() in ('t','1','y') |
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 csv | |
def csv_to_list(file_path): | |
""" | |
Reads csv file into list. | |
""" | |
with open(file_path, 'rb') as f: | |
# load all data into memory, scary | |
dialect = csv.Sniffer().sniff(f.read(1024)) | |
f.seek(0) # reset cursor |