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
| <html> | |
| <head> | |
| <title>GUI for Interacting with HTTP Server</title> | |
| <script type="text/javascript"> | |
| var userId = -1; | |
| var userAuth = -1; | |
| var gameStarted = false; |
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 Tkinter | |
| from Tkinter import Frame, BOTH, Canvas | |
| #By Caleb Robinson | |
| class Pong(Frame): | |
| player1 = 0 | |
| player2 = 0 | |
| ballX=50 | |
| ballY=50 |
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 os,time | |
| count = 0 | |
| def printBoard(b): | |
| print " " | |
| for i in b: | |
| for x in i: | |
| print str(x)+" ", | |
| print " " | |
| print " " |
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
| http = new XMLHttpRequest(); | |
| var params = "lorem=ipsum&name=binny"; | |
| http.open("POST", "http://localhost:8080/", true); | |
| //Send the proper header information along with the request | |
| http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); | |
| http.setRequestHeader("Content-length", params.length); | |
| http.setRequestHeader("Connection", "close"); | |
| http.onreadystatechange = function() {//Call a function when the state changes. |
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 skein,itertools | |
| inputNum = 26 | |
| target = "5b4da95f5fa08280fc9879df44f418c8f9f12ba424b7757de02bbdfbae0d4c4fdf9317c80cc5fe04c6429073466cf29706b8c25999ddd2f6540d4475cc977b87f4757be023f19b8f4035d7722886b78869826de916a79cf9c94cc79cd4347d24b567aa3e2390a573a373a48a5e676640c79cc70197e1c5e7f902fb53ca1858b6" | |
| targetBin = '0b'+(bin(int(target, 16))[2:]).zfill(1024) | |
| def doWork(a): | |
| return '0b'+(bin(int(skein.skein1024(bytes(a,'utf-8')).hexdigest(), 16))[2:]).zfill(1024) |
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
| from matplotlib import pyplot | |
| X=[] | |
| Y=[] | |
| currentNum = 0 | |
| randRange = 7 | |
| def getPerlinNum(): | |
| global currentNum, randRange |
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
| from threading import Thread, Lock | |
| from Queue import Queue | |
| from datetime import datetime | |
| import time | |
| import random | |
| class Worker(Thread): | |
| """This is the main worker - it will process jobs as long as the "job | |
| queue" has jobs available. |
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
| f = open("prob3.txt","r") | |
| num = int(f.readline().strip()) | |
| def check(board,x,y,n,char): | |
| for i in range(num): | |
| board = [] | |
| for j in range(5): |
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 cv2 | |
| import sys | |
| import numpy as np | |
| import numpy.linalg | |
| import math | |
| import time | |
| class Primitive(object): | |
| def __init__(self): |
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
| f=open("3774.txt","r") | |
| try: | |
| while True: | |
| b=[tuple(f.readline().strip().split(",")+[0]) for i in range(int(f.readline().strip()))] | |
| a=reduce(lambda a,b:(b[0],b[1],a[2]+((float(b[0])-float(a[0]))*((float(a[1])+float(b[1]))/2))),b) | |
| print "%.2f to %.2f: %.4f" % (float(b[0][0]),float(a[0]),a[2]) | |
| except: | |
| pass |
OlderNewer