add an article

add an article : Advice for designing your own libraries
This commit is contained in:
redoules 2018-10-30 10:30:44 +01:00
parent 5afcfbd44a
commit e03520abd8
44 changed files with 361 additions and 72 deletions

View File

@ -286,7 +286,7 @@ maxuploadtarget=5000
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -161,7 +161,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -366,6 +366,7 @@
</div>
<div class="panel-body">
<ul>
<li><a href="./python/design_own_libs.html">Advice for designing your own libraries</a></li>
<li><a href="./python/ensure_dir.html">Safely creating a folder if it doesn't exist</a></li>
<li><a href="./python/list_files_directory.html">List all files in a directory</a></li>
<li><a href="./python/Opening_file.html">Opening a file with python</a></li>
@ -669,7 +670,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -149,7 +149,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -211,7 +211,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -144,7 +144,7 @@ However, you can use the following command to do it </p>
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -143,7 +143,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -200,7 +200,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -148,7 +148,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -167,7 +167,7 @@ none 0 0 0 - /config
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -256,7 +256,7 @@ wifi0 Link encap:UNSPEC HWaddr 5C-51-4F-41-7A-AD-00-00-00-00-00-00-00-00-00
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -172,7 +172,7 @@ USER;PID;%CPU;%MEM;VSZ;RSS;TTY;STAT;START;TIME;COMMAND</p>
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -158,7 +158,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -151,7 +151,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -160,7 +160,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -493,7 +493,7 @@ Confusion matrix, without normalization
</pre></div>
<div class="highlight"><pre><span></span>{&#39;classifier__C&#39;: 5.0, &#39;vectorizer__ngram_range&#39;: (1, 1), &#39;vectorizer__preprocessor&#39;: &lt;function mask_integers at 0x00000237491B67B8&gt;, &#39;vectorizer__stop_words&#39;: &#39;english&#39;}
<div class="highlight"><pre><span></span>{&#39;classifier__C&#39;: 5.0, &#39;vectorizer__ngram_range&#39;: (1, 1), &#39;vectorizer__preprocessor&#39;: &amp;lt;function mask_integers at 0x00000237491B67B8&amp;gt;, &#39;vectorizer__stop_words&#39;: &#39;english&#39;}
0.711180124224
Accuracy = 71.2%
Confusion matrix, without normalization
@ -506,16 +506,16 @@ Confusion matrix, without normalization
ValueError Traceback (most recent call last)
&lt;ipython-input-9-3e0781e307fb&gt; in &lt;module&gt;()
&amp;lt;ipython-input-9-3e0781e307fb&amp;gt; in &amp;lt;module&amp;gt;()
25 pipeline_performance(testing.label, predicted_labels)
26
---&gt; 27 print_top_features(pipeline1, n_features=10)
---&amp;gt; 27 print_top_features(pipeline1, n_features=10)
C:\Users\Guillaume\Documents\Code\recommandation\utils\plotting.py in print_top_features(pipeline, vectorizer_name, classifier_name, n_features)
81 def print_top_features(pipeline, vectorizer_name=&#39;vectorizer&#39;, classifier_name=&#39;classifier&#39;, n_features=7):
82 vocabulary = np.array(pipeline.named_steps[vectorizer_name].get_feature_names())
---&gt; 83 coefs = pipeline.named_steps[classifier_name].coef_[0]
---&amp;gt; 83 coefs = pipeline.named_steps[classifier_name].coef_[0]
84 top_feature_idx = np.argsort(coefs)
85 top_features = vocabulary[top_feature_idx]
@ -523,7 +523,7 @@ C:\Users\Guillaume\Documents\Code\recommandation\utils\plotting.py in print_top_
C:\Users\Guillaume\Anaconda3\lib\site-packages\sklearn\svm\base.py in coef_(self)
483 def coef_(self):
484 if self.kernel != &#39;linear&#39;:
--&gt; 485 raise ValueError(&#39;coef_ is only available when using a &#39;
--&amp;gt; 485 raise ValueError(&#39;coef_ is only available when using a &#39;
486 &#39;linear kernel&#39;)
487
@ -807,7 +807,7 @@ C:\Users\Guillaume\Anaconda3\lib\site-packages\sklearn\naive_bayes.py:801: Runti
self.feature_log_prob_ = (np.log(smoothed_fc) -
{&#39;classifier__alpha&#39;: 0.25, &#39;classifier__fit_prior&#39;: True, &#39;vectorizer__ngram_range&#39;: (1, 1), &#39;vectorizer__preprocessor&#39;: &lt;function mask_integers at 0x00000237491B67B8&gt;, &#39;vectorizer__stop_words&#39;: &#39;english&#39;}
{&#39;classifier__alpha&#39;: 0.25, &#39;classifier__fit_prior&#39;: True, &#39;vectorizer__ngram_range&#39;: (1, 1), &#39;vectorizer__preprocessor&#39;: &amp;lt;function mask_integers at 0x00000237491B67B8&amp;gt;, &#39;vectorizer__stop_words&#39;: &#39;english&#39;}
0.805900621118
Accuracy = 78.1%
Confusion matrix, without normalization
@ -1002,7 +1002,7 @@ C:\Users\Guillaume\Anaconda3\lib\site-packages\sklearn\naive_bayes.py:699: Runti
self.feature_log_prob_ = (np.log(smoothed_fc) -
{&#39;classifier__alpha&#39;: 0.5, &#39;classifier__fit_prior&#39;: False, &#39;vectorizer__ngram_range&#39;: (1, 1), &#39;vectorizer__preprocessor&#39;: &lt;function mask_integers at 0x00000237491B67B8&gt;, &#39;vectorizer__stop_words&#39;: &#39;english&#39;}
{&#39;classifier__alpha&#39;: 0.5, &#39;classifier__fit_prior&#39;: False, &#39;vectorizer__ngram_range&#39;: (1, 1), &#39;vectorizer__preprocessor&#39;: &amp;lt;function mask_integers at 0x00000237491B67B8&amp;gt;, &#39;vectorizer__stop_words&#39;: &#39;english&#39;}
0.80900621118
Accuracy = 79.1%
Confusion matrix, without normalization
@ -1033,7 +1033,7 @@ Top dislike features:
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -145,7 +145,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -192,7 +192,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -241,7 +241,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -235,7 +235,7 @@ At line 5 there is a plum which is purple and contains 28 kcal
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -378,7 +378,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -168,7 +168,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -192,7 +192,7 @@ If you try to open a non existing file in read mode 'r', a FileNotFoundError wil
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -176,7 +176,7 @@ conda install numpy --channel intel --override-channels
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -237,7 +237,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -161,7 +161,7 @@
</pre></div>
<div class="highlight"><pre><span></span>&lt;matplotlib.figure.Figure at 0x2e45e92f400&gt;
<div class="highlight"><pre><span></span>&amp;lt;matplotlib.figure.Figure at 0x2e45e92f400&amp;gt;
</pre></div>
@ -170,7 +170,7 @@
</pre></div>
<div class="highlight"><pre><span></span>&lt;matplotlib.figure.Figure at 0x2e462164898&gt;
<div class="highlight"><pre><span></span>&amp;lt;matplotlib.figure.Figure at 0x2e462164898&amp;gt;
</pre></div>
</div>
<aside>
@ -186,7 +186,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -171,7 +171,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -339,7 +339,7 @@ However, exporting to a sql database can prove very useful. Indeed, having a wel
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -338,7 +338,7 @@ http://127.0.0.1:8787/status</p>
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -148,7 +148,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

281
python/design_own_libs.html Normal file
View File

@ -0,0 +1,281 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="Data Science for Political and Social Phenomena">
<meta name="author" content="Guillaume Redoulès">
<link rel="icon" href="../favicon.ico">
<title>Advice for designing your own libraries - Python</title>
<!-- JQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
window.jQuery || document.write('<script src="../theme/js/jquery.min.js"><\/script>')
</script>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="../theme/css/bootstrap.css" />
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link rel="stylesheet" type="text/css" href="../theme/css/ie10-viewport-bug-workaround.css" />
<!-- Custom styles for this template -->
<link rel="stylesheet" type="text/css" href="../theme/css/style.css" />
<link rel="stylesheet" type="text/css" href="../theme/css/notebooks.css" />
<link href='https://fonts.googleapis.com/css?family=PT+Serif:400,700|Roboto:400,500,700' rel='stylesheet' type='text/css'>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<meta name="tags" content="Basics" />
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="..">Guillaume Redoulès</a>
</div>
<div class="navbar-collapse collapse" id="searchbar">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">About<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="../pages/about.html">About Guillaume</a></li>
<li><a href="https://github.com/redoules">GitHub</a></li>
<li><a href="https://www.linkedin.com/in/guillaume-redoul%C3%A8s-33923860/">LinkedIn</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Data Science<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="..#Blog">Blog</a></li>
<li><a href="..#Python">Python</a></li>
<li><a href="..#Bash">Bash</a></li>
<li><a href="..#SQL">SQL</a></li>
<li><a href="..#Mathematics">Mathematics</a></li>
<li><a href="..#Machine_Learning">Machine Learning</a></li>
<li><a href="..#Projects">Projects</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Projects<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="https://github.com/redoules/redoules.github.io">Notes (Github)</a></li>
</ul>
</li>
<!--<li class="dropdown">
<a href="../feeds/blog.rss.xml">Blog RSS</a>
</li>-->
</ul>
<form class="navbar-form" action="../search.html" onsubmit="return validateForm(this.elements['q'].value);">
<div class="form-group" style="display:inline;">
<div class="input-group" style="display:table;">
<span class="input-group-addon" style="width:1%;"><span class="glyphicon glyphicon-search"></span></span>
<input class="form-control search-query" name="q" id="tipue_search_input" placeholder="e.g. scikit KNN, pandas merge" required autocomplete="off" type="text">
</div>
</div>
</form>
</div>
<!--/.nav-collapse -->
</div>
</div>
<!-- end of header section -->
<div class="container">
<!-- <div class="alert alert-warning" role="alert">
Did you find this page useful? Please do me a quick favor and <a href="#" class="alert-link">endorse me for data science on LinkedIn</a>.
</div> -->
<section id="content" class="body">
<header>
<h1>
Advice for designing your own libraries
</h1>
<ol class="breadcrumb">
<li>
<time class="published" datetime="2018-10-29T20:31:00+01:00">
29 octobre 2018
</time>
</li>
<li>Python</li>
<li>Basics</li>
</ol>
</header>
<div class='article_content'>
<h1>Advice for designing your own libraries</h1>
<p>When designing your own library make sure to think of the following things. I will add new paragraphs to this article as I dicover new good practices. </p>
<h2>Use standard python objects</h2>
<p>Try to use standard python objects as much as possible. That way, your library becomes compatible with all the other python libaries.</p>
<p>For instance, when I created SAMpy : a library for reading and writing SAMCEF results, it returned dictonnaries, lists and pandas dataframes. Hence the results extracted from SAMCEF where compatible with all the scientific stack of python.</p>
<h2>Limit the number of functionnalities</h2>
<p>Following the same logic as before, the objects should do only one thing but do it well. Indeed, having a simple interface will reduce the complexity of your code and make it easier to use your library.</p>
<p>Again, with SAMpy, I decided to strictly limit the functionnalities to reading and writing SAMCEF files. </p>
<h2>Define an exception class for your library</h2>
<p>You should define your own exceptions in order to make it easier for your users to debug their code thanks to clearer messages that convey more meaning. That way, the user will know if the error comes from your library or something else.</p>
<p>Bonus if you group similar exceptions in a hierachy of inerited Exception classes.</p>
<p>Example : let's create a Exception related to the age of a person :</p>
<div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">check_age</span><span class="p">(</span><span class="n">age</span><span class="p">):</span>
<span class="k">if</span> <span class="n">age</span> <span class="o">&lt;</span> <span class="mi">0</span> <span class="ow">and</span> <span class="n">age</span> <span class="o">&gt;</span> <span class="mi">130</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span>
</pre></div>
<p>If the user inputed an invalid age, the ValueError exception would be thrown. That's fine but imagine you wan't to provide more feedback to your users that don't know the internal of your library. Let's now create a selfexplanatory Exception </p>
<div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">AgeInvalidError</span><span class="p">(</span><span class="ne">ValueError</span><span class="p">):</span>
<span class="k">pass</span>
<span class="k">def</span> <span class="nf">check_age</span><span class="p">(</span><span class="n">age</span><span class="p">):</span>
<span class="k">if</span> <span class="n">age</span> <span class="o">&lt;</span> <span class="mi">0</span> <span class="ow">and</span> <span class="n">age</span> <span class="o">&gt;</span> <span class="mi">130</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">AgeInvalidError</span><span class="p">(</span><span class="n">age</span><span class="p">)</span>
</pre></div>
<p>You can also add some helpful text to guide your users along the way:</p>
<div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">AgeInvalidError</span><span class="p">(</span><span class="ne">ValueError</span><span class="p">):</span>
<span class="k">print</span><span class="p">(</span><span class="s2">&quot;Age invalid, must be between 0 and 130&quot;</span><span class="p">)</span>
<span class="k">pass</span>
<span class="k">def</span> <span class="nf">check_age</span><span class="p">(</span><span class="n">age</span><span class="p">):</span>
<span class="k">if</span> <span class="n">age</span> <span class="o">&lt;</span> <span class="mi">0</span> <span class="ow">and</span> <span class="n">age</span> <span class="o">&gt;</span> <span class="mi">130</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">AgeInvalidError</span><span class="p">(</span><span class="n">age</span><span class="p">)</span>
</pre></div>
<p>If you want to group all the logically linked exceptions, you can create a base class and inherit from it :</p>
<div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">BaseAgeInvalidError</span><span class="p">(</span><span class="ne">ValueError</span><span class="p">):</span>
<span class="k">pass</span>
<span class="k">class</span> <span class="nc">TooYoungError</span><span class="p">(</span><span class="n">BaseAgeInvalidError</span><span class="p">):</span>
<span class="k">pass</span>
<span class="k">class</span> <span class="nc">TooOldError</span><span class="p">(</span><span class="n">BaseAgeInvalidError</span><span class="p">):</span>
<span class="k">pass</span>
<span class="k">def</span> <span class="nf">check_age</span><span class="p">(</span><span class="n">age</span><span class="p">):</span>
<span class="k">if</span> <span class="n">age</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">TooYoungError</span><span class="p">(</span><span class="n">age</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">age</span> <span class="o">&gt;</span> <span class="mi">130</span> <span class="p">:</span>
<span class="k">raise</span> <span class="n">TooOldError</span><span class="p">(</span><span class="n">age</span><span class="p">)</span>
</pre></div>
<h2>Structure your repository</h2>
<p>You should have a file structure in your repository. It will help other contributers especially future contributers.</p>
<p>A nice directory structure for your project should look like this:</p>
<div class="highlight"><pre><span></span>README.md
LICENSE
setup.py
requirements.txt
./MyPackage
./docs
./tests
</pre></div>
<p>Some prefer to use reStructured Text, I personnaly prefer Markdown</p>
<p><a href="https://choosealicense.com">choosealicense.com</a> will help you pick the license to use for your project.</p>
<p>For package and distribution management, create a setup.py file a the root of the directory
The list of dependencies required to test, build and generate the doc are listed in a <a href="https://pip.pypa.io/en/stable/user_guide/#requirements-files">pip requirement file</a> placed a the root of the directory and named requirements.txt </p>
<p>Put the documentation of your library in the docs directory.</p>
<p>Put your tests in the tests directory. Since your tests will need to import your library, I recommend modifying the path to resolve your package property.</p>
<p>In order to do so, you can create a context.py file located in the tests directory : </p>
<div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">insert</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="vm">__file__</span><span class="p">),</span> <span class="s1">&#39;..&#39;</span><span class="p">)))</span>
<span class="kn">import</span> <span class="nn">MyPackage</span>
</pre></div>
<p>Then within your individual test files you can import your package like so :</p>
<div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">.context</span> <span class="kn">import</span> <span class="n">MyPackage</span>
</pre></div>
<p>Finally, your code will go into the MyPackage directory</p>
<h2>Test your code</h2>
<p>Once your library is in production, you have to guaranty some level of forward compatibility. Once your interface is defined, write some tests. In the future, when your code is modified, having those tests will make sure that the behaviour of your functions and objects won't be altered.</p>
<h2>Document your code</h2>
<p>Of course, you should have a documentation to go along with your library. Make sure to add a lot of commun examples as most users tend to learn from examples.</p>
<p>I recommend writing your documentation using Sphinx. </p>
</div>
<aside>
<div class="bug-reporting__panel">
<h3>Find an error or bug? Have a suggestion?</h3>
<p>Everything on this site is avaliable on GitHub. Head on over and <a href='https://github.com/redoules/redoules.github.io/issues/new'>submit an issue.</a> You can also message me directly by <a href='mailto:guillaume.redoules@gadz.org'>email</a>.</p>
</div>
</aside>
</section>
</div>
<!-- start of footer section -->
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.
</center>
</p>
</div>
</footer>
<!-- This jQuery line finds any span that contains code highlighting classes and then selects the parent <pre> tag and adds a border. This is done as a workaround to visually distinguish the code inputs and outputs -->
<script>
$( ".hll, .n, .c, .err, .k, .o, .cm, .cp, .c1, .cs, .gd, .ge, .gr, .gh, .gi, .go, .gp, .gs, .gu, .gt, .kc, .kd, .kn, .kp, .kr, .kt, .m, .s, .na, .nb, .nc, .no, .nd, .ni, .ne, .nf, .nl, .nn, .nt, .nv, .ow, .w, .mf, .mh, .mi, .mo, .sb, .sc, .sd, .s2, .se, .sh, .si, .sx, .sr, .s1, .ss, .bp, .vc, .vg, .vi, .il" ).parent( "pre" ).css( "border", "1px solid #DEDEDE" );
</script>
<!-- Load Google Analytics -->
<script>
/*
(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function() {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-66582-32', 'auto');
ga('send', 'pageview');
*/
</script>
<!-- End of Google Analytics -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../theme/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../theme/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>

View File

@ -143,7 +143,7 @@
</pre></div>
<div class="highlight"><pre><span></span>b&#39;<span class="cp">&lt;!doctype html&gt;</span>\n<span class="nt">&lt;html&gt;</span>\n<span class="nt">&lt;head&gt;</span>\n <span class="nt">&lt;title&gt;</span>Example Domain<span class="nt">&lt;/title&gt;</span>\n\n <span class="nt">&lt;meta</span> <span class="na">charset=</span><span class="s">&quot;utf-8&quot;</span> <span class="nt">/&gt;</span>\n <span class="nt">&lt;meta</span> <span class="na">http-equiv=</span><span class="s">&quot;Content-type&quot;</span> <span class="na">content=</span><span class="s">&quot;text/html; charset=utf-8&quot;</span> <span class="nt">/&gt;</span>\n <span class="nt">&lt;meta</span> <span class="na">name=</span><span class="s">&quot;viewport&quot;</span> <span class="na">content=</span><span class="s">&quot;width=device-width, initial-scale=1&quot;</span> <span class="nt">/&gt;</span>\n <span class="nt">&lt;style</span> <span class="na">type=</span><span class="s">&quot;text/css&quot;</span><span class="nt">&gt;</span>\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: &quot;Open Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 50px;\n background-color: #fff;\n border-radius: 1em;\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n body {\n background-color: #fff;\n }\n div {\n width: auto;\n margin: 0 auto;\n border-radius: 0;\n padding: 1em;\n }\n }\n <span class="nt">&lt;/style&gt;</span> \n<span class="nt">&lt;/head&gt;</span>\n\n<span class="nt">&lt;body&gt;</span>\n<span class="nt">&lt;div&gt;</span>\n <span class="nt">&lt;h1&gt;</span>Example Domain<span class="nt">&lt;/h1&gt;</span>\n <span class="nt">&lt;p&gt;</span>This domain is established to be used for illustrative examples in documents. You may use this\n domain in examples without prior coordination or asking for permission.<span class="nt">&lt;/p&gt;</span>\n <span class="nt">&lt;p&gt;&lt;a</span> <span class="na">href=</span><span class="s">&quot;http://www.iana.org/domains/example&quot;</span><span class="nt">&gt;</span>More information...<span class="nt">&lt;/a&gt;&lt;/p&gt;</span>\n<span class="nt">&lt;/div&gt;</span>\n<span class="nt">&lt;/body&gt;</span>\n<span class="nt">&lt;/html&gt;</span>\n&#39;
<div class="highlight"><pre><span></span><span class="nt">b</span><span class="s1">&#39;&amp;lt;!doctype html&amp;gt;\n&amp;lt;html&amp;gt;\n&amp;lt;head&amp;gt;\n &amp;lt;title&amp;gt;Example Domain&amp;lt;/title&amp;gt;\n\n &amp;lt;meta charset=&quot;utf-8&quot; /&amp;gt;\n &amp;lt;meta http-equiv=&quot;Content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&amp;gt;\n &amp;lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot; /&amp;gt;\n &amp;lt;style type=&quot;text/css&quot;&amp;gt;\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: &quot;Open Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 50px;\n background-color: #fff;\n border-radius: 1em;\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n body {\n background-color: #fff;\n }\n div {\n width: auto;\n margin: 0 auto;\n border-radius: 0;\n padding: 1em;\n }\n }\n &amp;lt;/style&amp;gt; \n&amp;lt;/head&amp;gt;\n\n&amp;lt;body&amp;gt;\n&amp;lt;div&amp;gt;\n &amp;lt;h1&amp;gt;Example Domain&amp;lt;/h1&amp;gt;\n &amp;lt;p&amp;gt;This domain is established to be used for illustrative examples in documents. You may use this\n domain in examples without prior coordination or asking for permission.&amp;lt;/p&amp;gt;\n &amp;lt;p&amp;gt;&amp;lt;a href=&quot;http://www.iana.org/domains/example&quot;&amp;gt;More information...&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;\n&amp;lt;/div&amp;gt;\n&amp;lt;/body&amp;gt;\n&amp;lt;/html&amp;gt;\n&#39;</span>
</pre></div>
@ -155,14 +155,14 @@
</pre></div>
<div class="highlight"><pre><span></span><span class="cp">&lt;!DOCTYPE html&gt;</span>
<span class="p">&lt;</span><span class="nt">html</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">head</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">title</span><span class="p">&gt;</span>Example Domain<span class="p">&lt;/</span><span class="nt">title</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">meta</span> <span class="na">charset</span><span class="o">=</span><span class="s">&quot;utf-8&quot;</span><span class="p">/&gt;</span>
<span class="p">&lt;</span><span class="nt">meta</span> <span class="na">content</span><span class="o">=</span><span class="s">&quot;text/html; charset=utf-8&quot;</span> <span class="na">http-equiv</span><span class="o">=</span><span class="s">&quot;Content-type&quot;</span><span class="p">/&gt;</span>
<span class="p">&lt;</span><span class="nt">meta</span> <span class="na">content</span><span class="o">=</span><span class="s">&quot;width=device-width, initial-scale=1&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;viewport&quot;</span><span class="p">/&gt;</span>
<span class="p">&lt;</span><span class="nt">style</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;text/css&quot;</span><span class="p">&gt;</span>
<div class="highlight"><pre><span></span><span class="o">&amp;</span><span class="nt">lt</span><span class="o">;!</span><span class="nt">DOCTYPE</span> <span class="nt">html</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span>
<span class="o">&amp;</span><span class="nt">lt</span><span class="o">;</span><span class="nt">html</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span>
<span class="o">&amp;</span><span class="nt">lt</span><span class="o">;</span><span class="nt">head</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span>
<span class="o">&amp;</span><span class="nt">lt</span><span class="o">;</span><span class="nt">title</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span><span class="nt">Example</span> <span class="nt">Domain</span><span class="o">&amp;</span><span class="nt">lt</span><span class="o">;/</span><span class="nt">title</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span>
<span class="o">&amp;</span><span class="nt">lt</span><span class="o">;</span><span class="nt">meta</span> <span class="nt">charset</span><span class="o">=</span><span class="s2">&quot;utf-8&quot;</span><span class="o">/&amp;</span><span class="nt">gt</span><span class="o">;</span>
<span class="o">&amp;</span><span class="nt">lt</span><span class="o">;</span><span class="nt">meta</span> <span class="nt">content</span><span class="o">=</span><span class="s2">&quot;text/html; charset=utf-8&quot;</span> <span class="nt">http-equiv</span><span class="o">=</span><span class="s2">&quot;Content-type&quot;</span><span class="o">/&amp;</span><span class="nt">gt</span><span class="o">;</span>
<span class="o">&amp;</span><span class="nt">lt</span><span class="o">;</span><span class="nt">meta</span> <span class="nt">content</span><span class="o">=</span><span class="s2">&quot;width=device-width, initial-scale=1&quot;</span> <span class="nt">name</span><span class="o">=</span><span class="s2">&quot;viewport&quot;</span><span class="o">/&amp;</span><span class="nt">gt</span><span class="o">;</span>
<span class="o">&amp;</span><span class="nt">lt</span><span class="o">;</span><span class="nt">style</span> <span class="nt">type</span><span class="o">=</span><span class="s2">&quot;text/css&quot;</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span>
<span class="nt">body</span> <span class="p">{</span>
<span class="k">background-color</span><span class="p">:</span> <span class="mh">#f0f0f2</span><span class="p">;</span>
<span class="k">margin</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
@ -192,17 +192,17 @@
<span class="k">padding</span><span class="p">:</span> <span class="mi">1</span><span class="kt">em</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">&lt;/</span><span class="nt">style</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">head</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">body</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">div</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">h1</span><span class="p">&gt;</span>Example Domain<span class="p">&lt;/</span><span class="nt">h1</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span>This domain is established to be used for illustrative examples in documents. You may use this
domain in examples without prior coordination or asking for permission.<span class="p">&lt;/</span><span class="nt">p</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;http://www.iana.org/domains/example&quot;</span><span class="p">&gt;</span>More information...<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;&lt;/</span><span class="nt">p</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">body</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">html</span><span class="p">&gt;</span>
<span class="o">&amp;</span><span class="nt">lt</span><span class="o">;/</span><span class="nt">style</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span>
<span class="o">&amp;</span><span class="nt">lt</span><span class="o">;/</span><span class="nt">head</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span>
<span class="o">&amp;</span><span class="nt">lt</span><span class="o">;</span><span class="nt">body</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span>
<span class="o">&amp;</span><span class="nt">lt</span><span class="o">;</span><span class="nt">div</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span>
<span class="o">&amp;</span><span class="nt">lt</span><span class="o">;</span><span class="nt">h1</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span><span class="nt">Example</span> <span class="nt">Domain</span><span class="o">&amp;</span><span class="nt">lt</span><span class="o">;/</span><span class="nt">h1</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span>
<span class="o">&amp;</span><span class="nt">lt</span><span class="o">;</span><span class="nt">p</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span><span class="nt">This</span> <span class="nt">domain</span> <span class="nt">is</span> <span class="nt">established</span> <span class="nt">to</span> <span class="nt">be</span> <span class="nt">used</span> <span class="nt">for</span> <span class="nt">illustrative</span> <span class="nt">examples</span> <span class="nt">in</span> <span class="nt">documents</span><span class="o">.</span> <span class="nt">You</span> <span class="nt">may</span> <span class="nt">use</span> <span class="nt">this</span>
<span class="nt">domain</span> <span class="nt">in</span> <span class="nt">examples</span> <span class="nt">without</span> <span class="nt">prior</span> <span class="nt">coordination</span> <span class="nt">or</span> <span class="nt">asking</span> <span class="nt">for</span> <span class="nt">permission</span><span class="o">.&amp;</span><span class="nt">lt</span><span class="o">;/</span><span class="nt">p</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span>
<span class="o">&amp;</span><span class="nt">lt</span><span class="o">;</span><span class="nt">p</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;&amp;</span><span class="nt">lt</span><span class="o">;</span><span class="nt">a</span> <span class="nt">href</span><span class="o">=</span><span class="s2">&quot;http://www.iana.org/domains/example&quot;</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span><span class="nt">More</span> <span class="nt">information</span><span class="o">...&amp;</span><span class="nt">lt</span><span class="o">;/</span><span class="nt">a</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;&amp;</span><span class="nt">lt</span><span class="o">;/</span><span class="nt">p</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span>
<span class="o">&amp;</span><span class="nt">lt</span><span class="o">;/</span><span class="nt">div</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span>
<span class="o">&amp;</span><span class="nt">lt</span><span class="o">;/</span><span class="nt">body</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span>
<span class="o">&amp;</span><span class="nt">lt</span><span class="o">;/</span><span class="nt">html</span><span class="o">&amp;</span><span class="nt">gt</span><span class="o">;</span>
</pre></div>
</div>
<aside>
@ -218,7 +218,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -177,7 +177,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -213,7 +213,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -248,7 +248,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -381,7 +381,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -151,7 +151,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -112,7 +112,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -5,7 +5,7 @@ xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>redoules.github.io/</loc>
<lastmod>2018-09-15T08:13:37-00:00</lastmod>
<lastmod>2018-10-30T10:27:47-00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
@ -17,6 +17,13 @@ xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<priority>0.5</priority>
</url>
<url>
<loc>redoules.github.io/python/design_own_libs.html</loc>
<lastmod>2018-10-29T20:31:00+01:00</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>redoules.github.io/python/ensure_dir.html</loc>
<lastmod>2018-09-15T07:56:00+02:00</lastmod>

View File

@ -344,7 +344,7 @@ Done.
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -631,7 +631,7 @@ Done.
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -216,7 +216,7 @@ Done.
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -346,7 +346,7 @@ Done.
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 38 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 39 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

File diff suppressed because one or more lines are too long