#298: "Unstoppable" Python
About the show
Sponsored by Microsoft for Startups Founders Hub.
- by Eugene Yan
- Specifically, Using relative imports
- Example from sklearn’s
base.pyfrom .utils.validation import check_X_y from .utils.validation import check_array
- “Relative imports ensure we search the current package (and import from it) before searching the rest of the
- For relative imports, we have to use the
from .something import thingform.
- We cannot use
import .somethingsince later on in the code
- There’s a good discussion of relative imports in pep 328
Michael #2: Skyplane Cloud Transfers
- Skyplane is a tool for blazingly fast bulk data transfers in the cloud.
- Skyplane manages parallelism, data partitioning, and network paths to optimize data transfers, and can also spin up VM instances to increase transfer throughput.
- You can use Skyplane to transfer data:
- Between buckets within a cloud provider
- Between object stores across multiple cloud providers
- (experimental) Between local storage and cloud object stores
- Skyplane takes several steps to ensure the correctness of transfers: Checksums, verify files exist and match sizes.
- Data transfers in Skyplane are encrypted end-to-end.
- Security: Encrypted while in transit and over TLS + config options
- by Will McGugan
- Specifically, DictViews are amazing. They have set operations.
Example of using
items()to get views, then
^for symmetric difference (done at the C level):
# Get widgets which are new or changed print(render_map.items() ^ new_render_map.items())
Lots of other great topics in the article
- Unicode art in addition to text in doc strings
- and a cool embedded video demo of some of the new css stuff in Textual
- Python’s object allocator ascii art
Michael #4: ‘Unstoppable’ Python
- Python popularity still soaring: ‘Unstoppable’ Python once again ranked No. 1 in the August updates of both the Tiobe and Pypl indexes of programming language popularity.
- Python first took the top spot in the index last October, becoming the only language besides Java and C to hold the No. 1 position.
- “Python seems to be unstoppable,” said the Tiobe commentary accompanying the August index.
- In the alternative Pypl Popularity of Programming Language index, which assesses language popularity based on Google searches of programming language tutorials, Python is way out front.
- Matplotlib stylesheets can make your chart look awesome with one line of code.
- Back on 295 we talked about Flet. We now have a Talk Python episode on it (live and polished versions).
Joke: Rakes and AWS