Skip to content

Instantly share code, notes, and snippets.

View helayoty's full-sized avatar
:octocat:

Heba helayoty

:octocat:
View GitHub Profile
@theaog
theaog / update-golang.sh
Last active November 10, 2023 14:59
update-golang.sh
#!/usr/bin/env bash
set -e
tmp=$(mktemp -d)
pushd "$tmp" || exit 1
function cleanup {
popd || exit 1
rm -rf "$tmp"
}
@rain-1
rain-1 / llama-home.md
Last active May 7, 2024 21:04
How to run Llama 13B with a 6GB graphics card

This worked on 14/May/23. The instructions will probably require updating in the future.

llama is a text prediction model similar to GPT-2, and the version of GPT-3 that has not been fine tuned yet. It is also possible to run fine tuned versions (like alpaca or vicuna with this. I think. Those versions are more focused on answering questions)

Note: I have been told that this does not support multiple GPUs. It can only use a single GPU.

It is possible to run LLama 13B with a 6GB graphics card now! (e.g. a RTX 2060). Thanks to the amazing work involved in llama.cpp. The latest change is CUDA/cuBLAS which allows you pick an arbitrary number of the transformer layers to be run on the GPU. This is perfect for low VRAM.

  • Clone llama.cpp from git, I am on commit 08737ef720f0510c7ec2aa84d7f70c691073c35d.
@MadhavJivrajani
MadhavJivrajani / k8s-horizontals-getting-started.md
Created October 15, 2021 13:58
This is a list of resources that I personally found helpful while trying to understand containers and kubernetes from a big-picture POV.

Getting Started With Kubernetes On A High Level

One of biggest barriers when trying to get started with Kubernetes is that there's so much content out there that it's kinda overwhelming - and that's totally normal! The intent of this document is to try and provide directed resources in a roadmap like fashion to understand and learn about the horizontals of Kubernetes - post which you can dive deep into any vertical while keeping the bigger picture in mind - that this document hopes to provide.

This is a set of resources for different topics that I found particularly helpful when getting started, and hopefully you do too! I've tried to list them out in order of consumption. If A comes before B under a subtopic, then it's probably that A has topics needed for B, or that A attempts to explain topics of B in a slightly simpler (not nescessarily better) manner than B.

Containers

Feel free to skip over if you're already familiar with containers and have some idea about what they are and why they exist.

@pranabpaul
pranabpaul / ckad.md
Last active October 15, 2020 16:57
CKAD Preparation
@StevenACoffman
StevenACoffman / goGetPrivate.md
Last active April 28, 2024 13:59 — forked from dmitshur/gist:6927554
How to `go get` private repos using SSH key auth instead of password auth.

Set GOPRIVATE to match your github organization

Cloning the repo using one of the below techniques should correctly but you may still getting an unrecognized import error.

As it stands for Go v1.13, I found in the doc that we should use the GOPRIVATE variable like so:

GOPRIVATE=github.com/ORGANISATION_OR_USER_NAME go get -u -f github.com/ORGANISATION_OR_USER_NAME/REPO_NAME

The 'go env -w' command (see 'go help env') can be used to set these variables for future go command invocations.

How to go get private repos using SSH key auth instead of password auth.

@rushilgupta
rushilgupta / GoConcurrency.md
Last active January 25, 2024 14:59
Concurrency in golang and a mini Load-balancer

INTRO

Concurrency is a domain I have wanted to explore for a long time because the locks and the race conditions have always intimidated me. I recall somebody suggesting concurrency patterns in golang because they said "you share the data and not the variables".

Amused by that, I searched for "concurrency in golang" and bumped into this awesome slide by Rob Pike: https://talks.golang.org/2012/waza.slide#1 which does a great job of explaining channels, concurrency patterns and a mini-architecture of load-balancer (also explains the above one-liner).

Let's dig in:

Goroutines

@cgoldberg
cgoldberg / merge_junit_results.py
Last active January 10, 2024 19:19
Merge multiple JUnit XML results files into a single results file.
#!/usr/bin/env python
"""Merge multiple JUnit XML results files into a single results file."""
# MIT License
#
# Copyright (c) 2012 Corey Goldberg
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@nickfloyd
nickfloyd / recipe: cherry-pick tags
Created December 13, 2010 17:40
To cherry pick from head and commit back into a tag
-from master in working branch
>> git branch [new branch] [tag]
>> git checkout [branch]
-pull commit out and add it to the commit at the top of the tag
>> git cherry-pick [commit] or git cherry-pick [firstcommit]^..[lastcommit] if you have a range
-resolve conflicts
-delete the local tag
>> git git tag -d [tag]
-add a new tag at the head of the old one
>> git tag [tag]