From 94e19663cdf24535bac8dabf0e843c394bfca94c Mon Sep 17 00:00:00 2001 From: ronny abraham Date: Mon, 10 Mar 2025 04:43:17 +0200 Subject: [PATCH] started data wranglang --- _subsections/lesson-04.org | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/_subsections/lesson-04.org b/_subsections/lesson-04.org index 218ede6..c00daf3 100644 --- a/_subsections/lesson-04.org +++ b/_subsections/lesson-04.org @@ -10,7 +10,7 @@ - [[https://www.youtube.com/playlist?list=PLyzOVJj3bHQuloKGG59rS43e29ro7I57J][Playlist: Missing Semester]] - [[https://missing.csail.mit.edu/2020/data-wrangling/][class notes]] -- Curr: https://youtu.be/sz_dsktIjt4?si=BekzMmns2yPtCWOz +- Curr: https://youtu.be/sz_dsktIjt4?si=0WESCuewbWY5mJiv&t=622 *** timestamps @@ -24,7 +24,7 @@ + [[https://www.youtube.com/watch?v=sz_dsktIjt4&t=456s][07:36 - Replacement Expressions]] + [[https://www.youtube.com/watch?v=sz_dsktIjt4&t=538s][08:58 - Regular Expression]] + [[https://www.youtube.com/watch?v=sz_dsktIjt4&t=560s][09:20 - Regular Expressions]] -+ [[https://www.youtube.com/watch?v=sz_dsktIjt4&t=620s][10:20 - Square Brackets]] ++ [[https://www.youtube.com/watch?v=sz_dsktIjt4&t=620s][10:20 - Square Brackets]] *current* + [[https://www.youtube.com/watch?v=sz_dsktIjt4&t=693s][11:33 - Add Modifiers]] + [[https://www.youtube.com/watch?v=sz_dsktIjt4&t=776s][12:56 - Alternations]] + [[https://www.youtube.com/watch?v=sz_dsktIjt4&t=1029s][17:09 - Anchoring the Regular Expression]] @@ -45,4 +45,27 @@ + [[https://www.youtube.com/watch?v=sz_dsktIjt4&t=2880s][48:00 - display in an image display]] * notes +** intro example +- using ssh someserver 'somecommand' will run that command on the server +- you could run a series of commands on the server instead of channeling all that info back + #+BEGIN_SRC bash + ssh someserver 'journalctl | grep sshd | grep "Disconnected from"' | less + #+END_SRC + +- this will run journalctl on the server, find anything that says 'sshd' and 'disconnec..' in the results +- then send all those results back to our machine where we pipe it through 'less' + +** SED +- stream editor +- allows you to make changes to the contents of a stream +- full programming langauge +- common task is to run replacement expressions on an input stream + +*** example +#+BEGIN_SRc bash +sed 's/.*blahblah blah//' +#+END_SRC + +- uses regular expressions + - way of matching text