Skip to content

Instantly share code, notes, and snippets.

View dsdanielpark's full-sized avatar
🏄‍♂️
Believe in your potential. May the Force be with us.

MinWoo(Daniel) Park dsdanielpark

🏄‍♂️
Believe in your potential. May the Force be with us.
View GitHub Profile
@dsdanielpark
dsdanielpark / gist:8377f2f7db73a1d6252a6f1b157964d2
Created March 2, 2023 03:52
ValueError: attempted relative import beyond top-level package
import sys
from pathlib import Path
file = Path(__file__).resolve()
package_root_directory = file.parents[1]
sys.path.append(str(package_root_directory))

git-lfs

What is git-lfs??

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
@dsdanielpark
dsdanielpark / pypi_release.md
Last active March 7, 2023 06:43
pypi_release
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
@dsdanielpark
dsdanielpark / deskew.py
Created June 21, 2022 00:16 — forked from russss/deskew.py
Automatic scanned image rotation/deskew with OpenCV
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)