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
  • 13:08 (UTC +03:00)
View GitHub Profile
@OrenBochman
OrenBochman / new_ubuntu.sh
Created January 17, 2018 21:16 — forked from borfast/new_linux.sh
A script to automatically install as much software as possible for my Ubuntu/Linux Mint development workstation
#!/bin/bash
## Assuming Linux Mint 18. Should also mostly work with Ubuntu 16.04
## Installing .deb packages could be done in a single go if I added the
## necessary repositories beforehand but this way the script is more
## modular and I can comment out any sections if I want to.
## TODO: install Prey
## TODO: Rewrite this with Salt/Ansible?
@OrenBochman
OrenBochman / remove-docker-containers.md
Created August 6, 2017 10:19 — forked from ngpestelos/remove-docker-containers.md
How to remove unused Docker containers and images
  1. Delete all containers

     $ docker ps -q -a | xargs docker rm
    

-q prints only the container IDs -a prints all containers

Notice that it uses xargs to issue a remove container command for each container ID

  1. Delete all untagged images
@OrenBochman
OrenBochman / LogUtil.java
Created March 9, 2017 20:46 — forked from dors/LogUtil.java
Cool log util for Android apps that prints each log with the thread, class name and method name from which the log was made
import android.util.Log;
import java.text.MessageFormat;
/*
* Copyright 2015 Dor Sakal
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@OrenBochman
OrenBochman / TagSpider.py
Created January 9, 2017 11:02 — forked from cspenn/TagSpider.py
GA/GTM Tag Checker in Python and Scrapy
# -*- coding: utf-8 -*-
# Copyright Christopher S. Penn, 2016 | cspenn.com | @cspenn
# This software is licensed under the GNU General Public License, version 3.0.
# Absolutely no warranty or support is provided.
# Run at your own risk.
import scrapy
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule
@OrenBochman
OrenBochman / introrx.md
Created November 4, 2016 07:55 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@OrenBochman
OrenBochman / gist:43030557ad904d090a4641f4bfd0aca4
Created May 6, 2016 08:18 — forked from debasishg/gist:8172796
A collection of links for streaming algorithms and data structures
  1. General Background and Overview
@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#
#
#
# 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 / 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.
@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]