Skip to content

Instantly share code, notes, and snippets.

View arjitg's full-sized avatar
👋

Arjit Gupta arjitg

👋
View GitHub Profile
@arjitg
arjitg / movefiles.py
Created May 24, 2019 18:14
A script I whipped to automate moving files inside various folders collectively into another master folder. Around 70 GB of data was moved in a couple of minutes.
import os
import send2trash
source_root = "E:\\storage\\nexus6p"
destination = "E:\\storage\\nexus6p\\allpics"
#to move files from various subfolders to another folder. Takes care of repeated files too
for root, dirs, files in os.walk(source_root):
print("in {}, moving {} to {}".format(root, files, destination))
for file in files:
@arjitg
arjitg / Bit_Manipulation_Min_XOR_value.cpp
Created August 1, 2018 20:08
InterviewBit Bit Manipulation Min XOR value
/*
Given an array of N integers, find the pair of integers in the array which have minimum XOR value. Report the minimum XOR value.
Examples :
Input
0 2 5 7
Output
2 (0 XOR 2)
Input
0 4 7 9