mirror of
https://github.com/almet/notmyidea.git
synced 2025-04-28 19:42:37 +02:00
Update documentation
This commit is contained in:
parent
935d649896
commit
54d339b68f
138 changed files with 2567 additions and 1443 deletions
|
@ -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 duration</a></dd>
|
||||||
<dd><a href='https://blog.notmyidea.org/2023-semaine-40.html'>2023, Semaine 40</a></dd>
|
<dd><a href='https://blog.notmyidea.org/2023-semaine-40.html'>2023, Semaine 40</a></dd>
|
||||||
<dd><a href='https://blog.notmyidea.org/2023-semaine-39.html'>2023, Semaine 39</a></dd>
|
<dd><a href='https://blog.notmyidea.org/2023-semaine-39.html'>2023, Semaine 39</a></dd>
|
||||||
<dd><a href='https://blog.notmyidea.org/llm-command-line-tips.html'>llm command-line tips</a></dd>
|
<dd><a href='https://blog.notmyidea.org/llm-command-line-tips.html'>llm command-line tips</a></dd>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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… 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 keyring</a></h1>
|
|
||||||
|
|
||||||
<p>Pour les mises à jour Arch, j’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 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 d’un fichier svg en favicon.ico">Conversion d’un fichier svg en 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 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 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> 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> 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 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 keyring</a></li>
|
||||||
|
|
29
author/.html
29
author/.html
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
|
@ -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 duration</a></h1>
|
||||||
|
<p>I found myself wanting to convert a string to a duration (int), for some configuration.</p>
|
||||||
|
<p>Something you can call like this:</p>
|
||||||
|
<div class="highlight"><pre><span></span><code><span class="n">string_to_duration</span><span class="p">(</span><span class="s2">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"days"</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">"1d"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</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">"3m"</span><span class="p">,</span> <span class="n">target</span><span class="o">=</span><span class="s2">"hours"</span><span class="p">)</span> <span class="c1"># returns 3 * 24 * 30</span>
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
<p>The code :</p>
|
||||||
|
<p><span class="dquo">“</span>`python
|
||||||
|
from typing import 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 manquantes.</p>
|
longue période je me retrouve avec des soucis de clé qui ne sont plus à jour ou 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 variables</a></h1>
|
|
||||||
|
|
||||||
<p>It’s been a while I didn’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’s now time to package it, so I
|
|
||||||
discovered <a href="https://hatch.pypa.io/">hatch</a></p>
|
|
||||||
<p>hatch new —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 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> 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> 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 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 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 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 variables</a></li>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue