Skip to content

Instantly share code, notes, and snippets.

View sfrias's full-sized avatar
🎯
settle for future counterparts

Santi Frias sfrias

🎯
settle for future counterparts
View GitHub Profile
@sfrias
sfrias / adr-template.md
Created January 21, 2021 18:46 — forked from hectorcanto/adr-template.md
A template for Arquitecture Decision Records

ADR Template

Short Title

Short title of solved problem and solution [Describe the general problem and the chosen solution in free from in a few sentences. Leave specific details for the following sections]

@sfrias
sfrias / display.py
Created November 25, 2020 23:29 — forked from christopherlovell/display.py
display youtube video in jupyter notebook
from IPython.display import HTML
# Youtube
HTML('<iframe width="560" height="315" src="https://www.youtube.com/embed/S_f2qV2_U00?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>')
# Vimeo
HTML('<iframe src="https://player.vimeo.com/video/26763844?title=0&byline=0&portrait=0" width="700" height="394" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe><p><a href="https://vimeo.com/26763844">BAXTER DURY - CLAIRE (Dir Cut)</a> from <a href="https://vimeo.com/dannysangra">Danny Sangra</a> on <a href="https://vimeo.com">Vimeo</a>.</p>')
@sfrias
sfrias / tornado_continuous_reload.py
Created September 2, 2019 03:31 — forked from renaud/tornado_continuous_reload.py
Example of Tornado that autoreloads/watches all files in folder 'static'
'''
Example of Tornado that autoreloads/watches all files in folder 'static'
'''
import tornado.ioloop
import tornado.web
import tornado.autoreload
import os
''' serves index.html'''
# http://open-notify.org/Open-Notify-API/ISS-Location-Now/
import urllib2
import json
import paho.mqtt.client as mqtt
import time
def on_message(client, userdata, message):
try:
available = message.payload
@sfrias
sfrias / ggd_rf_example.r
Created July 28, 2018 23:11 — forked from stephenturner/ggd_rf_example.r
ggd_rf_example.r
#load the iris data
data(iris)
# this data has 150 rows
nrow(iris)
# look at the first few
head(iris)
# splitdf function will return a list of training and testing sets
@sfrias
sfrias / DS18B20.ino
Created July 5, 2018 23:56
DS18B20_Temperature_Sensor_Arduino.ino
#include <OneWire.h>
#include <DallasTemperature.h>
// Data wire is conntec to the Arduino digital pin 2
#define ONE_WIRE_BUS 2
// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature sensor
@sfrias
sfrias / emailer.py
Created August 21, 2017 23:43 — forked from sarahholderness/emailer.py
Python scripts to read a list of customer emails and send an email with the daily weather forecast
import weather
import smtp
'''
Send a greeting email to our customer email list
with the daily weather forecast and schedule
'''
def get_emails():
# Reading emails from a file
@sfrias
sfrias / min-char-rnn.py
Last active August 27, 2015 22:45 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@sfrias
sfrias / conplex
Last active August 29, 2015 14:19
En el primer esbozo se elige constructor en tiempo de compilación por diferentes tipos de parámetros en el constructor.
public class complex {
// Atributos-Propiedades-Campos (items)
private double real, img;
private int mod, arg;
// Constructores
public complex (double real, double img){
this.real = real;
this.img = img;
}