-
$$Temporary:$$ Applies to the current terminal session.alias shortname='long command'
- Example:
alias ll='ls -alF'
- Example:
-
$$Permanent:$$ Add the alias to your shell's configuration file (e.g.,~/.bashrc
)- Example:
$ echo "alias ll='ls -alF'" >> ~/.bashrc $ source ~/.bashrc
- Example:
This file contains 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 fitz | |
import json | |
def open_pdf_document(path): | |
"""Open a PDF document and return the document object.""" | |
try: | |
doc = fitz.open(path) | |
return doc | |
except Exception as e: | |
print(f"Failed to open document: {e}") |
This file contains 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 argparse | |
import glob | |
import numpy as np | |
import cv2 | |
# NOTE - This gist only to test Yolov2 model and New OpenCV DNN API | |
# https://pjreddie.com/darknet/yolov2/ | |
path_to_model_weight = "yolov2-voc.weights" |