Skip to content

Instantly share code, notes, and snippets.

View kkraoj's full-sized avatar

Krishna Rao kkraoj

View GitHub Profile
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.cluster import SpectralClustering
# Download https://www.hindustantimes.com/static/iframes/language_probability_map/data.csv
df = pd.read_csv('data.csv', index_col=0)
@shanealynn
shanealynn / python batch geocoding.py
Last active September 10, 2024 19:44
Geocode as many addresses as you'd like with a powerful Python and Google Geocoding API combination
"""
Python script for batch geocoding of addresses using the Google Geocoding API.
This script allows for massive lists of addresses to be geocoded for free by pausing when the
geocoder hits the free rate limit set by Google (2500 per day). If you have an API key for paid
geocoding from Google, set it in the API key section.
Addresses for geocoding can be specified in a list of strings "addresses". In this script, addresses
come from a csv file with a column "Address". Adjust the code to your own requirements as needed.
After every 500 successul geocode operations, a temporary file with results is recorded in case of
script failure / loss of connection later.
Addresses and data are held in memory, so this script may need to be adjusted to process files line
@PurpleBooth
PurpleBooth / README-Template.md
Last active November 17, 2024 02:42
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites