[ 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
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: |
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
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/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 |
[ 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
\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} |
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
Equipo PABLO IGLESIAS | |
1.- Íñigo Errejón Galván (45122 votos, 76.12%) | |
2.- Carolina Bescansa (42901 votos, 72.37%) | |
... | |
61.- Mª Dolores Marín-Albo Montes (35989 votos, 60.71%) | |
68.- Arnau Mallol I Baró (35685 votos, 60.2%) | |
UTOPIA Y DIGNIDAD |
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
# coding: utf-8 | |
# In[1]: | |
f=open("test.json") | |
# In[2]: | |
import json | |
from collections import OrderedDict | |
# In[3]: | |
j=json.load(f,object_pairs_hook=OrderedDict) | |
# In[8]: | |
from collections import Counter,defaultdict |
OlderNewer