Database Python
March 31, 2024 / April 4, 2024 by admin | Leave a Comment
SQLite is an embedded database engine that allows you to create and manage databases directly from your Python code. It’s lightweight, easy to use and doesn’t require a separate server process. It was created in 2000 by D. Richard Hipp as a replacement for Berkeley DB, which was the most popular embedded database at the […]
Read more »
Module Python
March 28, 2024 / April 4, 2024 by admin | Leave a Comment
Logging is an important aspect of software development. This applies to Python as well as all other programming languages. It helps developers debug their code by providing information about what happened during execution, including error messages, warnings or other relevant details that can be helpful in debugging. Additionally, logs can track the flow and state […]
Machine Learning Python
March 5, 2024 / April 4, 2024 by admin | Leave a Comment
Introduction Langchain is a powerful library that offers a range of language processing tools, including text splitting. The RecursiveCharacterTextSplitter is one such tool that divides large texts into smaller chunks based on a specified chunk size and characters. This article will guide you in understanding how to use this splitter effectively. Installation To install the […]
March 4, 2024 / April 4, 2024 by admin | Leave a Comment
The LangChain HTMLHeaderTextSplitter is a text splitter that splits a complete LangChain document into smaller parts. LangChain’s Documents are loaded using the LangChain document loader. However, the texts are completely available. In this format, they are often too long and, for certain use cases, contain too much information that does not quite fit into the […]
Python
March 2, 2024 / April 4, 2024 by admin | Leave a Comment
Decorators in Python are a powerful feature that allows us to modify the behavior of functions or classes. They allow us to wrap another function in order to extend the behavior of the wrapped function, without permanently modifying it. In this article, we will explore decorators and their usage for profiling and logging. What is […]
March 1, 2024 / April 4, 2024 by admin | Leave a Comment
Static methods in Python are methods that belong to a class rather than an instance of the class. They can be called on either an instance or the class itself, and they do not have access to any instance-specific data (they cannot modify object state). Definition and Syntax In Python, static methods are defined using […]
February 23, 2024 / April 4, 2024 by admin | Leave a Comment
Mocking in Python is a powerful technique used in unit testing to isolate the code being tested from its dependencies. It allows us to simulate the behavior of complex, real (non-deterministic) systems in order to test our code in isolation. In this article, we will discuss how to use mocks with unittest in Python for […]
February 20, 2024 / April 4, 2024 by admin | Leave a Comment
Introduction Test-driven development (TDD) is an approach where you write tests before writing your actual code. The idea behind TDD is to ensure that all the units in your application are working as expected, and it helps in maintaining high quality code. In Python, we can use a testing framework like unittest or pytest for […]
Python Python Basics
February 19, 2024 / April 4, 2024 by admin | Leave a Comment
In programming, we often need to control the flow of our code based on certain conditions. One such condition is when we want to exit a loop prematurely. This can be achieved using the break statement. In this blog post, I will explain how to use break with both for and while loops in Python. […]
February 18, 2024 / April 4, 2024 by admin | Leave a Comment
In programming, the continue statement is used to skip the rest of the code inside a loop for the current iteration only. It then continues with the next iteration of the loop. This can be very useful when you want to bypass some specific conditions during your loops. Using continue in Python for Loop The […]