Category: Python
-
How to find the Parent Element in a page using Python Selenium WebDriver
This is a quick article to show how you can easily get the parent element of an HTML element using Selenium Webdriver with Python. There is more than one way. Let’s suppose that we want to get an HTML button that has no id or unique CSS class from within an HTML page: 1. Getting […]
-
Python Exercise for Beginners – Getting a list of IP addresses to Whitelist for Cloudflare
In today’s video we are going to be working on a real-life Python script for Devops. Many websites in the world today are protected against DDoS attacks by Cloudflare.Cloudflare provides this protection by serving as an intermediary to all traffic from the web. So instead of a website visitor connecting to the server hosting the […]
-
Python Exercises For Beginners – #1 – Sum all integers from Zero to N
Create a Python function that sums all the numbers from 0 to a number N. If a non-positive or a non-integer number is provided, the function should return 0. This Google Colab notebook is part of my “Python Problemns for Beginners” Youtube series: https://youtube.com/playlist?list=PL3OV2Akk7XpC-fsHuJ3RLpnzOXmED7oAI In this video, the first in the series, I show you […]
-
How to Render a Panda Data Frame as HTML
Sometimes it might be useful to convert a Panda Dataframe to HTML. For instance, you might want to render a panda data frame inside a web page, outside Jupyter Notebook. You can do this by calling the df.to_html() function. Where df is the Panda data frame that you would like to render. Let’s first create […]
-
Blender 3D — How to create and render a scene in Blender using Python API
In this article, I will show you how you can create a scene in Blender, using the Python 2.93 Blender API. We will create a simple scene with a plane, a cube, texture, a light source, and a camera. Then I will show you how you can rotate a virtual camera around a cube and […]
-
How to turn 2D photos into a 3D model using Nvidia Kaolin and PyTorch – A 3D Deep Learning Tutorial
If you have read my last article on GANverse3D, then you will probably have heard about the DIB-R paper, which I mentioned a few times. This was a key paper for 3D Deep Learning from 2019. The DIB-R paper introduced an improved differential renderer as a tool to solve one of the most fashionable problems […]
-
How to run Object Detection with Tensorflow Lite and a Raspberry PI to Build a Wildlife camera
What is Tensorflow Lite? As the name indicates Tensorflow Lite is the light version of Tensorflow which is design to run on small devices, like mobile phones, tablets, edge devices like the Raspberry PI and etc. Tensorflow lite is composed of two packages: The interpreter: What you normally use when calling TensorFlow lite for inference […]
-
How to make a Python Bot
I am going to show you what you need to do to create a Python bot of your own by giving you a general recipe that you can extend at your will. What is a Python Bot A Python bot is a script that runs 24/7 hours, without needing to sleep or rest, and can perform […]
-
How to create a 3D spinning donut with Python, Blender, and some Donut-shaped math
If you have been sleeping under a donut… I mean rock, you will not have heard yet of the donut-shaped C code that can generate a 3D spinning donut, projected onto 2D using ASCII characters. And if spinning a donut with ASCII characters is not hard enough, and it clearly wasn’t for Andy Sloane, this […]
-
How to create a Panda Dataframe from an HTML table using pandas.read_html
It is possible to use Panda Dataframes to scrape directly an HTML table from a URL. This can be incredibly useful and a quick way to extract useful data, when you are in a hurry. To see how valuable it is, let’s use a concrete example. Imagine that we want to scrape some information about […]