mCoding
mCoding
  • 117
  • 16 496 773
All 71 built-in Python functions
How many did you know?
A quick rundown of EVERY single one of the 71 builtin Python functions. Technically, these are not all functions, but these are the 71 callables that are listed in the Python docs as "Builtin functions". These are the global names that are available to call that you don't need to install or even import anything to use.
― mCoding with James Murphy (mcoding.io)
Docs: docs.python.org/3/library/functions.html
Source code: github.com/mCodingLLC/VideosSampleCode
SUPPORT ME ⭐
---------------------------------------------------
Sign up on Patreon to get your donor role and early access to videos!
patreon.com/mCoding
Feeling generous but don't have a Patreon? Donate via PayPal! (No sign up needed.)
www.paypal.com/donate/?hosted_button_id=VJY5SLZ8BJHEE
Want to donate crypto? Check out the rest of my supported donations on my website!
mcoding.io/donate
Top patrons and donors: Laura M, Jameson, Dragos C, Vahnekie, Neel R, Matt R, Johan A, Casey G, Mark M, Mutual Information, Pi
BE ACTIVE IN MY COMMUNITY 😄
---------------------------------------------------
Discord: discord.gg/Ye9yJtZQuN
Github: github.com/mCodingLLC/
Reddit: www.reddit.com/r/mCoding/
Facebook: james.mcoding
CHAPTERS
---------------------------------------------------
0:00 Intro
0:24 Math - bool int float complex max min divmod abs pow round sum
2:56 Collections - dict list tuple set frozenset
3:44 Strings - bytes bytearray str memoryview open
5:18 Strings - chr ord bin oct hex format input ascii repr
7:04 Iteration - iter next enumerate zip reversed sorted filter map
9:17 Iteration - all any range slice aiter anext
10:42 Debugging - breakpoint help print
11:16 Object - object getattr setattr delattr hasattr dir id
14:19 Object - hash len isinstance issubclass callable super type
16:29 Descriptors - property classmethod staticmethod
17:49 Dynamic - eval exec compile globals locals vars __import__
Переглядів: 41 039

Відео

