Update documentation

This commit is contained in:
Alexis Métaireau 2023-10-11 11:12:34 +02:00
parent 935d649896
commit 54d339b68f
138 changed files with 2567 additions and 1443 deletions

View file

@ -30,6 +30,7 @@
<section id="content" class="body"> <section id="content" class="body">
<dl> <dl>
<dt>2023</dt> <dt>2023</dt>
<dd><a href='https://blog.notmyidea.org/convert-string-to-duration.html'>Convert string to&nbsp;duration</a></dd>
<dd><a href='https://blog.notmyidea.org/2023-semaine-40.html'>2023, Semaine&nbsp;40</a></dd> <dd><a href='https://blog.notmyidea.org/2023-semaine-40.html'>2023, Semaine&nbsp;40</a></dd>
<dd><a href='https://blog.notmyidea.org/2023-semaine-39.html'>2023, Semaine&nbsp;39</a></dd> <dd><a href='https://blog.notmyidea.org/2023-semaine-39.html'>2023, Semaine&nbsp;39</a></dd>
<dd><a href='https://blog.notmyidea.org/llm-command-line-tips.html'>llm command-line&nbsp;tips</a></dd> <dd><a href='https://blog.notmyidea.org/llm-command-line-tips.html'>llm command-line&nbsp;tips</a></dd>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -103,17 +119,8 @@ takes me multiple commits to find the correct configuration, which is…&nbsp;su
<p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span> <p>I discovered today <a href="https://github.com/firecow/gitlab-ci-local">Gitlab <span class="caps">CI</span>
local</a> which makes it possible …</p> local</a> which makes it possible …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-18T00:00:00+02:00">18 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/arch-linux.html">arch-linux</a> <h1><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" id="page-title">ArchLinux et mise à jour du&nbsp;keyring</a></h1>
<p>Pour les mises à jour Arch, j&#8217;utilise <a href="https://github.com/Jguer/yay">yay</a>. Je
ne fais les mises à jour que de manière semi-régulière, et parfois après une
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/conversion-dun-fichier-svg-en-faviconico.html" rel="bookmark" title="Permalink to Conversion dun fichier svg en favicon.ico">Conversion d&#8217;un fichier svg en&nbsp;favicon.ico</a></li>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li> <li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

View file

@ -25,6 +25,22 @@
</ul> </ul>
</section> </section>
<h1></h1> <h1></h1>
<section class="section index">
<time datetime="2023-10-11T00:00:00+02:00">11 octobre 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/conversion.html">conversion</a> <h1><a href="https://blog.notmyidea.org/convert-string-to-duration.html" id="page-title">Convert string to&nbsp;duration</a></h1>
<p>I found myself wanting to convert a string to a duration (int), for some&nbsp;configuration.</p>
<p>Something you can call like&nbsp;this:</p>
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;days&quot;</span><span class="p">)</span> <span class="c1"># returns 1</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;1d&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 24</span>
<span class="n">string_to_duration</span><span class="p">(</span><span class="s2">&quot;3m&quot;</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">&quot;hours&quot;</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
</code></pre></div>
<p>The code&nbsp;:</p>
<p><span class="dquo">&#8220;</span>`python
from typing import&nbsp;Literal</p>
<p>def string_to_duration …</p>
</section>
<section class="section index"> <section class="section index">
<time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time> <time datetime="2023-09-27T00:00:00+02:00">27 septembre 2023</time>
@ -107,19 +123,8 @@ ne fais les mises à jour que de manière semi-régulière, et parfois après un
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p> longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou&nbsp;manquantes.</p>
<p>Avec une utilisation fréquente du système, aucun problème …</p> <p>Avec une utilisation fréquente du système, aucun problème …</p>
</section> </section>
<section class="section index">
<time datetime="2023-08-17T00:00:00+02:00">17 août 2023</time>
<a class='tag' href="https://blog.notmyidea.org/tag/python.html">python</a>, <a class='tag' href="https://blog.notmyidea.org/tag/packaging.html">packaging</a>, <a class='tag' href="https://blog.notmyidea.org/tag/zsh.html">zsh</a> <h1><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" id="page-title">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></h1>
<p>It&#8217;s been a while I didn&#8217;t packaged something new. I recently remembered an old
package of mine that needed some attention :
<a href="https://gitlab.com/almet/debts">debts</a>. It&#8217;s now time to package it, so I
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
<p>hatch new&nbsp;&#8212;init</p>
<p>This does the heavy-lifting for you, actually porting the <code>setup.py</code> files …</p>
</section>
<ul> <ul>
<li><a href="https://blog.notmyidea.org/decouverte-de-nouveaux-outils-pour-le-developpement-llm-helix-et-plus.html" rel="bookmark" title="Permalink to Découverte de nouveaux outils pour le développement: LLM, Helix et plus">Découverte de nouveaux outils pour le développement: <span class="caps">LLM</span>, Helix et&nbsp;plus</a></li>
<li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li> <li><a href="https://blog.notmyidea.org/running-the-gitlab-ci-locally.html" rel="bookmark" title="Permalink to Running the Gitlab CI locally">Running the Gitlab <span class="caps">CI</span>&nbsp;locally</a></li>
<li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li> <li><a href="https://blog.notmyidea.org/archlinux-et-mise-a-jour-du-keyring.html" rel="bookmark" title="Permalink to ArchLinux et mise à jour du keyring">ArchLinux et mise à jour du&nbsp;keyring</a></li>
<li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li> <li><a href="https://blog.notmyidea.org/python-packaging-with-hatch-pipx-and-zsh-environment-variables.html" rel="bookmark" title="Permalink to Python packaging with Hatch, pipx and Zsh environment variables">Python packaging with Hatch, pipx and Zsh environment&nbsp;variables</a></li>

Some files were not shown because too many files have changed in this diff Show more