Тёмный
Jake Callahan
Jake Callahan
Jake Callahan
Подписаться
Principal Software Quality Engineer at Red Hat, Tech Lead
Understanding Python: Debugging
16:35
5 месяцев назад
Understanding Python: Logging Basics
17:54
6 месяцев назад
Python Standard Library: JSON
17:54
7 месяцев назад
Understanding Python: namedtuples
20:06
8 месяцев назад
Python Standard Library: Collections
21:43
9 месяцев назад
Let's Learn Rust: Fundamentals
36:08
10 месяцев назад
Python Standard Library: Functools
33:42
10 месяцев назад
Let's Learn Rust: Programming A Guessing Game
24:53
10 месяцев назад
Let's Learn Rust: Getting Started
18:31
10 месяцев назад
From Proof to Publish: Your First PyPI Package
55:18
10 месяцев назад
Python Standard Library: Pathlib
23:46
11 месяцев назад
Understanding Python: Asyncio
19:43
Год назад
Understanding Python: Threading
23:26
Год назад
Understanding Python: Descriptors
23:42
Год назад
Understanding Python: Metaclasses
30:58
Год назад
My Review of GitHub.dev
12:47
2 года назад
Understanding Python: Click-based CLI
18:29
2 года назад
Python Halloween Special
16:50
2 года назад
Alternatives to Paramiko
20:56
3 года назад
Understanding Python: Argparse CLI
21:11
3 года назад
Комментарии
@dowroa
@dowroa День назад
This guy pythons! 🐍
@JakeCallahan
@JakeCallahan День назад
Ha, thanks. I appreciate it!
@cheesecake_mafia
@cheesecake_mafia 3 дня назад
This is really cool! Also, curious to know your thoughts on uv vs poetry.
@JakeCallahan
@JakeCallahan 3 дня назад
I was never a big fan of poetry, since I tended to manage my environments mostly with just pip. Poetry just didn't provide enough value by itself for me to justify deferring my environment control to it. However, the pure speed of UV initially attracted me to it, but the new features are likely to convert me to fully (or close) buy-in to the ecosystem.
@blanky_nap
@blanky_nap 3 дня назад
Great video! UV is indeed an awesome tool! Actually I was so impressed by the speed that I started learning rust. Using UV multiple months already. In GH actions and local environment. But with -system flag now I am thinking about trying it in a dockerfile, since some of them take a while to install all deps.
@JakeCallahan
@JakeCallahan 3 дня назад
Oh nice, what are you using Rust for? My secret rust-based project was an Easter egg in this video
@blanky_nap
@blanky_nap 2 дня назад
@@JakeCallahan easter egg? will check the video one more time anyway to learn the features :) the primary goal of using rust was rewriting my python handlers in aws lambda since the language is really fast and might significantly decrease execution time especially in warm starts
@rochacbruno
@rochacbruno 3 дня назад
Great video! I am experimenting UV and it is the first time in years I have hopes for Python
@JakeCallahan
@JakeCallahan 3 дня назад
Packaging has been a consistent pain for Python, so I'm hopeful that this will help.
@JakeCallahan
@JakeCallahan 3 дня назад
I'm interested to know what you all think about uv? Personally, I'm going to be moving more of my work projects over to it in GitHub actions and hopefully our CI environments as well.
@omkarkhatavkar8563
@omkarkhatavkar8563 3 дня назад
Nice Jake !
@jeffschroeder8875
@jeffschroeder8875 8 дней назад
I don’t follow how it knows you are trying to match type to p_type instead of trying to create a variable called p_type with a value of type from your dict…
@jeffschroeder8875
@jeffschroeder8875 8 дней назад
Ahhh. P_type resolves to a string and hence it matches to a value.
@JakeCallahan
@JakeCallahan 8 дней назад
Yep, Vars.type gets the value of p_type, which is the string passed in to the function.
@dragonkat13
@dragonkat13 9 дней назад
Great to see you making videos again! Amazing content and you make learning and understanding easy! The Bob Ross of tech!
@blanky_nap
@blanky_nap 9 дней назад
Check this out who is back! Let’s gooo!
@JakeCallahan
@JakeCallahan 9 дней назад
Hey thanks! The past few months have been busier than usual, so trying to set aside more time to get out videos.
@Pedroxboy100
@Pedroxboy100 9 дней назад
Your content is SOOO underrated, its absurd. I'll take some time and watch all your videos. Thank you for your content!!!
@maximus-the-merciful
@maximus-the-merciful 11 дней назад
The series are great! Will watch all of the tuts.
@ruiwang113
@ruiwang113 16 дней назад
This is the best asyncio introduction video I have watched.
@ruiwang113
@ruiwang113 17 дней назад
This is the best video for understanding python thread easily!
@aaa.362
@aaa.362 23 дня назад
Thanks!
@maximus-the-merciful
@maximus-the-merciful Месяц назад
Thank you for the vid. Worked with python 4 years +, did no know that for loop has else clause ))
@cheesecake_mafia
@cheesecake_mafia Месяц назад
Wow!! Another great tutorial Jake. I am really enjoying your teaching style, the choice of content/examples and the difficulty level you choose of your examples. I do have a query about this, though. I am not sure but guessing that, async operations run on a single process, like threading. So, suppose if I have a piece of program that downloads data from a website using multiple request which is IO intensive, cleans that data using advanced feature engineering techniques which are CPU intensive, and then stores that cleaned data into a DB, which again will be a IO task, then I would be needing asyncio, threading and multiprocessing in one piece of code. Is there some literature like blogs, books, video tutorials or articles you could direct me towards that could help when building such software as there is going to be a great degree of overlap and interaction between all three packages. Also, is the assumption that async operations run on a single process, correct? Can I make them run in parallel in multiple processes? I know a google search would do the trick, but I am guessing you will share much better resources than what google would. But again, excellent tutorial!! Cheers and Kudos!
@JakeCallahan
@JakeCallahan 23 дня назад
That is one of the main challenges when dealing with concurrency, determining which method to use based on the situation you're in. One way you could potentially deal with the mix between IO and CPU tasks is to break the CPU bound task into a separate process that would then "consume" the results from the async process as they come in. However, this does introduce potential challenges around race conditions, so using locking mechanisms (file write locks) are typically key to lessen that risk.
@cheesecake_mafia
@cheesecake_mafia 18 дней назад
​@@JakeCallahan Yes, I concur with the arguments made. I did in fact manage to build the thing I was looking for. I'm pretty sure it's not optimised, but it does the task, so decently satisfied. One great learning was, cause I had to breakup my functions/classes based on the task i.e. IO or CPU, it forced me to reflect and introspect about my architectural design and in the process forced me to think deeply and understand more about the inner workings of the language. This felt like an excruciatingly difficult exercise, but the results do justify the grind. And your tutorials have been more than helpful. Thank you once again for them! Extremely grateful.
@JakeCallahan
@JakeCallahan 18 дней назад
Perfect! We learn a ton when writing new projects. So much so that it's one of my top recommendations for someone newer to programming or a new language. Glad I could help
@cheesecake_mafia
@cheesecake_mafia Месяц назад
Another great tutorial! Awesome work Jake. I just thought it's a bit uncomfortable to write -t in front of every topping we want to pass, and hence searched the documentation. Unfortunately, click by default has no help for passing multiple args while writing the option name only once. But I think a custom class/function and some clever str manipulation can do the trick. Other than that, I feel click is a great tool for every python programmer to have. Do you have some custom class to handle such scenarios? I think it'll relatively easy to build one. I am guessing we could even use a namedtuple object for this. Cheers and Kudos!
@JakeCallahan
@JakeCallahan Месяц назад
One of the easiest ways to solve this problem is just to make your users specify multiple items in a comma separated list. --toppings cheese,bacon,onion Then you just split that string on the commas and handle the individual values.
@cheesecake_mafia
@cheesecake_mafia Месяц назад
Man, this is really cool behaviour. namedtuple can be a great alternative to dataclasses when we want our class to implement just some basic functionality. Just curious about this though, can a namedtuple inherit from multiple namedtuple? Like if I have a RGB namedtuple and a A namedtuple, and I want RGBA to inherit from both, I can just use the ._fields attribute of both in defining the RGBA namedtuple class. Is there some downside to this? Or maybe bad programming practice? Should I expect to run into some error later? But yeah, great tutorial Jake. Absolute gold!! Cheers!!
@JakeCallahan
@JakeCallahan Месяц назад
Thank you very much! That's a great question, and something I've not personally tried. However, you should be able to combine the fields of two parent named tuples (maybe run through a set() to de-dupe fields), then use that for the child.
@cheesecake_mafia
@cheesecake_mafia Месяц назад
Hi Jake, excellent tutorial. I absolutely love your content on youtube. It feels like a crime to be able to learn this free of cost. Anyways, Im guessing you already know this, but we could use the python's inbuilt map method with the ThreadPoolExecutor like executor.map(func_name, list_of_args) . It just feels a bit more readable. That way we could just loop over the futures object to get the results and not use the .as_completed() method, assuming the func_name function returns something. Cheers and Kudos!!
@JakeCallahan
@JakeCallahan Месяц назад
Thank you very much. You're definitely definitely correct that using map is anither easy way to do this, especially for those that are more used to functional programming
@cheesecake_mafia
@cheesecake_mafia Месяц назад
@@JakeCallahan Just something I realised about the map method. It returns the future objects in the order they were started and not in the order they finish. It might be helpful to someone who also cares about the order in which threads finished, incase the result is being passed on to someother function/class for which order matters.
@PixelMotionHD
@PixelMotionHD Месяц назад
What is the best way, to go around the external API limitations? I want to get all data from the API, yet it yields only 10 data point, and a nextPageToken. So I tried to flood it with multiple calls, but it simply stooped sending data for a while. So I guess, the way to go is to do the initial check for 10-30 data point, and pass the flow of the program two ways, one for interaction with the user, and displaying those first data point, and second, which will continue gathering the data in the background. For now Im using asyncio and aiohttp, but now I wonder, should I use threading as well, as a way to split those tasks?
@JakeCallahan
@JakeCallahan Месяц назад
If the pages need to be requested sequentially, then there aren't many good options, assuming the next page requires the token from the current page response. Many APIs do let you set a larger size for responses per page, but if this one doesn't, then they are likely trying to limit their resource usage. If that's the case, then the responsible plan would be to follow their design and go slow. With that in mind, even if all of the above were true, if you have other non-sequential requests that runs against this (or other) API, then you can run those tasks concurrently. The first challenge is figuring out what can actually be done concurrently.
@maximus-the-merciful
@maximus-the-merciful Месяц назад
Thank you for the tut! Especially for intermediate part.
@maximus-the-merciful
@maximus-the-merciful Месяц назад
Thank you! Especially for intermediate and advanced parts.
@B3L13V3R
@B3L13V3R Месяц назад
I didn't have any of these issues testing the same on an M1 Max in late July 2024. Hope it helps.
@JakeCallahan
@JakeCallahan Месяц назад
The team and community has done a great job with uv since then. It is now my daily driver for package management. I'll need to do an update video sometime soon.
@B3L13V3R
@B3L13V3R Месяц назад
@@JakeCallahan Awesome! The video is a go-to for the potential for uv.
@maximus-the-merciful
@maximus-the-merciful Месяц назад
Thank you for the tutorial. I will keep going watching Understanding Python series.
@default_youtube_profile
@default_youtube_profile Месяц назад
Do you have a video specifically on aiohttp and uvicorn?
@JakeCallahan
@JakeCallahan Месяц назад
Not yet. Those would likely be included in a potential future series on third party libraries
@cheesecake_mafia
@cheesecake_mafia Месяц назад
@@JakeCallahan This is great to know! Excited to learn more. Can you give us a sneak peak of the libraries included in the list?
@JakeCallahan
@JakeCallahan 23 дня назад
I haven't formally put down a list yet, but it would certainly include aiohttp after requests. Things like pytest might have their own sub-series. I will give you a hint about the video I'm putting notes down for now, it includes a number of patterns (relatively) newer to Python.
@maximus-the-merciful
@maximus-the-merciful Месяц назад
Hi! Subscribed. "Understanding Python" is a great series. Much better then what I watched when I started learning python. The best for python refreshing.
@canobenitez
@canobenitez 2 месяца назад
this is some sweet content. I can't believe now I can create files from the command line of python lol I feel like a hacker.
@user-jl8wm8rq4e
@user-jl8wm8rq4e 2 месяца назад
Cool, thanks
@ash1kh
@ash1kh 2 месяца назад
Thats why i use poetry if i do any python related stuff.
@austinlawan3289
@austinlawan3289 2 месяца назад
Very comprehensive. Thank you Jake!
@JakeCallahan
@JakeCallahan 2 месяца назад
I see what you did there!
@abadulhassan4651
@abadulhassan4651 2 месяца назад
very useful and nice content explained very simply.
@Stasrules1
@Stasrules1 4 месяца назад
Omg, finally I found video that explains descriptors clearly. Thank you so much!
@DiptonilRoy
@DiptonilRoy 4 месяца назад
I was wondering if there are any particular benefits to writing class-based loggers. Also, how to do them 'right'... Would love to see something on that subject.
@sergioernestotostadosanche2509
@sergioernestotostadosanche2509 4 месяца назад
A lot of thanks for sharing your knowledge, dude! In the 2nd example when you're getting prime numbers I didn't know that way to test if a number is prime or not (what's its name?), so I coded the classical and academic definition of primes, and when I ran it, what a surprise, 20 min., 25 min., not finished, and I question myself WTF I'm doing wrong: so when I was washing my clothes, I realized it, the classical definition is making an absurd and vast amount of divisions when testing a number prime. I reviewed the code and looked for the best optimized prime testing until a video that explains a RU-vid channel called GeeksForGeeks, which is exactly like yours but coded differently (your code is also testing negative numbers which is good), and finally I kept following your explanation and I was much glad to remember that feeling of getting stuck by a task and resolving with my own effort plus your video and the other sources. ¡Saludos desde México, estimado!
@JakeCallahan
@JakeCallahan 4 месяца назад
That's my favorite part of programming, developing and testing possible solutions to interesting problems. Glad you enjoyed it!
@sergioernestotostadosanche2509
@sergioernestotostadosanche2509 4 месяца назад
Hi, dude. You got my subscription, thanks for sharing thoughtfully!
@DiptonilRoy
@DiptonilRoy 4 месяца назад
The best thing about your videos is the fact that you actually show some situational samples from your previous experiences in code. I have not noticed any teacher (except a few, perhaps) in RU-vid do this. This REALLY sets your content apart. Appreciate it.
@JakeCallahan
@JakeCallahan 4 месяца назад
Thank you very much
@igorcruz9764
@igorcruz9764 5 месяцев назад
Great explanation!
@cook5992
@cook5992 5 месяцев назад
"Promosm" 👏
@blanky_nap
@blanky_nap 5 месяцев назад
That’s a very useful one! Great explanation!
@JakeCallahan
@JakeCallahan 5 месяцев назад
What is your favorite debugger for Python? I personally use a mix of these and the debugger provided by VS Code.
@dragonkat13
@dragonkat13 5 месяцев назад
Great video! Love the help / H command. ❤
@DiptonilRoy
@DiptonilRoy 5 месяцев назад
By the way, I do not know if you have ever covered it or not, but I would love to see your technique of designing and implementing custom exceptions for a general application (that is fairly complex and huge). How do you handle their respective logs? How do you decide what information to expose to the clients using the application as logs (may be in the terminal or a separate log file) and what to send to a more dev-centric log file (if any)? How do you tackle exceptions arising due to another exception in logs? Also, (this is more opinionated, I suppose) do you find the use of things like Liskov's Substitutions within Exceptions reasonable (and why)?
@JakeCallahan
@JakeCallahan 5 месяцев назад
These are all great questions, most of which are answered in one of my pet projects at work: github.com/SatelliteQE/broker. In that project, you can find the custom exceptions I use and how logging is handled when in different log levels. Another interesting thing I've introduced with this is an "Emitter" class that can be used for a more structured log-like file that can be more easily consumed in CI environments. github.com/SatelliteQE/broker/blob/master/broker/helpers.py#L269 Now regarding LSP, I'm not very strict when it comes to adhering to most paradigms, if the situation you're in requires some kind of deviation. With that said, my exception subclasses are typically very lightweight.
@DiptonilRoy
@DiptonilRoy 5 месяцев назад
@@JakeCallahan Sounds interesting! Thanks for the recommendation!
@DiptonilRoy
@DiptonilRoy 5 месяцев назад
The last technique is genius! No matter how easy or accessible the topic is, every time I watch your video - I always go out learning something new.
@neilmurphy7064
@neilmurphy7064 5 месяцев назад
Great video.
@RichardJActon
@RichardJActon 5 месяцев назад
Dependency resolution is NP hard I don't care how performant their resolver is they can't get around this. The future of all package management is nix-like where the dependency graph is explicit so there is no dependency resolution problem. Checkout the video: "Nix: What Even Is it Though?" from Burke Libbey for a good talk explaining how it works. People should stop wasting time implementing a bad architecture better, bite the bullet and invest their time in packing for Nix / GUIX.
@blanky_nap
@blanky_nap 5 месяцев назад
Great tutorial! I must say after getting in touch with Go, TS/JS and now Rust I appreciate more and more the genius of Guido to develop really user friendly language.
@JakeCallahan
@JakeCallahan 5 месяцев назад
Rust is very opinionated on how you should do things, but with that comes safety. However, I will always love the freedom that Python give us!
@blanky_nap
@blanky_nap 5 месяцев назад
Great video! Espessially the inheritance part! One more way to construct named tuples is to inherit from typing,NamedTuple. Similar to dataclasses this method allows to add type hints to the attributes.
@blanky_nap
@blanky_nap 5 месяцев назад
Since rust based products like warp terminal and zed editor, as well as uv and ruff are kinda hype right now, it is definitely worth it to take a look at the language. Looking forward to learn rust at this channel!
@JakeCallahan
@JakeCallahan 5 месяцев назад
Definitely agree. I have a project I'd like to implement with PyO3 soonish so it's motivating me to get back on track.
@blanky_nap
@blanky_nap 3 месяца назад
@@JakeCallahan no new videos on Rust with PyO3? Would be great to see tutorial how to combine them!
@JakeCallahan
@JakeCallahan 3 месяца назад
Hey there. Yeah I've been crazy busy but am hoping to get back to making videos in June. As far as PyO3, I'll let you in on a spoiler for one of the things that kept me so busy... pip install hussh
@blanky_nap
@blanky_nap 5 месяцев назад
Is it possible to run notebooks (I mean not .py)?
@JakeCallahan
@JakeCallahan 5 месяцев назад
I don't believe Pyscript has plans to directly support notebooks. However, I do know that notebooks will have a completely in-browser version (if not already) that runs on Pyodide.
@blanky_nap
@blanky_nap 5 месяцев назад
@@JakeCallahan roger that!
@blanky_nap
@blanky_nap 5 месяцев назад
Why __new__ of metaclass is a staticmethod? Isn‘t it an implicit classmethod?
@JakeCallahan
@JakeCallahan 5 месяцев назад
Great catch! The reason this still works, and wouldn't if the inverse were true, is that Python is passing the meta class as the first positional argument. So while this is decorated with staticmethod, there is no real effect on the behavior since Python itself is the consumer. We can verify this by looking at the output at 18:09
@blanky_nap
@blanky_nap 5 месяцев назад
@@JakeCallahan yep, great channel!!