Skip to content

Instantly share code, notes, and snippets.

rogerpence /
Created March 5, 2020 19:44
Custom for Pycco with my changes for AVR code
#!/usr/bin/env python
"**Pycco**" is a Python port of [Docco](
the original quick-and-dirty, hundred-line-long, literate-programming-style
documentation generator. It produces HTML that displays your comments alongside
your code. Comments are passed through [Markdown][markdown] and
[SmartyPants][smartypants][^extensions], while code is passed through
[Pygments]( for syntax highlighting.
rogerpence / gist:8b55bef13db273c7bffa71d0d6f9cc84
Last active January 10, 2019 18:22
An old regex article
<p>Regular expressions (regex) provide a pattern matching scheme you can use to search and manipulate&nbsp;strings. Although regex has been around for almost 50 years, it is often either completely ignored or relegated to the &ldquo;will learn later&rdquo; pile by many programmers. Regex is indeed borderline witchcraft that at first glance looks like it was culled from the script of <a href="">Plan 9 from Outer Space</a>. (It wasn&rsquo;t!).</p>
<p>There is an old programming adage that goes: &ldquo;One time I had a problem so I tried to solve it with regular expressions. Now I have two problems.&rdquo; If you&#39;re not careful, that old saying sums up regex well. If you get in a hurry&nbsp;or try to over-complicate things, regex will get you in more trouble than cheating on your taxes. But with a little effort and practice, knowing how and when to use a regular expression to solve a problem will make your code better, easier to read (really!), and easier to maintai