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...
GIT Common Operations Command
1) 远程仓库相关命令
检出仓库:
$ git clone git://github.com/jquery/jquery.git
查看远程仓库:
$ git remote -v
添加远程仓库:
$ git remote add [name] [url]
删除远程仓库:
$ git 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...
According to the Samba project web site, Samba is an open source/free software suite that provides seamless file and print services to SMB/CIFS clients.
According to the Samba p...
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...