Skip to content

Instantly share code, notes, and snippets.

View hocyadav's full-sized avatar
😌
Working from home

Hariom Yadav hocyadav

😌
Working from home
View GitHub Profile
@hocyadav
hocyadav / README.md
Created December 11, 2024 17:52 — forked from disler/README.md
Use Meta Prompting to rapidly generate results in the GenAI Age

Meta Prompting

In the Generative AI Age your ability to generate prompts is your ability to generate results.

Guide

Claude 3.5 Sonnet and o1 series models are recommended for meta prompting.

Replace {{user-input}} with your own input to generate prompts.

Use mp_*.txt as example user-inputs to see how to generate high quality prompts.

### Aliases
# Open specified files in Sublime Text
# "s ." will open the current directory in Sublime
alias subl='open -a "Sublime Text"'
alias phpini='cd /usr/local/etc/php/7.1; subl php.ini'
# Color LS
@hocyadav
hocyadav / kafka.md
Created August 30, 2021 05:26 — forked from DevoKun/kafka.md
How to operate Kafka, mostly using Docker

Kafka Distributed Streaming Platform

Publish and Subscribe / Process / Store

Start Kafka

  • Kafka uses ZooKeeper as a distributed backend.

Start Zookeeper

@hocyadav
hocyadav / ConsumerTask.java
Created March 15, 2021 02:44 — forked from VarunVats9/ConsumerTask.java
Count Min Sketch
import java.util.concurrent.BlockingQueue;
public class ConsumerTask implements Runnable {
private static final int H1 = 0;
private static final int H2 = 1;
private static final int H3 = 2;
private static final int H4 = 3;
final static int LIMIT = 100;
{
"Comment":"Transaction Processor State Machine Using SQS",
"StartAt":"ProcessTransaction",
"States":{
"ProcessTransaction":{
"Type":"Pass",
"Next":"BroadcastToSqs"
},
"BroadcastToSqs":{
"Type":"Task",
@hocyadav
hocyadav / ASL
Created September 21, 2020 12:28 — forked from djg07/ASL
{
"Comment": "A simple AWS Step Functions state machine that automates a call center support session.",
"StartAt": "ProcessTransaction",
"States": {
"ProcessTransaction": {
"Type" : "Choice",
"Choices": [
{
"Variable": "$.TransactionType",
"StringEquals": "PURCHASE",