Skip to content

Instantly share code, notes, and snippets.

@osroca
osroca / metadata.json
Last active July 5, 2019 15:04 — forked from jaor/metadata.json
Anomalies above/below threshold
{
"name": "Anomalies above threshold",
"kind": "script",
"description": "Creates an anomaly detector and a dataset with all the anomalies above or below a given threshold",
"source_code": "script.whizzml",
"inputs":[
{
"name": "dataset-id",
"type": "dataset-id",
"description": "Anomaly to use"
@osroca
osroca / README.md
Last active September 22, 2016 09:48
Insuline histogram

A visualization of blood insuline from the UCI diabetes dataset. The distribution is stored with a streaming histogram. Brush to zoom. Click to zoom out.

@osroca
osroca / README.md
Last active August 29, 2015 14:06 — forked from ashenfad/README.md
Dynamic Scatterplot - Autos

Dynamic scatterplot of the 1985 automobiles dataset.

Controls:

  • Left click to choose X-axis.
  • Right click to choose Y-axis.
  • Alt + right click to choose color axis.
  • Repeat click (left, right, or alt) for log scale.
  • Hover over a point to see all field values.
  • Click a multi-point (larger circle) to cycle through values.

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@osroca
osroca / browser_train.csv
Last active August 29, 2015 13:57
Mini Predictive App based on User Agent
We can't make this file beautiful and searchable because it's too large.
user_agent,color,browser,browser version,os,os version,device
"Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36",Green,Chrome,33.0.1750,Linux,,Other
"Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36",Green,Chrome,32.0.1700,Windows 8,,Other
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36",Yellow,Chrome,32.0.1700,Windows 7,,Other
"Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36",Red,Chrome,33.0.1750,Windows XP,,Other
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36",Red,Chrome,32.0.1700,Mac OS X,10.9.1,Other
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36",Yellow,Chrome,33.0.1750,Mac OS X,10.9.1,Other
"Mozilla/5.0 (Windows NT 6.1) AppleW
@osroca
osroca / index.html
Created February 23, 2014 16:09 — forked from aficionado/index.html
<!DOCTYPE html>
<meta charset="utf-8">
<style>
html, body{
height: 100%;
}
*, *:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
@osroca
osroca / index.html
Last active September 19, 2017 21:02
Testing BigML (bigml.io) modeling and predictions with JQuery
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>BigML Prediction Test</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script src="https://code.jquery.com/jquery-1.7.1.js" type="text/javascript"></script>
@osroca
osroca / fif.js
Created October 26, 2013 12:19 — forked from jasdeepkhalsa/fif.js
// Documented by Stoyan Stefanov: https://www.facebook.com/note.php?note_id=10151176218703920
(function() {
var url = 'http://example.org/js.js';
var iframe = document.createElement('iframe');
(iframe.frameElement || iframe).style.cssText =
"width: 0; height: 0; border: 0";
iframe.src = "javascript:false";
var where = document.getElementsByTagName('script')[0];
where.parentNode.insertBefore(iframe, where);
var doc = iframe.contentWindow.document;
typedef JsonObj = {
glossary:Glossary,
}
typedef Glossary = {
title:String,
GlossDiv:GlossDiv,
}
typedef GlossDiv = {
@osroca
osroca / gist:4327517
Last active September 2, 2016 16:44
[How to] embed javascript libraries into the mongo shell