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
<? | |
header("Last-Modified: Fri, 18 Mar 2011 05:24:04 GMT "); | |
srand(); | |
?> | |
<b><font color="#aa0000">ICN Project 1</font></b><br> | |
<? | |
$padding = rand(90,490); | |
for($i=0; $i<$padding; ++$i){ | |
printf("%s", dechex(rand(0,15))); | |
} |
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/python | |
import sys | |
from time import sleep | |
from math import sqrt | |
import argparse | |
from subprocess import Popen, PIPE | |
from mininet.net import Mininet | |
from mininet.link import TCLink | |
from mininet.topo import Topo | |
from mininet.log import lg |
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
#data = [1, 2, 3, 4, 4, 4] | |
#data = [1, 1, 2, 2, 3, 3] | |
#data = [5, 6, 9, 7, 7] | |
data = [1,2,1,2,3,3,3] # special case len(stack==3) | |
#data = [2,2,3,3,3,3,4,4] # special case len(stack==0) | |
#data = [1,1,2,2,3,3,4,4] # special case len(stack==0) | |
stack = [] | |
# O(n) |
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 httplib | |
import json | |
class REST(object): | |
def __init__(self, server): | |
self.server = server | |
def get(self, path): | |
ret = self.rest_call(path, {}, 'GET') | |
return json.loads(ret[2]) |