Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
kaggle review 2017
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Nov 12, 2017
1 parent 53bda18 commit 455e225
Show file tree
Hide file tree
Showing 5 changed files with 482 additions and 18 deletions.
45 changes: 27 additions & 18 deletions _doc/notebooks/2016/ensae/kaggle_review_2016.ipynb
Expand Up @@ -12,9 +12,7 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand All @@ -23,12 +21,11 @@
"<script>\n",
"function repeat_indent_string(n){\n",
" var a = \"\" ;\n",
" for ( ; n > 0 ; --n) {\n",
" for ( ; n > 0 ; --n)\n",
" a += \" \";\n",
" }\n",
" return a;\n",
"}\n",
"var update_menu_string = function(begin, lfirst, llast, sformat, send, keep_item) {\n",
"var update_menu_string = function(begin, lfirst, llast, sformat, send, keep_item, begin_format, end_format) {\n",
" var anchors = document.getElementsByClassName(\"section\");\n",
" if (anchors.length == 0) {\n",
" anchors = document.getElementsByClassName(\"text_cell_render rendered_html\");\n",
Expand All @@ -41,9 +38,9 @@
" var href;\n",
" var tags = [];\n",
" var main_item = 0;\n",
" for (i = 0; i <= llast; i++) {\n",
" var format_open = 0;\n",
" for (i = 0; i <= llast; i++)\n",
" tags.push(\"h\" + i);\n",
" }\n",
"\n",
" for (i = 0; i < anchors.length; i++) {\n",
" text_memo += \"**\" + anchors[i].id + \"--\\n\";\n",
Expand All @@ -56,7 +53,7 @@
"break;\n",
" }\n",
" }\n",
" if (child == null){\n",
" if (child == null) {\n",
" text_memo += \"null\\n\";\n",
" continue;\n",
" }\n",
Expand Down Expand Up @@ -84,15 +81,16 @@
" continue ;\n",
" }\n",
" if (title.endsWith('\u00b6')) {\n",
" title = title.substring(0,title.length-1).replace(\"<\", \"&lt;\").replace(\">\", \"&gt;\").replace(\"&\", \"&amp;\")\n",
" title = title.substring(0,title.length-1).replace(\"<\", \"&lt;\")\n",
" .replace(\">\", \"&gt;\").replace(\"&\", \"&amp;\");\n",
" }\n",
"\n",
" if (title.length == 0) {\n",
" continue;\n",
" }\n",
"\n",
" while (level < memo_level) {\n",
" text_menu += \"</ul>\\n\";\n",
" text_menu += end_format + \"</ul>\\n\";\n",
" format_open -= 1;\n",
" memo_level -= 1;\n",
" }\n",
" if (level == lfirst) {\n",
Expand All @@ -106,22 +104,33 @@
" text_menu += \"<ul>\\n\";\n",
" memo_level += 1;\n",
" }\n",
" text_menu += repeat_indent_string(level-2) + sformat.replace(\"__HREF__\", href).replace(\"__TITLE__\", title);\n",
" text_menu += repeat_indent_string(level-2);\n",
" text_menu += begin_format + sformat.replace(\"__HREF__\", href).replace(\"__TITLE__\", title);\n",
" format_open += 1;\n",
" }\n",
" while (1 < memo_level) {\n",
" text_menu += \"</ul>\\n\";\n",
" text_menu += end_format + \"</ul>\\n\";\n",
" memo_level -= 1;\n",
" format_open -= 1;\n",
" }\n",
" text_menu += send;\n",
" //text_menu += \"\\n\" + text_memo;\n",
"\n",
" while (format_open > 0) {\n",
" text_menu += end_format;\n",
" format_open -= 1;\n",
" }\n",
" return text_menu;\n",
"};\n",
"var update_menu = function() {\n",
" var sbegin = \"\";\n",
" var sformat = '<li><a href=\"#__HREF__\">__TITLE__</a></li>';\n",
" var sformat = '<a href=\"#__HREF__\">__TITLE__</a>';\n",
" var send = \"\";\n",
" var begin_format = '<li>';\n",
" var end_format = '</li>';\n",
" var keep_item = -1;\n",
" var text_menu = update_menu_string(sbegin, 2, 4, sformat, send, keep_item);\n",
" var text_menu = update_menu_string(sbegin, 2, 4, sformat, send, keep_item,\n",
" begin_format, end_format);\n",
" var menu = document.getElementById(\"my_id_menu_nb\");\n",
" menu.innerHTML=text_menu;\n",
"};\n",
Expand Down Expand Up @@ -210,7 +219,7 @@
"[kaggle](https://www.kaggle.com/c/predicting-red-hat-business-value)\n",
"\n",
"* **Objectif :** d\u00e9terminer le potentiel d'un client, ce potentiel est d\u00e9termin\u00e9 par la r\u00e9alisation d'un \u00e9v\u00e9nement dans une fen\u00eatre de temps\n",
"* **Donn\u00e9es :** les donn\u00e9e contiennent des informations sur les utilisateurs et sur leurs actions\n",
"* **Donn\u00e9es :** les donn\u00e9es contiennent des informations sur les utilisateurs et sur leurs actions\n",
"\n",
"[Red Hat Business Value Competition, 1st Place Winner's Interview: Darius Baru\u0161auskas](http://blog.kaggle.com/2016/11/03/red-hat-business-value-competition-1st-place-winners-interview-darius-barusauskas/)"
]
Expand Down Expand Up @@ -414,7 +423,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
"version": "3.6.1"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 455e225

Please sign in to comment.