Skip to content

Instantly share code, notes, and snippets.

View jspalink's full-sized avatar

Jonathan Spalink jspalink

View GitHub Profile
@jspalink
jspalink / s3_stats.py
Created April 20, 2020 17:01
Provide a bit better insight into storage costs associated with S3 buckets.
import boto3
import datetime
import json
from collections import namedtuple
import tempfile
import time
import statistics
import argparse
import os
import pickle
@jspalink
jspalink / ec2_instances.py
Created April 16, 2020 18:47
List EC2-Instances
"""
Generate a list of EC2 instances with the information that I most need to see, including estimated monthly prices.
Add a line to your .bash_profile like this:
alias list='/usr/local/bin/python3 /path/to/ec2_instances.py'
This assumes that you have aws cli installed...
"""
@jspalink
jspalink / classify-social.py
Last active March 30, 2016 15:14
Example of how to use econtext-api-python-client to quickly classify social content
import requests
from econtextclient.classify.social import Social
session = requests.Session()
session.auth = (username, password)
session.headers.update({'Content-type':'application/json'})
tweets = [
"How to Optimize Your Content for Google's Featured Snippet Box http://hubs.ly/H02vJnW0 #SEO "
"SEO & Content Marketing Expert. I Tweet Industry News That Is Actually Worth Reading!"