Python Programming
-
Odoo in a root-less container
The main workstation running Fedora 31 now, devoid of any trace of python2, I had to either spin up a virtual machine (which I happily did in the past using qemu and kvm [no libvirt or GNOME Boxes]) or get the hands dirty on containers this time to develop on Odoo [1] version 10 which depends on python2. Faced with the challenge^Wopprotunity, I started to learn to use containers.
Never tried to use docker, even though I am familiar with its technology and at times I wanted to try and have hands on experience on the technology. Fast forward, podman and buildah came along with the possibility to run root-less containers and they’re available in Fedora.
-
3 handy command-line internet speed tests
Speedtest is an old favorite. It's implemented in Python, packaged in Apt, and also available with pip. You can use it as a command-line tool or within a Python script.
-
Python Program to Convert Octal Number to Decimal and vice-versa
The octal numeral system, or oct for short, is the base-8 number system and uses the digits 0 to 7. The main characteristic of an Octal Numbering System is that there are only 8 distinct counting digits from 0 to 7 with each digit having a weight or value of just 8 starting from the least significant bit (LSB).
In the decimal number system, each digit represents the different power of 10 making them base-10 number system.
-
Using SQLAlchemy with Flask and PostgreSQL
Databases are a crucial part of modern applications since they store the data used to power them. Generally, we use the Structured Query Language (SQL) to perform queries on the database and manipulate the data inside of it. Though initially done via dedicated SQL tools, we've quickly moved to using SQL from within applications to perform queries.
Naturally, as time passed, Object Relational Mappers (ORMs) came to be - which enable us to safely, easily and conveniently connect to our database programmatically without needing to actually run queries to manipulate the data.
One such ORM is SQLAlchemy. In this post, we will delve deeper into ORMs and specifically SQLAlchemy, then use it to build a database-driven web application using the Flask framework.
-
Python Program To Reverse a Sentence
-
How to pad/fill a string by a variable in Python using f-strings
I often find myself Googling for this. Always a little bit embarrassed that I can't remember the incantation (syntax).
-
Add Styles To Templates - Building SaaS #42
In this episode, I added a CSS framework, Tailwind CSS. After working through some issues with the log out feature, we started to style the base template of the site.
To stay true to my “make the minimum possible thing that will work,” I added Tailwind CSS from a CDN, content delivery network.
-
Refund policy for Attendees and Financial Aid recipients traveling to PyCon internationally
International travel to the United States has become a greater risk for many in our community. In light of current conditions, PyCon would like to highlight the support we provide for international travelers. If you are travelling internationally to PyCon, take note of the following information. Financial Aid applicants should take note of additional information specific to that process in the second section.
-
Create a project to track total sales at different locations with the Python program
In the previous posts, we have gone through a project which will receive the user input and commit those data into the earning table. This program has been further modified to include the plotting of a bar chart to indicate the total sales of various inventories in various locations.
This project has been uploaded to this site, you can download the source code of this project for free through this link. If you like this project, don’t forget to award me with stars on the same project page or share the project page with friends!
-
Python Program to Convert Binary Number to Decimal and Vice-Versa
A binary number is a number expressed in the base-2 numeral system or binary numeral system, which uses only two symbols 0 and 1.
The decimal numeral system is the standard system for denoting integer and non-integer numbers.
All decimal numbers can be converted to equivalent binary values and vice versa for example, the binary equivalent of “2” is “10” to explore more visit binary to decimal converter.
In this article, we will create python programs for converting a binary number into decimal and vice versa
-
Using MySQL’s LOAD DATA with Django
While attempting to improve performance of bulk inserting data into MySQL database my coworker came across the LOAD DATA SQL statement. It allows you to read data from a text file (in a comma separated variable-like format) and quickly insert it into a table. There’s two variations of it, a local remote version. We did not experiment with the local version since we were connecting to a remote MySQL server and did not have access to the database’s local disk.
-
Cleanly removing a Django app (with models)
While pruning features from our product it was necessary to fully remove some Django apps that had models in them. If the code is just removed than the tables (and some other references) will be left in the database.
-
Rename Files in Python: A Guide with Examples using os.rename()
In this post, we are going to work with Python 3 to rename files. Specifically, we will use the Python module os to rename a file and rename multiple files.
First, we will rename a single file in 4 easy steps. After that, we will learn how to rename multiple files using Python 3. To be able to change the name of multiple files using Python can come in handy. For example, if we have a bunch of data files (e.g., .csv files) with long, or strange names, we may want to rename them to make working with them easier later in our projects (e.g., when loading the CSV files into a Pandas dataframe).
- Login or register to post comments
- Printer-friendly version
- 3573 reads
- PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
digiKam 7.7.0 is releasedAfter three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release. |
Dilution and Misuse of the "Linux" Brand
|
Samsung, Red Hat to Work on Linux Drivers for Future TechThe metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world. Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility. |
today's howtos
|
Recent comments
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago