Skip to content

Instantly share code, notes, and snippets.

Avatar

Boris Gorelik bgbg

View GitHub Profile
View before_and_after_stacked_bars.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View before_and_after_spider_charts.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View corona_vs_flu.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View stackoverflow_jobs.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View emphasizing in graphs.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View observation_adjustment.py
np.random.seed(123456)
N = 100
aim = 0
scale = 0.5
adjusted = []
for i in range(N):
curr = np.random.randn() * scale + aim
adjusted.append(curr)
aim = -curr
non_adjusted = np.random.randn(N)*scale
@bgbg
bgbg / asciihist.py
Last active Aug 31, 2020
ASCII histograms
View asciihist.py
from __future__ import print_function
import numpy as np
def asciihist(it, bins=10, minmax=None, str_tag='',
scale_output=30, generate_only=False, print_function=print):
"""Create an ASCII histogram from an interable of numbers.
Author: Boris Gorelik boris@gorelik.net. based on http://econpy.googlecode.com/svn/trunk/pytrix/pytrix.py
License: MIT
"""
ret = []
View monty_hall.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View israeli_gender_payment_gap.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bgbg
bgbg / holidays_in_tishrei.ipynb
Last active Sep 16, 2020
holidays_in_tishrei.ipynb
View holidays_in_tishrei.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.