This file contains 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
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 |
This file contains 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
NAMESPACE=ingress-nginx; kubectl get namespace $NAMESPACE -o json | jq 'del(.spec.finalizers[0])' | kubectl replace --raw "/api/v1/namespaces/$NAMESPACE/finalize" -f - |
This file contains 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
# 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') |
This file contains 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 gzip | |
import shutil | |
from unicodedata import normalize | |
from bs4 import BeautifulSoup | |
import ftfy | |
import re | |
from tqdm import tqdm | |
import csv |
This file contains 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 pgp from "pg-promise"; | |
const connections = []; | |
export default class Redshift { | |
static async getConnection() { | |
const dbName = "myDb"; | |
if (!connections[dbName]) { | |
const dbUser = "dbUser"; |
This file contains 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 sys | |
import threading | |
class ProgressPercentage(object): | |
''' Progress Class | |
Class for calculating and displaying download progress | |
''' | |
def __init__(self, client, bucket, filename): | |
''' Initialize |
This file contains 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 thinc.api import Config | |
import spacy | |
DEFAULT_CONFIG_STR = """ | |
[transformer] | |
max_batch_items = 4096 | |
[transformer.set_extra_annotations] | |
@annotation_setters = "spacy-transformers.null_annotation_setter.v1" |
This file contains 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
INSERT INTO dm_time (co_dm_time, epoch, day_suffix, day_name, day_of_week, day_of_month, day_of_quarter, day_of_year, week_of_month, week_of_year, week_of_year_iso, month_actual, month_name, month_name_abbreviated, quarter_actual, quarter_name, year_actual, first_day_of_week, last_day_of_week, first_day_of_month, last_day_of_month, first_day_of_quarter, last_day_of_quarter, first_day_of_year, last_day_of_year, mmyyyy, mmddyyyy, weekend_indr) | |
SELECT datum AS date_actual, | |
EXTRACT(EPOCH FROM datum) AS epoch, | |
TO_CHAR(datum, 'fmDDth') AS day_suffix, | |
TO_CHAR(datum, 'TMDay') AS day_name, | |
EXTRACT(ISODOW FROM datum) AS day_of_week, | |
EXTRACT(DAY FROM datum) AS day_of_month, | |
datum - DATE_TRUNC('quarter', datum)::DATE + 1 AS day_of_quarter, | |
EXTRACT(DOY FROM datum) AS day_of_year, | |
TO_CHAR(datum, 'W')::INT AS week_of_month, |
This file contains 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
#!/usr/bin/env bash | |
function copy_text_to_pod() { | |
namespace=$1 | |
pod_name=$2 | |
src_filename=$3 | |
dest_filename=$4 | |
base64_text=`cat $src_filename | base64` | |
kubectl --kubeconfig=conasems-config.yml exec -n $namespace $pod_name -- bash -c "echo \"$base64_text\" | base64 -d > $dest_filename" |
This file contains 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
git branch -D `git branch --merged | grep -v \* | xargs` |
NewerOlder