Skip to content

Instantly share code, notes, and snippets.

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

Bruno Bemfica BrunoCodeman

🏠
Working from home
View GitHub Profile
sudo apt-get update &&
sudo apt-get install aptitude -y &&
sudo aptitude update &&
sudo aptitude install vim -y &&
sudo apt-get install ca-certificates curl gnupg &&
sudo install -m 0755 -d /etc/apt/keyrings &&
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg &&
sudo chmod a+r /etc/apt/keyrings/docker.gpg &&
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
@BrunoCodeman
BrunoCodeman / create_rasa_project.sh
Last active November 22, 2018 23:09
Create RASA project with python
# create python venv
echo "creating virtualenv for $1 ";
mkdir -p ~/.venvs;
python3.6 -m venv ~/.venvs/$1;
source ~/.venvs/$1/bin/activate ;
echo "Done!!!";
#installing dependencies
echo "Installing dependencies for $1 ";
~/.venvs/$1/bin/pip install pip --upgrade rasa_core rasa_core_sdk numpy==1.14.5 spacy==2.0.12 rasa_nlu[spacy];
@BrunoCodeman
BrunoCodeman / standoff2corenlp.py
Created September 26, 2018 19:24 — forked from thatguysimon/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
# 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
#!/bin/bash
## Python
# Activate Python Virtualenv
activate_virtualenv() {
source ~/.venvs/$1/bin/activate
}
# Create new Python Virtualenv with a given name
create_virtualenv() {
@BrunoCodeman
BrunoCodeman / RadioButton.ts
Last active November 27, 2016 21:28
NativeScript + Bootstrap + Angular 2 - Simple Radio Button
import { Component } from "@angular/core";
const defaultCssClass = " btn btn-secondary round-button ";
const activeCssClass = " btn btn-primary round-button active ";
@Component({
template: `<StackLayout>
<WrapLayout orientation="horizontal">
<Label [text]="radioText" textWrap="true" style="font-size: 24px;"></Label>
<Button text="" (tap)="onClick()" [class]="btnClass" ></Button>