Skip to content

Instantly share code, notes, and snippets.

View linwoodc3's full-sized avatar

Linwood Creekmore linwoodc3

  • United States
View GitHub Profile
@linwoodc3
linwoodc3 / gg.py
Created March 17, 2019 13:05
testing code editor
timeit -n 100 geohash.encode(36.056595, -112.125092)
[Out]: 992 ns ± 21.4 ns per loop (mean ± std. dev. of 7 runs, 100 loops each)
THE SHAME OF SAN JOAQUIN
WGAw #1834463
FADE IN:
EXT. SUBDIVISION - MORNING
A peculiar wind blows snowflakes past a wall guarding the
entrance to a neighborhood that reads “SAN JOAQUIN ESTATES”.
In a black Mustang idling at the curb sits BOBBY GONZALEZ, a
directionless young man with a hard look and disheveled hair.
THE SHAME OF SAN JOAQUIN
WGAw #1834463
FADE IN:
EXT. SUBDIVISION - MORNING
A peculiar wind blows snowflakes past a wall guarding the
entrance to a neighborhood that reads “SAN JOAQUIN ESTATES”.
In a black Mustang idling at the curb sits BOBBY GONZALEZ, a
directionless young man with a hard look and disheveled hair.
@linwoodc3
linwoodc3 / SOAP_working.ipynb
Created July 1, 2018 11:25
A working example of using zeep to query a SOAP service
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@linwoodc3
linwoodc3 / index.html
Last active June 5, 2018 12:15
sample html for sage.
<!DOCTYPE html>
<html>
<title>QB-Spective</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
body { font-family: sans-serif; }
@linwoodc3
linwoodc3 / style.css
Created April 22, 2018 03:01
A simple css file for the QB web app.
body {
background-color: #E5E5FF;
}
img.resize {
max-width:70%;
max-height:70%;
}
#the-string {
display: none;
}
@linwoodc3
linwoodc3 / index.html
Created April 22, 2018 03:00
Simple front end for machine learning web application demo
<!DOCTYPE html>
<html>
<title>QB-Spective</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
body { font-family: sans-serif; }
@linwoodc3
linwoodc3 / timenormalize.py
Last active October 18, 2017 11:29
Get a timezone string from a latitude and longitude pair for timezone normalization.
# Created by: Linwood Creekmore III
# valinvescap@gmail.com
from tzwhere import tzwhere
tz = tzwhere.tzwhere()
import numpy as np
def getT(x):
try:
latitude=x[1]
@linwoodc3
linwoodc3 / worldDataframes.py
Last active October 1, 2017 15:11
Python code to create geodataframe for countries, lakes, and oceans for geospatial analysis in Python. Use geopandas and Python 2 or download the
#Author: Linwood Creekmore
#Date: October 1, 2017
# Instructions:
"""
Download and use my shapefilereader function in Python 2 OR just download the linked zip to your computer and read using geopandas
gist to shapefilereader - > https://gist.github.com/linwoodc3/72b2f24b6d2ff6ffde1597f1ca2dea3f
"""
@linwoodc3
linwoodc3 / utilities.py
Last active April 2, 2024 15:35
A python script to scrape text from websites. This works surprisingly well on most news websites when you have the URL to the story. Use GDELT urls for the best results.
# Author: Linwood Creekmore
# Email: valinvescap@gmail.com
# Description: Python script to pull content from a website (works on news stories).
#Licensed under GNU GPLv3; see https://choosealicense.com/licenses/lgpl-3.0/ for details
# Notes
"""
23 Oct 2017: updated to include readability based on PyCon talk: https://github.com/DistrictDataLabs/PyCon2016/blob/master/notebooks/tutorial/Working%20with%20Text%20Corpora.ipynb
18 Jul 2018: added keywords and summary