Brian Faure
Brian Faure
  • 40
  • 1 054 896
Snake - Python + PyQt4
Demo of Python implementation of the classic arcade game. Code can be found at github.com/bfaure/snake
Переглядів: 1 221

Відео

AVL Tree: Background & Python Code
Переглядів 45 тис.6 років тому
Code below… In this much-requested video we’ll take a look at the AVL tree data structure, which, at the most basic level, is simply a self-balancing Binary Search Tree. As always, in the first half of the video we’ll cover some background (including the main differences between an AVL and BST), and in the second half we’ll open up our coding editor and actually implement an AVL tree class usin...
Graham Scan: Background & Python Code
Переглядів 21 тис.6 років тому
Code below… In this video we’ll learn about the Graham Scan, an algorithm developed in the 70s, used to construct ‘Convex Hulls’. Before we delve into the details of the algorithm, we’ll first learn a bit ‘Convex Hulls’ themselves, and some ways of testing to see if a set of points constitutes a ‘Convex Hull’. Towards the middle of the lesson, we’ll switch over to our coding editor and actually...
Quicksort (In-place): Background & Python Code
Переглядів 17 тис.6 років тому
In this video we'll take another look at the efficient Quicksort algorithm, specifically, we'll reimplement our prior approach to run in-place. After coding up our new solution, we'll compare the runtime performance of the in-place version, against the version we developed in the prior video. ► Prior Quicksort Lesson (mentioned in video): ua-cam.com/video/RFyLsF9y83c/v-deo.html ► Python Data St...
Binary Search Tree (BST): Validator Function
Переглядів 8 тис.6 років тому
Code below... In this third part in our series of videos covering the Binary Search Tree data structure, we will take a look at an external function we can implement and make use of to validate our Binary Trees are, in fact, Binary Search Trees (validate that they follow the rules of a Binary Search Tree). (PYTHON 2) ► Code for this lesson: github.com/bfaure/Python_Data_Structures/blob/master/B...
Reading & Writing Files In Python
Переглядів 4,8 тис.6 років тому
In this video we'll learn how to read and write files in Python. In the beginning, we'll cover some of the basics behind files in general, and later, we'll open up our coding editor and run through the syntax for interfacing with files themselves. Python Algorithms Series: ua-cam.com/play/PLEJyjB1oGzx2h88Tj90B5_HadLq339Cso.html Python Data Structures Series: ua-cam.com/play/PLEJyjB1oGzx3iTZvOVe...
Easy Password Generator In Python
Переглядів 30 тис.6 років тому
In this lesson we'll develop a simple script to generate random, yet easy-to-remember passwords. We'll begin by learning how to install third-party libraries to your Python development environment, then jump straight into the code. 479k English Words File: raw.githubusercontent.com/dwyl/english-words/master/words.txt Python Algorithms Series: ua-cam.com/play/PLEJyjB1oGzx2h88Tj90B5_HadLq339Cso.h...
Bogo Sort: Background & Python Code
Переглядів 11 тис.6 років тому
In this video we'll continue our series covering sorting algorithms by taking a look at the Bogo Sort. We'll begin by covering the basics and overall idea of the Bogo Sort, and, later we'll open up a coding editor and actually implement the algorithm using Python. Warning: Don't use this algorithm in practice. If you'd like to learn about Python data structures, check out my video series starti...
Quicksort: Background & Python Code
Переглядів 19 тис.6 років тому
In this video we'll continue our series covering sorting algorithms by taking a look at the Quicksort. We'll begin by covering the basics and overall idea of the Quicksort, and, later we'll open up a coding editor and actually implement the algorithm using Python. ► Python Data Structures: ua-cam.com/video/TW_e9FFEDeY/v-deo.html ► Video series covering GUI development in Python (WIP): ua-cam.co...
Binary Search: Background & Python Code
Переглядів 19 тис.6 років тому
Code below... Continuing our series investigating algorithms in Python, in this video we'll cover the Binary Search, a highly efficient searching technique that only applies under certain conditions. In the beginning of the video we'll go over the basics of the binary search, and later we'll open up our coding editor and actually implement the algorithm using Python. ► Python 2 github.com/bfaur...
Merge Sort: Background & Python Code
Переглядів 27 тис.6 років тому
In this video we'll continue our series covering sorting algorithms by taking a look at the Merge Sort. We'll begin by covering the basics and overall idea of the Merge Sort, and, later we'll open up a coding editor and actually implement the algorithm using Python. Video explaining complexity analysis: ua-cam.com/video/g1AwUYauqgg/v-deo.html If you'd like to learn about Python data structures,...
Binary Search Tree (BST): Deletion Function
Переглядів 24 тис.6 років тому
Code below... In this second part in our two videos covering the Binary Search Tree, we'll cover the only part omitted from our prior lesson; the Deletion Function. In the beginning of the video, we'll introduce some background and the underlying idea and later we'll return to our code from the last video and add in the Deletion Function. (PYTHON 2) ► Code for this lesson: github.com/bfaure/Pyt...
Insertion Sort: Background & Python Code
Переглядів 6 тис.6 років тому
In this video we'll continue our series covering sorting algorithms by introducing the Insertion Sort, another simple approach to sorting lists and arrays. If you'd like to learn about Python data structures, check out my video series starting with: ua-cam.com/video/TW_e9FFEDeY/v-deo.html Video series covering GUI development in Python: ua-cam.com/video/IpTG4KixVew/v-deo.html References: [1] bi...
Selection Sort: Background & Python Code
Переглядів 6 тис.6 років тому
In this lesson we'll introduce the Selection Sort algorithm, a very simple approach to sorting lists and arrays. After covering the basics, we'll open up a coding editor and implement the algorithm in Python, at the end we'll benchmark the performance of the algorithm against various other sorting approaches, including our Bubble Sort from the prior video. Bubble Sort Lesson: ua-cam.com/video/v...
Bubble Sort: Background & Python Code
Переглядів 13 тис.6 років тому
In this video we'll introduce the Bubble Sort algorithm, the most simple of all basic sorting algorithms. We'll begin by covering the overall idea of the Bubble Sort, then move over to a coding editor and implement the ideas in Python code. If you'd like to learn about Python data structures, check out my video series starting with: ua-cam.com/video/TW_e9FFEDeY/v-deo.html Video series covering ...
Single-Layer Perceptron: Background & Python Code
Переглядів 91 тис.6 років тому
Single-Layer Perceptron: Background & Python Code
Sieve of Eratosthenes: Background & Python Code
Переглядів 13 тис.7 років тому
Sieve of Eratosthenes: Background & Python Code
Python Data Structures #5: Binary Search Tree (BST)
Переглядів 169 тис.7 років тому
Python Data Structures #5: Binary Search Tree (BST)
Python Data Structures #4: List Object
Переглядів 8 тис.7 років тому
Python Data Structures #4: List Object
Python Data Structures #3: String Object
Переглядів 12 тис.7 років тому
Python Data Structures #3: String Object
Python Data Structures #2: Linked List
Переглядів 427 тис.7 років тому
Python Data Structures #2: Linked List
Python Data Structures #1: Dictionary Object
Переглядів 58 тис.7 років тому
Python Data Structures #1: Dictionary Object
Python GUI Development #6 - Exit Dialogs
Переглядів 1,5 тис.7 років тому
Python GUI Development #6 - Exit Dialogs
Python GUI Development #5 - Creating Window Copies
Переглядів 1,3 тис.7 років тому
Python GUI Development #5 - Creating Window Copies
Unity Test Landscape [HTC Vive]
Переглядів 1647 років тому
Unity Test Landscape [HTC Vive]
Python GUI Development #4 - Opening a File
Переглядів 9007 років тому
Python GUI Development #4 - Opening a File
Python GUI Development #3 - Toolbars
Переглядів 9817 років тому
Python GUI Development #3 - Toolbars
Python GUI Development #2 - Layout & Button Connect
Переглядів 2,2 тис.7 років тому
Python GUI Development #2 - Layout & Button Connect
Python GUI Development #1 - First Steps
Переглядів 6 тис.7 років тому
Python GUI Development #1 - First Steps
Introducing WikiClassify
Переглядів 2787 років тому
Introducing WikiClassify

