Python

How to Code a Neural Network with Backpropagation from scratch In Python

posted by Chris G   [ updated ]


The backpropagation algorithm is used in the classical feed-forward artificial neural network.

It is the technique still used to train large deep learning networks.

In this tutorial, you will discover how to implement the backpropagation algorithm for a neural network from scratch with Python.

After completing this tutorial, you will know:

  • How to forward-propagate an input to calculate an output.
  • How to back-propagate error and train a network.
  • How to apply the backpropagation algorithm to a real-world predictive modeling problem.

Python Face Recognition

posted Jul 1, 2019, 1:12 PM by Chris G   [ updated Jul 1, 2019, 1:13 PM ]

This is by far the easiest face recognition (yes, recognition, not just detection!) library available for Python:



It is relatively easy to add your own photos to recognize, and this can even run on a Raspberry Pi zero, see this article:

Face Recognition Raspberry Pi Zero Party Greeter


packaging and distributing python applications

posted Jul 1, 2019, 1:11 PM by Chris G   [ updated Jul 1, 2019, 1:12 PM ]


PyOxidizer is a utility for producing binaries that embed Python. The over-arching goal of PyOxidizer is to make complex packaging and distribution problems simple so application maintainers can focus on building applications instead of toiling with build systems and packaging tools.

PyOxidizer is capable of producing a single file executable - with a copy of Python and all its dependencies statically linked and all resources (like .pyc files) embedded in the executable. You can copy a single executable file to another machine and run a Python application contained within. It just works.

Under the hood, it uses Rust packaging, hence the name.




Programming language Python's 'existential threat' is app distribution: Is this the answer?

Python date parsing from unstructured text

posted Feb 15, 2019, 7:58 AM by Chris G   [ updated Feb 15, 2019, 7:59 AM ]

Duckling is a Clojure library that parses text into structured data:

“the first Tuesday of October” => {:value "2014-10-07T00:00:00.000-07:00"
                                   :grain :day}

See our blog post announcement for more context.

Duckling is shipped with modules that parse temporal expressions in English, Spanish, French, Italian and Chinese (experimental, thanks to Zhe Wang). It recognizes dates and times described in many ways:

  • today at 5pm
  • 2014-10-01
  • the last Tuesday of October 2012
  • twenty five minutes ago
  • the day before labor day 2020
  • June 10-11 (interval)
  • third monday after christmas 1980



Python wrapper for wit.ai's Duckling Clojure library




GitHub Gist

posted Feb 4, 2019, 8:46 AM by Chris G   [ updated Feb 4, 2019, 8:46 AM ]


GitHub Gist

Instantly share code, notes, and snippets.


Binder - launch Jupyter notebooks from GitHub

posted Feb 4, 2019, 8:41 AM by Chris G   [ updated Feb 4, 2019, 8:42 AM ]


Turn a Git repo into a collection of interactive notebooks

Have a repository full of Jupyter notebooks? With Binder, open those notebooks in an executable environment, making your code immediately reproducible by anyone, anywhere.

https://mybinder.org/https://mybinder.org/

Zappa - Fast and easy serverless deployment of Python code

posted Aug 30, 2018, 6:28 PM by Chris G   [ updated Aug 30, 2018, 6:28 PM ]

Zappa makes it super easy to build and deploy server-less, event-driven Python applications (including, but not limited to, WSGI web apps) on AWS Lambda + API Gateway. Think of it as "serverless" web hosting for your Python apps. That means infinite scalingzero downtimezero maintenance - and at a fraction of the cost of your current deployments!

If you've got a Python web app (including Django and Flask apps), it's as easy as:

$ pip install zappa
$ zappa init
$ zappa deploy

and now you're server-less! Wow!


Python Click

posted Jul 11, 2018, 6:52 AM by Chris G   [ updated Jul 11, 2018, 6:52 AM ]

Click is a Python package for creating beautiful command line interfaces in a composable way with as little code as necessary. It’s the “Command Line Interface Creation Kit”. It’s highly configurable but comes with sensible defaults out of the box.

It aims to make the process of writing command line tools quick and fun while also preventing any frustration caused by the inability to implement an intended CLI API.

Click in three points:

  • arbitrary nesting of commands
  • automatic help page generation
  • supports lazy loading of subcommands at runtime

Python visualization library - bokeh

posted Jul 11, 2018, 6:50 AM by Chris G   [ updated Jul 11, 2018, 6:51 AM ]

Bokeh is an interactive visualization library that targets modern web browsers for presentation. Its goal is to provide elegant, concise construction of versatile graphics, and to extend this capability with high-performance interactivity over very large or streaming datasets. Bokeh can help anyone who would like to quickly and easily create interactive plots, dashboards, and data applications.



Python web applications with gunicorn

posted May 12, 2018, 8:46 AM by Chris G   [ updated May 12, 2018, 8:46 AM ]

Python Libraries such as Flask are single-threaded. They work fine but will not allow your web app to scale. It is a good idea to run gunicorn in front of Flask:

Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. It's a pre-fork worker model. The Gunicorn server is broadly compatible with various web frameworks, simply implemented, light on server resources, and fairly speedy.


1-10 of 29