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/python3 | |
from datetime import date, timedelta, datetime | |
# Disclaimer: not investment advice, and this is a sloppy script! | |
# Objective Inputs | |
GLOBAL_LOCKED_veCRV = 362000000 | |
# Subjective Inputs |
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 time | |
import select | |
import socket | |
class AsyncSleep: | |
"""Event and action to sleep ``until`` a point in time""" | |
def __init__(self, until): | |
self.until = until |
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
'use strict'; | |
describe('mocha before hooks', function () { | |
before(() => console.log('*** top-level before()')); | |
beforeEach(() => console.log('*** top-level beforeEach()')); | |
describe('nesting', function () { | |
before(() => console.log('*** nested before()')); | |
beforeEach(() => console.log('*** nested beforeEach()')); | |
it('is a nested spec', () => true); | |
}); |
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
#signals.py | |
from django.dispatch import Signal | |
user_login = Signal(providing_args=["request", "user"]) | |
#views.py | |
from foo import signals |
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 pylab import * | |
def cface(ax, x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18): | |
# x1 = height of upper face | |
# x2 = overlap of lower face | |
# x3 = half of vertical size of face | |
# x4 = width of upper face | |
# x5 = width of lower face | |
# x6 = length of nose | |
# x7 = vertical position of mouth |
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/env python | |
# Using BaseHTTPServer for mocking servers | |
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
from threading import Thread | |
from time import sleep, time | |
from urllib import urlopen | |
import httplib |