Top 5 IDE Productivity Hacks That Will Save You Time Programming
Переглядів 24 тис.21 день тому
Save time programming With all the tools available to us in modern IDEs, being a more productive programmer isn't about typing faster. Instead, knowing and taking advantage of powerful IDE features can automate a lot of the mundane and error prone tasks that waste your time, allowing you to get on with the good stuff. In this video we take a look at my top 5 IDE productivity hacks that save you...
What you need to know about Startup and Shutdown Events in FastAPI and ASGI Applications
Переглядів 9 тис.Місяць тому
Get started in FastAPI, Starlette, and ASGI! How do startup and shutdown events work in FastAPI, Starlette, and other ASGI applications? ASGI defines startup and shutdown events through the "lifespan" of an application, which it models as a connection between the server and the app. In this video we see the right way to do it in FastAPI, Starlette, and then understand the lifespan connection ty...
Async application classes vs. functions
Переглядів 10 тис.Місяць тому
To function or to class? According to the spec, an ASGI application is an async callable, but when we use FastAPI, Starlette, or other ASGI frameworks, that callable is hidden in plain sight. In this video, we see how it's possible to use an application class instead of a literal async def function, and we go over reasons for preferring the class approach. ― mCoding with James Murphy (mcoding.i...
Asynchronous Web Apps in Python
Переглядів 28 тис.Місяць тому
Building your future web app. Stop copy-pasting snippets to piece together a FastAPI app you don't really understand. Instead, buckle down and take the time to learn the fundamental building blocks that async web app frameworks in Python are built on top of. That way, you won't be stuck when there's no tutorial to copy from. ― mCoding with James Murphy (mcoding.io) Source code: github.com/mCodi...
Windows Command Escape Vulnerability - Critical CVE ... or is it?
Переглядів 25 тис.Місяць тому
Critical! ... or is it? CVE-2024-24576 is a freshly reported 10/10 critical CVE affecting Rust, Python, and many other programming languages on Windows that, if exploited, can allow a malicious user to execute arbitrary code as the current user. The 10/10 rating is the worst severity that can be given to a CVE. However, of 9 affected programming languages, 5 have chosen to either not fix the CV...
Async for loops in Python
Переглядів 58 тис.2 місяці тому
Await for it! A deep dive into the purpose of the async for loop in Python. How to use the async for loop, why to use the async for loop, and how to write your own async iterators using both async generators as well as by learning the async iterator protocols and writing your own async iterator. We'll see an example ASGI app that computes the SHA256 hash of an uploaded file using Starlette and ...
The ins and outs of context managers and try-finally in Python
Переглядів 29 тис.3 місяці тому
You can't forget! Context managers (used with the "with" statement) and try-finally are both constructs in Python that help you ensure certain cleanup code runs even in the presence of exceptions. Becoming familiar with these constructs is important for developing good coding habits in Python. Don't put the burden of remembering how to do cleanup on yourself, use a context manager to let the ob...
Python Debugging (PyCharm + VS Code)
Переглядів 35 тис.4 місяці тому
Step by step through your program. Debugging is an essential and unavoidable part of programming. Everyone writes bugs, and we'd like to get rid of them. Print statements are fine to a certain point, but live debugging is usually a better option. With live debugging, you can step through your program one statement at a time, and set breakpoints at interesting places to stop, view, and interact ...
Modern Python logging
Переглядів 152 тис.4 місяці тому
A logging tutorial. At some point, print statements aren't enough. When that time comes in Python, you should reach for the builtin logging package. It may be old (committed in 2002!), but it is the standard in Python. Unfortunately though, it being so old means that it's full of stuff you shouldn't use, it doesn't follow modern conventions like PEP8 coding style, and many tutorials are vastly ...
How mathematicians prove something completely obvious.
Переглядів 16 тис.5 місяців тому
Zero, destroyer of things. We take for granted that 0 times anything equals 0. But why? You might think of counting numbers, but we use 0 for a lot of different systems like naturals, reals, modular arithmetic, function spaces, and in all these cases we still have 0 times anything equals 0. Something about 0 makes this happen in many different spaces. In this video we see the proof and discover...
Cloud Imports in Python
Переглядів 45 тис.6 місяців тому
Imagine and it is possible! Installing dependencies is such a pain! What if we could just point to a GitHub repo and just use whatever code is there? Python is a dynamic language after all, why do I need to install before running my code? Well with cloud imports you can eliminate the need for installing! Create modules on the fly without ever installing a thing! No need to mess with pesky virtu...
Bloom Filters
Переглядів 53 тис.6 місяців тому
Thanks to Hostinger: hostinger.com/mcoding Use coupon code MCODING at checkout to get an additional 10% off! Bloom filters are a simple probabilistic kind of set that exemplify how using probability to your advantage can result in huge performance wins at scale. By giving up some of the flexibility of a full set interface and even getting the wrong answer to "is this element in the set?" on a s...
Actually, you CAN divide by zero.
Переглядів 254 тис.7 місяців тому
Yes, it's possible! You've probably heard that you "can't" divide by zero, but why not? As it turns out, adding in the inverse of a number is a well-defined process in math, similar to how you can add in the solution to x^2 = -1. The result is a new number system. In this video, we find out what happens when you apply this process to add division by zero. The result is a pleasant mix of surpris...
Python 3.12 is HERE!
Переглядів 156 тис.7 місяців тому
What's new in Python 3.12 Python 3.12 has just released! Let's take a look at all the new features! ― mCoding with James Murphy (mcoding.io) Source code: github.com/mCodingLLC/VideosSampleCode What's new: docs.python.org/3/whatsnew/3.12.html Faster cpython: github.com/faster-cpython/ SUPPORT ME ⭐ Sign up on Patreon to get your donor role and early access to videos! patreon.com/mCoding Feeling g...
Lambda in a Loop is a Code Smell
Переглядів 61 тис.8 місяців тому
Lambda in a Loop is a Code Smell
A forbidden Python technique to put ANYTHING in a dict or set.
Переглядів 54 тис.10 місяців тому
A forbidden Python technique to put ANYTHING in a dict or set.
Don't make this big O mistake!
Переглядів 40 тис.10 місяців тому
Don't make this big O mistake!
Why I prefer attrs over dataclasses
Переглядів 62 тис.11 місяців тому
Why I prefer attrs over dataclasses
type(obj) vs. obj.__class__ in Python, and changing an object's class.
Переглядів 23 тис.Рік тому
type(obj) vs. obj. class in Python, and changing an object's class.
Python's collections.abc | InvertibleDict
Переглядів 44 тис.Рік тому
Python's collections.abc | InvertibleDict
unique_ptr is NOT just for heap allocations | custom deleters
Переглядів 12 тис.Рік тому
unique_ptr is NOT just for heap allocations | custom deleters
How to check whether a file exists in Python
Переглядів 28 тис.Рік тому
How to check whether a file exists in Python
unique_ptr: C++'s simplest smart pointer
Переглядів 40 тис.Рік тому
unique_ptr: C 's simplest smart pointer
Python's ternary operator
Переглядів 39 тис.Рік тому
Python's ternary operator
21 MORE nooby Python habits
Переглядів 113 тис.Рік тому
21 MORE nooby Python habits
str vs bytes in Python
Переглядів 76 тис.Рік тому
str vs bytes in Python
Intro to async Python | Writing a Web Crawler
Переглядів 74 тис.Рік тому
Intro to async Python | Writing a Web Crawler
Extending Python's Number hierarchy
Переглядів 29 тис.Рік тому
Extending Python's Number hierarchy
Fast pow! A general recursive power algorithm for more than just numbers.
Переглядів 39 тис.Рік тому
Fast pow! A general recursive power algorithm for more than just numbers.

