Skip to content

Instantly share code, notes, and snippets.

View chainhead's full-sized avatar
💭
Machine, learning ...

mrchainhead chainhead

💭
Machine, learning ...
  • Bengaluru, INDIA
  • 12:37 (UTC +05:30)
View GitHub Profile
@chainhead
chainhead / llm.md
Last active March 28, 2024 05:41
LLM notes

Notebook

Theory

LLM

@chainhead
chainhead / requirements.md
Created December 14, 2023 08:47
Quarkus Kafka Streams requirements

Requirements

Summary

There are three Kafka topics t1, t2 and t3 where, t1 has raw data and t2 has look-up values. Message(s) in t1 are used to look-up t2. If a match is found, then the message t1 is enriched with values in t2 and written out to t3. Messages in t1 are expected at a rate of around 100 messages per second. The expected deliverable is a Quarkus project such that, the mvn command results in a working JAR file.

Details

Messages in t1 will be JSON as shown below. Each message will have a UUID as the key. This UUID is same as meta.id. The data array may have hundreds of entries.

@chainhead
chainhead / genai.md
Last active September 24, 2023 07:33
GenAI learnings from ChatGPT

Person:

  • What is Generative AI?

ChatGPT:

  • Generative AI refers to a subset of artificial intelligence (AI) techniques and models that are designed to generate new, original content or data that resembles human-created content. These models are capable of producing text, images, audio, and even other forms of data, often with a high degree of creativity and realism. Generative AI has made significant advancements in recent years, thanks in part to deep learning and neural network architectures.

One of the most prominent types of generative AI models is the Generative Adversarial Network (GAN), introduced by Ian Goodfellow and his colleagues in 2014. GANs consist of two neural networks, a generator and a discriminator, which work in opposition to each other. The generator tries to create content that is indistinguishable from real data, while the discriminator tries to differentiate between real and generated data. This adversarial process helps the generator improve its output over time.

Applications o

@chainhead
chainhead / keycloak-setup.md
Created May 2, 2020 02:39
Setting up Keycloak server
@chainhead
chainhead / 0-install.md
Last active September 12, 2022 08:40
Strimzi installation on Ubuntu-22.04

Install NodeJs

curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt-get install nodejs -y

Install Docker

@chainhead
chainhead / README.md
Created May 2, 2022 00:09
Sample Websockets client

Introduction

This is a sample Websocket client to send random JSON payload to a Websockets server.

Installation

After cloning this gist, run the following commands.

npm init -y
#!/usr/bin/python
import RPi.GPIO as GPIO
import time
#GPIO SETUP
channel = 21
GPIO.setmode(GPIO.BCM)
GPIO.setup(channel, GPIO.IN)
def moisture_detect(channel):
@chainhead
chainhead / 0-intro.md
Last active August 19, 2021 03:56
mosquitto-k8s

Introduction

# https://raw.githubusercontent.com/eclipse/mosquitto/master/mosquitto.conf
kubectl create ns/mqtt
kubectl -n mqtt create configmap mosquitto-conf --from-file=mosquitto.conf
kubectl -n mqtt create -f deploy.yaml
@chainhead
chainhead / 0-intro.md
Last active March 28, 2021 02:29
Logging in Go - logrus

Introduction

A basic implementation of logging with Go language. Copied from https://www.honeybadger.io/blog/golang-logging/

Usage

  1. Run the following commands to test with built-in log package. Logs will be saved in logs.txt.
go run log.go
@chainhead
chainhead / 0-intro.md
Last active March 24, 2021 05:00
HTTP server handling connection upgrade

Introduction

This gist shows a basic implementation of a HTTP server that handles the request to upgrade connection to Websockets.