Skip to content

Instantly share code, notes, and snippets.

View seppo0010's full-sized avatar

Sebastian Waisbrot seppo0010

  • Buenos Aires, Argentina
View GitHub Profile
@seppo0010
seppo0010 / gist:edd15abb46ec0b9ddc8f
Last active August 29, 2015 14:17
multithreaded task-queue
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
struct queue_obj { struct queue_obj *next; void *obj_to_free; };
struct queue_obj* firstElement;
struct queue_obj* lastElement;
@seppo0010
seppo0010 / debate.md
Last active November 16, 2015 16:06
Transcripción resumida de "Argentina Debate 2015 | Segunda vuelta: el debate"

Debate completo: https://www.youtube.com/watch?v=susvCR2CF0M

Desarrollo Económico y Humano

Macri

Macri: Pobreza 0. Hace 4 años que no crece, hay que crear trabajo. Plan de infraestructura más importante de la historia, que conecte la argentina y desarrolle las economías regionales, generando 2.000.000 de puestos de trabajo. Créditos a 30 años para primera vivienda. Cloacas, agua corriente. La Asignación [Universal por Hijo] se extienda a todos, incluyendo hijos de monotributistas. Plan Primer Empleo, cinco primeros años sin impuestos para empleado ni empleador.

Scioli: Macri va a levantar el cepo, liberar el tipo de cambio, representa un recorte en el salario real. Abrir la economía es un peligro para el conjunto. ¿Quién va a pagar los costes de este ajuste?

<html>
<head>
<style>
* {
border: 0;
margin: 0;
padding: 0;
}
.box {
#!/bin/sh
palette="/tmp/palette.png"
filters="fps=15,scale=$3:-1:flags=lanczos"
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2
seppo@nbba-swaisbrot:~$ strace date
execve("/bin/date", ["date"], [/* 83 vars */]) = 0
brk(NULL) = 0x2170000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc2eabf4000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=112343, ...}) = 0
mmap(NULL, 112343, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc2eabd8000
close(3) = 0
<?php
// sample usage: php gutenberg.php 20687 "Pride and Prejudice" > prideandprejudice.xml
$baseurl = 'http://www.gutenberg.org/files/' . $argv[1] . '/mp3/';
$name = $argv[2];
$data = file_get_contents($baseurl);
preg_match_all('/href="(.*?\.mp3)"/', $data, $matches);
$ep = 0;
?>
<?xml version="1.0" encoding="UTF-8"?>
<rss>
@seppo0010
seppo0010 / postportem.md
Last active March 30, 2020 19:50
esacrosa's block post mortem

Post Mortem Report

Chronology

All times are GMT unless stated otherwise.

Tuesday, April 18th

11:24 seppo0011 tweeted Mi objetivo de la semana es no responderle al @esacrosa cuando dice boludeces. Día 2: está difícil.

@seppo0010
seppo0010 / Dockerfile
Created April 23, 2017 13:46 — forked from eldondev/Dockerfile
zxing dockerfile
FROM java
RUN wget https://oss.sonatype.org/content/repositories/snapshots/com/google/zxing/javase/3.2.2-SNAPSHOT/javase-3.2.2-20151101.162926-3.jar
RUN wget https://oss.sonatype.org/content/repositories/snapshots/com/google/zxing/core/3.2.2-SNAPSHOT/core-3.2.2-20151101.162918-3.jar
RUN wget https://repo1.maven.org/maven2/com/beust/jcommander/1.48/jcommander-1.48.jar
ENTRYPOINT ["java","-cp", "core-3.2.2-20151101.162918-3.jar:javase-3.2.2-20151101.162926-3.jar:jcommander-1.48.jar", "com.google.zxing.client.j2se.CommandLineRunner"]
@seppo0010
seppo0010 / gist:e382cbc3b8340f1bbe032cd605eaddf5
Last active August 9, 2018 05:07
Oradores debate aborto senado argentina 2018-08-08
~DURANGO, NORMA HAYDÉE
~BRIZUELA Y DORIA DE CARA, OLGA INES
~ALMIRÓN, ANA CLAUDIA
~BULLRICH, ESTEBAN JOSE
~SOLANAS, FERNANDO EZEQUIEL
ALPEROVICH, JOSÉ JORGE
~IANNI, ANA MARIA
~URTUBEY, RODOLFO JULIO
KUNATH, SIGRID ELISABETH
~SOLARI QUINTANA, MAGDALENA
import requests
r = requests.get('https://resultados2019.gob.ar/assets/data/totalized_results/regions/5/5589.json').json()
fit = float([x for x in r['rp'] if x['pc'] == 144 and x['cc'] == 1026][0]['v'])
fdt = float([x for x in r['rp'] if x['pc'] == 109 and x['cc'] == 1026][0]['v'])
jxc = float([x for x in r['rp'] if x['pc'] == 145 and x['cc'] == 1026][0]['v'])
print('FIT', fit / 1)
print('FDT', fdt / 5)
print('JxC', jxc / 8)