Skip to content

Commit 55abda3

Browse files
added blog post on festive offers
1 parent 8fdbc6a commit 55abda3

File tree

18 files changed

+49
-15
lines changed

18 files changed

+49
-15
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ I'm addicted to reading fantasy/sci-fi books, so I have a [blog](https://learnby
66

77
## Posts
88

9+
* [Festive offers for books on Python, Linux, Regular Expressions, Vim and more!](https://learnbyexample.github.io/programming-deals-2025/)
910
* [Connect Four game with a twist](https://learnbyexample.github.io/connect-four-game-with-a-twist/)
1011
* [Python regular expression cheatsheet and examples](https://learnbyexample.github.io/python-regex-cheatsheet/)
1112
* [Customizing pandoc to generate beautiful pdf and epub from markdown](https://learnbyexample.github.io/customizing-pandoc/)

atom.xml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,36 @@
55
<link href="https://learnbyexample.github.io/atom.xml" rel="self" type="application/atom+xml"/>
66
<link href="https://learnbyexample.github.io"/>
77
<generator uri="https://www.getzola.org/">Zola</generator>
8-
<updated>2025-09-05T00:00:00+00:00</updated>
8+
<updated>2025-11-21T00:00:00+00:00</updated>
99
<id>https://learnbyexample.github.io/atom.xml</id>
10+
<entry xml:lang="en">
11+
<title>Festive offers for books on Python, Linux, Regular Expressions, Vim and more!</title>
12+
<published>2025-11-21T00:00:00+00:00</published>
13+
<updated>2025-11-21T00:00:00+00:00</updated>
14+
<link rel="alternate" href="https://learnbyexample.github.io/programming-deals-2025/" type="text/html"/>
15+
<id>https://learnbyexample.github.io/programming-deals-2025/</id>
16+
<content type="html">&lt;p&gt;Hello!&lt;&#x2F;p&gt;
17+
&lt;p&gt;Here are some awesome deals for programming books and courses during the 2025 festive season.&lt;&#x2F;p&gt;
18+
&lt;span id=&quot;continue-reading&quot;&gt;&lt;&#x2F;span&gt;&lt;br&gt;
19+
&lt;h2 id=&quot;my-ebooks&quot;&gt;My ebooks&lt;a class=&quot;zola-anchor&quot; href=&quot;#my-ebooks&quot; aria-label=&quot;Anchor link for: my-ebooks&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
20+
&lt;p&gt;Festive offers for my ebooks till 30-November-2025:&lt;&#x2F;p&gt;
21+
&lt;ul&gt;
22+
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;learnbyexample.gumroad.com&#x2F;l&#x2F;all-books&#x2F;FestiveOffer&quot;&gt;All 13 Books Bundle&lt;&#x2F;a&gt; — $16 (normal price $36), learn Regular Expressions, Linux CLI tools, Python, Vim and more!&lt;&#x2F;li&gt;
23+
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;learnbyexample.gumroad.com&#x2F;l&#x2F;py_regex&quot;&gt;Understanding Python re(gex)?&lt;&#x2F;a&gt; — FREE (normal price $10)&lt;&#x2F;li&gt;
24+
&lt;&#x2F;ul&gt;
25+
&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;https:&#x2F;&#x2F;learnbyexample.gumroad.com&#x2F;l&#x2F;all-books&#x2F;FestiveOffer&quot;&gt;&lt;img src=&quot;&#x2F;images&#x2F;books&#x2F;all_books_bundle.png&quot; alt=&quot;All books bundle&quot; loading=&quot;lazy&quot; &#x2F;&gt;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
26+
&lt;br&gt;
27+
&lt;h2 id=&quot;other-deals&quot;&gt;Other deals&lt;a class=&quot;zola-anchor&quot; href=&quot;#other-deals&quot; aria-label=&quot;Anchor link for: other-deals&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
28+
&lt;ul&gt;
29+
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;media.pragprog.com&#x2F;newsletters&#x2F;2025-11-19.html&quot;&gt;The Pragmatic Bookshelf&lt;&#x2F;a&gt; — 50% off&lt;&#x2F;li&gt;
30+
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;adamj.eu&#x2F;tech&#x2F;2025&#x2F;11&#x2F;20&#x2F;django-black-friday-deals-2025&#x2F;&quot;&gt;Deals on Django and Git books&#x2F;software&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
31+
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;trungdq88&#x2F;Awesome-Black-Friday-Cyber-Monday&quot;&gt;Huge list of awesome deals&lt;&#x2F;a&gt; — tools, productivity, books, courses, etc&lt;&#x2F;li&gt;
32+
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;blackfridaydeals.dev&#x2F;&quot;&gt;blackfridaydeals.dev&lt;&#x2F;a&gt; — Hottest Black Friday Deals for Developers&lt;&#x2F;li&gt;
33+
&lt;&#x2F;ul&gt;
34+
&lt;br&gt;
35+
&lt;p&gt;Happy learning :)&lt;&#x2F;p&gt;
36+
</content>
37+
</entry>
1038
<entry xml:lang="en">
1139
<title>Connect Four game with a twist</title>
1240
<published>2025-08-20T00:00:00+00:00</published>

connect-four-game-with-a-twist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
</span><span style=color:#5597d6;>$</span><span> connectsquare
99
</span></code></pre><p>To run the app without having to enter the virtual environment again, add this alias to <code>.bashrc</code> (or equivalent):<pre class=language-bash data-lang=bash style=background-color:#f5f5f5;color:#1f1f1f;><code class=language-bash data-lang=bash><span style=color:#7f8989;># you'll have to change the path
1010
</span><span style=color:#b39f04;>alias </span><span style=color:#c23f31;>connectsquare</span><span style=color:#72ab00;>=</span><span style=color:#d07711;>'/path/to/textual_apps/bin/connectsquare'
11-
</span></code></pre><p>As an alternative to manually managing such virtual environments, you can use <a href=https://github.com/astral-sh/uv>uv</a> or <a href=https://github.com/pypa/pipx>pipx</a> instead.<p>As yet another alternative, you can install <code>textual==0.85.2</code> (see <a href=https://textual.textualize.io/getting_started/>Textual documentation</a> for more details), clone <a href=https://github.com/learnbyexample/TUI-apps>this repository</a> and run the <code>connect_square.py</code> file.</p><br><h2 id=screenshots>Screenshots<a aria-label="Anchor link for: screenshots" class=zola-anchor href=#screenshots>🔗</a></h2><p>Adjust your terminal's dimension for the game widgets to appear properly, for example 80x30 (characters x lines). Sample screenshots are shown below:<p align=center><img alt="Sample screenshot for Connect Four game" src=https://raw.githubusercontent.com/learnbyexample/TUI-apps/main/ConnectSquare/connect_four.png><p align=center><img alt="Sample screenshot for Connect Four or Square game" src=https://raw.githubusercontent.com/learnbyexample/TUI-apps/main/ConnectSquare/connect_both.png></p><br><h2 id=guide>Guide<a aria-label="Anchor link for: guide" class=zola-anchor href=#guide>🔗</a></h2><ul><li>Press the <strong>n</strong> key to start a new game. Existing game, if any, will be abandoned<li>You can choose between <strong>Connect Four</strong>, <strong>Connect Square</strong> (default) and <strong>Both</strong> types of game<li>You can choose between <strong>Easy</strong> (default), <strong>Medium</strong> and <strong>Hard</strong> difficulty modes: <ul><li>In the <em>Easy</em> mode, the AI will make a random move<li>In the <em>Medium</em> mode, the AI will make a random move based on certain weight calculations<li>In the <em>Hard</em> mode, the AI will make the best move based on the weight calculations (the algorithm is based only on the current board state and thus it is not impossible for the user to win)</ul><li>The first move is based on the <strong>User first</strong> (default) and <strong>AI first</strong> choices<li>Only the bottom most empty cell of each column will be considered as a valid move<li>Press the <strong>t</strong> key to toggle between light and dark themes<li>Press the <strong>q</strong> key to quit the app</ul><p>User moves are denoted by the ⭕️ character and AI moves are denoted by the ✖️ character.<p>The text panel under the game board displays the current status of the game. If the game ends with one of the players forming a valid line or square, the cells forming the winning move will be highlighted.<h2 id=square-tic-tac-toe>Square tic tac toe<a aria-label="Anchor link for: square-tic-tac-toe" class=zola-anchor href=#square-tic-tac-toe>🔗</a></h2><p>If you liked this game, you might also enjoy <a href=https://github.com/learnbyexample/TUI-apps/tree/main/SquareTicTacToe>Square tic tac toe</a>.<p>If you are interested in learning more about the AI algorithm for the Connect Square game, check out my <a href=https://learnbyexample.github.io/practice_python_projects/square_tic_tac_toe/square_tic_tac_toe_ai.html>explanation here for Square tic tac toe</a> — while there are a few differences between the two, the foundation is the same.</div><div class=post-footer><div class=post-tags><a href=https://learnbyexample.github.io/tags/python/>#python</a><a href=https://learnbyexample.github.io/tags/tui/>#TUI</a><a href=https://learnbyexample.github.io/tags/textual/>#textual</a></div><hr color=#e6e6e6><div class=post-nav><p><a class=next href=https://learnbyexample.github.io/python-regex-cheatsheet/>Python regular expression cheatsheet and examples →</a><br></div><hr color=#e6e6e6><p>📰 Use <a href=https://learnbyexample.github.io/atom.xml>this link</a> for the Atom feed. <br> ✅ Follow me on <a href=https://twitter.com/learn_byexample>Twitter</a>, <a href=https://github.com/learnbyexample>GitHub</a> and <a href=https://www.youtube.com/c/learnbyexample42>Youtube</a> for interesting tech nuggets. <br> 📧 Subscribe to <a href=https://learnbyexample.gumroad.com/l/learnbyexample-weekly>learnbyexample weekly</a> for programming resources, tips, tools, free ebooks and more (free newsletter, delivered every Friday).<hr color=#e6e6e6></div></article></div></main></div><script src=https://learnbyexample.github.io/even.js></script>
11+
</span></code></pre><p>As an alternative to manually managing such virtual environments, you can use <a href=https://github.com/astral-sh/uv>uv</a> or <a href=https://github.com/pypa/pipx>pipx</a> instead.<p>As yet another alternative, you can install <code>textual==0.85.2</code> (see <a href=https://textual.textualize.io/getting_started/>Textual documentation</a> for more details), clone <a href=https://github.com/learnbyexample/TUI-apps>this repository</a> and run the <code>connect_square.py</code> file.</p><br><h2 id=screenshots>Screenshots<a aria-label="Anchor link for: screenshots" class=zola-anchor href=#screenshots>🔗</a></h2><p>Adjust your terminal's dimension for the game widgets to appear properly, for example 80x30 (characters x lines). Sample screenshots are shown below:<p align=center><img alt="Sample screenshot for Connect Four game" src=https://raw.githubusercontent.com/learnbyexample/TUI-apps/main/ConnectSquare/connect_four.png><p align=center><img alt="Sample screenshot for Connect Four or Square game" src=https://raw.githubusercontent.com/learnbyexample/TUI-apps/main/ConnectSquare/connect_both.png></p><br><h2 id=guide>Guide<a aria-label="Anchor link for: guide" class=zola-anchor href=#guide>🔗</a></h2><ul><li>Press the <strong>n</strong> key to start a new game. Existing game, if any, will be abandoned<li>You can choose between <strong>Connect Four</strong>, <strong>Connect Square</strong> (default) and <strong>Both</strong> types of game<li>You can choose between <strong>Easy</strong> (default), <strong>Medium</strong> and <strong>Hard</strong> difficulty modes: <ul><li>In the <em>Easy</em> mode, the AI will make a random move<li>In the <em>Medium</em> mode, the AI will make a random move based on certain weight calculations<li>In the <em>Hard</em> mode, the AI will make the best move based on the weight calculations (the algorithm is based only on the current board state and thus it is not impossible for the user to win)</ul><li>The first move is based on the <strong>User first</strong> (default) and <strong>AI first</strong> choices<li>Only the bottom most empty cell of each column will be considered as a valid move<li>Press the <strong>t</strong> key to toggle between light and dark themes<li>Press the <strong>q</strong> key to quit the app</ul><p>User moves are denoted by the ⭕️ character and AI moves are denoted by the ✖️ character.<p>The text panel under the game board displays the current status of the game. If the game ends with one of the players forming a valid line or square, the cells forming the winning move will be highlighted.<h2 id=square-tic-tac-toe>Square tic tac toe<a aria-label="Anchor link for: square-tic-tac-toe" class=zola-anchor href=#square-tic-tac-toe>🔗</a></h2><p>If you liked this game, you might also enjoy <a href=https://github.com/learnbyexample/TUI-apps/tree/main/SquareTicTacToe>Square tic tac toe</a>.<p>If you are interested in learning more about the AI algorithm for the Connect Square game, check out my <a href=https://learnbyexample.github.io/practice_python_projects/square_tic_tac_toe/square_tic_tac_toe_ai.html>explanation here for Square tic tac toe</a> — while there are a few differences between the two, the foundation is the same.</div><div class=post-footer><div class=post-tags><a href=https://learnbyexample.github.io/tags/python/>#python</a><a href=https://learnbyexample.github.io/tags/tui/>#TUI</a><a href=https://learnbyexample.github.io/tags/textual/>#textual</a></div><hr color=#e6e6e6><div class=post-nav><p><a class=previous href=https://learnbyexample.github.io/programming-deals-2025/>← Festive offers for books on Python, Linux, Regular Expressions, Vim and more!</a><br><p><a class=next href=https://learnbyexample.github.io/python-regex-cheatsheet/>Python regular expression cheatsheet and examples →</a><br></div><hr color=#e6e6e6><p>📰 Use <a href=https://learnbyexample.github.io/atom.xml>this link</a> for the Atom feed. <br> ✅ Follow me on <a href=https://twitter.com/learn_byexample>Twitter</a>, <a href=https://github.com/learnbyexample>GitHub</a> and <a href=https://www.youtube.com/c/learnbyexample42>Youtube</a> for interesting tech nuggets. <br> 📧 Subscribe to <a href=https://learnbyexample.gumroad.com/l/learnbyexample-weekly>learnbyexample weekly</a> for programming resources, tips, tools, free ebooks and more (free newsletter, delivered every Friday).<hr color=#e6e6e6></div></article></div></main></div><script src=https://learnbyexample.github.io/even.js></script>

0 commit comments

Comments
 (0)