Skip to content

Instantly share code, notes, and snippets.

@EthanRosenthal
Last active May 17, 2017 14:26
Show Gist options
  • Save EthanRosenthal/89234938b18f19b7090a84d3820e44df to your computer and use it in GitHub Desktop.
Save EthanRosenthal/89234938b18f19b7090a84d3820e44df to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import collections\n",
"import random\n",
"\n",
"import matplotlib.patches as patches\n",
"import matplotlib.pyplot as plt\n",
"import pandas as pd\n",
"from names import get_full_name\n",
"import numpy as np\n",
"\n",
"random.seed(2017)\n",
"np.random.seed(2017)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Bride: Laura Hubbard\n",
"Groom: George Tuttle\n"
]
}
],
"source": [
"num_guests = 120\n",
" \n",
"bride = get_full_name(gender='female')\n",
"groom = get_full_name(gender='male')\n",
"\n",
"# Make guests a set so we don't get any duplicates\n",
"guests = set([bride, groom])\n",
"while len(guests) < num_guests:\n",
" guest = get_full_name()\n",
" guests.add(guest)\n",
"\n",
"guests = list(guests)\n",
"print('Bride: {}'.format(bride))\n",
"print('Groom: {}'.format(groom))"
]
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python [conda root]",
"language": "python",
"name": "conda-root-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment