Language Selection

English French German Italian Portuguese Spanish

Python Programming

Filed under
Development
  • Return people from a list and dictionary with Python

    In this article, we are going to return a list of names that show whether that person is nice or naughty based on True (Nice) or False (Naughty) value from the ‘was_nice’ key within a list of dictionaries pass into either the get_nice_names function which will only return the name of a person who is nice or get_naughty_names function which will do vise versa.

  • Python 101 – Learning About Loops

    There are many times when you are writing code that you will need to find a way to iterate over something. Perhaps you’ll need to iterate over the letters in a string or the objects in a list. The process of iterating over something is done via a loop.

    A loop is a programming construct that allows you to iterate over chunks. Those chunks could be the letters in the string or the lines of a file.

  • Data visualization made simple in Python with Seaborn

    Plotting in Seaborn is much simpler than in Matplotlib. While Matplotlib makes the hard things possible, Seaborn makes complicated things uncomplicated by giving you a range of plot types that "just work."

  • A simple Python HTTP server for your sysadmin toolbox
  • Qt for Python 5.15.0 is out!

    Hello everyone! We are really happy to announce that Qt for Python 5.15.0 is now out! 

    As always, you can get the latest via: pip install pyside2, or just upgrading your current installation: pip install -U pyside2.

    At the same time we wanted to release another version for users still on 5.14, so we decided to release 5.14.2.2 too. You can get it via pip install pyside2==5.14.2.2

More in Tux Machines

Star Lite Mk III and Purism GNU/Linux Laptops

  • Star Lite Mk III Linux Laptop Is Now Available for Pre-Order from Star Labs

    Star Labs just informed me today that they’ve launched the pre-orders for the lightweight Star Lite Mk III Linux laptop from only $428 USD. Featuring a lightweight design with a redesigned chassis, the Star Lite MK III Linux laptop features an 11.6-inch LED-backlit Arc IPS matte display with Full HD (1920×1080) resolution and 16:9 aspect ration, which users offers glare-free viewing thanks to the a hard coat that also boasts durability. Under the hood, the Linux laptop is powered by a 1.1GHz Quad-Core Intel Pentium Silver N5000 processor that can go as high as 2.7GHz when boosted and promises up to 29% performance increase. It also features 8GB 2400MHz LPDDR4 RAM for up to 33% faster memory. It also features Intel UHD 605 graphics, a fanless design, a smoother glass trackpad, improved audio system, backlit keyboard, as well as an ultra-fast 240GB over-provisioned Star Drive SSD with up to 560MB/s read speeds and up to 540MB/s write speeds.

  • The next generation of the Purism Linux laptop is on its way

    For most Linux desktop users who want a ready-to-run Linux laptop, I recommend the latest high-end Dell XPS 13. I can also suggest System76 or ZaReason PCs or laptops for those who want top-of-the-line Linux hardware. But if privacy, security, and free software are at the top of your "Want" list, then you should check out Purism, maker of free software and Linux-powered laptops, and its next-generation Librem 14 laptop.

Mozilla: Firefox Startup Cache, Security of Passwords, and Servo

  • Improving Firefox Startup Time With The about:home Startup Cache

    We’re working on a thing to make Firefox start faster! It appears to work! Here’s a video showing off a before (left) and after (right): Improving Firefox Startup Time With The about:home Startup Cache For the past year or so, the Firefox Desktop Front-End Performance team has been concentrating on making improvements to browser startup performance. The launching of an application like Firefox is quite complex. Meticulous profiling of Firefox startup in various conditions has, thankfully, helped reveal a number of opportunities where we can make improvements. We’ve been evaluating and addressing these opportunities, and several have made it into the past few Firefox releases. This blog post is about one of those improvements that is currently in the later stages of development. I’m going to describe the improvement, and how we went about integrating it. In a default installation of Firefox, the first (and only) tab that loads is about:home.

  • A look at password security, Part II: Web Sites

    In part I, we took a look at the design of password authentication systems for old-school multiuser systems. While timesharing is mostly gone, most of us continue to use multiuser systems; we just call them Web sites. In this post, I’ll be covering some of the problems of Web authentication using passwords. As I discussed previously, the strength of passwords depends to a great extent on how fast the attacker can try candidate passwords. The nature of a Web application inherently limits the velocity at which you can try passwords quite a bit. Even ignoring limits on the rate which you can transmit stuff over the network, real systems — at least well managed ones — have all kinds of monitoring software which is designed to detect large numbers of login attempts, so just trying millions of candidate passwords is not very effective. This doesn’t mean that remote attacks aren’t possible: you can of course try to log in with some of the obvious passwords and hope you get lucky, and if you have a good idea of a candidate password, you can try that (see below), but this kind of attack is inherently somewhat limited. [...] Leaked passwords aren’t the only threat to password authentication on Web sites. The other big issue is what’s called phishing. In the basic phishing attack, the attacker sends you an e-mail inviting you to log into your account. Often this will be phrased in some scary way like telling you your account will be deleted if you don’t log in immediately. The e-mail will helpfully contain a link to use to log in, but of course this link will go not to the real site but to the attacker’s site, which will usually look just like the real site and may even have a similar domain name (e.g., mozi11a.com instead of mozilla.com). When the user clicks on the link and logs in, the attacker captures their username and password and can then log into the real site. Note that having users use good passwords totally doesn’t help here because the user gives the site their whole password. Preventing phishing has proven to be a really stubborn challenge because, well, people are not as suspicious as they should be and it’s actually fairly hard on casual examination to determine whether you are on the right site. Most modern browsers try to warn users if they are going to known phishing sites (Firefox uses the Google Safe Browsing service for this). In addition, if you use a password manager, then it shouldn’t automatically fill in your password on a phishing site because password managers key off of the domain name and just looking similar isn’t good enough. Of course, both of these defenses are imperfect: the lists of phishing sites can be incomplete and if users don’t use password managers or are willing to manually cut and paste their passwords, then phishing attacks are still possible

  • This Week In Servo 132

    In the past week, we merged 64 PRs in the Servo organization’s repositories. The latest nightly builds for common platforms are available at download.servo.org.

today's howtos

Today in Techrights