Posts

Showing posts with the label Python

Parallel Programming with Python

stream re-direction  https://www.devdungeon.com/content/python-use-stringio-capture-stdout-and-stderr parallel programming 파이썬에서 multi-threading과 multi-processing의 비교:  한글:  https://yeonfamily.tistory.com/3 영어:  https://hackernoon.com/understanding-multiprocessing-and-multithreading-in-python https://www.geeksforgeeks.org/difference-between-multithreading-vs-multiprocessing-in-python/ 파이썬에서 multi-processing 영어: https://superfastpython.com/multiprocessing-in-python/ https://www.digitalocean.com/community/tutorials/python-multiprocessing-example https://superfastpython.com/multiprocessing-queue-in-python/#Example_of_Using_a_Queue

Python Game Engine: Ursina

Game Engine ???:  https://en.wikipedia.org/wiki/Game_engine Unity:  https://unity.com/ Unreal:  https://www.unrealengine.com/ Python Game Engine:  https://realpython.com/top-python-game-engines/ Ursina Why Ursina?:  https://www.youtube.com/watch?v=aCpBzdciU0o Official homepage:  https://www.ursinaengine.org/ Documentation:  https://www.ursinaengine.org/documentation.html Cheat Sheet:  https://www.ursinaengine.org/cheat_sheet.html Usina for dummies:  https://www.ursinaengine.org/ursina_for_dummies.html

Python (Project after Level-3): GUI Programming and Project Examples

Tkinter: Tkinter Docs: https://docs.python.org/3/library/tkinter.html https://www.pythontutorial.net/tkinter/ First al all, Let's Do this ! https://realpython.com/python-gui-tkinter/ Simple GUI Calculator https://www.geeksforgeeks.org/python-simple-gui-calculator-using-tkinter/?ref=lbp Practical Project examples: https://realpython.com/tutorials/projects/ and then... let's follow this Youtube video https://www.youtube.com/watch?v=8ext9G7xspg&t=5273s ⌨️ (1:40) 1. Madlibs  ⌨️ (6:54) 2. Guess the Number (computer)  ⌨️ (13:17) 3. Guess the Number (user) ⌨️ (21:14) 4. Rock Paper Scissors ⌨️ (24:25) 5. Hangman you need to know a little more on 'if' statement https://www.w3schools.com/python/python_conditions.asp From here, need to know Class concept and more detail Python language. ⌨️ (35:53) 6. Tic-Tac-Toe ⌨️ (59:59) 7. Tic-Tac-Toe AI ⌨️ (1:15:53) 8. Binary Search  ⌨️ (1:27:16) 9. Minesweeper  ⌨️ (1:51:55) 10. Sudoku Solver  ⌨️ (2:05:34) 11. Photo Manipulation in...

Python (Project after Level-2): Game coding @ MineCraft Education Edition

Minecraft Education Edition: Tutorials: https://minecraft.makecode.com/docs Coding resources: References:  https://minecraft.makecode.com/reference Item name(Education edition):  https://www.digminecraft.com/lists/item_name_list_edu.php https://cdsmythe.com/minecraft/ Examples: Pixel Arts: https://www.teachwithict.com/mcpixelart.html

Python (Level-6): Iterators, Lambda, Try...Except,

Iterators An iterator is an object that contains a countable number of values and  can be iterated upon, meaning that you can traverse through all the values using __iter__()  and  __next__()  methods. Let's study above topic using example code. Lambda function A lambda function is a small anonymous function and can only have one expression. Let's study above topic using example code. Exception handling with Logical errors: https://linuxhint.com/error-types-python/ Error types: https://docs.python.org/3/tutorial/errors.html https://www.w3schools.com/python/python_try_except.asp https://python-course.eu/python-tutorial/errors-and-exception-handling.php Why use try-except than if statement? https://avidpython.com/python-basics/when-to-use-try-except-instead-of-if-else/ Python Error types: https://www.tutorialsteacher.com/python/error-types-in-python Python Exception Hierarchy: https://blog.airbrake.io/blog/python/class-hierarchy Let's study above topic using example co...

Python (Project after Level-2): Game coding with PyGame

  What software to use to learn Python(Integrated Development Environment: IDE). We will use  Visual Studio Code(VS Code)  later when you are used to Python. VScode is currently the most used editor by developers. https://code.visualstudio.com/ What is a module? https://www.w3schools.com/python/python_modules.asp Let's install pygame. https://www.pygame.org/wiki/GettingStarted  Windows Run VScode open terminal enter this pip install pygame if you see this message: You are using pip version 8.1.1, however version 10.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. enter this python -m pip install --upgrade pip and then, enter this once again pip install pygame Mac https://www.pygame.org/wiki/GettingStarted#Mac%20installation Short introduction to Class  We will learn more about the " class " later, but for now, let's study only what is necessary to use pygame library. https://www.w3schools.com/python/python_classes.as...

