text stringlengths 1 81 | start float64 0 10.1k | duration float64 0 24.9 |
|---|---|---|
www. twitter.com davidj maen all right | 7,041.159 | 6.401 |
enter what is going on we have to say | 7,047.88 | 6.96 |
group two I have to say group two well | 7,051.8 | 5.319 |
wait all right because we had the the | 7,054.84 | 5 |
subdomain was optional and to make it | 7,057.119 | 4.96 |
optional I needed to use parentheses | 7,059.84 | 4.72 |
here and so I then said zero or one okay | 7,062.079 | 5.761 |
so that means that actually I'm | 7,064.56 | 5.92 |
unintentionally but by Design capturing | 7,067.84 | 5.48 |
the www do or none of it if it wasn't | 7,070.48 | 5.639 |
there before but I have a second match | 7,073.32 | 4.08 |
over here because I have a second set of | 7,076.119 | 2.96 |
parentheses so I think yep let me change | 7,077.4 | 4.04 |
matches group one to matches group two | 7,079.079 | 5.52 |
and let's rerun this python of twitter. | 7,081.44 | 7.639 |
https www. Twitter let's do this uh | 7,084.599 | 9.321 |
twitter.com davidj maen enter and now | 7,089.079 | 7.12 |
we've got access to the username let me | 7,093.92 | 4.199 |
go ahead and tighten it up a little bit | 7,096.199 | 5.241 |
further uh if you like uh our new friend | 7,098.119 | 4.881 |
uh it's hard not to like if we like our | 7,101.44 | 4.239 |
old friend The Walrus uh operator let's | 7,103 | 4.199 |
go ahead and add this just to tighten | 7,105.679 | 3.721 |
things up let me go back to vs code here | 7,107.199 | 3.96 |
and let me get rid of the unnecessary | 7,109.4 | 3.279 |
condition there and combine it up here | 7,111.159 | 4.321 |
if matches equals that but let's change | 7,112.679 | 4.321 |
the single assignment operator to the | 7,115.48 | 3.44 |
Wallace operator now I've tightened | 7,117 | 4.639 |
things up further but I bet I bet I bet | 7,118.92 | 5.279 |
there might be another solution here and | 7,121.639 | 5.641 |
indeed it turns out that we can come | 7,124.199 | 6.841 |
back to this final set of syntax recall | 7,127.28 | 4.879 |
that when we introduced these | 7,131.04 | 2.72 |
parentheses we did it so that we could | 7,132.159 | 4.201 |
do a or b for instance with the vertical | 7,133.76 | 4.16 |
bar though you can even combine more | 7,136.36 | 4.08 |
than just one bar we used the group to | 7,137.92 | 5.319 |
combine ideas like the www dot and then | 7,140.44 | 5.279 |
there's this admittedly weird syntax at | 7,143.239 | 5.561 |
the bottom here up until now not used | 7,145.719 | 5.761 |
there is a non- capturing version of | 7,148.8 | 4.08 |
parentheses if you want to use | 7,151.48 | 3.04 |
parentheses logically because you need | 7,152.88 | 3.88 |
to but you don't want to bother | 7,154.52 | 4.28 |
capturing the result and this would | 7,156.76 | 3.919 |
arguably be a better solution here | 7,158.8 | 4.799 |
because yes if I go back to s code I do | 7,160.679 | 5.761 |
need to surround the www do with | 7,163.599 | 4.681 |
parentheses at least as I've written my | 7,166.44 | 4.08 |
Rex here because I wanted to put the | 7,168.28 | 4.6 |
question mark after it but I don't need | 7,170.52 | 5.159 |
the www dot coming back in fact let's | 7,172.88 | 4.839 |
only extract the data we care about just | 7,175.679 | 3.96 |
so there's no confusion down the road | 7,177.719 | 4.44 |
for me or my colleagues or my teachers | 7,179.639 | 5.52 |
so what could I do well the syntax per | 7,182.159 | 5.52 |
this slide is to use a question mark and | 7,185.159 | 5.44 |
a colon immediately after the open | 7,187.679 | 5.321 |
parenthesis it looks weird admittedly | 7,190.599 | 4 |
those of you who have prior programming | 7,193 | 3.199 |
experience might recognize the syntax | 7,194.599 | 4.04 |
from Turner operators doing an if else | 7,196.199 | 5.721 |
allinone line a question mark colon at | 7,198.639 | 5.52 |
the beginning of that parenthetical | 7,201.92 | 5.159 |
means yes I'm using parentheses to group | 7,204.159 | 5.361 |
these things together but no you do not | 7,207.079 | 5 |
need to capture them instead so I can | 7,209.52 | 4.88 |
change my code back now to matches. | 7,212.079 | 4.721 |
group one I'll clear my screen here run | 7,214.4 | 5.719 |
python of twitter. I'll again run here | 7,216.8 | 4.16 |
uh | 7,220.119 | 4.761 |
https twitter.com davidj maen with or | 7,220.96 | 7.56 |
without the www and now I indeed get | 7,224.88 | 8.08 |
back that username any questions then on | 7,228.52 | 7.76 |
these final | 7,232.96 | 6.48 |
techniques so first well could we move | 7,236.28 | 5.28 |
the carrot right at the beginning of | 7,239.44 | 4.56 |
Twitter and then just start reading from | 7,241.56 | 4.119 |
there and then get rid of everything | 7,244 | 4.159 |
else before that the kind of | 7,245.679 | 5.681 |
WWE uh issues that we had and then my | 7,248.159 | 6.321 |
second question is how would we um use | 7,251.36 | 6.719 |
kind of I guess it either a list or a a | 7,254.48 | 6.56 |
dictionary to to sort the dotom kind of | 7,258.079 | 6.16 |
thing if because we have Cod UK and that | 7,261.04 | 6.079 |
kind of s how would we bring that into | 7,264.239 | 5.161 |
uh the re function a good question but | 7,267.119 | 4.6 |
no if I move the carrot before | 7,269.4 | 4.64 |
twitter.com and throw away the protocol | 7,271.719 | 5.081 |
and the www then the user is going to | 7,274.04 | 5.119 |
have to type in literally | 7,276.8 | 5.2 |
twitter.com username they can't even | 7,279.159 | 4.121 |
type in that other stuff so that would | 7,282 | 3.84 |
be a regression a step back as for the | 7,283.28 | 5.839 |
do and the.org and.edu and so forth the | 7,285.84 | 5 |
short answer is there's many different | 7,289.119 | 3.921 |
solutions here if I wanted to be | 7,290.84 | 4.92 |
stringent about do and suppose that | 7,293.04 | 4.84 |
Twitter probably owns multiple domain | 7,295.76 | 4.16 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.