PyData Careers
21.2K subscribers
247 photos
11 videos
26 files
416 links
Python Data Science jobs, interview tips, and career insights for aspiring professionals.

Admin: @HusseinSheikho || @Hussein_Sheikho
Download Telegram
Interview question

What are the main principles of writing unit tests?

Answer: A unit test checks one small unit of behavior and isolates it from external dependencies. The test should have a clear structure: data preparation, action execution, result verification. The test must be deterministic, that is, it should give the same result on repeated runs, without depending on time, randomness, and the environment.

A good unit test reads like a specification: a clear name, minimal unnecessary preparation, a clear reason for failure. It should be fast and not access the network, database, or file system. If a dependency is unavoidable, it is replaced with a stub or mocks, checking either the result or the interaction contract, but not both at once unnecessarily.


tags: #interview

@DATASCIENCQ
Please open Telegram to view this post
VIEW IN TELEGRAM
3
Question from the interview

Why shouldn't the is operator be used to compare strings and numbers?

Answer: The is operator checks whether two objects refer to the same memory area, not whether their values are equal. For strings and numbers, this may accidentally work for small values due to internment, but it's not guaranteed.

For comparing content, you need to use ==, otherwise the result may be unpredictable and depend on the interpreter's implementation.


tags: #interview

@DataScienceQ
Please open Telegram to view this post
VIEW IN TELEGRAM
4
Forwarded from Learn Python Hub
This channels is for Programmers, Coders, Software Engineers.

0️⃣ Python
1️⃣ Data Science
2️⃣ Machine Learning
3️⃣ Data Visualization
4️⃣ Artificial Intelligence
5️⃣ Data Analysis
6️⃣ Statistics
7️⃣ Deep Learning
8️⃣ programming Languages

https://t.me/addlist/8_rRW2scgfRhOTc0

https://t.me/Codeprogrammer
Please open Telegram to view this post
VIEW IN TELEGRAM
⚡️ Want to build your own personal JARVIS, but Clawdbot seems too complicated to deploy and understand? 

Try - nanobot: an ultra-lightweight version of Clawdbot (99% simpler), which sets up a personal AI assistant in less than a minute.

⚡️ The basic functionality is just ~4,000 lines of Python - compared to over 400k lines in Clawdbot.

Key features of nanobot:

🪶 Ultra-lightweight - ~4,000 lines of code, just the core without overload. 
🔬 Convenient for research - clean, understandable code, easy to modify and expand. 
⚡️ Fast - minimal size = quick start, fewer resources, rapid iterations. 
💎 Simple to use - one launch, and the assistant is already working.

What nanobot can do:

📈 24/7 real-time market analysis - monitoring and insights. 
🚀 Full-stack software engineer - assistance in development from idea to production. 
📅 Smart routine manager - helps organize the day and tasks. 
📚 Personal knowledge assistant - storage, search, and work with information.

If you want your own AI agent without a monstrous infrastructure - this is exactly the start you need.

🔗 Open Source: https://github.com/HKUDS/nanobot
🔗Video: https://www.youtube.com/shorts/Wx2RBCnl5nU

#Clawdbot #AIAssistant #Agents
4
Forwarded from Machine Learning
🚀 Machine Learning Workflow: Step-by-Step Breakdown
Understanding the ML pipeline is essential to build scalable, production-grade models.

👉 Initial Dataset
Start with raw data. Apply cleaning, curation, and drop irrelevant or redundant features.
Example: Drop constant features or remove columns with 90% missing values.

👉 Exploratory Data Analysis (EDA)
Use mean, median, standard deviation, correlation, and missing value checks.
Techniques like PCA and LDA help with dimensionality reduction.
Example: Use PCA to reduce 50 features down to 10 while retaining 95% variance.

👉 Input Variables
Structured table with features like ID, Age, Income, Loan Status, etc.
Ensure numeric encoding and feature engineering are complete before training.

👉 Processed Dataset
Split the data into training (70%) and testing (30%) sets.
Example: Stratified sampling ensures target distribution consistency.

👉 Learning Algorithms
Apply algorithms like SVM, Logistic Regression, KNN, Decision Trees, or Ensemble models like Random Forest and Gradient Boosting.
Example: Use Random Forest to capture non-linear interactions in tabular data.

👉 Hyperparameter Optimization
Tune parameters using Grid Search or Random Search for better performance.
Example: Optimize max_depth and n_estimators in Gradient Boosting.

👉 Feature Selection
Use model-based importance ranking (e.g., from Random Forest) to remove noisy or irrelevant features.
Example: Drop features with zero importance to reduce overfitting.

👉 Model Training and Validation
Use cross-validation to evaluate generalization. Train final model on full training set.
Example: 5-fold cross-validation for reliable performance metrics.

👉 Model Evaluation
Use task-specific metrics:
- Classification – MCC, Sensitivity, Specificity, Accuracy
- Regression – RMSE, R², MSE
Example: For imbalanced classes, prefer MCC over simple accuracy.

💡 This workflow ensures models are robust, interpretable, and ready for deployment in real-world applications.

