Skip to content

Instantly share code, notes, and snippets.

View c9s's full-sized avatar

c9s

  • Taipei, Taiwan
  • 12:48 (UTC +08:00)
  • X @c9s
View GitHub Profile
@c9s
c9s / fab.asm
Last active January 29, 2024 15:12
recursive fibonacci in x86-64 assembly language with NASM on Mac OS X
; nasm -f macho64 fab.asm && ld -arch x86_64 -lSystem fab.o -o fab && ./fab
global start
extern _printf
section .text
@c9s
c9s / CLA.md
Created January 24, 2024 07:43

BBGO Individual Contributor License Agreement

Adapted from http://www.apache.org/licenses/ © Apache Software Foundation.

In order to clarify the intellectual property license granted with Contributions from any person or entity, BBGO must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This CLA is for your protection as a Contributor as well as the protection of BBGO and its users; it does not change your rights to use your own Contributions for any other purpose.

Please read this document carefully before signing and keep a copy for your records.

You accept and agree to the following terms and conditions for your present and future Contributions Submitted to BBGO. In return, BBGO shall not use your Contributions in a way that is contrary to the public benefit or inconsistent with its nonprofit status and bylaws in effect at the time of the Contribution. Except for the license granted herein to BBGO and

@c9s
c9s / 國民黨籍貪污一覽表.txt
Created November 9, 2022 03:56
國民黨籍貪污一覽表
國民黨籍貪污一覽表
林益世: 國民黨籍 馬愛將行政院祕書長 國民黨大黨鞭 以協助中鋼公司下游協力廠商地勇公司續約為由,於2010年收取6000多萬現金涉恐嚇收賄 ,馬英九時代的行政院秘書長索賄8800萬不遂,索賄6300萬家裡金爐燒美金贜款放水池
賴素如: 國民黨籍 馬愛將 雙子星案涉嫌向投標業者索取新臺幣一千五百萬元賄款
何智輝: 國民黨籍 涉嫌新竹科學園區銅鑼基地弊案貪汙,一審獲判19年有期徒刑,二審改判14年有期徒刑,並於檢調調查前潛逃與捲入銅羅弊案遭到通緝的妻子王素筠與女兒目前在逃往中國大陸生活。
鄭太吉: 國民黨 前屏東縣議長 不顧被害人的母親下跪苦苦哀求當面槍殺其子 判處死刑 政黨輪替後才被陳部長正法
郭廷才: 國民黨 前屏東縣立委 挪用屏東港信合社存款23億 判刑7年
余慎: 國民黨 前屏東縣省議員 板橋四汴頭抽水站弊案經手賄款2600萬 判刑7年6月
黃清漢: 國民黨 前屏東市長 涉及路標動線系統工程弊案 涉嫌人 收押禁見
王玉雲: 國民黨 前高雄市長 違法超貸虧空 "中興銀行" 800億 判刑7年4月
@c9s
c9s / .babelrc
Last active October 21, 2023 14:04
webpack + babel + typescript + es6 - total solutions!
{
"presets": ["es2015"],
"plugins": ["transform-runtime"]
}
@c9s
c9s / cpandeps
Created November 22, 2011 15:00
#!perl -w
$|++;
use strict;
eval "use CPAN::FindDependencies;";
if($@) {
print STDERR "Couldn't load CPAN::FindDependencies.\n";
}
@c9s
c9s / .env.local
Last active March 6, 2023 13:37
BBGO 之 MAX 交易所網格設定指南
# API Key 可以在以下頁面建立:
# https://max.maicoin.com/api_tokens/new
#
MAX_API_KEY=
MAX_API_SECRET=
@c9s
c9s / tweet.js
Last active December 29, 2022 06:26
tweet text aggregator + eth wallet address
$$('main')[0].onclick = (e) => {
const re = /(0x[a-fA-F0-9]{40})/;
const addresses = [];
// const d = document.getElementsByTagName('main')
const els = document.querySelectorAll('[data-testid="tweetText"]')
const className = els[0].className;
const tweets = Array.from(document.getElementsByClassName(className));
console.log(`${tweets.length} tweets found`, tweets);
@c9s
c9s / readme.md
Created November 30, 2022 16:09
苗博雅 【一通接不到的電話,兩封寄不出的信,兩條救不回的冤魂】

苗博雅 【一通接不到的電話,兩封寄不出的信,兩條救不回的冤魂】

我本來打算,昨晚下班時,順路去寄信。沒想到,兩條冤魂就這樣成為不義政權的生人獻祭,成為古羅馬競技場的血腥娛樂。

在所有的死囚中,杜氏兄弟寫信給我的頻率算是頗高。他們的死刑判決2012年才定讞,我們2013年5月才開始通信。第一封來信,他們就說「本案件於91年7月8日曾由台南地方法院做出無罪判決,實屬冤枉……」。他們積極喊冤,每次來信總是熱切地詢問,是否有平反的機會。

但死刑冤案救援之路是那麼地漫長,江國慶案超過10年才平反;蘇建和、劉秉郎、莊林勳案超過20年才平反;邱和順案超過23年仍然含冤莫白。當杜氏兄弟問我進度如何,我都感到汗顏。

在台灣,死刑冤案救援非常困難,而杜氏兄弟案,更是難上加難。因為案發地點在國外,更荒謬的是,一個判決死刑的案件,所有的證物也都在國外。中國從未將所謂指向杜氏兄弟的證物交給台灣,法院所掌握的,僅是幾張「證物的照片」。要找出所謂的新證據、不在場證明,簡直難如登天。

@c9s
c9s / SharkLong.go
Created September 30, 2022 10:02 — forked from austin362667/SharkLong.go
Harmonic Pattern Strategy: Shark Long
func (s Harmonic) SharkLong(highs, lows *types.Queue, p float64) float64 {
score := 0.
for x := 5; x < 300; x++ {
X := lows.Index(x)
for a := 4; a < x; a++ {
if highs.Index(a-1) < highs.Index(a) && highs.Index(a) > highs.Index(a+1) {
A := highs.Index(a)
XA := math.Abs(X - A)
hB := A - 0.382*XA
lB := A - 0.618*XA
@c9s
c9s / bench.md
Last active July 15, 2022 07:34

BBGO Back-test performance improvements

BEFORE:

go run ./cmd/bbgo backtest --config localconfig/pivotshort-ETHUSDT.yaml      535.74s user 44.05s system 117% cpu 8:14.03 total

AFTER: (main branch)

go run ./cmd/bbgo backtest --config localconfig/pivotshort-ETHUSDT.yaml      11.37s user 3.49s system 98% cpu 15.040 total