Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am kylepiira on github.
  • I am kylepiira (https://keybase.io/kylepiira) on keybase.
  • I have a public key ASB3ub66FFTHKS1Pz8zIMezwHA66kVmu1LolYJxEDC_SbQo

To claim this, I am signing this object:

View catcarlib.py
import RPi.GPIO as GPIO
channels = [
{'label': 'LEFT_MOTOR_POWER', 'pin': 11},
{'label': 'LEFT_MOTOR_FORWARD', 'pin': 13},
{'label': 'LEFT_MOTOR_BACKWARD', 'pin': 15},
{'label': 'RIGHT_MOTOR_POWER', 'pin': 23},
{'label': 'RIGHT_MOTOR_FORWARD', 'pin': 21},
{'label': 'RIGHT_MOTOR_BACKWARD', 'pin': 19},
]
View train.py
from tensorflow.keras.models import Model
from tensorflow.keras.layers import (
Input,
Conv2D,
Activation,
Reshape,
Flatten,
Lambda,
Dense,
)
@KylePiira
KylePiira / pong.ino
Last active Oct 4, 2019
A Pong implementation for the UMass CICS 290M Makerboard
View pong.ino
// Imports
#include <Adafruit_SSD1306.h>
// Globals
#define UP_BUTTON 34
#define DOWN_BUTTON 0
#define RESET_BUTTON 35
#define BUZZER 17
// Game State
@KylePiira
KylePiira / P217.java
Last active Sep 22, 2019
Problem 2.1.7c
View P217.java
public class P217 {
public static void main(String[] args) throws Exception {
// Example
boolean[][] r = {
{false, false, false, true, false, false},
{false, false, true, false, false, false},
{false, true, false, false, false, false},
{false, false, true, false, false, false},
{false, false, false, false, false, true},
{false, false, false, true, false, false},
View settings.json
{
"app": "steemit",
"elastic_host": "http://localhost:9200",
"elastic_index": "steem",
"elastic_user": "",
"elastic_pass": "",
"start_block": 30061000
}
View ebay.urls
This file has been truncated, but you can view the full file.
https://www.ebay.com/b/Tablet-eBook-Accessory-Bundles-for-Microsoft/176971?LH_BOPIS=1&_udhi=14.0&LH_AS=1&LH_GD=3&LH_Sold=1&LH_RPA=1&Compatible%2520Brand=For%2520Microsoft&rt=nc
https://www.ebay.com/b/Wireless-Webcam/4616?LH_BOPIS=1&LH_FS=1&LH_Sold=1&Connectivity=Wireless&rt=nc&LH_RPA=1
https://www.ebay.com/b/Other-Laptop-Desktop-Accessories/31534/bn_1648493?rt=nc&LH_AV=1&LH_BOPIS=1&LH_FS=1&LH_RPA=1&_udlo=2.0&_udhi=4.0&LH_Complete=1
https://www.ebay.com/itm/01-02-03-04-05-LEXUS-IS300-BLACK-STEERING-WHEEL-4510053100C0/283096997398?epid=1711248407&hash=item41e9e55e16:g:eUsAAOSwOD9bbgDT
https://www.ebay.com/itm/1973-1974-1975-1976-1977-Oldsmobile-Cutlass-Speedometer-Gauge-Cluster/302778690760?hash=item467f042cc8:g:gZ0AAOSwjOVbKwFa
https://www.ebay.com/itm/-/223044310681
https://www.ebay.com/itm/1-2-3-Shade-Vinyl-Room-Darkening-Temporary-Pleated-Shades-Cordless-White-/401017127026?oid=232166307994
@KylePiira
KylePiira / life.py
Created Nov 25, 2018
Game of Life in Python
View life.py
"""
Kyle's Game of Life Implementation
1) live cells die if they have 0, 1, or 4+ neighbors
2) empty cells have a birth if they have exactly three neighbors
"""
import numpy as np
# Create a blank board
board = np.zeros((5, 5))
@KylePiira
KylePiira / test.java
Created Sep 24, 2018
Simple Java program to test integer division.
View test.java
public class IntDivision {
public static void main(String[] args) {
System.out.println("int / int = int");
System.out.println("1 / 3 = " + 1 / 3);
System.out.println("int / double = double");
System.out.println("1 / 3. = " + 1 / 3.);
System.out.println("Another Example:");
@KylePiira
KylePiira / test.java
Created Sep 24, 2018
A simple Java program to test integer arithmetic errors.
View test.java
public class IntDivision {
public static void main(String[] args) {
System.out.println("int / int = int");
System.out.println("1 / 3 = " + 1 / 3);
System.out.println("int / float = float");
System.out.println("1 / 3. = " + 1 / 3.);
System.out.println("Another Example:");
You can’t perform that action at this time.