Skip to content

Instantly share code, notes, and snippets.

View bieli's full-sized avatar

Marcin Bielak bieli

View GitHub Profile
@bieli
bieli / GpxToGEOJsonConverter.py
Last active July 16, 2017 03:21
GpxToGEOJsonConverter
import glob
import gpxpy
import gpxpy.gpx
from geojson import Feature, LineString, FeatureCollection
from datetime import datetime
class GpxToGEOJsonConverter:
def to_timestamp(self, dt, epoch=datetime(1970, 1, 1)):
td = dt - epoch
@bieli
bieli / gist:01a553f93aad492114f7
Last active August 29, 2015 14:25
CRC64 + Python
# http://code.activestate.com/recipes/259177-crc64-calculate-the-cyclic-redundancy-check/
#
# Initialisation
# 32 first bits of generator polynomial for CRC64
# the 32 lower bits are assumed to be zero
POLY64REVh = 0xd8000000L
CRCTableh = [0] * 256
CRCTablel = [0] * 256
isInitialized = False
#------------------------------------------------------------------------------#
# OFFICIAL UBUNTU REPOS #
#------------------------------------------------------------------------------#
###### Ubuntu Main Repos
deb http://pl.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
###### Ubuntu Update Repos
deb http://pl.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
@bieli
bieli / gist:3349134
Created August 14, 2012 13:11 — forked from huberflores/tsungconf.as
Tsung Cluster Configuration
#Install on each Node
$ su
#Perl Templating-Toolkit and the Gnu plotting utility to create HTML and graphical reports with the result data set.
$ apt-get install gnuplot-nox libtemplate-perl libhtml-template-perl libhtml-template-expr-perl
#download Tsung
#http://tsung.erlang-projects.org/dist/
@bieli
bieli / gist:1191162
Created September 3, 2011 13:12
ttt
SELECT id, created_at, text FROM statuses "
"WHERE user_id = %s ORDER BY created_at DESC LIMIT %s
http://10.1.1.10:8888/statuses/home_timeline.json?screen_name=marquise.stromanb