#101 Nobel Prize awarded to a Python convert

Python Bytes - A podcast by Michael Kennedy and Brian Okken - Luni

Categories:

Sponsored by DigitalOcean: pythnonbytes.fm/digitalocean

Brian #1: Asterisks in Python: what they are and how to use them

  • I just ** love *s
  • Using * and ** to pass arguments to a function
    • * for list, ** for keyword arguments from a dictionary
  • Using * and ** to capture arguments passed into a function
  • Using * to accept keyword-only arguments
  • Using * to capture items during tuple unpacking
    • you can capture the rest if you only want to grab a few
  • Using * to unpack iterables into a list/tuple
  • Using ** to unpack dictionaries into other dictionaries

Michael #2: responder web framework

  • From Kenneth Reitz — A familiar HTTP Service Framework
  • Already has 1,393 github stars
  • Flask-like but with async support and
    • A pleasant API, with a single import statement.
    • Class-based views without inheritance.
    • ASGI framework, the future of Python web services.
    • WebSocket support!
    • The ability to mount any ASGI / WSGI app at a subroute.
    • f-string syntax route declaration.
    • Mutable response object, passed into each view. No need to return anything.
    • Background tasks, spawned off in a ThreadPoolExecutor.
    • GraphQL (with GraphiQL) support!
    • OpenAPI schema generation.
    • Single-page webapp support
  • Responder gives you the ability to mount another ASGI / WSGI app at a subroute
  • uvicorn: powers responder and is built on top of uvloop
  • asgi: https://www.encode.io/articles/hello-asgi/

Brian #3: Python Example resource: pythonprogramming.in

  • Lots of examples
  • Python basics including date time, strings, dictionaries
  • pandas, matplotlib, tensorflow basics
  • data structures and algorithms
  • Nice reference, especially for people getting into Python for data science or scientific work.

Michael #4: This year’s Nobel Prize in economics was awarded to a Python convert

  • Nordhaus and Romer “have designed methods that address some of our time’s most fundamental and pressing issues: long-term sustainable growth in the global economy and the welfare of the world’s population,”
  • Notably for a 62-year-old economist of his distinction, he is a user of the programming language Python.
  • Romer believes in making research transparent. He argues that openness and clarity about methodology is important for scientific research to gain trust.
  • He tried to use Mathematica to share one of his studies in a way that anyone could explore every detail of his data and methods. It didn’t work. He says that Mathematica’s owner, Wolfram Research, made it too difficult to share his work in a way that didn’t require other people to use the proprietary software, too.
  • Romer believes that open-source notebooks are the way forward for sharing research. He believes they support integrity, while proprietary software encourage secrecy. “The more I learn about proprietary software, the more I worry that objective truth might perish from the earth,” he wrote.
  • Michael covered a similar story for the Nobel Prize in Physics at CERN on Talk Python
  • Jake Vanderplas Keynote at PyCon 2017: “The unexpected effectiveness of Python in Science”

Brian #5: More in depth TensorFlow

Michael #6: MAKERphone - an educational DIY mobile phone

  • MAKERphone is an educational DIY mobile phone designed to bring electronics and programming to the crowd in a fun and interesting way.
    • A fully functional mobile phone that you can code yourself
    • Games such as space invaders, pong, or snake
    • Apps such as a custom media player that only plays cat videos
    • Programs in Arduino
    • Lines of code in Python
    • Your first working piece of code in Scratch
    • A custom case

Extras:

Visit the podcast's native language site