КОМЕНТАРІ

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

    Hey thank you so much for creating this video! I've been trying to process the merge sort algorithm by myself for weeks but couldn't really understand some parts of it and decided to give up and search the internet. That was when I came across your video and you actually explained it so well in 9 minutes!! I deeply regret wasting a week on this lol

  • @lordrobertclive-vc5ld
    @lordrobertclive-vc5ld 10 днів тому

    seeing this video in 2024

  • @rhnirsilva652
    @rhnirsilva652 27 днів тому

    bro posted the biggest DSA bang and left

  • @Reymax164
    @Reymax164 28 днів тому

    Too much for my brain right now. All I think i understand is that, each element is an instantiation of the node class and you modify it using the functions. Need to learn py… and OOP more 🙃 But maybe, I'd actually understand it more in Java 🤔

  • @ComSci-student
    @ComSci-student Місяць тому

    Great content Brian. Thank you.

  • @ETR12935
    @ETR12935 2 місяці тому

    First dsa video! the keyboard sound was just 🤩

  • @chloeliu9207
    @chloeliu9207 2 місяці тому

    After searching thousand of videos at ytb, this tutorial is the most helpful and insightful! thanks!

    • @BrianFaure1
      @BrianFaure1 2 місяці тому

      @@chloeliu9207 Awesome news! Happy the video helped you ✌️

  • @user-ul2hj8zf1y
    @user-ul2hj8zf1y 2 місяці тому

    Bro you're different level

  • @angryman5517
    @angryman5517 3 місяці тому

    didn't get shit.

  • @duinterweb
    @duinterweb 3 місяці тому

    This got me passed my bootcamp. I watched as many as 5 different binary search tree node remove videos but I could not figure out how how to do it. I stumbled onto this video and I watched it multiple times. It finally clicked. Thank you. I would still be sitting at my computer without this.

  • @Antinormanisto
    @Antinormanisto 4 місяці тому

    Broooo, thank you very much. I search how to delete a node for 2-3 hours. You saved me

  • @hemanthkumarar
    @hemanthkumarar 4 місяці тому

    At 11:50 I think it should be if index > self.length() instead of index >= self.length() This will ignore the last element and it cannot be accessed. I am still a newbie, correct me if I am wrong. Anyway, great series, thank you sir

  • @mohammad-bunyanish
    @mohammad-bunyanish 5 місяців тому

    Why are you creating 2 classes

  • @croakinglizard2156
    @croakinglizard2156 5 місяців тому

    thanks for your help!

  • @SLowe-xi3fq
    @SLowe-xi3fq 5 місяців тому

    Can't we just say while current != None (or while current)? we dont necessarily need to make sure we have 2 nodes before null right?

  • @pets__tube
    @pets__tube 5 місяців тому

    moueeeeeeeeeeeeeeeeeeee

  • @apalsnerg
    @apalsnerg 6 місяців тому

    Thank you so much for this! This is just what I needed to understand linked lists properly!

  • @sasidharnaidu4507
    @sasidharnaidu4507 6 місяців тому

    Dictionary has been made an Ordered collection since Python 3.7

  • @user-eq9zo5vj7c
    @user-eq9zo5vj7c 6 місяців тому

    I struggled a lot with DSA until I found this channel. Now I struggle a lot less thanks to you.

  • @Ahmed-um4yl
    @Ahmed-um4yl 7 місяців тому

    I love you man

  • @m.ldt8
    @m.ldt8 8 місяців тому

    I know I'm really late about these ones, but thanks a lot for all your videos. They could'nt be more useful before my python test. I don't understand why arn't u already famous ! Ur explanations are so clear please never stop doing video's

  • @laurapachon7917
    @laurapachon7917 8 місяців тому

    This week I found your videos, for a topic that I really didn't understand and I just want to thank you for your work! you explain very well, I love to learn like this. Keep it up, you must upload videos transmitting your knowledge

  • @RamachandraBharadwaj
    @RamachandraBharadwaj 8 місяців тому

    very understandable !

  • @motheotreasurepuso0724
    @motheotreasurepuso0724 8 місяців тому

    Great video. On your erase, I think it is essential to reassign the self.head for when erase is called at index= 0 so that it does not stay as None

  • @PrinceAdom
    @PrinceAdom 8 місяців тому

    Instead of doing another costly iteration through the linked list to find the size of it. We can add a self.length variable to the init() with an initial size of 0, and then add a 1 in the append() and a subtract a 1 in the remove method

  • @rahadulislamrahat328
    @rahadulislamrahat328 9 місяців тому

    Do you have video in Graph a nd algorithm

  • @BegForMyMercy
    @BegForMyMercy 9 місяців тому

    doesn't work if you repeat deletion of the same value fyi For the function delete_value, we need to catch this edge case. def delete_value(self, value): if self.find(value) == None: #if we can't find the value return None return self.delete_node(self.find(value))

  • @kevinzebb
    @kevinzebb 9 місяців тому

    My nigga, good stuff

  • @dennisearle
    @dennisearle 10 місяців тому

    Thanks, Brian. Really helpful.

  • @marc4117
    @marc4117 11 місяців тому

    dunno how it worked for you but i had to set "self.head = None" otherwise i got an error that attribute "data" is missing

  • @yolamontalvan9502
    @yolamontalvan9502 11 місяців тому

    Thank you I was wondering how do you create pointers in Python. My favourite languages are C++, C#. It took me three years to learn them. I think I’m going to give Python a try, it looks easy. Thank you.

  • @techandmore12
    @techandmore12 11 місяців тому

    Actually this implementation is not 100% correct. The actual first element or the head of the linkedList will always be none as per the provided implementation. You would have to check if the head has a next element and if its data is none. If so, the head node should get the data: def append(self, data): new_node = Node(data) current = self.head while current.next is not None: current = current.next if current == self.head and self.head.data is None: current.data = data else: current.next = new_node

  • @softwareengineer8923
    @softwareengineer8923 Рік тому

    Your explanation is too clean and lucid.Thanks for a great video!

  • @polsiv
    @polsiv Рік тому

    Great video dude, it helped me a lot!

  • @denisemarques7117
    @denisemarques7117 Рік тому

    Do you still freedive in the NJ area?

  • @donfeto7636
    @donfeto7636 Рік тому

    The code is not readble at all , also the header is always none and you built the code on that not a good way of coding linkedlist to be honest

    • @donfeto7636
      @donfeto7636 Рік тому

      class node: def __init__(self, data=None): self.data = data self.next = None class linked_list: def __init__(self): self.head = node() # Adds new node containing 'data' to the end of the linked list. def append(self, data): new_node = node(data) if self.head.data == None: self.head = new_node else: cur = self.head while cur.next != None: cur = cur.next cur.next = new_node # Returns the length (integer) of the linked list. def length(self): cur = self.head count = 1 while cur.next != None: count += 1 cur = cur.next return count # Prints out the linked list in traditional Python list format. def display(self): elems = [] cur_node = self.head while cur_node.next != None: elems.append(cur_node.data) cur_node = cur_node.next elems.append(cur_node.data) print(elems) # Returns the value of the node at 'index'. def get(self, index): if index >= self.length() or index < 0: # added 'index<0' post-video print("ERROR: 'Get' Index out of range!") return None cur_idx = 0 cur_node = self.head while cur_node.data != None: if cur_idx == index: return cur_node.data cur_node = cur_node.next cur_idx += 1 # Deletes the node at index 'index'. def erase(self, index): if index >= self.length() or index < 0: # added 'index<0' post-video print("ERROR: 'Erase' Index out of range!") return curr_idx = 0 last_node = self.head if index == 0: self.head = self.head.next else: curr_idx = 1 while True: curr_node = last_node.next if index == curr_idx: last_node.next = curr_node.next return last_node = curr_node curr_idx += 1 l = linked_list() l.append(1) l.append(2) l.append(3) # 2 l.append(4) l.display() l.erase(1) l.display() little bit readable code

  • @Caller8194
    @Caller8194 Рік тому

    why would someone use this over a normal list? i cant think of a situation where a linked list would be more useful when compared to an array

  • @MCNeko6554
    @MCNeko6554 Рік тому

    Thank you, helped me finish my homework without losing my mind x'D

  • @micmike
    @micmike Рік тому

    Hello, yes I do enjoy your videos and teaching method/style. Wish there were more video's to view.

  • @raoufmahdi5114
    @raoufmahdi5114 Рік тому

    thank you so much

  • @nikoskaragiannis6353
    @nikoskaragiannis6353 Рік тому

    I agree.

  • @turk-money
    @turk-money Рік тому

    Great video, thanks for the post.

  • @djlazer1
    @djlazer1 Рік тому

    I love you dude thanks for explaining this stuff so clearly. So many other channels explain this stuff so badly, but you make it so easy to understand.

  • @happymalyo_
    @happymalyo_ Рік тому

    Great Vidéos !!!!

  • @blankdisk1061
    @blankdisk1061 Рік тому

    .

  • @leonchang9692
    @leonchang9692 Рік тому

    thank you

  • @commandprompt7171
    @commandprompt7171 Рік тому

    thank you for explaining the erase method, I was confused from another video on how the element gets deleted by just assigning the last node

  • @mizzzile
    @mizzzile Рік тому

    Quick and short recap.

  • @lilyan4830
    @lilyan4830 Рік тому

    What textbook are the screenshots from? For example at time stamp 3:25

  • @magnuswootton6181
    @magnuswootton6181 Рік тому

    as u can see a single neuron in a neural network is one complete output on a single layer. so a single layer with one output is just one single neuron.