Tony Tan tonytan748.github.io
1.

Django Pageinator and Photo Upload

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...
2.

GIT Common Operations Command

GIT Common Operations Command 1) 远程仓库相关命令 检出仓库: $ git clone git://github.com/jquery/jquery.git 查看远程仓库: $ git remote -v 添加远程仓库: $ git remote add [name] [url] 删除远程仓库: $ git re...
3.

How to install Google Authenticator on Linux

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...
4.

What are useful online tools for Linux

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...
5.

How to set up a Samba file server to use with Windows clients

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...
6.

Python: handle photos

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...
7.

Python: lambda reduce

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内建函数是一个二来将一个数据集合(链表,元组等)中的所有数据...
8.

Read & Open a CSV File & Randomly Select an Entry

Read & Open a CSV File & Randomly Select an Entry This is following the https://www.youtube.com/watch?v=NUVblHTElTk&index=3&list=PLEsfXFp6DpzR6FatOy4RtoXfu4PeYO_...
9.

hadoop用純 python 寫 hadoop 的 map reduce 程式

hadoop用純 python 寫 hadoop 的 map reduce 程式 好繞口的標題:)。hadoop 是 java 寫成的,但是並不是只能用 java 才能在 hadoop 裡面執行程式。但是第一個的觀念要有的是,程式的執行環境,就是在 java VM 裡面。所以,在 hadoop 文件裡介紹的 python 程式,要執行的時候,是用 jy...
10.

A Sample Game Use Pygame

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...