Skip to content

Instantly share code, notes, and snippets.

View xandaschofield's full-sized avatar

Xanda Schofield xandaschofield

View GitHub Profile
@xandaschofield
xandaschofield / image_header.py
Last active April 18, 2016 00:34
Create header for CS Facebook group
# coding: utf-8
import math
import os
import random
import urllib2
# BeautifulSoup: http://www.crummy.com/software/BeautifulSoup/
from bs4 import BeautifulSoup
# PIL: http://www.pythonware.com/products/pil/
@xandaschofield
xandaschofield / image_approval.py
Last active May 25, 2017 18:20
Quick application to allow someone to look through images and approve or disapprove them.
#!/usr/bin/env python3
import argparse
import os
import sys
from PIL import Image, ImageTk
import tkinter as tk
@xandaschofield
xandaschofield / fightinwords.py
Last active December 11, 2017 06:39
Quick code to plots significant values with words (based on FightinWords from jmhessel)
#!/usr/bin/env python
# Adapted from https://github.com/jmhessel/FightingWords
import matplotlib
matplotlib.use('Agg')
from matplotlib import pyplot as plt
import numpy as np
import seaborn as sns
from sklearn.feature_extraction.text import CountVectorizer as CV
import string