Category: Python 3

Pygame, a game dev framework for Python 3

I mentioned in a previous post that one of my goals for 2023 was to program 12 games to help keep my programming brain limber and my skills sharp. I also mentioned that I suspect most of my dev work for that goal will be in Python 3: that’s what my shop mostly uses, it’s flexible, and it’s what I’m comfortable with.

Luckily, Pygame exists and is great for the types of games that I’ll be working on as part of my goal. And…there are plenty of tutorials out there so I won’t struggle too much.

At the beginning of every year, rather than…

…making formal new year resolutions, I set a list of goals. Most I have no intention of fully completing but they allow me to have something to look forward to and structure my “wants” against my “needs” and actual availability haha…

I try not to limit myself and what goes on the list can range from the must-do to the super-superfluous.

One of my goals for 2023 is to improve my programming skills and, really, just keep them sharp since I’m in a leadership position that doesn’t really allow me to dive into the hands-on, individually contributing, technical aspects of the work we do.

What better way to keep programming skills sharp than to program games? So, 2023 goal #3 is to program 12 games. I’m stating at the outset that my intent is to be language-agnostic though I suspect most, if not all, will be in Python 3. May even take a crack at racing the beam with some Atari 2600 assembly programming.

Without further ado, let me introduce game #0, Pong-23.

I had a helluva fun time working on it over Christmas break. It doesn’t really count towards the 12 game goal since I finished it the penultimate day of 2022, but it helped get my brain limber. Let’s figure out what’s next!

Pong gameplay screenshot
Pong gameplay screenshot

ChatGPT’s all the rage now, of course…

Some ideas to run by ChatGPT Assistant for Python automation help: https://medium.com/geekculture/hey-chatgpt-solve-these-coding-tasks-using-python-b2e7482f2c18

To save a link click, basically boils down to:

  1. Ask Assistant to plot a linear regression
  2. Use pywhatkit to send a message on WhatsApp
  3. Use smtplib to send an email
  4. Scrape data from Books to Scrape using Beautiful Soup.
  5. Finally, generate an Excel file use openpyxl.

Basic PyGame template

One of my goals for 2023 is to write one game per month to keep my programming skills from getting too rusty. I created a baseline PyGame template to help w/ some of the repetitive tasks that come w/ that goal.

Clone it from my Github here.

Paranoid Android, or How I Built a Twitter Bot and Lost a Little Bit of Faith In Humanity

The setup

I lied – this post isn’t going to be about how I built the Twitter bot. There are dozens of half-way decent tutorials scattered across the web and even a couple of decent ones and you’re welcome to exercise your DuckDuckGo-Fu or Google-Fu and figure it out.

Instead, this will be about my experience wading into the collective dumpster fire/garbage pit that is Twitter with some simple automation.

Continue reading “Paranoid Android, or How I Built a Twitter Bot and Lost a Little Bit of Faith In Humanity”

Twitter sentiment analyzer using Tweepy, TextBlob, MariaDB, SQLAlchemy and dataset

I found a fairly decent online tutorial for creating a Twitter sentiment analyzer. Though helpful, I didn’t find that it was particularly intuitive, put together fairly well or workable in Python 3.

So, I took the concepts and substantial amount of the code and started fixing, modifying and rewriting…

Continue reading “Twitter sentiment analyzer using Tweepy, TextBlob, MariaDB, SQLAlchemy and dataset”

%d bloggers like this: