Skip to main content

Posts

Showing posts from 2023

QoT: A Powerful Command-Line Tool for Querying Data from CSV Files

Are you looking for a way to query and manipulate data in CSV files without using complex software or coding skills? If so, you might be interested in QoT, a powerful command-line tool that allows you to query data from tables or sheets with ease. QoT  stands for  Query over Table , and it is a tool that lets you filter, sort, and display data from CSV files using simple and intuitive commands. You can use QoT to quickly extract insights from large datasets, perform data analysis, or integrate QoT into your workflow. With QoT, you can: Select the columns you want to display using the  --select  option Specify the file name of the table or sheet using the  --from  option Apply a condition to filter the query result using the  --where  option Limit the number of rows in the query result using the  --limit  option Sort the query result by a certain column using the  --orderby  option and choose either  --asc  or  --desc  to order the result in ascending or descending order Print

The ultimate tool for finding and replacing patterns in files

Are you looking for a simple and powerful tool that can help you find and replace patterns in files? If so, you might want to check out  FindReplace , a command line tool that allows you to search and replace text or data structures in any file using JSON, YAML,  CSON , or plain text formats. FindReplace  is a Rust-based tool that is easy to install and use. You can download it from  crates.io  or  GitHub , or build it from source using Cargo. Once installed, you can use it by running the command findreplace followed by the pattern, the substitute, and the file path. For example, if you want to replace all occurrences of “foo” with “bar” in a file named file.txt, you can run the command: findreplace 'foo' 'bar' file.txt FindReplace also supports using JSON, YAML, or CSON files as substitutes. This means you can use these formats to define complex data structures that can be used to replace multiple patterns at once. For example, if you have a file named file.txt t

The smart way to clone GitHub sub-directories!

Do you want to clone a sub-directory of a GitHub repository without downloading the whole repo? Do you want to save time and bandwidth by cloning only the part of the repo that you need? If yes, then you need  clone-github-subdir , a handy command-line tool that lets you do just that! clone-github-subdir  is a simple and fast way to clone any sub-directory of a GitHub repo to your local machine. It is useful for many scenarios, such as: You want to try out a sample project or a tutorial from a large repo, but you don’t want to clone the entire repo. You want to reuse some code or files from a sub-directory of another repo, but you don’t want to fork or clone the whole repo. You want to contribute to a sub-directory of an open-source repo, but you don’t want to clone the whole repo and deal with unnecessary files. With  clone-github-subdir , you can clone any sub-directory of a GitHub repo with just one command. You can also choose to clone only the current sub-directory

How to setup WASI SDK on Linux?

Setting up the  WASI SDK  is the simplest on Linux like Ubuntu. You just need to run few lines of commands. That's it! Open the Linux terminal and go to a directory where you can download the payload. Usually, I prefer downloading the stuffs in /home directory but it's up to you. Run these commands to download and install the WASI SDK curl -O -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sdk_20.0_amd64.deb sudo dpkg -i wasi-sdk_20.0_amd64.deb export PATH=/opt/wasi-sdk/bin:$PATH export CC=/opt/wasi-sdk/bin/clang export CXX=/opt/wasi-sdk/bin/clang++ Now you are ready to use WASI SDK which you can check by this command, clang -v . If it prints the version info then all is well.

Git Flow based branch naming convention

Git flow is a branching model for Git that helps large teams collaborate on projects. There are several best practices for naming Git branches. One of them is to begin with unique IDs like JIRA ID followed by JIRA title in the branch names. You can use hyphen as separators and avoid using numbers only. You can also use Git flow's naming conventions, which are based on the type of branch you're creating. For example, feature branches should be named `feature/branch-name`, release branches should be named `release/version-number`, hotfix branches should be named `hotfix/branch-name`, and bugfix branches should be named `bugfix/branch-name`. So our branch names syntax could be like <work-type>/<jira-id>-<jira-title> for e.g., feature/AIQ-12345-summary-title-of-enhancement-task hotfix/AIQ-12345-summary-title-of-hotfix-task bugfix/AIQ-12345-summary-title-of-bugfix-task release/AIQ-12345-summary-title-of-release-task If you make the branches from jira website then t

