Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Massimo Santini mapio

🎯
Focusing
Block or report user

Report or block mapio

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
@mapio
mapio / HOWTO-ML4A-OSX-GPU.md
Last active Nov 22, 2016
How to install the required libs for ML4A on OS X with GPU support
View HOWTO-ML4A-OSX-GPU.md

How to setup a virtualenv for ml4a on OS X with GPU support

Requirements

This is tested on OS X 10.11.6 running on a MacBook Pro with NVIDIA GeForce GT 750M as of Tuesday, November 22, 2016; if you are note sure about your system, run

sw_vers
@mapio
mapio / install_firma.sh
Last active Oct 16, 2017
Installa "firma" nel file .bashrc
View install_firma.sh
#!/bin/bash
rc="$HOME/.bashrc"
jars="$HOME/.labprog-jars"
if [ ! -w "$rc" ]; then
echo "Attenzione, il file .bashrc non era presente, l'installazione potrebbe fallire"
fi
if grep -q "### labprog-firma (non cancellare questa riga e le seguenti)" "$rc"; then
@mapio
mapio / LexicographicListComparator.java
Last active May 3, 2016
A List Comparator implementing Lexicographic order
View LexicographicListComparator.java
import static org.junit.Assert.assertEquals;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import org.junit.Test;
public class LexicographicListComparator {
@mapio
mapio / query_atm_stop
Last active Mar 24, 2019
A tool to query ATM stops
View query_atm_stop
#!/bin/bash
if ! type jq >/dev/null 2>&1; then
echo >&2 "$(basename $0): please install https://stedolan.github.io/jq/ first."
exit 1
fi
if [ -z "$1" ]; then
echo >&2 "$(basename $0): plase provide stop number (see http://giromilano.atm.it/)"
exit 1
@mapio
mapio / 30.svg
Last active Jan 20, 2016
The Hasse diagram of the divisibility graph
View 30.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View docker_machine_relocate.py
from json import loads, dumps
from base64 import b64decode, b64encode
def relocate( conf_data, old_path, new_path ):
def rdt( dct ):
for k, v in dct.items():
if isinstance( v, dict ):
rdt( v )
else:
@mapio
mapio / b2
Last active Dec 6, 2015
A bash_completion file for b2
View b2
have b2 &&
_b2 () {
local _b2_subcommands=(
'authorize_account'
'clear_account'
'create_bucket'
'delete_bucket'
'delete_file_version'
'download_file_by_id'
'download_file_by_name'
@mapio
mapio / (Sort of) busy wait workaround for SpeechSynthesisUtterance.onend bug.markdown
Created Nov 29, 2015
(Sort of) busy wait workaround for SpeechSynthesisUtterance.onend bug
View (Sort of) busy wait workaround for SpeechSynthesisUtterance.onend bug.markdown
View Sudoku.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.