background preloader

Tut / Guides

Facebook Twitter

Python Weekly - Issue 321. Welcome to issue 321 of Python Weekly.

Python Weekly - Issue 321

Let's get straight to the links this week. News NumPy announces timeline for dropping Python 2 support Nominations for the Malcolm Tredinnick Memorial Prize 2017 Articles, Tutorials and Talks. Jupyter Notebook. Token authentication is enabled If no password has been configured, you need to open the notebook server with its login token in the URL, or paste it above.

Jupyter Notebook

This requirement will be lifted if you enable a password. The command: jupyter notebook list will show you the URLs of running servers with their tokens, which you can copy and paste into your browser. Test-Driven Development with Python. Test-Driven Development with Python Test-Driven Development with Python.

Test-Driven Development with Python

Building a simple Telegram bot using PythonAnywhere - PythonAnywhere News. There's an explosion of chat apps and bots at the moment, and it's easy to see why.

Building a simple Telegram bot using PythonAnywhere - PythonAnywhere News

Setup your Environment - Guide to using Django with Zappa. Mocking External APIs in Python. Drowsiness detection with OpenCV. My Uncle John is a long haul tractor trailer truck driver.

Drowsiness detection with OpenCV

For each new assignment, he picks his load up from a local company early in the morning and then sets off on a lengthy, enduring cross-country trek across the United States that takes him days to complete. John is a nice, outgoing guy, who carries a smart, witty demeanor. He also fits the “cowboy of the highway” stereotype to a T, sporting a big ole’ trucker cap, red-checkered flannel shirt, and a faded pair of Levi’s that have more than one splotch of oil stain from quick and dirty roadside fixes.

He also loves his country music. Practical Programming for Total Beginners. Full Stack Python. Functional Programming HOWTO — Python 2.7.11 documentation. In this document, we’ll take a tour of Python’s features suitable for implementing programs in a functional style.

Functional Programming HOWTO — Python 2.7.11 documentation

After an introduction to the concepts of functional programming, we’ll look at language features such as iterators and generators and relevant library modules such as itertools and functools. Introduction This section explains the basic concept of functional programming; if you’re just interested in learning about Python language features, skip to the next section. Programming languages support decomposing problems in several different ways: Most programming languages are procedural: programs are lists of instructions that tell the computer what to do with the program’s input.

The designers of some computer languages choose to emphasize one particular approach to programming. In a functional program, input flows through a set of functions. Functional programming can be considered the opposite of object-oriented programming. Automate the Boring Stuff with Python. “You’ve just done in two hours what it takes the three of us two days to do.”

Automate the Boring Stuff with Python

My college roommate was working at a retail electronics store in the early 2000s. Occasionally, the store would receive a spreadsheet of thousands of product prices from its competitor. A team of three employees would print the spreadsheet onto a thick stack of paper and split it among themselves. For each product price, they would look up their store’s price and note all the products that their competitors sold for less. It usually took a couple of days. Untitled.

Nginx is pretty sweet, that's a rather obvious statement from me.

untitled

There are already many nginx forks and contributions back to the original. I also happen to have quite a spot in my heart for Bottle. In my eyes, it's a framework that pretty much lets you forget you're working with the web. You get to write your application as if the web didn't exist and then tack on the templating. Quickstart for Python/WSGI applications — uWSGI 2.0 documentation. This quickstart will show you how to deploy simple WSGI applications and common web frameworks.

Quickstart for Python/WSGI applications — uWSGI 2.0 documentation

Python here is meant as CPython, for PyPy you need to use the specific plugin: The PyPy plugin, Jython support is under construction. Note You need at least uWSGI 1.4 to follow the quickstart. Anything older is no longer maintained and is highly buggy! Python Weekly Archive - Python, Django, Web2py, IPython, BottlePy, CherryPy, CPython, Flask, IronPython, TurboGears, Plone, Zope. Raspberry PI: Bottlepy and Twitter Bootstrap. I have been using my Raspberry Pi for the last few months quite a lot.

Raspberry PI: Bottlepy and Twitter Bootstrap

I am currently working on a temperature/environment monitor that logs temperature, using a DS18B20, and light conditions using an optical sensor. I also have two LED's and two buttons to test basic input and output. I am developing the application in python using the BottlePy framework. The Flask Mega-Tutorial, Part I: Hello, World! This is the first article in a series where I will be documenting my experience writing web applications in Python using the Flask microframework. NOTE: This article was revised in September 2014 to be in sync with current versions of Python and Flask. Here is an index of all the articles in the series that have been published to date: My background. New Coder – five life jackets to throw to the new coder. Presentations by PyCon 2013. An Introduction to Python's Flask Framework. Flask is a small and powerful web framework for Python.

It's easy to learn and simple to use, enabling you to build your web app in a short amount of time. In this article, I'll show you how to build a simple website, containing two static pages with a small amount of dynamic content. While Flask can be used for building complex, database-driven websites, starting with mostly static pages will be useful to introduce a workflow, which we can then generalize to make more complex pages in the future. Beating Google With CouchDB, Celery and Whoosh (Part 1) Ok, let’s get this out of the way right at the start – the title is a huge overstatement. This series of posts will show you how to create a search engine using standard Python tools like Django, Celery and Whoosh with CouchDB as the backend. Celery is a message passing library that makes it really easy to run background tasks and to spread them across a number of nodes.

The most recent release added the NoSQL database CouchDB as a possible backend. I’m a huge fan of CouchDB, and the idea of running both my database and message passing backend on the same software really appealed to me.