Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# Busca caracteres fuera del ascii | |
find -name '*.py' -print0 |xargs -0 grep -P '[^\x00-\x7f]' > /tmp/non-ascii.txt |
This file contains 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
{ | |
"python.pythonPath": "env/bin/python", | |
"pythonTestExplorer.testFramework": "unittest", | |
"python.testing.unittestArgs": [ | |
"-v", | |
"-s", | |
"./tests", | |
"-p", | |
"test_*.py" | |
], |
This file contains 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
[General] | |
language = en | |
sgffolder = /tmp | |
rsgffolder = | |
pngfolder = | |
livefolder = live_analysis | |
stonesound = | |
[Analysis] | |
maxvariations = 26 |
This file contains 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 datetime import datetime | |
import matplotlib.pyplot as plt | |
fn = "Nivel_Cares_1.csv" | |
X, Y = [], [] | |
with open(fn) as f: | |
f.readline() # leer y descartar cabecero | |
for line in f: | |
y, x = line.strip().replace(",",".").split(";") |
This file contains 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
for filename in *.tar; do | |
tar -xf "$filename" -C "destino" | |
done |
This file contains 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
// https://stackoverflow.com/questions/4020796/finding-the-max-value-of-an-attribute-in-an-array-of-objects Andy Polhill | |
var n1 = { dateTime: new Date(), name: "n1"} | |
var n2 = { dateTime: new Date(), name: "n2"} | |
data = [n1, n2] | |
data.reduce(function (prev, current) { return (prev.dateTime > current.dateTime) ? prev : current }) |
This file contains 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
ffmpeg -framerate 10 -pattern_type glob -i '*.png' -c:v libx264 \ | |
-r 30 -pix_fmt yuv420p out.mp4 |
This file contains 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
-- original https://stackoverflow.com/a/19532132/2428230 | |
CREATE FUNCTION make_uid() RETURNS text AS $$ | |
DECLARE | |
new_uid text; | |
done bool; | |
BEGIN | |
done := false; | |
WHILE NOT done LOOP | |
new_uid := upper(substring(md5(''||now()::text||random()::text),1,8)); | |
done := NOT exists(SELECT 1 FROM report_users WHERE confirm_key=new_uid); |
NewerOlder