Test for Binder v2

Sys & OS modules

In [6]:
import sys

print("Path (sys.path):")
for f in sys.path:
    print(f)
Path (sys.path):

/usr/lib/python36.zip
/usr/lib/python3.6
/usr/lib/python3.6/lib-dynload
/home/lilian/.local/lib/python3.6/site-packages
/usr/local/lib/python3.6/dist-packages
/usr/local/lib/python3.6/dist-packages/dot2tex-2.11.dev0-py3.6.egg
/usr/local/lib/python3.6/dist-packages/autorun-0.1.dev20171103-py3.6.egg
/usr/local/lib/python3.6/dist-packages/sphinxcontrib_cheeseshop-0.2.dev20171103-py3.6.egg
/usr/local/lib/python3.6/dist-packages/sphinxcontrib_youtube-1.0.dev20171103-py3.6.egg
/usr/local/lib/python3.6/dist-packages/sphinxcontrib_bitbucket-1.0-py3.6.egg
/usr/local/lib/python3.6/dist-packages/sphinxcontrib_googleanalytics-0.1.dev20180228-py3.6.egg
/usr/local/lib/python3.6/dist-packages/sphinxcontrib_gnuplot-0.1.dev20180308-py3.6.egg
/usr/lib/python3/dist-packages
/usr/local/lib/python3.6/dist-packages/IPython/extensions
/home/lilian/.ipython
In [4]:
import os
In [5]:
print("Current directory:")
print(os.getcwd())
Current directory:
/home/lilian/publis/notebooks

Importing a file

I will import this file from the agreg/ sub-folder.

In [8]:
import agreg.memoisation
3 secondes...
13
4 secondes...
100
3 secondes...
13
0 secondes !
13
3 secondes...
13
3 secondes...
13
4 secondes...
100
0 secondes !
100
Test de fibo() non mémoisée :
F_0 = 1
F_1 = 1
F_2 = 2
F_3 = 3
F_4 = 5
F_5 = 8
F_6 = 13
F_7 = 21
F_8 = 34
F_9 = 55
Test de fibo() mémoisée (plus rapide) :
F_0 = 1
F_1 = 1
F_2 = 2
F_3 = 3
F_4 = 5
F_5 = 8
F_6 = 13
F_7 = 21
F_8 = 34
F_9 = 55
Test de factorielle() mémoisée :
0! = 0
1! = 1
2! = 2
3! = 6
4! = 24
5! = 120
6! = 720
7! = 5040
8! = 40320
9! = 362880

Conclusion

It seems to work as wanted.