edonyzpc / toolkitem Goto Github PK
View Code? Open in Web Editor NEWpersonal toolkits for daily code
License: MIT License
personal toolkits for daily code
License: MIT License
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 withhashlib.sha512
method.
DONE
To finish redefine this project mission, README needs to be updated.
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
help to manage personal blog writing
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
Openssl/crypto/bf
check commits*.i
)follow the instruction to distribute the package
cc -c
python-config --cflags $name".c" $name"_wrap.c"
need to be changedmodule for creating executable Python Zip Applications
https://docs.python.org/3.5/whatsnew/3.5.html#zipapp
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))
.travis.yml
filelanguage: 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
fileNew feature for directory iterator
https://docs.python.org/3.5/whatsnew/3.5.html#pep-471-os-scandir-function-a-better-and-faster-directory-iterator
auto add the sorted number in the head of the md file title
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.