Skip to content

Instantly share code, notes, and snippets.

View arthurpham's full-sized avatar

Arthur Pham arthurpham

View GitHub Profile
@arthurpham
arthurpham / ib-tos-convert.py
Created August 29, 2017 16:21 — forked from stevegee58/ib-tos-convert.py
Interactive Brokers to Thinkorswim Trade Log Converter
import sys
import operator
if (len(sys.argv) == 3):
inputFileName = sys.argv[1]
outputFolder = sys.argv[2]
# open symbols file
tradelogFile = open(inputFileName,"rU")
# -*- coding: utf-8 -*-
"""
Created on Fri Sep 2 13:23:34 2016
@author: Brian Christopher, CFA [Blackarbs LLC]
"""
import pandas as pd
from more_itertools import unique_everseen
import requests
# -*- coding: utf-8 -*-
"""
Created on Fri Sep 2 13:26:48 2016
@author: Brian Christopher, CFA [Blackarbs LLC]
"""
import time
import pandas as pd
import numpy as np
@arthurpham
arthurpham / lftp-mirror
Created April 12, 2017 03:27 — forked from bensbrowning/lftp-mirror
lftp mirror script for cron
#!/bin/bash
login="user"
pass="pass"
host="foo.bar.com"
remote_dir="/path/on/foo/bar/"
local_dir="/home/you/foobar-mirror/"
log_file="/tmp/lftp-mirror.log"
// requires
var utils = require('utils');
var casper = require('casper').create()
var casper = require('casper').create({
verbose: true,
logLevel: "debug"
});
// setup globals
var email = casper.cli.options['email'] || 'REPLACE THIS EMAIL';