Skip to content

Instantly share code, notes, and snippets.

# Must have conda installed
# It costs approximately $0.2 (in GPT-4 API fees) to generate one example with analysis and design, and around $2.0 for a full project.
conda create -n metagpt python=3.11.4
conda activate metagpt
npm --version # to check you have npm installed
# optional: install node if you don't have it
npm install -g @mermaid-js/mermaid-cli
git clone https://github.com/geekan/metagpt
cd metagpt
@sureshchandra999
sureshchandra999 / latency.txt
Created January 12, 2025 13:55 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@sureshchandra999
sureshchandra999 / aws_resource_list.sh
Created January 6, 2025 17:36 — forked from iam-veeramalla/aws_resource_list.sh
Script to automate the process of listing all the resources in an AWS account
#!/bin/bash
###############################################################################
# Author: Abhishek Veeramalla
# Version: v0.0.1
# Script to automate the process of listing all the resources in an AWS account
#
# Below are the services that are supported by this script:
# 1. EC2
@sureshchandra999
sureshchandra999 / custom-gpt-llama-hyperstack
Created January 6, 2025 17:36 — forked from iam-veeramalla/custom-gpt-llama-hyperstack
Setup your own custom GPT using openwebui on Hyperstack
Step 1: Create a VM
- Create an instance on Hyperstack platform (They have a huge variety of GPU instances)
OS Image - Ubuntu Server 22.04 LTS R535 CUDA 12.2
Flavor Details - A100-80G-PCIe
Step 2: Run resources on the VM
- Install Ollama
Connect to VPN
# skip this. we don't depend on pipeline anymore
#Clone Pipelines Operator bundle source
#http://pkgs.devel.redhat.com/cgit/containers/openshift-pipelines-operator-prod-operator-metadata/
#Checkout the right branch e.g. "pipelines-1.3-rhel-8"
#Docker build the bundle
#Push the bundle
0. Install the latest "oc" openshift-client and opm tool
https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview/latest-4.7/
1. Login as kubeadmin
2. Connect to VPN
(skip) 2.1. Disable default operator indices
@sureshchandra999
sureshchandra999 / RH-SSO_Installation_OpenShift_Templates
Created January 6, 2025 17:36 — forked from iam-veeramalla/RH-SSO_Installation_OpenShift_Templates
RH-SSO/Keycloak Installation using OpenShift Templates
Login as admin into your cluster
```
oc login -u kubeadmin -p password
```
Run the following commands to update the core set of Red Hat Single Sign-On 7.4.6.GA resources for OpenShift in the openshift project
```
for resource in sso74-image-stream.json \
sso74-https.json \
sso74-postgresql.json \
@sureshchandra999
sureshchandra999 / iops and disk testing
Created January 6, 2025 17:35 — forked from iam-veeramalla/iops and disk testing
iops and disk testing using fio
Install fio on your favorire linux flavor using apt, yum or whatever
Write Performance testing
sudo fio --name=randwrite --ioengine=libaio --iodepth=1 --rw=randwrite --bs=4k --direct=0 --size=512M --numjobs=2 --runtime=240 --group_reporting
Read Performance testing
sudo fio --name=randread --ioengine=libaio --iodepth=16 --rw=randread --bs=4k --direct=0 --size=512M --numjobs=4 --runtime=240 --group_reporting
Read Write Performance testing
sudo fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=random_read_write.fio --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75
#!/bin/sh
set -euo pipefail
VERSION=${1#"v"}
if [ -z "$VERSION" ]; then
echo "Must specify version!"
exit 1
fi
MODS=($(
curl -sS https://raw.githubusercontent.com/kubernetes/kubernetes/v${VERSION}/go.mod |
operator-sdk build docker.io/abhishekf5/gitops-operator:rhsso --image-builder docker
docker push docker.io/abhishekf5/gitops-operator:rhsso
Update csv file
1. Container image
2. Image
operator-sdk bundle create docker.io/abhishekf5/gitops-operator-bundle:rhsso
docker push docker.io/abhishekf5/gitops-operator-bundle:rhsso
git clone https://github.com/operator-framework/operator-registry.git
make build
/opt/workspace/operator-registry/bin/opm index add --bundles docker.io/abhishekf5/gitops-operator-bundle:rhsso --tag docker.io/abhishekf5/gitops-operator-index:rhsso --build-tool=docker