Skip to content

Instantly share code, notes, and snippets.

@raykendo
raykendo / viewGoogleMaps.py
Created February 19, 2020 05:54
A Python Script for automating looking up addresses on Google Maps
#!/usr/bin/python
# viewGoogleMaps.py
# author: Ken Doman (github.com/raykendo)
# purpose: Looking up addresses through Google Maps automagically
# requirements: python 2 or 3, selenium for python
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
@raykendo
raykendo / mssql_connect.py
Created September 17, 2020 19:55
Connecting To SQL Server using Python 3
#!/usr/bin/env python3
# an example of connecting to a SQL Server database using Python 3
# automatically closes the db connection after use
import pyodbc
from contextlib import contextmanager
# pyodbc wiki: https://github.com/mkleehammer/pyodbc/wiki
# example based on https://docs.microsoft.com/en-us/sql/connect/python/pyodbc/step-3-proof-of-concept-connecting-to-sql-using-pyodbc?view=sql-server-ver15