Git Product home page Git Product logo

parsing-workshop's Introduction

Parsing-Workshop

This is Insight's workshop to help our DevOps Fellows prepare for parsing interviews. In this workshop, we cover Bash fundamentals (as well as awk, sed and the likes) as well as specific parsing modules in Python. The workshop is mostly exercise driven and thus only really useful if all exercises are completed.

Prerequisites

We expect that you...

  • ... have written a very basic Bash script before.
  • ... are familiar with basic Python data structures (such as variables, lists and dictionary).
  • ... do not just read through the workshop but actually work on all exercises!

How to walk through this workshop

The main guiding blocks of the workshops are the different chapters.

  • Fork this repository and then clone it!
  • In each chapter, work through the README.md file and record the answers to the exercises in Bash and Python scripts.
  • At the end of some chapters, there are links to certain more involved exercises. These exercises can all be found in the exercises folder.
    • Solve those exercises in Bash and Python and save your solutions in the folder of the exercise.
  • Pair up with fellow Fellows and do a code review on your solutions.
  • Feel free to add exercises yourself, we are happy to review pull requests and incorporate them.

Where do I get started?

Let us get started in chapter 1.

parsing-workshop's People

Contributors

bastihaase avatar cgoolsby avatar ddrum001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

parsing-workshop's Issues

Suggestions for Chapters 2 and 3

In chapter 2, I have a couple of notes:

  • The argparse module is a bit heavy handed for most purposes. In most cases, it is faster and easier to use sys.argv. Surprisingly, it was a little hard to find good, simple examples of sys.argv on a site that isn't riddled with popups, but I think this site should do. sys.argv is simply a list of arguments given to a python program, with the name of the program at index 0.
  • This comprehensive python cheatsheet should be included in the resources. Between this cheatsheet, google, and practice practice practice, you have the recipe for a good time learning python. For a less terse, more example-driven reference, I like learnXinYminutes

Notes for chapter 3:

The awk tutorial in the references is not very learner friendly for several reasons. It would be good to establish the usual awk 'condition {action}; another condition {another action}' file structure and then talk about possible conditions and actions in increasing complexity using examples. There are some ok tutorials out there, like this one, although this one makes a huge oversight in not mentioning regular expressions and piping into other commands like sort or uniq. Basically, I think it's worth fleshing out awk a bit.

  • First with regex, like printing out field 3 of lines matching a regex:
awk '/^A[bc]+/ {print "The third field of this matching line is ",$3}' file.txt
  • Then get into examples of the built in variables NR,FNR,NF,FS,OFS to do things like averages.
  • Then maybe get into BEGIN{} END{}, variables and associative arrays (using BEGIN rather than -v).
  • Then some basic flow control.
  • Then show the possibilities of piping into sort -rn, uniq -c, etc.
  • All of this, of course, driven by examples. I think that would give a strong enough foundation to tackle to parsing exercises.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.