https://t.me/DataScienceM
4
Interview question

How do unit tests differ from integration tests?

Answer: Unit tests check a small isolated part of the code — a single function or method, without real dependencies like a database, network, or file system. All external dependencies are replaced with mocks or stubs, so such tests are fast and accurately pinpoint errors.

Integration tests check the joint operation of several system components. They run code with real or almost real dependencies and answer the question of whether the application parts interact correctly with each other. Such tests are slower, more difficult to set up, but they allow to identify problems at the boundaries between modules.


tags: #interview

https://t.me/DataScienceQ
Please open Telegram to view this post
VIEW IN TELEGRAM
4
👍 A fresh deep learning course from MIT is now available publicly

A full-fledged educational course has been published on the university's website: 24 lectures, practical tasks, homework assignments, and a collection of materials for self-study.

The program includes modern neural network architectures, generative models, transformers, inference, and other key topics.

A great opportunity to study deep learning based on the structure of a top university, free of charge and without simplifications — let's learn here.
https://ocw.mit.edu/courses/6-7960-deep-learning-fall-2024/resources/lecture-videos/

tags: #python #deeplearning

@codeprogrammer
Please open Telegram to view this post
VIEW IN TELEGRAM
2
Question from the interview

What is Meta in Django and why is it needed?

Answer: Meta is a nested class used to set additional settings for a model or form. It doesn't directly describe the fields, but controls the object's behavior: table name (db_table), sorting (ordering), constraints (unique_together), human-readable names (verbose_name), and other parameters.

Django uses metaclasses to retrieve information from Meta when creating a model and configure its operation in the ORM and admin interface. There's no need to override the mechanism — it's enough to define the class Meta within the class.


tags: #interview

https://t.me/DataScienceQ
Please open Telegram to view this post
VIEW IN TELEGRAM
1
This media is not supported in your browser
VIEW IN TELEGRAM
🔖 An excellent resource for learning about neural networks

We're sharing a cool resource for learning about neural networks, offering clear, step-by-step instruction with dynamic visualizations and easy-to-understand explanations.

In addition, you'll find many other useful materials on machine learning on the site.

Find and use it — https://mlu-explain.github.io/neural-networks/

tags: #AI #ML #PYTHON

@CODEPROGRAMMER
Please open Telegram to view this post
VIEW IN TELEGRAM
1
Forwarded from Code With Python
Media is too big
VIEW IN TELEGRAM
Build and Automate Django CRM

#Django #CRM #PYTHON
5
Forwarded from Udemy Coupons
101 Python Projects | The Complete Python Course for 2025

Master Python in 2025: Build 101 Projects, Learn Socket Programming , Automation, Data Analysis, OpenCV and OOP....

🏷 Category: development
🌍 Language: English (US)
👥 Students: 6,622 students
⭐️ Rating: 4.3/5.0 (143 reviews)
🏃‍♂️ Enrollments Left: 955
Expires In: 0D:4H:4M
💰 Price: $28.67 => FREE
🆔 Coupon: 3F0CCFA8597F6D23CD48

⚠️ Please note: A verification layer has been added to prevent bad actors and bots from claiming the courses, so it is important for genuine users to enroll manually to not lose this free opportunity.

💎 By: https://t.me/DataScienceC
Forwarded from Udemy Coupons
Python Zero to Hero: Master Coding with Real Projects

Python for Beginners & Beyond: Learn to Code with Real-World Projects...

🏷 Category: it-and-software
🌍 Language: English (US)
👥 Students: 15,346 students
⭐️ Rating: 4.2/5.0 (138 reviews)
🏃‍♂️ Enrollments Left: 983
Expires In: 0D:4H:4M
💰 Price: $26.03 => FREE
🆔 Coupon: 42CE25692A9A939BF456

⚠️ Please note: A verification layer has been added to prevent bad actors and bots from claiming the courses, so it is important for genuine users to enroll manually to not lose this free opportunity.

💎 By: https://t.me/DataScienceC
Interview question

Why is list.sort() faster than sorted(list), if the same list is being sorted?

Answer: The list.sort() method performs in-place sorting, modifying the original list without creating a new copy. This makes it more efficient in terms of memory and performance.

The sorted(list) function creates a new sorted list, which requires additional memory allocation and copying of elements before sorting, which can increase time and memory overhead.


tags: #interview

https://t.me/DataScienceQ
Please open Telegram to view this post
VIEW IN TELEGRAM
4😁1
Python tip:

A shallow copy (copy.copy()) copies the object itself, but not its nested elements.

A deep copy (copy.deepcopy()) copies both the object and all its nested structures.

Therefore, with a shallow copy, changes in the nested elements are reflected in the original, while with a deep copy, they are not.

https://t.me/DataScienceQ
4
The methods getitem() and setitem() allow to implement access to object elements by index or key, just like in lists or dictionaries. 


class CustomContainer:
    def __getitem__(self, key):
        return self.data[key]  # Returns the value by key/index

    def __setitem__(self, key, value):
        self.data[key] = value  # Sets the value by key/index


