Skip to content

Instantly share code, notes, and snippets.

View yaso's full-sized avatar
🎯
Focusing

Yaso yaso

🎯
Focusing
View GitHub Profile
@vitorbaptista
vitorbaptista / Makefile
Last active June 15, 2017 16:51
Extract reimbursements from Serenata de Amor's Jarbas API
.PHONY: clean
all: reimbursements.csv
clean:
rm -f reimbursements.csv reimbursements.json
reimbursements.csv: reimbursements.json
@echo 'issue_date,term_id,term,applicant_id,congressperson_id,congressperson_name,congressperson_document,party,state,subquota_id,subquota_description,subquota_group_id,subquota_group_description,supplier,cnpj_cpf,passenger,leg_of_the_trip,document_type,document_number,installment,batch_number,document_id,document_value,remark_value,total_net_value,total_reimbursement_value,probability,receipt.url,receipt.fetched,last_update,available_in_latest_dataset,suspicions.irregular_companies_classifier,suspicions.meal_price_outlier,suspicions.election_expenses,suspicions.invalid_cnpj_cpf,suspicions.over_monthly_subquota_limit,suspicions.suspicious_traveled_speed_day,suspicions.meal_price_outlier,suspicions.irregular_companies_classifier' > $@
jq -r '.results[] | [.issue_date, .term_id, .term, .applicant_id, .congressperson_id, .congressperson_name, .congressperson_document, .party, .s
@mbostock
mbostock / .block
Last active November 27, 2019 04:39
Voroblobinoids
license: gpl-3.0
redirect: https://observablehq.com/@mbostock/voroblobinoids
@phillipsm
phillipsm / gist:404780e419c49a5b62a8
Last active April 22, 2024 11:55
Inmate scraping script
import requests
from bs4 import BeautifulSoup
import time
# We've now imported the two packages that will do the heavy lifting
# for us, reqeusts and BeautifulSoup
# This is the URL that lists the current inmates
# Should this URL go away, and archive is available at
# http://perma.cc/2HZR-N38X
@nylki
nylki / char-rnn recipes.md
Last active March 16, 2024 15:13
char-rnn cooking recipes

do androids dream of cooking?

The following recipes are sampled from a trained neural net. You can find the repo to train your own neural net here: https://github.com/karpathy/char-rnn Thanks to Andrej Karpathy for the great code! It's really easy to setup.

The recipes I used for training the char-rnn are from a recipe collection called ffts.com And here is the actual zipped data (uncompressed ~35 MB) I used for training. The ZIP is also archived @ archive.org in case the original links becomes invalid in the future.

@kyledrake
kyledrake / ferengi-plan.txt
Last active April 6, 2024 00:30
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@ABISprotocol
ABISprotocol / Microdonations using Cryptocurrencies
Last active January 3, 2016 20:38
Work Plan: Microdonations using Cryptocurrencies / les donacions micro que utilitzen monedes crypto / 加密的微货币捐赠制度 / Micro dary pomocí kryptografických měny / Micro ng mga donasyon gamit crypto pera / dons micro utilisant des monnaies crypto / Micro Spenden mit Krypto-Währungen / क्रिप्टो मुद्राओं का उपयोग माइक्रो दान / Ör framlög nota dulkóðuð gj…
We will develop a system that will empower everyone to perform
giving and microdonation as a part of any transaction.
Many open source projects do not have necessary support to fund the work on an ongoing basis.
We plan to use the funds raised to support the work of development and maintenance of
the giving feature for the first year of work, which will include work to promote adoption
and support through multiple wallets and decentralized protocols, including, but not limited to bitcoin.
On github, the users ABISprotocol and ktorn provide vision and direction on the project, and will
work with coders or developers who are interested in contributing. If funding (grants, donations, etc.)
@MicahElliott
MicahElliott / rbenv-howto.md
Created April 17, 2012 18:11
Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.

TL;DR Demo

# Ensure system is in ship-shape.

aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev

@Pretz
Pretz / generate.py
Created February 8, 2012 21:04
CSV to WAV: Needed a way to convert a list of numbers in a CSV file to a wave audio file. Go python.
#!/usr/bin/python
import wave
import numpy
import struct
import sys
import csv
from scikits.samplerate import resample
def write_wav(data, filename, framerate, amplitude):
@rpkraemer
rpkraemer / jogodavelha
Created August 17, 2011 19:00
Um simples jogo da velha para dois jogadores (JS, CSS e HTML)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Jogo da Velha </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<style>