filenames

This commit is contained in:
Tyrel Souza 2022-10-17 15:14:02 -04:00
parent fa53ba313f
commit 5bd8eef77d
No known key found for this signature in database
GPG Key ID: F6582CF1308A2360
21 changed files with 15 additions and 15 deletions

View File

@ -9,7 +9,7 @@ Vertical Bars In Graphite
I am working with txStatsD and Graphite. I was having the hardest problem looking through the txStatsD code today finding how to graph something as an event, not a data point. I eventually went into every option on the graphite dashboard and found an option to make a bar. I am working with txStatsD and Graphite. I was having the hardest problem looking through the txStatsD code today finding how to graph something as an event, not a data point. I eventually went into every option on the graphite dashboard and found an option to make a bar.
.. figure:: {static}/images/2012/02/2012-02-08_graphite_menu.png .. figure:: {static}/images/2012/02/graphite-menu.png
:alt: menu in graphite showing draw nonzero as infinite :alt: menu in graphite showing draw nonzero as infinite
This is the option that you must use when you want to mark events. For example we want to know “Server restarted”, we would use this technique, as it doesnt make sense to aggregate “server restarted”. Using nonzero as infinite is a good way to show an event took place. This is the option that you must use when you want to mark events. For example we want to know “Server restarted”, we would use this technique, as it doesnt make sense to aggregate “server restarted”. Using nonzero as infinite is a good way to show an event took place.

View File

@ -11,21 +11,21 @@ It's no lie that I love terminals. I wish I could live on a terminal and never r
Last night I migrated a lot of my old code from one GitLab account to another (`tyrelsouza <https://gitlab.com/tyrelsouza>`__ to `tyrel <https://gitlab.com/tyrel>`__) in an effort to clean up some of my usernames spread across the world. While doing that I noticed my `django-dbfilestorage <https://gitlab.com/tyrel/django-dbfilestorage>`__ Python module that has been sitting and rotting for three years. I played around a little bit in order to port it to Python 3.9, but I ran into some base64 errors. I tried a little bit but it was late and I couldn't figure it out. My resolve is that I have been away from Python for too long so the little things - that I knew and love - had fallen away. I mentioned this to my friend Alex and he said *"make a barebones github cli (readonly?) with issue viewer, and stats display"*. I've embarked on a journey to refresh my Python well enough to repair DBFS. Last night I migrated a lot of my old code from one GitLab account to another (`tyrelsouza <https://gitlab.com/tyrelsouza>`__ to `tyrel <https://gitlab.com/tyrel>`__) in an effort to clean up some of my usernames spread across the world. While doing that I noticed my `django-dbfilestorage <https://gitlab.com/tyrel/django-dbfilestorage>`__ Python module that has been sitting and rotting for three years. I played around a little bit in order to port it to Python 3.9, but I ran into some base64 errors. I tried a little bit but it was late and I couldn't figure it out. My resolve is that I have been away from Python for too long so the little things - that I knew and love - had fallen away. I mentioned this to my friend Alex and he said *"make a barebones github cli (readonly?) with issue viewer, and stats display"*. I've embarked on a journey to refresh my Python well enough to repair DBFS.
.. figure:: {static}/images/2021/11/2021-11-04_alex_prompt.png .. figure:: {static}/images/2021/11/github_cli-alex_prompt.png
:alt: Me: "okay python frioends, what should I make as a quick refresher into the Python world?" alex: "maybe: barebonx github cli (reasdonly?) with issue viewer and stats display" :alt: Me: "okay python frioends, what should I make as a quick refresher into the Python world?" alex: "maybe: barebonx github cli (reasdonly?) with issue viewer and stats display"
I knew I wanted to use ``httpx`` as my network client library, it's new, fast, and I have a couple friends who work on it. I started with a barebones ``requirements.in`` file, tossed in ``invoke``, ``pytes``\ t, and ``black``. From there I used ``pip-compile`` to generate my ``requirements.txt`` - (a tip I picked up recently while adding Pip-Compile support to the `Tidelift CLI <https://tidelift.com/cli>`__) and I was good to go. I knew I wanted to use ``httpx`` as my network client library, it's new, fast, and I have a couple friends who work on it. I started with a barebones ``requirements.in`` file, tossed in ``invoke``, ``pytes``\ t, and ``black``. From there I used ``pip-compile`` to generate my ``requirements.txt`` - (a tip I picked up recently while adding Pip-Compile support to the `Tidelift CLI <https://tidelift.com/cli>`__) and I was good to go.
The `docs for the GitHub API <https://docs.github.com/en/rest/overview/resources-in-the-rest-api#schema>`__ are pretty easy to read, so I knew all I really needed to do was set my ``Accept`` header to be Version3 and I could view the schema. With the schema saved to a ``.json`` file I then wrote a ``GHub`` class to pull this data down using ``httpx.client.Client.get``, super simple! The only two endpoints I care about right now are the user and repos endpoints, so I made two ``get_`` functions for each. After a little bit of work - which I won't bore you with the super intricate details - I have a functional cli.py file. For now, the only interaction is a propmt from ``rich`` for a username, and then you get a fancy table (also from ``rich``) of the first page of results of repos, stargazer/watchers/forks counts, and a description. The `docs for the GitHub API <https://docs.github.com/en/rest/overview/resources-in-the-rest-api#schema>`__ are pretty easy to read, so I knew all I really needed to do was set my ``Accept`` header to be Version3 and I could view the schema. With the schema saved to a ``.json`` file I then wrote a ``GHub`` class to pull this data down using ``httpx.client.Client.get``, super simple! The only two endpoints I care about right now are the user and repos endpoints, so I made two ``get_`` functions for each. After a little bit of work - which I won't bore you with the super intricate details - I have a functional cli.py file. For now, the only interaction is a propmt from ``rich`` for a username, and then you get a fancy table (also from ``rich``) of the first page of results of repos, stargazer/watchers/forks counts, and a description.
.. figure:: {static}/images/2021/11/2021-11-04-01_prompting_and_table.png .. figure:: {static}/images/2021/11/github_cli-prompting_and_table.png
:alt: Prompting for the username and showing my table of repositories. :alt: Prompting for the username and showing my table of repositories.
Prompting for the username and showing my table of repositories. Prompting for the username and showing my table of repositories.
It was a fun evening of learning what's changed in Python3 since I last touched it, especially as I've spent the majority of my career in Python2.7. Type annotations are super awesome. I'll probably pick it up again once I get some more free time later in the week. It's also nice blog fodder! I already have a million things I want to do next - pagination, caching, some more interaction. It was a fun evening of learning what's changed in Python3 since I last touched it, especially as I've spent the majority of my career in Python2.7. Type annotations are super awesome. I'll probably pick it up again once I get some more free time later in the week. It's also nice blog fodder! I already have a million things I want to do next - pagination, caching, some more interaction.
.. figure:: {static}/images/2021/11/2021-11-04_pytest_running.png .. figure:: {static}/images/2021/11/github_cli-pytest_running.png
:alt: Showing py.test running :alt: Showing py.test running
Showing py.test running Showing py.test running

