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
@BrunoCodeman
BrunoCodeman / create_rasa_project.sh
Last active Nov 22, 2018
Create RASA project with python
View create_rasa_project.sh
# 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 Sep 26, 2018 — 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
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
View python3_envs_manipulation.sh
#!/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 Nov 27, 2016
NativeScript + Bootstrap + Angular 2 - Simple Radio Button
View RadioButton.ts
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>