Skip to content

Instantly share code, notes, and snippets.

View antiproblemist's full-sized avatar
🖱️
Focusing

Shahzeb Qureshi antiproblemist

🖱️
Focusing
View GitHub Profile
@antiproblemist
antiproblemist / sitemap-generator.py
Created January 8, 2022 11:38
Convert excel sheet with URLs to Sitemap files (.xml)
"""
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
"""
import pandas as pd
from lxml import etree
from tqdm import tqdm
from datetime import datetime

Keybase proof

I hereby claim:

  • I am antiproblemist on github.
  • I am jinkazama (https://keybase.io/jinkazama) on keybase.
  • I have a public key ASCfTy5ycRxjT9CZvoypT8GL-WC3_X9dQyAtc44e9gQXrgo

To claim this, I am signing this object:

@antiproblemist
antiproblemist / excel2sql.py
Created March 14, 2016 11:54
Convert complete excel workbook to SQLite database (All Sheets)
'''
This code uses the openpyxl package for playing around with excel using Python code
to convert complete excel workbook (all sheets) to an SQLite database
The code assumes that the first row of every sheet is the column name
Every sheet is stored in a separate table
The sheet name is assigned as the table name for every sheet
'''
import sqlite3
import openpyxl