Elektrine lite

← Feed

Paul McGuire

ptmcg@fosstodon.org

<p>he/him - Author/maintainer of <a href="https://fosstodon.org/tags/pyparsing" class="mention hashtag" rel="tag">#<span>pyparsing</span></a>, <a href="https://fosstodon.org/tags/littletable" class="mention hashtag" rel="tag">#<span>littletable</span></a>, <a href="https://fosstodon.org/tags/plusminus" class="mention hashtag" rel="tag">#<span>plusminus</span></a> - I do digital art when I get the time. Co-author of &quot;Python in a Nutshell, 4th Ed&quot;. PSF Fellow. Avatar: NAT <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="tag">#<span>python</span></a> <a href="https://fosstodon.org/tags/pynutshell4" class="mention hashtag" rel="tag">#<span>pynutshell4</span></a></p>

Posts

  • View post

    More projects using #pyparsing: - ASE2SPRKKR: a unified Python framework integrating the Spin-Polarized Relativistic Korringa-Kohn-Rostoker method into the Atomic Simulation Environment - generates Pyparsing parsers to process input data files https://arxiv.org/pdf/2608.05957 https://github.com/ase2sprkkr/ase2sprkkr - dqc_simulator: an easy-to-use distributed quantum computing simulator - uses pyparsing to implement a command API to the NetSquid package https://arxiv.org/pdf/2604.13909...

  • View post

    @JessTheUnstill Same. The good stuff is wasted on me, especially after I add 2 teaspoons of sugar, then top up with whole milk and/or Grand Marnier (how I drink coffee, not wine). I&amp;#39;ve also started trying maple syrup instead of sugar, for more caramely taste without the hassle of caramel syrup. (And I _do_ insist on real maple syrup - we used to make it at home when I was a kid, and I won&amp;#39;t touch that Log Cabin abomination.)

  • View post

    tl;dr https://www.python-a2z.info/ is a website I created for myself because the online #Python docs need a jump page. Ever tried to search the online docs for the builtin &amp;quot;set&amp;quot; type? You get every page that has the word &amp;quot;set&amp;quot; in it, and &amp;quot;set&amp;quot; is a pretty popular word! Same story for &amp;quot;list&amp;quot;, &amp;quot;dict&amp;quot;, and many more. &amp;quot;f-strings&amp;quot;? Unless you know to look for &amp;quot;Formatted String Liter...

  • View post

    Here are some emojidentifiers for your next Python code: import math 乁_ツ_ㄏ = None 乁_益_ㄏ = math.nan ఠ_ఠ = isinstance def minnums(values: list | 乁_ツ_ㄏ = 乁_ツ_ㄏ): if ( values is 乁_ツ_ㄏ or not all(ఠ_ఠ(n, (float, int)) for n in values) ): return 乁_益_ㄏ return min(values) #python #unicode #emoji

  • View post

    I saw a TIL post on bsky today about using &amp;#39;/&amp;#39; with pathlib.Path&amp;#39;s. Some other features recently added to #python - itertools.batched (3.12) - accessing re.Match groups using m[1] notation (faster than calling m.group(1)) (3.6) - 1_000_000 is a legal syntax for 1000000 (3.6) - command-line access to stdlib modules (python -m &amp;lt;name&amp;gt;) - uuid (3.12) - json (3.14) - random (3.13) - sqlite3 (3.12) - http.server (3.4) - f-strings (3.6) - true multithrea...