Skip to content

Instantly share code, notes, and snippets.

View theharshbhatia's full-sized avatar

Harsh Bhatia theharshbhatia

View GitHub Profile
# Rename mp3 files to naming convention of no number and no special character and hence making your music library cool again to read
# run this file in using terminal in music directory by command ./Mp3FileNameBeautify.sh
# and you are welcome to contribute, customize or whatever.
# suggestions are welcomed
# by - HARSH BHATIA
for i in *.mp3;
do
src=$i
# remove mp3 from name
tgt=$(echo $i | sed -E 's/(.mp3)//g')
@theharshbhatia
theharshbhatia / Notifier.py
Created April 13, 2014 14:32
Python file to notify change in folder from a specific point.
import os,datetime
import os.path, time
from os.path import join, getsize
ct=datetime.datetime.now() #current time
# folderpath="/Users/harshbhatia/Desktop/buyingiq/" #folderpath you want to check for modified files
#pushd \\fileserver\Study Material ||all materials go to z drive atomatically
folderpath="/Volumes/Study Material/Computer Science & IT/Even Sem 2014/"
print "NOTLOG for Mac\n"
print "Choose Your Directory"
numofdays=int(raw_input("Please enter days of your absence(eg. 2 ): \n"))
import os,sys,stat
import collections
from collections import defaultdict
filelist= []
list2=[]
newline=[]
filedict=defaultdict(list)
address="/Users/harshbhatia/Downloads"
# XML to json converter ...
#can be modified to change the format
# by Hash 113
f=open("quotes.xml","r")
e=open("Data.txt","w")
i=0
for line in f:
if len(line)>13:
line=line.lstrip()
line=line.rstrip()
#"Convert text file into xml"
#by Hash113
k=[]
q=open("quote.txt")
d=open("final.txt",'w')
i=0
w=q.readlines()
for i in range(0,len(w)-1):
f=w[i]
a=w[i+1]