Skip to content

Instantly share code, notes, and snippets.

View diegodorgam's full-sized avatar

Diego Dorgam diegodorgam

View GitHub Profile
@diegodorgam
diegodorgam / twecoll
Created February 1, 2018 02:04 — forked from lucahammer/twecoll
Modified version of twecoll to generate GDF files for use with Gephi. Use "python twecoll.py edgelist -g -m USERNAME"
#!/usr/bin/env python
'''
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
@diegodorgam
diegodorgam / keras_gensim_embeddings.py
Created December 12, 2017 03:26 — forked from codekansas/keras_gensim_embeddings.py
Using Word2Vec embeddings in Keras models
from __future__ import print_function
import json
import os
import numpy as np
from gensim.models import Word2Vec
from gensim.utils import simple_preprocess
from keras.engine import Input
from keras.layers import Embedding, merge
@diegodorgam
diegodorgam / keras_gensim_embeddings.py
Created December 12, 2017 03:26 — forked from codekansas/keras_gensim_embeddings.py
Using Word2Vec embeddings in Keras models
from __future__ import print_function
import json
import os
import numpy as np
from gensim.models import Word2Vec
from gensim.utils import simple_preprocess
from keras.engine import Input
from keras.layers import Embedding, merge
@diegodorgam
diegodorgam / train.js
Created December 6, 2017 17:06
Training Brill PoSTagger for Brazillian Portuguese
var natural = require('natural');
var fs = require('fs');
console.info('Initiating scripts');
function selectRuleTemplates(templateNames) {
var templates = [];
templateNames.forEach(function(name) {
if (natural.RuleTemplates[name]) {
template = new natural.RuleTemplate(name, natural.RuleTemplates[name]);
Verifying that "dorgam.id" is my Blockstack ID. https://explorer.blockstack.org/name/dorgam.id
@diegodorgam
diegodorgam / invoke.coffee
Created November 13, 2017 00:21 — forked from jefftriplett/invoke.coffee
Hubot + Invoke (python)
# Description:
# Run invoke commands.
#
# Commands:
# hubot invoke <subcommand>
{spawn, exec} = require 'child_process'
module.exports = (robot) ->
# Deploy to staging
/*
EXAMPLE MESSAGE
/poll "question?" "option 1" "option 2"
*/
/** Global Helpers
*
* console - A normal console instance
* _ - An underscore instance
@diegodorgam
diegodorgam / docker-compose.yml
Created April 8, 2017 15:22
Rocket.Chat docker-compose.yml with hubot
version: '2'
services:
mongo:
image: mongo:3.2
hostname: 'mongo'
volumes:
- ./db/data:/data/db
- ./db/dump:/dump
command: mongod --smallfiles --oplogSize 128 --replSet rs0
@diegodorgam
diegodorgam / install-docker.sh
Last active February 27, 2017 20:57 — forked from frgomes/install-docker.sh
Debian - install docker in Debian Jessie
#!/bin/bash
# compiled from https://docs.docker.com/engine/installation/linux/debian/#/debian-jessie-80-64-bit
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install apt-transport-https ca-certificates -y
sudo sh -c "echo deb https://apt.dockerproject.org/repo debian-jessie main > /etc/apt/sources.list.d/docker.list"
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
@diegodorgam
diegodorgam / confirme.me
Created September 4, 2015 01:23
Sou eu ou não sou?
Olá, pode confirmar a minha autenticidade?