How to Craft Perfect Prompts for ChatGPT?

ChatGPT is an artificial intelligence system that can generate text responses based on user inputs. It can be used for various purposes, such as chatting, writing, learning, and more. However, to get the most out of ChatGPT, users need to know how to craft perfect prompts that will elicit useful and relevant answers from the system. A prompt is a text input that tells ChatGPT what kind of response you want from it. A good prompt should be clear, specific, and informative. It should also state your intent or goal, and direct the output format if needed. In this essay, I will share seven best practices for effective prompt engineering, and then I will give you a formula and some examples of perfect prompts. Best Practices 1. Be specific If you ask a vague question, you may get a vague answer. The more details you provide, the better ChatGPT can give you what you’re looking for. For example, instead of asking "tell me about all dog breeds that exist,” ask “What are the different bree

How to Choose the Right Battery for Your Watch

If you have a Swatch wristwatch that needs a battery replacement, you might be wondering what kind of battery to use. There are different types of batteries for different watches, and using the wrong one could affect the performance or lifespan of your watch. One way to find out the correct battery for your watch is to look at the old battery that you removed from the watch. It should have a number on it, such as SR 936 SW or SR 927 SW. This number indicates the size and type of the battery.   The first two digits of the number represent the diameter of the battery in millimetres. For example, SR 9xx batteries have a diameter of 9.5 mm. The last two digits represent the height of the battery in tenths of a millimetre. For example, SR xx36 batteries have a height of 3.6 mm. The letter S stands for silver oxide, which is the material used in most watch batteries. The letter R stands for round shape. The letter W stands for high drain, which means the battery can handle more power cons

Introducing CSON serialization & data representation format

CSON (Concise Object Notation) is a data serialization format that is designed to be more concise than JSON (JavaScript Object Notation). CSON is a variation of JSON, which means that it shares some similarities with JSON but also has its own unique features and syntax. One of the main differences between CSON and JSON is that CSON allows for the use of multiple separator characters between key-value pairs in an object or elements in an array. In JSON, only a comma can be used as a separator. In CSON, however, a semicolon, comma, pipe, tilde or forward slash can be used as a separator. However, it’s important to note that once a separator character has been chosen, it must be used consistently throughout the data. Here’s a simple grammar that can be used for valide CSON serialization format:  cson = object | array object = '{' pair (separator pair)* '}' pair = key ':' value key = string value = string | number | object | array array = '[' element (

Introducing the Base99 conversion system

Understanding the base conversion Base conversion is the process of converting a number from one base (or radix) to another. A base is the number of digits or symbols used to represent numbers in a particular system. For example, the decimal system (base 10) uses 10 digits (0-9), while the binary system (base 2) uses only 2 digits (0 and 1). To convert a number from one base to another, you can first convert it to decimal (base 10) and then convert that decimal number into the desired base. There are also direct conversion methods between some bases, such as binary, octal, and hexadecimal. Introducing the base99 conversion system A base99 conversion system would use 99 distinct symbols to represent numbers. For example, you could use the digits 0-9 and the letters A-Z (lowercase and uppercase) to represent the first 62 symbols. You would then need to choose an additional 37 symbols to represent the remaining values. As base99 conversion system would require 99 unique characters to repr

Algorithm to translate Sanskrit to Hindi language text

Translating Sanskrit language text into Hindi language text involves several steps and can be done using a combination of rule-based and statistical approaches. Here is a simplified algorithm that outlines the basic steps involved: Step 1: Preprocessing  The Sanskrit text needs to be preprocessed to remove any diacritics, accents, or other special characters that are not present in Hindi. The text should also be converted to the Devanagari script, which is used to write both Sanskrit and Hindi. Step 2: Tokenization  The preprocessed text should be split into individual words, or tokens, using a tokenizer that can handle Sanskrit words. Step 3: Morphological analysis  Each token should be analyzed morphologically to determine its root form and any inflections, tense, gender, number, etc. This can be done using a morphological analyzer that can handle Sanskrit morphology. Step 4: Mapping to Hindi vocabulary  Each Sanskrit word needs to be mapped to its corresponding Hindi word or phrase