Unverified Commit f3e30afd authored by Guillaume Anciaux's avatar Guillaume Anciaux
Browse files

adding lecture of the day

parent 1933e4a6
None
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<title>talk slides</title>
<!-- Loading the init_reveal macro -->
<!-- Load and configure reveal -->
<script src="js-markdown-extra.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<!-- General and theme style sheets -->
<link rel="stylesheet" href="reveal.js/css/reveal.css">
<link rel="stylesheet" href="reveal.js/css/theme/simple.css" id="theme">
<!-- Loading the mathjax macro -->
<!-- Load mathjax -->
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>
<!-- MathJax configuration -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true,
processEnvironments: true
},
// Center justify equations in code and markdown cells. Elsewhere
// we use CSS to left justify single line equations in code cells.
displayAlign: 'center',
"HTML-CSS": {
styles: {'.MathJax_Display': {"margin": 0}},
linebreaks: { automatic: true }
}
});
</script>
<!-- End of mathjax configuration -->
<!-- Get Font-awesome from cdn -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.css">
<!-- End of reveal parts -->
<style type="text/css">
.reveal {
font-size: 16px;
}
.reveal h1 {
font-size: 200%;
}
.reveal h2 {
font-size: 150%;
}
.text_cell_render {
text-align: left;
}
a.anchor-link:link {
text-decoration: none;
visibility: hidden;
}
.slide {
}
div.slide{
border-style: solid;
border-width: 2px;
/* display: flex;*/
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
margin-top: 5px;
margin-bottom: 5px;
padding-left: 100px;
padding-right: 100px;
padding-top: 2px;
padding-bottom: 2px;
width: 1000px;
}
/*******************************
** highing tpart
*******************************/
.highlight_text {
color: blue;
}
.highlight-base {
color: #000;
}
.highlight-variable {
color: #000;
}
.highlight-variable-2 {
color: #1a1a1a;
}
.highlight-variable-3 {
color: #333333;
}
.highlight-string {
color: #BA2121;
}
.highlight-comment {
color: #408080;
font-style: italic;
}
.highlight-number {
color: #080;
}
.highlight-atom {
color: #88F;
}
.highlight-keyword {
color: #008000;
font-weight: bold;
}
.highlight-builtin {
color: #008000;
}
.highlight-error {
color: #f00;
}
.highlight-operator {
color: #AA22FF;
font-weight: bold;
}
.highlight-meta {
color: #AA22FF;
}
.highlight-def {
color: #00f;
}
.highlight-string-2 {
color: #f50;
}
.highlight-qualifier {
color: #555;
}
.highlight-bracket {
color: #997;
}
.highlight-tag {
color: #170;
}
.highlight-attribute {
color: #00c;
}
.highlight-header {
color: blue;
}
.highlight-quote {
color: #090;
}
.highlight-link {
color: #00c;
}
.highlight .hll { background-color: #ffffcc }
//.highlight { background: #f8f8f8; }
.highlight .c { color: #408080; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #008000; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #BC7A00 } /* Comment.Preproc */
.highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0044DD } /* Generic.Traceback */
.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008000 } /* Keyword.Pseudo */
.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #B00040 } /* Keyword.Type */
.highlight .m { color: #666666 } /* Literal.Number */
.highlight .s { color: #BA2121 } /* Literal.String */
.highlight .na { color: #7D9029 } /* Name.Attribute */
.highlight .nb { color: #008000 } /* Name.Builtin */
.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.highlight .no { color: #880000 } /* Name.Constant */
.highlight .nd { color: #AA22FF } /* Name.Decorator */
.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0000FF } /* Name.Function */
.highlight .nl { color: #A0A000 } /* Name.Label */
.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #19177C } /* Name.Variable */
.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #666666 } /* Literal.Number.Bin */
.highlight .mf { color: #666666 } /* Literal.Number.Float */
.highlight .mh { color: #666666 } /* Literal.Number.Hex */
.highlight .mi { color: #666666 } /* Literal.Number.Integer */
.highlight .mo { color: #666666 } /* Literal.Number.Oct */
.highlight .sa { color: #BA2121 } /* Literal.String.Affix */
.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
.highlight .sc { color: #BA2121 } /* Literal.String.Char */
.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.highlight .sx { color: #008000 } /* Literal.String.Other */
.highlight .sr { color: #BB6688 } /* Literal.String.Regex */
.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
.highlight .ss { color: #19177C } /* Literal.String.Symbol */
.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0000FF } /* Name.Function.Magic */
.highlight .vc { color: #19177C } /* Name.Variable.Class */
.highlight .vg { color: #19177C } /* Name.Variable.Global */
.highlight .vi { color: #19177C } /* Name.Variable.Instance */
.highlight .vm { color: #19177C } /* Name.Variable.Magic */
.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
</style>
</head>
<body>
<div class="reveal">
<div class="slides">
<section><section>
<div class="slide" style="float: left"><div class="full" style="width: 100%; float: left">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Documentation">Documentation<a class="anchor-link" href="#Documentation">&#182;</a></h1><ul>
<li>What do you expect for the documentation ?</li>
</ul>
</div>
</div></div>
</section><section>
<div class="slide" style="float: left"><div class="full" style="width: 100%; float: left">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Documentation">Documentation<a class="anchor-link" href="#Documentation">&#182;</a></h1><ul>
<li>For users: <ul>
<li>Examples</li>
<li>Manual</li>
</ul>
</li>
<li>For developpers: API description, procedures, FAQ<ul>
<li>Best way to make an API doc: source annotation</li>
</ul>
</li>
</ul>
</div>
</div></div>
</section></section><section><section>
<div class="slide" style="float: left"><div class="full" style="width: 100%; float: left">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Doxygen"><a href="http://www.doxygen.org/">Doxygen</a><a class="anchor-link" href="#Doxygen">&#182;</a></h1><ul>
<li>It is a standard tool for generating documentation from annotated C++ sources (and many others)</li>
<li>Attached comments will be parsed to form the generated documentation.</li>
<li><a href="https://www.stack.nl/~dimitri/doxygen/manual/docblocks.html">Doxygen documentation</a></li>
<li>installation: <div class="highlight"><pre><span></span>&gt; sudo apt install doxygen graphviz
</pre></div>
</li>
</ul>
</div>
</div></div>
</section><section>
<div class="slide" style="float: left"><div class="full" style="width: 100%; float: left">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Block-long-annotation">Block long annotation<a class="anchor-link" href="#Block-long-annotation">&#182;</a></h2><div class="highlight"><pre><span></span><span class="cm">/**</span>
<span class="cm"> * ... text ...</span>
<span class="cm"> */</span>
</pre></div>
<p>Example: class documentation:</p>
<div class="highlight"><pre><span></span><span class="cm">/**</span>
<span class="cm"> * This is my super cool class</span>
<span class="cm"> */</span>
<span class="k">class</span> <span class="nc">SuperCoolClass</span> <span class="p">{</span>
<span class="p">...</span>
<span class="p">};</span>
</pre></div>
</div>
</div></div>
</section><section>
<div class="slide" style="float: left"><div class="full" style="width: 100%; float: left">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Brief-description-(nicer-summary-style)">Brief description (nicer summary style)<a class="anchor-link" href="#Brief-description-(nicer-summary-style)">&#182;</a></h2><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">SuperCoolClass</span> <span class="p">{</span>
<span class="cm">/** \brief This is a simple positions accessor</span>
<span class="cm"> * This accessor gets the position</span>
<span class="cm"> */</span>
<span class="n">Vector</span> <span class="o">&amp;</span> <span class="nf">getPosition</span><span class="p">();</span>
<span class="p">};</span>
</pre></div>
<ul>
<li>You can provide the brief only </li>
</ul>
<div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">SuperCoolClass</span> <span class="p">{</span>
<span class="c1">/// This is a simple positions accessor</span>
<span class="n">Vector</span> <span class="o">&amp;</span> <span class="nf">getPosition</span><span class="p">();</span>
<span class="p">};</span>
</pre></div>
</div>
</div></div>
</section><section>
<div class="slide" style="float: left"><div class="full" style="width: 100%; float: left">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Documenting-arguments">Documenting arguments<a class="anchor-link" href="#Documenting-arguments">&#182;</a></h2><div class="highlight"><pre><span></span><span class="cm">/*!</span>
<span class="cm"> \param arg1 an integer argument.</span>
<span class="cm"> \param arg2 a double argument.</span>
<span class="cm"> \return The integer result</span>
<span class="cm"> foo function description</span>
<span class="cm">*/</span>
<span class="kt">int</span> <span class="nf">foo</span><span class="p">(</span><span class="kt">int</span> <span class="n">arg1</span><span class="p">,</span> <span class="kt">double</span> <span class="n">arg2</span><span class="p">);</span>
</pre></div>
</div>
</div></div>
</section><section>
<div class="slide" style="float: left"><div class="full" style="width: 100%; float: left">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Generating-the-documentation">Generating the documentation<a class="anchor-link" href="#Generating-the-documentation">&#182;</a></h2><ul>
<li><p>Configuring Doxygen produces a 'Doxygen' file.</p>
<p>The easiest way $\Longrightarrow$ using <em>doxywizard</em> application.</p>
</li>
</ul>
<ul>
<li>Launch doxygen to generate a html webpage:</li>
</ul>
<div class="highlight"><pre><span></span>doxygen Doxygen
</pre></div>
</div>
</div></div>
</section></section><section><section>
<div class="slide" style="float: left"><div class="full" style="width: 100%; float: left">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Python-docstring"><a href="http://epydoc.sourceforge.net/docstrings.html">Python docstring</a><a class="anchor-link" href="#Python-docstring">&#182;</a></h1><ul>
<li><a href="https://thomas-cokelaer.info/tutorials/sphinx/docstring_python.html">Cheat sheet</a> </li>
</ul>
</div>
</div></div>
</section><section>
<div class="slide" style="float: left"><div class="full" style="width: 100%; float: left">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Block-annotation">Block annotation<a class="anchor-link" href="#Block-annotation">&#182;</a></h2><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">SuperCoolClass</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> This is my annotation comments</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">myMethod</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> This is a method of the class</span>
<span class="sd"> &quot;&quot;&quot;</span>
</pre></div>
<p>Introspection during program run:</p>
<div class="highlight"><pre><span></span><span class="n">help</span><span class="p">(</span><span class="n">SuperCoolClass</span><span class="p">)</span>
</pre></div>
</div>
</div></div>
</section><section>
<div class="slide" style="float: left"><div class="full" style="width: 100%; float: left">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Pydoc"><a href="https://docs.python.org/3.6/library/pydoc.html">Pydoc</a><a class="anchor-link" href="#Pydoc">&#182;</a></h2><p>A simple documentation can be generated with</p>
<div class="highlight"><pre><span></span>&gt; pydoc module_name
</pre></div>
</div>
</div></div>
</section><section>
<div class="slide" style="float: left"><div class="full" style="width: 100%; float: left">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Sphinx"><a href="http://www.sphinx-doc.org/en/master/">Sphinx</a><a class="anchor-link" href="#Sphinx">&#182;</a></h1><ul>
<li>Installation: <div class="highlight"><pre><span></span>&gt; sudo apt install python3-sphinx
</pre></div>
</li>
<li><p>Configuring Sphinx produces a 'conf.py' and 'index.rst' files.</p>
<ul>
<li>The easiest way $\Longrightarrow$ using <em>sphinx-quickstart</em> and <em>sphinx-apidoc</em> applications</li>
</ul>
</li>
<li><p>Launch sphinx to generate a html webpage:</p>
</li>
</ul>
<div class="highlight"><pre><span></span>sphinx-build src dest
</pre></div>
<ul>
<li>Useful tutorials: <a href="http://www.sphinx-doc.org/en/master/usage/quickstart.html">sphinx-quickstart</a> and <a href="https://codeandchaos.wordpress.com/2012/07/30/sphinx-autodoc-tutorial-for-dummies/">sphinx-autodoc-tutorial-for-dummies</a></li>
</ul>
</div>
</div></div>
</section><section>
<div class="slide" style="float: left"><div class="full" style="width: 100%; float: left">
<div class="text_cell_render border-box-sizing rendered_html">
<div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">foo</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd">:param a: description</span>
<span class="sd">:param b: description</span>
<span class="sd">:type a: type description</span>
<span class="sd">:type b: type description</span>
<span class="sd">:return: return description</span>
<span class="sd">:rtype: the return type description</span>
<span class="sd">.. seealso:: blabla</span>
<span class="sd">.. warnings also:: blabla</span>
<span class="sd">.. note:: blabla</span>
<span class="sd">.. todo:: blabla</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="n">DO_SOMETHING</span>
</pre></div>
</div>
</div></div>
</section></section>
</div>
</div>
<!-- loads reveal -->
<script>
require(
{
// it makes sense to wait a little bit when you are loading
// reveal from a cdn in a slow connection environment
waitSeconds: 1
},
[
"reveal.js/lib/js/head.min.js",
"reveal.js/js/reveal.js"
],
function(head, Reveal){
Reveal.initialize({
//width: '1200px',
//height: '100%'
// margins: 0.1,
controls: true,
progress: true,
history: true,
transition: 'fade',
margin: 0.02,
progress: true,
slideNumber: true,
// Optional libraries used to extend on reveal.js plugins
dependencies: [
{ src: 'reveal.js/lib/js/classList.js',
condition: function() { return !document.body.classList; }
},
{ src: 'reveal.js/plugin/markdown/marked.js',
condition: function() { return !!document.querySelector( '[data-markdown]' ); }
},
{ src: 'reveal.js/plugin/markdown/markdown.js',
condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'reveal.js/plugin/highlight/highlight.js',
async: true, callback: function() { hljs.initHighlightingOnLoad(); }
},
{ src: 'reveal.js/plugin/zoom-js/zoom.js', async: true },
{ src: 'reveal.js/plugin/notes/notes.js',
async: true, condition: function() { return !!document.body.classList; }
}]});
var update = function(event){
if(MathJax.Hub.getAllJax(Reveal.getCurrentSlide())){
MathJax.Hub.Rerender(Reveal.getCurrentSlide());
}
};
Reveal.addEventListener('slidechanged', update);
}
);
$(document).ready(function(){
//$(".cell").css("width","90%");
//$(".cell").css("margin","0 auto");
//$(".output_area").css("text-align","center");
//$(".output_png").css("margin","0 auto");
//$("img").css("margin","0 auto");
//$(".output_html").css("margin", "0 auto");
//$(".output_latex").css("margin", "0 auto");
//$(".output_subarea").css("flex", "None");
$( "markdown" ).each(function( index ) {
$( this ).html(Markdown($( this ).text()));
});
})
</script>
</body>
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment