From 5a8b5df65390bc15843d5f37e0efb8f62b1be971 Mon Sep 17 00:00:00 2001 From: dupre Date: Tue, 19 May 2015 22:00:43 +0200 Subject: [PATCH] documentation, license, biblio, blog --- LICENSE.txt | 37 ++++++++--------- README.rst | 7 ++++ .../sphinxdoc/source/blog/2015/2015-05-19.rst | 12 ++++++ _doc/sphinxdoc/source/coding_party_1.rst | 5 ++- _doc/sphinxdoc/source/getting_started.rst | 13 +++--- _doc/sphinxdoc/source/glossary.rst | 9 +++++ _doc/sphinxdoc/source/index.rst | 7 ++++ _doc/sphinxdoc/source/projets/jeux_seul.rst | 3 +- setup.py | 40 +------------------ .../automation/ftp_publish_helper.py | 8 ++-- 10 files changed, 69 insertions(+), 72 deletions(-) create mode 100644 _doc/sphinxdoc/source/blog/2015/2015-05-19.rst diff --git a/LICENSE.txt b/LICENSE.txt index 7506e6547..1d7d4bd8f 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,24 +1,19 @@ -Copyright (c) 2014, Xavier Dupré -All rights reserved. +Copyright (c) 2014-2015, Xavier Dupré -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the distribution. -Neither the names of its contributors may be used to endorse or promote products derived -from this software without specific prior written permission. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, -OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.rst b/README.rst index b591aeae0..6737513ff 100644 --- a/README.rst +++ b/README.rst @@ -15,6 +15,13 @@ README / Changes :alt: PYPI Package :target: https://pypi.python.org/pypi/ensae_teaching_cs +.. image:: http://img.shields.io/github/issues/sdpython/ensae_teaching_cs.png + :alt: GitHub Issues + :target: https://github.com/sdpython/ensae_teaching_cs/issues + +.. image:: https://img.shields.io/badge/license-MIT-blue.svg + :alt: MIT License + :target: http://opensource.org/licenses/MIT This page gives access to the content of practical sessions I give at the `ENSAE `_. They are based on Python. The project diff --git a/_doc/sphinxdoc/source/blog/2015/2015-05-19.rst b/_doc/sphinxdoc/source/blog/2015/2015-05-19.rst new file mode 100644 index 000000000..03a170286 --- /dev/null +++ b/_doc/sphinxdoc/source/blog/2015/2015-05-19.rst @@ -0,0 +1,12 @@ + +.. _l-blog-velib: + +.. blogpost:: + :title: Prédire l'occupation des vélib + :keywords: velib, prédiction, article + :date: 2015-05-18 + :categories: article, velib, machine learning + + C'est un article sur une façon d'exploiter les données d'un service de vélos dans une grande ville : + `Predicting Occupancy Trends in Barcelona's Bicycle Service Stations Using Open Data `_. + Modèle ARIMA et Random Forest. \ No newline at end of file diff --git a/_doc/sphinxdoc/source/coding_party_1.rst b/_doc/sphinxdoc/source/coding_party_1.rst index 134f536f9..090546967 100644 --- a/_doc/sphinxdoc/source/coding_party_1.rst +++ b/_doc/sphinxdoc/source/coding_party_1.rst @@ -1,4 +1,4 @@ - + .. issue. @@ -147,5 +147,8 @@ vous pouvez reproduire la solution de l'appariement dans ce notebook : `Déterminer la vitesse moyenne des vélib `_. +Suite possible +-------------- +Voir :ref:`l-blog-velib`. diff --git a/_doc/sphinxdoc/source/getting_started.rst b/_doc/sphinxdoc/source/getting_started.rst index 1c1590ed1..a92978942 100644 --- a/_doc/sphinxdoc/source/getting_started.rst +++ b/_doc/sphinxdoc/source/getting_started.rst @@ -1,4 +1,4 @@ - + Getting started @@ -36,22 +36,23 @@ les modules les plus usités. Deux options possibles : Il suffit d'écrire sur la ligne de commande ``conda update --all`` pour mettre à jour tous les modules. -* `WinPython `_ (Windows). Sous Windows, elle a l'avantage d'inclure - `R `_ ou `Julia `_. On passe alors +* `WinPython `_ (Windows). Sous Windows, elle inclut + parfois `R `_ ou `Julia `_ (ces version ne sont + pas aussi à jour que la version principale). On passe alors facilement de python à R ou Julia depuis le même notebooks. Pour suivre ces cours il faut ajouter : - * `bokeh `_ (`Windows `_) + * `bokeh `_ * `dbfread `_ * `folium `_ * `goslate `_ * `graphviz `_ - * `pywin32 `_ (`Windows `_) * `virtualenv `_ Uniquement disponible sous Windows, cette installation a l'avantage de ne pas nécessiter les droits administrateur pour être installée. Elle ne modifie pas les registres et on peut la recopier telle quelle sur une clé USB - pour la recopier sur un autre ordinateur. + pour la recopier sur un autre ordinateur. On peut également préparer sa propre version + `How To Make WinPython `_. * Distribution officielle de `python `_, il faut ensuite installer de nombreux modules (voir :ref:`l-data2a`) pour obtenir diff --git a/_doc/sphinxdoc/source/glossary.rst b/_doc/sphinxdoc/source/glossary.rst index 4daa58daf..868ddc28d 100644 --- a/_doc/sphinxdoc/source/glossary.rst +++ b/_doc/sphinxdoc/source/glossary.rst @@ -127,6 +127,15 @@ Glossaire Sa syntaxe est décrite à `Markdown: Syntax `_. A l'instar du langage Python, il utilise l'indentation pour marquer la séparation entre les blocs. + Mock + Il est difficile de tester un programme qui lance des requêtes sur un service sans que ce + service soit activé comme par exemple récupérer des données financières sur Internet + sans Internet. Lorsqu'on veut s'assuser qu'une fonction qui communique avec un service fonctionne, + on créé ce qu'on appelle un mock : on créé un faux service qui retourne des réponses assez courtes + afin de tester la partie qu'on a besoin de tester. Ce genre de système permet de tester séparément le service + et la partie qui communique avec ce service. Lire également `Mock Object `_, + `Unit test et Mock `_. + Mutable Voir Immutable. diff --git a/_doc/sphinxdoc/source/index.rst b/_doc/sphinxdoc/source/index.rst index 7bcf37575..74684fbb7 100644 --- a/_doc/sphinxdoc/source/index.rst +++ b/_doc/sphinxdoc/source/index.rst @@ -247,3 +247,10 @@ Index :alt: PYPI Package :target: https://pypi.python.org/pypi/ensae_teaching_cs +.. image:: http://img.shields.io/github/issues/sdpython/ensae_teaching_cs.png + :alt: GitHub Issues + :target: https://github.com/sdpython/ensae_teaching_cs/issues + +.. image:: https://img.shields.io/badge/license-MIT-blue.svg + :alt: MIT License + :target: http://opensource.org/licenses/MIT \ No newline at end of file diff --git a/_doc/sphinxdoc/source/projets/jeux_seul.rst b/_doc/sphinxdoc/source/projets/jeux_seul.rst index 95d1e2a6b..75c3e063a 100644 --- a/_doc/sphinxdoc/source/projets/jeux_seul.rst +++ b/_doc/sphinxdoc/source/projets/jeux_seul.rst @@ -1,4 +1,4 @@ - + .. _l-proj_jeux_seul: Jeux de réflexion qui se jouent seul @@ -43,6 +43,7 @@ Quelques liens : * `2048 `_ * `2048 : la solution pour gagner (presque) à tous les coups `_ +* `Threes!, Fives, 1024!, and 2048 are Hard `_ .. _l-jeuvoronoi: diff --git a/setup.py b/setup.py index f76381ede..c78ccb88b 100644 --- a/setup.py +++ b/setup.py @@ -1,42 +1,4 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2014 --------------- -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# -# 3. All advertising materials mentioning features or use of this -# software must display the following acknowledgment: -# "This product includes software developed by -# Xavier Dupré " -# -# 4. Redistributions of any form whatsoever must retain the following -# acknowledgment: -# "This product includes software developed by -# Xavier Dupré ." -# -# THIS SOFTWARE IS PROVIDED BY Xavier Dupré ``AS IS'' AND ANY -# EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Roman V. Kiseliov OR -# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -# OF THE POSSIBILITY OF SUCH DAMAGE. - import sys import os from distutils.core import setup @@ -59,7 +21,7 @@ 'Intended Audience :: Developers', 'Topic :: Scientific/Engineering', 'Topic :: Education', - 'License :: OSI Approved :: BSD License', + 'License :: OSI Approved :: MIT License', 'Development Status :: 5 - Production/Stable' ] diff --git a/src/ensae_teaching_cs/automation/ftp_publish_helper.py b/src/ensae_teaching_cs/automation/ftp_publish_helper.py index 6a6e36d9e..9e4c403db 100644 --- a/src/ensae_teaching_cs/automation/ftp_publish_helper.py +++ b/src/ensae_teaching_cs/automation/ftp_publish_helper.py @@ -151,7 +151,7 @@ def publish_documentation( #"code_beatrix", "ensae_teaching_cs", ] : - + root = os.path.abspath(location % module) project = dict ( status_file = os.path.join(this, "status_%s.txt" % module), local = root, @@ -160,9 +160,9 @@ def publish_documentation( .replace("anaconda2_", "") \\ .replace("_27", "")) projects.append (project) - - # doc - + + # doc + project = dict ( status_file = os.path.join(this, "status_%s.txt" % module), local = root.replace("\\html","\\html2"), root_local = root.replace("\\html","\\html2"),