π My Journey Is Beginning
Today, I begin my journey in:
β’ Python programming
β’ Machine Learning
β’ Deep Learning
β’ And other modern technologies
This channel will document my progress from fundamentals to real-world systems.
Learning, building, failing, improving β consistently.
The goal is not shortcuts.
The goal is mastery.
Day 1 starts now.
@gpaspace_tech
#Python #MachineLearning #DeepLearning #LearningInPublic
Today, I begin my journey in:
β’ Python programming
β’ Machine Learning
β’ Deep Learning
β’ And other modern technologies
This channel will document my progress from fundamentals to real-world systems.
Learning, building, failing, improving β consistently.
The goal is not shortcuts.
The goal is mastery.
Day 1 starts now.
@gpaspace_tech
#Python #MachineLearning #DeepLearning #LearningInPublic
π₯2
Day 2: Python Lists & CLI Logic π
1οΈβ£ Command Line Database Setup I built a script that uses sys.argv to accept commands. It dynamically asks for table details and stores column names in a list.
Python
import sys
# Checking for command line arguments
if len(sys.argv) < 2:
print('Usage: python lists.py create_db')
elif sys.argv[1] == 'create_db':
table_cols = []
table_name = input('Enter table name: ')
cols_num = int(input('Enter number of columns: '))
for i in range(cols_num):
col_name = input(f'Enter the column name {i+1}: ')
table_cols.append(col_name)
print(f"Columns Created: {table_cols}")
else:
print('Invalid command')
2οΈβ£ List Iteration (Class Roster) Practicing how to loop through lists to create formatted output. This is a "Pythonic" way to handle data without needing complex index numbers.
Python
class_name = "Math 101"
students = ["Alice", "Bob", "Charlie"]
print(f"Class \"{class_name}\" Roster:")
for student in students:
print(f"- {student}")
3οΈβ£ List Slicing Power Learning how to extract specific parts of a list using index ranges. Slicing is one of Pythonβs most powerful features!
animals = ["cat", "dog", "rabbit", "hamster", "parrot", "fish"]
print(animals[0:2]) # Output: ['cat', 'dog'] (Start at 0, stop before 2)
print(animals[1:]) # Output: ['dog', 'rabbit', 'hamster', 'parrot', 'fish'] (From 1 to end)
print(animals[:3]) # Output: ['cat', 'dog', 'rabbit'] (From start to 3)
print(animals[-3:]) # Output: ['hamster', 'parrot', 'fish'] (Last three items)
4οΈβ£ List Slicing Power (Level: Advanced) β‘οΈ
Python slicing follows the rule: [start : stop : step]. I experimented with different combinations, including negative steps to reverse parts of the list!
animals = ["cat", "dog", "rabbit", "hamster", "parrot", "fish"]
# Basic Slicing
print(animals[0:2]) # ['cat', 'dog'] (Start at 0, stop before 2)
print(animals[:3]) # ['cat', 'dog', 'rabbit'] (First three)
print(animals[-3:]) # ['hamster', 'parrot', 'fish'] (Last three)
# Slicing with Step [start:stop:step]
print(animals[::2]) # ['cat', 'rabbit', 'parrot'] (Every 2nd item)
print(animals[1:5:2]) # ['dog', 'hamster'] (From index 1 to 5, skipping every other)
print(animals[::3]) # ['cat', 'hamster'] (Every 3rd item)
# The Reverse Tricks
print(animals[::-1]) # ['fish', 'parrot', 'hamster', 'rabbit', 'dog', 'cat'] (Reverse entire list)
print(animals[-1:-4:-1]) # ['fish', 'parrot', 'hamster'] (Reverse last 3)
print(animals[3:0:-1]) # ['hamster', 'rabbit', 'dog'] (Reverse from index 3 down to 1)
# Full Copy
print(animals[:]) # Full copy of the list
@gpspace_tech
#Day2 #PythonJourney #PythonCLI #LearningInPublic
#Linkedein #ML #DL #Machine #Learing #Cursor #Python
#Masrer
1οΈβ£ Command Line Database Setup I built a script that uses sys.argv to accept commands. It dynamically asks for table details and stores column names in a list.
Python
import sys
# Checking for command line arguments
if len(sys.argv) < 2:
print('Usage: python lists.py create_db')
elif sys.argv[1] == 'create_db':
table_cols = []
table_name = input('Enter table name: ')
cols_num = int(input('Enter number of columns: '))
for i in range(cols_num):
col_name = input(f'Enter the column name {i+1}: ')
table_cols.append(col_name)
print(f"Columns Created: {table_cols}")
else:
print('Invalid command')
2οΈβ£ List Iteration (Class Roster) Practicing how to loop through lists to create formatted output. This is a "Pythonic" way to handle data without needing complex index numbers.
Python
class_name = "Math 101"
students = ["Alice", "Bob", "Charlie"]
print(f"Class \"{class_name}\" Roster:")
for student in students:
print(f"- {student}")
3οΈβ£ List Slicing Power Learning how to extract specific parts of a list using index ranges. Slicing is one of Pythonβs most powerful features!
animals = ["cat", "dog", "rabbit", "hamster", "parrot", "fish"]
print(animals[0:2]) # Output: ['cat', 'dog'] (Start at 0, stop before 2)
print(animals[1:]) # Output: ['dog', 'rabbit', 'hamster', 'parrot', 'fish'] (From 1 to end)
print(animals[:3]) # Output: ['cat', 'dog', 'rabbit'] (From start to 3)
print(animals[-3:]) # Output: ['hamster', 'parrot', 'fish'] (Last three items)
4οΈβ£ List Slicing Power (Level: Advanced) β‘οΈ
Python slicing follows the rule: [start : stop : step]. I experimented with different combinations, including negative steps to reverse parts of the list!
animals = ["cat", "dog", "rabbit", "hamster", "parrot", "fish"]
# Basic Slicing
print(animals[0:2]) # ['cat', 'dog'] (Start at 0, stop before 2)
print(animals[:3]) # ['cat', 'dog', 'rabbit'] (First three)
print(animals[-3:]) # ['hamster', 'parrot', 'fish'] (Last three)
# Slicing with Step [start:stop:step]
print(animals[::2]) # ['cat', 'rabbit', 'parrot'] (Every 2nd item)
print(animals[1:5:2]) # ['dog', 'hamster'] (From index 1 to 5, skipping every other)
print(animals[::3]) # ['cat', 'hamster'] (Every 3rd item)
# The Reverse Tricks
print(animals[::-1]) # ['fish', 'parrot', 'hamster', 'rabbit', 'dog', 'cat'] (Reverse entire list)
print(animals[-1:-4:-1]) # ['fish', 'parrot', 'hamster'] (Reverse last 3)
print(animals[3:0:-1]) # ['hamster', 'rabbit', 'dog'] (Reverse from index 3 down to 1)
# Full Copy
print(animals[:]) # Full copy of the list
@gpspace_tech
#Day2 #PythonJourney #PythonCLI #LearningInPublic
#Linkedein #ML #DL #Machine #Learing #Cursor #Python
#Masrer
β€2
π₯ Python Tip of the Day β List Methods
append() β Add items
remove() β Delete items
count() β How many?
index() β Where is it?
extend() β Add many
pop() β Remove by index
reverse()β Flip the list
sort() β Order the list
Keep learning. Keep building. π
#Python #CodingTips #PythonForBeginners #CodeEveryday
#ProgrammingLife #MachineLearning #DeepLearning #AI
#TechEthiopia @gpspace_tech
append() β Add items
remove() β Delete items
count() β How many?
index() β Where is it?
extend() β Add many
pop() β Remove by index
reverse()β Flip the list
sort() β Order the list
numbers = [3, 4, 5, 6]
nums = [6, 5, 4, 2, 3, 1]
numbers.append(7) β [3, 4, 5, 6, 7]
numbers.clear() β []
numbers.copy() β [3, 4, 5, 6]
[3,4,5,6,3].count(3) β 2
numbers.extend("GPS") β [3,4,5,6,'G','P','S']
numbers.index(4) β 1
numbers.insert(2,'B') β [3,4,'B',5,6]
numbers.pop(3) β [3,4,5]
numbers.remove(4) β [3,5,6]
numbers.reverse() β [6,5,4,3]
nums.sort() β [1,2,3,4,5,6]
Keep learning. Keep building. π
#Python #CodingTips #PythonForBeginners #CodeEveryday
#ProgrammingLife #MachineLearning #DeepLearning #AI
#TechEthiopia @gpspace_tech
https://chatgpt.com/share/697494b4-9f00-8012-adc7-0313566685b6
#AI #section2 #kal #AI #lists #tuple #dictionary #set #ML #INSA #gps #elonmusk #WCF
#EAII #GPSPACE #python #udemy #brook
@gpspace_tech
#AI #section2 #kal #AI #lists #tuple #dictionary #set #ML #INSA #gps #elonmusk #WCF
#EAII #GPSPACE #python #udemy #brook
@gpspace_tech
ChatGPT
ChatGPT - Greetings and Support
ChatGPT helps you get answers, find inspiration, and be more productive.
Day 3 : Match statement
π’ MATCH STATEMENT IN PYTHON (Deep Explanation)
The ***match statement*** in Python is like a more advanced version of if-elif-else, introduced in Python 3.10.
It allows you to compare a value against several patterns and run code depending on which pattern matches. Think of it as a βswitch-caseβ on steroids.
1οΈβ£ Basic Syntax
variable β the value you want to check
case pattern: β the pattern you want to match
(_) β wildcard, matches anything not matched before (like default)
2οΈβ£ Simple Example (Number Matching)
The program checks each case one by one. When x == 2, it executes that block and skips the rest.
3οΈβ£ Matching Multiple Values
You can match several values in one case using | (OR operator):
4οΈβ£ Matching Types & Structures
match can also check types or patterns in data structures.
a) Matching a list
Here [1, x, 3] is a pattern. x takes the middle value.
b) Matching dictionaries
5οΈβ£ Matching Classes (Object-Oriented)
```class Point:
def init(self, x, y):
self.x = x
self.y = y
p = Point(1, 2)
match p:
case Point(x=0, y=0):
print("Origin")
case Point(x, y):
print(f"Point at ({x},{y})")
Output:
Point at (1,2)```
#AI #day3 #GPSPACE #EAII #gps #Nasa #GPSPACE #MachineLearning
#python #match #list #dict #other #INSA #EAII #trump
@gpspace_tech
π’ MATCH STATEMENT IN PYTHON (Deep Explanation)
The ***match statement*** in Python is like a more advanced version of if-elif-else, introduced in Python 3.10.
It allows you to compare a value against several patterns and run code depending on which pattern matches. Think of it as a βswitch-caseβ on steroids.
1οΈβ£ Basic Syntax
match variable:
case pattern1:
# do something
case pattern2:
# do something else
case _:
# default case (like else)
variable β the value you want to check
case pattern: β the pattern you want to match
(_) β wildcard, matches anything not matched before (like default)
2οΈβ£ Simple Example (Number Matching)
x = 2
match x:
case 1:
print("One")
case 2:
print("Two")
case 3:
print("Three")
case _:
print("Other number")
Output:
Two
The program checks each case one by one. When x == 2, it executes that block and skips the rest.
3οΈβ£ Matching Multiple Values
You can match several values in one case using | (OR operator):
day = "Saturday"
match day:
case "Saturday" | "Sunday":
print("Weekend")
case _:
print("Weekday")
Output:
Weekend
4οΈβ£ Matching Types & Structures
match can also check types or patterns in data structures.
a) Matching a list
numbers = [1, 2, 3]
match numbers:
case [1, x, 3]:
print(f"Second number is {x}")
case _:
print("No match")
Output:
Second number is 2
Here [1, x, 3] is a pattern. x takes the middle value.
b) Matching dictionaries
person = {"name": "Eba", "age": 20}
match person:
case {"name": name, "age": age}:
print(f"Name: {name}, Age: {age}")
Output:
Name: Eba, Age: 205οΈβ£ Matching Classes (Object-Oriented)
```class Point:
def init(self, x, y):
self.x = x
self.y = y
p = Point(1, 2)
match p:
case Point(x=0, y=0):
print("Origin")
case Point(x, y):
print(f"Point at ({x},{y})")
Output:
Point at (1,2)```
#AI #day3 #GPSPACE #EAII #gps #Nasa #GPSPACE #MachineLearning
#python #match #list #dict #other #INSA #EAII #trump
@gpspace_tech
https://chatgpt.com/share/697684d3-026c-8012-a3a2-ec45dc8ff60d
#python #listComphention #list #loops #forloop #whileloop #matchstatement
@gpspace_tech #Al #ML #DL #LLM #NLP #supervised #unsupervised #regression #randomtree
#python #listComphention #list #loops #forloop #whileloop #matchstatement
@gpspace_tech #Al #ML #DL #LLM #NLP #supervised #unsupervised #regression #randomtree
ChatGPT
ChatGPT - Python Web Dev Section 3
ChatGPT helps you get answers, find inspiration, and be more productive.
https://chatgpt.com/share/6979c699-b3f4-8012-80d8-230a1a52e1c1
#python #section4 #function #typehint #regularfunction #lambda #lambdafunction #AI #ML #DL
@gpspace_tech #NLP #supervised #Test-Time-Matching #gps #gpspace #community #code #programming #NLP
#MachineLearning #LearnML #DataScience #AI
#python #section4 #function #typehint #regularfunction #lambda #lambdafunction #AI #ML #DL
@gpspace_tech #NLP #supervised #Test-Time-Matching #gps #gpspace #community #code #programming #NLP
#MachineLearning #LearnML #DataScience #AI
ChatGPT
ChatGPT - Functions in Python
ChatGPT helps you get answers, find inspiration, and be more productive.
β€1
https://youtu.be/CzocVOLkYwo?si=2DvLFzfakWHAV4_x
The concept of BPO by Amharic ππππ
#BPO #Ai #datascience #skill #python #gps
@gpspace_tech
The concept of BPO by Amharic ππππ
#BPO #Ai #datascience #skill #python #gps
@gpspace_tech
YouTube
ααα£αΆα½ α°αα«α α¨α΅α« αα΅α α¨ααα α¨BPO ααα //Ethio Business//
"Ethio Business" is a weekly program airing on Thursday evenings from 8:30 to 9:00 p.m., dedicated to providing viewers with concise and current business updates and practical business and investment ideas. The show delves into economic issues, particularlyβ¦
π Properties of Algorithms β Foundation of Computer Science
An algorithm is a step-by-step procedure used to solve a problem. For an algorithm to be correct and useful, it must have the following important properties:
1οΈβ£ Finiteness
The algorithm must stop after a finite number of steps. It cannot run forever.
2οΈβ£ Definiteness (No Ambiguity)
Each step must be clear, precise, and well-defined. The computer must understand exactly what to do.
3οΈβ£ Sequential (Order)
Steps must be executed in the correct logical order to produce the correct result.
4οΈβ£ Correctness
The algorithm must produce the correct output for every valid input.
5οΈβ£ Language Independence
An algorithm is not tied to any programming language. It can be implemented in Python, C, Java, or any language.
6οΈβ£ Feasibility
Each step must be practical and possible to execute with available resources.
7οΈβ£ Effectiveness
Every instruction must be simple and executable by a computer in a finite time.
8οΈβ£ Efficiency
The algorithm should use minimum time and memory. Efficient algorithms are faster and more scalable.
9οΈβ£ Precision
Each instruction must be exact and specific, with no confusion.
π Simplicity
The algorithm should be easy to understand, implement, and maintain.
Additional Properties:
βοΈ Input β Accepts zero or more inputs
βοΈ Output β Produces at least one output
βοΈ Generality β Solves a general problem, not just one specific case
π Key Insight:
Data Structures store data. Algorithms process data. Together, they form the foundation of all software, artificial intelligence, and modern computing.
π‘ Master algorithms, and you master problem-solving.
#Algorithms
#DataStructures
#ComputerScience
#Programming
#SoftwareEngineering
#FutureEngineers
#Python
@gpspace_tech
An algorithm is a step-by-step procedure used to solve a problem. For an algorithm to be correct and useful, it must have the following important properties:
1οΈβ£ Finiteness
The algorithm must stop after a finite number of steps. It cannot run forever.
2οΈβ£ Definiteness (No Ambiguity)
Each step must be clear, precise, and well-defined. The computer must understand exactly what to do.
3οΈβ£ Sequential (Order)
Steps must be executed in the correct logical order to produce the correct result.
4οΈβ£ Correctness
The algorithm must produce the correct output for every valid input.
5οΈβ£ Language Independence
An algorithm is not tied to any programming language. It can be implemented in Python, C, Java, or any language.
6οΈβ£ Feasibility
Each step must be practical and possible to execute with available resources.
7οΈβ£ Effectiveness
Every instruction must be simple and executable by a computer in a finite time.
8οΈβ£ Efficiency
The algorithm should use minimum time and memory. Efficient algorithms are faster and more scalable.
9οΈβ£ Precision
Each instruction must be exact and specific, with no confusion.
π Simplicity
The algorithm should be easy to understand, implement, and maintain.
Additional Properties:
βοΈ Input β Accepts zero or more inputs
βοΈ Output β Produces at least one output
βοΈ Generality β Solves a general problem, not just one specific case
π Key Insight:
Data Structures store data. Algorithms process data. Together, they form the foundation of all software, artificial intelligence, and modern computing.
π‘ Master algorithms, and you master problem-solving.
#Algorithms
#DataStructures
#ComputerScience
#Programming
#SoftwareEngineering
#FutureEngineers
#Python
@gpspace_tech