A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| PASSWORD_PATH = ".password" | |
| PASSWORD_ID_PATH = ".password_id" | |
| # Make sure to have installed vagrant-triggers plugin | |
| # > vagrant plugin install vagrant-triggers | |
| # After the first `vagrant up` stop the VM and execute the following steps |
| # -*- coding: utf-8 -*- | |
| """ | |
| Search features for an elasticsearch / haystack / elasticstack | |
| :creationdate: 05/11/15 15:05 | |
| :moduleauthor: François GUÉRIN <[email protected]> | |
| :modulename: intrautils.search | |
| """ | |
| import base64 |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| import haystack | |
| from django.core.management import call_command | |
| from django.test.utils import override_settings | |
| TEST_INDEX = { | |
| 'default': { | |
| 'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine', | |
| 'URL': 'http://127.0.0.1:9200/', |
| """ | |
| Script to identify accounts followed older than 4 months. | |
| Source blogpost: http://www.rainbowbreeze.it/identify-your-twitter-followings-older-that-4-months | |
| """ | |
| import tweetpony | |
| from datetime import timedelta, datetime | |
| import urllib3.contrib.pyopenssl | |
| import time |
| #!/usr/bin/env python | |
| # | |
| # Converts any integer into a base [BASE] number. I have chosen 62 | |
| # as it is meant to represent the integers using all the alphanumeric | |
| # characters, [no special characters] = {0..9}, {A..Z}, {a..z} | |
| # | |
| # I plan on using this to shorten the representation of possibly long ids, | |
| # a la url shortenters | |
| # |
| <VirtualHost *> | |
| ServerName example.com | |
| WSGIDaemonProcess www user=max group=max threads=5 | |
| WSGIScriptAlias / /home/max/Projekte/flask-upload/flask-upload.wsgi | |
| <Directory /home/max/Projekte/flask-upload> | |
| WSGIProcessGroup www | |
| WSGIApplicationGroup %{GLOBAL} | |
| Order deny,allow |
| /* | |
| * Android API Guide | |
| * http://developer.android.com/guide/topics/ui/actionbar.html | |
| * Android Design Guide | |
| * http://developer.android.com/design/patterns/actionbar.html | |
| * Titanium Mobile will support someday | |
| * https://jira.appcelerator.org/browse/TIMOB-2371 | |
| */ | |
| var osName = Ti.Platform.osname, | |
| isAndroid = osName==='android', |
| var currentWin = Ti.UI.currentWindow; | |
| // below example would require variable declarations for Name, Description, image, Lat, Longitude | |
| // Docs: | |
| // http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Map.Annotation-object | |
| // http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Map.MapView-object | |
| // | |
| // CREATE MAP VIEW | |
| // |