background preloader

The Hitchhiker’s Guide to Python!

The Hitchhiker’s Guide to Python!
Greetings, Earthling! Welcome to The Hitchhiker’s Guide to Python. This is a living, breathing guide. If you’d like to contribute, fork us on GitHub! This handcrafted guide exists to provide both novice and expert Python developers a best practice handbook to the installation, configuration, and usage of Python on a daily basis. This guide is opinionated in a way that is almost, but not quite, entirely unlike Python’s official documentation. Let’s get started! Getting Started with Python New to Python? Properly Install Python Writing Great Python Code This part of the guide focuses on the best-practices for writing Python code. Scenario Guide for Python Applications This part of the guide focuses on tool and module advice based on different scenarios. Shipping Great Python Code This part of the guide focuses on deploying your Python code. Python Development Environments Additional Notes Note Contribution notes and legal information (for those interested).

Related:  Python

5 Reasons Why Python Is a Great First Programming Language - Mikke Goes Coding Choosing your first programming language can be a difficult decision to make. You’ll be spending a lot of time with it and it’s not always just a walk in the park along the way. There are plenty of suitable languages for a beginner with enough resources online alone for learning pretty much any language out there. Twisted Twisted is an event-driven networking engine written in Python and licensed under the open source ​MIT license. Twisted runs on Python 2 and an ever growing subset also works with Python 3. Twisted makes it easy to implement custom network applications. Here's a TCP server that echoes back everything that's written to it: from twisted.internet import protocol, reactor, endpoints class Echo(protocol.Protocol): def dataReceived(self, data): self.transport.write(data) class EchoFactory(protocol.Factory): def buildProtocol(self, addr): return Echo() endpoints.serverFromString(reactor, "tcp:1234").listen(EchoFactory()) Learn more about ​writing servers, ​writing clients and the ​core networking libraries , including support for SSL, UDP, scheduled events, unit testing infrastructure, and much more.

Environment Variables There are a handful of environment variables that you can set that will have an effect on your ability to compile software. These are: For compiling C code: CC, CFLAGS For compiling C++ code: CXX, CPPFLAGS For the linking stage: LDFLAGS For compiling any code: TMPDIR First steps — pygal 2.0.0 documentation Caution First you need to install pygal, see installing. When it’s done, you are ready to make your first chart: import pygal # First import pygalbar_chart = pygal.Bar() # Then create a bar graph objectbar_chart.add('Fibonacci', [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]) # Add some valuesbar_chart.render_to_file('bar_chart.svg') # Save the svg to a file Now you should have a svg file called bar_chart.svg in your current directory. You can open it with various programs such as your web browser, inkscape or any svg compatible viewer.

alyssa frazee Thu 02 January 2014 | -- (permalink) My sister is a senior undergraduate majoring in sociology. She just landed an awesome analyst job for next semester and was told she'll be using some R in the course of her work. She asked me to show her the ropes during winter vacation, and of course I said yes! How gzip compression works - Make the Web Faster Authors: Kevin Khaw & Eric Higgins, Google Webmasters Recommended experience: Working knowledge of HTTP and HTML High level overview of a browser request with and without gzip compression Server without gzip: Browser: Connects to server and requests page.Server that browser supports gzip "Accept-Encoding: gzip".Server:No gzip support.

Basics of Linear Algebra for Machine Learning Discover the Mathematical Language of Data in Python Linear algebra is a pillar of machine learning. You cannot develop a deep understanding and application of machine learning without it. In this new laser-focused Ebook written in the friendly Machine Learning Mastery style that you’re used to, you will finally cut through the equations, Greek letters, and confusion, and discover the topics in linear algebra that you need to know. Using clear explanations, standard Python libraries, and step-by-step tutorial lessons, you will discover what linear algebra is, the importance of linear algebra to machine learning, vector, and matrix operations, matrix factorization, principal component analysis, and much more.

Open Source Finance 1. QuantLib - An Interview with Luigi Ballabio This is the first in a new series of interviews with leading developers involved in open source financial software. In the first interview I talk to Luigi Ballabio about QuantLib, a free software framework for Quantitative Finance which he has been involved with since it's original launch in the year 2000. Luigi currently participates in the design, maintenance and development of the core C++ library for QuantLib, including the review and management of the contributions from users. rethinkdb on 2013-09-06 – irclogger – Freenode IRC logs 02:19 joshontheweb joined 04:20 joshontheweb joined 04:31 cinderblock_away joined 13:14 <ReQL-Bot> Today we're having Moroccan from Casablanca.

Nifty Python tricks Hi there folks. It’s been a long time since I last published a post. I have been busy. However in this post I am going to share some really informative tips and tricks which you might not have known about. So without wasting any time lets get straight to them: Enumerate 1.4. Matplotlib: plotting — Scipy lecture notes 1.4.2. Simple plot Tip In this section, we want to draw the cosine and sine functions on the same plot. Starting from the default settings, we’ll enrich the figure step by step to make it nicer. Basic Branching and Merging Let’s go through a simple example of branching and merging with a workflow that you might use in the real world. You’ll follow these steps: Do work on a web site.Create a branch for a new story you’re working on.Do some work in that branch.

10 Neat Python Tricks Beginners Should Know Trick #1 Reversing a string in Python >>> a = "codementor" >>> print "Reverse is",a[::-1] Reverse is rotnemedoc numexpr - Fast numerical array expression evaluator for Python and NumPy. Please be aware that the numexpr project has been migrated to GitHub. This site has been declared unmaintained as of 2014-01-21. Sorry for the inconveniences.