Skip to content

Instantly share code, notes, and snippets.

Avatar
🖱️
Focusing

Shahzeb Qureshi antiproblemist

🖱️
Focusing
View GitHub Profile
@antiproblemist
antiproblemist / sitemap-generator.py
Created Jan 8, 2022
Convert excel sheet with URLs to Sitemap files (.xml)
View sitemap-generator.py
"""
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
@antiproblemist
antiproblemist / excel2sql.py
Created Mar 14, 2016
Convert complete excel workbook to SQLite database (All Sheets)
View excel2sql.py
'''
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