background preloader

Tut / Guides

Facebook Twitter

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. “You know, I could write a program to do that if you have the original file for the printouts,” my roommate told them, when he saw them sitting on the floor with papers scattered and stacked around them. 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. Maybe it's not that easy, but it's worth checking out!

Installing Stuff. 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.

The Flask Mega-Tutorial, Part I: Hello, World!

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.

An Introduction to Python's Flask Framework

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.

Upon completion, you'll be able to use this sequence of steps to jumpstart your next Flask app. Before getting started, we need to install Flask. 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.

Beating Google With CouchDB, Celery and Whoosh (Part 1)

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. Unfortunately the documentation doesn’t make it clear what you need to do to get CouchDB working, and what the downsides are.