Skip to content

Instantly share code, notes, and snippets.

View lxasqjc's full-sized avatar

Chen Jin lxasqjc

View GitHub Profile
@lxasqjc
lxasqjc / min-char-rnn.py
Created September 23, 2018 20:18 — 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)
from __future__ import print_function
from sys import platform
from os import system
import WalabotAPI as wlbt
import time # python timer
import statistics #cal std
import RPi.GPIO as GPIO #This imports the GPIO Library into Python so we can use the GPIO Pins on the Pi.
GPIO.setmode(GPIO.BCM)
GPIO.setup(2, GPIO.OUT) #We are using GPIO 2 as our first pin, which is where the green wire is connected to the first relay switch on the baord