Skip to content

Instantly share code, notes, and snippets.

View rdemorais's full-sized avatar
🏠
Working from home

Rafael de Morais rdemorais

🏠
Working from home
View GitHub Profile
import pgp from "pg-promise";
const connections = [];
export default class Redshift {
static async getConnection() {
const dbName = "myDb";
if (!connections[dbName]) {
const dbUser = "dbUser";
@rdemorais
rdemorais / blogset_br.py
Created February 21, 2023 17:19
Código para criação do dataset Blogset
import gzip
import shutil
from unicodedata import normalize
from bs4 import BeautifulSoup
import ftfy
import re
from tqdm import tqdm
import csv
# console:
# export AWS_ACCESS_KEY_ID=AWS_KEY
# export AWS_SECRET_ACCESS_KEY=AWS_SECRET
from tqdm import tqdm
import boto3
import os
s3 = boto3.client('s3')
@rdemorais
rdemorais / gist:bba4c28048098c9a5bcaab525fa9e3c9
Created October 4, 2023 16:50
Finalize stuck namespace - K8s
NAMESPACE=ingress-nginx; kubectl get namespace $NAMESPACE -o json | jq 'del(.spec.finalizers[0])' | kubectl replace --raw "/api/v1/namespaces/$NAMESPACE/finalize" -f -
@rdemorais
rdemorais / remove_names.py
Created November 15, 2023 15:52
Remover nomes do texto
data = [
{
"text": "paciente diagnosticado com dm , nega has . paciente acompanhado da mãe , dona Maria Fagundes",
"clinical_entities": [
{
"entity": "dm",
"entity_tokens": ["dm"],
"label": "DISEASE",
"start": 27,
"end": 29
# Architecture
- this is a python module with the followin structure
module_name
-- __init__.py
-- __main__.py
-- arg_parser.py
requirements.txt
- you should always update the arg_parser.py accordingly when creating new parameters to the application.