Code Monkey home page Code Monkey logo

dps_util's Introduction

DPS_Util

This repository contain all util.

Install:

Get at https://pypi.org/project/dpsutil/

pip install dpsutil

Change log:

Ver 1.0.0:

  • Compression -> DONE
  • KafkaWrapper -> DONE
  • RedisWrapper -> DONE
  • Vector -> DONE
  • Media -> DONE
  • Computer Vision -> DONE
  • Distance -> DONE
  • Hashing -> DONE

Ver 1.0.1:

  • Added image_info -> Get (format, width, height) of image without decoding.
  • Upgrade imdecode -> Auto decode image but need not provide encode_type.

Ver 1.0.2:

  • Change 'numpy.pool' to 'vector.pool'
  • Fix bugs

Ver 1.0.3:

  • Compression:
    • Support list compression: compress_list, decompres_list
  • Distance:
    • Change distance.function -> vector.distance

Ver 1.1.0:

  • Added AttrDict, FixedDict, FixedTypeDict

Ver 1.1.1-1.1.7:

  • Fix bugs
  • Added UniqueTypeDict
  • Fix bugs
  • Changed module fixdict -> defaultdict
  • Changed FixedDict -> DefaultDict
  • Changed FixedTypeDict -> DefaultTypeDict
  • Fix bugs of attrdict.AttrDict, attrdict.UniqueTypeDict, attrdict.DefaultDict
  • Fix bugs of compress_list, decompress_list

Ver 1.1.8:

  • Added Environment

Ver 1.1.9:

  • Added Environment.to_lower -> Useful when extracting to kwarg.

Ver 1.1.10-1.1.15:

  • Fix bugs attrdict
  • Changed hashfunc default from sha1 -> md5
  • Fix bugs, casting type when set value.

Ver 1.1.16-1.1.18:

  • Support call of DefaultDict, which update data from buffer.
  • Fix bugs Environment

Ver 1.1.19:

  • Added pre-define output array of decompress_ndarray
  • Support add new key environment.

Todo:


Features


Compression Lossless:

  • Support type: ndnumpy, bytes
  • Compress by blosc. It support multi compressor and multi-thread.

KafkaWrapper:

  • Wrapping Consumer and Producer with default setting and security.

RedisWrapper

  • Wrapping Redis Connector with default setting and security.

Vector Pool:

  • Implemented numpy.memmap with High Performance and control memory IO.

Media:

Implemented OpenCV with:

To: improve read & write (image, video) IO speed.

  • Faster than OpenCV:

    • 2-6x in JPEG
    • 1.1x with others.
  • Added some function which used frequently.

  • More info: find in dpsutil.media

Computer Vision (cv):

  • Added Face Align with five landmark.

Distance:

  • Added cosine_similarity
  • Added cosine
  • Added euclidean_distance
  • Added convert distance functions

*Note: all function execute in numpy.

Attributes dict:

  • AttrDict: will help you get value of key via attributes. Implement attrdict.AttrDict
  • FixedDict: help cover your dict with (keys, values) that was defined before. Implement from AttrDict
  • FixedTypeDict: help cover your dict when set item. Implement from FixedDict.
  • UniqueTypeDict: dict only access one type for all element.

Environement:

  • Environment: Auto pair environment parameters fit with default, which provided before.

Other:

  • Hashing
  • Sort

Issue:


Cmake error during install blosc

Firstly, you need install scikit

$ pip install scikit-build

After that, follow instuction to install Cmake:

https://cliutils.gitlab.io/modern-cmake/chapters/intro/installing.html

Python

$ pip install cmake>=3.12   

Not found 'FFmpeg':

Find FFmppeg lib at:

https://www.ffmpeg.org/download.html

Linux:

sudo apt-get install ffmpeg

Not found 'libjpeg-turbo':

Find FFmppeg lib at:

https://libjpeg-turbo.org/Documentation/OfficialBinaries

Linux:

$ sudo apt install libturbojpeg

Not found Redis or Kafka server:

  • Make sure your Redis or Kafka server started.
  • Make sure correct username & password.

Not found 'Could NOT find OpenSSL':

SSL development libraries have to be installed

https://github.com/openssl/openssl#build-and-install

Ubuntu:

$ apt-get install libssl-dev libffi-dev

Develop by: TinDang
OS: Ubuntu Bionic 18.4
Python: 3.6.9 stable

dps_util's People

Contributors

tindang97 avatar

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.