*** shmohamud has quit (Ping timeout: 480 seconds) | 01:49 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 04:32 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 06:33 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 10:35 | |
*** sysadmin has quit (Ping timeout: 480 seconds) | 10:55 | |
*** shmohamud has quit (Remote host closed the connection) | 12:51 | |
scooper | good morning Sahnun | 12:52 |
---|---|---|
shmohamud | good day scooper | 12:53 |
shmohamud | I made a repo for you to clone for today's lesson | 12:53 |
shmohamud | https://github.com/shmohamud/Nova_Web_Dev_Practice.git | 12:54 |
scooper | Ok thanks, will you paste the link here | 12:54 |
scooper | Sahnun | 12:55 |
scooper | This mean we will be using this repository for all of our work right??? | 12:56 |
shmohamud | Good question. I haven't decided yet. Should we? | 12:56 |
scooper | yes | 12:56 |
scooper | since you are the creator | 12:56 |
scooper | No need to use the other one I created yesterday.... | 12:57 |
shmohamud | My only concern is how will multiple people be able to push changes to my single repo? | 12:57 |
shmohamud | If you guys each forked the repo maybe that would work? | 12:59 |
scooper | yes forking it will work | 13:00 |
scooper | one more thing am I added as contributor??? | 13:00 |
shmohamud | what's your github handle? I'll add you now | 13:01 |
scooper | Spencerscooper | 13:04 |
fkoikoi | Good Morning shmohamud | 13:04 |
shmohamud | good day fkoikoi | 13:05 |
shmohamud | would you please fork this repo: https://github.com/shmohamud/Nova_Web_Dev_Practice.git | 13:05 |
fkoikoi | okay | 13:05 |
shmohamud | can someone add "plan how to set up class/homework github" the agenda? | 13:06 |
fkoikoi | okay | 13:07 |
fkoikoi | !help | 13:07 |
LittleWebster | Available commands: !add, !agenda, !help, !remove | 13:07 |
fkoikoi | !add How to setup Class/homework on github | 13:09 |
LittleWebster | Success: "How to setup Class/homework on github" has been added to the agenda. | 13:09 |
fkoikoi | !agenda | 13:09 |
LittleWebster | This is the agenda for the next meeting: | 13:09 |
LittleWebster | Discuss Summer schedule (10 min). (added by jelkner) | 13:09 |
LittleWebster | How to setup Class/homework on github (added by fkoikoi) | 13:09 |
shmohamud | awesome | 13:10 |
fkoikoi | thanks | 13:10 |
shmohamud | let me know when you both have forked the Nova_Web_Dev_Practice repo | 13:10 |
fkoikoi | I have fork the repo | 13:10 |
scooper | I have fork the account already and clone it on my computer | 13:11 |
shmohamud | awesome | 13:11 |
shmohamud | so regular expressions are important because sometimes we want to filter text by some character or pattern of characters | 13:11 |
shmohamud | Imagine if you're a data scientist. You want to find all the occurrences of a sentence that starts with a lower case letter. You can write a regular expression that checks if there is there is a period "." followed by a lower case letter. | 13:13 |
shmohamud | regular expressions exist in most programming languages. Regular expressions are a way to match strings of texts. Whether it’s a particular character or pattern or characters. | 13:13 |
shmohamud | Who can tell me what module we're using for regular expressions in python? | 13:14 |
scooper | I m lost here when you say which module, I you talking about python? | 13:15 |
shmohamud | yes, I'm talking about Python. The repo I shared, regular_expressions.py | 13:16 |
shmohamud | correction: regex_practice.py | 13:16 |
scooper | NO I m not too sure.... | 13:17 |
scooper | just a guess "re" | 13:17 |
scooper | \me spencer is talking with the supe | 13:18 |
scooper | ACTION spence is talking with the supe | 13:18 |
shmohamud | correcy | 13:19 |
shmohamud | correct scooper. re is the built-in package that supplies us the re module. | 13:20 |
fkoikoi | shmohamud | 13:22 |
fkoikoi | What is a module and how can you know or identify the module? | 13:22 |
shmohamud | A module is a set of code or functions with the.py extension. A library is a collection of related modules or packages. They are used by both programmers and developers | 13:23 |
shmohamud | Modules are imported. So the way to spot a module is when you see the "import" keyword | 13:23 |
scooper | ACTION back | 13:26 |
fkoikoi | thanks | 13:26 |
scooper | I m here now | 13:26 |
shmohamud | awesome. | 13:26 |
fkoikoi | I added you as collaborator to yesterday | 13:26 |
shmohamud | Today's lesson is tough, I'm not good with regular expressions myself, usually I'll google them to figure out how to write them. So today, I want us to just get an overview of what they are and how they can be used | 13:27 |
shmohamud | do you both see the first match_string function? | 13:28 |
scooper | from the assignment question or in here??? | 13:30 |
shmohamud | from the repo I shared | 13:30 |
shmohamud | regex_practice.py | 13:31 |
scooper | let me check | 13:31 |
scooper | I m only seeing regex_homework.py | 13:32 |
scooper | all other string is comment | 13:33 |
shmohamud | check under in_class directory | 13:33 |
scooper | ok | 13:33 |
shmohamud | there should be a regex_practice.py | 13:33 |
scooper | let me do that | 13:33 |
fkoikoi | +1 | 13:34 |
fkoikoi | I saw it | 13:34 |
scooper | you mean in this directory | 13:34 |
fkoikoi | it's in the in_class directory | 13:35 |
scooper | did you just push it??? | 13:35 |
shmohamud | nope, it was pushed since yesterday night | 13:36 |
scooper | forkWithSahnun/Nova_Web_Dev_Practice/homework | 13:36 |
scooper | this is my files path | 13:36 |
shmohamud | oh, you forked the homework directory I think | 13:36 |
shmohamud | I want you to fork Nova_Web_Dev_Practice itself | 13:37 |
scooper | Yes I forked Nova_Web | 13:37 |
shmohamud | it should be in Nova_Web_Dev_Practice/in_class | 13:37 |
scooper | ooh | 13:38 |
scooper | I saw | 13:38 |
shmohamud | awesome | 13:38 |
scooper | in_class is another subdirectory right?? | 13:39 |
shmohamud | yes | 13:39 |
scooper | forkWithSahnun/Nova_Web_Dev_Practice/in_class | 13:39 |
scooper | regex_practice.py | 13:39 |
shmohamud | exactly | 13:40 |
scooper | should I open it??? | 13:40 |
shmohamud | so, I want you to read the first match_string and the comment and let me know when you're done. | 13:40 |
shmohamud | Yes, open it please. | 13:40 |
scooper | I m done | 13:42 |
fkoikoi | +1 | 13:43 |
shmohamud | Ok, notice where it has "^[a-zA-Z0-9_]+$" | 13:43 |
scooper | yes | 13:43 |
shmohamud | that's the regular expression - it's telling the match function what to look for | 13:43 |
shmohamud | a-z means all lowercase letters | 13:44 |
shmohamud | A-Z means all uppercase letters | 13:44 |
shmohamud | 0-9 means all numbers | 13:44 |
shmohamud | underscore means all underscores | 13:44 |
shmohamud | the carrot at the beginning means: "Match the expression to its right at the start of the string" | 13:44 |
shmohamud | as you can see, it's a bit confusing, because they're all bunched up in the brackets | 13:45 |
shmohamud | that's why I usually look them up, there are too many rules to remember them all without investing a lot of time | 13:45 |
shmohamud | Here is a cheat sheet with regular expression terms in python: https://www.dataquest.io/wp-content/uploads/2019/03/python-regular-expressions-cheat-sheet.pdf | 13:46 |
shmohamud | if you're curious, definitely look into the above and try to understand how the regex is working. | 13:46 |
shmohamud | Ok, so, please read match_string2 and let me know when you're done | 13:47 |
scooper | from the link right??? | 13:47 |
shmohamud | no, from the regex_practice.py | 13:48 |
scooper | ooh ok | 13:48 |
fkoikoi | done | 13:49 |
scooper | I m done | 13:49 |
shmohamud | ok, notice the "ab*" is the regular expression here. | 13:51 |
shmohamud | the "a" says look for all "a" and the "b*" means one or more "b" | 13:51 |
fkoikoi | +1 | 13:52 |
shmohamud | for match_string2 it will match whether the b comes first or the a comes first. | 13:53 |
shmohamud | ok match_string3, please read through | 13:54 |
scooper | question before reading please | 13:55 |
shmohamud | let me know when you're done. | 13:55 |
shmohamud | Yes? | 13:55 |
scooper | is the "r" representing a method or a regular expression. 2 you said b mean look for one or more right ?? | 13:58 |
scooper | is it because of the multiplication sign that why b is searching for more then one b in this expression??? | 13:59 |
shmohamud | the "r" in the beginning is making sure that the string is being treated as a "raw string" | 14:00 |
shmohamud | yes, the multiplication sign "*" means one or more | 14:01 |
scooper | lastly can we address addition and dollars sign in the problem | 14:01 |
shmohamud | I was mistaken about the "*" it matches 0 or more times | 14:02 |
shmohamud | the "+" | 14:02 |
shmohamud | Greedily matches the expression to its left 1 | 14:02 |
shmohamud | or more times. | 14:02 |
shmohamud | the | 14:03 |
shmohamud | | Matches the expression to its left at the | 14:03 |
shmohamud | end of a string. It matches every such | 14:03 |
shmohamud | instance before each \n in the string | 14:03 |
shmohamud | "$" sign | 14:03 |
shmohamud | really good questions. I recommend looking at this: https://www.dataquest.io/wp-content/uploads/2019/03/python-regular-expressions-cheat-sheet.pdf | 14:04 |
scooper | ok | 14:06 |
scooper | I m done with matching_string3 | 14:06 |
shmohamud | fkoikoi? | 14:07 |
fkoikoi | yes | 14:07 |
shmohamud | ok, now read the last one. Then, predict which ones of the test cases will fail | 14:08 |
shmohamud | Finally, run the program. | 14:09 |
shmohamud | I have to get going for the day - any questions before we call it a day? | 14:09 |
scooper | yes | 14:10 |
scooper | I ran the program | 14:10 |
scooper | already | 14:10 |
shmohamud | yes? | 14:12 |
scooper | 1 & 2 output is match and 3 & 4 output no match | 14:12 |
shmohamud | yes | 14:13 |
scooper | My question is about function.... | 14:13 |
scooper | I wil place it in the repository | 14:13 |
shmohamud | Ok | 14:14 |
shmohamud | Any last questions? | 14:14 |
scooper | But before I do that let me give you a hint | 14:14 |
scooper | According to python for everybody function can be call from another function once it's defined??????? | 14:15 |
shmohamud | Yes! | 14:15 |
scooper | shmohamud | 14:19 |
scooper | unfortunately I can not push to the repository | 14:20 |
scooper | fatal: not a git repository (or any parent up to mount point /) | 14:20 |
scooper | Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). | 14:20 |
shmohamud | yeah, we're going to figure that out this weekend. My git skills aren't the best, so I'd like Jeff and additional input on how to best est this up | 14:20 |
scooper | Oh I deleted the repository I share with you yesterday | 14:21 |
scooper | anyway should I paste it in here | 14:21 |
shmohamud | please do. I've got to run in about a minute but I'll check the logs before we meet tomorrow | 14:22 |
scooper | this will run | 14:22 |
scooper | ef message () : | 14:22 |
scooper | print("Welcome to Novaweb Development") | 14:22 |
scooper | print("At Novaweb we believe in helping people learn how to code") | 14:22 |
scooper | def introduction () : | 14:22 |
scooper | message () | 14:22 |
scooper | print("If you are highly interesting in coding enroll now!!") | 14:22 |
scooper | introduction () | 14:22 |
shmohamud | It should. Have you tested it? | 14:23 |
scooper | this will not run if I called the last function in the first function | 14:23 |
scooper | def message () : | 14:23 |
scooper | introduction () | 14:23 |
scooper | print("If you are highly interesting in coding enroll now!!") | 14:23 |
scooper | message () | 14:23 |
scooper | 14:23 | |
scooper | def introduction () : | 14:23 |
scooper | print("Welcome to Novaweb Development") | 14:23 |
scooper | print("At Novaweb we believe in helping people learn how to code") | 14:23 |
shmohamud | if you call message() after you define introduction, let me know if that works | 14:25 |
scooper | I send you two | 14:25 |
scooper | the first two function will work | 14:25 |
shmohamud | I believe it's a Name Error because introduction is not defined at the time message is called | 14:25 |
scooper | the second two will not work at I switch thing around | 14:26 |
scooper | it keep saying NameError" Introduction not defined | 14:26 |
shmohamud | Ok, so that makes sense. The function must be defined at the time it's called. So, the first two work because message is defined and then introduction is calledx | 14:26 |
shmohamud | Yes, because the function doesn't exist at the time it's called. Try moving the call to message to be below where introduction is defined and let me know what happens | 14:27 |
shmohamud | Ok I've got to go for the day, but try that and let me know tomorrow what happens | 14:28 |
scooper | it work | 14:29 |
scooper | but that is a discussion for another day | 14:29 |
shmohamud | awesome. Because it's defined. | 14:29 |
shmohamud | Yes, great job today guys, this is tough stuff so try the homework and we will work through it tomorrow | 14:29 |
shmohamud | ACTION logs off for the day | 14:29 |
*** shmohamud has quit (Remote host closed the connection) | 14:29 | |
scooper | Thanks Sahnun | 14:29 |
scooper | ACTION logging out after learning a lot for Sahnun | 14:30 |
*** scooper has quit (Quit: Leaving) | 14:30 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 14:38 | |
*** tboimah has quit (Quit: Leaving) | 14:38 | |
*** fkoikoi has quit (Ping timeout: 480 seconds) | 14:46 | |
scooper | Hello Programmer, are you still here??? | 15:39 |
*** scooper has quit (Quit: Leaving) | 15:53 | |
*** shmohamud has quit (Remote host closed the connection) | 16:01 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 17:17 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!