PyData Careers – Telegram
PyData Careers
20.8K subscribers
206 photos
4 videos
26 files
352 links
Python Data Science jobs, interview tips, and career insights for aspiring professionals.

Admin: @HusseinSheikho || @Hussein_Sheikho
Download Telegram
🎁❗️TODAY FREE❗️🎁

Entry to our VIP channel is completely free today. Tomorrow it will cost $500! 🔥

JOIN 👇

https://news.1rj.ru/str/+MPpZ4FO2PHQ4OTZi
https://news.1rj.ru/str/+MPpZ4FO2PHQ4OTZi
https://news.1rj.ru/str/+MPpZ4FO2PHQ4OTZi
2
Checking Memory Usage in Python

psutil is imported, then through psutil.virtual_memory() memory data is obtained.

The function convert_bytes converts bytes to gigabytes.

Then the code calculates:

- total RAM
- available RAM
- used RAM
- percentage usage

And outputs this to the console.

import psutil

memory = psutil.virtual_memory()

def convert_bytes(size):
    # Convert bytes to GB
    gb = size / (1024 ** 3)
    return gb

total_gb = convert_bytes(memory.total)
available_gb = convert_bytes(memory.available)
used_gb = convert_bytes(memory.used)

print(f"Total RAM: {total_gb:.3f} GB")
print(f"Available RAM: {available_gb:.3f} GB")
print(f"Used RAM: {used_gb:.3f} GB")
print(f"RAM Usage: {memory.percent}%")


Or simply press CTRL + ALT + DELETE and open Task Manager. It has worked since the days of Windows 95.

The RAM usage percentage loses its meaning if you have Chrome open — it will consume everything on its own
😄

👉  https://news.1rj.ru/str/DataScienceQ
Please open Telegram to view this post
VIEW IN TELEGRAM
2
Interview Question

What can be a key in a dictionary?

Answer: Dictionaries in Python are hash tables. Instead of keys in the dictionary, hashes are used. Consequently, any hashable data type can be a key in the dictionary, which includes all immutable data types.

tags: #interview

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

Why does isinstance(True, int) return True?

Answer: In Python, bool is a subclass of int. True and False are instances of int with values 1 and 0, respectively.

tags: #interview

➡️ @DataScienceQ
Please open Telegram to view this post
VIEW IN TELEGRAM
6👍1
Python Quiz
Please open Telegram to view this post
VIEW IN TELEGRAM
7
Question from the interview

What is Big O notation?

Answer: Big O notation is a way of describing how quickly the running time or memory consumption of an algorithm increases as the size of the input data increases. It shows the asymptotic complexity: the upper bound of the algorithm's behavior, without taking into account constants and minor details.

For example, O(n) grows linearly, O(n²) - quadratically, O(1) - does not depend on the size of the input.

Big O does not give exact figures, but allows you to compare algorithms in terms of their scalability.


tags: #interview

@DataScienceQ ⭐️
Please open Telegram to view this post
VIEW IN TELEGRAM
7
Interview question

What is __slots__?

Answer: By default, class instances store their attributes in the internal dictiondictct__. This is flexible, but it requires more memory and makes access to fields a bit slower, because the search is done in the dictionarslotsts__ allows you to fix a set of allowed attributes and abandon the usedictct__. Instead of a dictionary, Python allocates compact slots — thereby reducing the memory consumption for each object and speeding up access to attributes. This is especially important when millions of class instances are created in a program or the performance of data access is critical.

There is one restriction: it is not possible to add an attribute that is notslotsts__. To retain the ability to dynamically create fields, you can dictct__ to the list of slots.

tags:
#interview

@DataScienceQ
Please open Telegram to view this post
VIEW IN TELEGRAM
5👎1
❗️LISA HELPS EVERYONE EARN MONEY!$29,000 HE'S GIVING AWAY TODAY!

Everyone can join his channel and make money! He gives away from $200 to $5.000 every day in his channel

https://news.1rj.ru/str/+YDWOxSLvMfQ2MGNi

⚡️FREE ONLY FOR THE FIRST 500 SUBSCRIBERS! FURTHER ENTRY IS PAID! 👆👇

https://news.1rj.ru/str/+YDWOxSLvMfQ2MGNi
2
Question from the interview

What is a message broker and which ones are typically used with Python?

Answer: A message broker is an intermediary component that accepts messages from one service and delivers them to another, allowing microservices and asynchronous tasks to interact without direct connection. It ensures reliable delivery, queues, routing, and scalability.

In Python projects, RabbitMQ, Apache Kafka, and Redis are often used as simple broker solutions (for example, in combination with Celery). The choice depends on the tasks: Kafka for stream processing, RabbitMQ for flexible routing, and Redis for simple queues.


tags: #interview

@DataScienceQ
Please open Telegram to view this post
VIEW IN TELEGRAM
4
Interview question

What is an S3 storage and what is it used for?

Answer: S3 (Simple Storage Service) is a cloud-based object storage service designed for storing any type of files, from images and backups to static websites.

It is scalable, reliable, and provides access to files via URLs. Unlike traditional file systems, S3 does not have a folder hierarchy — everything is stored as objects in "buckets" (containers), and access can be controlled through policies and permissions.


tags: #interview

@DataScienceQ
Please open Telegram to view this post
VIEW IN TELEGRAM
6
“I never believed I could mine crypto for free until I found this.”

Join 34,000+ users discovering TrustCore – a mining project with $1 TCORE tokens, zero investments, and no KYC!

🔥 Ready to start? Your bonus waits 👉 Don’t miss out

#ad InsideAds
1
Question from the interview

Why don't you need to store a session when using JWT?

Answer: JWT contains all the necessary information about the user directly in the token, including the expiration date and roles. The server simply verifies the token's signature and does not store any data between requests, so a separate session storage is not required.

tags: #interview

@DataScienceQ
Please open Telegram to view this post
VIEW IN TELEGRAM