Skip to content

Instantly share code, notes, and snippets.

View DominguesM's full-sized avatar
:octocat:

Maicon Domingues DominguesM

:octocat:
View GitHub Profile
@DominguesM
DominguesM / jwtRS256.sh
Created May 18, 2023 12:22 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
!python -m spacy download pt_core_news_sm
import spacy
from spacy.training import offsets_to_biluo_tags
nlp = spacy.load('pt_core_news_sm')
def convert_offset_to_bio_tag(row):
text = row["text"]
@DominguesM
DominguesM / gist:2fe0a7b90d97b0feac0cd46771e14622
Created April 18, 2023 12:40
VSCode Extension Cheat Sheet
code --install-extension aaron-bond.better-comments
code --install-extension alefragnani.Bookmarks
code --install-extension angelo-breuer.clock
code --install-extension dracula-theme.theme-dracula
code --install-extension dsznajder.es7-react-js-snippets
code --install-extension eamodio.gitlens
code --install-extension esbenp.prettier-vscode
code --install-extension GitHub.copilot
code --install-extension GitHub.copilot-labs
code --install-extension GitHub.github-vscode-theme
@DominguesM
DominguesM / requeriments.txt
Created April 7, 2023 00:11
Requirements for training a LoRa adapter. (LambdaCloud)
datasets
loralib
sentencepiece
git+https://github.com/huggingface/transformers.git
accelerate
bitsandbytes
git+https://github.com/huggingface/peft.git
@DominguesM
DominguesM / command.js
Created April 6, 2023 10:19
Comando para a seção do Google Colab não desconectar
function ConnectButton(){
console.log("Connect pushed");
document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click()
}
setInterval(ConnectButton, 60000);
./main -m ./models/7B/ggml-model-q4_0.bin -p "Abaixo está uma instrução que descreve uma tarefa, emparelhada com uma entrada que fornece mais contexto. Escreva uma resposta que conclua adequadamente a solicitação. \
### Instruções: \
Dada a fórmula química, calcule a massa molar. \
### Entrada: \
CaCl2
### Resposta:" -n 512
./main -m ./models/7B/ggml-model-q4_0.bin -p "Abaixo está uma instrução que descreve uma tarefa. Escreva uma resposta que conclua adequadamente a solicitação. \
### Instruções: \
Como conseguir uma namorada. \
### Resposta:" -n 512
@DominguesM
DominguesM / gist:5aa51ebc0d12c959f81f283a62bd3172
Last active March 15, 2023 21:50
Creches SC GeoJson.json
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# coding=utf-8
# Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@DominguesM
DominguesM / get_commonvoice_data.py
Last active June 17, 2022 14:45
NVIDIA Nemo - Download Dataset Mozilla CommonVoices
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,