🚀 Day-68 of #100DaysOfCode 📊 NumPy Practice – Chessboard Pattern Today I created a chessboard pattern using NumPy. 🔹 Concepts Practiced ✔ Matrix creation using np.zeros() ✔ Advanced array slicing ✔ Pattern generation using NumPy 🔹 Key Learning NumPy slicing allows creating complex patterns efficiently without loops. This type of matrix manipulation is useful in image processing and grid-based computations. Building deeper understanding of NumPy array operations 🚀 #Python #NumPy #MatrixManipulation #PythonProgramming #100DaysOfCode #LearnPython
NumPy Chessboard Pattern with Matrix Slicing
More Relevant Posts
-
LeetCode | Count Good Numbers 🔢 🔹 Concept: Combinatorics + Modular Exponentiation 🔹 Idea: Even positions → 5 choices, Odd → 4 choices 🔹 Time Complexity: O(log n) Use math + fast power to handle large inputs efficiently 💡 #LeetCode #DSA #Math #ModularArithmetic #Python #CodingJourney
To view or add a comment, sign in
-
🔁 Rotate Matrix by 90° — Clean In-Place Trick! Solved the classic Rotate Matrix by 90° problem using a simple observation: • Transpose the matrix • Reverse it column-wise This approach rotates the matrix in-place with O(n²) time and O(1) extra space. Sometimes the best solutions come from simple transformations on the matrix. 🚀 #DSA #ProblemSolving #Python #CodingInterview #Algorithms
To view or add a comment, sign in
-
-
📌 Problem: Reverse Vowels of a String 💡 Approach: Used the two-pointer technique to reverse only the vowels in the string. Initialize one pointer at the beginning and one at the end. Move both pointers inward until vowels are found, then swap them. Continue this process until both pointers meet. ⚙️ Key Insight: Use a set for fast vowel lookup (O(1)) Two-pointer approach avoids extra space for storing vowels separately ⏱️ Time Complexity: O(n) 📦 Space Complexity: O(n) (due to string → list conversion) 📚 What I learned: Efficient string manipulation using two pointers Optimizing lookups with hash sets #LeetCode #DSA #Algorithms #Coding #ProblemSolving #Python #TwoPointers #InterviewPreparation #CodingJourney
To view or add a comment, sign in
-
📌 Problem: Merge Strings Alternately 💡 Approach: Used a simple two-pointer / iteration technique to merge both strings character by character. First, iterate up to the minimum length of both strings and append alternately. Then, append the remaining characters from the longer string. ⚙️ Key Insight: Handle unequal string lengths separately Avoid index out-of-bounds by iterating till min(len(word1), len(word2)) ⏱️ Time Complexity: O(n + m) 📦 Space Complexity: O(n + m) merg 📚 What I learned: String manipulation efficiently Handling edge cases when lengths differ #LeetCode #DSA #Coding #ProblemSolving #Python #SoftwareDevelopment #CodingJourney
To view or add a comment, sign in
-
Merge Intervals (LeetCode 56) - Medium Key Learnings: Sorting: By sorting intervals based on their start times, we can process them in a single pass (O(N)). Overlap Logic: Comparing the current_start with the previous_end time is the secret sauce to identifying overlaps. Space-Time Tradeoff: Sorting takes O(N log N) time, and we use O(N) space to store the results. #CodingJourney #LeetCode #Blind75 #SDEPreparation #SoftwareEngineering #Python #DataStructures
To view or add a comment, sign in
-
-
I built my own simple RAG (Retrieval-Augmented Generation) system using React, Flask, and Python: ✨ Features: A landing page where I added a block of information. That information is saved as a PDF and extracted using PyMuPDF. Users can ask questions, and the system retrieves answers using Chroma DB vectorization and chunking. 📹 Check out the demo video below 👇 This project was a great hands-on way to understand RAG workflows, vector databases, and PDF text extraction. #Python #ReactJS #Flask #RAG #ChromaDB #PyMuPDF #AI #WebDevelopment
To view or add a comment, sign in
-
Day 81 Heap patterns are starting to feel intuitive now. #Day81 🧩 973. K Closest Points to Origin Key idea: • Use a min heap • Calculate distance using squared values (no sqrt needed) • Push points into heap based on distance • Pop k closest elements What I liked about this problem: A small optimization (avoiding sqrt) makes it simpler and faster. These small tricks make a big difference. Consistency is turning patterns into instincts. #LeetCode #DSA #Python #Heap #PriorityQueue #LearningInPublic #Consistency
To view or add a comment, sign in
-
-
Inside the exact prompt sent to Claude Opus 4.6: “Can you use any resources you want, including Python, to create a short ‘YouTube Poop’ video and render it with FFmpeg? Add a personal touch, it should capture what it feels like to be an LLM.” Credit: josephdviviano on X Want to learn more about AI? 👉🏻 https://shorturl.at/idMUk
To view or add a comment, sign in
-
I got tired of writing Cypher by hand so I built something to do it for me. You paste in raw text → it builds a knowledge graph. You ask a question in plain English → it writes the Cypher, runs it, and gives you the answer. The part that surprised me most was how well schema inference works. After the text-to-graph step, the schema is detected automatically and fed into the query pipeline — so both sides stay in sync without any hardcoding. Also added a Cypher validation layer because watching bad queries crash the DB got old fast. Stack: Python, Memgraph #python #memgraph #graphdb #LLM #mcp Short demo in the video 👇
To view or add a comment, sign in
-
We just finished the first YouTube series on py-dss-toolkit. If you use OpenDSS with Python, this series shows practical ways to explore models, extract results, and visualize studies more efficiently. You can use py-dss-toolkit to: ✅ work with OpenDSS data in a more structured way 📊 move results into pandas DataFrames for analysis 💻 create visual workflows, including in Google Colab I’d love your feedback: what should the next series focus on? 🔎 Plotting? 🔎 QSTS? 🔎 Model exploration? 🔎 Automation? #OpenDSS #Python #PowerSystems
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development