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
-- Creates database structure for StackOverflow-dump | |
-- required: | |
-- - http://stackoverflow.com/questions/10762239/mysql-enable-load-data-local-infile | |
DROP DATABASE stackoverflow; | |
CREATE DATABASE stackoverflow; | |
USE stackoverflow; |
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 subprocess, logging, time, threading, json, os | |
###################################################### | |
# Setup; change this. | |
CLIENT = 'namecoin\\namecoind.exe'; | |
LOGGER = logging.getLogger('namecoind'); | |
FORMAT = '%(asctime)-15s %(levelname)-5s: %(message)s' | |
logging.basicConfig(format=FORMAT, level=logging.INFO); | |
####################################################### |
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
# Fixes some inconsistencies in self-generated historical stockdata-files. | |
import sys, datetime; | |
# Retrieve file arg | |
try: | |
path = sys.argv[1] | |
except: | |
exit("No file argument provided!"); | |
# Fix data |
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
# Equation Generation Algorithm - prototype script. | |
import random; | |
class EquationType: | |
def __init__(self,pycode,argcount): | |
self.pycode = pycode; | |
self.argcount = argcount; | |
arith = lambda: None | |
arith.ADD = EquationType("+",2); |
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 simple "Binomial Non-Arbitrage Pricing model (BNPM)" simulator. Requires python 2.x | |
import sys; | |
steps = ("--steps" in sys.argv); # if --steps is included, BNPM.py will show all V-values. | |
PUT = "p"; CALL = "c"; | |
class Stock: | |
tail = head = None; | |
val = -1.0; | |
period = 0; | |