Python Programming

-
Strptime Python
Strptime python is used to convert string to datetime object.
-
Book review – Effective Python, by Brett Slatkin (and a free chapter for download)
Those among you who have already learned some Python or may even have used it in some projects will certainly have heard the expression “Pythonic Code”, which conveys a general and somewhat wide meaning of “clean code and good software development practices in the context of Python”. With Effective Python, the author presents you with nothing less than 90 practical examples on how to adopt a pythonic developer mindset and how to write better Python code.
-
Application and Request Contexts in Flask
The first blog post provides examples of how to the Application and Request contexts work, including how the current_app, request, test_client, and test_request_context can be used to effectively used to avoid pitfalls with these contexts.
The second blog post provides a series of diagrams illustrating how the Application and Request contexts are processed when a request is handled in Flask. This post also dives into how LocalStack objects work, which are the objects used for the Application Context Stack and the Request Context Stack.
-
Python Community Interview With David Amos
I discovered programming by accident when I came across the source code for the Gorillas game on my parents’ IBM 386 PS/2 computer. I guess I was about seven or eight years old. I found something called a .BAS file that opened up a program called QBasic and had all sorts of strange-looking text in it. I was instantly intrigued!
There was a note at the top of the file that explained how to adjust the game speed. I changed the value and ran the game. The effect was instantly noticeable. It was a thrilling experience.
I was obsessed with learning to program in QBasic. I made my own text adventure games. I even made a few animations using simple geometric shapes. It was tons of fun!
QBasic was a fantastic language for an eight-year-old kid to learn. It was challenging enough to keep me interested but easy enough to get quick results, which is really important for a child.
When I was around ten years old, I tried to teach myself C++. The ideas were too complex, and results came too slowly. After a few months of struggling, I stopped. But the idea of programming computers remained attractive to me—enough so that I took a web technology class in high school and learned the basics of HTML, CSS, and JavaScript.
In college, I decided to major in mathematics, but I needed a minor. I chose computer science because I thought having some experience with programming would make it easier to complete the degree requirements.
I learned about data structures with C++. I took an object-oriented programming class with Java. I studied operating systems and parallel computing with C. My programming horizons expanded vastly, and I found the whole subject pleasing both practically and intellectually.
-
PyCharm 2020.3 EAP – Starts now!
The Early Access Program for our next major release, PyCharm 2020.3, is now open! If you are always looking forward to the next ‘big thing’ we encourage you to join the program and share your thoughts on the latest PyCharm improvements!
[...]
If you’re on Ubuntu 16.04 or later, you can use snap to get PyCharm EAP and stay up to date. You can find the installation instructions on our website.
-
Extracting two SDF data items with chemfp's text toolkit
This is part of a series of essays about working with SD files at the record and simple text level. In yesterday's essay I showed several examples of using chemfp's text toolkit API to process records from an SD file. In some cases, reading the entire record is too much work so in this essay I'll show some examples of extracting just two pieces of information (a title and a single SDF data item value, or two data item values) from the records.
[...]
In yesterday's essay I noticed that most records in the ChEBI SDF distribution ChEBI_complete.sdf.gz contain a SMILES data item. (112,938 out of 113,902 to be precise.)
Let's extract those to make a SMILES files! (We could of course use a chemistry toolkit to parse the connection table into a molecule then generate a SMILES, but that's not the point of this essay.)
-
Talk Python to Me: #283 Web scraping, the 2020 edition
Web scraping is pulling the HTML of a website down and parsing useful data out of it. The use-cases for this type of functionality are endless. Have a bunch of data on governmental sites that are only listed online in HTML without a download? There's an API for that! Do you want to keep abreast of what your competitors are featuring on their site? There's an API for that. Need alerts for changes on a website, for example enrollment is now open at your college and you want to be first to get in and avoid the 8am Monday morning course slot? There's an API for that.
That API is screen scraping and Attila Tóth from ScrapingHub is here to tell us all about it.
-

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