Skip to content

Instantly share code, notes, and snippets.

View MeAmarP's full-sized avatar
👨‍💻
On a Playground of coding

AMAR POTDAR MeAmarP

👨‍💻
On a Playground of coding
View GitHub Profile
@MeAmarP
MeAmarP / aliases.md
Created October 17, 2024 14:44
Essential Linux Aliases for Custom Commands

Most helpful Linux Custom Commands to boost productivity using 'alias'

Options to create

  1. $$Temporary:$$ Applies to the current terminal session.alias shortname='long command'
    • Example: alias ll='ls -alF'
  2. $$Permanent:$$ Add the alias to your shell's configuration file (e.g., ~/.bashrc)
    • Example:
      $ echo "alias ll='ls -alF'" >> ~/.bashrc
      $ source ~/.bashrc
      
@MeAmarP
MeAmarP / pdf_extract.py
Created February 28, 2024 18:12
extract pdf content page wise into json
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}")
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"