BeNN
Video
You Beautiful Alienπ₯π₯π₯No Any AGI or ASI system would be like him. Beyond Greatnessπ
π4π2
BeNN
Video
It's Ridiculous seeing other clubs cooking Europe Teams in this club world cup. Al Hilal and Inter Miami has surprised me.
π₯2
π Why Python is Dynamically Typed β and What That Really Means
In the world of programming languages, a major distinction youβll encounter is ''statically typed'' vs ''dynamically typed'' languages. Python falls into the latter category β and understanding what that means is not just theoretical. It affects how you write code, debug, and build scalable systems.
π§ What Does "Dynamically Typed" Even Mean?
In a dynamically typed language like Python, variable types are determined at runtime, not in advance.
That means:
- You donβt have to declare the type of a variable.
- The type is determined when the code is executed.
- The same variable can hold values of different types at different points in time.
Compare that to statically typed languages (like Java, C, or Go), where:
- You must declare the type beforehand.
- The compiler enforces type correctness.
- Type-related bugs are caught at compile time.
π§ͺ A Simple Python Example
Python lets you reassign a variable to a completely different type. No complaints, no compiler errors β because Python doesn't check types until the code runs.
π¬ Whatβs Going on Under the Hood?
When you write x = 42 in Python, youβre not binding a type to a variable. Instead, youβre:
1. Creating an object of type int with value 42.
2. Binding the name x to that object in a dictionary that represents the current namespace.
You can think of Python variables as labels attached to objects, not as memory slots of a specific type like in C.
Internally:
Python stores all objects in memory, and every object has:
- A type tag (`PyTypeObject*`)
- A reference count
- Optional value fields
When x = 42, this happens:
- Python decreases the reference count of the integer object (maybe deletes it if count == 0).
- Then creates a new str object.
- Binds x to this new string object.
This level of indirection is what makes Python dynamic β and flexible.
βοΈ Static Typing Comparison: Java
Hereβs a similar example in Java:
Java won't allow this because the variable x is statically typed as int. The compiler enforces this restriction before the program even runs.
Thatβs the difference: Static typing = types known and checked before runtime.
π¨ Benefits and Drawbacks of Dynamic Typing
β Pros:
* Fast prototyping
* Less boilerplate code
* More flexible (you can write generic functions easily)
β Cons:
* Type-related bugs are found at runtime
* Harder to reason about large codebases
* Less performance optimization by interpreter
π§° Optional Static Typing in Python
Thanks to Pythonβs evolution, you can now use type hints (via [PEP 484](https://peps.python.org/pep-0484/)) to make your code feel more like statically typed code β without losing flexibility.
Example:
But remember: type hints are not enforced by Python itself. Theyβre used by tools like mypy or IDEs to check types statically, but they donβt change how Python runs your code.
π οΈ Recap: Why Python Is Dynamically Typed
* Type is determined at runtime
* Variables are just names bound to objects, not memory slots with types
* No compiler-time type checking
* You can reassign a variable to any type
Under the hood, Python uses dynamic memory management, object metadata, and runtime type checking to make this flexibility possible β at the cost of some performance and type safety.
π§© Final Thought
Pythonβs dynamic nature is what makes it intuitive and elegant, especially for scripting, data science, and AI development. But as your codebase grows, combining dynamic typing with good practices and optional static hints can give you the best of both worlds.
In the world of programming languages, a major distinction youβll encounter is ''statically typed'' vs ''dynamically typed'' languages. Python falls into the latter category β and understanding what that means is not just theoretical. It affects how you write code, debug, and build scalable systems.
π§ What Does "Dynamically Typed" Even Mean?
In a dynamically typed language like Python, variable types are determined at runtime, not in advance.
That means:
- You donβt have to declare the type of a variable.
- The type is determined when the code is executed.
- The same variable can hold values of different types at different points in time.
Compare that to statically typed languages (like Java, C, or Go), where:
- You must declare the type beforehand.
- The compiler enforces type correctness.
- Type-related bugs are caught at compile time.
π§ͺ A Simple Python Example
print(type(x)) # <class 'int'>
x = "hello" # Now x holds a string!
print(type(x)) # <class 'str'>
Python lets you reassign a variable to a completely different type. No complaints, no compiler errors β because Python doesn't check types until the code runs.
π¬ Whatβs Going on Under the Hood?
When you write x = 42 in Python, youβre not binding a type to a variable. Instead, youβre:
1. Creating an object of type int with value 42.
2. Binding the name x to that object in a dictionary that represents the current namespace.
You can think of Python variables as labels attached to objects, not as memory slots of a specific type like in C.
Internally:
Python stores all objects in memory, and every object has:
- A type tag (`PyTypeObject*`)
- A reference count
- Optional value fields
When x = 42, this happens:
When you do x = "hello":
- Python decreases the reference count of the integer object (maybe deletes it if count == 0).
- Then creates a new str object.
- Binds x to this new string object.
This level of indirection is what makes Python dynamic β and flexible.
βοΈ Static Typing Comparison: Java
Hereβs a similar example in Java:
x = "hello"; // β Compile-time error!
Java won't allow this because the variable x is statically typed as int. The compiler enforces this restriction before the program even runs.
Thatβs the difference: Static typing = types known and checked before runtime.
π¨ Benefits and Drawbacks of Dynamic Typing
β Pros:
* Fast prototyping
* Less boilerplate code
* More flexible (you can write generic functions easily)
β Cons:
* Type-related bugs are found at runtime
* Harder to reason about large codebases
* Less performance optimization by interpreter
π§° Optional Static Typing in Python
Thanks to Pythonβs evolution, you can now use type hints (via [PEP 484](https://peps.python.org/pep-0484/)) to make your code feel more like statically typed code β without losing flexibility.
Example:
return "Hello, " + name
But remember: type hints are not enforced by Python itself. Theyβre used by tools like mypy or IDEs to check types statically, but they donβt change how Python runs your code.
π οΈ Recap: Why Python Is Dynamically Typed
* Type is determined at runtime
* Variables are just names bound to objects, not memory slots with types
* No compiler-time type checking
* You can reassign a variable to any type
Under the hood, Python uses dynamic memory management, object metadata, and runtime type checking to make this flexibility possible β at the cost of some performance and type safety.
π§© Final Thought
Pythonβs dynamic nature is what makes it intuitive and elegant, especially for scripting, data science, and AI development. But as your codebase grows, combining dynamic typing with good practices and optional static hints can give you the best of both worlds.
Python Enhancement Proposals (PEPs)
PEP 484 β Type Hints | peps.python.org
PEP 3107 introduced syntax for function annotations, but the semantics were deliberately left undefined. There has now been enough 3rd party usage for static type analysis that the community would benefit from a standard vocabulary and baseline tools w...
β€1π1π₯1
From now on we will also talk about what is going under the hood in python. Learning and knowing those normal codes is an easy thing, but deeply understanding what's going under the hood will give you an edge; That's why Hackers (The real one not script kiddies or use another person tools) are the best at what they do. They have understood how the whole computer works mostly. I think One day I have heard Kevin Mitnick or someone saying Hacker is someone who deeply understood about computers.
π3
BeNN
https://youtu.be/jtrFTHlUJ5Q?si=QIZwXdvaNn7OUEiS
Check out all Mariana's Documentaries she's Gangster!!! Damn the Documentaries are addictiveπ₯
π2
BeNN
https://youtu.be/LCEmiRjPEtQ?si=th6sisVkWW1OwcdY
Another Materclass by Andrej Karpathy. An Amazing man!
βοΈTitle: StartUp [2016 -2018]
Also Known As: StartUp
Rating βοΈ: 7.8 / 10
(
Release Info: 8 / 11 / 2016 (Germany)
Genre: #Crime #Thriller
Language: #English
Country of Origin: πΊπΈ #United_States
Story Line: A desperate banker, a Haitian-American gang lord and a Cuban-American hacker are forced to work together to unwittingly create their version of the American dream - organized crime 2.0.
Directors Ben Ketai
Stars Adam Brody Edi Gathegi Otmara Marrero Kristen Ariza Fredrick Bam Scott Martin Freeman Ron Perlman
Read More ...
Also Known As: StartUp
Rating βοΈ: 7.8 / 10
(
7.8 based on 29973 user ratings) | 16 | 0h 44min |Release Info: 8 / 11 / 2016 (Germany)
Genre: #Crime #Thriller
Language: #English
Country of Origin: πΊπΈ #United_States
Story Line: A desperate banker, a Haitian-American gang lord and a Cuban-American hacker are forced to work together to unwittingly create their version of the American dream - organized crime 2.0.
Directors Ben Ketai
Stars Adam Brody Edi Gathegi Otmara Marrero Kristen Ariza Fredrick Bam Scott Martin Freeman Ron Perlman
Read More ...
BeNN
βοΈTitle: StartUp [2016 -2018] Also Known As: StartUp Rating βοΈ: 7.8 / 10 (7.8 based on 29973 user ratings) | 16 | 0h 44min | Release Info: 8 / 11 / 2016 (Germany) Genre: #Crime #Thriller Language: #English Country of Origin: πΊπΈ #United_States Story Line:β¦
Series Recommendation of this week.
π2β‘1π₯1
'''Simple HIV prediction using Logistic Regression'''
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score, confusion_matrix, classification_report
#Load Data
data = {
'Age': [25, 35, 45, 28, 50, 30, 40, 23, 60, 33],
'CD4_Count': [500, 350, 200, 450, 180, 320, 250, 600, 150, 400],
'Viral_load': [10, 20, 50, 15, 60, 25, 40, 12, 70, 30],
'HIV_status': [0, 1, 1, 0, 1, 0, 1, 0, 1, 0]
}
#Convert to DataFrame
df = pd.DataFrame(data)
#Split into Features and Target
X = df[['Age', 'CD4_Count', 'Viral_load']]
y = df['HIV_status']
#Split into Train and Test
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.2, random_state = 42)
#Train the model
model = LogisticRegression()
model.fit(X_train, y_train)
#predicting
y_pred = model.predict(X_test)
#New data prediction
new_data = np.array([20, 480, 12])
new_prediction = model.predict(new_data.reshape(1, -1))
for i, (input_data, prediction) in enumerate(zip(new_data, new_prediction)):
status = "Positive" if prediction == 1 else "Negative"
print(f"predicted HIV status: {status}")
β€3
Forwarded from AI Post β Artificial Intelligence
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯2
Forwarded from AI Post β Artificial Intelligence
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from Beka (Beka)
I'm happy to announce Better Auth has raised a $5M seed led by PeakXV Partners (formerly Sequoia Capital India & SEA), with participation from Y Combinator, Chapter One, P1 Ventures, and a group of incredible investors and angels
Thanks everyone for your support and for being a part of this journey!
https://www.better-auth.com/blog/seed-round
Thanks everyone for your support and for being a part of this journey!
https://www.better-auth.com/blog/seed-round
Better-Auth
Announcing our $5M seed round | Better Auth
We raised $5M seed led by Peak XV Partners
π₯3π2