23
GNU awk idioms explained (learnbyexample.github.io)
50
36
130
FFmpeg By Example (ffmpegbyexample.com)
35
Understanding Memory Management (educatedguesswork.org)
30

Hello!

I recently published a new version of my Understanding Python re(gex)? ebook.

This book will help you learn Python Regular Expressions step-by-step from beginner to advanced levels with hundreds of examples and exercises. In addition to the standard library re, the third-party regex module is also covered in this book.

Release offers

To celebrate the new release, you can download the PDF/EPUB versions for free till 31-Jan-2025:

Interactive TUI app

I wrote a TUI app to help you solve exercises from this book interactively. See PyRegexExercises repo for installation steps and app_guide.md for instructions on using this app.

See my blog post Python regex cheatsheet for a quick reference.

Web version and GitHub repo

You can read the book online here: https://learnbyexample.github.io/py_regular_expressions/

Visit https://github.com/learnbyexample/py_regular_expressions for markdown source, example files, exercise solutions, sample chapters and other details related to the book.

Feedback and Errata

I would highly appreciate it if you'd let me know how you felt about this book. It could be anything from a simple thank you, rating/review, pointing out a typo, mistakes in code snippets, which aspects of the book worked for you (or didn't!) and so on. Reader feedback is essential and especially so for self-published authors.

Happy learning :)

82
19
33
32
24
60
[-] learnbyexample@programming.dev 9 points 8 months ago

oxipng, pngquant and svgcleaner for optimizing images

auto-editor for removing silent portions from video recordings

[-] learnbyexample@programming.dev 22 points 10 months ago* (last edited 10 months ago)

As per the manual, "Mappings are set up to work like most click-and-type editors" - which is best suited with GUI Vim.

While Vim doesn't make sense to use without the modes, there are plugins like https://github.com/tombh/novim-mode!

Bobiverse by Dennis E. Taylor is a fun and easy read

[-] learnbyexample@programming.dev 11 points 1 year ago

+1 for Cradle already mentioned. I'd add

  • The Riyria Revelations by Michael J. Sullivan
  • Kings of the Wyld by Nicholas Eames
[-] learnbyexample@programming.dev 8 points 1 year ago* (last edited 1 year ago)
alias a='alias'

a c='clear'
a p='pwd'
a e='exit'
a q='exit'

a h='history | tail -n20'
# turn off history, use 'set -o history' to turn it on again
a so='set +o history'

a b1='cd ../'
a b2='cd ../../'
a b3='cd ../../../'
a b4='cd ../../../../'
a b5='cd ../../../../../'

a ls='ls --color=auto'
a l='ls -ltrhG'
a la='l -A'
a vi='gvim'
a grep='grep --color=auto'

# open and source aliases
a oa='vi ~/.bash_aliases'
a sa='source ~/.bash_aliases'

# sort file/directory sizes in current directory in human readable format
a s='du -sh -- * | sort -h'

# save last command from history to a file
# tip, add a comment to end of command before saving, ex: ls --color=auto # colored ls output
a sl='fc -ln -1 | sed "s/^\s*//" >> ~/.saved_commands.txt'
# short-cut to grep that file
a slg='< ~/.saved_commands.txt grep'

# change ascii alphabets to unicode bold characters
a ascii2bold="perl -Mopen=locale -Mutf8 -pe 'tr/a-zA-Z/๐—ฎ-๐˜‡๐—”-๐—ญ/'"

### functions
# 'command help' for command name and single option - ex: ch ls -A
# see https://github.com/learnbyexample/command_help for a better script version
ch() { whatis $1; man $1 | sed -n "/^\s*$2/,/^$/p" ; }

# add path to filename(s)
# usage: ap file1 file2 etc
ap() { for f in "$@"; do echo "$PWD/$f"; done; }

# simple case-insensitive file search based on name
# usage: fs name
# remove '-type f' if you want to match directories as well
fs() { find -type f -iname '*'"$1"'*' ; }

# open files with default application, don't print output/error messages
# useful for opening docs, pdfs, images, etc from command line
o() { xdg-open "$@" &> /dev/null ; }

# if unix2dos and dos2unix commands aren't available by default
unix2dos() { sed -i 's/$/\r/' "$@" ; }
dos2unix() { sed -i 's/\r$//' "$@" ; }
[-] learnbyexample@programming.dev 23 points 2 years ago

See also:

[-] learnbyexample@programming.dev 8 points 2 years ago

If you don't mind sci-fi: Red Rising by Pierce Brown

And there's the classic The Count of Monte Cristo by Alexandre Dumas

[-] learnbyexample@programming.dev 9 points 2 years ago* (last edited 2 years ago)

I start my search string with stackoverflow as a workaround.

[-] learnbyexample@programming.dev 11 points 2 years ago

Here are some of my favorites:

  • Cradle by Will Wight
  • Mage Errant by John Bierce
  • Howl's Moving Castle by Diana Wynne Jones
  • Legends & Lattes by Travis Baldree
  • The Dragon with a Chocolate Heart by Stephanie Burgis
  • Half a Soul by Olivia Atwater
  • The Riyria Revelations by Michael J. Sullivan
  • Kings of the Wyld by Nicholas Eames
  • The Kingkiller Chronicle by Patrick Rothfuss
  • The Sword of Kaigen by M. L. Wang
[-] learnbyexample@programming.dev 7 points 2 years ago

Yeah, PCC is a good choice. Make sure to type examples codes manually (i.e. don't just read them) and try to solve all the exercises. Since you mention you want to learn it as a hobby, "Automate the Boring Stuff with Python" (2nd edition) would be a good choice as well, as you might find some of the projects in the second half helpful.

view more: next โ€บ

learnbyexample

joined 2 years ago