Skip to content

Instantly share code, notes, and snippets.

Avatar

Emerson Moretto emersonmoretto

  • Sao Paulo/Brazil
View GitHub Profile
View buttons.html5.js
/*!
* 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 ) {
@emersonmoretto
emersonmoretto / del2_java
Last active May 9, 2019
Discrete Laplace Operator in Java (Matlab del2 in Java) [TESTED]
View del2_java
/*
* ----------------------------------------------------------------------------
* "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 / blender_export_to_vertex
Created Feb 29, 2012
Blender python script to generate 3D model by vertex
View blender_export_to_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 / ml-class_subtitle_down.py
Created Oct 26, 2011
ML-Class subtitles downloader and converter (to srt) script
View ml-class_subtitle_down.py
import urllib2
from cStringIO import StringIO
import re
import os
import glob
import sys,codecs
@emersonmoretto
emersonmoretto / benchmark.sh
Created Aug 9, 2011
Apache bench + Gnuplot Script
View benchmark.sh
#!/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}'