Skip to content

Instantly share code, notes, and snippets.

View AndrewTheTM's full-sized avatar
🏃‍♂️

Andrew Rohne AndrewTheTM

🏃‍♂️
View GitHub Profile
@hutattedonmyarm
hutattedonmyarm / RungapGPX.py
Last active October 17, 2023 08:48
Rungap for iOS exports GPS data as JSON file in the free version. This script converts it to GPX. Tested with python3.6. Might need to install required modules. Simply place either the metadata and data json files, or the complete zip file in the same directoryas the script and run it. Warning: Does barely any error checking
import xml.etree.cElementTree as ElementTree
import json, pytz, zipfile, unicodedata, re
from datetime import datetime
from os import listdir
from os.path import isfile, join
import glob
def slugify(value):
"""
Normalizes string, converts to lowercase, removes non-alpha characters.
@jennybc
jennybc / reverse-categorical-axis-ggplot2.r
Created October 10, 2014 01:06
Reverse the order of a categorical axis in ggplot2
scale_x_discrete(limits = rev(levels(the_factor)))
@matt-west
matt-west / pearson-correlation.js
Created September 9, 2013 20:24
Pearson Correlation (JavaScript)
/**
* @fileoverview Pearson correlation score algorithm.
* @author matt.west@kojilabs.com (Matt West)
* @license Copyright 2013 Matt West.
* Licensed under MIT (http://opensource.org/licenses/MIT).
*/
/**
* Calculate the person correlation score between two items in a dataset.