Tag: python

Python & PID Controlled Magnetic Levitation

It can be tough to find detailed information about electromagnetic simulations online – at least as things stand in the present internet. Where information is present it is provided in some standard form as outlined by textbooks and it is not always immediately apparent how this textbook knowledge can be translated into implementations. In this article, I build a very simple and maybe inaccurate PID control system that very superficially pretends to run on a microcontroller. To support this, since I don’t have a real system to test on, I outline a very quick and dirty approach to modeling electromagnetic levitation of a set of coils above a track using python and a recently developed package: Magpylib.

Using Python to Automate Narration of a 14 Century Book

Recently, I encountered a problem. The problem is that of time. I have been trying to read an English translation of a book published in 1377 AD by Ibn Khaldun entitled the Muqaddimah. Muqaddimah however has no audio book.and the book sits at roughly a thousand pages of text. I, being one of those lazy folks, like to multi-task somewhat in order to get my reading done. So while I walk to and from work, I’d like to be able to read without the requisite dangers of being run over by a car.

Public IP Changing? Python DDNS for Self-hosting

In an earlier article I made the case that it doesn’t really make financial sense to both register your domain and host your website with a provider such as GoDaddy. The method presented in this article assumes that your home modem’s IP address is a dynamically assigned public IP address. This kind of dynamic IP address has a habit of changing on a regular basis – on a daily to monthly basis – based on some set of rules implemented by your ISP. This is the case for which this article presents a solution.

Data-Scraping Weather Data from Web Search

My goal today is to try and do some data-scraping using google to grab some basic weather data. Though of-course this could also be applicable to any webpage and expanded quite easily beyond weather data. I’ll show two different approaches using a direct approach and another approach that controls a browser (via Selenium) to get access to the data after all dynamic HTML data has been rendered.

Extracting ZIP and JSON Data using Python!

Are you one of those paranoid people who is terrified that an insane calamity is just around the corner? Are you obsessively checking the world news waiting for the moment that you can spring into action? Well, why not harness that obsessiveness, be productive at the same time and check out if your country’s power […]