Skip to content

Instantly share code, notes, and snippets.

View Parsiuk's full-sized avatar
🙀
No clue man, no clue o_O

Maciek Klasa Parsiuk

🙀
No clue man, no clue o_O
View GitHub Profile
@Parsiuk
Parsiuk / import.py
Created July 8, 2023 05:39
Import weight info from FirBit data export into MariaDB/MySQL database.
import json
import os
import pymysql
from datetime import datetime
def pounds_to_kilograms(weight_in_pounds):
return weight_in_pounds * 0.45359237
def convert_date(date_str):
date_obj = datetime.strptime(date_str, "%m/%d/%y")

Keybase proof

I hereby claim:

  • I am parsiuk on github.
  • I am parsiuk (https://keybase.io/parsiuk) on keybase.
  • I have a public key ASDuqABOKG046Cx19Mw7HIuLwemXR-O1a6D_KdR7_ZuAKgo

To claim this, I am signing this object:

#include <Keypad.h>
int ledPin = 13;
const byte ROWS = 4;
const byte COLS = 3;
char keys[ROWS][COLS] = {
{
'1', '2', '3' }
,
{
@Parsiuk
Parsiuk / temp.sh
Created July 13, 2019 12:35
RaspberryPi 4 temperature logging
#!/bin/bash
# Run this script in cron, for example:
# */5 * * * * /home/user/temp.sh >> /home/user/temp_log.tsv
timestamp=`date "+%Y/%m/%d %H:%M:%S"`
temperature=`sudo cat /sys/class/thermal/thermal_zone0/temp`
cpu_frequency=`sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq`