This file contains hidden or 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
/* | |
Copyright (c) 2009, David Anderson; 2016, Jaime Soffer. | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright | |
notice, this list of conditions and the following disclaimer in the |
This file contains hidden or 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
import subprocess | |
import networkx as nx | |
import matplotlib.pyplot as plt | |
from sys import argv | |
root = argv[1] | |
G = nx.DiGraph() |
This file contains hidden or 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 | |
# -*- coding: utf-8 -*- | |
""" | |
minimalistic browser levering off of Python, PyQt and Webkit | |
Original: https://code.google.com/p/foobrowser/ | |
[email protected] | |
+ tabs |
This file contains hidden or 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 | |
# -*- coding: utf-8 -*- | |
""" | |
A minimal web browser. | |
Original: http://ralsina.me/weblog/posts/BB948.html | |
Features: | |
+++ verificar no tráfico no solicitado (startup, al menos) |
This file contains hidden or 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 subprocess import check_output | |
data = check_output(["pkg", "info", "-a", "-d"]) | |
fuente = '' | |
print "digraph Dependencias {" | |
for linea in data.split('\n'): | |
if linea: |
This file contains hidden or 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
/* Uso: 'node gsearch.js'; en el navegador, 'http://localhost:8000/?q=la búsqueda' */ | |
var http = require('http') | |
, url = require('url') | |
, google = require('google-tools') | |
, mu = require('mu2'); | |
mu.root = __dirname + '/templates'; | |
http.createServer(function (req, web_out) { |
This file contains hidden or 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
# lame --decode song.mp3 song.wav | |
WAV=$1 | |
OFFSET=$2 | |
# podría integrar los cambios en un solo comando, | |
# sin usar archivos intermedios, con 'delay' | |
# 'remix' hace el equivalente de 'pan', el canal | |
# derecho aparece antes al hacer offset |
This file contains hidden or 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
last pid: 1681; load averages: 0.02, 0.03, 0.00 up 0+01:53:18 09:35:32 | |
25 processes: 2 running, 22 sleeping, 1 waiting | |
CPU: 2.3% user, 0.0% nice, 1.5% system, 0.0% interrupt, 96.2% idle | |
Mem: 84M Active, 50M Inact, 32M Wired, 4K Cache, 34M Buf, 77M Free | |
Swap: 512M Total, 2668K Used, 509M Free | |
PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND | |
1102 jaime 6 20 0 134M 98792K uwait 3:20 0.00% /home/jaime/OperaDownloads/opera-dir/lib/opera/opera -pd /hom | |
820 jaime 1 20 0 69752K 58080K select 0:45 0.10% X -nolisten tcp (Xorg) | |
808 jaime 1 20 0 16376K 7732K select 0:02 0.00% urxvtd -q |
This file contains hidden or 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
/* reservando memoria, sin usarla */ | |
#include <unistd.h> | |
#include <stdlib.h> | |
#define PAGESIZE 4096 | |
#define SIZE 1212 * PAGESIZE | |
int main() { | |
int i; |
This file contains hidden or 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
import Math.Combinat.Numbers | |
import Data.Ratio | |
-- OEIS A141765: el número de cadenas de longitud n en un alfabeto de | |
-- longitud r que no repiten más de dos veces el mismo símbolo | |
t :: Integer -> Integer -> Integer | |
t r n = sum $ map g [a..r] where | |
a = quot (n+1) 2 | |
g k = if n < k then 0 else |
NewerOlder