Skip to content

Instantly share code, notes, and snippets.

@urschrei
Last active October 6, 2015 02:28
Show Gist options
  • Save urschrei/2919719 to your computer and use it in GitHub Desktop.
Save urschrei/2919719 to your computer and use it in GitHub Desktop.
How many women has GitHub hired since May 2011?
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
import requests
gh_url = "https://github.com/blog/%s"
titles = []
# all posts since the 19th of May 2011
for r in xrange(858, 1395):
soup = BeautifulSoup(requests.get(gh_url % r).content)
titles.append(soup.html.head.title.text)
hiring_announcements = 0
for title in titles:
if u"GitHubber" in title:
hiring_announcements += 1
print(title)
print("Total hires", hiring_announcements)
# hiring_announcements is now 121
# Ordered List is a company, so let's drop that to 120
# Fourteen of those hires are female
# That's 11.66%.
# I assume gaug.es and Ordered List have some female employees.
# Their enumeration is left as an exercise for the reader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment