Skip to content

Instantly share code, notes, and snippets.

View taozhi8833998's full-sized avatar
🌴
On vacation

taozhi taozhi8833998

🌴
On vacation
View GitHub Profile
@cedrickchee
cedrickchee / llama-7b-m1.md
Last active July 13, 2024 04:59
4 Steps in Running LLaMA-7B on a M1 MacBook with `llama.cpp`

4 Steps in Running LLaMA-7B on a M1 MacBook

The large language models usability

The problem with large language models is that you can’t run these locally on your laptop. Thanks to Georgi Gerganov and his llama.cpp project, it is now possible to run Meta’s LLaMA on a single computer without a dedicated GPU.

Running LLaMA

There are multiple steps involved in running LLaMA locally on a M1 Mac after downloading the model weights.

@bgulla
bgulla / rke2_k3s_external_container_runtime.md
Last active February 22, 2024 08:26
Instructions for running RKE2/K3s with an external CRI/container-runtime

k3s/RKE2 with external CRI/containerd support

While k3s and RKE2 ship with their own statically-compiled containerd binary, sometimes you need to be able to utilize a more standard container socket. Especially if your container-scanner expects a more traditional installation path (i.e. Twistlock/PrismaCloud). This quick guide will show you how to get up and running with an external CRI.

Install containerd

There are better ways to do this, but the most common way of installing containerd is via the docker-ce yum repository.

sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
@markruler
markruler / cgroup.memory.md
Last active February 2, 2023 11:25
cgroup.memory "cannot allocate memory"

"cannot allocate memory"

kubectl get pod -A --field-selector spec.nodeName=worker-node -o wide
kubectl describe pod calico-node-hh2g8 -n kube-system
@alexellis
alexellis / install-k3sup.sh
Last active September 4, 2022 10:27
Multi-master / HA k3s for my Raspberry Pi cluster
#!/bin/bash
set -e
CH=latest
echo Installing Server 1
k3sup install --user pi --ip 192.168.2.147 \
--k3s-channel $CH \
--cluster \
@Windsooon
Windsooon / leetcode_retag.md
Last active July 17, 2024 13:30
Retag most popular Leetcode problems

osjobs

海外兔

website

@fgilio
fgilio / axios-catch-error.js
Last active April 11, 2024 19:02
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@zhuzhe1983
zhuzhe1983 / jd.md
Last active February 6, 2017 11:23

团队介绍

阿里云大数据孵化器,飞天一部的明星团队,团队内博士大牛云集,团队致力于用大数据解决行业中的问题,解决方案涉及交通,物流,地产,工业,企业,旅游,舆情等众多领域。团队内的天池算法大赛在国内外高校都有较高的知名度,今年天池团队承办的KDD Cup 2017正在如火如荼的进行中。以下为团队部分博士介绍。

岗位描述

后端应用开发

  • 语言 JAVA || Node.js, 了解go等语种有加分
@bakins
bakins / gist:5bf7d4e719f36c1c555d81134d8887eb
Last active April 2, 2024 13:27
prometheus - scrape multiple containers in a pod
# Example scrape config for pods
#
# The relabeling allows the actual pod scrape endpoint to be configured via the
# following annotations:
#
# * `prometheus.io/scrape`: Only scrape pods that have a value of `true`
# * `prometheus.io/path`: If the metrics path is not `/metrics` override this. This
# will be the same for every container in the pod that is scraped.
# * this will scrape every container in a pod with `prometheus.io/scrape` set to true and the
port is name `metrics` in the container
@yannhowe
yannhowe / .gitlab.ci.yml
Created September 26, 2016 18:06
.gitlab.ci.yml for SSH with private key.
# Image neeeds to have ssh-client
image: docker:git
services:
- docker:dind
stages:
- staging
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
@kudarisenmon
kudarisenmon / gdal2tiles.patch
Created July 12, 2016 11:32
「ERROR 6: EPSG PCS/GCS code 900913 not found in EPSG support files.」を回避するパッチ
--- /usr/bin/gdal2tiles.py 2014-04-05 23:21:17.000000000 +0900
+++ /home/kudarisenmon/bin/gdal2tiles.py 2016-07-09 18:08:34.012957232 +0900
@@ -783,7 +783,7 @@
self.out_srs = osr.SpatialReference()
if self.options.profile == 'mercator':
- self.out_srs.ImportFromEPSG(900913)
+ self.out_srs.ImportFromEPSG(3857)
elif self.options.profile == 'geodetic':
self.out_srs.ImportFromEPSG(4326)