Skip to content

Instantly share code, notes, and snippets.

View zengqingfu1442's full-sized avatar
๐Ÿ 
Working from home

zengqingfu1442 zengqingfu1442

๐Ÿ 
Working from home
View GitHub Profile
[mac osไธ‹vscodeๅฟซๆท้”ฎ](https://www.cnblogs.com/informatics/p/8315339.html)
ๅ…จๅฑ€
Command + Shift + P / F1 ๆ˜พ็คบๅ‘ฝไปค้ขๆฟ
Command + P ๅฟซ้€Ÿๆ‰“ๅผ€
Command + Shift + N ๆ‰“ๅผ€ๆ–ฐ็ช—ๅฃ
Command + W ๅ…ณ้—ญ็ช—ๅฃ
ๅŸบๆœฌ
Command + X ๅ‰ชๅˆ‡๏ผˆๆœช้€‰ไธญๆ–‡ๆœฌ็š„ๆƒ…ๅ†ตไธ‹๏ผŒๅ‰ชๅˆ‡ๅ…‰ๆ ‡ๆ‰€ๅœจ่กŒ๏ผ‰
Command + C ๅคๅˆถ๏ผˆๆœช้€‰ไธญๆ–‡ๆœฌ็š„ๆƒ…ๅ†ตไธ‹๏ผŒๅคๅˆถๅ…‰ๆ ‡ๆ‰€ๅœจ่กŒ๏ผ‰
@zengqingfu1442
zengqingfu1442 / mlx_distributed_deepseek.md
Created April 10, 2025 10:28 — forked from awni/mlx_distributed_deepseek.md
Run DeepSeek R1 or V3 with MLX Distributed

Setup

On every machine in the cluster install openmpi and mlx-lm:

conda install conda-forge::openmpi
pip install -U mlx-lm

Next download the pipeline parallel run script. Download it to the same path on every machine:

@zengqingfu1442
zengqingfu1442 / harvester-gpu.md
Created May 1, 2024 15:49 — forked from kralicky/harvester-gpu.md
Harvester GPU Provisioning

Harvester GPU Provisioning

  1. Install Harvester, then SSH into the server.

  2. Edit /boot/grub/grub.cfg as follows:

 set default=0
 set timeout=10
 

Harvester SNAT Problem

Problem Description

Harvester leverages the Kubernetes service to provide the load balancer for the service in the Harvester virtual machines. The backend servers of the load balancer are the <VM IP>:<service port>.

cw-harv:/home/rancher # kubectl get svc
NAME                        TYPE           CLUSTER-IP      EXTERNAL-IP    PORT(S)        AGE
default-nginx-lb-db9bdca5 LoadBalancer 10.43.113.238 80:32586/TCP 4h32m
import collections
import uuid
from typing import Dict
import numpy as np
import tritonclient
import tritonclient.grpc as grpcclient
import tritonclient.utils.shared_memory as shm
ShmHandle = collections.namedtuple(
@zengqingfu1442
zengqingfu1442 / docker-registry-mirrors.md
Created October 31, 2023 12:34 — forked from y0ngb1n/docker-registry-mirrors.md
ๅ›ฝๅ†…็š„ Docker Hub ้•œๅƒๅŠ ้€Ÿๅ™จ๏ผŒ็”ฑๅ›ฝๅ†…ๆ•™่‚ฒๆœบๆž„ไธŽๅ„ๅคงไบ‘ๆœๅŠกๅ•†ๆไพ›็š„้•œๅƒๅŠ ้€ŸๆœๅŠก | Dockerized ๅฎž่ทต https://github.com/y0ngb1n/dockerized

Docker Hub ้•œๅƒๅŠ ้€Ÿๅ™จ

ๅ›ฝๅ†…ไปŽ Docker Hub ๆ‹‰ๅ–้•œๅƒๆœ‰ๆ—ถไผš้‡ๅˆฐๅ›ฐ้šพ๏ผŒๆญคๆ—ถๅฏไปฅ้…็ฝฎ้•œๅƒๅŠ ้€Ÿๅ™จใ€‚Docker ๅฎ˜ๆ–นๅ’Œๅ›ฝๅ†…ๅพˆๅคšไบ‘ๆœๅŠกๅ•†้ƒฝๆไพ›ไบ†ๅ›ฝๅ†…ๅŠ ้€Ÿๅ™จๆœๅŠกใ€‚

Dockerized ๅฎž่ทต https://github.com/y0ngb1n/dockerized

้…็ฝฎๅŠ ้€Ÿๅœฐๅ€

Ubuntu 16.04+ใ€Debian 8+ใ€CentOS 7+

@zengqingfu1442
zengqingfu1442 / Dockerfile.deb_rpm_nginx
Created August 2, 2023 06:54 — forked from ismail0352/Dockerfile.deb_rpm_nginx
Creating your own .deb file repo and host it using Nginx container with "autoindex on;"
FROM ubuntu as ubuntu
RUN apt-get update
RUN apt-get install -y dpkg-dev wget gnupg2 curl
ARG ubuntu_packages="wget htop default-jre-headless apt-transport-https nvidia-container-toolkit cuda-drivers libopengl0 linux-image-extra-virtual omnisci"
WORKDIR /opt/packages/deb
# Nvidia-Docker
@zengqingfu1442
zengqingfu1442 / gitstats.sh
Created February 9, 2023 07:12 — forked from xeoncross/gitstats.sh
Git - calculate how many lines of code were added/changed by someone
# Run this in the project repo from the command-line
# http://stackoverflow.com/a/4593065/99923
git log --shortstat --author "Xeoncross" --since "2 weeks ago" --until "1 week ago" | grep "files changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed", files, "lines inserted:", inserted, "lines deleted:", deleted}'
@zengqingfu1442
zengqingfu1442 / Structure.md
Created September 29, 2022 08:06 — forked from JeOam/Structure.md
Project Structure for Python (Tornado) Application

Project:

  • project/: A directory named with the project's name which stores the actual Python package
    • __init__py
    • app.py
    • settings.py
    • urls.py
    • models/
      • __init__.py
      • baes.py
  • handlers/
@zengqingfu1442
zengqingfu1442 / thread.py
Created May 29, 2022 04:26 — forked from ruedesign/thread.py
Python thread sample with handling Ctrl-C
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, time, threading, abc
from optparse import OptionParser
def parse_options():
parser = OptionParser()
parser.add_option("-t", action="store", type="int", dest="threadNum", default=1,
help="thread count [1]")