
Python and SQLite
Create a Table if it Does not Exist:
Create a Table if it Does not Exist:
This is the basic code to make an API request of the OpenAI API with Python. Make sure to install the OpenAI Python Package.
This class shows you how to use regex to match specific patterns such as email addresses, ip addresses and MAC addresses in strings
This class shows you how to strip out characters from strings to prevent injection attacks, and to format the text so that yo can store clean data.
This class explains the basic concepts of filtering user input with Python and why it matters. The lab shows how to create a loop that requests text that is formatted properly for the scripts needs.
This class shows you how to use the OS Module to interact with the operating system and gain access to applications and tools that reside on the OS.
This class shows you how to use REST API’s in Python. You will get variable values from one API and pass it to another. NOTE: (ERROR) rest-text.py requests-copy.py location-json.py pretty-json.py json-module.py
This class will teach yo how to use Try Statements. This allows you to try to take an action with an API, or OS command and if it does not work then do something else.
This class shows you how to make your scripts more interactive for users with the input() function, argparse module and shebangs.
This class teaches you how to write and use custom functions in Python.
File Modes: write.py web.py text.py read.py file-path.py path-cwd.py example.py data.txt
This class shows you how to use Lists and Dictionaries in Python. basic-list.py list-sort.py add-remove-list.py split-list.py basic-dict.py add-remove-dict.py nested-list.py
This class teaches you to use venv Virtual Environments with Python.
This class will teach you the basics of using Modules, Functions and PIP in Python.
This class will teach you about While and For loops in Python.
This class shows you how to write if/else if/ else statements with numbers and strings.
example.py
Setup: This is a Free REST API so you just need the URL. Please note that there is a rate limit of one request per second. https://www.macvendorlookup.com 1-mac.py This lab will print out the vendor […]
Setup: 1-transcript.py This lab pulls the YouTube Transcript for a video and prints it out as both JSON, and plain text. 2-gpt.py This lab summarizes a YouTube video, and creates Tags using ChatGPT. 3-timecode.py This […]
WARNING: “Fair Use” is not a global right. It is an American concept that does not have a corresponding legal concept in many countries. Even in the United States Fair Use is not set in […]
1-state.py This code retrieves alerts about a state and then prints them to the screen. Using the JSON module you can format the JSON response into a “pretty” format so that its easier to understand […]
WARINING: “Fair Use” is not a global right. It is an American concept that does not have a corresponding legal concept in many countries. Even in the United States Fair Use is not set in […]
API Websites: Code: This code will get your external IP Address, and then use that to find geographic information.
Setup: Create Images with DALL E: Download DALL E Images: Edit Image with DALL E: Create Variation of Image with DALLE:
This class shows you how to use Python to interact with the ChatGPT API and create your own AI powered apps. openai-streamed.py openai-nonstreamed.py openai-autoblog.py
With this project we create an IoT Environmental control device that uses a MariaDB (MySQL) database as the datastore. This allows you to use database functionality to create log files and be able to corrrelate […]
In this project we are going to use an Arduino to get the room temperature, and be able to turn on a regular house fan. The Arduino sends the temperature value to the Raspberry Pi […]
With Thonny you can easily begin to code Python Scripts on Raspberry Pi OS. Thonny is a very simple Python IDE that is easy to learn.