View File

@ -11,14 +11,14 @@ I bought a house on October 9, 2020. This house has a garage door, and like any
One of the first things I did when I moved into my house was research some automation. I initially bought a half dozen `ESP8266 devices <https://www.amazon.com/gp/product/B07HF44GBT/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1>`__ and tried to figure out what I could do with them. I found Home Assistant and set that up on my server computer, along with ZoneMinder for security cameras. One of the first things I did when I moved into my house was research some automation. I initially bought a half dozen `ESP8266 devices <https://www.amazon.com/gp/product/B07HF44GBT/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1>`__ and tried to figure out what I could do with them. I found Home Assistant and set that up on my server computer, along with ZoneMinder for security cameras.
.. figure:: {static}/images/2022/01/2022-01-09_nodemcu_esp8266_module.jpg .. figure:: {static}/images/2022/01/garage-nodemcu_esp8266_module.jpg
:alt: NodeMCU ESP8266 module :alt: NodeMCU ESP8266 module
NodeMCU ESP8266 module NodeMCU ESP8266 module
I knew I would need some sort of relay (domain purchased from is gone) and `reed switches <https://www.amazon.com/gp/product/B00LYCUSBY/>`__ to trigger the door and sense its position, so I purchased some from the internet. But my friend Paul said all I needed was a `MOSFET <https://www.amazon.com/gp/product/B071J39678/>`__ so I bought one of those too. I tried to figure out how to trigger the door with a mosfet, but I was never able to. I won't document those failures. I knew I would need some sort of relay (domain purchased from is gone) and `reed switches <https://www.amazon.com/gp/product/B00LYCUSBY/>`__ to trigger the door and sense its position, so I purchased some from the internet. But my friend Paul said all I needed was a `MOSFET <https://www.amazon.com/gp/product/B071J39678/>`__ so I bought one of those too. I tried to figure out how to trigger the door with a mosfet, but I was never able to. I won't document those failures.
.. figure:: {static}/images/2022/01/2022-01-09_magnetic_reed_switch.png .. figure:: {static}/images/2022/01/garage-magnetic_reed_switch.png
:alt: Magnetic Reed Switch :alt: Magnetic Reed Switch
:figclass: wp-image-183 :figclass: wp-image-183
@ -31,7 +31,7 @@ Home Assistant has a plugin called ESPHome where you can write yaml files to con
Relay in blue, and wires going to the NodeMCU Relay in blue, and wires going to the NodeMCU
.. figure:: {static}/images/2022/01/2022-01-09_Garage_door_schematic.png .. figure:: {static}/images/2022/01/garage-Garage_door_schematic.png
:alt: Schematic :alt: Schematic
Schematic Schematic
@ -46,7 +46,7 @@ I plugged the 1ACH and GND cables in and hooked them on the +/- wires where they
I was very pleasantly surprised when I saw some movement on the A0 line! I was very pleasantly surprised when I saw some movement on the A0 line!
.. figure:: {static}/images/2022/01/2022-01-09_pulses_180ms_140ms.png .. figure:: {static}/images/2022/01/garage-pulses_180ms_140ms.png
:alt: Pulses of about 180ms and 140ms :alt: Pulses of about 180ms and 140ms
:figclass: wp-image-184 :figclass: wp-image-184
@ -90,7 +90,7 @@ Once the door was opening and closing, I was able to add more yaml to set anothe
All together this is shown on my Home Assistant Lovelace dashboard using two cards, one that shows a closed door, and one with an open door (both actual pictures of the door!) with a button to open it. Once it opens or closes the other card switches into place, Home Assistant at least at the time didn't have good conditional cards like I wanted. All together this is shown on my Home Assistant Lovelace dashboard using two cards, one that shows a closed door, and one with an open door (both actual pictures of the door!) with a button to open it. Once it opens or closes the other card switches into place, Home Assistant at least at the time didn't have good conditional cards like I wanted.
.. figure:: {static}/images/2022/01/2022-01-09_Lovelace_Card_-_garage_door_closed.png .. figure:: {static}/images/2022/01/garage-Lovelace_garage_door_closed.png
:alt: Closed door state and button :alt: Closed door state and button
Closed door state and button Closed door state and button

