Skip to content

Instantly share code, notes, and snippets.

@Xpktro
Xpktro / generadores.py
Last active August 29, 2015 14:03
Cryptography snippets (commented and developed in spanish)
def buscar_generadores(p):
# Se define el grupo Zp = {1, 2, ..., p-1}
grupo = set([x + 1 for x in range(p-1)])
# Buscar generadores implica que se busquen numeros n tal que:
for n in grupo:
resultados = []
# Para cada k en [1; p-1]
for k in range(1, p):
@Xpktro
Xpktro / slow.ck
Created October 11, 2014 05:30
One of my ChucK experiments
// Our sound chain is quite simple buy nice-sounding.
// The Rhodey instrument (even when not shown in lectures, is
// a STK instrument and meets the evaluation criteria) is a nice
// Rhodes-keyboard-like sound, I love it and now I can use it.
// (you should REALLY hear the ChucK website demo)
Rhodey rho[3];
Pan2 rhoPan[3];
Gain rhoGain => NRev rhoRev => dac;
// I'm using really low gain parameters to avoid distorsion
@Xpktro
Xpktro / values.py
Created March 19, 2015 19:46
Get values from iterable consisting of dicts or lists in a flattened list
def values(iterable):
if type(iterable) == dict:
return sum([values(iterable.values())], [])
elif type(iterable) == list:
return sum(map(values, iterable), [])
return [iterable]
# >>> values([1, 2, 3, {'1': 2, '2': [4, 5, 6]}, [7, 8, 9]])
# [1, 2, 3, 2, 4, 5, 6, 7, 8, 9]
@Xpktro
Xpktro / turtle.logo
Created August 23, 2015 08:55
Turtle Academy variation on showcase script
@Xpktro
Xpktro / ac_pe.pde
Created September 30, 2015 04:26
ArtCoders.pe Processing Logo
/*
* Based on the Generative Typography tutorial from the Creative Application
* http://www.creativeapplications.net/processing/generative-typography-processing-tutorial/
*/
int gridX = 250; // number of horizontal grid points
int gridY = 65; // number of vertical grid points
float waveHeight = 25; // maximum height of each wave (vertex)
float baseHeight = 12; // default base weight of each wave (vertex)
color BACKGROUND_COLOR = color(0); // background color of the sketch

Sílabo de temas para la Introducción a Django

Introducción a Django

  1. Historia
  2. Propósito
  3. Frameworks Similares

Nuestro primer proyecto - Sistema de Encuestas

  1. Dependencias
  2. Instalación
@Xpktro
Xpktro / wrappers.py
Last active January 2, 2016 01:41
Simple automatic wrappers in Python
class Window(object):
def _draw(self):
print 'parent draw'
def __getattribute__(self, name):
if hasattr(self, '_' + name):
original = object.__getattribute__(self, '_' + name)
new = object.__getattribute__(self, name)
def wrapper(*args, **kwargs):
original(*args, **kwargs)
@Xpktro
Xpktro / README.md
Last active June 2, 2016 20:49
Wunderman Phantasia's Backend Developer Job Offer 03/2016

Wunderman Phantasia está en la búsqueda de un desarrollador web Backend con demostrada destreza en al menos dos de los siguientes lenguajes:

  • .net (en C# principalmente)
  • Java (Spring)
  • PHP (Laravel/Codeigniter/Zend)

El salario será definido en base a tu experiencia. Ingresarás a planilla desde el primer momento y tendrás todos los beneficios laborales pertinentes.

Si estás interesado en el puesto, debes resolver un pequeño reto técnico cuya solución será el correo electrónico al cual deberás enviar tus fuentes y tu CV. El código será evaluado y de ser necesario se te preguntará los detalles de la implementación del mismo en el momento de tu entrevista personal.

@Xpktro
Xpktro / ruc.py
Created May 11, 2016 17:49
SUNAT's RUC lookup using requests, pytesseract, beautifulsoup and pillow
# coding:utf-8
import requests
import pytesseract
from bs4 import BeautifulSoup
from cStringIO import StringIO
from PIL import Image
SUNAT_FORM_URL = 'http://ww1.sunat.gob.pe/cl-ti-itmrconsruc/'
@Xpktro
Xpktro / sleepsort.js
Created June 10, 2016 01:57
Sleep Sort in JS
function sleepsort(numbers) {
numbers.forEach(function(number) {
setTimeout(function(){console.log(number)}, number)
})
}
sleepsort([2, 1, 3, 4, 6, 5, 7])