Skip to content

Instantly share code, notes, and snippets.

View lacion's full-sized avatar

Luis Morales lacion

View GitHub Profile
@lacion
lacion / Dockerfile
Created April 26, 2019 14:11
Mongodb2.x docker container
FROM ubuntu:16.04
RUN apt update && apt install -y wget
RUN wget http://downloads.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1404-2.7.8.tgz
RUN tar zxf mongodb-linux-x86_64-ubuntu1404-2.7.8.tgz
RUN mkdir -p /opt/mongodb && mv mongodb-linux-x86_64-ubuntu1404-2.7.8/bin/* /opt/mongodb
RUN mkdir -p /data/db
@lacion
lacion / presence.py
Created October 20, 2018 21:31
try's at HA custom components
"""
Detect person presence in the house using diferent states.
For more details about this component, please refer to the documentation at
http://....
"""
import logging
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
@lacion
lacion / clean.py
Created August 14, 2018 17:43
ML playground
import string
import json
import re
from nltk import download
from nltk.corpus import stopwords
download('stopwords')
def text_process(text):
# print('processing: ', text)
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
# To check if this is up-to-date with the tax rates go to
# http://www.expatax.nl/tax-rates-2014.php and see if there's anything
# newer there.
use strict;
use warnings;
use Text::TabularDisplay;
use List::Util qw(sum);
my $start = 30_000 || $ARGV[0];
my $end = 100_000 || $ARGV[1];
rootLogger: INFO, console, file, socketappender
logger:
# log action execution errors for easier debugging
action: DEBUG
# reduce the logging for aws, too much is logged under the default INFO
com.amazonaws: WARN
# gateway
#gateway: DEBUG
#index.gateway: DEBUG
@lacion
lacion / Vagrantfile
Created March 20, 2014 19:59
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
boxes = [
{
:name => :ans,
:role => 'test',
:memory => 512,
:cpus => 1,
//*****************************************
// NEC (Japanese) Infrared code sending library for the Arduino
// Send a standard NEC 4 byte protocol direct to an IR LED on the define pin
// Assumes an IR LED connected on I/O pin to ground, or equivalent driver.
// Tested on a Freetronics Eleven Uno compatible
// Written by David L. Jones www.eevblog.com
// Youtube video explaining this code: http://www.youtube.com/watch?v=BUvFGTxZBG8
// License: Creative Commons CC BY
//*****************************************
@lacion
lacion / gist:6664879
Created September 22, 2013 23:31
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
boxes = [
{
:name => :Foo1,
:role => 'FooRole1',
:memory => 512,
:cpus => 1,
  • Update HISTORY.rst
  • Update version number in my_project/__init__.py
  • Update version number in setup.py
  • Run the tests:
python setup.py test
tox
  • Commit the changes: