Wednesday, October 13, 2021

Python Bytes: #254 Do Excel things, get notebook Python code with Mito

<p><strong>Watch the live stream:</strong></p> <a href='https://www.youtube.com/watch?v=nm3i1VA9jFw' style='font-weight: bold;'>Watch on YouTube</a><br> <br> <p><strong>About the show</strong></p> <p>Sponsored by <strong>us:</strong></p> <ul> <li>Check out the <a href="https://training.talkpython.fm/courses/all"><strong>courses over at Talk Python</strong></a></li> <li>And <a href="https://pythontest.com/pytest-book/"><strong>Brian’s book too</strong></a>!</li> </ul> <p>Special guest: <strong>Muhammad Raza</strong></p> <p><strong>Brian #1:</strong> <strong>yaml, GH Actions, and Python 3.10</strong></p> <ul> <li><p><a href="https://twitter.com/anthonypjshaw/status/1445590908943044615?s=20">Anthony Shaw (and others)</a> <img src="https://ift.tt/3lC7yKi" alt="" /></p></li> <li><p>Old: <code>python: [3.7, 3.8, 3.9, 3.10-dev]</code></p></li> <li>New: <code>python: ["3.7", "3.8", "3.9", "3.10"]</code></li> <li>Reasons: <ul> <li>Github Actions use yaml. </li> <li>yaml treats 3.10-dev as a string, since it’s got non-numbers in it.</li> <li>yaml treats 3.10 as a number, and is the same as 3.1</li> <li>hence, we have to use quotes for “3.10”</li> <li>using them on “3.7”, etc is not necessary, but is a nice consistency </li> </ul></li> </ul> <p><strong>Michael #2:</strong> <a href="https://developers.slashdot.org/story/21/10/09/0029238/beating-c-and-java-python-becomes-the-1-most-popular-programming-language-says-tiobe"><strong>Beating C and Java, Python Becomes the #1 Most Popular Programming Language, Says TIOBE</strong></a></p> <ul> <li>via Brain Skin</li> <li>"For the first time in more than 20 years <a href="https://www.tiobe.com/tiobe-index/">we have a new leader of the pack</a>..." the TIOBE Index announced this month. "The long-standing hegemony of Java and C is over.”</li> <li>For Tiobe, its enterprise focus, has seen Java and C dominate in recent years, but Python has been snapping at the heels of Java, and has now overtaken it...</li> <li>"Its ease of learning, its huge amount of libraries, and its widespread use in all kinds of domains, has made it the most popular programming language of today. Congratulations Guido van Rossum!"</li> </ul> <p><strong>Muhammad #3:</strong> <a href="https://github.com/codelucas/newspaper">Newspaper3k: Article scraping &amp; curation</a></p> <ul> <li>News, full-text, and article metadata extraction</li> <li>This allows you extract useful information from news articles, similar to Pocket or InstaPaper.</li> </ul> <p><strong>Brian #4:</strong> <strong>PEP 660, pip 21.3, flit 3.4 -> easy editable installs</strong></p> <ul> <li><code>pip install -e /local/dir</code> is a great way to have a project installed while you are developing it.</li> <li>It used to not work with <code>pyproject.toml</code> based projects. </li> <li>Flit worked around this with <code>flit install</code> <code>--``pth-file</code> (or <code>--symlink</code>)</li> <li><a href="https://www.python.org/dev/peps/pep-0660/">PEP660</a> - Editable installs for pyproject.toml based builds (wheel based) <ul> <li>Plus tons of work by Stéphane Bidoul and others, see <a href="https://testandcode.com/163">Test &amp; Code, episode 163</a></li> </ul></li> <li>pip 21.3 (Oct 11), flit 3.4 (Oct 10) now support PEP660</li> <li>And now with pip 21.3 and flit 3.4, <code>pip install -e</code> works for flit projects</li> <li>If you are using optional dependencies, for example:</li> </ul> <pre><code> [project.optional-dependencies] test = [ "pytest", "tox", ] </code></pre> <ul> <li>Then you need to use a quotes: <code>pip install -e ".[test]"</code></li> </ul> <p><strong>Michael #5:</strong> <a href="https://www.trymito.io/"><strong>Mito - a JupterLab Extension - generates Python code while you work on your analysis</strong></a></p> <ul> <li>via <a href="https://twitter.com/tomasrollo">Tomas Rollo</a></li> <li>Mito is a spreadsheet that helps you complete your Python analyses 10x faster. </li> <li>You edit the Mitosheet, and it generates Python code for you. </li> <li>Best way to experience it is to <a href="https://www.youtube.com/watch?v=VobWi0af-Tc"><strong>watch the video</strong></a></li> </ul> <p><strong>Muhammad #6:</strong> <a href="https://github.com/cloudtools/troposphere"><strong>troposphere</strong></a> </p> <ul> <li><a href="https://github.com/cloudtools/troposphere">Python library to create AWS CloudFormation descriptions</a></li> <li>The troposphere library allows easier creation of CloudFormation templates by writing Python code to describe AWS resources.</li> </ul> <p><strong>Extras</strong></p> <p>Muhammad</p> <ul> <li><a href="https://blog.nindalf.com/posts/how-to-learn-unix-tools/">How to learn Unix Tools</a></li> </ul> <p>Brian</p> <ul> <li>PyCon 2022 site is live, <a href="https://us.pycon.org/2022/">https://us.pycon.org/2022/</a></li> </ul> <p><strong>Joke:</strong> <a href="https://classicprogrammerpaintings.com/post/650892924479029248/alphabet-cancels-loon-zdzislaw-beksinski-1979"><strong>Alphabet cancels Loon</strong></a></p>

from Planet Python
via read more

No comments:

Post a Comment

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...