Skip to content

Instantly share code, notes, and snippets.

osroca / metadata.json
Last active Jul 5, 2019 — forked from jaor/metadata.json
Anomalies above/below threshold
View metadata.json
"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",
"name": "dataset-id",
"type": "dataset-id",
"description": "Anomaly to use"
osroca /
Last active Sep 22, 2016
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 /
Last active Aug 29, 2015 — forked from ashenfad/
Dynamic Scatterplot - Autos

Dynamic scatterplot of the 1985 automobiles dataset.


  • 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


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

osroca / browser_train.csv
Last active Aug 29, 2015
Mini Predictive App based on User Agent
View browser_train.csv
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
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
html, body{
height: 100%;
*, *:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
osroca / index.html
Last active Sep 19, 2017
Testing BigML ( modeling and predictions with JQuery
View index.html
<!doctype html>
<html lang="en">
<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="" type="text/javascript"></script>
View fif.js
// Documented by Stoyan Stefanov:
(function() {
var url = '';
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;
View JsonHxDef.hx
typedef JsonObj = {
typedef Glossary = {
typedef GlossDiv = {
osroca / gist:4327517
Last active Sep 2, 2016
[How to] embed javascript libraries into the mongo shell
View gist:4327517