__getitem__() is called when accessing obsetitem __setitem__() — when assigning obj[key] = value. It allows to emulate the behavior of built-in collections.

✈️ https://t.me/DataScienceQ
Please open Telegram to view this post
VIEW IN TELEGRAM
4
🔗 Python Tuple Basics: A Quick Guide 👍

Do you know what a Python tuple is? 🤔 In this article, we'll explore the basics of tuples in Python. Let's dive right in!

What are Python Tuples?
------------------------

Tuples are immutable collections of values that can be thought of as lists, but with more structure and safety. They're created using square brackets [] and elements are separated by commas.

Creating a Tuple
----------------

You can create a tuple by enclosing elements in parentheses (). For example:
my_tuple = (1, 2, 3)

This creates a tuple with three values: 1, 2, and 3. You can also use the tuple() function to convert a list into a tuple:
values = [1, 2, 3]
my_tuple = tuple(values)
print(my_tuple) # (1, 2, 3)

Accessing Tuple Elements
---------------------------

Tuples have two ways to access elements: indexing and slicing.

* Indexing is used with square brackets [] to access individual elements. For example:
my_tuple = (1, 2, 3)
print(my_tuple[0]) # prints 1

* Slicing is used with square brackets [] to extract a subset of elements. For example:
my_tuple = (1, 2, 3)
print(my_tuple[1:3]) # prints (2, 3)

Common Features and Gotchas
------------------------------

Tuples have some useful features, such as:

* Immutable: Tuples cannot be modified once created.
* Ordered: Tuples maintain the order of elements.
However, they also come with a few gotchas, such as:

* Performance overhead: Creating or accessing tuples can incur performance penalties.


When working with tuples in Python, keep these best practices in mind:

* Use tuples for immutable data where possible.
* Avoid using tuple unpacking to assign values from one variable to another.
* Be mindful of performance when creating or accessing large number of tuples.

By following this quick guide to Python tuples, you'll be well on your way to understanding the basics of tuples and how they can enhance your Python programming experience. 📚

Check it out for more resources: [https://realpython.com/python-tuple/](https://realpython.com/python-tuple/)
2
FastAPI: Speed, Developer Experience, and More 🚀

🏆 Starting with FastAPI: A Popular Python Web Framework
---------------------------------------------------------

FastAPI is an open-source web framework for building APIs with Python. It provides automatic validation, serialization, and interactive documentation through standard Python type hints.

Choosing the Right Framework for Your Project:
-----------------------------------------------

| Use Case | Pick FastAPI | Pick Flask or Django |
| --- | --- | --- |
| Building a Web App | | — |
| Full-Stack Web Framework | — | — |

Key Features:

* Speed: FastAPI is built on top of Python 3.7+, with a focus on performance and scalability.
* Developer Experience: Easy-to-use API documentation, auto-generated documentation, and support for asynchronous programming.
* Built-in Features: Automatic JSON serialization and deserialization, support for WebSockets and gRPC.

Start Building Your API Today! 💻

Learn more about FastAPI and how to get started with building your own APIs. Check out this free online course: https://futurecoder.io/ 🚀
3
Stop using if obj == None, use if obj is None

In Python, when you write:

obj == None


you're not directly checking if obj is the value None. Instead, you're asking if the object is equal to None.

Yes, in many cases, the result will be the same as for the code:

obj is None


But the behavior of these two variants is different, and this difference is important.

When you use:

obj == None


Python calls the __eq__ method on the object. That is, the object itself decides what it means to be "equal to None". And this method can be overridden.

If obj is an instance of a class in which __eq__ is implemented so that when compared with None, it returns True (even if the object is not actually None), then obj == None may mistakenly give True.

Example:

class Weird:
    def __eq__(self, other):
        return True  # Always asserts that it's equal

obj = Weird()

print(obj == None)  # True
print(obj is None)  # False


Here, it can be seen that obj == None returns True due to the custom behaeqf the __eq__ operator in the class.

Therefore, when using obj == None, the result is not always predictable.

On the other hand, when you write:

obj is None


you're using the is operator, which cannot be overridden. This means that the result will always be the same and predictable.

The is operator checks the identity of objects, that is, whether two references point to the same object. Since None is a singleton (the only instance), obj is None is the correct and most efficient way to perform such a check.

❤️ Therefore, it is always recommended, and this is best practice, to use obj is None instead of obj == None for predictability and efficiency.

👉 https://t.me/DataScienceQ
Please open Telegram to view this post
VIEW IN TELEGRAM
6
🗂 One of the best resources for learning Data Science and Machine Learning

Kaggle offers interactive courses that will help you quickly understand the key topics of DS and ML.

The format is simple: short lessons, practical tasks, and a certificate upon completion — all for free.

Inside:
• basics of Python for data analysis;
• machine learning and working with models;
• pandas, SQL, visualization;
• advanced techniques and practical cases.


Each course takes just 3–5 hours and immediately provides practical knowledge for work.

Link to the platform

tags: #ML #DEEPLEARNING #AI

https://t.me/CodeProgrammer
Please open Telegram to view this post
VIEW IN TELEGRAM
2