Machine Learning with Python
68.3K subscribers
1.3K photos
95 videos
169 files
954 links
Learn Machine Learning with hands-on Python tutorials, real-world code examples, and clear explanations for researchers and developers.

Admin: @HusseinSheikho || @Hussein_Sheikho
Download Telegram
1. What will be the output of the following code?

def add_item(item, lst=None):
if lst is None:
lst = []
lst.append(item)
return lst

print(add_item(1))
print(add_item(2))


A. [1] then [2]
B. [1] then [1, 2]
C. [] then []
D. Raises TypeError
Correct answer: A.

2. What is printed by this code?

x = 10
def func():
print(x)
x = 5

func()


A. 10
B. 5
C. None
D. UnboundLocalError
Correct answer: D.

3. What is the result of executing this code?

a = [1, 2, 3]
b = a[:]
a.append(4)
print(b)


A. [1, 2, 3, 4]
B. [4]
C. [1, 2, 3]
D. []
Correct answer: C.

4. What does the following expression evaluate to?

bool("False")


A. False
B. True
C. Raises ValueError
D. None
Correct answer: B.

5. What will be the output?

print(type({}))


A. <class 'list'>
B. <class 'set'>
C. <class 'dict'>
D. <class 'tuple'>
Correct answer: C.

6. What is printed by this code?

x = (1, 2, [3])
x[2] += [4]
print(x)


A. (1, 2, [3])
B. (1, 2, [3, 4])
C. TypeError
D. AttributeError
Correct answer: C.

7. What does this code output?

print([i for i in range(3) if i])


A. [0, 1, 2]
B. [1, 2]
C. [0]
D. []
Correct answer: B.

8. What will be printed?

d = {"a": 1}
print(d.get("b", 2))


A. None
B. KeyError
C. 2
D. "b"
Correct answer: C.

9. What is the output?

print(1 in [1, 2], 1 is 1)


A. True True
B. True False
C. False True
D. False False
Correct answer: A.

10. What does this code produce?

def gen():
for i in range(2):
yield i

g = gen()
print(next(g), next(g))


A. 0 1
B. 1 2
C. 0 0
D. StopIteration
Correct answer: A.

11. What is printed?

print({x: x*x for x in range(2)})


A. {0, 1}
B. {0: 0, 1: 1}
C. [(0,0),(1,1)]
D. Error
Correct answer: B.

12. What is the result of this comparison?

print([] == [], [] is [])


A. True True
B. False False
C. True False
D. False True
Correct answer: C.

13. What will be printed?

def f():
try:
return "A"
finally:
print("B")

print(f())


A. A
B. B
C. B then A
D. A then B
Correct answer: C.

14. What does this code output?

x = [1, 2]
y = x
x = x + [3]
print(y)


A. [1, 2, 3]
B. [3]
C. [1, 2]
D. Error
Correct answer: C.

15. What is printed?

print(type(i for i in range(3)))


A. <class 'list'>
B. <class 'tuple'>
C. <class 'generator'>
D. <class 'range'>
Correct answer: C.
โค9๐Ÿ‘1
๐Ÿ”ฅ NEW YEAR 2026 โ€“ PREMIUM SCIENTIFIC PAPER WRITING OFFER ๐Ÿ”ฅ
Q1-Ready | Journal-Targeted | Publication-Focused

Serious researchers, PhD & MSc students, postdocs, universities, and funded startups only.

To start 2026 strong, weโ€™re offering a limited New Year scientific writing package designed for fast-track publication, not academic busywork.

๐ŸŽฏ What We Offer (End-of-Year Special):

โœ๏ธ Full Research Paper Writing โ€“ $400
(Q1 / Q2 journalโ€“ready)

Includes:
โœ… Journal-targeted manuscript (Elsevier / Springer / Wiley / IEEE / MDPI)
โœ… IMRAD structure (Introductionโ€“Methodsโ€“Resultsโ€“Discussion)
โœ… Strong problem formulation & novelty framing
โœ… Methodology written to reviewer standards
โœ… Professional academic English (native-level)
โœ… Plagiarism-free (Turnitin <10%)
โœ… Ready for immediate submission

๐Ÿ“Š Available Paper Types:

Original Research Articles

Review & Systematic Review

AI / Machine Learning Papers

Engineering & Medical Research

Health AI & Clinical Data Studies

Interdisciplinary & Applied Research

๐Ÿง  Optional Add-ons (if needed):

Journal selection & scope matching

Cover letter to editor

Reviewer response (after review)

Statistical validation & result polishing

Figure & table redesign (publication quality)

๐Ÿš€ Why This Is Different
We donโ€™t โ€œwrite generic papers.โ€
We engineer publishable research.

โœ”๏ธ Real novelty positioning
โœ”๏ธ Reviewer-proof logic
โœ”๏ธ Data-driven arguments
โœ”๏ธ Aligned with current 2025โ€“2026 journal expectations

Many of our papers are built on real-world datasets and are already aligned with Q1 journal standards.

โณ New Year Offer โ€“ Limited Time

Regular price: $1,500 โ€“ $3,000

New Year 2026 price: $400

Limited slots (quality > quantity)

๐ŸŽ“ Priority given to:

PhD / MSc students

Active researchers

Funded startups

Universities & labs

๐Ÿ“ฉ DM for details, samples & timelines
Contact:
@Omidyzd62

