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
alias ls="ls && curl http://whatthecommit.com 2> /dev/null | grep '<p>' | sed 's/\///'| sed 's/<p>//' | xargs touch 2> /dev/null" |
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
/** | |
* 1) Open src/schema.js | |
* 2) Replace | with '' | |
* 3) Write src/schema.js | |
*/ | |
const { readFileSync, writeFileSync, unlinkSync } = require('fs'); | |
const schema = readFileSync('src/schema.js', { | |
encoding: 'utf8', |
This file has been truncated, but you can view the full file.
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
[32m[storage-deployment-v1-0-2802530313-3fgs4] 100.96.37.187 - - [03/Apr/2018:21:03:02 +0000] "POST /mongodb/find?namespace=drivetv HTTP/1.1" 200 147643 "-" "advertisement" 1040 (B[m | |
[32m[storage-deployment-v1-0-2802530313-3fgs4] 100.96.37.187 - - [03/Apr/2018:21:03:03 +0000] "POST /mongodb/find?namespace=drivetv HTTP/1.1" 200 182365 "-" "advertisement" 961 (B[m | |
[32m[storage-deployment-v1-0-2802530313-3fgs4] 100.96.37.187 - - [03/Apr/2018:21:03:04 +0000] "POST /mongodb/find?namespace=drivetv HTTP/1.1" 200 223840 "-" "advertisement" 5278 (B[m | |
[32m[storage-deployment-v1-0-2802530313-3fgs4] 100.96.37.187 - - [03/Apr/2018:21:03:06 +0000] "POST /mongodb/find?namespace=drivetv HTTP/1.1" 200 232525 "-" "advertisement" 2725 (B[m | |
[32m[storage-deployment-v1-0-2802530313-3fgs4] 100.96.37.187 - - [03/Apr/2018:21:03:07 +0000] "POST /mongodb/find?namespace=drivetv HTTP/1.1" 200 231736 "-" "advertisement" 989 (B[m | |
[32m[storage-deployment-v1-0-2802530313-3fgs4] 100.96.37.187 - - [03/Apr/2018:21:03:10 +0000] " |
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
[35m[advertisement-v0-9-783435746-x9qzd] 100.96.4.209 - - [03/Apr/2018:21:18:30 +0000] "GET /ad/41.4833608/-82.0199953/%7BmapRid%7D/ri.display.main.display.658ddbc7-dad3-40e8-bda0-7a326d3b3ab3?namespace=drivetv HTTP/1.1" 200 1731 "-" "buffer" 24703 (B[m | |
[31m[advertisement-v0-9-783435746-3mdxf] 100.96.29.102 - - [03/Apr/2018:21:18:25 +0000] "GET /ad/40.0608984/-84.2401734/%7BmapRid%7D/ri.display.main.display.c13941aa-6cf9-4333-9e89-45dcdbfeba4a?namespace=drivetv HTTP/1.1" 200 1833 "-" "buffer" 25443 (B[m | |
[33m[advertisement-v0-9-783435746-khp10] 100.96.24.42 - - [03/Apr/2018:21:18:22 +0000] "GET /ad/39.8906424/-83.0823657/%7BmapRid%7D/ri.display.main.display.50e07a7d-c27d-4068-a8a0-c5c5aaf36c8a?namespace=drivetv HTTP/1.1" 500 101 "-" "buffer" 28358 (B[m | |
[33m[advertisement-v0-9-783435746-khp10] 100.96.19.69 - - [03/Apr/2018:21:18:22 +0000] "GET /ad/40.3441622/-83.7941157/%7BmapRid%7D/ri.display.main.display.d4ac76fd-805d-4a7e-a6b2-082f18151881?namespace=drivetv HTTP/1.1" 200 1809 "-" "buffer" 30866 (B |
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
from math import floor, ceil | |
import random | |
def output(case_num, result): | |
print("Case #{}: {}".format(case_num, str(result))) | |
def sub_partition(array, start, end, idx_pivot, im): | |
'returns the position where the pivot winds up' |
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
# Q4 | |
from math import pi, cos, sin, acos, asin, sqrt | |
from random import random | |
from functools import partial | |
def output(case_num, result): | |
print("Case #{}".format(case_num)) | |
for x, z, y in result: | |
print("{} {} {}".format(y, z, x)) |
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
# Q3 | |
def output(case_num, result): | |
print("Case #{}: {}".format(case_num, str(result))) | |
t = int(input()) | |
MIN = 2 | |
MAX = 999 |
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
#!/bin/bash | |
# https://developer.github.com/v3/pulls/#create-a-pull-request | |
if [[ -f replace-l5d-proxy.vim ]] | |
then | |
echo "remove ./replace-l5d-proxy.vim" | |
exit 1 | |
fi |
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
#!/bin/bash | |
# This script uses the command line Journal called jrnl (http://maebert.github.io/jrnl/) | |
# in combination with Dayone (http://dayoneapp.com/) and Dropbox. If you just want to use a different | |
# journal change the JOURNAL variable. | |
JOURNAL=dayone | |
if [[ -z $1 || $1 == -m ]] | |
then | |
echo "Creating morning template and adding it to jrnl" |
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 numpy as np | |
from scipy import stats | |
class KNearestNeighbor(object): | |
""" a kNN classifier with L2 distance """ | |
def __init__(self): | |
pass |
OlderNewer