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
# -*- coding: utf-8 -*- | |
# @Author: xuyannis | |
# @Date: 2017-02-25 12:35:15 | |
# @Last Modified by: xuyannis | |
# @Last Modified time: 2017-02-25 13:22:54 | |
import numpy as np | |
from numpy import linalg as la | |
import pandas as pd | |
def cosineSimilarity (vec1, vec2): |
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
{ | |
"engine": 1, | |
"barracks_status_dire": 63, | |
"tower_status_radiant": 0, | |
"match_id": 2887679385, | |
"lobby_name": "Public matchmaking", | |
"start_time": 1483302173, | |
"match_seq_num": 2518934190, | |
"barracks_status_radiant": 0, | |
"cluster": 224, |
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 pacon='sudo networksetup -setautoproxyurl Wi-Fi https://yourproxy.pac' | |
alias pacoff='sudo networksetup -setautoproxyurl Wi-Fi off' |
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 fs = require('fs'), | |
readline = require('readline'); | |
var rd = readline.createInterface({ | |
input: fs.createReadStream('demo.txt'), | |
output: process.stdout, | |
terminal: false | |
}); | |
rd.on('line', function(line) { |
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 downloadURL = function downloadURL(url) { | |
var hiddenIFrameID = 'hiddenDownloader', | |
iframe = document.getElementById(hiddenIFrameID); | |
if (iframe === null) { | |
iframe = document.createElement('iframe'); | |
iframe.id = hiddenIFrameID; | |
iframe.style.display = 'none'; | |
document.body.appendChild(iframe); | |
} | |
iframe.src = url; |
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
function httpGet(theUrl) | |
{ | |
var xmlHttp = null; | |
xmlHttp = new XMLHttpRequest(); | |
xmlHttp.open( "GET", theUrl, false ); | |
xmlHttp.send( null ); | |
return xmlHttp.responseText; | |
} |
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
set nosmoothscroll | |
let scrollduration = 10 | |
let scrollstep = 70 | |
let blacklists = ["https://fengcheco.com/*","https://inbox.google.com/*","https://en.todoist.com/*","https://todoist.com/*"] | |
" Code blocks (see below for more info) | |
getIP() -> {{ | |
httpRequest({url: 'http://api.ipify.org/?format=json', json: true}, |
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
#mysql start | |
alias mysqlstart='sudo /usr/local/mysql/support-files/mysql.server start' | |
alias mysqlstop='sudo /usr/local/mysql/support-files/mysql.server stop' |
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
wget -np -nH -r --span-hosts www.xxx.org/pub/path/ |
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
# update 2014-06-19 18:51 | |
# Section Start: dropbox | |
108.160.166.62 dropbox.com | |
108.160.165.62 dropbox.com | |
205.251.196.138 dropbox.com | |
108.160.166.20 www.dropbox.com | |
108.160.167.204 www.dropbox.com | |
108.160.166.13 www.dropbox.com | |
108.160.165.147 www.dropbox.com | |
108.160.167.208 www.dropbox.com |
NewerOlder