Quantcast
Channel: Planet Python
Viewing all articles
Browse latest Browse all 24356

Python Bytes: #283 The sports episode

$
0
0
<p><strong>Watch the live stream:</strong></p> <a href='https://www.youtube.com/watch?v=lPwsTXCV4a4' style='font-weight: bold;'>Watch on YouTube</a><br> <br> <p><strong>About the show</strong></p> <p>Sponsored: <a href="https://pythonbytes.fm/compiler"><strong>RedHat: Compiler Podcast</strong></a></p> <p>Special guest: <a href="https://twitter.com/TonyaSims"><strong>Tonya Sims</strong></a></p> <p><strong>Michael #1:</strong> <a href="https://github.com/justindujardin/pathy"><strong>Pathy: a Path interface for local and cloud bucket storage</strong></a></p> <ul> <li>via Spencer</li> <li>Pathy is a python package (<em>with type annotations</em>) for working with Cloud Bucket storage providers using a pathlib interface.</li> <li>It provides an easy-to-use API bundled with a CLI app for basic file operations between local files and remote buckets. </li> <li>It enables a smooth developer experience by letting developers work against the local file system during development and only switch over to live APIs for deployment.</li> <li>Also has optional local file caching.</li> <li>From Spenser</li> <li><em>The really cool function is "Pathy.fluid" which can take any type of local, GCS, or S3 path string and then just give you back a Path object that you can interact with agnostic of what platform it was. So this has worked amazingly for me in local testing since i can just change the file path from the "s3://bucket/path" that i use in prod to a local "test_dir/path" and it works automatically.</em> </li> </ul> <p><strong>Brian #2:</strong> <a href="https://robyn.sanskar.wtf/"><strong>Robyn</strong></a></p> <ul> <li>“Robyn is a fast, high-performance Python web framework with a Rust runtime.”</li> <li><a href="https://www.sanskar.me/hello_robyn.html">Hello, Robyn!</a> - intro article</li> <li><a href="https://sansyrox.github.io/robyn/#/">docs</a>, <a href="https://github.com/sansyrox/robyn">repo</a></li> <li>Neat things <ul> <li>doesn’t need WSGI or ASGI</li> <li>async</li> <li>very Flask-like</li> </ul></li> <li>Early, so still needs some TLC <ul> <li>docs, etc. getting started and demo apps would be good.</li> </ul></li> </ul> <p><strong>Tonya</strong> <strong>#3:</strong> <a href="https://pypi.org/project/nba-api/"><strong>Python package 'nba_api' is a package to access data for NBA.com</strong></a></p> <ul> <li>This package is maintained by <a href="https://github.com/swar/nba_api/blob/master/docs/table_of_contents.md">Swar Patel</a> </li> <li>API Client package for NBA.com, more accessible endpoints, and better documentation </li> <li>The NBA.com API's are not well documented and change frequently (player traded, injured, retired, points per game, stats, etc)</li> <li>The nba_api package has tons of features:</li> <li>The nba_api starts with static data on players and teams (Full name, team name, etc). Each player and Team has an id.</li> <li>Can get game data from the playergamelog API endpoint</li> <li>The package also has many different <a href="https://github.com/swar/nba_api/tree/master/nba_api/stats/endpoints">API endpoints</a> that it can hit by passing in features from the static data to the API endpoints as parameters</li> </ul> <p><strong>Michael #4:</strong> <a href="https://github.com/homeport/termshot"><strong>Termshot</strong></a></p> <ul> <li>From Jay Miller</li> <li>Creates screenshots based on terminal command output</li> <li>Just run <code>termshot YOUR_CMD</code></li> <li>or <code>termshot --show-cmd -- python program.py</code> </li> <li>Even <code>termshot /bin/zsh</code> for full interactive “recording”</li> <li>Example I made: <img src="https://paper-attachments.dropbox.com/s_C2B8122915964D64A517E66102153405FC6014DDA3BE13B4DEF4E14329EEDC75_1652122396663_termshot-example.png" alt="" /></li> </ul> <p><strong>Brian #5:</strong> <a href="https://pythonspeed.com/articles/python-gil/"><strong>When Python can’t thread: a deep-dive into the GIL’s impact</strong></a></p> <ul> <li>Itamar Turner-Trauring</li> <li>Building a mental model of the GIL using profiler graphs of simple two thread applications.</li> <li>The graphs really help a lot to see when the CPU is active or waiting on each thread.</li> </ul> <p><strong>Tonya</strong> <strong>#6:</strong> <a href="https://sportsreference.readthedocs.io/en/stable/#sportsipy-a-free-sports-api-written-for-python"><strong>Sportsipy: A free sports API written for python</strong></a></p> <ul> <li><a href="https://pypi.org/project/sportsipy/">Free python API</a> that pulls the stats from www.sports-reference.com </li> <li>sports-reference.com - great website for getting sports stats for professional sports(NBA, NFL, NHL, MLB, college sports)</li> <li>Looks like an HTML website for the 90s - great for scraping (email site owners)</li> <li>You can get API queries for every sport (North American sports) like the list of teams for that sport, the date and time of a game, the total number of wins for a team during the season, and many more team-related metrics.</li> <li>You can also get stats from players and box scores - so you can build cool stuff around how a team performed during a game or during a season.</li> </ul> <p><strong>Extras</strong> </p> <p>Michael:</p> <ul> <li><a href="https://twitter.com/pyblogsal/status/1523635910696652800"><strong>Python 3.11.0 beta 1 is out</strong></a> <ul> <li><a href="https://til.simonwillison.net/github-actions/python-3-11">Test with GitHub Actions against Python 3.11</a></li> </ul></li> </ul> <p><strong>Joke:</strong> <a href="https://twitter.com/PR0GRAMMERHUM0R/status/1523528212374069249"><strong>Finding my family</strong></a></p>

Viewing all articles
Browse latest Browse all 24356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>