# Django ORM Comparison - Know both frameworks
# Django model (contrast with SQLAlchemy)
from django.db import models
class Department(models.Model):
name = models.CharField(max_length=50)
class Employee(models.Model):
name = models.CharField(max_length=100)
email = models.EmailField(unique=True)
department = models.ForeignKey(Department, on_delete=models.CASCADE)
# Django query (similar but different syntax)
Employee.objects.filter(department__name="HR").select_related('department')
# Async ORM - Modern Python requirement
# Requires SQLAlchemy 1.4+ and asyncpg
from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession
async_engine = create_async_engine(
"postgresql+asyncpg://user:pass@localhost/db",
echo=True,
)
async_session = AsyncSession(async_engine)
async with async_session.begin():
result = await async_session.execute(
select(Employee).where(Employee.name == "Alice")
)
employee = result.scalar_one()
# Testing Strategies - Interview differentiator
from unittest import mock
# Mock database for unit tests
with mock.patch('sqlalchemy.create_engine') as mock_engine:
mock_conn = mock.MagicMock()
mock_engine.return_value.connect.return_value = mock_conn
# Test your ORM-dependent code
create_employee("Test", "test@company.com")
mock_conn.execute.assert_called()
# Production Monitoring - Track slow queries
from sqlalchemy import event
@event.listens_for(engine, "before_cursor_execute")
def before_cursor(conn, cursor, statement, params, context, executemany):
conn.info.setdefault('query_start_time', []).append(time.time())
@event.listens_for(engine, "after_cursor_execute")
def after_cursor(conn, cursor, statement, params, context, executemany):
total = time.time() - conn.info['query_start_time'].pop(-1)
if total > 0.1: # Log slow queries
print(f"SLOW QUERY ({total:.2f}s): {statement}")
# Interview Power Move: Implement caching layer
from functools import lru_cache
class CachedEmployeeRepository(EmployeeRepository):
@lru_cache(maxsize=100)
def get_by_id(self, employee_id):
return super().get_by_id(employee_id)
def invalidate_cache(self, employee_id):
self.get_by_id.cache_clear()
# Reduces database hits by 70% in read-heavy applications
# Pro Tip: Schema versioning in CI/CD pipelines
# Sample .gitlab-ci.yml snippet
deploy_db:
stage: deploy
script:
- alembic upgrade head
- pytest tests/db_tests.py # Verify schema compatibility
only:
- main
# Real-World Case Study: E-commerce inventory system
class Product(Base):
__tablename__ = 'products'
id = Column(Integer, primary_key=True)
sku = Column(String(20), unique=True)
stock = Column(Integer, default=0)
# Atomic stock update (prevents race conditions)
def decrement_stock(self, quantity, session):
result = session.query(Product).filter(
Product.id == self.id,
Product.stock >= quantity
).update({"stock": Product.stock - quantity})
if not result:
raise ValueError("Insufficient stock")
# Usage during checkout
product.decrement_stock(2, session)
By: @DATASCIENCE4 π
#Python #ORM #SQLAlchemy #Django #Database #BackendDevelopment #CodingInterview #WebDevelopment #TechJobs #SystemDesign #SoftwareEngineering #DataEngineering #CareerGrowth #APIs #Microservices #DatabaseDesign #TechTips #DeveloperTools #Programming #CareerTips
β€3
In Python, merging PDFs is a critical skill for document automationβessential for backend roles, data pipelines, and interview scenarios where file processing efficiency matters! π
# Basic Merging - The absolute foundation
from PyPDF2 import PdfMerger
merger = PdfMerger()
pdf_files = ["report1.pdf", "report2.pdf", "summary.pdf"]
for file in pdf_files:
merger.append(file)
merger.write("combined_report.pdf")
merger.close()
# Merge Specific Pages - Precision control
merger = PdfMerger()
merger.append("full_document.pdf", pages=(0, 3)) # First 3 pages
merger.append("appendix.pdf", pages=(2, 5)) # Pages 3-5 (0-indexed)
merger.write("custom_merge.pdf")
# Insert Pages at Position - Structured document assembly
merger = PdfMerger()
merger.append("cover.pdf")
merger.merge(1, "content.pdf") # Insert at index 1
merger.merge(2, "charts.pdf", pages=(4, 6)) # Insert specific pages
merger.write("structured_report.pdf")
# Handling Encrypted PDFs - Production reality
merger = PdfMerger()
merger.append("secure_doc.pdf", password="secret123")
merger.write("decrypted_merge.pdf")
# Bookmarks for Navigation - Professional touch
merger = PdfMerger()
merger.append("chapter1.pdf", outline_item="Introduction")
merger.append("chapter2.pdf", outline_item="Methodology")
merger.append("chapter3.pdf", outline_item="Results")
merger.write("bookmarked_report.pdf")
# Memory Optimization - Critical for large files
from PyPDF2 import PdfReader
merger = PdfMerger()
for file in ["large1.pdf", "large2.pdf"]:
reader = PdfReader(file)
merger.append(reader)
del reader # Immediate memory cleanup
merger.write("optimized_merge.pdf")
# Batch Processing - Real-world automation
import os
from PyPDF2 import PdfMerger
def merge_pdfs_in_folder(folder, output="combined.pdf"):
merger = PdfMerger()
for file in sorted(os.listdir(folder)):
if file.endswith(".pdf"):
merger.append(f"{folder}/{file}")
merger.write(output)
merger.close()
merge_pdfs_in_folder("quarterly_reports", "Q3_results.pdf")
# Error Handling - Production-grade code
from PyPDF2 import PdfMerger, PdfReadError
def safe_merge(inputs, output):
merger = PdfMerger()
try:
for file in inputs:
try:
merger.append(file)
except PdfReadError:
print(f"Skipping corrupted: {file}")
finally:
merger.write(output)
merger.close()
safe_merge(["valid.pdf", "corrupted.pdf", "valid2.pdf"], "partial_merge.pdf")
# Metadata Preservation - Legal/compliance requirement
merger = PdfMerger()
merger.append("source.pdf")
# Copy metadata from first document
meta = merger.metadata
merger.add_metadata({
**meta,
"/Producer": "Python Automation v3.0",
"/CustomField": "CONFIDENTIAL"
})
merger.write("metadata_enhanced.pdf")
# Encryption of Output - Security interview question
merger = PdfMerger()
merger.append("sensitive_data.pdf")
merger.encrypt(
user_pwd="view_only",
owner_pwd="full_access",
use_128bit=True
)
merger.write("encrypted_report.pdf")
# Page Rotation - Fix orientation issues
merger = PdfMerger()
merger.append("landscape_charts.pdf", pages=(0, 2), import_outline=False)
merger.merge(0, "portrait_text.pdf") # Rotate during merge
merger.write("standardized_orientation.pdf")
# Watermarking During Merge - Branding automation
from PyPDF2 import PdfWriter, PdfReader
def add_watermark(input_pdf, watermark_pdf, output_pdf):
watermark = PdfReader(watermark_pdf).pages[0]
output = PdfWriter()
with open(input_pdf, "rb") as f:
reader = PdfReader(f)
for page in reader.pages:
page.merge_page(watermark)
output.add_page(page)
with open(output_pdf, "wb") as f:
output.write(f)
# Apply during merge process
add_watermark("report.pdf", "watermark.pdf", "branded.pdf")
# Async Merging - Modern Python requirement
import asyncio
from PyPDF2 import PdfMerger
async def async_merge(files, output):
merger = PdfMerger()
for file in files:
await asyncio.to_thread(merger.append, file)
merger.write(output)
# Usage in async application
asyncio.run(async_merge(["doc1.pdf", "doc2.pdf"], "async_merge.pdf"))
# CLI Tool Implementation - Interview favorite
import sys
from PyPDF2 import PdfMerger
def main():
if len(sys.argv) < 3:
print("Usage: pdfmerge output.pdf input1.pdf input2.pdf ...")
sys.exit(1)
merger = PdfMerger()
for pdf in sys.argv[2:]:
merger.append(pdf)
merger.write(sys.argv[1])
if __name__ == "__main__":
main()
# Run via: python pdfmerge.py final.pdf *.pdf
# Performance Benchmarking - Optimization proof
import time
from PyPDF2 import PdfMerger
start = time.time()
merger = PdfMerger()
for _ in range(50):
merger.append("sample.pdf")
merger.write("50x_merge.pdf")
print(f"Time: {time.time()-start:.2f}s") # Baseline for optimization
# Memory-Mapped Processing - Handle 1GB+ files
import mmap
from PyPDF2 import PdfMerger
def memmap_merge(large_files, output):
merger = PdfMerger()
for file in large_files:
with open(file, "rb") as f:
mmapped = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
merger.append(mmapped)
merger.write(output)
memmap_merge(["huge1.pdf", "huge2.pdf"], "giant_merge.pdf")
# PDF/A Compliance - Archival standards
merger = PdfMerger()
merger.append("archive_source.pdf")
# Convert to PDF/A-1b standard
merger.add_metadata({
"/GTS_PDFXVersion": "PDF/A-1b",
"/GTS_PDFXConformance": "B"
})
merger.write("compliant_archive.pdf")
# Split and Re-Merge Workflow - Advanced manipulation
from PyPDF2 import PdfReader, PdfWriter
def split_and_merge(source, chunk_size=10):
reader = PdfReader(source)
chunks = [reader.pages[i:i+chunk_size] for i in range(0, len(reader.pages), chunk_size)]
for i, chunk in enumerate(chunks):
writer = PdfWriter()
for page in chunk:
writer.add_page(page)
with open(f"chunk_{i}.pdf", "wb") as f:
writer.write(f)
# Now merge chunks with new order
merger = PdfMerger()
for i in reversed(range(len(chunks))):
merger.append(f"chunk_{i}.pdf")
merger.write("reversed_document.pdf")
split_and_merge("master.pdf")
# Cloud Integration - Production pipeline example
from google.cloud import storage
from PyPDF2 import PdfMerger
def merge_from_gcs(bucket_name, prefix, output_path):
storage_client = storage.Client()
bucket = storage_client.bucket(bucket_name)
blobs = bucket.list_blobs(prefix=prefix)
merger = PdfMerger()
for blob in blobs:
if blob.name.endswith(".pdf"):
temp_path = f"/tmp/{blob.name.split('/')[-1]}"
blob.download_to_filename(temp_path)
merger.append(temp_path)
merger.write(output_path)
merger.close()
merge_from_gcs("client-reports", "Q3/", "/tmp/merged.pdf")
# Dockerized Microservice - Deployment pattern
# Dockerfile snippet:
# FROM python:3.10-slim
# RUN pip install pypdf
# COPY merge_service.py /app/
# CMD ["python", "/app/merge_service.py"]
# merge_service.py
from http.server import HTTPServer, BaseHTTPRequestHandler
from PyPDF2 import PdfMerger
import json
class MergeHandler(BaseHTTPRequestHandler):
def do_POST(self):
content_len = int(self.headers.get('Content-Length'))
body = json.loads(self.rfile.read(content_len))
merger = PdfMerger()
for url in body['inputs']:
# Download from URLs (simplified)
merger.append(download_pdf(url))
merger.write("/output/merged.pdf")
self.send_response(200)
self.end_headers()
HTTPServer(('', 8000), MergeHandler).serve_forever()
β€2
# Interview Power Move: Parallel Merging
from concurrent.futures import ThreadPoolExecutor
from PyPDF2 import PdfMerger
def parallel_merge(pdf_list, output, max_workers=4):
chunks = [pdf_list[i::max_workers] for i in range(max_workers)]
temp_files = []
def merge_chunk(chunk, idx):
temp = f"temp_{idx}.pdf"
merger = PdfMerger()
for pdf in chunk:
merger.append(pdf)
merger.write(temp)
return temp
with ThreadPoolExecutor() as executor:
temp_files = list(executor.map(merge_chunk, chunks, range(max_workers)))
# Final merge of chunks
final_merger = PdfMerger()
for temp in temp_files:
final_merger.append(temp)
final_merger.write(output)
parallel_merge(["doc1.pdf", "doc2.pdf", ...], "parallel_merge.pdf")
# Pro Tip: Validate PDFs before merging
from PyPDF2 import PdfReader
def is_valid_pdf(path):
try:
with open(path, "rb") as f:
reader = PdfReader(f)
return len(reader.pages) > 0
except:
return False
valid_pdfs = [f for f in pdf_files if is_valid_pdf(f)]
merger.append(valid_pdfs) # Only merge valid files
# Real-World Case Study: Invoice Processing Pipeline
import glob
from PyPDF2 import PdfMerger
def process_monthly_invoices():
# 1. Download invoices from SFTP
download_invoices("sftp://vendor.com/invoices/*.pdf")
# 2. Validate and sort
invoices = sorted(
[f for f in glob.glob("invoices/*.pdf") if is_valid_pdf(f)],
key=lambda x: extract_invoice_date(x)
)
# 3. Merge with cover page
merger = PdfMerger()
merger.append("cover_template.pdf")
for inv in invoices:
merger.append(inv, outline_item=get_client_name(inv))
# 4. Add metadata and encrypt
merger.add_metadata({"/InvoiceCount": str(len(invoices))})
merger.encrypt(owner_pwd="finance_team_2023")
merger.write(f"Q3_Invoices_{datetime.now().strftime('%Y%m')}.pdf")
# 5. Upload to secure storage
upload_to_s3("secure-bucket/processed/", "Q3_Invoices.pdf")
process_monthly_invoices()
By: https://t.me/DataScience4
#Python #PDFProcessing #DocumentAutomation #PyPDF2 #CodingInterview #BackendDevelopment #FileHandling #DataEngineering #TechJobs #Programming #SystemDesign #DeveloperTips #CareerGrowth #CloudComputing #Docker #Microservices #Productivity #TechTips #Python3 #SoftwareEngineering
Telegram
Code With Python
This channel delivers clear, practical content for developers, covering Python, Django, Data Structures, Algorithms, and DSA β perfect for learning, coding, and mastering key programming skills.
Admin: @HusseinSheikho || @Hussein_Sheikho
Admin: @HusseinSheikho || @Hussein_Sheikho
Forwarded from Machine Learning with Python
π©π»βπ» These top-notch resources can take your #Python skills several levels higher. The best part is that they are all completely free!
Please open Telegram to view this post
VIEW IN TELEGRAM
β€2
β¨ Topic: Advanced Python Tutorials β¨
π Explore advanced Python tutorials to master the Python programming language. Dive deeper into Python and enhance your coding skills. These tutorials will equip you with the advanced skills necessary for professional Python development.
π·οΈ #96_resources
π Explore advanced Python tutorials to master the Python programming language. Dive deeper into Python and enhance your coding skills. These tutorials will equip you with the advanced skills necessary for professional Python development.
π·οΈ #96_resources
β¨ Topic: Intermediate Python Tutorials β¨
π Dig into our intermediate-level tutorials teaching new Python concepts. Expand your Python knowledge after covering the basics. These tutorials will prepare you for more complex Python projects and challenges.
π·οΈ #696_resources
π Dig into our intermediate-level tutorials teaching new Python concepts. Expand your Python knowledge after covering the basics. These tutorials will prepare you for more complex Python projects and challenges.
π·οΈ #696_resources
β€1
Django Tip:
Before deployment, run
In our example, the system checked the project and found several issues:
π @DataScience4
Before deployment, run
python manage.py check --deploy to catch critical configuration errors, such as missing ALLOWED_HOSTS. This command helps ensure the app is securely configured for production.In our example, the system checked the project and found several issues:
πΈ (security.W004) SECURE_HSTS_SECONDS is not set.
If your site runs only over HTTPS, you should enable HSTS so browsers always use a secure connection. But configure this carefully, as incorrect use can cause serious problems.πΈ (security.W008) SECURE_SSL_REDIRECT is not set to True.
If all traffic should go through HTTPS, set SECURE_SSL_REDIRECT = True or configure a redirect via a load balancer/proxy.πΈ (security.W009) SECRET_KEY is shorter than 50 characters, contains fewer than 5 unique characters, or starts with 'django-insecure-'.
This means the key was generated by Django by default. Create a new random long key, otherwise some built-in security mechanisms can be bypassed.πΈ (security.W012) SESSION_COOKIE_SECURE is not set to True.
Without this setting, session cookies can be intercepted over regular HTTP traffic.πΈ (security.W016) 'django.middleware.csrf.CsrfViewMiddleware' is in MIDDLEWARE, but CSRF_COOKIE_SECURE is not enabled.
Set CSRF_COOKIE_SECURE = True to protect the CSRF token from leaks over unencrypted connections.πΈ (security.W018) DEBUG must not be True in production.
Turn off debugging before deployment.πΈ (security.W020) ALLOWED_HOSTS must not be empty.
Add domains to the list from which the app is allowed to be accessed.
Please open Telegram to view this post
VIEW IN TELEGRAM
β€1
β¨ self-attention | AI Coding Glossary β¨
π A mechanism that compares each token to all others and mixes their information using similarity-based weights.
π·οΈ #Python
π A mechanism that compares each token to all others and mixes their information using similarity-based weights.
π·οΈ #Python
Forwarded from Machine Learning
In Python, building AI-powered Telegram bots unlocks massive potential for image generation, processing, and automationβmaster this to create viral tools and ace full-stack interviews! π€
Learn more: https://hackmd.io/@husseinsheikho/building-AI-powered-Telegram-bots
https://t.me/DataScienceMπ¦Ύ
# Basic Bot Setup - The foundation (PTB v20+ Async)
from telegram.ext import Application, CommandHandler, MessageHandler, filters
async def start(update, context):
await update.message.reply_text(
"β¨ AI Image Bot Active!\n"
"/generate - Create images from text\n"
"/enhance - Improve photo quality\n"
"/help - Full command list"
)
app = Application.builder().token("YOUR_BOT_TOKEN").build()
app.add_handler(CommandHandler("start", start))
app.run_polling()
# Image Generation - DALL-E Integration (OpenAI)
import openai
from telegram.ext import ContextTypes
openai.api_key = os.getenv("OPENAI_API_KEY")
async def generate(update: Update, context: ContextTypes.DEFAULT_TYPE):
if not context.args:
await update.message.reply_text("β Usage: /generate cute robot astronaut")
return
prompt = " ".join(context.args)
try:
response = openai.Image.create(
prompt=prompt,
n=1,
size="1024x1024"
)
await update.message.reply_photo(
photo=response['data'][0]['url'],
caption=f"π¨ Generated: *{prompt}*",
parse_mode="Markdown"
)
except Exception as e:
await update.message.reply_text(f"π₯ Error: {str(e)}")
app.add_handler(CommandHandler("generate", generate))
Learn more: https://hackmd.io/@husseinsheikho/building-AI-powered-Telegram-bots
#Python #TelegramBot #AI #ImageGeneration #StableDiffusion #OpenAI #MachineLearning #CodingInterview #FullStack #Chatbots #DeepLearning #ComputerVision #Programming #TechJobs #DeveloperTips #CareerGrowth #CloudComputing #Docker #APIs #Python3 #Productivity #TechTips
https://t.me/DataScienceM
Please open Telegram to view this post
VIEW IN TELEGRAM
β¨ fine-tuning | AI Coding Glossary β¨
π The process of adapting a pre-trained model to a new task or domain.
π·οΈ #Python
π The process of adapting a pre-trained model to a new task or domain.
π·οΈ #Python
β¨ Cohort-Based Live Python Courses β¨
π Learn Python live with Real Python's expert instructors. Join a small, interactive cohort to master Python fundamentals, deepen your skills, and build real projects with hands-on guidance and community support.
π·οΈ #Python
π Learn Python live with Real Python's expert instructors. Join a small, interactive cohort to master Python fundamentals, deepen your skills, and build real projects with hands-on guidance and community support.
π·οΈ #Python
π‘ Python: Converting Numbers to Human-Readable Words
Transforming numerical values into their word equivalents is crucial for various applications like financial reports, check writing, educational software, or enhancing accessibility. While complex to implement from scratch for all cases, Python's
Code explanation: This script uses the
#Python #TextProcessing #NumberToWords #num2words #DataManipulation
βββββββββββββββ
By: @DataScience4 β¨
Transforming numerical values into their word equivalents is crucial for various applications like financial reports, check writing, educational software, or enhancing accessibility. While complex to implement from scratch for all cases, Python's
num2words library provides a robust and easy solution. Install it with pip install num2words.from num2words import num2words
# Example 1: Basic integer
number1 = 123
words1 = num2words(number1)
print(f"'{number1}' in words: {words1}")
# Example 2: Larger integer
number2 = 543210
words2 = num2words(number2, lang='en') # Explicitly set language
print(f"'{number2}' in words: {words2}")
# Example 3: Decimal number
number3 = 100.75
words3 = num2words(number3)
print(f"'{number3}' in words: {words3}")
# Example 4: Negative number
number4 = -45
words4 = num2words(number4)
print(f"'{number4}' in words: {words4}")
# Example 5: Number for an ordinal form
number5 = 3
words5 = num2words(number5, to='ordinal')
print(f"Ordinal '{number5}' in words: {words5}")
Code explanation: This script uses the
num2words library to convert various integers, decimals, and negative numbers into their English word representations. It also demonstrates how to generate ordinal forms (third instead of three) and explicitly set the output language.#Python #TextProcessing #NumberToWords #num2words #DataManipulation
βββββββββββββββ
By: @DataScience4 β¨
π‘ Python Lists Cheatsheet: Essential Operations
This lesson provides a quick reference for common Python list operations. Lists are ordered, mutable collections of items, and mastering their use is fundamental for Python programming. This cheatsheet covers creation, access, modification, and utility methods.
Code explanation: This script demonstrates fundamental list operations in Python. It covers creating lists, accessing elements using indexing and slicing, modifying existing elements, adding new items with
#Python #Lists #DataStructures #Programming #Cheatsheet
βββββββββββββββ
By: @DataScience4β¨
This lesson provides a quick reference for common Python list operations. Lists are ordered, mutable collections of items, and mastering their use is fundamental for Python programming. This cheatsheet covers creation, access, modification, and utility methods.
# 1. List Creation
my_list = [1, "hello", 3.14, True]
empty_list = []
numbers = list(range(5)) # [0, 1, 2, 3, 4]
# 2. Accessing Elements (Indexing & Slicing)
first_element = my_list[0] # 1
last_element = my_list[-1] # True
sub_list = my_list[1:3] # ["hello", 3.14]
copy_all = my_list[:] # [1, "hello", 3.14, True]
# 3. Modifying Elements
my_list[1] = "world" # my_list is now [1, "world", 3.14, True]
# 4. Adding Elements
my_list.append(False) # [1, "world", 3.14, True, False]
my_list.insert(1, "new item") # [1, "new item", "world", 3.14, True, False]
another_list = [5, 6]
my_list.extend(another_list) # [1, "new item", "world", 3.14, True, False, 5, 6]
# 5. Removing Elements
removed_value = my_list.pop() # Removes and returns last item (6)
removed_at_index = my_list.pop(1) # Removes and returns "new item"
my_list.remove("world") # Removes the first occurrence of "world"
del my_list[0] # Deletes item at index 0 (1)
my_list.clear() # Removes all items, list becomes []
# Re-create for other examples
numbers = [3, 1, 4, 1, 5, 9, 2]
# 6. List Information
list_length = len(numbers) # 7
count_ones = numbers.count(1) # 2
index_of_five = numbers.index(5) # 4 (first occurrence)
is_present = 9 in numbers # True
is_not_present = 10 not in numbers # True
# 7. Sorting
numbers_sorted_asc = sorted(numbers) # Returns new list: [1, 1, 2, 3, 4, 5, 9]
numbers.sort(reverse=True) # Sorts in-place: [9, 5, 4, 3, 2, 1, 1]
# 8. Reversing
numbers.reverse() # Reverses in-place: [1, 1, 2, 3, 4, 5, 9]
# 9. Iteration
for item in numbers:
# print(item)
pass # Placeholder for loop body
# 10. List Comprehensions (Concise creation/transformation)
squares = [x**2 for x in range(5)] # [0, 1, 4, 9, 16]
even_numbers = [x for x in numbers if x % 2 == 0] # [2, 4]
Code explanation: This script demonstrates fundamental list operations in Python. It covers creating lists, accessing elements using indexing and slicing, modifying existing elements, adding new items with
append(), insert(), and extend(), and removing items using pop(), remove(), del, and clear(). It also shows how to get list information like length (len()), item counts (count()), and indices (index()), check for item existence (in), sort (sort(), sorted()), reverse (reverse()), and iterate through lists. Finally, it illustrates list comprehensions for concise list generation and filtering.#Python #Lists #DataStructures #Programming #Cheatsheet
βββββββββββββββ
By: @DataScience4
Please open Telegram to view this post
VIEW IN TELEGRAM
β€2
β¨ activation function | AI Coding Glossary β¨
π A nonlinear mapping applied to neuron inputs that enables neural networks to learn complex relationships.
π·οΈ #Python
π A nonlinear mapping applied to neuron inputs that enables neural networks to learn complex relationships.
π·οΈ #Python
π₯1
β¨ recurrent neural network (RNN) | AI Coding Glossary β¨
π A neural network that processes sequences by applying the same computation at each step.
π·οΈ #Python
π A neural network that processes sequences by applying the same computation at each step.
π·οΈ #Python
π₯1
Forwarded from Machine Learning with Python
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
β¨ prompt injection | AI Coding Glossary β¨
π An attack where adversarial text is crafted to steer a model or model-integrated app into ignoring its original instructions and performing unintended actions.
π·οΈ #Python
π An attack where adversarial text is crafted to steer a model or model-integrated app into ignoring its original instructions and performing unintended actions.
π·οΈ #Python
β¨ retrieval-augmented generation (RAG) | AI Coding Glossary β¨
π A technique that improves a modelβs outputs by retrieving relevant external documents at query time and feeding them into the model.
π·οΈ #Python
π A technique that improves a modelβs outputs by retrieving relevant external documents at query time and feeding them into the model.
π·οΈ #Python
β¨ Logging in Python β¨
π If you use Python's print() function to get information about the flow of your programs, logging is the natural next step. Create your first logs and curate them to grow with your projects.
π·οΈ #intermediate #best-practices #tools
π If you use Python's print() function to get information about the flow of your programs, logging is the natural next step. Create your first logs and curate them to grow with your projects.
π·οΈ #intermediate #best-practices #tools