Day 30 of #100DaysOfPython 𝐔𝐩𝐠𝐫𝐚𝐝𝐞𝐝 𝐭𝐡𝐞 𝐏𝐚𝐬𝐬𝐰𝐨𝐫𝐝 𝐌𝐚𝐧𝐚𝐠𝐞𝐫 𝐀𝐩𝐩 𝐭𝐨𝐝𝐚𝐲. I moved from saving data in a text file to using JSON, which makes the data more structured and easier to manage. I also added a search feature to retrieve saved credentials. 𝐖𝐡𝐚𝐭 𝐈 𝐢𝐦𝐩𝐫𝐨𝐯𝐞𝐝: 𝑺𝒘𝒊𝒕𝒄𝒉𝒆𝒅 𝒕𝒐 𝑱𝑺𝑶𝑵 𝒇𝒐𝒓 𝒔𝒕𝒓𝒖𝒄𝒕𝒖𝒓𝒆𝒅 𝒅𝒂𝒕𝒂 𝒔𝒕𝒐𝒓𝒂𝒈𝒆 𝑰𝒎𝒑𝒍𝒆𝒎𝒆𝒏𝒕𝒆𝒅 𝒔𝒆𝒂𝒓𝒄𝒉 𝒇𝒖𝒏𝒄𝒕𝒊𝒐𝒏𝒂𝒍𝒊𝒕𝒚 𝒇𝒐𝒓 𝒔𝒂𝒗𝒆𝒅 𝒑𝒂𝒔𝒔𝒘𝒐𝒓𝒅𝒔 𝑯𝒂𝒏𝒅𝒍𝒆𝒅 𝒆𝒓𝒓𝒐𝒓𝒔 𝒖𝒔𝒊𝒏𝒈 𝒕𝒓𝒚/𝒆𝒙𝒄𝒆𝒑𝒕 (𝒎𝒊𝒔𝒔𝒊𝒏𝒈 𝒇𝒊𝒍𝒆, 𝒎𝒊𝒔𝒔𝒊𝒏𝒈 𝒅𝒂𝒕𝒂, 𝒆𝒎𝒑𝒕𝒚 𝑱𝑺𝑶𝑵) 𝑰𝒎𝒑𝒓𝒐𝒗𝒆𝒅 𝒐𝒗𝒆𝒓𝒂𝒍𝒍 𝒖𝒔𝒆𝒓 𝒆𝒙𝒑𝒆𝒓𝒊𝒆𝒏𝒄𝒆 𝒊𝒏 𝒕𝒉𝒆 𝑮𝑼𝑰 This version feels much closer to a real application. Managing data properly and handling edge cases made a big difference. Also a good reminder that writing code is one thing, but making it robust and user-friendly is another level. #100DaysOfCode #100DaysOfPython #Python #Tkinter #PasswordManager #JSON #ErrorHandling #PythonProjects #LearningToCode #CodingJourney #BuildInPublic
More Relevant Posts
-
🚀 Just shipped my latest Python project — a CLI-based Log Analyzer! Log debugging is one of those tasks that can eat up hours. I built a tool to make it faster and smarter. 🔍 What it does: Takes raw log files in multiple formats — plaintext, CSV, XML, and YAML — and transforms them into structured, actionable reports right in your terminal. 📊 The output includes: → KPI Summary (Total Events, Error Rate, Uptime Score) → Exception Analysis (SQL Timeouts, NullPointerExceptions, and more) → Intelligent Insights (e.g., detecting cascading failures across services) So instead of manually grepping through hundreds of lines like: [2026-04-03 10:16:12.003] [Thread-09] ERROR [com.store.Database] SQL State: 08001 - Connection Timeout ...you get a clean, parsed report that tells you exactly what went wrong and where. Building this taught me a lot about: ⚙️ Multi-format file parsing in Python ⚙️ Pattern recognition across log structures ⚙️ Designing clean CLI interfaces ⚙️ Turning raw noise into meaningful diagnostics Check it out on GitHub 👇 https://lnkd.in/gnBpFnPi Feedback and contributions are always welcome! 🙌 #Python #CLI #OpenSource #SoftwareEngineering #BuildInPublic #DevTools #GitHub
To view or add a comment, sign in
-
🧠 Python Concept: contextlib (Custom Context Managers) Write your own with logic 😎 ❌ Without Context Manager file = open("data.txt", "w") try: file.write("Hello") finally: file.close() 👉 More boilerplate 👉 Easy to forget cleanup ✅ Pythonic Way (Custom Context Manager) from contextlib import contextmanager @contextmanager def open_file(name, mode): f = open(name, mode) try: yield f finally: f.close() with open_file("data.txt", "w") as f: f.write("Hello") 🧒 Simple Explanation Think of it like a helper 🤖 ➡️ Handles setup ➡️ Runs your code ➡️ Cleans up automatically 💡 Why This Matters ✔ Cleaner resource handling ✔ Avoid memory leaks ✔ Reusable logic ✔ Used in production systems ⚡ Real-World Use ✨ Database connections ✨ File handling ✨ API sessions ✨ Locks & threading 🐍 Don’t repeat try-finally 🐍 Automate cleanup smartly #Python #PythonTips #CleanCode #AdvancedPython #BackendDevelopment #Programming #DeveloperLife
To view or add a comment, sign in
-
-
I’ve been spending my recent free time in building an Event-Driven Backtesting Engine from scratch for Options. Backtesting complex option strategies requires processing massive amounts of market data, calculating Greeks, and tracking portfolio metrics simultaneously. To handle this without latency bottlenecks, I decided to architect the entire core engine in C++. for now I have mostly tried to make it very flexible like modular commission and slippage and ability to write custom strategies instead of editing the core engine itself I completely decoupled most of the core things so The entire C++ backend is compiled as a standalone library. I am also trying to Integrate a python bridge using pybind11 exposing this compiled library directly to Python. The goal for this is to make the engine to do all the computation in the background, allowing anyone to write, test, and plug in custom strategies dynamically using simple Python scripts without ever needing to modify the core engine files. Getting the C++ event loop to work good with Python scripting is proving to be a little complicated right now! I'll be pushing a final README and some sample strategies once I get the bindings fully stabilized. You guys can check out the code here : https://lnkd.in/gRSgd4gs #quantfinance #cpp #python #algorithmictrading #options #pybind11 #derivatives
To view or add a comment, sign in
-
-
🧪 You can just automate things! `scripts/mark_pr_files_viewed.sh` automates marking all unviewed files in a GitHub pull request as 'Viewed' using the GraphQL API. The script supports batching and multiple authentication methods. The script adds a dependency check for Python 3, removes a redundant and inefficient GraphQL call in the file-fetching loop, and optimises string escaping by using Bash's built-in parameter expansion instead of calling sed in a loop. 🌟 Grab the script for free here: https://lnkd.in/gXFj3JsG #bash #GraphQL #api #script
To view or add a comment, sign in
-
-
🚀 Day 16/30 of My LeetCode Journey (Python + SQL) Consistency is compounding… feeling more confident with every problem solved 💻🔥 🔹 **SQL Problems of the Day** 👉 *Swap Salary* Swap all `'m'` and `'f'` values in the `sex` column using a single update statement. 💡 *Key Concept:* Using `CASE WHEN` inside an UPDATE. 👉 *Not Boring Movies* Find movies with odd-numbered IDs and a description that is not "boring", sorted by rating in descending order. 💡 *Key Concept:* Filtering + ORDER BY with conditions. 🔹 **Python Problems of the Day** 👉 *Contains Duplicate* Check if any value appears at least twice in the array. 💡 *Key Concept:* Using HashSet for O(n) time. 👉 *Majority Element* Find the element that appears more than ⌊n/2⌋ times. 💡 *Key Concept:* Boyer-Moore Voting Algorithm. From basic logic to optimized approaches… growth is visible 📈 Day 16 done ✅ #LeetCode #30DaysChallenge #Python #SQL #CodingJourney #Consistency #ProblemSolving #Learning #Algorithms
To view or add a comment, sign in
-
5 Pandas functions I use almost every day. If you come from SQL, these will feel familiar right away. 1. query() Filter rows the same way you would use a WHERE clause. 2. groupby() Aggregate your data by category. The Python equivalent of GROUP BY. 3. merge() Combine two DataFrames together. Works just like a JOIN. 4. value_counts() Count how often each value appears in a column. Great for a quick data quality check. 5. fillna() Replace missing values with a default. One line instead of a whole if-else block. The full code is in the image. Which one do you use the most? #Python #Pandas #DataScience #SQL #LearningInPublic
To view or add a comment, sign in
-
-
𝗗𝗮𝘆 𝟲𝟳/𝟳𝟱 | 𝗟𝗲𝗲𝘁𝗖𝗼𝗱𝗲 𝟳𝟱 𝗣𝗿𝗼𝗯𝗹𝗲𝗺: 338. Counting Bits 𝗗𝗶𝗳𝗳𝗶𝗰𝘂𝗹𝘁𝘆: Easy 𝗣𝗿𝗼𝗯𝗹𝗲𝗺 𝗦𝘂𝗺𝗺𝗮𝗿𝘆: Given an integer n, return an array where each index i (0 ≤ i ≤ n) contains the number of 1’s in the binary representation of i. 𝗠𝘆 𝗔𝗽𝗽𝗿𝗼𝗮𝗰𝗵: This problem is solved efficiently using Dynamic Programming with bit manipulation. Instead of converting each number to binary separately, we reuse previously computed results. • Key Observation: – Right shifting a number (i >> 1) removes the last bit – (i & 1) tells whether the last bit is 1 or 0 • Transition: – ans[i] = ans[i >> 1] + (i & 1) This means: Take the count of 1’s from i/2 and add 1 if the current number is odd. • Base Case: – ans[0] = 0 • Final answer: – Array ans of size n + 1 This avoids repeated binary conversions and builds the solution in a bottom-up manner. 𝗖𝗼𝗺𝗽𝗹𝗲𝘅𝗶𝘁𝘆 𝗔𝗻𝗮𝗹𝘆𝘀𝗶𝘀: • Time Complexity: O(n) • Space Complexity: O(n) 𝗞𝗲𝘆 𝗧𝗮𝗸𝗲𝗮𝘄𝗮𝘆: Problems involving binary representations often have patterns that can be reused. Bit manipulation + DP is a powerful combination for optimizing such computations. 𝗤𝘂𝗲𝘀𝘁𝗶𝗼𝗻 𝗟𝗶𝗻𝗸: https://lnkd.in/gydkB_rv #Day67of75 #LeetCode75 #DSA #Java #Python #DynamicProgramming #BitManipulation #MachineLearning #DataScience #ML #DataAnalyst #LearningInPublic #TechJourney #LeetCode
To view or add a comment, sign in
-
-
𝗗𝗮𝘆 𝟲𝟱/𝟳𝟱 | 𝗟𝗲𝗲𝘁𝗖𝗼𝗱𝗲 𝟳𝟱 𝗣𝗿𝗼𝗯𝗹𝗲𝗺: 72. Edit Distance 𝗗𝗶𝗳𝗳𝗶𝗰𝘂𝗹𝘁𝘆: Medium 𝗣𝗿𝗼𝗯𝗹𝗲𝗺 𝗦𝘂𝗺𝗺𝗮𝗿𝘆: Given two strings word1 and word2, compute the minimum number of operations required to convert word1 into word2. Allowed operations: • Insert a character • Delete a character • Replace a character 𝗠𝘆 𝗔𝗽𝗽𝗿𝗼𝗮𝗰𝗵: This is a Dynamic Programming problem. • Define a 2D DP array where dp[i][j] represents the minimum operations needed to convert the first i characters of word1 to the first j characters of word2 • Initialization: – dp[i][0] = i → delete all characters – dp[0][j] = j → insert all characters • Transition: – If characters match: dp[i][j] = dp[i-1][j-1] – If characters differ: dp[i][j] = 1 + min( dp[i-1][j-1], // replace dp[i-1][j], // delete dp[i][j-1] // insert ) • Final answer: dp[m][n] This works because at each step, we choose the optimal operation among insert, delete, or replace based on previously computed subproblems. 𝗖𝗼𝗺𝗽𝗹𝗲𝘅𝗶𝘁𝘆 𝗔𝗻𝗮𝗹𝘆𝘀𝗶𝘀: • Time Complexity: O(m × n) • Space Complexity: O(m × n) 𝗞𝗲𝘆 𝗧𝗮𝗸𝗲𝗮𝘄𝗮𝘆: When transforming one string into another, think in terms of prefix transformations and build solutions bottom-up using DP. Problems involving string edits often reduce to comparing characters and choosing optimal operations. 𝗤𝘂𝗲𝘀𝘁𝗶𝗼𝗻 𝗟𝗶𝗻𝗸: https://lnkd.in/g8MzA3Rm #Day65of75 #LeetCode75 #DSA #Java #Python #DynamicProgramming #MachineLearning #DataScience #ML #DataAnalyst #LearningInPublic #TechJourney #LeetCode
To view or add a comment, sign in
-
-
🔺 SQL Mistake That Can Get a Junior Fired Deleting without verifying can result in permanent damage. 🔑 Always verify before you commit. If you are running a DELETE statement in production (or even staging), never run it in auto-commit mode. Run it inside a transaction block so you can check the row count first. 💨 If the number looks right, rerun it and type COMMIT. Better SAFE than sorry 100 days of SQL and Python . Get it here 👇 https://lnkd.in/eUjuaycT
To view or add a comment, sign in
-
More from this author
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