Language Selection

English French German Italian Portuguese Spanish

Programming: Python, Perl and More

Filed under
Development
  • Add a Column to a Pandas DataFrame Based on an If-Else Condition

    When we’re doing data analysis with Python, we might sometimes want to add a column to a pandas DataFrame based on the values in other columns of the DataFrame.

    Although this sounds straightforward, it can get a bit complicated if we try to do it using an if-else conditional. Thankfully, there’s a simple, great way to do this using numpy!

    To learn how to use it, let’s look at a specific data analysis question. We’ve got a dataset of more than 4,000 Dataquest tweets. Do tweets with attached images get more likes and retweets? Let’s do some analysis to find out!

  • Get Started With Django Part 2: Django User Management

    If you finished the first part of this series, then you may already have a lot of ideas for your own Django applications. At some point, you might decide to extend them with user accounts. In this step-by-step tutorial, you’ll learn how to work with Django user management and add it to your program.

  • Django bugfix releases issued: 3.0.8 and 2.2.14

    Today we've issued 3.0.8 and 2.2.14 bugfix releases.

    The release package and checksums are available from our downloads page, as well as from the Python Package Index.

  • Python 101 – Learning About Tuples (Video)

    If you prefer to read rather than watch, then you should check out Python 101 – Learning About Tuples

  • Tryton News: Newsletter July 2020

    A major improvement has landed which reduces memory usage on the server by between 30% and 40% and increases its speed by around 15%.

  • PSF GSoC students blogs: Weekly Check-In #5
  • Perl 7: A Risk-Benefit Analysis

    At the recent Conference in the Cloud for Perl and Raku, Sawyer X (the pumpking of Perl) announced an ambitious plan for Perl 7. Since Perl 6 was renamed to Raku to better communicate its fundamental differences from the well known identity of Perl, major versions are now available again for Perl to leverage, and it is a very important step to show that the language is still developed and used. I completely agree with the motivation and ideals presented, and have thought a lot about the benefits and risks involved in such ideas long before I was aware of this project.

    I do not generally work with ancient code that uses ancient practices. I work with CPAN modules that maintain compatibility with wider or narrower ranges of Perl versions for various reasons. I work with modern code for my own and business use that already will not function on older Perls. I work with newcomers that have written code based on modern Perl tutorials, and newcomers that have written code based on ancient Perl tutorials. It's from this perspective that I evaluate the proposed direction, the stated goal of which is to optimize for new users and active maintainers over abandoned code.

  • The 10 Best Programming Fonts for Developers

    Looking for the best programming fonts? Well, your search ends here as this list of top 10 programming fonts will get you introduced to some of the best available fonts for programming. Just follow this post to know more!

More in Tux Machines

Devices: Axiomtek, RasPi and More

  • Tough Apollo Lake box offers IP40 protection

    Axiomtek’s rugged, IP40-protected “eBOX626-311-FL” embedded PC runs Linux or Win 10 on Apollo Lake with 2x GbE, 6x USB, 3x serial, SATA, mSATA dual mini-PCIe, and wide range power. Axiomtek announced a fanless, Intel Apollo Lake based embedded computer that supports Linux, Win 10 IoT, and the company’s AMS.AXView remote monitoring software. The eBOX626-311-FL is designed for industrial controllers, intelligent robotic control, intelligent gateway systems, smart kiosks, and visual inspection and data visualization systems.

  • Processing raw image files from a Raspberry Pi High Quality Camera
  • Linux tip: How to reset device connected to USB port

    Sometimes devices connected to USB ports need to be re-set. It’s not unusual GSM modems and WiFi dongles to freeze and the only way to bring them back to life is to remove and re-attach.

    OLinuXino USB ports has power switches and current limiters which can be controller by Linux drivers.

  • Upcoming review: something POWERful

    I don’t yet know what exact specifications my review unit will have, but I’m assuming it’ll be the base model that has the 4-core POWER9 processor with SMT4 (4-way multithreading). I do know it’ll come with an AMD Radeon Pro WX4100 LP, which will be the only piece of hardware requiring card-side proprietary firmware (but it’s optional, since the mainboard itself has basic open source graphics capability too). I don’t usually do this, but there’s a first thing for everything, so here we go: do any of you have any questions about this exotic hardware you want me to try and answer? Specific things to look into? I’ll also be able to ask some questions to Raptor’s CTO, so there’s a lot of opportunity to get some serious answers.

Mozilla Leftovers

           
  • Driving Value as a Tiny UX Content Team: How We Spend Content Strategy Resources Wisely

    Our tiny UX content strategy team works to deliver the right content to the right users at the right time. We make sure product content is useful, necessary, and appropriate. This includes everything from writing an error message in Firefox to developing the full end-to-end content experience for a stand-alone product. Mozilla has around 1,000 employees, and many of those are developers. Our UX team has 20 designers, 7 researchers, and 3 content strategists. We support the desktop and mobile Firefox browsers, as well as satellite products. There’s no shortage of requests for content help, but there is a shortage of hours and people to tackle them. When the organization wants more of your time than you actually have, what’s a strategic content strategist to do?

  • These Weeks in Firefox: Issue 77
  •        
  • Improving Your Experience across Products

    When you log into your Firefox Account, you expect a seamless experience across all your devices. In the past, we weren’t doing the best job of delivering on that experience, because we didn’t have the tools to collect cross-product metrics to help us make educated decisions in a way that fulfilled our lean data practices and our promise to be a trusted steward of your data. Now we do. Firefox 81 will include new telemetry measurements that help us understand the experience of Firefox Account users across multiple products, answering questions such as: Do users who set up Firefox Sync spend more time on desktop or mobile devices? How is Firefox Lockwise, the password-manager built into the Firefox desktop browser, used differently than the Firefox Lockwise apps? We will use the unique privacy features of Firefox Accounts to answer questions like these while staying true to Mozilla’s data principles of necessity, privacy, transparency, and accountability–in particular, cross-product telemetry will only gather non-identifiable interaction data, like button clicks, used to answer specific product questions.

  • Possibly one step towards named arguments in Rust

    A number of programming languages offer a feature called “Named Arguments” or “Labeled Arguments”, which makes some function calls much more readable and safer. Let’s see how hard it would be to add these in Rust.

today's howtos

Zero Terminal 3 Is A Linux PC With $5 Raspberry Pi & Touchscreen

NODE, a hardware hacker, has developed a modular Linux PC dubbed “Zero Terminal 3” with a touchscreen, a full-size USB 2.0 port, a micro SD socket, and in-built battery running on $5 Raspberry Pi Zero single-board computer. Aimed at DIY enthusiasts, Zero Terminal 3 is a very versatile device that brings tonnes of options when it comes to adding add-ons to reach its true potential. The developer calls these addons ‘backpacks’ and offers users several options to extend the functionality of the device. Read more Also: ClusterCTRL Stack Helps You Power and Cool up to 5 Raspberry Pi SBC’s