Skip to content

Instantly share code, notes, and snippets.

View lorenzoriano's full-sized avatar

Lorenzo Riano lorenzoriano

  • Industrial Next
  • San Francisco
View GitHub Profile
@lo-scozzese
lo-scozzese / garmin_json.py
Last active January 14, 2024 12:57
Python script to convert Garmin weight data from JSON format to CSV, and also display a matplotlib chart
#%% import dependencies
# Python script to convert Garmin weight data from JSON format to CSV, and also display a matplotlib chart.
# Save Garmin data as 'garmin.json' in the same directory as this python file.
import json, time, os, sys
import datetime as dt
from matplotlib import pyplot as plt
@schlady
schlady / peakdetect.py
Created January 7, 2012 21:18 — forked from sixtenbe/analytic_wfm.py
Peak detection in Python
import numpy as np
def peakdetect(y_axis, x_axis = None, lookahead = 500, delta = 0):
"""
Converted from/based on a MATLAB script at http://billauer.co.il/peakdet.html
Algorithm for detecting local maximas and minmias in a signal.
Discovers peaks by searching for values which are surrounded by lower
or larger values for maximas and minimas respectively