Skip to content

Instantly share code, notes, and snippets.

View amotl's full-sized avatar

Andreas Motl amotl

  • $PYTHONPATH
View GitHub Profile
@amotl
amotl / README.md
Last active March 1, 2020 23:53
Installing Kotori 0.22.7 on Ubuntu 18.04.2

The attached script kotori-virtualenv-fix.sh will mitigate installation problems on Ubuntu 18.04.2 we learned about in the course of daq-tools/kotori#7.

Thanks a bunch for bearing with us, TheOneWhoKnocks96!


@amotl
amotl / debian-enable-unattended-upgrades.sh
Last active March 16, 2022 21:27
Enable Debian Unattended Security Upgrades
#!/bin/bash
set +ex
# Get target email address from STDIN
STDIN=$(cat -)
# File to place custom configuration parameters into
CUSTOM_CONFIG_FILE=/etc/apt/apt.conf.d/80custom
@amotl
amotl / README.md
Last active June 19, 2019 23:23
Reading the HX711 using SPI

Author: [robert-hh], [@robert-hh]

Source: https://forum.micropython.org/viewtopic.php?f=16&t=2678&start=10#p29735

For interest, I also made a driver using SPI. In that case, MOSI is used as the clock signal. The SPI clock signal is not used. It was made for a LoPy, so it will not immediately run on other MicroPython hardware, YMMV. The interesting parts are the data structures for clock and the lookup table for fast transformation.

The reason for using SPI was, that the ESP32 - just like the ESP8266 - is not good

@amotl
amotl / puias-computational.repo
Last active January 15, 2020 21:08
PUIAS Computational Source
[PUIAS_6_core_Base]
name=PUIAS core Base $releasever - $basearch
baseurl=http://puias.math.ias.edu/data/puias/$releasever/$basearch/os
#mirrorlist=http://puias.math.ias.edu/data/puias/$releasever/$basearch/os/mirrorlist
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puias
[PUIAS_6_core_Updates]
name=PUIAS core Updates $releasever - $basearch
@amotl
amotl / README.rst
Created January 19, 2020 11:23
Node-RED flow to forward OVMS location information to OwnTracks
@amotl
amotl / README.rst
Last active August 28, 2024 14:09
Acquire compressed Parquet files from archive.sensor.community and store into InfluxDB

SC Parquet to InfluxDB

About

Acquire compressed Parquet files from archive.sensor.community and store into InfluxDB

Data source

@amotl
amotl / microhttp
Last active February 18, 2020 09:31
Minimal HTTP client based on netcat
#!/bin/sh
#
# Send HTTP request with minimal dependencies, suitable to run on BusyBox.
# Requirements: "sed" and "nc" (netcat).
#
# Synopsis::
#
# microhttp POST http://john:acme@httpbin.org/post "foo=bar&baz=qux"
#
@amotl
amotl / test_mockhttp_stream.py
Last active March 23, 2020 15:56
Multiple HTTP writes / HTTP streaming example for improving Mocket socket mock framework
"""
Demonstrate HTTP streaming to Mocket's "mockhttp".
https://github.com/mindflayer/python-mocket
The error is::
self = <mocket.mockhttp.Request object at 0x108cf74c0>, data = b'POST /api/data HTTP/1.0\r\n'
def __init__(self, data):
> _, self.body = decode_from_bytes(data).split('\r\n\r\n', 1)
@amotl
amotl / epaper_http_png.cpp
Last active September 25, 2023 14:07
Unfinished spike to load PNG via HTTP and display on e-Paper display with ESP32
/*
Unfinished spike to load PNG via HTTP and display on e-Paper display with ESP32.
Please fill in teh gaps. Currently, it will probably not even compile.
The primitives have been taken from:
- https://github.com/lagunax/ESP32-upng
- https://github.com/ZinggJM/GxEPD2/blob/master/examples/GxEPD2_GFX_Example/BitmapDisplay.cpp
*/
@amotl
amotl / dwd_description_pdf.py
Created July 7, 2020 23:37
Parse description PDF files from DWD CDC server
"""
Setup::
pip install PyPDF2 tabulate
Synopsis::
python dwd_description_pdf.py
"""
import re