Skip to content

Instantly share code, notes, and snippets.

@cwalv
Created March 22, 2016 00:35
Show Gist options
  • Save cwalv/8300617c68f7985506ac to your computer and use it in GitHub Desktop.
Save cwalv/8300617c68f7985506ac to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"name": "",
"signature": "sha256:44e7860ca41e78be3a4e1869b82bdaa659b3fff63b28227ab96bf9280e4a66e1"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"import numpy as np"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"x=map(float, r'''1.35%\n",
"1.03%\n",
"0.63%\n",
"28.99%\n",
"7.19%\n",
"0.51%\n",
"0.82%\n",
"0.22%\n",
"0.00%\n",
"0.11%\n",
"0.39%\n",
"'''.split('%\\n')[:-1])"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 2
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"np.average(x)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 3,
"text": [
"3.7490909090909086"
]
}
],
"prompt_number": 3
},
{
"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