Giter VIP home page Giter VIP logo

toolkitem's Introduction

Branchs CI Code Qulity Status
[master] Build Status codecov develop branch
COVERAGE SUNBURST
[develop] Build Status codecov
[publish] Build Status codecov
commits develop branch

toolkitem


personal toolkits for daily code

This is a toolkit project for speedup my daily life. It will be reconstituted into a GUI application if this project begins to take shape. According to daily requirements, it is split into different modules according to its functionality.

At the last but not least, these tools will be embedded into my big project anth (now an pre-research project), particularly, it is a qualified web crawler with high customizable walking purpose.


  • FILE PROCESS TOOLS
    • get all the directories and files in the root path and its sub-directories ====> filesprocess/dirlist
    • count number of lines in direction files ====> filesprocess/filesline
    • mark up the files different lines(if they have) and write them into buffer ====> mergefile
    • delete syntax format(*.md,*.rst and so on) and get the plain text file. ====> fileparser
    • personal defined text handler for text process. ====> texthandler
  • Git REPOS TOOLS
    • git repository management tools. ====> gitmgr
  • PYTHON FORMAT PRINT TOOLS
    • make terminal standard output colorful. ====> colorprinter
    • python progress bar simulating npm. ====> spinner
  • SOURCE CODE MANAGEMENT TOOLS
    • update system for preparation and update the git repositroies ====> updatesys
  • MULTIPROCESS SPEEDUP TOOLS
    • multi-jobs running tools. ====> scheduler
  • OTHER TOOLS
    • Linux Kernel Integrity Measurement check tools. ====> other/imacheck.py
  • TO BE DONE TOOLS
    • plan arangement in calendar ====> plandaycal
    • convert the *.rst, *.md and *.txt files into pdf ====> pdfconvertor
    • filter for files or directions search. ====> fuzzyfinder
    • personal Linux automatic management and efficient tools with Shell script. ====> emsh
    • some awsome useful python script for daily working. ====> pyscript
    • resource of operation system monitor. ====> rosmonitor
    • blog writing template generater tools and hexo management tools. ====> blogger
    • tools for cross developing with c and python. ====> swiger
    • auto reminder tools for checking new emails. ====> mail
  • DEPLOY TOOLKITEM TO PYPI
    • deploy spinner to PyPi

P.S.


Develop Path

toolkitem's People

Contributors

edonyzpc avatar pengchen-zpc avatar

Stargazers

 avatar  avatar

Forkers

emeuler

toolkitem's Issues

argument parse error

I got some bug and I don't know how to solve this. Any ideas?

update -pH ~/bin
system info: Darwin
Updating GitHub Repository ...
>> to update GitHub repositories path: /Users/edony/bin
>> to update 0 repositroies
no update git repositroies
Updating Bitbucket ...
>> to update Bitbucket repositories path: /Users/edony/bin
>> to update 1 repositroies
/Users/edony/bin
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
update hg repositroies finished
usage: update [-h] [-l] [-m] [-g [GIT [GIT ...]]] [-H [HG [HG ...]]] [-c]
              [-p PATH [PATH ...]] [-a ATTRIBUTE [ATTRIBUTE ...]] [-v] [-w]
update: error: unrecognized arguments: /Users/edony/bin

need more protection for pyswiger.sh

  • check if there is source code file "**.c"
  • can swig wrap the header file into python module, if so command cc -c python-config --cflags $name".c" $name"_wrap.c" need to be changed
  • need some comments or promt about usage, function and so on
  • some more safe protection for each platform

dirlist architecture design

class dir_node(object):                                                                    
    """ Encapsulate the attributes of directory into this class.
            Type: directory, file, link
            Path: full path of directory node
    """
    def __init__(self, root_path):
        pass

    def _list_member(self):
        """ Get the entries in `root_path`
        """
        pass

    def _gen_attr(self):
        pass

    def _list_dir(self):
        pass

    def _list_file(self):
        pass

    def _list_link(self):
        pass

    def _parent_dir(self):
        pass

    def _sub_dir(self):
        pass

add exclude path option in ListDir

def _listdir(self, path=None, excludepath=None):
        """ list root path recursively including sub-directories
        """
        if self.root is None:
            if path is not None:
                for root_, dir_, file_ in os.walk(path):
                    if root_ == excludepath:
                        continue
                    dir_ctx = []
                    dir_ctx.insert(0, file_)
                    dir_ctx.insert(0, dir_)
                    buf_dl = {}
                    buf_dl[root_] = dir_ctx
                    self._dl_buf.insert(0, buf_dl)
            else:
                raise Exception("Error DirList class initialize")
        else:
            for root_, dir_, file_ in os.walk(self.root):
                if root_ == excludepath:
                    continue
                dir_ctx = []
                dir_ctx.insert(0, file_)
                dir_ctx.insert(0, dir_)
                self.dirlist[root_] = dir_ctx

MD5 will generate identical outputs for the different input parameters

_MD5 encryption might got problem_

Recently, several exploits were developed which proved that MD5 will generate identical outputs for the different input parameters. As a consequence, somebody can break your encryption or log on to your website. For example: someone might be able to log on to your service with two different passwords, if their MD5 hashes are identical.

TODO(edony): fix the hashlib.md5 method for password encrypytion and replace it with hashlib.sha512 method.

P.S.
Check usage of exploitable MD5 hashes

add continuous integration for this repo

  • .travis.yml file
language: python
python:
  - "2.7"
  - "3.5"
  - "3.6"
# command to install dependencies
install: "pip install -r requirements.txt"
# command to run tests
script: pytest
  • requirements.txt file
  • test modula

TODO List

  • redefine this project
  • pyswiger.sh enhancement with protection and help comments
  • customized encrypt and decrypt python module
  • blog management tools
  • security tool Dmitry
  • ...

optimize files line counter method with concurrence

https://github.com/edonyM/toolkitem/blob/5e60803d4d69d9a19797c105ff7d8155ccd8eee7/fileprocess/filesline.py#L39

from functools import partial
from multiprocessing.pool import Pool
from time import time
import os

def main():
   ts = time()
   client_id = os.getenv('IMGUR_CLIENT_ID')
   if not client_id:
       raise Exception("Couldn't find IMGUR_CLIENT_ID environment variable!")
   download_dir = setup_download_dir()
   links = [l for l in get_links(client_id) if l.endswith('.jpg')]
   download = partial(download_link, download_dir)
   with Pool(8) as p:
       p.map(download, links)
   print('Took {}s'.format(time() - ts))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.