Skip to content

Instantly share code, notes, and snippets.

View ypwhs's full-sized avatar
:octocat:
Focusing

杨培文 (Yang Peiwen) ypwhs

:octocat:
Focusing
View GitHub Profile
@xqm32
xqm32 / clash-yacd.yaml
Last active February 28, 2024 08:44
Docker Compose for Clash and YACD
services:
# See https://github.com/Dreamacro/clash/wiki/Running-Clash-as-a-service#docker
clash:
# ghcr.io/dreamacro/clash
# ghcr.io/dreamacro/clash-premium
# dreamacro/clash
# dreamacro/clash-premium
image: dreamacro/clash-premium
container_name: clash-premium
volumes:
@notaTeapot
notaTeapot / o3d_widget_with_editing_demo.py
Last active July 11, 2024 08:29
Open 3d Widget with editing
# Partially Working Error on Exit
from PySide2 import QtWidgets, QtGui,QtCore
import open3d as o3d
import win32gui
import sys
import threading
import time
class Worker(QtCore.QObject):
@jtmoon79
jtmoon79 / python-embedded-for-Win10.md
Last active July 8, 2024 07:08
fully configuring embedded Python on Windows 10

Update: use PowerShell script PythonEmbed4Win.ps1.

The instructions in this gist have some subtle problems and this gist will not be updated.

About


@jacobtomlinson
jacobtomlinson / docker-compose.yml
Created March 25, 2021 16:43
Monitoring RAPIDS with Prometheus and Grafana (configs)
version: "3.9"
services:
rapids:
image: rapidsai/rapidsai:0.18-cuda11.0-runtime-ubuntu16.04-py3.8
ports:
- "8888:8888" # Jupyter
- "8786:8786" # Dask communication
- "8787:8787" # Dask dashboard
# Raspberry Pi的GPU对 H264有一系列针对 MPEG4 H264、MPEG2 和 VC1(需要额外授权)的硬件加速优化,为了得到最好的性能,建议先对树莓派的启动设置文件(/boot/config.txt)进行如下的调整:
gpu_mem=256
framebuffer_depth=16
# 直接使用 apt-get 安装的ffmpeg没有专门的优化,对硬解的支持不好,所以需要自己从源码编译安装,首先用 apt-get 安装一些必要的包:
apt-get install autoconf automake build-essential libass-dev libfreetype6-dev libtheora-dev libtool libvorbis-dev pkg-config texinfo zlib1g-dev unzip cmake yasm libx264-dev libmp3lame-dev libopus-dev bzip2-dev
@dusty-nv
dusty-nv / pytorch-1.10-jetpack-4.5.1.patch
Last active April 15, 2024 18:31
PyTorch patch for building on JetPack >= 4.4
diff --git a/aten/src/ATen/cpu/vec/vec256/vec256_float_neon.h b/aten/src/ATen/cpu/vec/vec256/vec256_float_neon.h
index 2aac442d21..f2321dad7a 100644
--- a/aten/src/ATen/cpu/vec/vec256/vec256_float_neon.h
+++ b/aten/src/ATen/cpu/vec/vec256/vec256_float_neon.h
@@ -26,6 +26,9 @@ namespace {
// Most likely we will do aarch32 support with inline asm.
#if defined(__aarch64__)
+// See https://github.com/pytorch/pytorch/issues/47098
+#if defined(__clang__) || (__GNUC__ > 8 || (__GNUC__ == 8 && __GNUC_MINOR__ > 3))
@zrt
zrt / Caddyfile
Created January 29, 2020 10:09
用 Caddy 反代了一些网站
###################
# #
# SU.SG #
# #
###################
# https://mp.weixin.qq.com/s/H3OOqhFRr0YZGorIAlsCjA
# todo
# replace or remove content-security-policy header
import numpy as np
import pandas as pd
import bottleneck as bn
# Read And Count
trainDF = pd.read_csv('train.csv',sep=',',header=0)
lenTrain = len(trainDF)
valDF = pd.read_csv('submission.csv',sep=',',header=0)
lenVal = len(valDF)
trainFold = pd.read_csv('train_5fold_20181219.csv',sep=',',header=0)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@leowinterde
leowinterde / Gitlab Permissions Fix
Created January 11, 2018 10:21
gitlab-ce permissions fix
# Holds repositories directory
sudo chown -R -v git:root /var/opt/gitlab/git-data
sudo chmod -R -v 0700 /var/opt/gitlab/git-data
# Holds git repositories
sudo chown -R -v git:git /var/opt/gitlab/git-data/repositories
sudo chmod -R -v 2770 /var/opt/gitlab/git-data/repositories
# Holds large object directories
sudo chown -R -v git:gitlab-www /var/opt/gitlab/gitlab-rails/shared