Skip to content

Instantly share code, notes, and snippets.

View P1n3appl3's full-sized avatar
🍍
🍍

Julia Ryan P1n3appl3

🍍
🍍
View GitHub Profile
@P1n3appl3
P1n3appl3 / Pokemon.py
Created October 5, 2016 02:40
CS homework pokemon
import random
import msvcrt
import os
import colorama
colorama.init()
WHITE = "\033[1;37m"
RED = "\033[0;31m"
@P1n3appl3
P1n3appl3 / dropbox.py
Created January 25, 2017 05:58
coding challenge from dropbox
class Meeting(object):
def __init__(self, start, end):
self.start = start
self.end = end
def __str__(self):
return str(self.start) + ', ' + str(self.end)
/*
POV Display
Controlls 5 LEDs in synch with their rotation using an ATTiny85 to create a POV Display.
by Joseph Ryan
*/
const int totalLen = 24;
const int len = 12;
@P1n3appl3
P1n3appl3 / Piece.jack
Created February 7, 2017 03:57
tetris notes
/*
0 = I
.... ..O. .... .O..
OOOO ..O. .... .O..
.... ..O. OOOO .O..
.... ..O. .... .O..
000011110000000 1920
001000100010001 4369
000000001111000 120
010001000100010 8738
@P1n3appl3
P1n3appl3 / joseph.cfg
Created February 15, 2017 04:50
Uncrustify Config
# Joseph Ryan
# Uncrustify config loosely based on K&R
#
indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs
input_tab_size = 4 # original tab size
output_tab_size = 4 # new tab size
indent_columns = output_tab_size
indent_label = 2 # pos: absolute col, neg: relative column
# indent_align_string = False # align broken strings
@P1n3appl3
P1n3appl3 / config.cson
Created February 15, 2017 04:50
atom config
"*":
"atom-beautify":
c:
configPath: "C:\\Program Files\\uncrustify\\cfg\\joseph.cfg"
cpp:
configPath: "C:\\Program Files\\uncrustify\\cfg\\joseph.cfg"
general:
_analyticsUserId: "50eed56b-e444-4d5a-aa6e-1fdf73ae020c"
java:
configPath: "C:\\Program Files\\uncrustify\\cfg\\joseph.cfg"
@P1n3appl3
P1n3appl3 / tbapointcounter.py
Created March 7, 2017 18:45
Access TBA's api to add up point totals from different sources for FRC SteamWork
import tbapi
# usage:
# pip install tbapi
# replace TEAM_NAME with your team name
# set current date to a string with the format YYYY-MM-DD
# run
# example results with date as "2017-03-06"
@P1n3appl3
P1n3appl3 / TestThread.java
Last active March 9, 2017 18:58
Demo of the runnable interface and stopping/restarting threads
import java.util.Random;
public class TestThread implements Runnable {
private int num;
private Random rand;
private boolean enabled;
TestThread(){
rand = new Random();
which
there
their
about
would
these
other
words
could
write
@P1n3appl3
P1n3appl3 / skyscrapers.py
Created September 10, 2017 02:05
Maybe i'll optimize this enough for 7x7 someday
clues = (3, 2, 2, 3, 2, 1,
1, 2, 3, 3, 2, 2,
5, 1, 2, 2, 4, 3,
3, 2, 1, 2, 2, 4)
expected = ((2, 1, 4, 3, 5, 6),
(1, 6, 3, 2, 4, 5),
(4, 3, 6, 5, 1, 2),
(6, 5, 2, 1, 3, 4),
(5, 4, 1, 6, 2, 3),