This file contains hidden or 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 file in *.txt; do | |
iconv -f ISO-8859-1 -t utf-8 "$file" > "${file%.txt}.utf8.txt" | |
done |
This file contains hidden or 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
require 'csv' | |
require 'json' | |
require 'uri' | |
require 'ostruct' | |
require 'httparty' | |
require 'progressbar' | |
require 'people' | |
class OutputCSV | |
attr_reader :filename |
This file contains hidden or 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
import sys | |
import time | |
import csv | |
class AddressesFinder: | |
def __init__(self, addresses): | |
self.addresses = addresses | |
def call(self): | |
output = [] |
This file contains hidden or 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
class Answer(object): | |
"""docstring for answer | |
>>> answer = Answer(1, [1,3]) | |
>>> answer.included() | |
True | |
>>> answer.excluded() | |
False | |
>>> answer.includes() | |
[1, 3] | |
>>> answer = Answer(2, [1, 2, 3]) |
This file contains hidden or 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
#!/usr/bin/env python | |
import os | |
import csv | |
import glob | |
import optparse | |
class CSVHandler: | |
def __init__(self, filename): |
This file contains hidden or 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
require 'csv' | |
require 'net/http' | |
require 'json' | |
require 'beauvoir' | |
require 'sexmachine' | |
names_with_gender = [] | |
CSV.foreach('input.csv') do |row| | |
names_with_gender << row |
This file contains hidden or 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
import csv | |
from genderPredictor import genderPredictor | |
gp = genderPredictor() | |
gp.trainAndTest() | |
def gender(name): | |
output = 'unknown' | |
tmp = gp.classify(name) |
This file contains hidden or 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
# encoding: UTF-8 | |
require 'csv' | |
filename = 'nombre_nacim_por_anio_y_sexo.csv' | |
class Name | |
attr_reader :name, :gender, :male_count, :female_count, :year | |
def self.valid?(name) |
This file contains hidden or 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
# encoding: UTF-8 | |
require 'open-uri' | |
require 'nokogiri' | |
require 'csv' | |
def gen_url(offset=0) | |
if offset == 0 | |
"http://www.buenosaires.gob.ar/areas/registrocivil/nombres/busqueda/buscador_nombres.php?&menu_id=16082" | |
else |
This file contains hidden or 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
require 'open-uri' | |
require 'json' | |
require 'mechanize' | |
require 'pdf-reader' | |
require 'turbotlib' | |
SOURCE_URL = "http://www.cityofchicago.org/city/en/depts/doit/supp_info/list_of_contractors.html" | |