Skip to content

Instantly share code, notes, and snippets.

View f3flight's full-sized avatar

Dmitrii Sutiagin f3flight

View GitHub Profile
@f3flight
f3flight / graph_temperature.py
Last active May 22, 2025 00:18
Plot and log temperature on Raspberry PI connected to one or more DS18B20 sensors
#!/usr/bin/env python3
"""
Script for Raspberry PI to plot and record data from DS18B20 sensors.
To run it:
1. python3 -m venv my_venv
2. source my_venv/bin/activate
3. pip install aiofiles plotext
4. ./graph_temperature.py --help
@f3flight
f3flight / pyproject.toml
Last active October 14, 2023 00:10
gist-for-poetry-bug-report
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "somepackage"
version = "1.2.3"
description = "test"
authors = ["test <test@test.com>"]
@f3flight
f3flight / nokogiri cygwin
Created January 12, 2020 01:38 — forked from ianmariano/nokogiri cygwin
nokogiri cygwin
Make sure libxml2-devel, libxslt-devel and libiconv-devel are installed:
$ gem install nokogiri -- --use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xml2-lib=/usr/lib --with-xslt-dir=/usr/include/libxslt --with-iconv-include=/usr/include --with-iconv-lib=/usr/lib
noarch=$1
pkg_line=$(dpkg --get-selections | grep -v 'deinstall' | cut -f1)
mapfile -t policy < <(apt-cache policy $pkg_line)
[[ $? -ne 0 ]] && exit 1
num_lines=${#policy[@]}
num_pkgs=$(echo $pkg_line | wc -w)
i=0
declare -A repo_installed
declare -A repo_updates
while [[ $i -le $num_lines ]]