Skip to content

Commit cca891d

Browse files
committed
updated
1 parent a9002bc commit cca891d

File tree

2 files changed

+29
-19
lines changed

2 files changed

+29
-19
lines changed

README.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,40 @@
11
# Python Snippets
22

3-
These __Python Snippets__ are tested with Python 3.5.x. (http://conda.pydata.org/)
3+
These __Python Snippets__ are tested with Python 3.5.x. All snippets are
4+
available as Jupyter notebooks (http://jupyter.org/).
5+
46

57
## Get started...
68
To get started create a virtual environment and install the required packages.
7-
The following example shows how to create an environment with _conda_ and Python 3.5 with
9+
10+
### Virtualenv
11+
The following example shows how to create an environment with
12+
_"virtualenv"_ (https://virtualenv.pypa.io/)
13+
and Python 3.5 with the required packages.
14+
15+
```bash
16+
virtualenv --python=/usr/bin/python3.5 py35-ps
17+
18+
source py35-ps/bin/activate
19+
20+
pip install -r requirements.txt
21+
```
22+
23+
### Conda
24+
The following example shows how to create an environment with _"conda"_
25+
(http://conda.pydata.org/) and Python 3.5 with
826
the required packages.
927

1028
```bash
11-
conda create -n py35-ps python=3.5 -f requirements.txt
29+
conda create -n py35-ps python=3.5
1230

1331
source activate py35-ps
1432

1533
pip install -r requirements.txt
1634
```
1735

18-
## The snippets...
36+
## The Python Snippets
37+
The snippets are organized by topic.
1938

2039
__GeoJSON__
2140
- [GeoJSON Example - Stations](geojson/geojson_stations.ipynb)

rss/feedparser.ipynb

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"metadata": {},
66
"source": [
77
"# Parse a RSS feed with feedparser\n",
8-
"In this Python snippte we use the feedparser package to parse a RSS feed from 'Medium'. \n",
8+
"In this Python snippet we use the feedparser package to parse a RSS feed from 'Medium'. \n",
99
"- https://medium.com/feed/tag/machine-learning"
1010
]
1111
},
@@ -112,34 +112,25 @@
112112
" print('-->', urls[0], '\\n')\n",
113113
" "
114114
]
115-
},
116-
{
117-
"cell_type": "code",
118-
"execution_count": null,
119-
"metadata": {
120-
"collapsed": true
121-
},
122-
"outputs": [],
123-
"source": []
124115
}
125116
],
126117
"metadata": {
127118
"kernelspec": {
128-
"display_name": "Python 3",
119+
"display_name": "Python 2",
129120
"language": "python",
130-
"name": "python3"
121+
"name": "python2"
131122
},
132123
"language_info": {
133124
"codemirror_mode": {
134125
"name": "ipython",
135-
"version": 3
126+
"version": 2
136127
},
137128
"file_extension": ".py",
138129
"mimetype": "text/x-python",
139130
"name": "python",
140131
"nbconvert_exporter": "python",
141-
"pygments_lexer": "ipython3",
142-
"version": "3.5.2"
132+
"pygments_lexer": "ipython2",
133+
"version": "2.7.12"
143134
}
144135
},
145136
"nbformat": 4,

0 commit comments

Comments
 (0)