Skip to content

Instantly share code, notes, and snippets.

@arivero
arivero / Dualities.tex
Created August 18, 2017 12:22
M theory superstring dualities, tikz graph for latex
\usetikzlibrary{arrows}
\begin{tikzpicture}
\node (v1) at (-4,3) {IIA};
\node (v2) at (-4,-1) {IIB};
\node (v4) at (0.5,0) {I};
\node (v6) at (4.5,-1) {$H_{32}$};
\node (v3) at (0.5,2) {I'};
\node (v5) at (4.5,3) {$H_{E\times E}$};
\node (v8) at (-7,-0.5) {};
@arivero
arivero / telegram_alarm.py
Last active October 12, 2016 23:51
pokemon notification bot for Telegram/pkalarm somehow extended
#Setup Logging
import logging
log = logging.getLogger(__name__)
#Python modules
import io
import json
#Local modules
from ..alarm import Alarm
@arivero
arivero / borrador.py
Last active July 8, 2016 13:42
elecciones 2016
# 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
@arivero
arivero / podemosPrimariasGene
Created July 24, 2015 18:00
resumen por euipos de las primarias de podemos a las generales
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
@arivero
arivero / Asimpletally.py
Last active August 29, 2015 14:08
Contador rapido para el plaintext.json del voto de Resoluciones de "Podemos", adaptado de agoravoting
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
@arivero
arivero / StandardModelLog.tex
Last active June 6, 2017 19:53
tikz/pkgplot logplot of quarks and leptons in Standard Model of Elementary Particles
\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}
@arivero
arivero / _.md
Created September 26, 2014 12:01
Tributary inlet
@arivero
arivero / _.md
Created September 26, 2014 12:01
Tributary inlet
#!/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
@arivero
arivero / gist:8529263
Last active January 3, 2016 22:38
reparto aleatorio, con crecimiento de nodos
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