Skip to content

Instantly share code, notes, and snippets.

Avatar

Oscar Rovira osroca

  • Valencia
View GitHub Profile
@osroca
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",
"inputs":[
{
"name": "dataset-id",
"type": "dataset-id",
"description": "Anomaly to use"
@osroca
osroca / README.md
Last active Sep 22, 2016
Insuline histogram
View README.md

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 Aug 29, 2015 — forked from ashenfad/README.md
Dynamic Scatterplot - Autos
View README.md

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.
View GIF-Screencast-OSX.md

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 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">
<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 Sep 19, 2017
Testing BigML (bigml.io) modeling and predictions with JQuery
View index.html
<!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>
View 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;
View JsonHxDef.hx
typedef JsonObj = {
glossary:Glossary,
}
typedef Glossary = {
title:String,
GlossDiv:GlossDiv,
}
typedef GlossDiv = {
@osroca
osroca / gist:4327517
Last active Sep 2, 2016
[How to] embed javascript libraries into the mongo shell
View gist:4327517
You can’t perform that action at this time.