Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@elsonidoq
elsonidoq / grupos.ipynb
Last active November 9, 2020 14:28
Un algoritmo para armar grupos de estudio parejos
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@elsonidoq
elsonidoq / random_tateti_2.ipynb
Created September 14, 2020 18:01
Random tateti
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@elsonidoq
elsonidoq / random_tateti.ipynb
Created September 14, 2020 17:23
Random ta te ti
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
from time import time
import scipy
from scipy import stats
from math import sqrt
from multiprocessing import current_process
class Progress(object):
def __init__(self, tot=None, prefix=None,
template='sp: %(speed).02fi/s, pr: %(progress).02f%%, rt: %(remaining)s, it: %(iteration_time)s, %(cnt)s of %(tot)s, pt: %(process_time)s',
threaded_cnt= None, print_time=0.25, print_pid=False):
class mydefaultdict(dict):
def __init__(self, default, **kwargs):
super(mydefaultdict, self).__init__(**kwargs)
self.default = default
def __getitem__(self, item):
try:
return super(mydefaultdict, self).__getitem__(item)
except KeyError:
val = self.default(item)
old_db = ... # connect to old db
new_db = ... # connect new migrated db
def bluebook_position_test_data(old_doc, new_doc):
"""
tests whether old_doc (from bluebook_position) contains the same information than new_doc (from scores)
"""
# do something here
def test_bluebook_position():
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Aumentos inflacionarios"
]
},
{