(defun append-text-to-buffer (buffer text)
"Append to specified buffer the text of the region.
It is inserted into that buffer before its point.
When calling from a program, give three arguments:
BUFFER (or buffer name), START and END.
START and END specify the portion of the current buffer to be copied."
(interactive
(list (read-buffer "Append to buffer: " (other-buffer (current-buffer) t))
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
(defn- <promise | |
"Call a function that returns a promise and convert it into a channel" | |
[f & args] | |
(let [out (a/chan) | |
done (fn [& _] (a/close! out))] | |
(.then (apply f args) done done) | |
out)) | |
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
(defn- <cb | |
"Call an callback style function and return a channel containing the result of calling the callback" | |
[f & args] | |
(let [out (a/chan)] | |
(apply f (conj (into [] args) (fn [& args] | |
(a/put! out args) | |
(a/close! out)))) | |
out)) | |
(a/<!! (<cb (fn [cb] (cb-style-f 1 2 3 cb)))) |
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
(cd .deploy && git pull) || git clone [email protected]:repository/path.git .deploy |
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
(ns service.async | |
(:require-macros [cljs.core.async.macros :as a]) | |
(:require [cljs.core.async :as a])) | |
(defn <cb [f & args] | |
(let [out (a/chan)] | |
(apply f (conj (into [] args) #(a/close! out))) | |
out)) | |
(defn <promise [f & args] |
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
# 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 |
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
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)] |
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
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: |
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
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? |
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
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. |