python -m pip install poetry
poetry new quick-show
poetry publish --build
cd .github/workflows/publish.yml
python -m pip install build
python -m build
🏄♂️
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
def deskew(im, max_skew=10): | |
height, width = im.shape | |
# Create a grayscale image and denoise it | |
im_gs = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) | |
im_gs = cv2.fastNlMeansDenoising(im_gs, h=3) |
git-lfs
is kinda of pointer hash which has infomation about file address of cloud data stroage.
- You can uploade and manage revision of large file (>100MB)
- git-lfs give you 1GB for free, and you can upload 1.5GB (If you use over 1.5GB, git-lfs will be locked until you pay for it.)
For more infomations
[1] https://git-lfs.com/
[2] http://arfc.github.io/manual/guides/git-lfs
import sys
from pathlib import Path
file = Path(__file__).resolve()
package_root_directory = file.parents[1]
sys.path.append(str(package_root_directory))
https://pypi.org/project/pylint/
pip install pylint
pyreverse -k -o dot /path/to/library
You can view the classes.dot with the command:
-
Sphinx
https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html -
Install VSC extension - change config to 'shpinx'
https://marketplace.visualstudio.com/items?itemName=njpwerner.autodocstring
python -m ipykernel install --user --name myvenv --display-name myvenv
poetry init
poetry add [django]
poetry build
import gc
gc.collect()
import torch
torch.cuda.empty_cache()
tf.keras.backend.clear_session()
When a multidimensional embedded array is saved as a string in a CSV file, you can load it back and convert the string-formatted array into an array object.
def convert(item):
item = item.strip()
item = item[1:-1]
item = np.fromstring(item, sep=' ')
return item
OlderNewer