<a class="duf3 aciXEb" href="#" id="sbfblt" data-async-trigger="duf3-46" jsaction="async.u" data-ved="0ahUKEwisrODf1t7oAhWHy6QKHYmbAEsQtw8IDA">Report inappropriate predictions</a>
<a href="#" data-async-trigger="ddlshare" title="Share" jsaction="async.u" data-ved="0ahUKEwisrODf1t7oAhWHy6QKHYmbAEsQ4zgIEA"><div class="dnNgC" style="background-color:#ffffff;border:2px solid #ffffff;opacity:0.800000011920929"></div><input value="//g.co/doodle/w4sr6" class="ddl-shortlink" type="hidden"><input value="//g.co/doodle/1duj2" class="ddl-facebooklink" type="hidden"><input value="//g.co/doodle/gqtwe" class="ddl-twitterlink" type="hidden"><input value="//g.co/doodle/s4vq2" class="ddl-emaillink" type="hidden"><input value="" class="ddl-copylink" type="hidden"><img class="fJOQGe" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAoUlEQVR42mMwnmnMQAZ2AGIQfADFM6FicDXkGnoGiP+j4TPIhpNj8EwshsLwTEoMfoDH4AeDzmBnIL5MalDgi2kZIF6JZMAtYiMPV0yfhVrwGcoH0RVA7EJ
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
const devtools = new WebSocket('ws://localhost:9222/devtools/page/69990451-aaab-4ef8-87b1-ea77b8101b2a'); | |
devtools.onmessage = ({data}) => { | |
const {result: {result: {value}}} = JSON.parse(data); | |
console.log('WebSocket Message Received: ', value) | |
}; | |
devtools.send(JSON.stringify({ | |
id: 1, | |
method: 'Runtime.evaluate', |
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
echo "Creating an SSH key for you..." | |
ssh-keygen -t rsa | |
echo "Please add this public key to Github \n" | |
echo "https://github.com/account/ssh \n" | |
read -p "Press [Enter] key after this..." | |
echo "Installing xcode-stuff" | |
xcode-select --install |
Usage:
$ npx jscodeshift -t https://gist.githubusercontent.com/novemberborn/c2cdc94020083a1cafe3f41e8276f983/raw/eaa64c55dfcda8006fc760054055372bb3109d1c/transform.js test.js
See https://github.com/facebook/jscodeshift#usage-cli for further details.
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 Perceptron(opts) { | |
if (!opts) opts = {} | |
var debug = 'debug' in opts ? opts.debug : false; | |
var weights = 'weights' in opts | |
? opts.weights.slice() | |
: [] | |
var threshold = 'threshold' in opts |
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 * as fs from "fs"; | |
import * as path from "path"; | |
import * as url from "url"; | |
import { exec } from "child_process"; | |
import cuid from "cuid"; | |
import snoowrap from "snoowrap"; | |
import throat from "throat"; | |
import mmm from "mmmagic"; | |
import axios from "axios"; |
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
const http = require('http'); | |
function requestHandler(request, response) { | |
const headers = { | |
'Server-Timing': ` | |
lb=18; "Load Balancer", | |
server-3=104; "Server #3 Startup", | |
db-read=187; "Database Read", | |
aws-download=317; "AWS Content Download", | |
db-write=218; "Database Write", |
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(){ | |
'use strict'; | |
let cap = 100; // 100+ RTs or hearts produces max yellow bg color | |
$('.tweet', '.stream-items').each((i, tweet) => { | |
let all_nums = $(tweet) | |
.find('.ProfileTweet-actionList .ProfileTweet-actionCount:visible') | |
.map((j, elem) => Number(elem.textContent)).toArray(); | |
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/sh | |
for i in trip_data_*.csv.zip | |
do | |
unzip -c $i | |
done | | |
tr -d '\015' | | |
awk -F, '{print $12 "," $11 " 1:0"; print $14 "," $13 " 1:1"}' | | |
/data2/data/github/datamaps/encode -z19 -m1 -o nyc-taxi-all |
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
/*global console */ | |
/* | |
* In this file, we do a search for two non-existent selectors | |
* However the failure of only one of them contains the error we actually want | |
*/ | |
(function() { | |
"use strict"; |