Python (Level-2): Data type, for Loop, String, Functions

4. Data types(intro) Data Types - As in other programming languages, data types are very important. - Since Python provides many practical data types, it is very important to clearly understand and use them. - For now, only the very basics of data types are covered. data types 01 data types 02 ###  [Self-Practice]   ###  5. loop statement:  for for loop  01 for loop  02 for loop  03 for loop  04 ###  [Self-Practice]   ###  6. Do you know the difference between 'keywords' and 'statement'? Keywords(Reserved Words) - What are keywords? - Literally meaning 'important word', it means that the programmer cannot change it. - Keywords may differ slightly depending on the Python version. difference between keywords_and_statements 7. Functions Python has several functions that are readily available for use. These functions are called built-in functions. In this page, you will find all the built-in functions in Python. we already have s...

Python (Level-4): Class Introduction

  Global, Local, Non-Local variables global_local_non-local variables Class Classes provide a means of bundling  data  and  functionality together . Creating a new class creates a new  type  of object, allowing new  instances  of that type to be made.  class_01 class_02 class_03 class_04  : class variables and methods(in detail) class_05 class_06 class_07

Python (Level-5): Class advanced( Inheritance, Polymorphism, Encapsulation, Access modifier, Class method, and Static method )

Image
Access Modifiers Object-oriented languages, like C++ and Java, use various keywords to control and restrict the resource usage of a class.  This is where keywords like  public ,  private and  protected  come into the picture. However, Python has a different way of providing the functionality of these access modifiers. class Modifiers: def __init__(self, name): self.__private_member = name # Private Attribute m = Modifiers("SKAUL05") print(m.__private_member) Let's study above topic using example code.

Python : ChatBot(using Regular Expression )

Image
Simple Chatbot EchoBot_01 EchoBot_02 EchoBot_03: using functions EchoBot_04: using class Google Search Bot ChatBot_01 ChatBot_02 ChatBot_03 Regular Expression. A RegEx, or Regular Expression, is a sequence of characters that forms a search pattern. RegEx can be used to check if a string contains the specified search pattern. Let's make a more flexible chatbot using Re.

Python : Web programming

Web Programming with Python Want to make a web program? Then you have to host your program, that is, you need your own web server.  Pyscript: Pyscript: - https://pyscript.net/ - https://pyscript.net/examples/ - https://github.com/pyscript/pyscript/blob/main/docs/tutorials/getting-started.md github: https://github.com/pyscript/pyscript course material: https://realpython.com/pyscript-python-in-browser/ https://levelup.gitconnected.com/pyscript-python-in-the-browser-4c1a578d67f3 github 에서의 호스팅 : https://opentutorials.org/course/3084/18891 https://www.youtube.com/watch?v=3DuyJf_XPtM&ab_channel=%EB%85%B8%EB%A7%88%EB%93%9C%EC%BD%94%EB%8D%94NomadCoders

Python (Level-3): Data Types

Image
Important Primitive Data Types. Python provides a wide variety of primitive data types.  Among them, data types such as List, Tuple, Dictionary, and Set are the most essential parts of Python. - String,  List, Tuple, Dictionary, and Set String(in detail) Let's have a look the string data type in detail 5. Let's take a look at String data type in detail. String data types is really important because chatting is done through words(writing). Let's study followings. - string literals - string formatting - string operations string data type_1 Let's take a closer look at the indexing of strings. string data type_2 Let's take a look at string-related member functions. - It's about a 'class' you haven't learned yet, but... string data type_3 - This is a class-related explanation, but the function has not yet been explained in detail... so it can be a little difficult to understand. Let's remember one thing. - In Python, everything is an object, followe...

Python : Weird Codes

Image
Python Weird Codes. An effective way to learn programming is to write weird code. In this way, you can reason deeply about the principles of programming languages.

Python (Level-1): Introductions

Image
Why learn computer programming? We need to use computers and better to order computers to do something that we want. What is a program. A program is a list of instruction(command) for a computer. What are the limitations of a computer? can only understand simple steps and correct orders only limited space fast but still limited seems to be accurate but is not correct Best way to learn programming. What's the best way to learn programming? I think that you can learn programming languages by making something by yourself . From now on, let's learn the Python language little by little while making a chatbot (chatting software robot).  Python is a great language for building chatbots. You will soon find out why. And You need to practice, practice, and practice. Why Python? Python is not only the most used language today, but also has the advantage of being easy for beginners to learn. Python is more like a language of everyday life than any other language. if 1 in [1, 2, 3, 4]: ...