View File

@ -101,7 +101,7 @@ I don't believe any of this code will be useful to anyone outside of my research
The DearPyGUI steps are out of scope of this blog post, but here is my `final ebook Reader <https://gist.github.com/tyrelsouza/9c6681850fc00bf5d9f35568faf611d4>`__ which is super inefficient! The DearPyGUI steps are out of scope of this blog post, but here is my `final ebook Reader <https://gist.github.com/tyrelsouza/9c6681850fc00bf5d9f35568faf611d4>`__ which is super inefficient!
.. figure:: {static}/images/2022/06/2022-06-01_ebook_reader.png .. figure:: {static}/images/2022/06/ebook-ebook_reader.png
:alt: final ebook reader, chapters on left, text on right :alt: final ebook reader, chapters on left, text on right
I figure the Dedication page is not *as* copywrited as the rest of the book, so it's fair play showing that much. Sarah J Maas, if you have any issues, I can find another book for my screenshots. I figure the Dedication page is not *as* copywrited as the rest of the book, so it's fair play showing that much. Sarah J Maas, if you have any issues, I can find another book for my screenshots.

View File

@ -40,5 +40,5 @@ After this, I send a SIGUSR1 (kill -10) to take the picture which is then saved,
This is then copied to the image that is served by the web page, and also backed up in a directory that nginx will listen to. This is then copied to the image that is served by the web page, and also backed up in a directory that nginx will listen to.
.. figure:: {static}/images/2022/06/2022-06-02_bl2cam.jpg .. figure:: {static}/images/2022/06/bl2cam-leds.jpg
:alt: Leds on a CO2 tank :alt: Leds on a CO2 tank

View File

@ -26,19 +26,19 @@ Was talking to someone about CSS Nostalgia and "back in my day" when scrollbar c
Firefox and Chrome have different selectors, so in order to support the majority of browsers, you need both. Firefox and Chrome have different selectors, so in order to support the majority of browsers, you need both.
.. figure:: {static}/images/2022/10/2022-10-13-chrome_scrollbar.png .. figure:: {static}/images/2022/10/scrollbar-chrome.png
:alt: Safari with a blue/purple scrollbar :alt: Safari with a blue/purple scrollbar
:width: 940px :width: 940px
:height: 688px :height: 688px
Safari with a blue/purple scrollbar Safari with a blue/purple scrollbar
.. figure:: {static}/images/2022/10/2022-10-13_safari_scrollbar.png .. figure:: {static}/images/2022/10/scrollbar-safari.png
:alt: Chrome with a blue/purple scrollbar :alt: Chrome with a blue/purple scrollbar
Chrome with a blue/purple scrollbar Chrome with a blue/purple scrollbar
.. figure:: {static}/images/2022/10/2022-10-13_firefox_scrollbar.png .. figure:: {static}/images/2022/10/scrollbar-firefox.png
:alt: Firefox with a blue/purple scrollbar :alt: Firefox with a blue/purple scrollbar
Firefox with a blue/purple scrollbar Firefox with a blue/purple scrollbar

View File

@ -3,7 +3,7 @@ Comparing Go GORM and SQLX
:author: tyrel :author: tyrel
:category: Tech :category: Tech
:tags: go, sql, python :tags: go, sql, python
:status: published :status: draft
Django ORM - My History Django ORM - My History
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 149 KiB

After

Width:  |  Height:  |  Size: 149 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 150 KiB

View File

Before

Width:  |  Height:  |  Size: 259 KiB

After

Width:  |  Height:  |  Size: 259 KiB

View File

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

View File

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 130 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 595 KiB

After

Width:  |  Height:  |  Size: 595 KiB

View File

Before

Width:  |  Height:  |  Size: 557 KiB

After

Width:  |  Height:  |  Size: 557 KiB

View File

Before

Width:  |  Height:  |  Size: 573 KiB

After

Width:  |  Height:  |  Size: 573 KiB