This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./adb shell | |
run-as the.package.of.the.application | |
cd /data/data/dthe.package.of.the.application/databases | |
chmod 777 TheDatabase.db | |
cp TheDatabase.db /mnt/sdcard/ | |
./adb pull /mnt/sdcard/TheDatabase.db |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def extract_hr_from_polar_csv(filename): | |
# read header and data | |
h = pd.read_csv(filename, nrows=2) | |
d = pd.read_csv(filename, skiprows=2) | |
# parse start time | |
datetime_string = h["Date"].values[0] + " " + h["Start time"].values[0] | |
starttime = datetime.strptime(datetime_string, '%d-%m-%Y %H:%M:%S') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# colorpages_printstring.bash | |
# | |
# Tool to print only color pages from a PDF (duplex). | |
# Generates a string to be used for common printing dialogs which only contains pages (back and front) with color. | |
# | |
# usage: colorpages_printstring <your>.pdf | |
# | |
# requirements: ghostscript (gs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/python -p | |
import time | |
import subprocess | |
import threading | |
""" | |
This is a class for blinking the onboard ACT LED on the Raspberry PI 3 based on | |
shell commands. There should be a way to do this via GPIO, but for me it did not | |
work so far. Here are some relevant links for blinking via GPIO: | |
* https://kofler.info/on-board-leds-des-raspberry-pi-steuern/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A small script for labelling music files (mp3) with their BPMs via filename. | |
# | |
# requires | |
# * bpm-tools | |
# * libsox-fmt-mp3 | |
# | |
# usage: | |
# | |
# # get BPM of a file labels |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* <p>Shows how files in the class path can be accessed when using the standard | |
* Maven directory layout.</p> | |
* | |
* <p>The test file is "src/test/resources/accessFileOnClasspath/test.txt". | |
* It is accessed using either {@link ClassLoader#getResource(String)} or | |
* {@link ClassLoader#getResourceAsStream(String)}. Note that the file's | |
* path is always relative to the class path's root. Thus the test file is | |
* accessed using "accessFileOnClasspath/test.txt".</p> | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import junit.framework.Assert; | |
import org.junit.Test; | |
public class IntegerValueOf { | |
@Test | |
public void test() { | |
NewerOlder