Skip to content

Instantly share code, notes, and snippets.

@vinovator
vinovator / ConsolidatePDF.py
Created Apr 5, 2020
From a given folder, consolidate all PDFs into one
View ConsolidatePDF.py
# -*- coding: utf-8 -*-
"""
Python 3
ConsolidatePDF.py
From a given folder, consolidate all PDFs into one
"""
from PyPDF2 import PdfFileMerger
import os
@vinovator
vinovator / Consolidate_excel_sheets_with formatting
Created Apr 30, 2019
Parse through multiple excel files in a folder hierarchy and consolidate Using win32com library so that sheets get copied with formatting intact
View Consolidate_excel_sheets_with formatting
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 16 15:45:52 2019
@author: Vinoth_Subramanian
Parse through multiple excel files in a folder heirarchy and consolidate
Using win32com library so that sheets get copied with formatting intact
"""
import os
View Consolidate_excel_sheets.py
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 16 15:45:52 2019
@author: Vinoth_Subramanian
Parse through multiple excel files in a folder heirarchy and consolidate
Only limitation - Since the copy is done through pandas, only the values -
- from the sheets will be copied. Formulas and formatting will be ignored
"""
@vinovator
vinovator / azure_ocr.py
Last active Jul 27, 2017
Python script to analyze and read text from image URLs using Micorost Azure Cognitive services OCR API
View azure_ocr.py
# azure_ocr.py
# Python 3.5
"""
Python script to analyze and read text from image URLs using Micorost Azure Cognitive services OCR API
"""
from IGNORE import azure_secrets # To fetch API endpoint and key
import requests
import json
@vinovator
vinovator / wma_finder.py
Created Mar 29, 2017
Find files of a specific extension from a root directory and delete them !!
View wma_finder.py
# wma_finder.py
# Python 3.5
import os
path = "D:\Vinoth\Songs"
file_extn = ".wma
file_count = 0
with open(path + "\wma_deleted.txt", "a") as del_log:
View UKBschools.py
# UKBschools.py
# Python 3.5
"""
Scrap the list of all accredated BSchools in UK from find-mba.com
export the list to excel
"""
import requests
View find-mba.py
# uk_mba.py
# Python 2.7.6
"""
Extract business schools in UK with AACSB, AMBA and/or EQUIS accredition only
Scapring from http://find-mba.com/
"""
import requests
from bs4 import BeautifulSoup
@vinovator
vinovator / vinbot.py
Created Aug 25, 2016
Python script to listen and respond to commands sent to Telegram bot. Uses telepot library.
View vinbot.py
# vinbot.py
# Python 3.5
"""
@vin_robot is my telegram bot; telegram.me/vin_robot
This python script listens to commands sent to bot and responds accordingly
"""
import telepot
@vinovator
vinovator / vin_bot_hello.py
Created Aug 17, 2016
Python app to interact with Telegram bot
View vin_bot_hello.py
# vin_bot_hello.py
# Python 2.7.6
"""
Python app to interact with Telegram bot
"""
import telepot
import time
@vinovator
vinovator / print_docs.py
Created May 26, 2016
Print all documents from set of folders using default printer
View print_docs.py
# print_docs.py
# Python 2.7.6
"""
Print all documents from set of folders using default printer
"""
import os
import win32print
import win32api