Skip to content

Instantly share code, notes, and snippets.

View techedlaksh's full-sized avatar
🏠
Finding the right opportunities

Laksh Arora techedlaksh

🏠
Finding the right opportunities
View GitHub Profile
@techedlaksh
techedlaksh / remove_attribute.sh
Last active April 18, 2023 14:59
shell script to remove file attribute in macos, "file can not be changed because it is in use" error
find . -maxdepth 1 -type f \( -name "*.MOV" -or -name "*.mov" \) -exec echo {} \; -exec xattr -d com.apple.FinderInfo {} \;
@techedlaksh
techedlaksh / global-gitignore-setup.md
Last active October 20, 2021 14:09
global gitignore

Setup for Mac / Linux

git config --global core.excludesfile ~/.gitignore

Global .gitignore content

# Custom folder
ignore
sudo apt-get install build-essential
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
mkdir ~/Documents/temp
cd ~/Documents/temp
git clone https://github.com/opencv/opencv.git
cd opencv
git checkout 3.3.1
cd ..
git clone https://github.com/opencv/opencv_contrib.git
@techedlaksh
techedlaksh / p_workshop_proposal.md
Last active July 19, 2017 22:49
Workshop Proposal for Prabhant's college

Workshop Instructor Information

  • Name: [Laksh Arora][1]

  • Organisation: PyData Delhi

  • Phone: +919871569215

  • Background : Co-Organiser of PyData Delhi, Data Science Enthusiast

Workshop Information Overview

  • Title: Introduction to CNN and Advanced Application

  • Length: 90-120 min

  • Proposed Date: Before 1st week of August

# library
import numpy as np
# b_size is batch size
# inp_dim is input dimension
# hid_dim is hidden dimension
# out_dim is output dimension
b_size, inp_dim, hid_dim, out_dim = 64, 1000, 100, 10
# Create random dataset
import os
import opencv as cv2
train_folder = 'path/to/Image_folder'
image_paths = [os.listdir(x[0]) for x in os.walk(train_folder)]
for a in image_paths:
resized_a = cv2.resize(a, (32, 32))
import cv2
import numpy as np
# from keras.models import load_model
rgb = cv2.VideoCapture(1)
facec = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
font = cv2.FONT_HERSHEY_SIMPLEX
# d_faces = np.load('./dataset/face_data.npy')
# l_faces = np.load('./dataset/face_lab.npy')
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
import os
import cv2
train_folder = 'GTRSB/train/GTSRB/Final_Training/Images'
image_paths = [os.listdir(x[0]) for x in os.walk(train_folder)]
@techedlaksh
techedlaksh / zipping.py
Created May 17, 2017 20:22
zipping the folder and changing the extension
import os
import shutil
from tkinter import Tk
from tkinter import filedialog
import zipfile
def select_folder():
root = Tk()
root.withdraw()
class LiFailed():
pass
class TrFailed():
pass
try:
# whole code of li structure
if a == " ":