Skip to content

Instantly share code, notes, and snippets.

Michele Orsi micheleorsi

Block or report user

Report or block micheleorsi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
micheleorsi / Dockerfile
Created Feb 26, 2017
Automation in Google Cloud for Kubernetes cluster: terraform + kargo
View Dockerfile
FROM ubuntu:xenial
MAINTAINER "Michele Orsi <>"
# ansible
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN apt-add-repository ppa:ansible/ansible
RUN apt-get update
RUN apt-get install -y ansible
micheleorsi /
Created Oct 10, 2016
Machine Learning with Python for Algorithmic Trading
import numpy as np
import pandas as pd
from pandas_datareader import data as web
from sklearn import linear_model
class ScikitBacktest(object):
def __init__(self,sys):
self.lags = 5
self.symbol = sys
micheleorsi /
Last active Aug 30, 2015
Topojson reference
ogr2ogr -f "GeoJSON" california_geojson.json tl_2010_06_zcta510.shp
topojson -o california_topojson.json california_geojson.json

convert counties and zipcode shapefiles to GeoJson

ogr2ogr -f "GeoJSON" working/counties.geo.json assets/ca/counties.shp
ogr2ogr -f "GeoJSON" working/zipcodes.geo.json source/tl_2010_06_zcta510.shp

# merge two shapefils
micheleorsi / Prepare raspberry for usage with
Last active Sep 18, 2016
Running docker on ARM processor (tested on Raspberry Pi 2 Model B)
View Prepare raspberry for usage with

Flash image to SD card

This is a list of disk images to flash on SD card in order to natively run docker on your Raspberry: hypriot download page:

From command line:

flash --hostname <host-name> <url-to-download-the-os-from>
View gist:801e68a73ceb6cd0d4ef
public boolean solution(int[] A) {
if(isArrayInNonDecreasingOrder(A)) {
return true;
for(int i=0; i<A.length; i++) {
for(int j=0; j < A.length; j++) {
if(i!=j) {
int[] testArray = A.clone();
int tempValue = testArray[i];
micheleorsi / docker
Last active Sep 29, 2015
Quick reference for personal needs
View docker
# Remove all stopped containers.
docker rm $(docker ps -a -q)
# Remove all untagged images
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
View _etc_samba_smb.conf
workgroup = WORKGROUP
server string = %h server
wins support = yes
micheleorsi / _etc_logstash_conf.d_central.conf
Created Jan 22, 2015
Logstash configuration with Google App Engine logs
View _etc_logstash_conf.d_central.conf
input {
file {
type => "gae"
path => ["/home/ubuntu/gae_logs/**/*log"]
tags => ["some","tags"]
stat_interval => 30
discover_interval => 180
micheleorsi / crontab
Last active Aug 29, 2015
Download logs from Google App Engine with appcfg tool
View crontab
# once a day at 23:50
50 23 * * * <full-path>/ -A <gae-application-name> -M <module-name> -V <version-name> --oauth2 --include_all --append -n 1 request_logs <full-path>/`date +\%y-\%m-\%d`.log
# once a day at 23:50
50 23 * * * <full-path>/ -A <gae-application-name> -M <module-name> -V <version-name> --oauth2 --include_all --append -n 1 --severity=2 request_logs <full-path>/`date +\%y-\%m-\%d`-full.log
micheleorsi / nginx.conf
Created Jan 22, 2015
configuration file to proxy and cache requests from a backend
View nginx.conf
worker_processes 4;
events {
worker_connections 1024;
http {
# Basic Settings
You can’t perform that action at this time.