Skip to main content

A mini package for daily tasks

Project description

TACV - A mini package for daily tasks

Installation

pip install tacv

Examples

File utils

Get all file paths from a directory

from tacv.fileUtils.fileutils import get_all_files
file_paths = get_all_files("dir_name")

Returns a list of file absolute paths, for example

['./venvCondaTest/x86_64-conda_cos6-linux-gnu/bin/ld', './venvCondaTest/conda-meta/_libgcc_mutex-0.1-main.json', './venvCondaTest/conda-meta/xz-5.2.5-h7b6447c_0.json', './venvCondaTest/conda-meta/wheel-0.37.1-pyhd3eb1b0_0.json', './venvCondaTest/conda-meta/setuptools-58.0.4-py36h06a4308_0.json', './venvCondaTest/conda-meta/ca-certificates-2021.10.26-h06a4308_2.json', './venvCondaTest/conda-meta/readline-8.1.2-h7f8727e_1.json', './venvCondaTest/conda-meta/sqlite-3.37.2-hc218d9a_0.json', './venvCondaTest/conda-meta/libgcc-ng-9.3.0-h5101ec6_17.json', './venvCondaTest/conda-meta/ncurses-6.3-h7f8727e_2.json']

Save/load json data to/from file

from tacv.fileUtils.fileutils import save_json,load_json

json_file = "myfile.json"
json_data = {"name":"Ta","age":100}
# save json
save_json(json_file,json_data)
# load json
json_data = load_json(json_file)

Visual

Draw 2D points onto an image

import cv2
from tacv.visual.draw2d import draw_points
image = cv2.imread("myimage.jpg")
points = [(18,19),(55,55),(102,22),(66,22)]
draw_points(image,points,circular=True,color=(0,255,0),thickness=2)
cv2.imwrite("new_image.jpg",image)

For more

Visit test.py file

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tacv-1.0.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tacv-1.0.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file tacv-1.0.2.tar.gz.

File metadata

  • Download URL: tacv-1.0.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.11

File hashes

Hashes for tacv-1.0.2.tar.gz
Algorithm Hash digest
SHA256 690190c754d2336673e0188b2f0b26e5e3a11bae6c2284f4d32482f1a13aeaf4
MD5 866d8d672d3c58979789257ced9998f9
BLAKE2b-256 83c8bfbb8bc52e696853ee153f9db95c66c976674ee89221b7b816be3bfa5124

See more details on using hashes here.

File details

Details for the file tacv-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: tacv-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.11

File hashes

Hashes for tacv-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a52ceb123bcaace904758689d7cda478301045d7c5e116e8a382ae65e634950b
MD5 ecdea620461420026533ea3dcb417e84
BLAKE2b-256 b18e41d73cab7a3d22dfc4b9640c277175224f38d8e2df0dfc5aff6ddcaa55c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page