Start 2026 with a submitted paperโ€”not just a plan
โค6๐Ÿ”ฅ3
Machine Learning with Python pinned ยซ๐Ÿ”ฅ NEW YEAR 2026 โ€“ PREMIUM SCIENTIFIC PAPER WRITING OFFER ๐Ÿ”ฅ Q1-Ready | Journal-Targeted | Publication-Focused Serious researchers, PhD & MSc students, postdocs, universities, and funded startups only. To start 2026 strong, weโ€™re offering a limited New Yearโ€ฆยป
๐Ÿš€Stanford just completed a must-watch for anyone serious about AI:

๐ŸŽ“ โ€œ๐—–๐— ๐—˜ ๐Ÿฎ๐Ÿต๐Ÿฑ: ๐—ง๐—ฟ๐—ฎ๐—ป๐˜€๐—ณ๐—ผ๐—ฟ๐—บ๐—ฒ๐—ฟ๐˜€ & ๐—Ÿ๐—ฎ๐—ฟ๐—ด๐—ฒ ๐—Ÿ๐—ฎ๐—ป๐—ด๐˜‚๐—ฎ๐—ด๐—ฒ ๐— ๐—ผ๐—ฑ๐—ฒ๐—น๐˜€โ€ is now live entirely on YouTube and itโ€™s pure gold.

If youโ€™re building your AI career, stop scrolling.
This isnโ€™t another surface-level overview. Itโ€™s the clearest, most structured intro to LLMs you could follow, straight from the Stanford Autumn 2025 curriculum.

๐Ÿ“š ๐—ง๐—ผ๐—ฝ๐—ถ๐—ฐ๐˜€ ๐—ฐ๐—ผ๐˜ƒ๐—ฒ๐—ฟ๐—ฒ๐—ฑ ๐—ถ๐—ป๐—ฐ๐—น๐˜‚๐—ฑ๐—ฒ:
โ€ข How Transformers actually work (tokenization, attention, embeddings)
โ€ข Decoding strategies & MoEs
โ€ข LLM finetuning (LoRA, RLHF, supervised)
โ€ข Evaluation techniques (LLM-as-a-judge)
โ€ข Optimization tricks (RoPE, quantization, approximations)
โ€ข Reasoning & scaling
โ€ข Agentic workflows (RAG, tool calling)

๐Ÿง  My workflow: I usually take the transcripts, feed them into NotebookLM, and once Iโ€™ve done the lectures, I replay them during walks or commutes. That combo works wonders for retention.

๐ŸŽฅ Watch these now:

- Lecture 1: https://lnkd.in/dDER-qyp
- Lecture 2: https://lnkd.in/dk-tGUDm
- Lecture 3: https://lnkd.in/drAPdjJY
- Lecture 4: https://lnkd.in/e_RSgMz7
- Lecture 5: https://lnkd.in/eivMA9pe
- Lecture 6: https://lnkd.in/eYwwwMXn
- Lecture 7: https://lnkd.in/eKwkEDXV
- Lecture 8: https://lnkd.in/eEWvyfyK
- Lecture 9: https://lnkd.in/euiKRGaQ

๐Ÿ—“ Do yourself a favor for this 2026: block 2-3 hours per week / llectue and go through them.

If youโ€™re in AI โ€” whether building infra, agents, or apps โ€” this is the foundational course you donโ€™t want to miss.

Letโ€™s level up.
https://t.me/CodeProgrammer ๐Ÿ˜…
Please open Telegram to view this post
VIEW IN TELEGRAM
โค5๐Ÿ‘1
Forwarded from Code With Python
Automatic translator in Python!

We translate a text in a few lines using deep-translator. It supports dozens of languages: from English and Russian to Japanese and Arabic.

Install the library:
pip install deep-translator


Example of use:
from deep_translator import GoogleTranslator

text = "Hello, how are you?"
result = GoogleTranslator(source="ru", target="en").translate(text)

print("Original:", text)
print("Translation:", result)


Mass translation of a list:
texts = ["Hello", "What's your name?", "See you later"]
for t in texts:
    print("โ†’", GoogleTranslator(source="ru", target="es").translate(t))


๐Ÿ”ฅ We get a mini-Google Translate right in Python: you can embed it in a chatbot, use it in notes, or automate work with the API.

๐Ÿšช @DataScience4
Please open Telegram to view this post
VIEW IN TELEGRAM
โค11๐Ÿ”ฅ1
In scientific work, the most time is spent on reading articles, data, and reports.

On GitHub, there is a collection called Awesome AI for Science -ยปยปยป a catalog of AI tools for all stages of research.

Inside:

-ยป working with literature
-ยป data analysis
-ยป turning articles into posters
-ยป automating experiments
-ยป tools for biology, chemistry, physics, and other fields

GitHub: http://github.com/ai-boost/awesome-ai-for-science

The list includes Paper2Poster, MinerU, The AI Scientist, as well as articles, datasets, and frameworks.
In fact, this is a complete set of tools for AI support in scientific research.

๐Ÿ‘‰ https://t.me/CodeProgrammer
Please open Telegram to view this post
VIEW IN TELEGRAM
โค5๐Ÿ‘1๐ŸŽ‰1
Please open Telegram to view this post
VIEW IN TELEGRAM
โค5๐Ÿ‘3๐ŸŽ‰1