When working with SQLite databases stored in WSL2 and accessing them via PhpStorm, you might encounter the following error: Error encountered when performing Introspect schema main: [SQLITE_BUSY] The database file is locked (database is locked) This issue arises due to SQLite’s file locking mechanisms, which are not fully compatible with WSL2’s file system when accessed through tools like PhpStorm. Problem When you drag and drop an SQLite file from the WSL2 folder into PhpStorm’s Database tab, PhpStorm generates a default connection URL like this: This URL does not include parameters to prevent locking issues. As a result, SQLite encounters file […]
Building a Product Search System with Sentence Embeddings and Similarity Scoring
We will explore how to build a product search system that leverages sentence embeddings and similartiy scoring to improve search relevance. For this projekt, we need a lightweight model from “sentence-tansformers” library. Wyh: Because we need per Product Vector Space, that must be fast and stabil. I Founded this “all-MiniLM-L6-v2” model, is small, efficient and maps sentences to 384-dimensional dense vector space, making it suitable for tasks like semantic search. Let’s Start, Step 1: Setting Up the Envrioment: First, install the necessary library: Then, import the required modules and load the model: Step 2: Generation Embeddings: We will generate embeddings […]
MySQL Database and User Create bash script
Usage: Here is a simple script to achieve this: Here are the steps to make your create-db.sh script globally accessible: Optional: Rename the Script for Easier Access: If you want, you can rename the script to just create-db for ease of use: Views: 83
MJPG-streamer installation and run at System Startup using Systemd – Ubuntu Server
mjpg-streamer is a popular tool for streaming MJPEG video from webcams. In this tutorial, we will learn how to configure mjpg-streamer to run automatically at system startup using a systemd service unit file. Installation via Snap Step 1: Create the Service Unit File In the text editor, paste the following content: [Unit] Description=MJPG Streamer After=network.target [Service] ExecStart=ExecStart=mjpg-streamer -i “input_uvc.so” -o “output_http.so -w /home/kzorluoglu/charts/octoprint/www” Restart=always [Install] WantedBy=multi-user.target Step 2: Enable and Start the Service BONUS: if you want to run mjpg-streamer without sudo, you can try the following steps. Add your user to the video group: sudo usermod -aG video <your_username> […]