I hereby claim:
- I am cestella on github.
- I am cstella (https://keybase.io/cstella) on keybase.
- I have a public key whose fingerprint is 50E6 D91A 3DBC 81BC B07C A91A 4B40 C1AF D0D2 850C
To claim this, I am signing this object:
| #!/bin/sh | |
| WORK_DURATION=$(echo "60 $1 * p" | dc) | |
| PLAY_DURATION=$(echo "60 $2 * p" | dc) | |
| echo "WORK DURATION: $WORK_DURATION seconds" | |
| echo "PLAY DURATION: $PLAY_DURATION seconds" | |
| while : | |
| do | |
| echo "WORKING FOR $1 minutes" | |
| sleep $WORK_DURATION && \ | |
| echo "^G" && \ |
| #!/bin/bash | |
| BRANCH_NAME=$1 | |
| shift | |
| for project in $@;do | |
| pushd $project >& /dev/null | |
| MAX=""; | |
| MIN=""; | |
| CURR_FILE=""; |
I hereby claim:
To claim this, I am signing this object:
(The circles are just for illustrating purposes)
Here's a d3 plugin that allows you to create a polygon selection. You instantiate it just like d3.svg.brush.
var brush = d3.svg.polybrush();It has an extra public method that 'brush' does not, and that's 'isWithinExtent(x, y)'. You can use this method to test if a given point falls within the drawn extent.
if (brush.isWithinExtent(x, y)) {
console.log("I'm inside!");
}d3 scatterplot example using the Breakfast Cereal Dataset from http://idvbook.com and based on the scatterplot example at http://bl.ocks.org/mbostock/3887118
| from flask import Flask | |
| from flask import request,jsonify | |
| import socket | |
| app = Flask(__name__) | |
| @app.route("/apply", methods=['GET']) | |
| def predict(): | |
| h = request.args.get('host') | |
| r = {} | |
| if h == 'yahoo.com' or h == 'amazon.com': |
| import sklearn | |
| import numpy as np | |
| import math | |
| import pickle | |
| import collections | |
| class DGA: | |
| def __init__(self): | |
| self.model = { 'clf': pickle.loads(open('./dga_model_random_forest.model','rb').read()) | |
| , 'alexa_vc': pickle.loads(open('./dga_model_alexa_vectorizor.model','rb').read()) | |
| , 'alexa_counts': pickle.loads(open('./dga_model_alexa_counts.model','rb').read()) |
| package com.notmetron.stellar; | |
| import org.apache.metron.common.dsl.Context; | |
| import org.apache.metron.common.dsl.ParseException; | |
| import org.apache.metron.common.dsl.Stellar; | |
| import org.apache.metron.common.dsl.StellarFunction; | |
| import java.util.List; | |
| public class TimeFunction { |