Skip to content

Instantly share code, notes, and snippets.

View wangjiezhe's full-sized avatar
🏠
Working from home

Jiezhe Wang wangjiezhe

🏠
Working from home
View GitHub Profile
@wangjiezhe
wangjiezhe / crossdev-fix-multilib.patch
Created May 7, 2023 04:38
fix multilib setting for sys-devel/crossdev
--- /usr/bin/crossdev 2022-12-17 00:33:21.559942156 +0800
+++ /opt/crossdev 2023-01-10 16:23:25.131824325 +0800
@@ -1310,7 +1310,7 @@
force+=" multilib"
;;
*)
- mask+=" multilib";;
+ mask+=" $( [[ ${MULTILIB_USE} == "yes" ]] && echo - )multilib";;
esac
BeginPackage["立体几何`"];
法向量::usage = "法向量[A,B,C]得到平面ABC的一个法向量";
单位法向量::usage = "单位法向量[A,B,C]得到平面ABC的一个单位法向量";
点面距离::usage = "点面距离[P,{A,B,C}]得到点P到平面ABC的距离";
四面体体积::usage = "四面体体积[A,B,C,D]得到四面体ABCD的体积";
@wangjiezhe
wangjiezhe / concat.ps1
Created April 8, 2022 08:03
合并文件夹内的所有视频文件
Param ($order = $(throw "Order parameter is required"))
$outfile = "【22春】9年级新思维精讲-第{0}节课.mp4" -f $order
$listfile = "list.txt"
New-Item -Force $listfile
Get-ChildItem -Name *.flv | ForEach-Object {
$tmp = "file './{0}'" -f $_
Add-Content -Path $listfile -Value $tmp
@wangjiezhe
wangjiezhe / tkz-euclid-cheatsheet.en.md
Created January 13, 2022 03:36 — forked from kpym/tkz-euclid-cheatsheet.en.md
cheatsheet : tkz-euclid (latex library based on tikz)

Gist

Package

\usepackage{tkz-euclide} % checked for version 3.02c

Point definitions

#!/bin/sh
tlmgr option repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet
tlmgr update --self --all
tlmgr install collection-latexrecommended collection-latexextra collection-langchinese collection-langgreek \
collection-pictures collection-luatex collection-xetex collection-mathscience collection-plaingeneric
import torch
torch.cuda.is_available()
torch.cuda.device_count()
torch.cuda.current_device()
torch.cuda.get_device_name(0)
import tensorflow as tf
@wangjiezhe
wangjiezhe / Upgrade-all-Python-packages-with-pip.md
Last active February 10, 2024 03:22
更新全部 python 包

列举所有需要升级的包:

pip list --outdated

在 Windows 上更新:

@wangjiezhe
wangjiezhe / free-docker-space-in-wsl2.blog.md
Last active December 9, 2022 14:20 — forked from banyudu/free-docker-space-in-wsl2.blog.md
WSL2 Docker释放磁盘空间

WSL2 Docker释放磁盘空间

Docker使用久了,会残留很多中间生成的镜像,占用磁盘空间。

要清理Docker镜像,本来是挺简单的,一条命令就搞定了:

@wangjiezhe
wangjiezhe / add_title.py
Last active May 7, 2023 04:43
解压并用压缩文件名进行重命名/增加标题
import os
import re
import time
import mutagen
import win32api
from zipfile import ZipFile
from rich.progress import track
@wangjiezhe
wangjiezhe / README.md
Created April 11, 2021 17:37 — forked from ZipFile/README.md
Pixiv OAuth Flow

Retrieving Auth Token

  1. Run the command:

    python pixiv_auth.py login

    This will open the browser with Pixiv login page.