Skip to content

Instantly share code, notes, and snippets.

@wych42
wych42 / clash.service
Last active February 5, 2024 05:39
Clash as transparent proxy(not totally transparent) on gateway box
[Unit]
Description=Clash service
After=network.target
[Service]
[Service]
Type=simple
StandardError=journal
User=clash
@kemingy
kemingy / benchmark.md
Last active January 12, 2023 04:44
Tensorflow Serving, TensorRT Inference Server (Triton), Multi Model Server (MXNet)

Environments

  • CPU: Intel(R) Xeon(R) Gold 6130 CPU @ 2.10GHz
  • GPU: NVIDIA V100
  • Memory: 251GiB
  • OS: Ubuntu 16.04.6 LTS (Xenial Xerus)

Docker Images:

  • tensorflow/tensorflow:latest-gpu
  • tensorflow/serving:latest-gpu
@mikroskeem
mikroskeem / gccemacs_osx.md
Last active July 7, 2024 09:37
gccemacs on OSX

gccemacs on OS X

Read this first: http://akrl.sdf.org/gccemacs.html

Prerequisites

1) GCC with libgccjit enabled

For that you need to compile gcc (duh). I edited Homebrew's gcc formula:

@cutiko
cutiko / Readme.md
Created November 22, 2019 18:24
Git delete last commit

Removing the last commit

To remove the last commit from git, you can simply run git reset --hard HEAD^ If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.

If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^ which will evict the commits from the branch and from the index, but leave the working tree around.

If you want to save the commits on a new branch name, then run git branch newbranchname before doing the git reset.

ORIGINAL did fork but search didn't helped me

@seanorama
seanorama / pyspark-on-yarn-self-contained.md
Last active January 17, 2025 14:39
PySpark on YARN in self-contained environments
@dominiklohmann
dominiklohmann / banner.png
Last active December 20, 2023 19:22
yabai autoupdate
banner.png
@tony1016
tony1016 / clash
Created June 15, 2019 06:48
Openwrt init.d script for clash
#!/bin/sh /etc/rc.common
START=99
STOP=15
USE_PROCD=1
start_service(){
procd_open_instance clash
procd_set_param command /usr/bin/clash -d /etc/clash
log4j.appender.kafka=org.apache.kafka.log4jappender.KafkaLog4jAppender
log4j.appender.kafka.brokerList=localhost:9092
log4j.appender.kafka.topic=flink_logs
log4j.appender.kafka.layout=org.apache.log4j.PatternLayout
log4j.appender.kafka.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
log4j.appender.kafka.level=INFO
import numpy as np
import faiss
def search_knn(xq, xb, k, distance_type=faiss.METRIC_L2):
""" wrapper around the faiss knn functions without index """
nq, d = xq.shape
nb, d2 = xb.shape
assert d == d2