Python Icon

Python

Python is a dynamically typed programming language.
211 Stories
All Topics

Twitter Icon Twitter

Guido van Rossum comes out of retirement, joins Microsoft

Guido van Rossum:

I decided that retirement was boring and have joined the Developer Division at Microsoft. To do what? Too many options to say! But it’ll make using Python better for sure (and not just on Windows :-). There’s lots of open source here. Watch this space.

Late last year Guido left Dropbox to head into retirement. Apparently “retirement was boring.” I’m curious to see how coming out of retirement changes things at the steering level of Python.

We talked mid last year with Brett Cannon about Python’s new governance and core team. I don’t recall their plan accounting for the possibility for their BDFL to come back from retirement. 😱

I’m sure whatever is to come for Python with Guido being back, it’ll be a net positive.

Craig Kerstiens info.crunchydata.com

Building a recommendation engine inside Postgres with Python and Pandas

Craig Kerstiens told me about this on our recent Postgres episode of The Changelog and my jaw about dropped out of my mouth.

… earlier today I was starting to wonder why couldn’t I do more machine learning directly inside [Postgres]. Yeah, there is madlib, but what if I wanted to write my own recommendation engine? So I set out on a total detour of a few hours and lo and behold, I can probably do a lot more of this in Postgres than I realized before. What follows is a quick walkthrough of getting a recommendation engine setup directly inside Postgres.

Craig doesn’t necessarily suggest you put this kind of solution in production, but he doesn’t come out and say don’t do it either. 😉

Líkið Geimfari github.com

A high-performance fake data generator for Python

Mimesis… provides data for a variety of purposes in a variety of languages. The fake data could be used to populate a testing database, create fake API endpoints, create JSON and XML files of arbitrary structure, anonymize data taken from production and etc.

Data generators like Mimesis are fun to use (and I imagine fun to code as well):

>>> from mimesis import Person
>>> person = Person('en')

>>> person.full_name()
'Brande Sears'

>>> person.email(domains=['mimesis.name'])
'roccelline1878@mimesis.name'

>>> person.email(domains=['mimesis.name'], unique=True)
'f272a05d39ec46fdac5be4ac7be45f3f@mimesis.name'

>>> person.telephone(mask='1-4##-8##-5##3')
'1-436-896-5213'

Arpit Bhayani arpitbhayani.me

Building finite state machines with Python Coroutines

An excellent, deep primer on both FSMs and using Coroutines in Python.

Even though this may not be the most efficient way to implement and build FSM but it is the most intuitive way indeed. The edges and state transitions, translate well into if and elif statements or the decision functions, while each state is being modeled as an independent coroutine and we still do things in a sequential manner. The entire execution is like a relay race where the baton of execution is being passed from one coroutine to another.

 Itamar Turner-Trauring pythonspeed.com

Options for packaging your Python code: Wheels, Conda, Docker, and more

There are a whole range of ways to package your Python software: Wheels, Pex, RPM/DEB, Conda, executables, Docker images, and more. Which ones should you use? In this overview you’ll learn why they all exist, the pros/cons of each method, and how it deals with things like code distribution and support for multiple applications.

Brett Cannon snarky.ca

What exactly is Python?

Brett Cannon, writing for his personal blog:

It’s no secret that I want a Python implementation for WebAssembly. It would not only get Python into the browser, but with the fact that both iOS and Android support running JavaScript as part of an app it would also get Python on to mobile. That all excites me.

But when thinking about the daunting task of creating a new implementation of Python, my brain also began asking the question of what exactly is Python?

What follows from this point in Brett’s post is a stream of consciousness writing style of question and answer, back and forth, iteration over all the points of what makes Python be Python in an attempt to consider what it might take to “compile Python down to WebAssembly.”

Python github.com

A research framework for reinforcement learning

