Skip to content

Instantly share code, notes, and snippets.

View Main.py
# -*- coding: utf-8 -*-
# NOTE: richiede intallazione di jinja via pip install jinja2
# NOTE: testato su
import urllib.request
import csv
from datetime import datetime
from jinja2 import Template
import io
def cazzillo_text_parser(cazzillotext):
View jupyterlab-docker.md

Run Jupyterlab on docker

Build starting from a Jupyter 2.x image.

Build

docker build -t jupyterlab .
View kml2gpx.py
#!/usr/bin/python
# https://timwise.co.uk/2014/02/03/converting-kml-to-gpx-with-python/
# https://gist.github.com/timabell/8791116
import argparse
import xml.sax
parser = argparse.ArgumentParser(description='Convert annoying google android my tracks kml data to sensible gpx files')
parser.add_argument('input_file')
@gabalese
gabalese / annot2html.py
Last active Dec 16, 2015
Brain-dead simple utility to dump a HTML list out of a Sony Reader annot. db. (Made on a Mac, so it look for a /Volumes/READER mount. I'm way too lazy to amend that to accept a path argv[n])
View annot2html.py
#! /usr/bin/env python
# Brain-dead simple utility to dump a list of annotations from a Sony Reader .db
# Usage: $ python annot2html.py [int number of annot to fetch]
import sys
import sqlite3 as sql
import xml.etree.ElementTree as ET
# Mac-path!
file_db = sql.connect('/Volumes/READER/Sony_Reader/database/books.db')
@vjt
vjt / copy-from-time-machine.sh
Last active May 12, 2021
Copy data from a Time Machine volume mounted on a Linux box.
View copy-from-time-machine.sh
#!/bin/bash
#
# Copy data from a Time Machine volume mounted on a Linux box.
#
# Usage: copy-from-time-machine.sh <source> <target>
#
# source: the source directory inside a time machine backup
# target: the target directory in which to copy the reconstructed
# directory trees. Created if it does not exists.
#
@dvessel
dvessel / gist:1478685
Created Dec 14, 2011
TextMate 2 .tm_properties
View gist:1478685

This is all based on the [alpha release][1].

Properties

From the built-in help system:

For many settings TextMate will look for a .tm_properties file in the current folder and in any parent folders (up to the user’s home folder).

These are simple setting = value listings where the value is a format string in which other variables can be referenced.

@mathiasbynens
mathiasbynens / appify
Created Nov 12, 2010 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
View appify
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh