This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Sleep Demo Serial | |
* ----------------- | |
* Example code to demonstrate the sleep functions in a Arduino. Arduino will wake up | |
* when new data is received in the serial port USART | |
* Based on Sleep Demo Serial from http://www.arduino.cc/playground/Learning/ArduinoSleepCode | |
* | |
* Copyright (C) 2006 MacSimski 2006-12-30 | |
* Copyright (C) 2007 D. Cuartielles 2007-07-08 - Mexico DF | |
* | |
* With modifications from Ruben Laguna 2008-10-15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pin 13 has an LED connected on most Arduino boards. | |
// Pin 11 has the LED on Teensy 2.0 | |
// Pin 6 has the LED on Teensy++ 2.0 | |
// Pin 13 has the LED on Teensy 3.0 | |
// give it a name: | |
int led = 13; | |
// set up morse code timeings... | |
int base_time = 100; // 200 ms base speed ~ 24 wpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup () { | |
// do what ever to get it all set up | |
// only ran once at poweron | |
} | |
void main () { | |
if (sensorpin is low && analogread value less than x) { | |
set pin high | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import absolute_import, division, print_function | |
import os | |
import pickle | |
from six.moves import urllib | |
import tflearn | |
from tflearn.data_utils import * | |
path = "data/sherlock_edited.txt" |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A STUDY IN SCARLET | |
Table of contents | |
Part I | |
Mr. Sherlock Holmes | |
The Science Of Deduction | |
The Lauriston Garden Mystery | |
What John Rance Had To Tell | |
Our Advertisement Brings A Visitor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
ga_tfl.py | |
applying genetic algorithms to TFLearn neural networks | |
''' | |
import random | |
import tflearn | |
from tflearn.data_utils import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import itertools | |
import random | |
# set up hyper params | |
pop_size = 10 | |
learn_rate = 3 | |
epochs = 500 | |
train_epochs = 25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from hl7apy.parser import parse_message | |
input_folder_prod = '' | |
input_folder_test = '' | |
def get_fnames(folder): | |
ret = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import pygame | |
from pygame.locals import * | |
''' | |
brainstorm: | |
level: collection of maps | |
game: collection of levels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tflearn | |
from tflearn.layers.conv import conv_2d, max_pool_2d, avg_pool_2d | |
from tflearn.layers.merge_ops import merge | |
from tflearn.layers.normalization import local_response_normalization | |
def inceptionv3_block(input_block, filter_width=1, stride=1, | |
activation='relu', regularizer='L2', normalise=False): | |
# 1x1 convolutions |
OlderNewer