Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Programming course
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
courses
Programming course
Commits
651ae78e
Commit
651ae78e
authored
10 years ago
by
Michiel van Galen
Browse files
Options
Downloads
Patches
Plain Diff
More notebook
parent
b61bab41
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
notebook.ipynb
+101
-37
101 additions, 37 deletions
notebook.ipynb
with
101 additions
and
37 deletions
notebook.ipynb
+
101
−
37
View file @
651ae78e
{
"metadata": {
"name": "",
"signature": "sha256:
bf6c651b1482834080a5bec22664d3f8b69e32fdf9036b00a12959d76f47d3b
e"
"signature": "sha256:
f32a4926b7461da7133e01bae5a7f9c6b580667534ff6f2af9832df26de9c88
e"
},
"nbformat": 3,
"nbformat_minor": 0,
...
...
@@ -613,9 +613,10 @@
" - $ ipython notebook\n",
"This opens a webbrowser and shows existing notebooks.\n",
" - Create a new notebook by clicking the 'New notebook' button.\n",
"A new tab will open with a fresh notebook.\n",
" - Rename your notebook to something useful by clicking on the current name (Untitled1).\n",
"Add the code shown below to some cells and run it by pressing the play button or shift+enter"
"A new tab will open with a fresh notebook. Rename your notebook to something useful\n",
" - Click on the current name (Untitled1) and edit this\n",
"Add the code shown below to some cells\n",
" - Add cells by pressen the '+' button or ALT+ENTER"
]
},
{
...
...
@@ -626,17 +627,8 @@
],
"language": "python",
"metadata": {},
"outputs": []
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"seq = 'GAATTC'"
],
"language": "python",
"metadata": {},
"outputs": []
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "code",
...
...
@@ -650,7 +642,8 @@
],
"language": "python",
"metadata": {},
"outputs": []
"outputs": [],
"prompt_number": 3
},
{
"cell_type": "code",
...
...
@@ -662,17 +655,8 @@
],
"language": "python",
"metadata": {},
"outputs": []
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print reverse(translate(seq))"
],
"language": "python",
"metadata": {},
"outputs": []
"outputs": [],
"prompt_number": 7
},
{
"cell_type": "heading",
...
...
@@ -994,13 +978,16 @@
]
},
{
"cell_type": "
markdown
",
"
metadata": {}
,
"
source
": [
"cell_type": "
code
",
"
collapsed": false
,
"
input
": [
"# Header 1\n",
"## Header 2\n",
"### Header 3"
]
],
"language": "python",
"metadata": {},
"outputs": []
},
{
"cell_type": "markdown",
...
...
@@ -1020,14 +1007,17 @@
]
},
{
"cell_type": "
markdown
",
"
metadata": {}
,
"
source
": [
"cell_type": "
code
",
"
collapsed": false
,
"
input
": [
"- A list\n",
" - A sublist\n",
" - Yet another level\n",
" - And so on"
]
],
"language": "python",
"metadata": {},
"outputs": []
},
{
"cell_type": "markdown",
...
...
@@ -1048,7 +1038,7 @@
]
},
{
"cell_type": "
markdown
",
"cell_type": "
raw
",
"metadata": {},
"source": [
"<table border=\"1\" style=\"width:200px\">\n",
...
...
@@ -1092,7 +1082,7 @@
]
},
{
"cell_type": "
markdown
",
"cell_type": "
raw
",
"metadata": {},
"source": [
"\\begin{equation*} \\left( \\sum_{k=1}^n a_k b_k \\right)^2 \\leq \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) \\end{equation*}\n"
...
...
@@ -1105,6 +1095,80 @@
"\\begin{equation*} \\left( \\sum_{k=1}^n a_k b_k \\right)^2 \\leq \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) \\end{equation*}\n"
]
},
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"\u00a7 Excercise : My next Notebook"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's add some markdown cells\n",
"- Select the top code cell, press ESC to go into command mode\n",
"- Press 'b', this will add a cell above the selected cell\n",
"- Notice the focus is on the new cell\n",
"- Now press 'm' to set the celltype to Markdown\n",
"- Press ENTER and add some text"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### My next notebook\n",
"[Michiel van Galen](mailto:m.van_galen@lumc.nl)"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"complements = {'A': 'T', 'C': 'G', 'T': 'A', 'G': 'C'} "
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 8
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"def translate(s):\n",
" c = ''\n",
" for i in s:\n",
" c = c + complements[i]\n",
" return c"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 9
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"def reverse(s):\n",
" rev = s[::-1]\n",
" return rev"
],
"language": "python",
"metadata": {},
"outputs": []
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
},
{
"cell_type": "heading",
"level": 1,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment