Python for Everyone
Python for Everyone
  • Видео 275
  • Просмотров 396 135
Python itertools.groupby creates too many groups. Now what?
I just used itertools.groupby and got more groups than I expected. Why does this happen? In this video, you see two solutions to group tuples by their second element.
M Y O N L I N E T R A I N I N G
🎓Do you like my style of teaching? Try free chapters of my online courses: pythonforeveryone.com
#groupby #programming #python
Просмотров: 72

Видео

Unit test, Lint and Wheel Package your Python code with GitHub Actions
Просмотров 11621 час назад
In this tutorial, I start with an empty github repository, I check it out on my local machine and start creating code. I will locally test it, and locally build a wheel package from it. Once that works, I add a workflow with github actions. Github actions will then be configured to run the tests and produce the wheel package. By the time we are done, there is a github repo, that has a workflow,...
Module has no attribute 'xyz' since it has the same name and the import system gives it precedence
Просмотров 771День назад
"AttributeError: module has no attribute 'xyz' since it has the same name as the standard library module and the import system gives it precedence. What does it mean? M Y O N L I N E T R A I N I N G 🎓Do you like my style of teaching? Try free chapters of my online courses: pythonforeveryone.com #AttributeError #programming #python
What is Data Science? An example with Python and Jupyter Notebooks
Просмотров 11214 дней назад
In this video, you learn what data scientists do when they take data, filter and map it and how they visualize it to get insights from it. M Y O N L I N E T R A I N I N G 🎓Do you like my style of teaching? Try free chapters of my online courses: pythonforeveryone.com #datascience #jupyter #python
Keep Poetry Virtual Environment in project folder
Просмотров 107Месяц назад
By default, poetry stores the virtual environment folder in a cache folder. In this video you learn how to keep the virtual environment folder in your project folder by changing the Poetry configuration settings locally and globally. M Y O N L I N E T R A I N I N G 🎓Do you like my style of teaching? Try free chapters of my online courses: pythonforeveryone.com #poetry #pythonpoetry #python
Let’s pixelate images with Python and Jupyter notebook
Просмотров 82Месяц назад
In this video we create a Jupyter Notebook to pixelate images. Instead of running everything in the terminal and having to open the result in an image viewer, we use Jupyter notebook and see the results instantly! M Y O N L I N E T R A I N I N G 🎓Do you like my style of teaching? Try free chapters of my online courses: pythonforeveryone.com #pixelate #jupyternotebook #python
Let’s create our first Jupyter notebook together! Introduction.
Просмотров 162Месяц назад
"what is the difference between a Jupyter notebook and a Python script?", she asked. In this video you get the answer, learn how to locally install Jupyter Notebook, read from a text file and show the result in a diagram. M Y O N L I N E T R A I N I N G 🎓Do you like my style of teaching? Try free chapters of my online courses: pythonforeveryone.com #jupyter #notebook #python
Don't switch on types. Adhere to the open-closed principle with polymorphism
Просмотров 184Месяц назад
Download the eBOOK: pythonforeveryone.com/se M Y O N L I N E T R A I N I N G 🎓Want to learn more about static typing and the Python type system? Try free chapters of my online course: pythonforeveryone.com/python-type-system-online-course.html #pythonforeveryone #programming #python
Solve coupling with dependency injection in Python
Просмотров 311Месяц назад
Download the eBOOK: pythonforeveryone.com/se M Y O N L I N E T R A I N I N G 🎓Want to learn more about static typing and the Python type system? Try free chapters of my online course: pythonforeveryone.com/python-type-system-online-course.html #pythonforeveryone #programming #python
Hide those nasty libraries behind an interface in Python
Просмотров 569Месяц назад
Download the eBOOK: pythonforeveryone.com/se M Y O N L I N E T R A I N I N G 🎓Want to learn more about static typing and the Python type system? Try free chapters of my online course: pythonforeveryone.com/python-type-system-online-course.html #pythonforeveryone #programming #python
Building self-driving cars in Python from scratch
Просмотров 2092 месяца назад
🎓 The course: pythonforeveryone.com/python-self-driving-cars-genetic-algorithm.html #SelfDriving car experiments go back to 1939. But it took until the 1980’s when universities started to create true, autonomous cars. In Munich, a driverless Mercedes-Benz was going a whopping 130KM/H in 1984! That is 81 miles per hour. And without crashing! The project received an astronomical funding of 749,00...
Why I lied when I said that Python does not have a compiler
Просмотров 1492 месяца назад
In this video you learn what a compiler does and the answer to this important question: Does Python have a compiler? Source code written by us developers, needs to be converted to executable programs. For this, there are two common techniques. A compiler can process the source code and generate an executable program for a specific architecture like arm, x86 or an Apple M-processor. When program...
Mahjong Solitaire in the Windows Store
Просмотров 653 месяца назад
Mahjong Solitaire in the Windows Store
Does Python have a Type System?
Просмотров 1973 месяца назад
Does Python have a Type System?
Install Python, Visual Studio Code and execute "Hello World!" on Windows in 2024
Просмотров 2393 месяца назад
Install Python, Visual Studio Code and execute "Hello World!" on Windows in 2024
Install Python, Visual Studio Code and execute "Hello World!" on macOS in 2024
Просмотров 2233 месяца назад
Install Python, Visual Studio Code and execute "Hello World!" on macOS in 2024
How Python Developers sum Lists of Tuples without writing a for-loop
Просмотров 2023 месяца назад
How Python Developers sum Lists of Tuples without writing a for-loop
Mau Mau Solitaire in the Windows Store
Просмотров 643 месяца назад
Mau Mau Solitaire in the Windows Store
What Python developers probably don't know about boolean 'or'
Просмотров 3264 месяца назад
What Python developers probably don't know about boolean 'or'
The shortest explanation of Statements, Expressions and Functions
Просмотров 1574 месяца назад
The shortest explanation of Statements, Expressions and Functions
What experts mean when they "abstract a library behind an interface"
Просмотров 3904 месяца назад
What experts mean when they "abstract a library behind an interface"
Simple but powerful. Remove incomplete rows or columns with Pandas and Python
Просмотров 1374 месяца назад
Simple but powerful. Remove incomplete rows or columns with Pandas and Python
SQLAlchemy 2.0 Introduction - Create, Insert, Select and Relationships
Просмотров 6735 месяцев назад
SQLAlchemy 2.0 Introduction - Create, Insert, Select and Relationships
What makes this talk great? "Early days of Id Software" John Romero
Просмотров 2865 месяцев назад
What makes this talk great? "Early days of Id Software" John Romero
When Software Catastrophes turn into the perfect chance to refactor!
Просмотров 1815 месяцев назад
When Software Catastrophes turn into the perfect chance to refactor!
You used generics and boom! 💥 "List" is invariant. Consider using "Sequence" instead.
Просмотров 4985 месяцев назад
You used generics and boom! 💥 "List" is invariant. Consider using "Sequence" instead.
Let’s use Dependency Injection and Dependency Inversion to FIX this coupled code!
Просмотров 1,3 тыс.6 месяцев назад
Let’s use Dependency Injection and Dependency Inversion to FIX this coupled code!
5 Beginner’s bad habits I regret having in Python
Просмотров 9266 месяцев назад
5 Beginner’s bad habits I regret having in Python
Asynchronous Pyglet Render Loop: The Key to Smooth and Responsive Functionality
Просмотров 2316 месяцев назад
Asynchronous Pyglet Render Loop: The Key to Smooth and Responsive Functionality
What Is The Logic Behind Floating Point Numbers?
Просмотров 3457 месяцев назад
What Is The Logic Behind Floating Point Numbers?

Комментарии

  • @shashirajusiddaraju4979
    @shashirajusiddaraju4979 3 часа назад

    Wow. such simple explanation, Great!, thanks

  • @devin865
    @devin865 День назад

    I like you vids, groupby is a handy one to know! For the second half with the dictionary, if it were me I would write it using setdefault. So, for name, department in employees: grouped_by_department.setdefault(department, []).append(name)

  • @thisoldproperty
    @thisoldproperty 6 дней назад

    A superb explanation. Thanks for taking the time to explain!

  • @thisoldproperty
    @thisoldproperty 6 дней назад

    Very clear explanation. Great use of dir and inspect commands.

  • @sathyanarayanan4839
    @sathyanarayanan4839 6 дней назад

    OMG THANK YOU FINALLY IT MAKES SENSE IT ALL MAKES SENSE

  • @thisoldproperty
    @thisoldproperty 7 дней назад

    Knowing much about Methods vs Functions, you still managed to blow my mind with your information here. Thanks.

  • @thisoldproperty
    @thisoldproperty 7 дней назад

    Given you went to the effort to mention python decimal data type, here are the results using that data type: # python 3.11.0 from decimal import Decimal result: Decimal = Decimal(Decimal(0.1) + Decimal(0.2)) print(f'{result}') # 0.3000000000000000166533453694 print(f"{result.quantize(Decimal('0.1'))}") # 0.3 print(f"{result:.1f}") # 0.3

  • @thisoldproperty
    @thisoldproperty 8 дней назад

    Loved the pic of the 5 1⁄4 floppy disk! Flash back, indeed.

  • @thisoldproperty
    @thisoldproperty 8 дней назад

    The side by side comparison of the closure compared to a class was the epiphany I needed. I appreciate the time you spent making this (and the other) videos! I like how you get to the point and use really simple code to demonstrate the concepts. You should team up with ArjanCodes sometime to create a co-shared video.

    • @python-for-everyone
      @python-for-everyone 8 дней назад

      Thank you so much for the compliment. What a nice idea to team up with @ArjanCodes. I have much respect for him and his channel.

  • @KingBeyu
    @KingBeyu 9 дней назад

    Hi Instructor, We discovered your Udemy course and we’re impressed by its high quality. we noticed that the course’s current enrollment numbers and reviews don't fully reflect its potential impact. We’d love to discuss how we can help increase its visibility and engagement. Are you open to a chat?

  • @thisoldproperty
    @thisoldproperty 9 дней назад

    This was an awesome, simple presentation. I've found your videos very helpful. (even as an advanced coder)

  • @mahboobulhassan7419
    @mahboobulhassan7419 10 дней назад

    Excellent, simple,clear,to the point explanation

  • @tortos813
    @tortos813 10 дней назад

    "if you're watching this video you probably did something like.." idk man i just got a ytb recommendation but nice video tho 👍

    • @rockerthatrocksify
      @rockerthatrocksify 10 дней назад

      same

    • @python-for-everyone
      @python-for-everyone 9 дней назад

      Well, then the algorithm is with us :-) Thank you for the compliment!

    • @tortos813
      @tortos813 9 дней назад

      @@python-for-everyone i just noticed but are you a github purple user on vscode ?

  • @akashgeorge5433
    @akashgeorge5433 11 дней назад

    thanks man wonderfully explained

  • @jorgesanabria6484
    @jorgesanabria6484 13 дней назад

    Oh wow! thank you so much. Your videos are so clear on python basics and OOP. I am going through all your videos now. Self kept tripping me up unfortunately... until now! I never got a clear answer as to why we have two parameters in the method.

  • @fswerneck
    @fswerneck 13 дней назад

    7:05 I can bring something of value to this! (not sure if you have covered this in other videos, yt literally just recommended this one video to me.) But you can define and require a function that will do the conversion for you. Your converter object could be constructed with a dependency for a function that takes in a string and spits out the type. @dataclass # for the sake of simplicity in comments class Converter[T]: convert: Callable[[str], T] def convert(self, data: str) -> T: return self.convert(data) This way you don't have to worry about getting the type from dunder fields, or worry that they will work with exactly one string argument. my_int = Converter(int).convert("3") `int` can be used as such because it's a perfectly valid callable that takes in a string and returns an integer. Also, because type checkers are intelligent, you don't have to specify the type for Converter; it will infer from `int` that T is int. Example with datetime: my_dt = Converter(datetime.fromisoformat).convert("2024-11-06T15:54:00") This works because fromisoformat is a class method (a callable) that takes in a string, and spits out a datetime. And type checkers look at the return type of fromisoformat to infer that this is a Converter[datetime]. All this said, let's simplify all this. We don't need a class. A simple function is perfectly valid. One can define a type alias as such: type ConverterFunc[T] = Callable[[str], T] and then, you can require a ConverterFunc anywhere else in your code, and any function that fits the signature will pass type checking. def read_date_from_user(convert: ConverterFunc[datetime]): from_user = input() # sanitize, if necessary return convert(from_user)

  • @Ness-d2c
    @Ness-d2c 15 дней назад

    lets say we have a class called salary. This class has a method increase_salary which increases salary 1%. So are we going to use self here and if yes how do we reference the first name and last name and the salary parameter?

  • @Ness-d2c
    @Ness-d2c 15 дней назад

    Can you please show using self across other methods within or outside the classes?

    • @python-for-everyone
      @python-for-everyone 14 дней назад

      In this example, I create a class with initializer and raise_salary method where self is "shared" within the class. ruclips.net/video/_KvOcz1WUhk/видео.html

  • @Raisincookies55
    @Raisincookies55 15 дней назад

    short and to the point. great work

  • @kimurayuka7590
    @kimurayuka7590 16 дней назад

    Thank you for this :)

  • @jeevas2joy
    @jeevas2joy 17 дней назад

    I appreciate your work and I trust in this.

  • @Dhar01
    @Dhar01 18 дней назад

    God, on "get the terminology right" section, I just felt that I wanted this! This is the type of video I want to suggest everyone! I request you to make more video like this! This got me subscribed to your channel.

    • @python-for-everyone
      @python-for-everyone 16 дней назад

      Thank you very much! And if you have a special request for a video, let me know.

  • @mahboobulhassan7419
    @mahboobulhassan7419 18 дней назад

    excelent

  • @mahboobulhassan7419
    @mahboobulhassan7419 21 день назад

    excelent

  • @mahboobulhassan7419
    @mahboobulhassan7419 21 день назад

    very very good

  • @kamilk-pr8mw
    @kamilk-pr8mw 21 день назад

    I love this vid! It's so simple and accurate! Thanks <3. I spend 5 minutes to read like 10 first google results but no one respond like this.

    • @python-for-everyone
      @python-for-everyone 19 дней назад

      Thank you! Python 3.13 added better error messages where it can actually tell that the file name shadows a built-in module name. So pretty soon, this problem will occur less.

  • @derekreed6798
    @derekreed6798 24 дня назад

    Just beautiful😊. Do more videos. Can you give the versions of python these components first appear in python.

    • @python-for-everyone
      @python-for-everyone 22 дня назад

      Thanks. The version was Python 3.12 when I recorded the video.

  • @derekreed6798
    @derekreed6798 24 дня назад

    Will you cover more 'Gang of four' patterns based around your explanations?

    • @python-for-everyone
      @python-for-everyone 22 дня назад

      Yes. And I already covered some. Here is the Strategy Pattern: ruclips.net/video/eofyXRNCiVE/видео.html

  • @muhammadfahrimuharram74
    @muhammadfahrimuharram74 Месяц назад

    this is pretty funny

  • @junjuljunjul4392
    @junjuljunjul4392 Месяц назад

    Thank you.

  • @peterweston6588
    @peterweston6588 Месяц назад

    Thank you.

  • @not_a_human_being
    @not_a_human_being Месяц назад

    I wish people would stop applying those "design pattern" principles to python. They do not belong here.

  • @shanereddy
    @shanereddy Месяц назад

    This channel is an example on why teacher matters!!!

  • @youexpire
    @youexpire Месяц назад

    you are wasting memory by storing the excel data in the interim data types. you also make things slower.

  • @andreashabermas7964
    @andreashabermas7964 Месяц назад

    Honest opinion: don't create abstractions on your libraries to hide them. The principle here is YAGNI: you ain't gonna need it. If you actually replace a library, replace it manually. If you do that nearly yearly, *then* create an interface. But don't write interfaces or other abstractions for components that are never going to be altered.

    • @kowaihana
      @kowaihana Месяц назад

      fr... sometimes it's too much abstraction

  • @en_x
    @en_x Месяц назад

    I love you man, clear and to the point, I don't even do SWE I simply enjoy solving problems.

  • @pcb5135
    @pcb5135 Месяц назад

    Honestly that cant be so simple My brain says for me Factory method pattern is a method that return an instance Abstract method pattern is a multiple methods that return an instances

  • @OlenaOlena-d9l
    @OlenaOlena-d9l Месяц назад

    Thanks for your help! Keep making these videos, mate!

  • @silverplant3519
    @silverplant3519 Месяц назад

    I love you, you have saved from the predicament which i was deeply , had this not happen i wiuld have failed my task worth 50% my ict grade ❤

  • @sukseswisely7099
    @sukseswisely7099 Месяц назад

    easily understand, thanks!

  • @EW-mb1ih
    @EW-mb1ih Месяц назад

    Nice

  • @bohdankyrylko4308
    @bohdankyrylko4308 Месяц назад

    Thx big boss

  • @poem3701
    @poem3701 Месяц назад

    Thank you! You gave me an idea. I saw the file layout you have, and it looks like it's a flat layout at the top level. If instead you put your file (random.py) inside your own python package/dir (eg, pfe/random.py), then you don't need to change anything in your original random.py file and can run it as-is without any errors. For example: If your current working dir shows that this file exists: pfe/random.py then you can do: python3 -m pfe.random to run your program successfully. It looks as if pfe.random (pfe/random.py) is searched for first from the CWD, is found, and then your "import random" statement runs successfully, probably because the full names of "pfe.random" and "random" are now in different namespaces and don't conflict. This is what I'm thinking is going on, I'm not 100% sure but at least it's working this way. No errors, and it displays the expected random number output. Thank you for your video! It helps :)

  • @VictorTemitope-p6u
    @VictorTemitope-p6u Месяц назад

    Hello Loek van den Ouweland, We are ECHOES OF GREATNESS. We found your Udemy course and see great potential, but it could gain more visibility, students, and reviews. As Udemy is competitive, we can help increase your course's success with proven strategies that have worked for other instructors. We’d love to collaborate to drive more sales for your course! Best regards, ECHOES OF GREATNESS

  • @Herocode20s
    @Herocode20s Месяц назад

    ❤❤❤❤❤❤❤🎉🎉🎉thank you

  • @Herocode20s
    @Herocode20s Месяц назад

    Thank you❤❤❤

  • @Herocode20s
    @Herocode20s Месяц назад

    Thank you

  • @Herocode20s
    @Herocode20s Месяц назад

    ❤❤❤❤❤❤

  • @yukitofujiro-lg2vt
    @yukitofujiro-lg2vt 2 месяца назад

    Do you use another software to make this work?

    • @python-for-everyone
      @python-for-everyone 2 месяца назад

      Python + a MIDI library, sending notes to Ableton Live and my synthesizer

  • @mberger4224
    @mberger4224 2 месяца назад

    I think the whole confusion with understanding the role of "self" comes from an ill chosen word "self". Since the word "self" in Python is an arbitrary string and not a reserved word (could be anythinh, check for yourselves with a snippet of code :), for educational purposes I am replacing "self" by "object" or "instance" and such code becomes instantly self explanatory (at least for me). In the example provided "e" is a name of an instance.