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 sqlite3 as lite | |
import sys | |
import matplotlib | |
import pylab | |
import numpy as np | |
import matplotlib.pyplot as plt | |
/* | |
code to populate array here | |
*/ | |
#x is an array of integers, and y is an array of floats |
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 basic stuff | |
from random import randint | |
import binascii | |
def fib(): #defining the fibonacci generating function | |
a, b = 0, 1 | |
while True: | |
yield a | |
a, b = b, a + b | |
def encrypt(text, fiblist): #defining the encryption function with the text to encrypt and array of fibonacci numbers to that point |
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
<head> | |
<title>Athena</title> | |
</head> | |
<body> | |
<div id="mapContainer" style="position: relative; width: 100%; height: 100%"></div> | |
<script src="/heap.js"></script> | |
<script> | |
var map = new Datamap({ | |
element: document.getElementById('mapContainer'), | |
responsive: true, |
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
tweetstream = Session.get('tweets') | |
var data = []; | |
var map = new Datamap({ | |
element: document.getElementById('mapContainer'), | |
responsive: true, | |
fills: { | |
RED: '#E84343', | |
defaultFill: '#CFCFCF' | |
}, | |
done: function(datamap) { |
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
Anirudhs-iMac:counteract AndyKamath$ heroku logs | |
2016-08-12T00:08:05.057545+00:00 heroku[api]: Enable Logplex by andy@hackgician.net | |
2016-08-12T00:08:05.057595+00:00 heroku[api]: Release v2 created by andy@hackgician.net | |
2016-08-12T00:11:02.414323+00:00 heroku[api]: Release v3 created by andy@hackgician.net | |
2016-08-12T00:11:02.414250+00:00 heroku[api]: Set ROOT_URL config vars by andy@hackgician.net | |
2016-08-12T00:11:30.584782+00:00 heroku[api]: Attach MONGODB (@ref:mongolab-spherical-61273) by andy@hackgician.net | |
2016-08-12T00:11:30.584872+00:00 heroku[api]: Release v4 created by andy@hackgician.net | |
2016-08-12T00:14:35.064172+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=counteract.herokuapp.com request_id=0db463a9-b810-40cb-80b4-f9d952507d2b fwd="71.183.84.218" dyno= connect= service= status=502 bytes= | |
2016-08-12T00:14:35.208242+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=counteract.herokuapp.com request_id=c6338f34-25cc-4b99- |
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
//Requirements: Node.js, npm | |
//Run ~$ npm i && node index.js | |
//require modules such as the Facebook chat api | |
var login = require("facebook-chat-api"); | |
var sys = require('sys') | |
var exec = require('child_process').exec; | |
var fs = require('fs'); | |
//define a process that returns the JSON version of a string | |
function getStringLiteral(theFunction) { |
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
public class DatBoi { | |
private String color; | |
private String returnString; | |
private String colorOfUnicycle; | |
public DatBoi() { | |
color = "green"; | |
returnString = "oh shoot whaddup!"; | |
colorOfUnicycle = "red"; | |
} |
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
This page is no longer being updated view the new page here. | |
A TIME FOR CHOOSING (The Speech – October 27, 1964) | |
Thank you. Thank you very much. Thank you and good evening. The sponsor has been identified, but unlike most television programs, the performer hasn't been provided with a script. As a matter of fact, I have been permitted to choose my own words and discuss my own ideas regarding the choice that we face in the next few weeks. | |
I have spent most of my life as a Democrat. I recently have seen fit to follow another course. I believe that the issues confronting us cross party lines. Now, one side in this campaign has been telling us that the issues of this election are the maintenance of peace and prosperity. The line has been used, "We've never had it so good." | |
But I have an uncomfortable feeling that this prosperity isn't something on which we can base our hopes for the future. No nation in history has ever survived a tax burden that reached a third of its national income. Today, 37 cents out of |
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
/*Donny Mace's requirements: | |
In the 17th century, the discipline of probability theory got its start when a gambler asked a mathematician friend to explain some observations about dice games. Why did he, on average, lose a bet that at least one six would appear when rolling a die four times? And why did he seem to win a similar bet, getting at least one double-six when rolling a pair of dice 24 times? | |
Nowadays, it seems astounding that any person would roll a pair of dice 24 times in a row, and then repeat that many times over. Let’s do that experiment on a computer instead. Write a program OldWorldGambling that will simulate each game a million times and print out the wins and losses, assuming each bet was for $1. Use the Dice class that we created earlier in class. | |
*/ | |
import java.util.Random; |
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
# Enter your code here. Read input from STDIN. Print output to STDOUT | |
def rotate(t, m, n, a): | |
left = [i[0] for i in a[:-1]] | |
right = [i[-1] for i in a[1:]] | |
a[0] = a[0][1:]+[right[0]] | |
a[-1] = [left[-1]]+a[-1][:-1] | |
for i,x in enumerate(a): | |
if i < len(a) - 1: | |
a[i+1][0] = left[i] | |
if i > 0: |
OlderNewer