Skip to content

Instantly share code, notes, and snippets.

View tadeoos's full-sized avatar

Tadek Teleżyński tadeoos

View GitHub Profile

Keybase proof

I hereby claim:

  • I am tadeoos on github.
  • I am tadeo (https://keybase.io/tadeo) on keybase.
  • I have a public key whose fingerprint is 5F13 FB1B 569E 432A 0105 9E35 3890 725B 4477 7E6F

To claim this, I am signing this object:

@tadeoos
tadeoos / spot.py
Last active September 10, 2017 16:55
Script for calculating spotify's discover weekly probabilities
from __future__ import print_function, division
import itertools, sys, time
# simple factorial function
def fact(n, acc=1):
return acc if n == 0 else fact(n - 1, n * acc)
# binomial coefficient
def newton(n, k):
return 0 if k > n else fact(n) / (fact(k) * fact(n - k))
@tadeoos
tadeoos / stacktracer.py
Last active July 11, 2017 15:18
Script for detection of hanged programs
"""Stack tracer for multi-threaded applications.
Usage:
import stacktracer
stacktracer.trace_start("trace.html",interval=5,auto=True) # Set auto flag to always update file!
....
stacktracer.trace_stop()
"""
@tadeoos
tadeoos / dj-custom-test-command.py
Created September 1, 2017 00:52
Snippet for creating custom manage.py test command to wrap normal tests with coverage
import subprocess
from django.core.management import BaseCommand
class Command(BaseCommand):
help = "Run tests with coverage. See options for more actions."
def add_arguments(self, parser):
@tadeoos
tadeoos / tt-project-biulder.sh
Created September 3, 2017 20:52
Script to quickly build an open source python project with conda environment manager
#!/usr/bin/env bash
echo project_name: $1
if [[ "$1" == "" ]] ; then
echo 'provide project name'
exit 0
fi
mkdir $1
cd $1
@tadeoos
tadeoos / Early retirement extreme.ipynb
Created March 17, 2019 21:10
Math behind financial independence
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.