This file contains hidden or 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
/** | |
* APCS-Programs | |
* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015 Tarun Boddupalli | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights |
This file contains hidden or 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
#define trigPin 11 | |
#define echoPin 12 | |
#define led 13 | |
long distance, duration, lastDistance; | |
void setup() { | |
Serial.begin(9600); | |
pinMode(led, OUTPUT); | |
pinMode(trigPin, OUTPUT); |
This file contains hidden or 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() { | |
pinMode(13, OUTPUT); | |
Serial.begin(9600); | |
} | |
void loop() { | |
int lightLevel = analogRead(0); | |
if (lightLevel < 150) { | |
digitalWrite(13, HIGH); | |
} else { |
This file contains hidden or 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
#!/usr/bin/env python | |
import os | |
from argparse import ArgumentParser | |
parser = ArgumentParser() | |
parser.add_argument("file", help="which file to view in hex format") | |
parser.add_argument("-f", "--head", help="if given, show only the first n*16 bytes", type=int) | |
parser.add_argument("-t", "--tail", help="if given, show only the last n*16 bytes", type=int) | |
parser.add_argument("-s", "--split", help="if given, show n bytes per line", type=int, default=16) |
This file contains hidden or 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
package me.tarunb.gradechecker; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebElement; | |
import org.openqa.selenium.phantomjs.PhantomJSDriver; | |
import org.openqa.selenium.support.ui.ExpectedConditions; | |
import org.openqa.selenium.support.ui.WebDriverWait; | |
import java.io.File; | |
import java.io.PrintStream; |
This file contains hidden or 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 random | |
def computerChoice(): | |
random.seed() | |
a = random.randint(1,3) | |
choices = ["rock", "scissors", "paper"] | |
return choices[a - 1] ''' if a is 1, it'll return choices[0] which is rock, etc. ''' | |
''' | |
if(a == 1): |
This file contains hidden or 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
double xmin = -2, xmax = 2; | |
double ymin = -2, ymax = 2; | |
double cx = /*0.13499624814721625;*/ 0.25; //-1.787; // -1.785 | |
double cy = /*-0.9999288539922775;*/ 0; | |
double dx; | |
double dy; | |
int counter = 0; |
This file contains hidden or 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
echo "Generating inputs..." | |
# Generate random inputs | |
echo $RANDOM > sample0.tinyL.in | |
echo $RANDOM >> sample0.tinyL.in | |
echo $RANDOM >> sample0.tinyL.in | |
# echo >> sample0.tinyL.in | |
echo $RANDOM > sample1.tinyL.in | |
# echo >> sample1.tinyL.in |
This file contains hidden or 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
HELLO WORLD | |
WHAT IS GOING ON | |
THIS IS A TEST TEXT FILE | |
YOOHOO |
This file contains hidden or 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
{"scores":{"main":{"score":100,"hints":[]}},"scoreboard":[100]} |