Skip to content

Instantly share code, notes, and snippets.

View aniversarioperu's full-sized avatar

AniversarioPeru aniversarioperu

View GitHub Profile
@aniversarioperu
aniversarioperu / intoxicados_qali_warma.csv
Created October 27, 2013 09:47
número de intoxicados por Qali Warma por fecha y link a la nota de prensa.
Loreto 2013-10-25 80 http://bit.ly/18YdMbA
Junin 2013-09-28 35 http://bit.ly/18qqNpT
Curahuasi 2013-09-18 50 http://bit.ly/18qqEmx
Huanuco 2013-04-18 17 http://bit.ly/18qqzPL
Urubamba 2013-04-15 100 http://bit.ly/18qqlYX
Ucayali 2013-10-05 15 http://bit.ly/18qqfAm
Satipo 2013-09-27 24 http://bit.ly/18YeiGx
@aniversarioperu
aniversarioperu / tabla4.csv
Created October 22, 2013 20:55
Tabla 4. Porcentaje de pobres multidimensionales vs. Gasto social por departamento, Perú 2012
Moquegua 24.8 1949
Tumbes 28.4 1839
Ayacucho 56.6 1779
Pasco 55.8 1769
Huancavelica 68.5 1750
Apurímac 60.9 1725
Madre de Dios 27.1 1584
Cusco 38.2 1574
Amazonas 61.7 1404
Tacna 26.5 1399
@aniversarioperu
aniversarioperu / top20.py
Created October 22, 2013 14:05
top20 mas toneras radio inspiracion
# -*- coding: utf-8 -*-
import prettyplotlib as ppl
import numpy as np
from prettyplotlib import plt
import csv
from array import array
""" Top 20 ranking """
x = []
@aniversarioperu
aniversarioperu / top10.py
Last active December 26, 2015 05:18
plot top 10 más toneras
# -*- coding: utf-8 -*-
import prettyplotlib as ppl
import numpy as np
from prettyplotlib import plt
import csv
from array import array
import collections
""" Top 10 ranking """
@aniversarioperu
aniversarioperu / all_data.csv
Created October 22, 2013 11:57
canciones más toneras, radio inspiración,
maxima lejos de ti
1 El baile del caballo
1 Opam kay kasja
2 donde esta el amor
3 ya no sere tu panuelito
4 ai se eu te pego
5 tu ausencia
6 hoy he vuelto a ver el amor
7 intentalo
8 linda wawita
Amazonas,32.86,104
Áncash,32.65,134
Apurímac,50.49,139
Arequipa,38.41,118
Ayacucho,45.88,129
Cajamarca,53.93,120
Cusco,32.08,118
Huancavelica,35.60,125
Huánuco,42.40,125
Ica,20.06,152
@aniversarioperu
aniversarioperu / reanalisis.R
Last active December 26, 2015 03:09
análisis estadistico de Qali Warma
require(stats)
library(ggplot2)
x <- read.csv("tabla31.csv", header=FALSE)
plot(x$V3, x$V2, xlim=c(0,200), ylim=c(0,
70),
ylab="Déficit calórico",
xlab="Presupuesto de Gasto por niño (PIM)",
main="Hay correlación entre gasto y déficit calórico?\nPrimicia: NO hay!")
reg_lineal <- lm(x$V3 ~ x$V2)
abline(lsfit(x$V3, x$V2))
@aniversarioperu
aniversarioperu / bajar_resoluciones.sh
Created October 20, 2013 16:24
Script para bajarse resoluciones del Ministerio de Justica durante el 2do gobierno aprista
## Lista de links de las Normas del Ministerio de Justicia del 2006 al 2011
# Bajar fechas 00-01-06 hasta 39-09-09
curl -o '#1#2-0#3-0#4.pdf' 'http://spij.minjus.gob.pe/Normas/textos/[0-1][0-1]0[1-1]0[6-6]T.pdf'
sleep $[ ( RANDOM % 10 ) + 1]m
# Bajar fechas 00-01-06 hasta 39-09-09
curl -o '#1#2-0#3-0#4.pdf' 'http://spij.minjus.gob.pe/Normas/textos/[0-3][0-9]0[1-9]0[6-9]T.pdf'
sleep $[ ( RANDOM % 10 ) + 1]m
@aniversarioperu
aniversarioperu / tuit_chat.py
Created October 19, 2013 20:04
tuitbot que chatea con trolls.
#!/usr/bin/env python
# -*- coding: UTF8 -*-
import codecs;
import os;
import datetime;
import re;
import bitly;
import subprocess;
import time;
import sys;
import pickle
import random
import sys
import re
# Modified from http://pythonism.wordpress.com/2010/04/18/a-simple-chatbot-in-python/
a = open('lexicon-luke','rb')
successorlist = pickle.load(a)
a.close()