Updated publish to give more information about failure and created html for 28 to 31 in ipython.
This commit is contained in:
241
ipython/EulerProblem028.html
Normal file
241
ipython/EulerProblem028.html
Normal file
File diff suppressed because one or more lines are too long
0
ipython/EulerProblem028.ipynb
Executable file → Normal file
0
ipython/EulerProblem028.ipynb
Executable file → Normal file
230
ipython/EulerProblem029.html
Normal file
230
ipython/EulerProblem029.html
Normal file
File diff suppressed because one or more lines are too long
8
ipython/EulerProblem029.ipynb
Executable file → Normal file
8
ipython/EulerProblem029.ipynb
Executable file → Normal file
@@ -26,7 +26,9 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
@@ -44,7 +46,7 @@
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"comopletion_date": "Fri, 25 Aug 2017, 10:03",
|
||||
"completion_date": "Fri, 25 Aug 2017, 10:03",
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
@@ -60,7 +62,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.6.3"
|
||||
"version": "3.5.4"
|
||||
},
|
||||
"tags": [
|
||||
"distinct",
|
||||
|
||||
244
ipython/EulerProblem030.html
Normal file
244
ipython/EulerProblem030.html
Normal file
File diff suppressed because one or more lines are too long
0
ipython/EulerProblem030.ipynb
Executable file → Normal file
0
ipython/EulerProblem030.ipynb
Executable file → Normal file
227
ipython/EulerProblem031.html
Normal file
227
ipython/EulerProblem031.html
Normal file
File diff suppressed because one or more lines are too long
22
ipython/EulerProblem031.ipynb
Executable file → Normal file
22
ipython/EulerProblem031.ipynb
Executable file → Normal file
@@ -18,14 +18,12 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"I really have mental issues to this in a non recursive way."
|
||||
"I really have mental issues to this in a non recursive way. So here we go with recursion."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -36,12 +34,18 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"\n",
|
||||
"def get_different_ways(remainder, coins):\n",
|
||||
" if not coins:\n",
|
||||
" return 1\n",
|
||||
" coin = coins[0]\n",
|
||||
" combinations = 1\n",
|
||||
" while remainder > 0:\n",
|
||||
" "
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"completion_date": "Fri, 25 Aug 2017, 13:02",
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
@@ -57,8 +61,12 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.6.3"
|
||||
}
|
||||
"version": "3.5.4"
|
||||
},
|
||||
"tags": [
|
||||
"recursion",
|
||||
"coins"
|
||||
]
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
|
||||
@@ -425,6 +425,60 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Problem 028</td>
|
||||
<td>Wed, 23 Aug 2017, 15:54</td>
|
||||
<td><a href="EulerProblem028.html">Problem 028</a></td>
|
||||
<td>
|
||||
|
||||
<kbd>spiral</kbd>
|
||||
|
||||
<kbd>diagonals</kbd>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Problem 029</td>
|
||||
<td>Fri, 25 Aug 2017, 10:03</td>
|
||||
<td><a href="EulerProblem029.html">Problem 029</a></td>
|
||||
<td>
|
||||
|
||||
<kbd>distinct</kbd>
|
||||
|
||||
<kbd>powers</kbd>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Problem 030</td>
|
||||
<td>Fri, 25 Aug 2017, 12:13</td>
|
||||
<td><a href="EulerProblem030.html">Problem 030</a></td>
|
||||
<td>
|
||||
|
||||
<kbd>digit</kbd>
|
||||
|
||||
<kbd>powers</kbd>
|
||||
|
||||
<kbd>brute force</kbd>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Problem 031</td>
|
||||
<td>Fri, 25 Aug 2017, 13:02</td>
|
||||
<td><a href="EulerProblem031.html">Problem 031</a></td>
|
||||
<td>
|
||||
|
||||
<kbd>recursion</kbd>
|
||||
|
||||
<kbd>coins</kbd>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Problem 067</td>
|
||||
<td>Fri, 5 Sep 2014, 07:36</td>
|
||||
|
||||
@@ -11,8 +11,11 @@ def extract_metadata(ipynb_file):
|
||||
Metadata = namedtuple('Metadata', ['tags', 'completion_date'])
|
||||
with open(ipynb_file, 'r') as f:
|
||||
j = json.load(f)
|
||||
tags = j['metadata']['tags']
|
||||
completion_date = j['metadata']['completion_date']
|
||||
try:
|
||||
tags = j['metadata']['tags']
|
||||
completion_date = j['metadata']['completion_date']
|
||||
except KeyError:
|
||||
raise Exception('Failed extracting meta from {}.'.format(ipynb_file))
|
||||
return Metadata(tags, completion_date)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user