Skip to content

Commit d0ded09

Browse files
committed
scikit learn
1 parent e5c221a commit d0ded09

3 files changed

Lines changed: 103 additions & 17 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,4 +149,6 @@ GitHub repository [One-Python-benchmark-per-day](https://github.com/rasbt/One-Py
149149

150150
- [Cython](http://cython.org) - C-extensions for Python, an optimizing static compiler to combine Python and C code
151151

152-
- [Numba](http://numba.pydata.org) - an just-in-time specializing compiler which compiles annotated Python and NumPy code to LLVM (through decorators)
152+
- [Numba](http://numba.pydata.org) - an just-in-time specializing compiler which compiles annotated Python and NumPy code to LLVM (through decorators)
153+
154+
- [scikit-learn](http://scikit-learn.org/stable/) - a powerful machine learning library for Python and tools for efficient data mining and analysis

tutorials/awesome_things_ipynb.ipynb

Lines changed: 97 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@
299299
"cell_type": "code",
300300
"collapsed": false,
301301
"input": [
302-
"%debug \n",
303302
"def some_func():\n",
304303
" var = 'hello world'\n",
305304
" for i in range(5):\n",
@@ -309,6 +308,18 @@
309308
],
310309
"language": "python",
311310
"metadata": {},
311+
"outputs": [],
312+
"prompt_number": 1
313+
},
314+
{
315+
"cell_type": "code",
316+
"collapsed": false,
317+
"input": [
318+
"%debug\n",
319+
"some_func()"
320+
],
321+
"language": "python",
322+
"metadata": {},
312323
"outputs": [
313324
{
314325
"output_type": "stream",
@@ -320,21 +331,6 @@
320331
"\u001b[0m\u001b[0;32m 6 \u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0;34m'finished'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
321332
"\u001b[0m\n"
322333
]
323-
},
324-
{
325-
"name": "stdout",
326-
"output_type": "stream",
327-
"stream": "stdout",
328-
"text": [
329-
"ipdb> var\n"
330-
]
331-
},
332-
{
333-
"output_type": "stream",
334-
"stream": "stdout",
335-
"text": [
336-
"'hello world'\n"
337-
]
338334
}
339335
]
340336
},
@@ -858,6 +854,91 @@
858854
],
859855
"prompt_number": 55
860856
},
857+
{
858+
"cell_type": "code",
859+
"collapsed": false,
860+
"input": [
861+
"def hello_world():\n",
862+
" \"\"\"This is a hello world example function.\"\"\"\n",
863+
" print('Hello, World!')"
864+
],
865+
"language": "python",
866+
"metadata": {},
867+
"outputs": [],
868+
"prompt_number": 7
869+
},
870+
{
871+
"cell_type": "code",
872+
"collapsed": false,
873+
"input": [
874+
"%pdoc hello_world"
875+
],
876+
"language": "python",
877+
"metadata": {},
878+
"outputs": [],
879+
"prompt_number": 9
880+
},
881+
{
882+
"cell_type": "code",
883+
"collapsed": false,
884+
"input": [
885+
"%pdef hello_world"
886+
],
887+
"language": "python",
888+
"metadata": {},
889+
"outputs": [
890+
{
891+
"output_type": "stream",
892+
"stream": "stdout",
893+
"text": [
894+
" \u001b[0mhello_world\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
895+
" "
896+
]
897+
}
898+
],
899+
"prompt_number": 10
900+
},
901+
{
902+
"cell_type": "code",
903+
"collapsed": false,
904+
"input": [
905+
"%psource math.mean()"
906+
],
907+
"language": "python",
908+
"metadata": {},
909+
"outputs": [
910+
{
911+
"output_type": "stream",
912+
"stream": "stdout",
913+
"text": [
914+
"Object `math.mean()` not found.\n"
915+
]
916+
}
917+
],
918+
"prompt_number": 15
919+
},
920+
{
921+
"cell_type": "code",
922+
"collapsed": false,
923+
"input": [
924+
"from math import sqrt"
925+
],
926+
"language": "python",
927+
"metadata": {},
928+
"outputs": [
929+
{
930+
"ename": "ImportError",
931+
"evalue": "cannot import name 'mean'",
932+
"output_type": "pyerr",
933+
"traceback": [
934+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)",
935+
"\u001b[0;32m<ipython-input-16-fdd1a06c836a>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mmath\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmean\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
936+
"\u001b[0;31mImportError\u001b[0m: cannot import name 'mean'"
937+
]
938+
}
939+
],
940+
"prompt_number": 16
941+
},
861942
{
862943
"cell_type": "code",
863944
"collapsed": false,

tutorials/hello_world.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
def hello_world():
2+
"""This is a hello world example function."""
3+
print('Hello, World!')

0 commit comments

Comments
 (0)