Skip to content

Instantly share code, notes, and snippets.

View jbochi's full-sized avatar

Juarez Bochi jbochi

View GitHub Profile
@jbochi
jbochi / hlsclient_input_webm.json
Last active June 2, 2016 19:35 — forked from hltbra/hlsclient_input_v2.json
New input JSON for hlsclient
{
"streams": {
"Nasa-high": {
"input-path": "/msfc/Wifi.m3u8",
"servers": ["http://liveips.nasa.gov.edgesuite.net"],
"bandwidth": 1080434
}
},
"actions": [
/opt/generic/python27/bin/python
Python 2.7.1 (r271:86832, May 19 2011, 15:54:57)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> all
<built-in function all>
@jbochi
jbochi / gist:3739698
Created September 17, 2012 20:54
pypy translation error - CentOS 5
[translation:info] written: /tmp/usession-release-1.9-17/testing_1/testing_1.c
[translation:info] Compiling c source...
[platform:execute] make -j 5 in /tmp/usession-release-1.9-17/testing_1
[platform:Error] data_module_cpyext_pyobject.c:133: warning: initialization from incompatible pointer type
[platform:Error] data_module_cpyext_pyobject.c:173: warning: initialization from incompatible pointer type
[platform:Error] data_module_cpyext_pyobject.c:303: warning: initialization from incompatible pointer type
[platform:Error] data_module_cpyext_pyobject.c:323: warning: initialization from incompatible pointer type
[platform:Error] data_module_cpyext_pyobject.c:433: warning: initialization from incompatible pointer type
[platform:Error] data_module_cpyext_pyobject.c:453: warning: initialization from incompatible pointer type
[platform:Error] data_module_cpyext_pyobject.c:548: warning: initialization from incompatible pointer type
@jbochi
jbochi / gist:3716147
Created September 13, 2012 17:47
pypy translation error
[root@videos3s2 goal]# /opt/generic/python27/bin/python translate.py -O2
[platform:msg] Set platform with 'host' cc=None, using cc='gcc'
[translation:info] Translating target as defined by targetpypystandalone
[platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused /tmp/usession-release-1.9-8/gcctest.c -o /tmp/usession-release-1.9-8/gcctest.o
[platform:execute] gcc /tmp/usession-release-1.9-8/gcctest.o -pthread -lrt -o /tmp/usession-release-1.9-8/gcctest
[platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused /tmp/usession-release-1.9-8/platcheck_0.c -o /tmp/usession-release-1.9-8/platcheck_0.o
[platform:execute] gcc /tmp/usession-release-1.9-8/platcheck_0.o -pthread -lrt -o /tmp/usession-release-1.9-8/platcheck_0
[platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused /tmp/usession-release-1.9-8/platcheck_1.c -o /tmp/usession-release-1.9-8/platcheck_1.o
[platform:execute] gcc /tmp/usession-release-1.9-8/platcheck_1.o -pthread -lrt -o /tmp/uses
@jbochi
jbochi / gist:3331737
Created August 12, 2012 13:02
Fibonnaci in C for dailykata.net
#include <stdio.h>;
int fib(int n) {
if (n == 1) {
return 1;
} else if (n == 0) {
return 0;
} else {
return fib(n - 1) + fib(n - 2);
}
@jbochi
jbochi / quicksort.rb
Created August 10, 2012 11:13
Quicksort in Ruby for dailykata.net
# This implementation works, but it does all comparisons twice
# and is not in-place, requiring extra memory and raising
# a stack overflow for large arrays.
def quicksort(array)
return array if array.size <= 1
pivot = array.pop
less = array.select {|x| x <= pivot }
greater = array.select {|x| x > pivot }
quicksort(less) + [pivot] + quicksort(greater)
@jbochi
jbochi / skyline.py
Created August 7, 2012 17:12
Solution for dailykata.net - Skyline problem in Python
buildings = [
[1, 11, 5],
[2, 6, 7],
[3, 13, 9],
[12, 7, 16],
[14, 3, 25],
[19, 18, 22],
[23, 13, 29],
[24, 4, 28],
]
@jbochi
jbochi / fibonacci.plx
Created August 5, 2012 22:01
Solution for dailykata.com - Fibonacci in Perl
#!/usr/bin/perl
use strict;
use warnings;
my $a = 0;
my $b = 1;
while ($a < 100) {
@jbochi
jbochi / gist:3264872
Created August 5, 2012 13:41
POSCOMP 2012 - Conteúdos Programáticos por Área de Conhecimento

Área de Matemática

Álgebra Linear

Sistemas de Equações Lineares: método de eliminação de Gauss para sistemas lineares. Espaços vetoriais. Subespaços. Bases.

@jbochi
jbochi / lazy.py
Created June 10, 2012 18:07
Lazy quick sort in python
import itertools
import random
import heapq
def lazy_sort(col):
def swap(i, j):
if i != j:
col[j], col[i] = col[i], col[j]
def prepare_pivot(l, r):