Forwarded from Data Science Jupyter Notebooks
π₯ Trending Repository: awesome-system-design-resources
π Description: Learn System Design concepts and prepare for interviews using free resources.
π Repository URL: https://github.com/ashishps1/awesome-system-design-resources
π Website: https://blog.algomaster.io
π Readme: https://github.com/ashishps1/awesome-system-design-resources#readme
π Statistics:
π Stars: 26.9K stars
π Watchers: 361
π΄ Forks: 6.3K forks
π» Programming Languages: Java - Python
π·οΈ Related Topics:
==================================
π§ By: https://t.me/DataScienceM
π Description: Learn System Design concepts and prepare for interviews using free resources.
π Repository URL: https://github.com/ashishps1/awesome-system-design-resources
π Website: https://blog.algomaster.io
π Readme: https://github.com/ashishps1/awesome-system-design-resources#readme
π Statistics:
π Stars: 26.9K stars
π Watchers: 361
π΄ Forks: 6.3K forks
π» Programming Languages: Java - Python
π·οΈ Related Topics:
#computer_science #distributed_systems #awesome #backend #scalability #interview #interview_questions #system_design #hld #high_level_design
==================================
π§ By: https://t.me/DataScienceM
β€2π2
Forwarded from Data Science Jupyter Notebooks
π₯ Trending Repository: best-of-ml-python
π Description: π A ranked list of awesome machine learning Python libraries. Updated weekly.
π Repository URL: https://github.com/lukasmasuch/best-of-ml-python
π Website: https://ml-python.best-of.org
π Readme: https://github.com/lukasmasuch/best-of-ml-python#readme
π Statistics:
π Stars: 22.3K stars
π Watchers: 444
π΄ Forks: 3K forks
π» Programming Languages: Not available
π·οΈ Related Topics:
==================================
π§ By: https://t.me/DataScienceM
π Description: π A ranked list of awesome machine learning Python libraries. Updated weekly.
π Repository URL: https://github.com/lukasmasuch/best-of-ml-python
π Website: https://ml-python.best-of.org
π Readme: https://github.com/lukasmasuch/best-of-ml-python#readme
π Statistics:
π Stars: 22.3K stars
π Watchers: 444
π΄ Forks: 3K forks
π» Programming Languages: Not available
π·οΈ Related Topics:
#python #nlp #data_science #machine_learning #deep_learning #tensorflow #scikit_learn #keras #ml #data_visualization #pytorch #transformer #data_analysis #gpt #automl #jax #data_visualizations #gpt_3 #chatgpt
==================================
π§ By: https://t.me/DataScienceM
β€6
In Python, enhanced
#python #forloops #enumerate #bestpractices
βοΈ @DataScience4
for loops with enumerate() provide both the index and value of items in an iterable, making it ideal for tasks needing positional awareness without manual counters. This is more Pythonic and efficient than using range(len()) for list traversals.fruits = ['apple', 'banana', 'cherry']
for index, fruit in enumerate(fruits):
print(f"{index}: {fruit}")
# Output:
# 0: apple
# 1: banana
# 2: cherry
# With start offset:
for index, fruit in enumerate(fruits, start=1):
print(f"{index}: {fruit}")
# 1: apple
# 2: banana
# 3: cherry
#python #forloops #enumerate #bestpractices
Please open Telegram to view this post
VIEW IN TELEGRAM
β€2π2
In Python, lists are versatile mutable sequences with built-in methods for adding, removing, searching, sorting, and moreβcovering all common scenarios like dynamic data manipulation, queues, or stacks. Below is a complete breakdown of all list methods, each with syntax, an example, and output, plus key built-in functions for comprehensive use.
π Adding Elements
β¦ append(x): Adds a single element to the end.
β¦ extend(iterable): Adds all elements from an iterable to the end.
β¦ insert(i, x): Inserts x at index i (shifts elements right).
π Removing Elements
β¦ remove(x): Removes the first occurrence of x (raises ValueError if not found).
β¦ pop(i=-1): Removes and returns the element at index i (default: last).
β¦ clear(): Removes all elements.
π Searching and Counting
β¦ count(x): Returns the number of occurrences of x.
β¦ index(x[, start[, end]]): Returns the lowest index of x in the slice (raises ValueError if not found).
π Ordering and Copying
β¦ sort(key=None, reverse=False): Sorts the list in place (ascending by default; stable sort).
β¦ reverse(): Reverses the elements in place.
β¦ copy(): Returns a shallow copy of the list.
π Built-in Functions for Lists (Common Cases)
β¦ len(lst): Returns the number of elements.
β¦ min(lst): Returns the smallest element (raises ValueError if empty).
β¦ max(lst): Returns the largest element.
β¦ sum(lst[, start=0]): Sums the elements (start adds an offset).
β¦ sorted(lst, key=None, reverse=False): Returns a new sorted list (non-destructive).
These cover all standard operations (O(1) for append/pop from end, O(n) for most others). Use slicing
#python #lists #datastructures #methods #examples #programming
β @DataScience4
π Adding Elements
β¦ append(x): Adds a single element to the end.
lst = [1, 2]
lst.append(3)
print(lst) # Output: [1, 2, 3]
β¦ extend(iterable): Adds all elements from an iterable to the end.
lst = [1, 2]
lst.extend([3, 4])
print(lst) # Output: [1, 2, 3, 4]
β¦ insert(i, x): Inserts x at index i (shifts elements right).
lst = [1, 3]
lst.insert(1, 2)
print(lst) # Output: [1, 2, 3]
π Removing Elements
β¦ remove(x): Removes the first occurrence of x (raises ValueError if not found).
lst = [1, 2, 2]
lst.remove(2)
print(lst) # Output: [1, 2]
β¦ pop(i=-1): Removes and returns the element at index i (default: last).
lst = [1, 2, 3]
item = lst.pop(1)
print(item, lst) # Output: 2 [1, 3]
β¦ clear(): Removes all elements.
lst = [1, 2, 3]
lst.clear()
print(lst) # Output: []
π Searching and Counting
β¦ count(x): Returns the number of occurrences of x.
lst = [1, 2, 2, 3]
print(lst.count(2)) # Output: 2
β¦ index(x[, start[, end]]): Returns the lowest index of x in the slice (raises ValueError if not found).
lst = [1, 2, 3, 2]
print(lst.index(2)) # Output: 1
π Ordering and Copying
β¦ sort(key=None, reverse=False): Sorts the list in place (ascending by default; stable sort).
lst = [3, 1, 2]
lst.sort()
print(lst) # Output: [1, 2, 3]
β¦ reverse(): Reverses the elements in place.
lst = [1, 2, 3]
lst.reverse()
print(lst) # Output: [3, 2, 1]
β¦ copy(): Returns a shallow copy of the list.
lst = [1, 2]
new_lst = lst.copy()
print(new_lst) # Output: [1, 2]
π Built-in Functions for Lists (Common Cases)
β¦ len(lst): Returns the number of elements.
lst = [1, 2, 3]
print(len(lst)) # Output: 3
β¦ min(lst): Returns the smallest element (raises ValueError if empty).
lst = [3, 1, 2]
print(min(lst)) # Output: 1
β¦ max(lst): Returns the largest element.
lst = [3, 1, 2]
print(max(lst)) # Output: 3
β¦ sum(lst[, start=0]): Sums the elements (start adds an offset).
lst = [1, 2, 3]
print(sum(lst)) # Output: 6
β¦ sorted(lst, key=None, reverse=False): Returns a new sorted list (non-destructive).
lst = [3, 1, 2]
print(sorted(lst)) # Output: [1, 2, 3]
These cover all standard operations (O(1) for append/pop from end, O(n) for most others). Use slicing
lst[start:end:step] for advanced extraction, like lst[1:3] outputs ``.#python #lists #datastructures #methods #examples #programming
Please open Telegram to view this post
VIEW IN TELEGRAM
β€11π7π2
In Python, handling CSV files is straightforward using the built-in
#python #csv #pandas #datahandling #fileio #interviewtips
π @DataScience4
csv module for reading and writing tabular data, or pandas for advanced analysisβessential for data processing tasks like importing/exporting datasets in interviews.# Reading CSV with csv module (basic)
import csv
with open('data.csv', 'r') as file:
reader = csv.reader(file)
data = list(reader) # data = [['Name', 'Age'], ['Alice', '30'], ['Bob', '25']]
# Writing CSV with csv module
import csv
with open('output.csv', 'w', newline='') as file:
writer = csv.writer(file)
writer.writerow(['Name', 'Age']) # Header
writer.writerows([['Alice', 30], ['Bob', 25]]) # Data rows
# Advanced: Reading with pandas (handles headers, missing values)
import pandas as pd
df = pd.read_csv('data.csv') # df = DataFrame with columns 'Name', 'Age'
print(df.head()) # Output: First 5 rows preview
# Writing with pandas
df.to_csv('output.csv', index=False) # Saves without row indices
#python #csv #pandas #datahandling #fileio #interviewtips
π @DataScience4
β€3π2
The course gathers up-to-date information on #Python programming and creating advanced AI assistants based on it.
β’ Content: The course includes 9 lectures, supplemented with video materials, detailed presentations, and code examples. Learning to develop AI agents is accessible even for coding beginners.
β’ Topics: The lectures cover topics such as #RAG (Retrieval-Augmented Generation), embeddings, #agents, and the #MCP protocol.
The perfect weekend plan is to dive deep into #AI!
https://github.com/orgs/azure-ai-foundry/discussions/166
https://t.me/CodeProgrammer
Please open Telegram to view this post
VIEW IN TELEGRAM
π6β€1π₯1