Programming With Python

-
Classic Python Interview Question: the Two Sum Problem
This article is about a classic challenge that is often given in Python coding interviews. There are several different approaches you could take with this challenge, but the aim is to come up with a solution which has "reasonable" time complexity - i.e. given a large input it will complete within seconds rather than hours...
-
Reading HTML tables with Pandas
The pandas read_html() function is a quick and convenient way to turn an HTML table into a pandas DataFrame. This function can be useful for quickly incorporating tables from various websites without figuring out how to scrape the site’s HTML. However, there can be some challenges in cleaning and formatting the data before analyzing it. In this article, I will discuss how to use pandas read_html() to read and clean several Wikipedia HTML tables so that you can use them for further numeric analysis.
-
Python 101 2nd Edition Released!
I rewrote Python 101 almost completely from scratch. I used the original as a guide, but this book is completely fresh. It is based on Python 3.8 and covers lots of beginner and intermediate topics.
-
PyDev of the Week: Débora Azevedo
This week we welcome Débora Azevedo (@pydebb) as our PyDev of the Week! Débora is active in the PyLadies and DjangoGirls groups as well as teaching Python at PyLadies workshops. Let’s spend some time getting to know her better!
[...]
I’m an educator. I love teaching, and I’m working now as an English teacher in my state’s public network. But I have also taught Python in some PyLadies workshops. I’m doing my master’s degree in Innovation in Educational Technologies. For the past months, I’ve been working on developing educational software to assist deaf children in their literacy process from a bilingual perspective, considering that here in Brazil they learn Brazilian Sign Language and also written Portuguese. In my free time, I like to invest in the community (which has invested so much in me). From meetings online to translating blog posts and managing social media profiles, one thing worth pointing out about me is the involvement in the Python community here in Brazil, especially with PyLadies Brazil, which I contribute the most to. My most beloved hobbies are reading (love both Agatha Christie and Sir Arthur Conan Doyle), playing guitar and singing. I also write sporadically in my blog (in Portuguese).
-
Use Python to solve a charity's business problem
In my first article in this series, I described a problem of dividing bulk supplies into hampers of similar value to distribute to struggling neighbors in your community. I also wrote about how I enjoy solving small problems like this with small programs in various languages and comparing how they do it.
In the first article, I solved this problem with the Groovy programming language. Groovy is like Python in many ways, but syntactically it's more like C and Java. Therefore, it should be interesting and instructive to create the same solution in Python.
[...]
Another issue worth mentioning: This isn't a particularly efficient approach. Removing elements from lists, being careless about repeated expressions, and a few other things make this less suitable for a huge redistribution problem. Still, it runs in a blink on my old machine.
If you are shuddering at my use of while loops and mutating the data in this code, you probably wish I made it more functional. I couldn't think of a way to use map and reduce features in Python in conjunction with a random selection of units for repackaging. Can you?
In the next article, I'll re-do this in Java just to see how much less effort Groovy and Python are, and future articles will cover Julia and Go.
-
Python vs R, Which is the Best Language for Data Analysis?
The idea is to make sense of the data you have, to analyse it and share better business prospects in the near future and how you’re going to do it, is with the concepts of analytics. Data Science involves extraction of trends, patterns and useful information from a set of existing data which will be of no use if not analyzed. It is a kind of business intelligence that is now used for gaining profits and making better use of resources. This can also help in improving managerial operations and leverage organizations to the next level.
If not analyzed this data is going to get wasted whereas if analyzed properly this data can help us in finding information that is powerful to bring in a change in the patterns of how business is already working or going. Just imagine a source of unleashed information exists and you haven’t dived in yet to get the grip of it. Your business can take a competitive advantage of it and do wonders with the data. This is going to extract insights that will allow an advantage to a business or an organization in an economy.
-
Song-basket
I threw together a Spotify API program called song-basket. I have a few large themed playlists (for example, Instrumental Funk). This app is to help me add songs to them. I can choose a playlist (the basket), and then as I surf around Spotify, it lets me add the current song to the basket with one click. It also shows me whether the current song is already in the basket or not, which they often are. If the song is already in the basket, I don’t have to think about whether to add it, and I don’t have to deal with the annoying “Add duplicate?” question.
-

- Login or register to post comments
Printer-friendly version- 2562 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