Skip to content

Instantly share code, notes, and snippets.

View mvandermeulen's full-sized avatar

Mark mvandermeulen

  • Fivenynes
  • Sydney, Australia
  • 23:29 (UTC +10:00)
View GitHub Profile
@mvandermeulen
mvandermeulen / common.env
Created January 1, 2024 11:28 — forked from edvard-rgb/common.env
Saleor platform using docker-compose, Traefik, NginX
DATABASE_URL=postgres://saleor:password@db/saleor
DEFAULT_FROM_EMAIL=noreply@domain.com
CELERY_BROKER_URL=redis://redis:6379/1
JAEGER_AGENT_HOST=jaeger
SECRET_KEY=secret_key
API_URI=https://saleor-api.domain.com/graphql/
ALLOWED_HOSTS=saleor-api.domain.com,saleor-mail.domain.com,saleor-store.domain.com,saleor-admin.domain.com,saleor-jaeger.domain.com
ALLOWED_CLIENT_HOSTS=saleor-api.domain.com,saleor-mail.domain.com,saleor-store.domain.com,saleor-admin.domain.com,saleor-jaeger.domain.com
@mvandermeulen
mvandermeulen / DO425.md
Created December 11, 2023 15:09 — forked from luckylittle/DO425.md
Red Hat DO425 Notes

Red Hat Security: Securing Containers & OpenShift (DO425)

Last update: Tue Jan 14 23:15:49 UTC 2020 by @luckylittle


Objectives

  1. Understand, identify, and work with containerization features
  2. Deploy a preconfigured application and identify crucial features such as namespaces, SELinux labels, and cgroups
@maple3142
maple3142 / test.py
Created October 14, 2023 03:37
Python 3.11 bytecode assemble
from types import FunctionType, CodeType
import dis
def assemble(ops):
cache = bytes([dis.opmap["CACHE"], 0])
ret = b""
for op, arg in ops:
opc = dis.opmap[op]
ret += bytes([opc, arg])
@Birch-san
Birch-san / llama_flash.py
Last active January 22, 2024 06:05
Loading llama with Flash Attention
from transformers import (
AutoConfig,
AutoTokenizer,
BitsAndBytesConfig,
GenerationConfig,
AutoModelForCausalLM,
LlamaTokenizerFast,
PreTrainedModel,
TextIteratorStreamer,
StoppingCriteria,
@veekaybee
veekaybee / normcore-llm.md
Last active June 29, 2024 03:29
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@scyto
scyto / proxmox.md
Last active June 27, 2024 19:20
proxmox cluster proof of concept

ProxMox Cluster - Soup-to-Nutz

aka what i did to get from nothing to done.

note: these are designed to be primarily a re-install guide for myself (writing things down helps me memorize the knowledge), as such don't take any of this on blind faith - some areas are well tested and the docs are very robust, some items, less so). YMMV

Purpose of Proxmox cluster project

Required Outomces of cluster project

@jvelezmagic
jvelezmagic / main.py
Last active May 24, 2024 15:54
QA Chatbot streaming with source documents example using FastAPI, LangChain Expression Language, OpenAI, and Chroma.
"""QA Chatbot streaming using FastAPI, LangChain Expression Language , OpenAI, and Chroma.
Features
--------
- Persistent Chat Memory:
Stores chat history in a local file.
- Persistent Vector Store:
Stores document embeddings in a local vector store.
- Standalone Question Generation:
Rephrases follow-up questions to standalone questions in their original language.
javascript: (function() {
var scripts = document.getElementsByTagName("script"),
regex = /(?<=(\"|\%27|\`))\/[a-zA-Z0-9_?&=\/\-\#\.]*(?=(\"|\'|\%60))/g;
const results = new Set;
for (var i = 0; i < scripts.length; i++) {
var t = scripts[i].src;
"" != t && fetch(t).then(function(t) {
return t.text()
}).then(function(t) {
var e = t.matchAll(regex);
[
{
"name": "Sample Hoppscotch Environment - 1",
"variables": [
{
"value": "https://echo.hoppscotch.io",
"key": "baseURL"
},
{
"value": "var1",
@staberas
staberas / interactive_websearch_chat.py
Last active May 9, 2024 19:41
interactive_websearch_chat.py
# This script requires to have some basic Python skills
# - Install python dependencies (thanks to TitwitMuffbiscuit on reddit) :
# pip install nltk beautifulsoup4 googlesearch-python trafilatura wolframalpha
#
# If you get this error "Resource punkt not found", it's because Punkt sentence tokenizer for Natural Language Toolkit is missing.
# Edit the file and add this before
# from nltk.tokenize import word_tokenize ,
# it will download the necessary english.pickle:
# import nltk
# nltk.download('punkt')