My name is Dolev 👋🏻

I’m a junior data scientist, linux geek and investor.

LeetCode 'SQL 50' Challenge: Invalid Tweets & Replace Employee ID With The Unique Identifier (Problems 1683 & 1378)

Both LeetCode problems challenge you to manipulate data within a relational database using SQL. While seemingly similar, they focus on different aspects of data management: LeetCode 1683: Invalid Tweets deals with identifying and handling invalid data. You’ll write a query to find tweets with specific criteria that mark them as invalid. LeetCode 1378: Replace Employee ID With The Unique Identifier focuses on data transformation. Here, you’ll craft a query to replace existing employee IDs with a unique identifier within the database....

July 21, 2024 · 2 min

LeetCode 'SQL 50' Challenge: Big Countries & Article Views (Problems 595 & 1148)

Challenges are often not a matter of difficulty, but of consistency. Yesterday I published two solutions for the first ‘LeetCode SQL 50’ challenge. To improve efficiency, I’ve decided to combine these solutions into one post for every 2 or 3 problems going forward. LeetCode 595 - Big Countries [SQL 3/50] This question introduces a new concept: double filtering. Together, we’ll learn how to use it effectively: A country is big if:...

July 4, 2024 · 4 min

LeetCode 'SQL 50' Challenge: Find Customer Referee (Problem 584)

As mentioned before, I’m tackling the LeetCode SQL challenge. This week’s problem, however, is surprisingly simple, making me wonder if it’s worth a dedicated write-up. Find the names of the customer that are not referred by the customer with id = 2. Return the result table in any order. The result format is in the following example. Example 1: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Input: Customer table: +----+------+------------+ | id | name | referee_id | +----+------+------------+ | 1 | Will | null | | 2 | Jane | null | | 3 | Alex | 2 | | 4 | Bill | null | | 5 | Zack | 1 | | 6 | Mark | 2 | +----+------+------------+ Output: +------+ | name | +------+ | Will | | Jane | | Bill | | Zack | +------+ Solution To avoid repeating myself from the previous post (link above), I want to clarify that filtering for null values requires the IS NULL operator, not the equals sign (=)....

July 3, 2024 · 2 min

LeetCode 'SQL 50' Challenge: Recyclable and Low Fat Products (Problem 1757)

Leetcode has a Study Plan that focuses on solving SQL problems. The basic plan contains 50 problems, and when you finish them, you are awarded a cool badge. In between my many university assignments, I decided to take on this challenge as a goal, and of course, I’ll share my thoughts with you. The first problem in the challenge is: Write a solution to find the ids of products that are both low fat and recyclable....

July 3, 2024 · 2 min

[Explaining] Numpy and PyPlot

NumPy is a foundational library for data science in Python. It excels at handling multidimensional arrays and matrices, along with offering a rich collection of mathematical functions to operate on this data. This makes NumPy a powerful tool for data manipulation, calculations, and extracting insights from raw data efficiently. Because of its capabilities, NumPy even serves as the underlying foundation for other popular data science libraries like Pandas. In order to brightest the insights that comes from the insights of NumPy, in this post I’ll combine it with matplotlib - the graphical library that adding the ability to create a useful plots, histograms and another graphical schemes....

May 25, 2024 · 5 min

Introduction to Data Types and Lists

In Python, data types are fundamental building blocks that define the kind of information a variable can hold and the operations that can be performed on it. These types act like labels, dictating how the data is stored in memory and what functions or operations are applicable. Understanding data types is essential for writing effective and efficient Python programs, as they directly influence how your code manipulates and processes information....

May 13, 2024 · 5 min

Web Scraping With Selenium

This tutorial is going to teach you how to scraping data with Selenium under Python environment. What is Selenium? Selenium is an open-source suite of tools used for automating tasks in web browsers. It’s like a remote control for your web browser, allowing you to write scripts that can perform actions and interact with websites just like a human user would. This makes it a valuable tool for several purposes:...

April 29, 2024 · 8 min

Leetcode 1 - Twosum

On the first Leetcode question we need to achieve a target number by summing numbers from known list. We can solve this problem in two ways: brute force, which tries all combinations, or by using a dictionary for a more efficient lookup. Brute force - the easiest solution- but where’s the efficiency? I have a confession: most of the time, I prefer brute force code. It’s simpler and has a Soviet-era feel to it....

April 15, 2024 · 2 min

Leetcode 709 - To Lower Case

I recently started my master degree in data science with emphasis on machine learning, in order to training on my python skills I’m solving Leetcode challenges. In problem 709 we’re asking to replace every uppercase letter with the same lowercase letter. Basically, there’s two different ways to resolve this issue: Using The ‘Lower’ Method (the easiest solution) By using .lower we can convert every uppercase letter into lowercase: 1 2 3 class Solution: def toLowerCase(self, s: str) -> str: return s....

February 6, 2024 · 1 min

Photo and Video Storage - Best Practices 📷

Pictures capture moments that will never return. Through photos and videos, we can remember people, experiences, and meaningful moments. The modern era we live in allows each of us to immortalize our favorite moments with ease, simplicity, and speed. The era we live in is magical, it allows us to document every moment in very high quality. In the past two decades, the amount of documentation and information that each of us consumes has increased exponentially, and out of fear of losing information, we have a natural need to protect and preserve the photos and videos we take....

April 1, 2023 · 7 min