Skip to content

Instantly share code, notes, and snippets.

async = require 'async'
_ = require 'lodash'
glob = require 'glob'
path = require 'path'
expect = require 'expect.js'
fs = require 'fs'
migrationFilePattern = /^(\d+)(-.*[.]coffee)/
getAllMigrations = ->
fs = require 'fs'
GEO_FIELD_MIN = 0
GEO_FIELD_MAX = 1
GEO_FIELD_COUNTRY = 2
exports.ip2long = (ip) ->
ip = ip.split '.', 4
'use strict'
exports.add = (arr) ->
if arr.length is 0
return [1]
result = []
i = arr.length - 1
c = 1
@tristanstraub
tristanstraub / gist:1b6f023513cf42f4952d
Created June 29, 2015 00:22
Date difference across DST boundary.
<html>
<head>
<script src='https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.7.0/moment.js'></script>
<script>
console.log(moment('2015-04-30T00:00:00').diff(moment('2015-04-01T00:00:00'), 'hours'));
</script>
</head>
<body>
</body>
--
-- xmonad example config file for xmonad-0.9
--
-- A template showing all available configuration hooks,
-- and how to override the defaults in your own xmonad.hs conf file.
--
-- Normally, you'd only override those defaults you care about.
--
-- NOTE: Those updating from earlier xmonad versions, who use
-- EwmhDesktops, safeSpawn, WindowGo, or the simple-status-bar
BAH64626586 successfully traded over 200 trades against my account, where my bids/asks were only at market value, so only open very short amounts of time.
Another successful strategy played the market, by purchasing early and selling late, after the market had climbed.
Ticker showed long runs at the same last trading price. The volume of these trades is also consistent,
but is probably just the behaviour of the honest bot.
Strategy:
1. Identify long runs of same last price in ticker.
2. Identify who is trading at the these long runs. (open orders and traders against open orders)
3. Which direction are they trading?
4. Identify consecutive runs.
5. Who is trading buy/sell across rising consecutive runs?
Assumptions:
1. Bots like to trade at the same quantities each time.
Profitable trades can be identified from the ticker when correlated with this unique quantity.
2. Order id and timestamps are monotonically increasing.
Orders made at regular intervals provide a correspondence between timestamp ranges
and order id ranges.
3. The most profitable trader is the inside trader.
Givens:
@tristanstraub
tristanstraub / Evidence
Last active January 3, 2016 03:01
Stockfighter level 6
Number of trades per account around price changes.
(2 2 2 2 2 ...) is suspicious.
(["MAC11396996" (2)]
["WMG74660049" (2)]
["KIB82586665" (2)]
["JAL12920359" (2)]
["KLB21545517" (2)]
["HRH56719296" (2)]
# INRES="1366x768" # input resolution
# OUTRES="1366x768" # output resolution
INRES="2560x1440" # input resolution
OUTRES="2560x1440" # output resolution
FPS="15" # target FPS
GOP="30" # i-frame interval, should be double of FPS,
GOPMIN="15" # min i-frame interval, should be equal to fps,
THREADS="2" # max 6
CBR="500k" # constant bitrate (should be between 1000k - 3000k)
QUALITY="veryfast" # one of the many FFMPEG preset