Using multiple versions of the same library

Golang Looking into dependency management in golang and I was quite surprised that it’s possible to import multiple versions of the same library. However it only works for major version that are considered as a different module. Which must be specified when creating the package E.g module multiversion go 1.15 require ( github.com/go-redis/redis/v7 v7.0.0 github.com/go-redis/redis/v8 v8.0.0 ) package main import ( redisv1 "github.com/go-redis/redis/v7" redisv2 "github.com/go-redis/redis/v8" ) func main() { redisv1.NewClient(&redisv1.Options{ Addr: "localhost:6379", Password: "", DB: 0, }) redisv2....

September 6, 2021 · 1 min · Nolan

Pandas meets SQL

Pysql I was exploring data from a CSV, I used Jupyter notebook as I’m a bit familiar with it and it’s a great fit for this kind of use case. It’s very easy to load data in a dataframe, however I don’t use pandas often enough and cannot remember all the functions. I just wanted to write SQL queries from the dataframe itself. import matplotlib.pyplot import pandas as pd from pandasql import sqldf df = pd....

March 3, 2021 · 1 min · Nolan