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
import sys | |
from PyQt4.QtCore import * | |
from PyQt4.QtGui import * | |
class Form(QDialog): | |
def __init__(self, parent = None): | |
super(Form, self).__init__(parent) | |
#Labels | |
prin_label = QLabel("Principal:") | |
rate_label = QLabel("Rate:") |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct Node{ | |
struct Node* next; | |
int value; | |
} Node; | |
void add_front(Node** head, int value){ | |
Node* new_node = (Node *)malloc(sizeof(Node)); |
#include <stdio.h> | |
#include <stdlib.h> | |
void exchange_values(int input_array[], int left_index, int right_index){ | |
int temp_value = input_array[left_index]; | |
input_array[left_index] = input_array[right_index]; | |
input_array[right_index] = temp_value; | |
return; | |
} |
# Python modules | |
import os | |
import shutil | |
# PySide modules | |
from PySide import QtCore, QtGui | |
# Other modules | |
# Genie modules |
# -*- coding: utf-8 -*- | |
from django.http import HttpResponseRedirect, HttpResponse | |
from django.utils.translation import ugettext as _ | |
from ragendja.template import render_to_response | |
from google.appengine.api.labs import taskqueue | |
from google.appengine.api import urlfetch | |
from django.template import Context, loader | |
import datetime,logging,urllib | |
import urllib2 |
import re | |
class User(object): | |
def __init__(self): | |
self._phone_number = '' | |
@property | |
def phone_number(self): |