Python Programming

-
How to control a 4 digit 7 Segment Display from Raspberry PI with Python
4 Digit 7 Segment Display is a simple electronic display, similar to Single 7 segment display, but composed of 4 digits than can show at the same time 4 chars. It also has dot leds, but in different confiurations (single for each digit, central colon, etc).
It is used within a wide number application, usually to diplay time.
Its operation is based on persistence of vision principle: you can drive one digit at time, so you must drive each digit at a speed so that human eye cannot perceive power off moments.
When using 4-digit 7-segment display, please notice that if it is common anode, the common anode pin connects to the power source; if it is common cathode, the common cathode pin connects to the GND. This guide is based on cathode one, nut anode works with the same code by inverting digit selection logic.
-
Talk Python to Me: #263 SEO for developers
As developers and technologists, it's easy to think that powerful and unique ideas will percolate to the top. If we build something amazing, enthusiastic users will find and share our creations.
Sometimes this happens. But more often, success is an iceberg, on so many levels. We are going to look at one of those icebergs on this episode. Join me and Cristian Medina as we discuss SEO, search engine optimization, for developers. Some of your search ranking is out of your control, but as you will see, there are many tools in the developer's toolbox that will directly affect your search rank. Let's dive in!
-
EuroPython 2020: Call for Sponsors
Sponsoring EuroPython guarantees you highly targeted visibility and the opportunity to present yourself and your company in a professional and innovative environment.
We have updated our in-person conference sponsor packages to the new online format and lowered the prices, giving you an excellent opportunity to reach out to attendees and even run your own virtual rooms, text channels, talks and training sessions throughout the conference and sprint days.
You will also be able to post job ads on our website and the conference chat system, as well as get a mention and opportunity to give away digital swag via our virtual exhibit page.
In addition, as a sponsor of EuroPython 2020, you will directly help promote the work of a great open-source community which has become a powerhouse of technological development and innovation.
-
Sailing Past PyCon 2020 - Thoughts on Code and Community
Capital One has been an invaluable and generous supporter of the PSF and PyCon since 2015 and a Principal Sponsor for the last two years. They've stepped forward and made a big investment in PyCon and its community.
We chatted recently with Steven Lott, Lead Software Engineer, about what it was like for a big company like Capital One to migrate to Python 3. Here is what he had to say.
-
python-box-dict-object-duality
So, like any Python developer who likes to play with these things, I tried to write a class that would implement object attribute access and dict indexing at the same time. The latter should allow for using as input for yaml.dump() and json.dump() transparently.
I wrote 110 lines of heavily tested code. All went fine until I found a bug in __deepcopy__() that meant to, once more, do recursion in case of lists or other dicts. To be honest, I have a lot of work load right now, and I didn't have the energy to factor out this recursing code from other methods.
Meanwhile, a few weeks ago I saw a new package in Debian called python-box, which promised implementing exactly that. I wrote a note about testing it and moved on. This looked like the right moment to do exactly that.
-
How to Move a Django Model to Another App
If you’ve ever thought about refactoring your Django app, then you might have found yourself needing to move a Django model around. There are several ways to move a Django model from one app to another using Django migrations, but unfortunately none of them are straightforward.
Moving models between Django apps is usually a very complicated task that involves copying data, changing constraints, and renaming objects. Because of these complications, the Django object-relational mapper (ORM) does not provide built-in migration operations that can detect and automate the entire process. Instead, the ORM provides a set of low-level migration operations that allow Django developers to implement the process themselves in the migration framework.
-

- Login or register to post comments
Printer-friendly version- 2118 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 released
After 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 Tech
The 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
|








.svg_.png)
Content (where original) is available under CC-BY-SA, copyrighted by original author/s.

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