Fabic is used for automating deployment of your application.
Fabric is used for automating deployment of your application.
Install:
$ pip install fabric
Create the fabfil...
How to set Pageinator and Photo Upload in Django
Django Pageinator
home function:
def home(request):
if 'account' in request.session:
p=Reg.objects.get(account=re...
Question I want to use Google Authenticator to set up two factor authentication. How can I install Google Authenticator on [insert your Linux distro]?
Question: I want to use Go...
As you know, GNU Linux is much more than just an OS. There is literally a whole sphere on the Internet dedicated to the penguin OS.
As you know, GNU Linux is much more than just...
Some ways to handle photos in Python
#coding=utf-8
import Image
import urllib2
import StringIO
impoert os
#change photo size
def resize_img(img_path):
try:
img=Im...
how to use lambda and reduce in python
lambda:一句话函数:
linuxany=lambda x,y: x+y
#给ff传两个参数,bda定的x+y
print linuxany(2,3) # print 5
reduce内建函数是一个二来将一个数据集合(链表,元组等)中的所有数据...
Read & Open a CSV File & Randomly Select an Entry
This is following the https://www.youtube.com/watch?v=NUVblHTElTk&index=3&list=PLEsfXFp6DpzR6FatOy4RtoXfu4PeYO_...
hadoop用純 python 寫 hadoop 的 map reduce 程式
好繞口的標題:)。hadoop 是 java 寫成的,但是並不是只能用 java 才能在 hadoop 裡面執行程式。但是第一個的觀念要有的是,程式的執行環境,就是在 java VM 裡面。所以,在 hadoop 文件裡介紹的 python 程式,要執行的時候,是用 jy...
a game by use pygame.
#-*-coding=utf-8-*-
import sys
import pygame
import threading
import random
class Game:
def __init__(self):
pygame.init()
self.scree...
A sample for tkinter canvas.
import Tkinter
root = Tkinter.Tk(0
canvas=Tkinter.Canvas(root,width=600,height=400,bg='white')
canvas.create_text(302,77,text='Use Canvas', fill='...