I hereby claim:
- I am lindsaylandry on github.
- I am angryballoon (https://keybase.io/angryballoon) on keybase.
- I have a public key ASDtYTLFBUR0eHW0YVCKptt8lXhkW9gZrPzRwvsgqzPikwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
func GenerateRandomString(n int) string { | |
letterBytes := "abcdefghijklmnopqrstuvwxyz" |
[Unit] | |
Description=Backlight Service | |
[Service] | |
ExecStart=/usr/local/bin/backlight.py | |
StandardOutput=null | |
[Install] | |
WantedBy=multi-user.target | |
Alias=backlight.service |
import os | |
from time import sleep | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP) | |
os.system("gpio -g mode 18 pwm") | |
os.system("gpio -g pwm 18 1023") | |
nums = [1023, 500, 200, 50] |
# Valid command line args: | |
# int=<integer> | |
# roman=<roman numeral> | |
M = 1000 | |
D = 500 | |
C = 100 | |
L = 50 | |
X = 10 | |
V = 5 |
#!/usr/bin/env ruby | |
require 'matrix' | |
def number_of_routes(start, n) | |
# 0 1 2 3 4 6 7 8 9 | |
a = Matrix[[0, 0, 0, 0, 1, 1, 0, 0, 0], #0 | |
[0, 0, 0, 0, 0, 1, 0, 1, 0], #1 | |
[0, 0, 0, 0, 0, 0, 1, 0, 1], #2 | |
[0, 0, 0, 0, 1, 0, 0, 1, 0], #3 |
-- 31: Determine whether a number is prime | |
isPrime :: Int -> Bool | |
isPrime x | |
| x <= 0 = False | |
| x == 1 = False | |
| otherwise = sum [ 1 | s <- [2,3..floor(sqrt(fromIntegral x))], x `mod` s == 0 ] == 0 | |
-- 32 Determine greatest common divisor of 2 positive integers. Use Euclid's algorithm | |
greatestCommonDivisor :: Int -> Int -> Int | |
greatestCommonDivisor x y |