Skip to content

Instantly share code, notes, and snippets.

View lpfann's full-sized avatar

Lukas Pfannschmidt lpfann

View GitHub Profile
@lpfann
lpfann / sensors.yaml
Created October 22, 2020 10:06
DM Toiletpaper Stock Sensor for HomeAssistant
# Replace STORE_ID with your store id, as found here https://gist.github.com/marco79cgn/23ce08fd8711ee893a3be12d4543f2d2#gistcomment-3498812
- platform: command_line
name: Toiletpaper
unit_of_measurement: "Stock"
command: curl "https://products.dm.de/store-availability/DE/availability?dans=595420,708997,137425,28171,485698,799358,863567,452740,610544,846857,709006,452753,879536,452744,485695,853483,594080,504606,593761,525943,842480,535981,127048,524535&storeNumbers=STORE_ID" | jq '[.storeAvailabilities[][].stockLevel] | add'
scan_interval: 3600
@lpfann
lpfann / codes.tex
Created May 10, 2020 07:44
Encoding Vegetables and Fruits as Code 128 to use them in grocy (with additional BarcodeBuddy mode switches at the end)
\documentclass[9pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{forloop}
\usepackage{pstricks}
\usepackage{pst-barcode}
\usepackage{caption}
\usepackage{multicol}
\usepackage{microtype}
\setlength{\columnsep}{3cm}
@lpfann
lpfann / Intcomp.jl
Created December 9, 2019 16:02
Intcode computer for advent of code 2019, day 9
module Intcomp
const OFFSET = 1 # offset for 1 based indexing in julia
export compute
mutable struct Computer{T<:Int64}
memory::Array{T,1}
pointer::UInt32
base::Int32
input::Union{T,Channel,Nothing}
[tool.poetry]
name = "fri"
version = "7.0.0-Beta"
description = "Implementation of Feature Relevance Bounds method to perform Feature Selection and further analysis."
authors = ["Lukas Pfannschmidt <lukas@lpfann.me>"]
license = "MIT"
repository = "https://github.com/lpfann/fri"
homepage = "https://fri.lpfann.me"
keywords = ["feature selection","linear models","machine learning"]
classifiers = [
@lpfann
lpfann / .block
Created August 24, 2016 21:43
morph radient curve
license: gpl-3.0
@lpfann
lpfann / keybase.md
Last active January 27, 2017 09:40
keybase.md

Keybase proof

I hereby claim:

  • I am lpfann on github.
  • I am mirek (https://keybase.io/mirek) on keybase.
  • I have a public key ASDOjeJUZz1yI5SQOTyZqRmqtUCtZiqfWyVXFqvwpWJI1go

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am mir3k on github.
  • I am mirek (https://keybase.io/mirek) on keybase.
  • I have a public key whose fingerprint is 71B9 2EEC CD06 6912 F8BC 3B64 60D6 AD87 643B 06F4

To claim this, I am signing this object: