jesse_jcharis

Pydantic & Dataclasses – How to Allow Extra Kwargs

Dataclasses act as code generators when working with Objects and Classes in python. It allows us to easily benefit from the dunder methods that are required when creating a class such as __init__, `__eq__`, etc . When working with external data sources, however, there may arise situations where additional parameters beyond those explicitly declared in …

Pydantic & Dataclasses – How to Allow Extra Kwargs Read More »

Implement Higher Order Functions in Go Lang – Map, Reduce and Filter

Higher-order functions are a fundamental concept in functional programming, and Go is no exception. In some time ago we explored how to implement some of the higher order functions in Python,you can check out the video here . In this tutorial we will learn how to implement them in Go. In Go, higher-order functions are …

Implement Higher Order Functions in Go Lang – Map, Reduce and Filter Read More »

How to use PyGWalker with Flask in Python

Pygwalker is a python framework with a look and feel like Tableau, that allows data scientists to analyze data and visualize patterns with simple drag-and-drop operations. In this tutorial we will see how to use PyGWalker in Flask. We will build a web application whereby a user can upload a csv file and analyze it …

How to use PyGWalker with Flask in Python Read More »

How to Use Jinja-Like Syntax in Julia Web Apps with Oxygen.jl

Oxygen.jl is a simple microframework that is quite useful for creating web apps and APIs in Julia. In my opinion, it is like the Flask of Julia as GenieFramework.jl is like the Django of Julia. Since it is quite new( Sept 2023), it does not yet have support for using Jinja – a templating engine …

How to Use Jinja-Like Syntax in Julia Web Apps with Oxygen.jl Read More »

Django Query Optimization – Avoiding N + 1 Problems

There are several ways to avoid the N+1 query problem in Django: Use select_related: select_related is a method that performs a SQL join and includes the fields of the related object in the SELECT statement. It’s useful when you have ForeignKey or OneToOneField on your model and you know you’ll be accessing the related object for each item …

Django Query Optimization – Avoiding N + 1 Problems Read More »

Copying Model Instance Vs Versioning Model Instance In Django

Recently I was working on a project that involved how to keep track of changes made to a django model. This brought us to consider which approach to use, i.e whether to copy or to version using different strategies. To begin let us understand the different between the two concept. Difference Between Copying A Model …

Copying Model Instance Vs Versioning Model Instance In Django Read More »