From 5c9fb7c3a5a0b0ae09823517d27459008239bb01 Mon Sep 17 00:00:00 2001 From: Armen Vartan Date: Wed, 3 Dec 2014 16:16:39 -0500 Subject: [PATCH] regex and readme yo --- README.md | 68 +++++++++++++++++++--------------- python/7-regex-intro/README.md | 29 +++++++++++++++ 2 files changed, 68 insertions(+), 29 deletions(-) create mode 100644 python/7-regex-intro/README.md diff --git a/README.md b/README.md index 09f9d50..875a1e3 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,59 @@ -Prework -======= +Welcome to Byte Academy +======================= + +We've put together this program to get you all on the same footing before entering. You will be learning some basic git, Unix, JavaScript, and Python. +Our goal is for you hit the ground running when you come to campus. + +The resources will build upon each other to whatever extent they can. +A lot of it is horizontal to other skills. So, if you are stuck on something, feel free to move on and come back to it later. + +## Step 1 Make a [GitHub](https://github.com/) account. -#### Git and Unix +Pick a text editor to use. We recommend [Sublime](http://www.sublimetext.com/) or [Atom](https://atom.io/). -[Command Line Crash Course](http://cli.learncodethehardway.org/book/) +Make sure [Python 3.4.2](https://wiki.python.org/moin/BeginnersGuide/Download) and [Node](http://nodejs.org/download/) are installed on your computer -[Try git](try.github.io) +## Step 2 -[Git Immersion](http://gitimmersion.com/) +Do these tutorials: +* [Command Line Crash Course](http://cli.learncodethehardway.org/book/) +* [Try git](try.github.io) +* [Git Immersion](http://gitimmersion.com/) +* [Code Academy HTML/CSS](http://www.codecademy.com/en/tracks/web). + +## Step 3 + +Work through the practice problems provided. We recommend starting with front end, moving to JS, and finishing with Python. + +Here are some resources to help you on assignments, as well has good reads. #### Front End -Do Code Academy's [HTML/CSS course](http://www.codecademy.com/en/tracks/web). - -[Guide to wireframing](http://webdesign.tutsplus.com/articles/a-beginners-guide-to-wireframing--webdesign-7399) - +[Guide to wireframing](http://webdesign.tutsplus.com/articles/a-beginners-guide-to-wireframing--webdesign-7399) [A compilation of wireframing articles](http://www.gracesmith.co.uk/get-wireframing-the-all-in-one-guide/) #### JavaScript -[Javascript Loops](http://www.w3schools.com/js/js_loop_for.asp) - -[Javascript Object Literals](http://www.w3schools.com/js/js_objects.asp) - -[Javascript Functions](http://www.w3schools.com/js/js_functions.asp) - -[Javascript Constructors and the new keyword](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) - -[Read through the design patterns in this book](http://addyosmani.com/resources/essentialjsdesignpatterns/book/#designpatternsjavascript) - -[Javascript Constructor and Prototype](http://pivotallabs.com/javascript-constructors-prototypes-and-the-new-keyword/) - -[JQuery API Docs](http://api.jquery.com/) - -[jQuery Best Practices](http://gregfranko.com/jquery-best-practices/#/) +* [Javascript Loops](http://www.w3schools.com/js/js_loop_for.asp) +* [Javascript Object Literals](http://www.w3schools.com/js/js_objects.asp) +* [Javascript Functions](http://www.w3schools.com/js/js_functions.asp) +* [Javascript Constructors and the new keyword](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new) +* [Read through the design patterns in this book](http://addyosmani.com/resources/essentialjsdesignpatterns/book/#designpatternsjavascript) +* [Javascript Constructor and Prototype](http://pivotallabs.com/javascript-constructors-prototypes-and-the-new-keyword/) +* [JQuery API Docs](http://api.jquery.com/) +* [jQuery Best Practices](http://gregfranko.com/jquery-best-practices/#/) #### Python -[Python Cheatsheet](http://perso.limsi.fr/pointal/_media/python:cours:mementopython3-english.pdf) - +* [Python Cheatsheet](http://perso.limsi.fr/pointal/_media/python:cours:mementopython3-english.pdf) #### Miscellaneous -[Rubular (for regex)](http://www.rubular.com) +* [Rubular (for regex)](http://www.rubular.com) +* [Wikipedia on pair programming](http://en.wikipedia.org/wiki/Pair_programming) -[Wikipedia on pair programming](http://en.wikipedia.org/wiki/Pair_programming) +#### Good Videos + +[Simplicity Matters](https://www.youtube.com/watch?v=rI8tNMsozo0) diff --git a/python/7-regex-intro/README.md b/python/7-regex-intro/README.md new file mode 100644 index 0000000..1a8a21b --- /dev/null +++ b/python/7-regex-intro/README.md @@ -0,0 +1,29 @@ +Regular Expressions +=================== + +Regular Expressions (regex for short) are a way to represent patterns in strings. They aren't as bad as people make them out to be. When used on the right problem, they are a great solution. + +Go to [Rubular](http://rubular.com/). We're going to sandbox inside it a bit to get acquainted with regex syntax. At the bottom of the page is a regex cheat sheet. +Note: Depending on the language, you may have to escape certain characters. For example, instead of `a{3}`, you may have to type `a\{3\}`. +Also, be careful with periods (`.`). A period means any character in regex, so you have to escape it if you want to pattern match a period. + +Here are some examples of regex and matching string patterns: +* `a{3}` => `aaa` +* `a{3,}` => `aaaaaaaa` +* `[a-z]` => any lowercase letter +* `[A-Z]{4,6}` => between 4 and 6 uppercase letters, ex. `FASDV` +* `.` => any character +* `\w\.` => `_.` +* `hello\d?` => `hello` or `hello5` +* `[a-nO-Z]*` => abcOZZ + +Make a regex to match each of these strings: +* match 'byte academy' 3 different ways +* an 8 character password, do not allow non word characters +* an 8 character password that has at least 1 number and 1 capital letter + + +* byteacademy@example.com +* byte.academy@example.com +* byteacademy22@example.co.uk +See if you can get all three with 1 regex, but not invalid emails (not having an @, etc...)