This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change the ./ and ".jpg" part to your own needs. | |
# The `| numfmt --to=si` part get human readable output, remove it to get a number of bytes. | |
find ./ -type f -name "*.jpg" -printf "%s\n" | gawk -M '{t+=$1}END{print t}' | numfmt --to=si |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/env python3 | |
# -*- coding: utf-8 -*- | |
import os | |
import json | |
import subprocess | |
from base64 import b64decode | |
from haralyzer import HarParser, HarPage | |
from dateutil import parser as dateparser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Defining some lists for convenience | |
weekdays = [ | |
"monday", | |
"tuesday", | |
"wednesday", | |
"thursday", | |
"friday", | |
] | |
weekend = ["saturday", "sunday"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pylab import * | |
def ax_add_comment(ax, comment, fontsize=10, x=.5,y=.97): | |
try: | |
ax.commenttext.remove() # We avoid writing it over itself repeatedly | |
except: | |
pass | |
if not hasattr(ax, "plot3D"): | |
ax.commenttext = ax.text(x, y, comment, horizontalalignment='center', verticalalignment = 'top', fontsize=fontsize, transform=ax.transAxes) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Trying to do a PID for the daikin | |
# | |
# This is a WIP prototype. Only heating was tested. | |
# Using log.error because I can't seem to be able to find how to read other log levels. | |
from random import choices | |
ENABLED = True # Disabled if False. If true, the PID takes over when the Daikin is on. | |
target_temp = 22.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,01,00,3a,00,00,00,00,00 | |
; Data = 00000000 00000000 0200000000 01003A00 00000000 | |
; 0x00000000 Header: Version. Set to all zeroes. | |
; 0x00000000 Header: Flags. Set to all zeroes. | |
; 0x00000002 Two entries in the map (including null entry). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
; Created by: Shawn Brink | |
; Created on: January 13, 2023 | |
; Tutorial: https://www.elevenforum.com/t/enable-or-disable-show-battery-estimated-time-remaining-in-windows-11.11885/ | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power] | |
"EnergyEstimationDisabled"=dword:00000001 | |
"UserBatteryDischargeEstimator"=dword:00000001 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
; Created by: Shawn Brink | |
; Created on: January 13, 2023 | |
; Tutorial: https://www.elevenforum.com/t/enable-or-disable-show-battery-estimated-time-remaining-in-windows-11.11885/ | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power] | |
"EnergyEstimationDisabled"=- | |
"UserBatteryDischargeEstimator"=- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def dBm2Volt(dBm, impedance=50): | |
"""If A * sin(wt) --> X dBm, this function takes X and returns A""" | |
return (2*impedance/1000)**0.5*10**(dBm/20) |
OlderNewer