antitools
- random_food
you should change foodlist , and run this script ,
random_food/random_food.py
you will get food without thinking.
- auto_supervisor_controller
you should install requests it will send supervisor signal for restart task install requests
sudo pip install requests
the supervisor config file in
/etc/supervisor/supervisor.conf
set
[inet_http_server]
port=0.0.0.0:9001 ; url for mange
username=user ; base auth
password=pass ;
opt you should copy then modify username and password for pass auth script
script.py taskname taskaction
task action opt start stop restart
- struct_template
if you have 2 lists A and B and there are the same number of elements You will get the same as the structure of B and A ex.
A------> [1, [2, 3, [2, 3]], [4, 5, 6], 7]
B------> [2, 3, 4, 5, 6, 7, 8, 2, 3]
B2A----> [2, [3, 4, [5, 6]], [7, 8, 2], 3]
- consoledict
translate en to zh in console ex.
input your words:hand
hand---/hænd/
0-pos:n. def:手;手工;帮助;指针
1-pos:v. def:交;递;给
2-pos:Web def:汉德;人手;手形
when you input your words your will get the translation, also you can input sentences. in windows cmd charset will only display half, should minimize and then restore the windows.
translate sql table to java class for framwork jfinal you should put .sql in
/tables
and modify generate.py file
api("your table name", "package")
then you will get the
tablenameContraller.java
tablenameModel.java
tablename.java
copy these to your project! Ation,the package will not correct ,because my project is different from yours.
- server test
just test the server is running
just the server down time.
3min heart bit about.
- proxy list
long time ago write some spider for proxy,it have a default url,you should edit it if you need to. this state aways gone.
- Decorator learn
edit a block code for decorator copy and newer learning.
- menu creat
For use this script creat menu for any deep translate a menu tree, it's useful.
- upload
This is a simple service for upload file use by bottle. the dir will be in
img/
or you can modify the folder by yourself .
- mysql_colunms
export mysql customer's table to excel with version . need
pydal
xlsxwriter
it just to excel for simple, you should type your own config in init.conf
.
[mysql]
url:mysql://%(username)s:%(password)s@%(host)s/information_schema
username=root
password=password
host=xxx.xxx.xxx.xxx
[versonfile]
filename:%(name)s.json
name=verson
[excelfile]
filename:%(name)s.xlsx
name=test
[db2excel]
databasename:realtime_db
noneedtables:[]
then run db2excel.py
for get excel file by yourself.
- learnpython
some base information for pro in work
logging.conf in it to use SocketHandler and HttpHandler
twisted is a logging server for this just easy for use
this all
- huaban
spider crawing huaban baord once get img src will message the celery . the celery queue will save the img
- jsondict
simple dict to object in python
import JsonDict
a = JsonDict({"a":"b"})
print a.a