Logo

Python Lectures - Shared screen with speaker view
Fred Feng
16:38
http://umich.edu/~fredfeng/bdsi2021
Christopher Graham Akey
17:39
Just like me :)
Jenna N Bedrava
31:28
https://github.com/frfeng/python-workshop
Andrew Zheng
40:08
is there a keyboard shortcut for running cells
TA-Mathi
40:16
Ctrl+Enter
Andrew Zheng
40:21
thanks
TA-Mathi
42:00
No problem!
Anvit Garg
54:27
The latex for fraction and exponent does not seem to be rendering correctly for me. Pi renders though
Zachary Qian
55:45
what command are you using for fraction?
TA-Mathi
56:09
What is the latex keyword you are using?
Anvit Garg
56:13
I haven't changed anything. $\frac{4}{3}\pi r^3$
Zachary Qian
56:13
is it not just $\frac{NUMERATOR}{DENOMINATOR}$?
TA-Mathi
57:24
@Anvit: I see you are using carot '^' for exponent
TA-Mathi
57:33
You might want to try using ** 3
Jackie Ayoub
57:55
Yeah I think this is the mistake
Jackie Ayoub
58:13
because you used the correct eq for fraction
Jackie Ayoub
58:49
$\frac{}{}$
Zachary Qian
59:33
wait the carot should work still, no?
Anvit Garg
59:44
$\frac{4}{3}\pi r**3$ renders as 43𝜋𝑟∗∗3
Zachary Qian
59:54
yeah, the carot is acceptable for LateX
Anvit Garg
59:55
pretty sure it is a latex error, not python
Zachary Qian
01:00:20
$\frac{4}{3}\pi r^3$ works just fine for me
Anvit Garg
01:00:54
I guess there might be a problem with my settings then
TA-Mathi
01:01:13
Carot is accepted by python not for exponents but rather for doing an Exclusive OR (XOR) operation
Jackie Ayoub
01:01:46
no he is asking if it can be the same in latex
Anvit Garg
01:01:52
That is fine, but I'm in a markdown cell, not code cell
Ian M.
01:02:34
did u import the latex package to use frac?
Anvit Garg
01:03:01
\frac is base latex, is it not?
Julian Bernado
01:03:09
it is
Zachary Qian
01:03:10
yeah it is
Andrew Zheng
01:04:02
(x) ** (1/2) also works
Alejandra Solis Sala
01:04:14
np.sqrt()
Zachary Qian
01:10:14
lol @final four this year
Zachary Qian
01:13:13
random but does python have ternary operators like c++
TA-Mathi
01:14:31
Yes Python supports ternary operator
Jackie Ayoub
01:14:33
yes
Jackie Ayoub
01:14:55
You can check this for more info: https://www.geeksforgeeks.org/ternary-operator-in-python/
Zachary Qian
01:15:15
thank you!
Andrew Zheng
01:17:39
trying to experiment with more keyboard shortcuts but can’t find the one for deleting selected cell
Andrew Zheng
01:17:46
cmd+D and ctrl+D don’t seem to do it for me
Grace Smith (she/her)
01:17:55
dd
Anvit Garg
01:17:57
escape dd
Jackie Ayoub
01:18:51
D + D (press the key twice)
Andrew Zheng
01:19:09
thanks
Jenna N Bedrava
01:48:15
don’t forget if you need help, feel free to message in the group chat or message Mathi or Jackie!
Ian M.
01:54:57
you can also press B to add a new cell without running the current one
Andrew Zheng
01:55:37
maybe it’s just me, or does the audio turn into slow motion every once in a while
Esther T. Adegoke
01:55:50
same here
Anvit Garg
01:55:54
yep
Zachary Qian
01:55:55
happens for me
Jackie Ayoub
01:56:00
same here
Anvit Garg
02:01:34
Can I use emojis as variable names?
Jackie Ayoub
02:02:08
yes
Andrew Zheng
02:02:38
I was not able to
Anvit Garg
02:02:43
Gives me "Syntax Error: invalid character in identifier"
Andrew Zheng
02:03:24
that’s one way to make your collaborators hate you :P
Joshua Alexander Fink
02:03:34
Hahaha
Jackie Ayoub
02:03:49
it is shown that in python 3 we can so not sure
Anvit Garg
02:03:58
good to know. Will switch to Julia then
Christopher Graham Akey
02:11:30
I’m getting an error here
Jackie Ayoub
02:12:17
did you download the data?
Christopher Graham Akey
02:12:30
How do I download the data?
Jackie Ayoub
02:12:31
And you need to import it to Jupiter notebook
Jackie Ayoub
02:12:50
once you import it there
Jackie Ayoub
02:13:15
You change to pd.read_csv(“red-crashes.csv)
Jackie Ayoub
02:14:01
pe*
Jackie Ayoub
02:14:05
ped*
Jackie Ayoub
02:14:23
Let me see if I can attach the data here
Jackie Ayoub
02:15:10
in the home page of Jupyter notebook
Jackie Ayoub
02:15:30
Click on upload and insert the attached file
Jackie Ayoub
02:15:46
after change to change to pd.read_csv(“ped-crashes.csv)
Michael Miller
02:16:44
idk if this will help but os.getcwd() will show you your working directory, and if it ends in python-workshop then the csv file should be reached by that path
Anvit Garg
02:17:07
(need to import os before running that)
Michael Miller
02:17:27
oh yes right thanks
Christopher Graham Akey
02:19:04
I got it uploaded. Thanks! :)
Jackie Ayoub
02:19:10
great
Anvit Garg
02:27:21
Monday
Ian M.
02:27:22
Sunday
Sabir Meah
02:27:25
Monday
Teya Mykal Davis
02:27:26
Saturday
Esther T. Adegoke
02:27:27
Friday
Sasha Lioutikova
02:27:27
friday
Margie Knight
02:27:28
Friday
Rami Shams
02:27:29
Friday
Verma, Rhea
02:27:30
friday
Andrew Zheng
02:27:30
Friday
Joy
02:27:31
friday
Madeline Peterson
02:27:32
friday
Jamie Forschmiedt (she/her)
02:27:33
Monday
Sasha Lioutikova
02:28:35
let’s go team friday
Joy
02:28:44
ayy
Andrew Zheng
02:28:45
people are partying and getting drunk
Ian M.
02:30:53
yay team sunday
Julian Bernado
02:31:17
"team"
Ian M.
02:31:33
:`(
Anvit Garg
02:42:32
514
Anvit Garg
02:42:59
7.54%
Rami Shams
02:43:01
about 7.5%
Joy
02:43:12
7.5
Joy
02:59:32
thank you! Your lectures are amazing
Madeline Peterson
02:59:33
Thank you!