Skip to content

Instantly share code, notes, and snippets.

View shubham1810's full-sized avatar
💭
Thinking

Shubham Dokania shubham1810

💭
Thinking
View GitHub Profile
@shubham1810
shubham1810 / events
Created November 4, 2014 15:14
python script using facebook graph API to know about the events
import facepy, collections, time
token = "XXXX"
def convert(data):
if isinstance(data, basestring):
return str(data)
elif isinstance(data, collections.Mapping):
return dict(map(convert, data.iteritems()))
elif isinstance(data, collections.Iterable):
@shubham1810
shubham1810 / prank
Created November 4, 2014 15:12
python script to continously open the cd-drive of any PC
'''__author__ = "Shubham Dokania"
# This script will keep on opening the cd player
# of a linux pc in every 5 seconds in an infinite loop
import os, time
time.sleep(5)
while 1:
try:
os.system("eject cdrom")