Skip to content

Instantly share code, notes, and snippets.

@tudorelu
tudorelu / AsyncPeriodicBackgroundTaskHandler.py
Created October 18, 2022 04:26
Takes a bunch of async functions and calls them periodically, in a separate thread
# ---------------------------------------------
#
# Class which takes a bunch of async functions
# and calls them periodically in a separate
# thread
#
# ---------------------------------------------
# ---------------------------------------------
# std imports
@tudorelu
tudorelu / gist:f7d608bdf64e4b14d822c98e9af75657
Created February 22, 2021 06:32
Quora answer f finance undergrads
Quora Answer:
https://www.quora.com/q/financeanalytics?__ni__=0&__nsrc__=4&__snid3__=17799020765&__tiids__=4024214
What are the best paying jobs with a finance degree?
Originally Answered: What are the highest paying finance jobs?
“What are the highest paying finance jobs?”
It’s a fair question to ask, as most finance/business students in school, don’t understand or even know about many of the jobs out there

Binance Futures Data

import ccxt
print('CCXT Version:', ccxt.__version__)
from pprint import pprint

exchange = ccxt.binance({
    'enableRateLimit': True,
    'options': {
Documentation here:
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.corrwith.html
Using Pearson Correlation
from wikipedia:
In statistics, the Pearson product-moment correlation coefficient is a
measure of the linear dependence between two variables X and Y, giving
a value between +1 and −1 inclusive, where 1 is total positive linear
correlation, 0 is no linear correlation, and −1 is total negative linear
@tudorelu
tudorelu / all_indicators.py
Created July 12, 2020 02:29
the list of all on chain data points
all_endpoints = dict(
indicators_sopr = "indicators/sopr",
indicators_asopr = "indicators/sopr_adjusted",
indicators_lth_sopr = "indicators/sopr_more_155",
indicators_sth_sopr = "indicators/sopr_less_155",
indicators_nvt = "indicators/nvt",
indicators_nvts = "indicators/nvts",
indicators_velo = "indicators/velocity",
indicators_cdd = "indicators/cdd",
indicators_sacdd = "indicators/cdd_supply_adjusted",
import RPi.GPIO as GPIO
import time
import math
import sys
from hx711 import HX711
from pijuice import PiJuice
import os
import firebase_admin
admin.addPeer(""enode://50c5f812da8c8eab832fa29258e683132b36ace28f9fe3be908e5ff33981f27dcaa13901089827f22a3d8693fd6e6cecdf629683fdde32695bd2ae1961a7dab5@203.214.112.190:30303?discport=0")
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.XR.ARFoundation;
/// <summary>
/// Controls the basketball.
/// </summary>
[RequireComponent(typeof(Rigidbody))]
@tudorelu
tudorelu / TudorCCC.md
Last active March 12, 2019 03:24
Tudor's CCC proposal

Tudor's CCC Proposal

General Information

Name Tudor Barbulescu

Location Canberra, Australia

@tudorelu
tudorelu / gist:fdd155051480f78c906b38799b5aa199
Last active June 15, 2018 02:02
Ubuntu 16.04 AMD Miner setup
#On a clean install of Ubuntu 16.04, how to get the best hashrate out of your cards (prior to OCing and BIOS flashing)
sudo apt update
sudo apt dist-upgrade
#Install version 17.40 of the AMDGPU-PRO Linux Drivers:
cd /opt
sudo wget --referer=http://support.amd.com https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-17.40-492261.tar.xz
sudo tar -Jxvf amdgpu-pro*
cd amd*