Skip to content

Instantly share code, notes, and snippets.

View jeethu's full-sized avatar

Jeethu Rao jeethu

View GitHub Profile
@jeethu
jeethu / live_signals_sharpe_sortino.ipynb
Last active July 8, 2021 17:22
Live annualized Sharpe and Sortino metrics for Numerai Signals
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jeethu
jeethu / evaluation.py
Created August 25, 2020 17:01
Numerai Model Evaluation
import functools
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import matplotlib.table as table
import numpy as np
import pandas as pd
from scipy.stats import spearmanr
TOURNAMENT_NAME = "kazutsugi"
@jeethu
jeethu / example_model.py
Created April 23, 2020 19:20
numerai example_model with int8 features
#!/usr/bin/env python
"""
Example classifier on Numerai data using a xgboost regression.
To get started, install the required packages: pip install pandas numpy sklearn xgboost
"""
import csv
import pandas as pd
import numpy as np
@jeethu
jeethu / example_model.py
Created January 17, 2020 12:13
Numerai example_model.py using np.float16 for features and target
#!/usr/bin/env python
"""
Example classifier on Numerai data using a xgboost regression.
To get started, install the required packages: pip install pandas numpy sklearn xgboost
"""
import csv
import pandas as pd
import numpy as np
3.8_baseline4.json
==================
Performance version: 0.7.0
Report on Linux-4.15.0-43-generic-x86_64-with-glibc2.26
Number of logical CPUs: 4
Start date: 2019-01-23 23:27:43.675291
End date: 2019-01-24 00:00:30.138941
3.8_load_const_ref4.json
@jeethu
jeethu / gist:19430d802aa08e28d1cb5eb20a47a470
Created January 17, 2018 00:55
perf timeit comparison Raw
jeethu@Odin:~/Projects/cpython$ # Baseline
jeethu@Odin:~/Projects/cpython$ taskset -c 2,3,6,7 python3 -m perf timeit --python=~/Projects/cpython/venv/cpython3.7-487fa3ea092b/bin/python -s 'l=[]' $(python3 -c 'print("l.insert(0, None); " * 100 + "l.clear();")') --duplicate 100
.....................
WARNING: the benchmark result may be unstable
* the standard deviation (1.37 us) is 13% of the mean (10.5 us)
Try to rerun the benchmark with more runs, values and/or loops.
Run 'python3 -m perf system tune' command to reduce the system jitter.
Use perf stats, perf dump and perf hist to analyze results.
Use --quiet option to hide these warnings.
@jeethu
jeethu / gist:2d2de55afdb8ea4ad03b6a5d04d5227f
Created January 17, 2018 00:04
perf timeit comparison
jeethu@Odin:~/Projects/cpython$ # Baseline
jeethu@Odin:~/Projects/cpython$ ~/Projects/cpython/venv/cpython3.7-487fa3ea092b/bin/python -c "import sys;print(sys.version)"
3.7.0a4+ (heads/master:9f1b7b93f5, Jan 16 2018, 19:15:03)
[GCC 7.2.0]
jeethu@Odin:~/Projects/cpython$ taskset -c 2,3,6,7 python3 -m perf timeit --python=~/Projects/cpython/venv/cpython3.7-487fa3ea092b/bin/python -s 'l=[];ins=l.insert' $(python3 -c 'print("ins(0, None); " * 100 + "l.clear();")') --duplicate 100
.....................
Mean +- std dev: 6.55 us +- 0.03 us
jeethu@Odin:~/Projects/cpython$ # py37_list_insert_memmove
.file "listobject.c"
.intel_syntax noprefix
.text
.p2align 4,,15
.type list_reverse, @function
list_reverse:
.LFB125:
.cfi_startproc
mov rdx, QWORD PTR 16[rdi]
cmp rdx, 1
py37_baseline-no-pgo-no-lto.json
================================
Performance version: 0.6.0
Report on Linux-4.13.0-19-generic-x86_64-with-debian-stretch-sid
Number of logical CPUs: 8
Start date: 2018-01-16 21:08:29.457607
End date: 2018-01-16 21:46:10.018098
py37_list_insert_memmove-t32-no-pgo-no-lto.json
py37_baseline-no-pgo.json
=========================
Performance version: 0.6.0
Report on Linux-4.13.0-19-generic-x86_64-with-debian-stretch-sid
Number of logical CPUs: 8
Start date: 2018-01-15 23:36:29.563960
End date: 2018-01-16 00:13:14.443979
py37_list_insert_memmove-no-pgo.json