This file contains 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
/* | |
* Master Bathroom environmental sensor | |
* | |
* Intended for IoT Home Automation projects involving the Master Bathroom. | |
* | |
* The current circuit: | |
* | |
* - Arduino MKR WiFi 1010 | |
* - Arudiono MKR ENV Shield attached | |
* |
This file contains 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
import time | |
import board | |
import adafruit_ahtx0 | |
# Create the sensor object using I2C | |
sensor = adafruit_ahtx0.AHTx0(board.I2C()) | |
while True: | |
#temp = (sensor.temperature * 9.0/5.0) + 32 | |
temp = sensor.temperature * 1.8 + 32 |
This file contains 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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/home/username/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |
This file contains 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
╰─$ toolbox create -vv 1 ↵ | |
DEBU Running as real user ID 1000 | |
DEBU Resolved absolute path to the executable as /usr/bin/toolbox | |
DEBU Running on a cgroups v2 host | |
DEBU Checking if /etc/subgid and /etc/subuid have entries for user ermesa | |
DEBU TOOLBOX_PATH is /usr/bin/toolbox | |
DEBU Toolbox config directory is /home/ermesa/.config/toolbox | |
INFO[0000] podman filtering at log level debug | |
DEBU[0000] Called version.PersistentPreRunE(podman --log-level debug version --format json) | |
DEBU[0000] Reading configuration file "/usr/share/containers/containers.conf" |
This file contains 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
in forms.py: | |
def create_user_choices(): | |
users = User.objects.get_queryset() | |
return [(user, f"{user.first_name} {user.last_name}") for user in users] | |
class RandomizeForm(forms.Form): | |
def __init__(self, *args, **kwargs): | |
super(RandomizeForm, self).__init__(*args, **kwargs) |
This file contains 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
############## Kodi CRASH LOG ############### | |
################ SYSTEM INFO ################ | |
Date: Sun Jan 16 15:26:28 EST 2022 | |
Kodi Options: | |
Arch: x86_64 | |
Kernel: Linux 5.13.16-200.fc34.x86_64 #1 SMP Mon Sep 13 12:39:36 UTC 2021 | |
Release: Freedesktop.org 21.08.9 (Flatpak runtime) | |
############## END SYSTEM INFO ############## |
This file contains 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
pip install --upgrade -v eldonationtracker | |
Using pip 22.1.2 from /home/ermesa/Programming Projects/python/test_pip/venv/lib64/python3.10/site-packages/pip (python 3.10) | |
Requirement already satisfied: eldonationtracker in ./venv/lib/python3.10/site-packages (7.3.0) | |
Collecting eldonationtracker | |
Using cached eldonationtracker-7.4.3-py3-none-any.whl (114 kB) | |
Requirement already satisfied: xdgenvpy==2.3.5 in ./venv/lib/python3.10/site-packages (from eldonationtracker) (2.3.5) | |
Requirement already satisfied: PyQt5-sip<=12.8.9,>=12.8.1 in ./venv/lib/python3.10/site-packages (from eldonationtracker) (12.8.1) | |
Requirement already satisfied: semver==2.9.1 in ./venv/lib/python3.10/site-packages (from eldonationtracker) (2.9.1) | |
Collecting rich==12.4.1 | |
Using cached rich-12.4.1-py3-none-any.whl (231 kB) |
This file contains 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
# async version 1 | |
import asyncio | |
import httpx | |
async def get_weather(city: str, state: str) -> dict: | |
url = f"https://weather.talkpython.fm/api/weather?city={city}&state={state}&country=US&units=imperial" | |
async with httpx.AsyncClient() as client: | |
response = await client.get(url, follow_redirects=True) | |
return response.json() |
This file contains 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
import asyncio | |
import json | |
import os | |
import sys | |
import time | |
from typing import List, Optional, Dict | |
# noinspection PyPackageRequirements | |
import progressbar | |
from dateutil.parser import parse |
This file contains 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
Importing users ... | |
Traceback (most recent call last): | |
File "/home/ermesa/Programming Projects/Python/fastapi_mongodb_class_notes/venv/lib/python3.10/site-packages/beanie/odm/documents.py", line 403, in save | |
return await self.replace(session=session, **kwargs) | |
File "/home/ermesa/Programming Projects/Python/fastapi_mongodb_class_notes/venv/lib/python3.10/site-packages/beanie/odm/actions.py", line 212, in wrapper | |
result = await f(self, *args, skip_actions=skip_actions, **kwargs) | |
File "/home/ermesa/Programming Projects/Python/fastapi_mongodb_class_notes/venv/lib/python3.10/site-packages/beanie/odm/utils/state.py", line 39, in wrapper | |
result = await f(self, *args, **kwargs) | |
File "/home/ermesa/Programming Projects/Python/fastapi_mongodb_class_notes/venv/lib/python3.10/site-packages/beanie/odm/utils/state.py", line 50, in wrapper | |
result = await f(self, *args, **kwargs) |
OlderNewer