Acme is a library of reinforcement learning (RL) agents and agent building blocks. Acme strives to expose simple, efficient, and readable agents, that serve both as reference implementations of popular algorithms and as strong baselines, while still providing enough flexibility to do novel research. The design of Acme also attempts to provide multiple points of entry to the RL problem at differing levels of complexity.

Lj Miranda ljvmiranda921.github.io

Generate 8-bit avatars using Conway's Game of Life

Lj Miranda:

I made a website that generates cute 8-bit avatars using Conway’s Game of Life. Simply type in your name, and it will create a unique sprite just for you! Try out the changelog, jerod santo, or adam stacoviak!

Conway’s Game of Life is something that we consider as a Cellular Automaton. It was a mathematical model created by the mathematician John Conway, who, unfortunately, passed away a few weeks ago due to the coronavirus. I highly encourage you to know more about Conway, he’s such an interesting and unique individual!

Built with Vue and Python. Source code here.

Opensource.com Icon Opensource.com

The real impact of canceling PyCon due to COVID-19

An interview with Ewa Jodlowska on how the Python Software Foundation is responding to the cancelation of in-person events.

Turns out ~63% of the PSF’s 2020 revenue was projected to come from PyCon. That’s a massive hit to take. Read the entire interview to learn what they’re doing to diversify, some silver linings that have come from this, and how you can pitch in.

(The tail end of Adam’s conversation with Duane O’Brien focused on the FOSS Responders initiative which was purpose-built to help out orgs like the PSF.)

Python github.com

A modular toolbox for accelerating meta-learning research

Meta-Blocks is a modular toolbox for research, experimentation, and reproducible benchmarking of learning-to-learn algorithms. The toolbox provides flexible APIs for working with MetaDatasets, TaskDistributions, and MetaLearners (see the figure below). The APIs make it easy to implement a variety of meta-learning algorithms, run them on well-established and emerging benchmarks, and add your own meta-learning problems to the suite and benchmark algorithms on them.

This repo is still under “heavy construction” (a.k.a. unstable) so downloader beware, but it’s worth a star/bookmark for later use.

A modular toolbox for accelerating meta-learning research

Lj Miranda ljvmiranda921.github.io

Why do we need Flask, Celery, and Redis?

Lj Miranda explains their architecture decisions with a metaphor I’ve never seen applied to software systems…

In this blogpost, I’ll explain why we need Flask, Celery, and Redis by sharing my adventures in buying McNuggets from Mcdonalds. Using these three (or technologies similar to them) is integral to web backend development so that we can scale our applications.

I love these “why we did X” style posts where folks share their real-world decision making processes and how they played out over time.

Python github.com

Glitchify static images to glitched images and GIFs

A commandline tool + python library to glitchify images and even make GIFs out of them! Featuring 10 different levels of glitching intensity! The algorithm used to create glitched images is a slightly modified version of the popular ImageGlitcher tool’s algorithm, so you can expect the glitched images to look really cool!

Looks pretty rad on our Brain Science art.

Glitchify static images to glitched images and GIFs

Python github.com

Diagrams as Python code

Diagrams lets you draw the cloud system architecture in Python code. It was born for prototyping a new system architecture design without any design tools. You can also describe or visualize the existing system architecture as well. Diagrams currently supports four major providers: AWS, Azure, GCP and Kubernetes.

I’ve never found a diagramming tool I’ve enjoyed using. The idea of just writing some code and letting a tool do the drawing might be just what the doctor ordered. Start with the quick start.

Diagrams as Python code

Amazon Web Services github.com

The missing cron CLI for AWS Cloudwatch and Lambda

Do you have an AWS account? Great. Do you want to run cron jobs in the cloud?

Cronyo provides A simple CLI to manage your cron jobs on AWS.

In addition, Cronyo can instantly deploy a couple of super-simple, helpful and secure lambda functions to perform HTTP GET/POST requests for you. So if you need to trigger any webhooks on schedule, an AWS account and Cronyo is all you need :)

0:00 / 0:00