Skip to content

Instantly share code, notes, and snippets.

View lukasklein's full-sized avatar
👀
Facebook is it you?

Lukas Klein lukasklein

👀
Facebook is it you?
View GitHub Profile

Keybase proof

I hereby claim:

  • I am lukasklein on github.
  • I am lukasklein (https://keybase.io/lukasklein) on keybase.
  • I have a public key whose fingerprint is 0644 F2A9 A924 0DDE 10E5 C97A FCF5 689D D8B3 A124

To claim this, I am signing this object:

@lukasklein
lukasklein / flacduration.py
Created June 30, 2016 14:03
Returns the duration of a FLAC file in seconds
import struct
def bytes_to_int(bytes: list) -> int:
result = 0
for byte in bytes:
result = (result << 8) + byte
return result
def get_flac_duration(filename: str) -> float:
import requests
class DatacakeApi:
api_token = None
api_base = 'https://api.datacake.co/v1'
def __init__(self, api_token):
self.api_token = api_token
def post(self, path, data):
const widget = new ListWidget();
await createWidget();
if(!config.runsInWidget) {
await widget.presentSmall();
}
Script.setWidget(widget);
Script.complete();
async function createWidget() {