Skip to content

Instantly share code, notes, and snippets.

View OrenBochman's full-sized avatar
🏠
Working from home

Oren Bochman OrenBochman

🏠
Working from home
  • WMF
  • 16:21 (UTC +03:00)
View GitHub Profile
set.seed(1234)
dat <- data.frame(x=LETTERS[1:10], y_1=sample(15,10), y_2=sample(150,10))
area2 <- gvisAreaChart(xvar="x", yvar=c("y_1", "y_2"), data=dat,
options=list(
series="[{targetAxisIndex:0},
{targetAxisIndex:1}]",
vAxes="[{viewWindowMode:'explicit',
viewWindow:{min:0, max:10}},
{viewWindowMode:'explicit',
viewWindow:{min:0, max:100}}]",
@OrenBochman
OrenBochman / README.md
Created September 22, 2013 23:39 — forked from mbostock/.block

From Wikipedia:

Epicyclic gearing or planetary gearing is a gear system consisting of one or more outer gears, or planet gears, revolving about a central, or sun gear. … Epicyclic gearing systems also incorporate the use of an outer ring gear or annulus, which meshes with the planet gears.

Use the menu in the top-left to change the frame of reference, fixing the specified gear in-place.

@OrenBochman
OrenBochman / desc.txt
Created October 7, 2013 17:17
logging mediawiki core
https://www.kernel.org/pub/software/scm/git/docs/git-log.html
git log --pretty=format:'%h|%at|%d|%an|%ce|%s' --date=short > log.txt
%h: abbreviated commit hash
%at: author date, UNIX timestamp
%d: ref names, like the --decorate option of git-log(1)
%an: author name
%ce: committer email
%s: subject
@OrenBochman
OrenBochman / index.Rmd
Last active August 29, 2015 14:11 — forked from ramnathv/index.Rmd
two colum markdown format for use exclusively with revealjs
---
title : RevealJS with Bootstrap
framework : revealjs
widgets : [bootstrap] # {mathjax, quiz, bootstrap}
---
## Read-And-Delete
1. Edit YAML front matter
2. Write using R Markdown
@OrenBochman
OrenBochman / tomer.py
Last active August 29, 2015 14:12 — forked from daonb/tomer.py
'''
to make this work you need to have Open-Knesset source and latest db file
from the shell type::
$ python manage.py shell_plus
In [1]: ed tomer.py
'''
import json, urllib2
votes=[6904,7454,6786]
@OrenBochman
OrenBochman / analytics_facebook_dimension_widening.js
Last active August 29, 2015 14:18
google and facebook dimension widening
//facebook tag API allows sending custom data while tracking conversions and custom audiences
window._fbq = window._fbq || []; //required async call for reporting
// Custom Audience - event based tracking for customers who viewed a product in the 'Shoes' category with a price > $100
window._fbq.push(['track', 'ViewProduct', { //custom audience
product_id: 1234, //custom data
category: 'Shoes', //custom data
price: 110 //custom data
}]);
@OrenBochman
OrenBochman / designer.html
Last active August 29, 2015 14:22
designer
<link rel="import" href="../cool-clock/cool-clock.html">
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../core-menu-button/core-menu-button.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
@OrenBochman
OrenBochman / magic_script_modified.js
Created February 14, 2016 15:22 — forked from IronistM/magic_script_modified.js
A mash-up of the Magic Script with Measument protocol hits to track usage of the Spreadsheet and log events. #analytics #drive
/**
* A script to automate requesting data from Google Analytics.
*
* @author [email protected] (Nick Mihailovski)
*/
/**
* The name of the configration sheet.
* And various parameters.
#
# PREDICTING LONG TERM CUSTOMER VALUE WITH BTYD PACKAGE
# Pareto/NBD (negative binomial distribution) modeling of
# repeat-buying behavior in a noncontractual setting
#
# Matthew Baggott, [email protected]
#
# Accompanying slides at:
# http://www.slideshare.net/mattbagg/baggott-predict-customerinrpart1#
#
@OrenBochman
OrenBochman / predicting_customer_behav_1.R
Created February 14, 2016 15:55 — forked from mattbaggott/predicting_customer_behav_1.R
Uses the BTYD package and Pareto/NBD model to predict customer behavior in R Slides are at: http://www.slideshare.net/mattbagg/baggott-predict-customerinrpart1#
#
# PREDICTING LONG TERM CUSTOMER VALUE WITH BTYD PACKAGE
# Pareto/NBD (negative binomial distribution) modeling of
# repeat-buying behavior in a noncontractual setting
#
# Matthew Baggott, [email protected]
#
# Accompanying slides at:
# http://www.slideshare.net/mattbagg/baggott-predict-customerinrpart1#
#