Skip to content

Instantly share code, notes, and snippets.

View shailendra9292's full-sized avatar

Shailendra Pratap Singh shailendra9292

View GitHub Profile
@shailendra9292
shailendra9292 / dlAttachments.py
Last active April 9, 2019 11:36 — forked from baali/dlAttachments.py
Python script to download all gmail attachments.(python3)
import email
import getpass, imaplib
import os
import sys
detach_dir = '.'
if 'attachments' not in os.listdir(detach_dir):
os.mkdir('attachments')
userName = input('Enter your GMail username:')
@shailendra9292
shailendra9292 / middle_node.py
Created July 16, 2018 04:21
find middle node in a link list in python
class node:
def __init__(self, data=None):
self.data = data
self.next = None
class linked_list:
def __init__(self):
self.head = None
@shailendra9292
shailendra9292 / LinklLst.py
Created July 16, 2018 04:18
Link list insertion and deletion implementation in python
class node:
def __init__(self, data=None):
self.data = data
self.next = None
class linked_list:
def __init__(self):
@shailendra9292
shailendra9292 / palindrome.py
Created July 16, 2018 04:12
link list is palindrome or not in Python
class node:
def __init__(self, data=None):
self.data = data
self.next = None
class linked_list:
def __init__(self):
@shailendra9292
shailendra9292 / merge_sort.py
Last active July 16, 2018 04:08
Merge sort in Python
def merge(left,right):
i=j=0
result =[]
while i < len(left) and j < len(right):
if left[i] <= right[j]:
result.append(left[i])
i+=1
else:
result.append(right[j])