yuany / antitools

antitools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

antitools

antitools

  1. random_food

you should change foodlist , and run this script ,

random_food/random_food.py

you will get food without thinking.

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

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

5.jfinal model generate

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.

  1. server test

just test the server is running

just the server down time.

3min heart bit about.

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

  1. Decorator learn

edit a block code for decorator copy and newer learning.

  1. menu creat

For use this script creat menu for any deep translate a menu tree, it's useful.

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

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

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

  1. huaban

spider crawing huaban baord once get img src will message the celery . the celery queue will save the img

  1. jsondict

simple dict to object in python

import JsonDict

a = JsonDict({"a":"b"})

print a.a

About

antitools


Languages

Language:Python 58.6%Language:CSS 21.7%Language:HTML 13.2%Language:JavaScript 4.4%Language:Jupyter Notebook 1.7%Language:C 0.6%Language:Batchfile 0.0%