Giter VIP home page Giter VIP logo

toolkitem's Issues

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

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

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

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

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

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

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

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.