Skip to content

Instantly share code, notes, and snippets.

View bash99's full-sized avatar

Ben Rood bash99

View GitHub Profile
@bash99
bash99 / gist:22515059f91a0384504668e1126b963a
Created November 10, 2024 11:16
Delete Aliyun Trash for debian 12 images
#!/bin/sh
# modified base on kxn's scripts https://github.com/kxn/scripts/blob/master/CentOS/remove-aliyun-trash.sh
cd /tmp
wget http://update.aegis.aliyun.com/download/uninstall.sh
chmod +x uninstall.sh
./uninstall.sh
wget http://update.aegis.aliyun.com/download/quartz_uninstall.sh
chmod +x quartz_uninstall.sh
./quartz_uninstall.sh
@bash99
bash99 / gist:ced823aaf4ed215aa721a397ea9a71ed
Created September 5, 2024 17:04
nvidia cuda related through pip?
cublas64_11.dll
?pip install nvidia-pyindex
#pip install --upgrade nvidia-tensorrt==10.2.0
pip install pip_search
pip install tensorrt-cu12==10.2.0.post1 tensorrt-cu12-libs tensorrt-cu12-bindings nvidia-cuda-nvcc-cu12==12.5.82
pip install cuda-python==12.5 nvidia-cuda-nvrtc-cu12==12.5.82 nvidia-cuda-nvcc-cu12==12.5.82 nvidia-cuda-runtime-cu12==12.5.82
@bash99
bash99 / test.py
Created August 12, 2024 07:50
speed test for onnx backend vs sentence_transformer backend of BCE Reranker model
import torch
from sentence_transformers import CrossEncoder
from transformers import AutoTokenizer
import onnxruntime
import numpy as np
from copy import deepcopy
from typing import List
from abc import ABC, abstractmethod
import os
import concurrent.futures
#!/bin/bash
# cross & static compile shadowsocks-libev
PCRE_VER=8.44
PCRE_FILE="https://ftp.pcre.org/pub/pcre/pcre-$PCRE_VER.tar.gz"
MBEDTLS_VER=2.16.6
MBEDTLS_FILE="https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz"
@bash99
bash99 / haproxy.cfg
Created October 26, 2017 12:32
haproxy cfg for http_proxy check
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock.3001 mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon