[ Launch: Tributary inlet ] 881a0c933c6c5ed43c55 by arivero[ Launch: Tributary inlet ] 1fb651c0bf612e3cd576 by arivero
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict,Counter | |
import json | |
plaintexts_file=open("plaintexts_json") | |
question=defaultdict(int) | |
total_count=0 | |
total=Counter() | |
for line in plaintexts_file.readlines(): | |
total_count += 1 | |
try: | |
number = int(line[1:-2]) - 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[a4paper,landscape]{article} | |
%remember to install pfgplots | |
%\usepackage{gensymb} | |
\usepackage{graphicx} | |
%\usepackage{amsmath} | |
\usepackage{adjustbox} %either import it, or remove the begin...end | |
%{amsart} | |
\usepackage{tikz} | |
\usepackage{pgfplots} |
[ Launch: Tributary inlet ] 1fb651c0bf612e3cd576 by arivero
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import json | |
import sys | |
import re | |
import time | |
from itertools import combinations | |
from collections import Counter,defaultdict | |
from datetime import datetime | |
import urllib2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import randint | |
from array import array | |
import sys | |
total=10000 | |
#reparto=20000 | |
reparto=int(sys.argv[1]) | |
cantidad=array('l',(1 for x in xrange(total))) | |
for i in xrange(reparto-total): | |
concede=randint(1,total) | |
x, ticks =-1,0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Classes to produce videos from igraph plots. | |
""" | |
from __future__ import with_statement | |
from contextlib import contextmanager | |
from igraph.drawing import BoundingBox, Plot | |
from shutil import rmtree |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if True: | |
informa=0 | |
print cantidad[:50] | |
print numero[:50] | |
ricos=sum(cantidad[:len(cantidad)/100]) | |
print "hemos repartido ", total , " entre ", sum(numero), | |
print " (media=",1.0*total/sum(numero), ")", reparto | |
print "el mas rico posee ", 1.0*cantidad[0]*sum(numero)/total, "veces mas que la media" | |
ricosnum,ricoscant,xx=0,0,-1 | |
for corte in 10000,1000,100,20,10,5,10.0/3,10.0/4,2,10.0/6,10.0/7,10.0/8,10.0/9,10.0/9.5,10.0/9.9: |
NewerOlder