Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
EPUG
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
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
Bio-IT
EPUG
Commits
1941a563
Commit
1941a563
authored
8 years ago
by
Jelle Scholtalbers
Browse files
Options
Downloads
Patches
Plain Diff
add environment enabling mistake
parent
699cf6ab
No related branches found
No related tags found
1 merge request
!3
added another example in the notebook
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
meetings/mistakes-01032017/Mistakes.ipynb
+19
-4
19 additions, 4 deletions
meetings/mistakes-01032017/Mistakes.ipynb
with
19 additions
and
4 deletions
meetings/mistakes-01032017/Mistakes.ipynb
+
19
−
4
View file @
1941a563
...
...
@@ -83,15 +83,30 @@
]
},
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
"outputs": [],
"source": []
"source": [
"Whats wrong here... \n",
"```bash\n",
"\n",
"conda create -n giphy python=3\n",
"conda install Flask\n",
" (..)\n",
" Package plan for installation in environment /Users/scholtal/anaconda:\n",
" (..)\n",
" The following packages will be UPDATED:\n",
" (..)\n",
" The following packages will be DOWNGRADED due to dependency conflicts:\n",
" (..)\n",
"\n",
"```\n",
"\n",
"Spot the missing ``source activate giphy``...."
]
}
],
"metadata": {
...
...
%% Cell type:code id: tags:
```
python
# this can be a shortcut to assign None to multiple variables
x
=
y
=
z
=
None
z
=
1
print
(
x
,
y
,
z
)
```
%% Output
(None, None, 1)
%% Cell type:code id: tags:
```
python
# BAD: this is probably not what you wanted
u
=
i
=
o
=
[]
o
.
append
(
"
x
"
)
print
(
u
,
i
,
o
)
```
%% Output
(['x'], ['x'], ['x'])
%% Cell type:code id: tags:
```
python
# BAD: the original list you pass to the method will get updated!
def
my_method
(
mutable_list
=
[]):
mutable_list
.
append
(
'
x
'
)
return
mutable_list
# a list out of the my_method scope
a_list
=
[
'
a
'
]
b_list
=
my_method
(
mutable_list
=
a_list
)
# a_list get modified!
print
(
a_list
==
b_list
,
a_list
,
b_list
)
```
%% Output
(True, ['a', 'x'], ['a', 'x'])
%% Cell type:code id: tags:
%% Cell type:markdown id: tags:
Whats wrong here...
```
bash
conda create
-n
giphy
python
=
3
conda
install
Flask
(
..
)
Package plan
for
installation
in
environment /Users/scholtal/anaconda:
(
..
)
The following packages will be UPDATED:
(
..
)
The following packages will be DOWNGRADED due to dependency conflicts:
(
..
)
```
python
```
Spot the missing
``source activate giphy``
....
...
...
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