This file contains 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
Export["siney.gif", | |
Table[ | |
Show[Graphics[ | |
Translate[ | |
Rotate[{Circle[], Thick, Blue, Line[{{0, 0}, {0, -1}}], Red, | |
PointSize[.02], Point[{0, -1}]}, t], { 2 Pi, 0}], | |
PlotRange -> {{0, 4 Pi}, {-2, 2}}, ImageSize -> {Large, Tiny}, | |
Axes -> {True, False}, AxesOrigin -> {0, -1}], | |
Graphics[ | |
Plot[Sin[x + t - Sin[t] + 3*Pi/2], {x, -4 Pi, 4 Pi}] |
This file contains 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 java.util.*; | |
import java.io.*; | |
public class TronBot { | |
public static void main(String[] args) { | |
// Call this to initialize networking and the debug file | |
Tron.init(); | |
// We can't print to console, because that channel is used for IO with the environment. | |
// We therefore print to either debug1.log or debug2.log. The first is for player1, the second for layer two |
This file contains 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 requests | |
from BeautifulSoup import BeautifulSoup | |
import time | |
from Foundation import NSUserNotification | |
from Foundation import NSUserNotificationCenter | |
from Foundation import NSUserNotificationDefaultSoundName | |
from optparse import OptionParser | |
def notify(school): |
This file contains 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 movingAvg(double avg, double newVal, double len) { | |
avg -= avg/len; | |
avg += newVal/len; | |
return avg; | |
} |