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
git filter-branch -f --commit-filter ' | |
if [ "$GIT_AUTHOR_EMAIL" = "[email protected]" -o "$GIT_AUTHOR_EMAIL" = "[email protected]" ]; | |
then | |
GIT_AUTHOR_NAME="User Name"; | |
GIT_AUTHOR_EMAIL="[email protected]"; | |
git commit-tree "$@"; | |
else | |
git commit-tree "$@"; | |
fi' HEAD |
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
var http=require("http"); | |
http.createServer(function(req,res){ | |
res.writeHead(200,{"Content-Type":"text/plain"}); | |
res.end("Hello World\n"); | |
}).listen(9124,"localhost"); | |
console.log("The sweet thing is running on http://localhost:9124"); |
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
$ cat eve.py | |
import eventlet | |
from eventlet import wsgi | |
class Logger(object): | |
def info(self,*args,**kwargs): | |
pass | |
def debug(self,*args,**kwargs): | |
pass |
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
$ cat geve.py | |
import gevent | |
from gevent import wsgi,pool | |
#the application to handle the response | |
def app(environ,start_response): | |
start_response("200 OK",[("Content-Type","text/plain")]) | |
return "Hello World\n" | |
if __name__=="__main__": | |
print "The sweet thing is running on http://localhost:8912/" | |
pool=gevent.pool.Pool() #A pool of greenlets.Each greenlets runs the above defined function app for a client request |
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
$ sysctl -A | |
user.cs_path: /usr/bin:/bin:/usr/sbin:/sbin | |
user.bc_base_max: 99 | |
user.bc_dim_max: 2048 | |
user.bc_scale_max: 99 | |
user.bc_string_max: 1000 | |
user.coll_weights_max: 2 | |
user.expr_nest_max: 32 | |
user.line_max: 2048 | |
user.re_dup_max: 255 |
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
USE mykeyspace; | |
SELECT * FROM task1_part2_group3_2 WHERE origin = 'BOS' AND through = 'ATL' AND dest = 'LAX' AND first_date = '03/04/2008'; | |
SELECT * FROM task1_part2_group3_2 WHERE origin = 'PHX' AND through = 'JFK' AND dest = 'MSP' AND first_date = '07/09/2008'; | |
SELECT * FROM task1_part2_group3_2 WHERE origin = 'DFW' AND through = 'STL' AND dest = 'ORD' AND first_date = '24/01/2008'; | |
SELECT * FROM task1_part2_group3_2 WHERE origin = 'LAX' AND through = 'MIA' AND dest = 'LAX' AND first_date = '16/05/2008'; | |
$ bash question3_2.sh | |
origin | through | dest | first_date | delay | |
--------+---------+------+------------+------- |
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
USE mykeyspace; | |
SELECT origin, dest, carrier, average FROM task1_part2_group2_3 WHERE origin = 'LGA' AND dest = 'BOS'; | |
SELECT origin, dest, carrier, average FROM task1_part2_group2_3 WHERE origin = 'BOS' AND dest = 'LGA'; | |
SELECT origin, dest, carrier, average FROM task1_part2_group2_3 WHERE origin = 'OKC' AND dest = 'DFW'; | |
SELECT origin, dest, carrier, average FROM task1_part2_group2_3 WHERE origin = 'MSP' AND dest = 'ATL'; | |
$ bash question2_3.sh | |
origin | dest | carrier | average | |
--------+------+---------+--------- |
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
USE mykeyspace; | |
SELECT origin, dest, average FROM task1_part2_group2_2 WHERE origin IN ('SRQ', 'CMH', 'JFK', 'SEA', 'BOS'); | |
$ bash question2_2.sh | |
origin | dest | average | |
--------+------+--------- | |
BOS | ONT | 0 | |
BOS | SWF | 0 | |
BOS | GGG | 2 |
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
USE mykeyspace; | |
SELECT origin, carrier, average FROM task1_part2_group2_1 WHERE origin IN ('SRQ', 'CMH', 'JFK', 'SEA', 'BOS'); | |
$ bash question2_1.sh | |
origin | carrier | average | |
--------+---------+--------- | |
BOS | PA (1) | 4.7603 | |
BOS | ML (1) | 5.7604 | |
BOS | TZ | 7.4525 |
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
========= 2016-02-17 14:03:00 ========= | |
+-------+------------------+ | |
|carrier| avg_delay| | |
+-------+------------------+ | |
| "HA"|3.8480866979955883| | |
| "9E"| 5.108409199808337| | |
| "WN"| 6.573501153936092| | |
| "F9"| 6.647087408127316| | |
| "NW"| 7.351961775245797| | |
| "OO"| 7.906498902139751| |