Skip to content

Instantly share code, notes, and snippets.

@nrrb
Last active August 29, 2015 14:09
Show Gist options
  • Save nrrb/4b2998388852db8d5025 to your computer and use it in GitHub Desktop.
Save nrrb/4b2998388852db8d5025 to your computer and use it in GitHub Desktop.
ChiPy Mentoring Roll Call
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"name": "",
"signature": "sha256:c9fe68d1349cab2e887f7df119e77d91f35d82f5d21a9d7f67444ce1dbe39c9d"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"from random import shuffle\n",
"from IPython.display import HTML\n",
"\n",
"remaining = [\"Gang\", \"Paige\", \"Jessica\", \"Paul\", \"Tom\", \"Chris\", \"Rahul\", \"Japhy\", \"Seth\", \"Michael\", \"Feihong\", \"Albert\", \"Zachary\", \"Don\", \"Adam\", \"Roman\"]\n",
"completed = [\"Nick\", \"Jason\", \"T\", \"Valentina\", \"Tanya\", \"Ben\", \"Vince\", \"Randy\", \"Samuel\", \"Claire\"]\n",
"\n",
"shuffle(remaining)\n",
"next_up = remaining.pop()\n",
"remaining.sort()\n",
"\n",
"HTML('<span style=\"font-size: 300%;\"><strong>{name}</strong> is next up!</span>'.format(name=next_up))"
],
"language": "python",
"metadata": {},
"outputs": [
{
"html": [
"<span style=\"font-size: 300%;\"><strong>Gang</strong> is next up!</span>"
],
"metadata": {},
"output_type": "pyout",
"prompt_number": 1,
"text": [
"<IPython.core.display.HTML at 0x1044ee1d0>"
]
}
],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print \"Remaining: {0}\".format(remaining)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Remaining: ['Adam', 'Albert', 'Chris', 'Don', 'Feihong', 'Japhy', 'Jessica', 'Michael', 'Paige', 'Paul', 'Rahul', 'Roman', 'Seth', 'Tom', 'Zachary']\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment