- lxml - Pythonic binding for the C libraries libxml2 and libxslt.
- boto - Python interface to Amazon Web Services
- Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
- Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
- PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
- Celery - Task queue to distribute work across threads or machines.
- pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # aliases defined by chenko | |
| # medit ~/.bash_aliases fast: | |
| alias al="sudo medit ~/.bash_aliases" | |
| # goagent | |
| alias go="python /home/chenko/Beckup/Linux/App/goagent-goagent-24bca79/local/proxy.py" | |
| # javascript enginge rhino1.7.4 | |
| alias rh="java -jar /home/chenko/Beckup/Linux/App/rhino1_7R4/js.jar" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if __name__ == '__main__': | |
| import timeit | |
| print(timeit.timeit("test()", setup="from __main__ import test")) | |
| # http://docs.python.org/3.3/library/timeit.html | |
| timeit.timeit(stmt='pass', setup='pass', timer=<default timer>, number=1000000) | |
| Create a Timer instance with the given statement, setup code and timer function and run its timeit() method with number executions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python3 -m http.server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Add a div node: "id=ele_top div" as the anchor at the top of the page | |
| var addTop = function(){ | |
| ele_top = document.createElement('div'); | |
| ele_top.id = "ele_top"; | |
| document.body.insertBefore(ele_top, document.body.firstChild); | |
| return true; | |
| }; | |
| // Jump to the anchor node | |
| var toTop = function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from contextlib import contextmanager | |
| @contextmanager | |
| def closing(thing): | |
| try: | |
| yield thing | |
| finally: | |
| thing.close() | |
| And lets you write code like this: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 首先打开“终端”(Finder->应用程序->实用工具->终端),并且输入以下命令: | |
| defaults write com.apple.dock workspaces-edge-delay -float 0;killall Dock | |
| 现在大家试一下秒切吧。哈哈。。很爽不。是不是太快了,如果觉得太快,我们还可以在改改设定,我就设定在屏幕边缘停留半秒切换吧。 | |
| 再次打开“终端”(Finder->应用程序->实用工具->终端),并且输入以下命令: | |
| defaults write com.apple.dock workspaces-edge-delay -float 0.15;killall Dock | |
| 如果你想还原成原样,也很简单,再次打开“终端”(Finder->应用程序->实用工具->终端),并且输入以下命令: | |
| defaults delete com.apple.dock workspaces-edge-delay;killall Dock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $tel_no = $_GET['hm']; | |
| $c = $_GET['c']?$_GET['c']:0; | |
| $c++; | |
| ?> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>迷你轰炸台 - 短信炸弹 - BETA!</title> | |
| <?php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ####################################### | |
| # aliases defined by chenko on mac os x | |
| ####################################### | |
| #################### | |
| #Temporary aliases: | |
| #################### | |
| #change directory to django project mysite |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://www.python.org/dev/peps/pep-0263/ | |
| Defining the Encoding | |
| Python will default to ASCII as standard encoding if no other | |
| encoding hints are given. | |
| To define a source code encoding, a magic comment must | |
| be placed into the source files either as first or second | |
| line in the file, such as: |
OlderNewer