Skip to content

Instantly share code, notes, and snippets.

Avatar
🛫
Looking forward to leave the country.

Bruno Bemfica BrunoCodeman

🛫
Looking forward to leave the country.
View GitHub Profile
@omarryhan
omarryhan / Sanic-Gino-Alembic migrations Setup
Last active May 30, 2020
Sanic/Gino/Alembic migrations
View Sanic-Gino-Alembic migrations Setup
# Do the first 6 steps only once.
1. pip install --user alembic
2. bash: ``cd {{my_project}} && alembic init alembic``
3. bash: ``text_editor {{my_project}}/alembic.ini``
4. Change: "sqlalchemy.url = postgres://{{username}}:{{password}}@{{address}}/{{db_name}}"
5. bash: ``text_editor {{my_project}}/alembic/env.py``
6. Now, import your metadata/db object from your app.:
# {{my_project}}/{{my_project_dir}}/app.py
@thatguysimon
thatguysimon / standoff2corenlp.py
Last active Mar 11, 2022
A python script to convert annotated data in standoff format (brat annotation tool) to the formats expected by Stanford NER and Relation Extractor models
View standoff2corenlp.py
# A python script to turn annotated data in standoff format (brat annotation tool) to the formats expected by Stanford NER and Relation Extractor models
# - NER format based on: http://nlp.stanford.edu/software/crf-faq.html#a
# - RE format based on: http://nlp.stanford.edu/software/relationExtractor.html#training
# Usage:
# 1) Install the pycorenlp package
# 2) Run CoreNLP server (change CORENLP_SERVER_ADDRESS if needed)
# 3) Place .ann and .txt files from brat in the location specified in DATA_DIRECTORY
# 4) Run this script
@marciomazza
marciomazza / gist:7158411
Last active Jan 7, 2019 — forked from alextakitani/gist:6413691
Cedilha em teclado us-internacional, no Ubuntu 13.10 Saucy Salamander
View gist:7158411
1) Editar cada um dos arquivos:
/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache
/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/gtk.immodules
Procurar uma linha que começa com cedilla e adicione um :en no último parâmetro, assim:
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa:en"
Ou simplesmente rode: