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
#!/usr/bin/env python3 | |
import time | |
import requests | |
import unittest | |
base_server = 'localhost' | |
base_port = 8081 | |
path = 'htdocs' | |
base_url = None |
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
0xDEADBEEF | |
"n/sh" | |
0xFF"/bi" | |
A6 | |
A5 | |
LINE 9 | |
(LINE 3) + 1 | |
A1 |
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
#!/usr/bin/env python3 | |
def tuple_sort(tuple_list): | |
first_set = set([first for first, second in tuple_list]) | |
second_set = set([second for first, second in tuple_list]) | |
first_index_map = {} | |
second_index_map = {} | |
for index, item in enumerate(sorted(first_set, reverse=True)): | |
first_index_map[item] = index |
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
#!/usr/bin/env python3 | |
def tuple_sort(tuple_list): | |
tup_dict = {} | |
first_sorted = list(sorted(tuple_list, key=lambda tup: tup[0], reverse=True)) | |
second_sorted = list(sorted(tuple_list, key=lambda tup: tup[1], reverse=True)) | |
for index, tup in enumerate(first_sorted): | |
tup_dict[tup] = index |
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
#!/usr/bin/env python3 | |
def tuple_sort(tuple_list): | |
tup_dict = {} | |
first_sorted = list(sorted(tuple_list, key=lambda tup: tup[0], reverse=True)) | |
second_sorted = list(sorted(tuple_list, key=lambda tup: tup[1], reverse=True)) | |
for index, tup in enumerate(first_sorted): | |
tup_dict[tup] = index |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
config.vm.box = "isaacd9/hw2vm" | |
config.vm.box_url = "https://vagrant-boxes.nyc3.digitaloceanspaces.com/hw2vm/hw2vm.json" |
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
#!/usr/bin/env node | |
const http = require('http'); | |
const domain = 'http://example.com/'; | |
const numReqs = 100; | |
const blockTime = 100000000; | |
reqs = []; | |
let makeReq = () => { | |
let startTime = new Date().getTime(); |
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
#!/usr/bin/env python3 | |
class Node: | |
__slots__ = [ | |
'data', | |
'next', | |
'next_min', | |
] | |
def __init__(self, data, nnext): | |
self.data = data |
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
#!/usr/local/bin/node | |
const sort = (arr) => { | |
const sorted = []; | |
const sleep = (strNum) => { | |
return new Promise((resolve, reject) => { | |
num = parseInt(strNum); | |
timeout = num * 100; | |
setTimeout((num) => { | |
sorted.push(num); |
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
#!/usr/local/bin/node | |
const sort = (arr) => { | |
const sorted = []; | |
const sleep = (strNum) => { | |
return new Promise((resolve, reject) => { | |
num = parseInt(strNum); | |
setTimeout((num) => { | |
sorted.push(num); | |
resolve(); |