Skip to content

Instantly share code, notes, and snippets.

View emersonmoretto's full-sized avatar

Emerson Moretto emersonmoretto

  • Sao Paulo/Brazil
View GitHub Profile
@emersonmoretto
emersonmoretto / ml-class_subtitle_down.py
Created October 26, 2011 19:25
ML-Class subtitles downloader and converter (to srt) script
import urllib2
from cStringIO import StringIO
import re
import os
import glob
import sys,codecs
@emersonmoretto
emersonmoretto / blender_export_to_vertex
Created February 29, 2012 17:38
Blender python script to generate 3D model by vertex
import os
# Output file
file = open(os.path.expanduser("~/Desktop/model3d.mdl"), "w")
model_object = None
model_mesh = None
# Search for the first object of type mesh
for obj in bpy.context.scene.objects:
@emersonmoretto
emersonmoretto / del2_java
Last active May 9, 2019 04:02
Discrete Laplace Operator in Java (Matlab del2 in Java) [TESTED]
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer.
* ----------------------------------------------------------------------------
*/
// Compute Discrete laplacian Operator of U and V
@emersonmoretto
emersonmoretto / benchmark.sh
Created August 9, 2011 21:06
Apache bench + Gnuplot Script
#!/bin/bash
echo -e "\nbenchmark.sh -n<number of requests> -c<number of concurrency> <URL1> <URL2> ..."
echo -e "\nEx: benchmark.sh -n100 -c10 http://www.google.com/ http://www.bing.com/ \n"
## Gnuplot settings
echo "set terminal png
set output 'benchmark_${1}_${2}.png'
set title 'Benchmark: ${1} ${2}'
/*!
* HTML5 export buttons for Buttons and DataTables.
* 2016 SpryMedia Ltd - datatables.net/license
*
* FileSaver.js (1.3.3) - MIT license
* Copyright © 2016 Eli Grey - http://eligrey.com
*/
(function( factory ){
if ( typeof define === 'function' && define.amd ) {