Skip to content

Instantly share code, notes, and snippets.

View nandini-menon's full-sized avatar
🏡
Working from Home

Nandini Menon nandini-menon

🏡
Working from Home
  • CommVault | Be Ready
  • Kochi, Kerala, India
View GitHub Profile
@nandini-menon
nandini-menon / create_files.bat
Created July 31, 2020 10:05
Create files automatically
SETLOCAL ENABLEDELAYEDEXPANSION
@echo off
set numfiles=%1
set maxfilesize=%2
set destination=%3
if not defined destination set destination=C:\temp\
for /l %%x in (1, 1, %numfiles%) do (
SET /A randomsize=!RANDOM! * %maxfilesize% / 32768 + 1
@nandini-menon
nandini-menon / OneDrive_Upload.md
Last active July 30, 2020 10:26
Upload Files to OneDrive via API

Upload Files to OneDrive via API

The OneDrive API has two types of uploads:-

  • Simple Upload: For files < 4MB
  • Resumable Upload: For files > 4MB

The code for both has been provided below

Note: The Resumable upload works for files with size upto 100MB. When I tried with files with size greater than that, the upload kept failing

@nandini-menon
nandini-menon / Automate_OneNote.md
Last active December 31, 2022 00:53
Automate Creation of OneNote Notebooks

Automate OneNote Creation

The code for automating OneNote creation was written with a wider scope in mind. I intend on creating a wrapper package for the OneNote API. So, there are a lot of abstractions. If you need any clarifications, just ping me.

Azure App Requirements

Before executing this script, you need to have an App in the Azure AD with the following delegated permissions:-

  • Notes.Create
  • Notes.Read
@nandini-menon
nandini-menon / auto_create.bat
Last active July 15, 2020 10:18
Auto Creation of OneNote Notebooks
@echo off
for /d %%i in (Folder_Creation\*) do (
OneNoteCLI.exe importfolder -n "%%i" -r -d -p "%%i"
)

Keybase proof

I hereby claim: * I am nandini-menon on github. * I am nandinimenon (https://keybase.io/nandinimenon) on keybase. * I have a public key ASAKrraEmcoQQyg2R6GaKoOnEuxpX0DolW85B87nuyCr0Qo To claim this, I am signing this object:

{   "body": {     "key": {       "eldest_kid": "01200aaeb68499ca1043283647a19a2a83a712ec695f40e8956f3907cee7bb20abd10a",       "host": "keybase.io",       "kid": "01200aaeb68499ca1043283647a19a2a83a712ec695f40e8956f3907cee7bb20abd10a",       "uid": "7b2ba9c59453a9889795374023965a19",       "username": "nandinimenon"     },     "merkle_root": {       "ctime": 1584270892,       "hash": "339aa054a9b87e6ba90bf0720a11ef50db9a1e940ab98ef8a9bdd00fa9537300e8f70bcf1177cdff040b0c37a9b69e4780fbce65b27fde00b09369b9ff5731c6",       "hash_meta": "872af732ca9a9ac24cb4bd6fa8e5aeab1e854ddd64ec9cefa22d1e1a54b8708c",       "seqno": 15378968     },     "service": {       "entropy": "AO9Y6JuXuGw5+/kkkXk74OzW",       "name": "github",       "username": "nandini-menon"     },
@nandini-menon
nandini-menon / script.py
Created January 17, 2020 14:14
To get the details of all faculties in colleges registered with AICTE
import csv
from selenium import webdriver
from selenium.webdriver.common.by import By
def main():
id_list = list()
name_list = list()
with open('institute_list.csv', 'r') as csv_file: