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
alias nbib2bib='f(){ nbib2xml "$1" | xml2bib -b; unset -f f; }; f' |
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
Source: https://stackoverflow.com/a/72778999 | |
python -m venv venv | |
source venv/bin/activate | |
ipython kernel install --user --name=venv | |
jupyter notebook | |
go to kernel-->change kernel-->choose the venv from the dropdown |
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
# https://gitlab.mister-muffin.de/josch/img2pdf | |
ls *.jpg | sort -n | tr '\n' ' ' | xargs img2pdf -o ebook.pdf |
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
from dataclasses import asdict | |
import json | |
json.dump(asdict(my_object), open("my_object.json", "w")) |
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 json | |
import requests | |
def retrieve_errors(issue_id): | |
issue_id = "" # FIXME | |
endpoint = f"https://sentry.io/api/0/issues/{issue_id}/events/?full=True" | |
token = "" # FIXME | |
headers = {"Authorization": f"Bearer {token}"} |
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
codigo_cidade_tse | municipio | sigla_estado | codigo_prefeito_tse | nome_urna | url | |
---|---|---|---|---|---|---|
31011 | Amparo de São Francisco | SE | 260000686461 | ALZIRA DE SALETE | https://divulgacandcontas.tse.jus.br/candidaturas/oficial/2020/SE/31011/426/candidatos/401877/5_1600439475109.pdf | |
31011 | Amparo de São Francisco | SE | 260000663375 | ATEVALDO | https://divulgacandcontas.tse.jus.br/candidaturas/oficial/2020/SE/31011/426/candidatos/361378/5_1600363475075.pdf | |
31011 | Amparo de São Francisco | SE | 260001234505 | FRANKLIN FREIRE | https://divulgacandcontas.tse.jus.br/candidaturas/oficial/2020/SE/31011/426/candidatos/780356/5_1601143241998.pdf | |
31038 | Aquidabã | SE | 260000863851 | ANDERSON ANDRADE | https://divulgacandcontas.tse.jus.br/candidaturas/oficial/2020/SE/31038/426/candidatos/583189/Proposta.pdf | |
31038 | Aquidabã | SE | 260000660580 | DR MÁRIO LUCENA | https://divulgacandcontas.tse.jus.br/candidaturas/oficial/2020/SE/31038/2030402020/260000660580/pje-d2d8f962-Proposta de governo.pdf | |
31038 | Aquidabã | SE | 260001041576 | DR PHILIPPE | https://divulgacandcontas.tse.jus.br/candidaturas |
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 scrapy | |
class ImprensaOficialSpider(scrapy.Spider): | |
start_urls = ["http://www.imprensaoficial.org/acesso.htm"] | |
# example http://pmameliarodriguesba.imprensaoficial.org/ | |
name = "imprensa_oficial" | |
TERRITORY_ID = None | |
handle_httpstatus_list = [301] |
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
from flask import Flask, request | |
from twilio.twiml.voice_response import Dial, VoiceResponse, Gather | |
from calls import CallQueue | |
call_queue = CallQueue("support") | |
app = Flask(__name__) | |
AGENTS = { | |
"+000000000001": "Ana", |
NewerOlder