КОМЕНТАРІ

  • @96Prasanna
    @96Prasanna 16 годин тому

    #mcoding

  • @pedroarthurstudart1999
    @pedroarthurstudart1999 19 годин тому

    5:42-5:43 and a reference to Mincraft damage taking.

  • @vladimir0rus
    @vladimir0rus 20 годин тому

    6:37 x2 variable is not a garbage initialized. It is initialized with a pointer to int. So x2 is a properly initialized pointer.

  • @ScienceSpider-sigma
    @ScienceSpider-sigma День тому

    The real question is "Is infinitesimal equal to 0" which it isn't. An infinitesimal isn't really a number, it's just a concept of getting closer to 0, just like infinity is a concept of getting higher with no end

  • @Murderface666
    @Murderface666 2 дні тому

    A lot of people just inject what they believe is right, thinking everyone else is wrong. That is the mark of a noob. Its really only young programmers who think they know a more than the next man trying to change things. Like really? " " over std::endl? That's like picking up a grain of sand from a beach with chopsticks. How about focusing on "making something that works" instead of worrying about how "efficient" (a noobs priority and whatever that means) an algorithm is.

  • @MattDog_222
    @MattDog_222 2 дні тому

    #11 I try to avoid truthy-falsey in high level languages in general. I often find myself spending much more time and effort holding the edge cases of it in my brain's working memory while debugging than if it was just if `len(x) == 0`

  • @vazaubaev
    @vazaubaev 2 дні тому

    Its better to use cst: ua-cam.com/video/ASRqxDGutpA/v-deo.html

  • @victotronics
    @victotronics 3 дні тому

    10:06 in the destructor you test on `m_ptr` being non zero. Shouldn't that be a test for it not being nullptr?

    • @mCoding
      @mCoding 3 дні тому

      Great question! In C++, a pointer is not nullptr if and only if it is nonzero, so if (p) and if (p != nullptr) are semantically identical, although you may prefer to use one over the other for stylistic reasons.

  • @RichardFeynman2282
    @RichardFeynman2282 4 дні тому

    Seems you forgot about copyright() ;)

  • @juanodonnell
    @juanodonnell 4 дні тому

    nice. how can i check if it was created in memory or not?

    • @mCoding
      @mCoding 4 дні тому

      The only surefire way would be to read the C source code, but you can reason about it by putting in a really big number and checking to see whether you RAM usage goes up by a proportional amount 😉

  • @maxhansen5166
    @maxhansen5166 4 дні тому

    i understand this series is not exactly drawing a lot of views, but it would be great if you could continue it anyway.... it helped me a lot so far

  • @Jagi125
    @Jagi125 4 дні тому

    Oh, I cannot believe that I've never seen @property. I've been overriding __getattr__ and __setattr__ for quite some time...

  • @element1192
    @element1192 5 днів тому

    Providing rigorous mathematical logic isn't the goal of these simple "proofs", the goal is to convince the layperson who doesn't understand the sequence

  • @jj18
    @jj18 5 днів тому

    I'm two years late for the pycharm licence

  • @its_lucky252
    @its_lucky252 6 днів тому

    what if you just assume it's infinity? how many contradictions will arise?

  • @1apostoli
    @1apostoli 6 днів тому

    structlog

  • @DavidDLee
    @DavidDLee 6 днів тому

    I don't think that adding CST into the explanation of match was a good idea, if you wanted to discuss match

  • @Sluggernaut
    @Sluggernaut 6 днів тому

    Im sure it's been said, but for #30, we can have const int* const ptr4 = &x; which is a const pointer to a const int.

  • @marknissen5961
    @marknissen5961 7 днів тому

    what is 0/0

  • @user-le1oc9js4h
    @user-le1oc9js4h 7 днів тому

    Nice video, very informative!

  • @TURBONERD
    @TURBONERD 7 днів тому

    doesn't work

  • @AZIARGROUS
    @AZIARGROUS 8 днів тому

    “… from a pickled event sent over the wire”. WHAT. WHY. For real though. Why build such a thing in the first place. Who needs to send a pickled object to a logger. Just trouble trouble trouble if you ask me

  • @ChillstreamCentral
    @ChillstreamCentral 8 днів тому

    18:56 queue_handler doesn't have listener attr