Skip to content

Instantly share code, notes, and snippets.

@lsgrep
lsgrep / LLM.md
Created March 29, 2023 03:11 — forked from rain-1/LLM.md
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@lsgrep
lsgrep / Makefile
Created October 12, 2017 02:56 — forked from mcastilho/Makefile
Makefile for Medium article
.PHONY: all tags clean test build install generate image release
REGISTRY_REPO = <..redacted..>
OK_COLOR=\033[32;01m
NO_COLOR=\033[0m
ERROR_COLOR=\033[31;01m
WARN_COLOR=\033[33;01m
# Build Flags
@lsgrep
lsgrep / kubectl.fish
Created October 10, 2017 09:31 — forked from terlar/kubectl.fish
Kubernetes fish completions
# kubernetes - is an open source system for managing containerized
# applications across multiple hosts, providing basic mechanisms for
# deployment, maintenance, and scaling of applications.
# See: https://kubernetes.io
function __kubectl_no_command
set -l cmd (commandline -poc)
if not set -q cmd[2]
return 0
end
@lsgrep
lsgrep / import_zone.py
Created August 15, 2017 03:12 — forked from onlytiancai/import_zone.py
从zonefile文件把域名记录导入到DNSPod
# -*- coding: utf-8 -*-
'''
功能:
从zonefile文件导入域名到Dnspod
requirements:
dnspython==1.10.0
requests==1.0.4
'''
@lsgrep
lsgrep / go-ci-build.sh
Created July 18, 2017 07:56 — forked from wavded/go-ci-build.sh
Go Jenkins CI Script - golang
#!/bin/bash
# Go build script that runs cloc, cpd, lint, vet, test and coverage for Jenkins
#
# Outside tools include:
# gocov: go get github.com/axw/gocov
# gocov-xml: go get github.com/t-yuki/gocov-xml
# go2xunit: go get bitbucket.org/tebeka/go2xunit
# jscpd: npm i jscpd -g
# cloc: npm i cloc -g
@lsgrep
lsgrep / discover-pci-slot-type-linux
Created July 16, 2017 05:12 — forked from antonioams/discover-pci-slot-type-linux
How to discover PCI Slot Type in a Linux Server
[root@local ~]# dmidecode | grep -A 5 "System Slot"
System Slot Information
Designation: PCI1
Type: x4 PCI Express Gen 2 x8
Current Usage: Available
Length: Long
Characteristics:
--
System Slot Information
Designation: PCI2
(import com.google.gson.stream.JsonReader)
(import com.google.gson.Gson)
(def data "[{\"id\":2,\"name\":\"Thing1\"},{\"id\":3,\"name\":\"Thing2\"},{\"id\":4,\"name\":\"Thing3\"}]")
(def gson (Gson.))
(defrecord example [id name])
(defn to-record [java-map]
(map->example (into {} (map
(juxt