This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pptPlay.py | |
# Python 2.76 | |
# Importing python-pptx module | |
from pptx import Presentation | |
# This is the template based on which PPT will be created | |
# If None is passed then blank ppt with no slides will be created | |
PPT_TEMPLATE = None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tktk.py | |
# Python 2.7.6 | |
""" | |
A simple form that prompts for name and prints it back | |
""" | |
import Tkinter as tk # use "tkinter" for python 3.x | |
# All widgets belong to a parent which is defined first |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python 2.7.6 | |
# extractXmlFromXl.py | |
""" | |
Script to download all xml files from the urls specified in the excel report | |
Requires requests and openpyxl modules | |
""" | |
import requests | |
from requests.auth import HTTPDigestAuth # To access url with digest authentication |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python 2.7.6 | |
# myDecorator.py | |
""" | |
A simple decorator example in python | |
""" | |
class SimpleClass: | |
""" | |
A simple class with add and subtract methods, undecorated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RateCalculator.py | |
# Python 2.7.6 | |
""" | |
A python program that makes use of decorator. Our imaginary software | |
consultant/ contractor uses this program to generate invoice for his | |
various services | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gistsDownloader.py | |
# Python 3.4 | |
import requests | |
username = "vinovator" | |
url = "https://api.github.com/users/" + username + "/gists" | |
resp = requests.get(url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python 2.7.6 | |
# Cricinfoscraper_py2.py | |
""" | |
Simple webscraper to download cartoons from cricinfo site. | |
The url is http://www.espncricinfo.com/ci/content/story/author.html?author=333 | |
Changed the code to dynamically scroll the page to fetch more cartoons. | |
Using Splinter/ Selenium library to fetch javascript rendered content | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OutlookMailer.py | |
# Python 2.7.6 | |
import win32com.client as com | |
outlook = com.Dispatch("Outlook.Application") | |
""" | |
Source - https://msdn.microsoft.com/en-us/library/office/ff869291.aspx | |
Outlook VBA Reference |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# keywordExtractor.py | |
# Python 2.7.6 | |
import requests | |
import re | |
from collections import Counter | |
""" | |
Step 1: Obtain Text | |
Step 2: Strip punctuation, special characters, etc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# UdacityDownload.py | |
# Python 2.7.6 | |
""" | |
Python script to download course content from udacity courses | |
- Creates folders as per course names | |
- Downloads all the zip files | |
- Extract content from zip file | |
- Finally delete the zip file | |
Multiple course content can be downloaded from list |