Skip to content

Instantly share code, notes, and snippets.

View malev's full-sized avatar

Marcos Vanetta malev

View GitHub Profile
@malev
malev / gender.py
Created July 28, 2014 04:20
Gender detector API version
import json
from gender_detector import GenderDetector
from bottle import route, run, response
detector_ar = GenderDetector('ar')
detector_uk = GenderDetector('uk')
detector_us = GenderDetector('us')
@route('/<country>/<name>')
def index(country, name):
@malev
malev / bcycle_spots.js
Created August 30, 2014 17:14
Bcycle - Austin - Locations
var icon = '/Controls/StationLocationsMap/Images/marker-active.png';
var back = 'infowin-available';
var point = new google.maps.LatLng(30.26408, -97.74355);
kioskpoints.push(point);
var marker = new createMarker(point, "<div class='location'><strong>2nd & Congress</strong><br />151 E. 2nd St.<br />Austin<br />TX 78701</div><div class='avail'>Bikes available: <strong>8</strong><br />Docks available: <strong>5</strong></div><div></div>", icon, back, false);
markers.push(marker);
var icon = '/Controls/StationLocationsMap/Images/marker-active.png';
var back = 'infowin-available';
var point = new google.maps.LatLng(30.26634, -97.74378);
kioskpoints.push(point);
@malev
malev / text_extractor.md
Created September 2, 2014 21:37
Text Extraction

TextExtractor

Requirements

  • Works with doc, odt and pdf
  • Works through an API
  • Can handle multiple files at the same time
  • Uses queues (maybe distributed)
  • It's doable
  • Works fast!
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 9.
tipo,Nombre,descripcion,twitter
persona,Elisa Lilita Carrió,Diputada Nacional UNEN,@elisacarrio
persona,Patricia Gimenez,"Madre, Profesora, Radical. .Diputada Nacional.Ex Directora de Estadísticas e Investigaciones Económicas Socialmente comprometida con mi provincia y nuestro País",@PGimenezDC
persona,Jorge Yoma,"Abogado, Embajador Arg. en México, Senador Nac., Conv.Constituyente '94, Diputado Nac. Fundó la Univ.Nac. de Chilecito, recontra Riojano y Peronista",@NegroYoma
persona,Cynthia Hotton,"Ex Diputada Nacional por CABA. Presidente de la agrupación Valores Para Mi País y miembro fundador de Argentina Transparente. Lic. en Economía, esposa y mamá.",@CynthiaHotton
persona,Juan Manuel Urtubey,Gobernador de la Provincia de Salta,@UrtubeyJM
persona,Debora Giorgi,Ministra de Industria Economista y Política Argentina,@DeboraGiorgi3
persona,Hernán Lorenzino,,@HernanLorenzino
persona,Fabián Francioni,"Peronista. Médico. Intendente de Leones, Córdoba, en uso de licencia. Diputado Nacional por el Frente Para la Vic
@malev
malev / README.md
Last active August 29, 2015 14:08
Convert CSV files into HTML

CSV to HTML (cli)

Just run:

$ ruby csvtohtml.rb data.csv > table.html

You can customize the table's id, table's classes, header's classes and field's classes. You can also use linux pipes and it's only one small file long with NO dependencies.

Pseudo installation (not needed)

@malev
malev / new-server.sh
Last active August 29, 2015 14:09
New server configuration
sudo apt-get -y install build-essential git-core htop nginx tmux exuberant-ctags ack-grep rsync
mkdir -p code
cd code
git clone https://github.com/malev/dotfiles.git
cd dotfiles
ln -s ~/code/dotfiles/tmux.conf ~/.tmux.conf
ln -s ~/code/dotfiles/vimrc ~/.vimrc
# Postgres
@malev
malev / install_opencv.sh
Last active August 29, 2015 14:09 — forked from BloodAxe/setup.sh
Script to install OpenCV on Ubuntu
# Prepare system
apt-get updated
apt-get install -y cmake pkg-config python-software-properties python g++ make software-properties-common unzip
# Grab frest opencv library
curl -sL https://github.com/Itseez/opencv/archive/master.zip > opencv.zip
unzip opencv.zip
rm opencv.zip
# Configure & install OpenCV
@malev
malev / .gitignore
Last active February 11, 2022 15:27
Install Freeling 3.1 on Ubuntu 14.04
config.yml
@malev
malev / index.html
Last active August 29, 2015 14:10
Denton's elections
<!DOCTYPE html>
<html>
<head>
<title>Something crazy</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>
html, body, #map {
height: 100%;
@malev
malev / data.json
Last active August 29, 2015 14:13
Dendogram Perry's indictement
{
"name": "Rick Perry Indictment",
"children": [
{
"name": "At Booking, Perry Reiterates Defense of Veto | The Texas Tribune",
"size": 2493,
"children": [
{
"name": "Person",
"children": [