Skip to content

Instantly share code, notes, and snippets.

View cuducos's full-sized avatar
💜

Eduardo Cuducos cuducos

💜
View GitHub Profile
@cuducos
cuducos / update-minha-receita.py
Last active August 25, 2023 15:39
Update Minha Receita in a Dokku server
"""Usage: ./update-minha-receita.py YYYY-MM-DD"""
from datetime import datetime, timedelta
from functools import cached_property
from pathlib import Path
from shutil import rmtree
from subprocess import run
from sys import argv
from urllib.parse import urlparse
from asyncio import Semaphore, as_completed, run
from pathlib import Path
from urllib.parse import urlparse
from bs4 import BeautifulSoup
from fire import Fire
from httpx import AsyncClient, get
from tqdm import tqdm
@cuducos
cuducos / piepda_template.md
Created July 28, 2022 21:05
PIPEDA email

Dear,

I just received an email from {COMPANY_NAME} with the subject “{EMAIL_SUBJECT}.” As far as I am aware, I have not created an account, subscribed, shared my PII data, or consented to this commercial message, thus I consider it spam. Since it looks like you are definitely handling my PII data and actively processing it, as a resident of Canada, under my rights according to PIPEDA, I request:

  1. What is the Privacy Office within {COMPANY_NAME} in charge of ensuring compliance with Canada's data protection law?
  2. How my PII was collected?
  3. I see you have already collected my email address, but I don't see where I have consented to the collection of such personal information; can you clarify how you got my consent for processing my personal data?
  4. What are the measures {COMPANY_NAME} takes to ensure security safeguards against loss or theft, as well as unauthorized access, disclosure, copying, or use of my personal information?
  5. Can I have a copy of all personally identifiable information {COMPANY_
@cuducos
cuducos / bootstrap.sh
Created February 7, 2022 23:40
Pulumi draft (Minha Receita)
#!/bin/bash
set -eux
# install postgres
sudo apt update -y
sudo apt install -y sudo postgresql-13
sudo service postgresql start
# create postgres user and database
@cuducos
cuducos / data.csv
Last active February 23, 2022 15:43
Porcentagem de votos em Bolsonaro no 2º turno de 2018, por município (apenas os com mais de 100.000 habitantes)
Porcentagem de votos em Bolsonaro (2º turno - 2018) Município UF
15.4083557181231 CRATO CE
17.4993648911847 PARINTINS AM
18.2141640486014 IGUATU CE
18.9022837888431 ITAPIPOCA CE
20.8163619031112 PAULO AFONSO BA
22.6305304061384 CODÓ MA
23.8899617526168 JUAZEIRO DO NORTE CE
24.0801281633823 CAXIAS MA
24.2147907626013 CAMETÁ PA
worldcup:
host: Brazil
semifinal:
- brazil: 1
germany: 7
- netherlands: 0
argentina: 0
run:
@gcc helloc.c -fPIC -shared -o lib/helloc.so
@go build -o lib/hello.so -buildmode=plugin hello.go
@go run main.go
@cuducos
cuducos / validate.go
Created December 3, 2020 15:26
validate.go
// Package schema uses Frictionless Data's table schema to create the JSON
// files describing the data expected in the compressed CSV files.
package schema
import (
"fmt"
"log"
"os"
"sync"
@cuducos
cuducos / assinaturas.csv
Last active March 20, 2020 00:53
Assinaturas RCP 5/2019 (CPI #VazaJato)
assinatura parlamentar partido uf
1 AFONSO FLORENCE PT BA
2 AFONSO MOTTA PDT RS
3 AGUINALDO RIBEIRO PP PB
4 AIRTON FALEIRO PT PA
5 ALENCAR SANTANA BRAGA PT SP
6 ALESSANDRO MOLON PSB RJ
7 ALEXANDRE FROTA PSDB SP
8 ALEXANDRE PADILHA PT SP
9 ALEXIS FONTEYNE NOVO SP
{
"blacklist": [
"inbox.google.com/*",
"mail.google.com/*",
"calendar.google.com/*",
"gmail.com/*",
"linhadireta.capes.gov.br/*"
]
}