Skip to content

Instantly share code, notes, and snippets.

@Irio
Irio / gist:1496746
Created December 19, 2011 11:24
Solution for "cannot load such file -- openssl" on RVM
When I tried run "rake test", I received:
rake aborted!
cannot load such file -- openssl
Tasks: TOP => test:units => test:prepare => db:test:prepare => db:abort_if_pending_migrations => environment
(See full trace by running task with --trace)
@Irio
Irio / Dockerfile
Last active April 22, 2024 18:12
GCP Serverless scrapers
FROM golang:1.12 as build
WORKDIR $GOPATH/src/github.com/Irio/wohnung
COPY scraper scraper
COPY main.go .
RUN go get -d -v ./...
RUN go install
FROM gcr.io/distroless/base
@Irio
Irio / gist:cde5c418e6e4441da7bf9f568852bf8b
Created November 9, 2017 22:23
[Serenata] TSE - Repositório de Dados Eleitorais
# Candidatos
http://agencia.tse.jus.br/estatistica/sead/odsele/consulta_cand/consulta_cand_2016.zip
http://agencia.tse.jus.br/estatistica/sead/odsele/bem_candidato/bem_candidato_2016.zip
http://agencia.tse.jus.br/estatistica/sead/odsele/consulta_legendas/consulta_legendas_2016.zip
http://agencia.tse.jus.br/estatistica/sead/odsele/consulta_vagas/consulta_vagas_2016.zip
http://agencia.tse.jus.br/estatistica/sead/odsele/motivo_cassacao/motivo_cassacao_2016.zip
http://agencia.tse.jus.br/estatistica/sead/odsele/consulta_cand/consulta_cand_2014.zip
http://agencia.tse.jus.br/estatistica/sead/odsele/bem_candidato/bem_candidato_2014.zip
@Irio
Irio / readme.md
Created November 12, 2020 17:24
Launching a new AWS instance with internet access and public IP in a non-default VPC
  1. Create VPC[1]
  • Name tag: acloudguruVPC
  • IPv4 CIDR block: 10.0.0.0/16
  1. Create subnet[2]
  • VPC ID: (acloudguruVPC)
  • Subnet name: 10.0.1.0 - us-east-1a
  • IPv4 CIDR block: 10.0.1.0/24
  1. Create internet gateway[3]
  2. Attach internet gateway to VPC[4]
  • Available VPCs: (acloudguruVPC)
@Irio
Irio / states.py
Created January 23, 2018 17:20
Estados do Brasil e suas capitais
import pandas as pd
csv = """
AC,Acre,Rio Branco
AL,Alagoas,Maceió
AP,Amapá,Macapá
AM,Amazonas,Manaus
BA,Bahia,Salvador
CE,Ceara,Fortaleza
DF,Distrito Federal,Brasília
@Irio
Irio / gist:2891178
Created June 7, 2012 19:54
Distinction between Movie Info by id or imdb_id on Tmdb requests
/* http://api.themoviedb.org/3/movie/188?api_key=my_key&language=en */
{"adult":false,"backdrop_path":"/wyey4NS4Z1z7293R8FFBETL6DSr.jpg","belongs_to_collection":null,"budget":0,"genres":[{"id":28,"name":"Action"},{"id":53,"name":"Thriller"}],"homepage":"","id":188,"imdb_id":"tt0401792","original_title":"Sin City","overview":"The Sin City series. Director Robert Rodriguez makes the legendary comic artist Frank Miller (Batman and Daredevil) into a series of films depicting his Sin City comics. The films however are not for children.","popularity":0.06,"poster_path":"/mYxbfd8pZz9YTtEFRaOcQboOvMk.jpg","production_companies":[],"production_countries":[],"release_date":null,"revenue":0,"runtime":0,"spoken_languages":[],"tagline":"","title":"Sin City","vote_average":0.0,"vote_count":0}
/* http://api.themoviedb.org/3/movie/tt0401792?api_key=my_key&language=en */
{"adult":false,"backdrop_path":"/kftq445wZNaKEqJ9gXwYOIfI2p1.jpg","belongs_to_collection":{"id":188,"name":"Sin City","poster_path":"/mYxbfd8pZz9YTtEFRaO
@Irio
Irio / municipalities.fql
Created January 5, 2020 12:01
Brazilian municipalities and their Wikipedia links
// Run with:
// $ go get github.com/MontFerret/ferret
// $ ferret municipalities.fql > municipalities.json
LET baseURL = "https://pt.wikipedia.org"
LET startURL = CONCAT(baseURL, "/wiki/Lista_de_munic%C3%ADpios_do_Brasil_por_popula%C3%A7%C3%A3o")
LET municipalitySelector = ".wikitable tbody tr:not(:nth-child(1))"
LET doc = DOCUMENT(startURL)
@Irio
Irio / index.js
Created December 16, 2019 10:22
dataframe-js #99 - Code accompanying "[FEATURE] Pivot dataframe"
// # How to run:
// 1. Save this file into a new folder as `index.js`.
// 2. Run the following:
// ```
// $ npm install dataframe-js
// $ node index.js
// ```
const { DataFrame } = require("dataframe-js");
@Irio
Irio / gender_submission.csv
Created December 13, 2019 13:56
Titanic: Machine Learning from Disaster - Datasets
PassengerId Survived
892 0
893 1
894 0
895 0
896 1
897 0
898 1
899 0
900 1
@Irio
Irio / Untitled.ipynb
Created July 7, 2019 08:27
Elman network
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.