我的网站大全
写在前面
If any English-speaking friends see my GitHub repository, some of the resources here might be helpful to you too! You can use translation software to read it.
Here, I have curated a collection of websites and small tools that I find to be of good taste, covering but not limited to the following areas:
- Mathematics learning
- Basic computer science learning (operating systems, etc.)
- Basic computer operations (Windows system, Linux system, Docker)
- Basic deep learning study materials and practical resources
- Deep learning system study materials
- Basic language learning (Python, C++)
- Interesting open-source projects and tools (can replace common workflows)
Updated periodically, enjoy your time here
With a sidebar directory (viewable on desktop):
https://www.aispacewalk.cn/docs/other/awesomeweb
GitHub open-source repository: https://github.com/sanbuphy/my-awesome-cs
收录了品味好的网站与工具,涵盖不限于以下领域:
- 数学学习
- 计算机基础学习(操作系统等)
- 计算机操作基础(windows系统、linux系统、docker)
- 深度学习基础学习资料及实践资料
- 深度学习系统学习资料
- 语言基础学习(python、c++)
- 有趣的开源项目和工具(可替换常见工作流)
不定期更新
带目录边栏(电脑上可看):[https://www.aispacewalk.cn/docs/other/awesomeweb](https://www.aispacewalk.cn/docs/other/awesomeweb)
github开源仓库地址: [https://github.com/sanbuphy/my-awesome-cs](https://github.com/sanbuphy/my-awesome-cs)
Feel free to discuss with me in the github issue!
基础素质(参考NJU-PAhttps://nju-projectn.github.io/ics-pa-gitbook/ics2024/ )
提问的艺术
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
不像弱智一样提问
https://github.com/tangx/Stop-Ask-Questions-The-Stupid-Ways/blob/master/README.md
不要再偷懒了——南大蒋炎岩
部分内容出自以下参考网站,也欢迎关注他们
PPRP:
https://www.cnblogs.com/pprp/p/8880493.html
如需转载请注释原出处即可,谢谢
数学
机器学习相关数学基础
李航统计学习基础第一章补数学基础 只需要第一张 补基础,其他有问题再找
Deep Learning An MIT Press book参考第一章即可,中文版在这或者直接下载附件中dlbook_cn_v0.5-beta。
概率论与数理统计
陈希孺 概率论与数理统计基础 参考课程视频地址
【概率统计课程学习总结】1. 台大概率与台湾交通大学统计课 - 奶油煎蛋红烧肉的文章 - 知乎 https://zhuanlan.zhihu.com/p/86071634
台湾大学 - 頑想學概率:機率一 (Probability (1))
台湾大学 - 頑想學概率:機率二 (Probability (2))
台湾交通大学 - 高等統計學 Advanced Statistics
线性代数
Linear Algebra for Everyone 图解
https://github.com/kenjihiranabe/The-Art-of-Linear-Algebra
矩阵求导入门 或者你也可以参考我整理的文章:
https://sanbuphy.github.io/p/矩阵求导简易入门手册/
线代启示录(一位掌握了线代灵魂的老师)
immersive linear algebra 线性代数可视化
http://immersivemath.com/ila/index.html
新MIT 线性代数 18.065 by Gilbert Strang
https://www.bilibili.com/video/BV1a7411M7wH?p=1&vd_source=a6509cab8ccb8b81d6a70af693cc008f
CS大类
CS自学指南【必看】
【北美名校CS课程集锦】2.加州大学伯克利分校CS课程全集 - 文兄的文章 - 知乎 https://zhuanlan.zhihu.com/p/102083014
Quick Reference开发人员速查表(各种语言、脚本、常用工具的命令速查)
基本操作
GDB、VIM、GIT、Terminal艺术
- The Missing Semester of Your CS Education 中文版(强烈推荐)
- 南大PA教程最下面的一些简单入门和材料
https://nju-projectn.github.io/ics-pa-gitbook/ics2021/index.html
- 命令行的艺术(总结了各种命令行下相关好物)
- 如何学习写shell脚本(封装)可参考的项目:
https://github.com/sanbuphy/vimplus/blob/master/install.sh
- shell和程序开头的字符画LOGO生成工具
https://tools.kalvinbg.cn/txt/ascii
系统相关及系统信息相关
获取CPU的性能信息和常见信息,涵盖x86/arm等多硬件
https://github.com/pytorch/cpuinfo
如何开机自动挂载新硬盘(非ubuntu安装硬盘)
https://blog.csdn.net/qq_27370437/article/details/117806294
如何维护和切换gcc与g++代码(两种方案)
最简单的,通过设置不同优先级并切换即可:
# https://www.cnblogs.com/haiyonghao/p/14440283.html
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40
# 设置gcc-5的优先级
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 50
# 修改系统中的默认gcc版本
sudo update-alternatives --config gcc
#如果想要根据优先级切换gcc版本,可以输入这个后在输入前面设定的数字
sudo update-alternatives --config gcc
https://blog.csdn.net/FX677588/article/details/78681325
https://cloud.tencent.com/developer/article/1430839
如何及时获取可视化的CPU频率和使用率信息:(Linux 查看CPU当前运行频率和温度)
sudo pip install s-tui
sudo s-tui
多线程并发解压缩文件
https://zhuanlan.zhihu.com/p/389817246
pigz -k your_file_name # 压缩文件
tar -cvf - dir1 dir2 dir3 | pigz > output.tar.gz # 压缩文件夹
unpigz -d your_file_name.gz
git相关,git指南
- 通过聊天的感觉入门并熟练git
https://wkevin.github.io/GitChat/gitchat.html#round-1-起步
- git常见操作整理
https://www.ruanyifeng.com/blog/2015/12/git-cheat-sheet.html
- 简单的git ssh秘钥教程
https://blog.csdn.net/helloasimo/article/details/123778112
- 添加了SSH密钥,git推送/拉取时要求验证
https://blog.csdn.net/qq_37435462/article/details/122240506
- 简单的pr教程
https://mmcv.readthedocs.io/zh_CN/latest/community/pr.html
- github linux下的desktop版
https://github.com/shiftkey/desktop/releases
- git的rebase的使用说明(可用于合并多次commit,修改commit等情况)
https://www.jianshu.com/p/4a8f4af4e803
- git中文乱码问题解决
git config --global i18n.commitencoding utf-8
git config --global i18n.logoutputencoding utf-8
export LESSCHARSET=utf-8
- git 删除历史记录大文件,减轻负担 https://blog.csdn.net/baobaoxiannv/article/details/105586187
- git如何结束一大堆的safe directory问题(少部分还可以自己一个个忽略,如果全都是就只能这样先把所有safe git 警告关闭
git config --global --add safe.directory '*'
- git-ssh: connect to host github.com port 22: Connection timed out
-
先看看ssh -T -p 443 git@ssh.github.com能不能访问,可以的话就进行修改转发:
编辑 ~/.ssh/config 文件,如果没有config文件的话就直接 vim ~/.ssh/config加入以下内容 (windows在C:\Users\你的用户名\.ssh 中)
-
Host github.com
HostName ssh.github.com #或者是Hostname
Port 443
再次测试 `ssh -T git@github.com`即可
- vscode免密登陆远程服务器,git免密
-
确保已经有本地公钥私钥,如果没有就
ssh-keygen
生成 -
默认拷贝本地公钥到目标服务器(如果有端口也-p加上端口)如果是windows可以在gitbash中操作即可或者用wsl的鉴权地址指定,随后
ssh-copy-id user@remote-host
即可,如果你是windows强烈建议手动指定下:C:\\Users\\你的用户名\\.ssh\\id_rsa.pub
linux下也可:ssh-copy-id -i ~/.ssh/id_rsa.pub user@remote-host
,这步结束后,可以直接在终端ssh测试下能否直接连上,理论上可以直接。
-
vscode中加入配置即可:(修改下列配置成为你自己的配置),如果还需要密码就是IdentityFile 了
-
Host 名字
HostName ssh的名字
Port 端口
User username
IdentityFile "C:\Users\你的用户名\.ssh\id_rsa"
IdentityFile "~/.ssh/id_rsa"
- git 放宽安全策略(safe directory)
git config --global --add safe.directory '*'
- server certificate verification failed. CAfile: none CRLfile: none 相关错误:
git config --global http.sslverify false
- mirror加速: https://mirror.ghproxy.com/
- github mirror大全https://blog.csdn.net/liveon_/article/details/127933041
- 调整一些规则(主要是代理规则),可以使用比如
git config --global --edit\
git config --global url."https://hub.fastgit.xyz/".insteadOf "https://github.com/"
git config protocol.https.allow always
- github 镜像加速,快速更换所有文件
find . -type f -exec sed -i 's|https://github.com/|https://更换成镜像加速地址/|g' {} +
- wsl 提示 NTA 网络问题无法 proxy:
# 在 Windows 的 %UserProfile%\.wslconfig 文件中添加以下内容:
# Settings apply across all Linux distros running on WSL 2
[wsl2]
networkingMode=mirrored # 开启镜像网络
dnsTunneling=true # 开启 DNS Tunneling
firewall=true # 开启 Windows 防火墙
autoProxy=true # 开启自动同步代理
[experimental]
hostAddressLoopback=true
ubuntu常见疑难解答
-
快速下载ubuntu镜像: 找到官网下载链接后使用wget下载
-
简单安装双系统
1、安装windows(因为windows的boot优先级比较高)
2、安装ubuntu,他能检测到和windows并存的状态,选择那个安装即 可
-
简单更换ubuntu镜像源
- Settings→About→Software Updates→Download from
- 选择其他服务器,然后找到中国,选择进行测试以便找到最快的站点。
-
sudo apt-get update: 0% [正在等待报头]问题的解决(参考https://article.itxueyuan.com/XP2rn)
- 先断网然后找到Settings→About→Software Updates关闭所有下载
- sudo apt-get clean
- 接下来将/etc/apt/source.list文件内容清空并保存
- 恢复网络,将第一步中取消掉的四个选项重新点选然后在最佳国内服务器更新即可。
-
给第三方软件appimage加上快捷方式:https://www.cnblogs.com/HGNET/p/16396589.html
-
ubuntu实体机快照:
-
ubuntu循环依赖问题:
在安装某些东西的时候,你很可能会遇到循环依赖问题,这里慎重降级!!!!除非是必需品。操作不当很容易直接把服务/内核挂了,此时最好的办法是开个docker。(尤其是看到lib XXX的时候要小心)
-
ncdu
工具分析磁盘空间占用情况(超好用,如果是wsl,运行ncdu --exclude /mnt
// wsl下排除/mnt (当然,你也可以用 sudo du -d 1 -h | less 进一步分析) -
如何打造Ubuntu Togo 利用虚拟机
-
改变ubuntu swap大小
-
ubuntu陷入休眠怎么办如何关闭ubuntu自动休眠:
首先检查系统日志是不是陷入休眠了,或者直接看
systemctl status sleep.target
如果loaded说明启动了挂起规则,此时只需要如此操作后重新查看状态至masked即可:
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
-
快速挂载一个新的盘:
# 方法一(推荐)先分区然后创建文件系统
fdisk /dev/sdb
# 依次输入:n->p->1->回车->回车->w
fdisk -l # 查看到刚才分出来的新分区
mkfs.ext4 /dev/sdb1
# 方法二(不推荐) 直接格式化创建文件系统
# 执行:lsblk 然后 sudo mkfs.ext4 /dev/sdb
sudo mkdir /mnt/mydisk
sudo mount /dev/sdb1 /mnt/mydisk
# 永久挂载:
#打开配置文件
vi /etc/fstab
#在配置文件最后输入
/dev/vdb1 /目标目录 ext4 defaults 0 0
- 已有文件系统在扩容硬盘,如何继续扩容
# 没有分区,直接构建文件系统的情况
# 检查文件系统是否有错误,并准备扩展
sudo e2fsck -f /dev/sdb
# 使用 resize2fs 工具扩展文件系统:
sudo resize2fs /dev/sdb
# 已有分区,扩展该分区的文件系统
sudo apt-get install cloud-guest-utils
sudo growpart /dev/vdb 1
sudo resize2fs /dev/vdb1
sudo mount /dev/vdb1 /挂载点
- wget下载 如何不需要 -O 强制重命名文件,加入参数
--content-disposition
,wget可下载多文件,直接顺序空格间距接下去url 即可,或者 -i xxx.txt - /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found 类似问题:
# 更新系统 gcc 比较麻烦可以用 conda 里面的,直接修改环境变量就可以让他被优先查找
conda install -c conda-forge gcc_linux-64=12.1.0 gxx_linux-64=12.1.0
export PATH=$CONDA_PREFIX/bin:$PATH
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
# 永久保存 (不建议)
echo 'export PATH=$CONDA_PREFIX/bin:$PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc
WSL2常见疑难解答
【注! 推荐使用挂载/mnt的系统磁盘进行操作,否则很容易让wsl的虚拟磁盘占用很大,删除后无法释放。若你想要释放则需要参考下面的指定教程】
- WSL入坑指南(很全的资料,包括开发环境的配置)
- windows上安装ubuntu(WSL2):
1、在microsoft下载ubuntu 2、根据下列方式导出并导入镜像,防止占用C盘空间(默认安装在C盘)http://t.zoukankan.com/davidchild-p-15606786.html (用这个方法还可以及时快照保存~
- WSL2常用命令(开启关闭甚至注销等等
https://learn.microsoft.com/zh-cn/windows/wsl/basic-commands
- 安装WSL2专用systemctl【目前(2023/02/02)只能用于20.04,请勿在22.04中使用!】(慎重使用,可能会导致pycharm连接出现问题,请先快照后再进行尝试!
https://github.com/DamionGans/ubuntu-wsl2-systemd-script
- WSL中如何使用proxy:(服务器版本的通用方法)
- 第一步 下载:https://github.com/v2fly/fhs-install-v2ray 运行 install-release.sh,然后你可能会在里面发现在下载哪个zip要很久,可以直接wget下来解压即可
- 第二步 启动:直接 run 即可,然后设置一个本地json。 你可以后台运行,也可以在一个终端中运行起来,然后新开一个终端去export ALLproxy之类的就好,参考docker的做法,或者使用proxychains4也可以。)在终端中运行
/usr/local/bin/v2ray run -config /usr/local/etc/v2ray/config.json
即可启动! - 第三步 使用:就当作一个已经监听了某个端口的proxy使用即可
- 注释:当然,为了方便你可以自行改造,使用 /etc/init.d/ 目录中的服务命令或 service 命令替代systemctl。
- 注意!WSL2经常会与主机时间不同步,这可能会造成很多问题(包括proxy用不了),你最好设置一个启动脚本或自己执行
sudo hwclock -s
强制对WSL2时间进行同步,可使用sudo hwclock
查看WSL的当前时间, - 以防出现奇怪问题你可以经常对WSL做快照:https://blog.csdn.net/weixin_43425561/article/details/115765148
- 改变/增加WSL2的内存、swap空间大小
在C盘的用户主目录下(比如我的是C:\Users\sanbu)创建.wslconfig
文件夹,在里面输入
[wsl2]
memory=8GB
swap=16GB
# 为 WSL 2 虚拟机分配的处理器核心数量
# processors=<number>
在配置设置完之后,在powershell执行wsl --shutdown
命令进行关闭,随后再打开即可(注意,如果你使用了docker-desktop,实际上也是基于wsl2构建的,所以也会影响到的对应环境的资源
- 暴露wsl的服务(桥接):https://www.cnblogs.com/huanliu/p/17161388.html (记得开始要在powershell 中使用
Set-VMSwitch WSL -NetAdapterName 以太网
)此时桥接后可能还不能上网,需要加入8.8.8.8 nameserver
简单启动流程:
Set-VMSwitch WSL -NetAdapterName 以太网
然后运行下列ps1文件
echo "正在解除wsl桥接..."
Set-VMSwitch WSL -SwitchType Internal
echo "正在重启wsl"
wsl --shutdown
wsl --cd ~ -e ls
echo "`ndone"
pause
然后wsl中:
new_ip=新的映射ip
brd=新的映射ip.255
gateway=网关
nameserver=网关
net_dev=eth0
sudo ip addr del $(ip addr show $net_dev | grep 'inet\b' | awk '{print $2}' | head -n 1) dev $net_dev
sudo ip addr add $new_ip/24 broadcast $brd dev $net_dev
sudo ip route add 0.0.0.0/0 via $gateway dev $net_dev
sudo sed -i "\$c nameserver $nameserver" /etc/resolv.conf
- wsl的硬盘空间怎么办?——挂载其他硬盘,如:
sudo mount -t drvfs D: /mnt/d
- WSL怎么释 放空间,wsl硬盘压缩虚拟硬盘压缩:https://zhuanlan.zhihu.com/p/521747491
- 在Program Files\DOCKERimages\DockerDesktopWSL\data 之类的地方搜索
- 或者是 C:\Users\hp\AppData\Local\Packages\之类的地方搜索能找到ext4.vhdx文件
- WSL 有时候发现没法使用nvidia-smi怎么办?其实有时候是因为没有权限,如果你发现sudo nvidia-smi可以但是非sudo不行那可能是因为root 切 用户的时候权限错了。。。sudo su 用户 就可以解决问题,并不是显卡挂了
- 一个巨坑,WSL 和 Docker Desktop 的 bug 问题,如果你装了这两个可能会在启动wsl或者vscode链接wsl的时候遇到如下类似的问题:
Processing fstab with mount -a failed.
<3>WSL (8) ERROR: CreateProcessEntryCommon:370: getpwuid(0) failed 2
<3>WSL (8) ERROR: CreateProcessEntryCommon:374: getpwuid(0) failed 2
<3>WSL (8) ERROR: CreateProcessEntryCommon:577: execvpe /bin/sh failed 2
<3>WSL (8) ERROR: CreateProcessEntryCommon:586: Create process not expected to return
因为这时候你使用`wsl -l`会发现默认的发行版是 docker-desktop,所以我们需要把他切换成ubuntu即可:使用 `wsl -s Ubuntu` 设置成发行版即可(在 wsl -l 里找你的ubuntu版本)
- 注意不同的操作系统编辑创建文件后行尾符可能不同,使用的时候请显式在IDE指定是LF(如果需要在linux运行)否则会出现 command not found 的 报错。LF(Line Feed)使用于 Unix 和类 Unix 系统,表示为
\n
,是单个字符(ASCII 10);CRLF(Carriage Return + Line Feed)使用于 Windows 系统,表示为\r\n
,包含两个字符:回车(ASCII 13)和换行(ASCII 10)。 - windows 和wsl 的路径互相转换
# 1. 将 Windows 路径转换为 WSL 路径
wsl wslpath "F:/download"
# 2. 将当前的CMD目录转换为 WSL 路径
wsl wslpath "%cd%"
# 在WSL中运行这些命令:
# 1. 将 WSL 路径转换为 Windows 路径
wsl wslpath -w "/mnt/f/download"
# 2. 将当前的WSL目录转换为 Windows 路径
wsl wslpath -w `pwd`
windows常见工具箱
- 有关windows家的镜像源以及VS等的纯净安装文件,以及各种网络工程师能用到的软件程序安装包
- 图吧工具箱(给自己电脑做硬件分析等等
- DISM++ 最好用的windows控制面板工具箱(直接看release部分下载
https://github.com/Chuyu-Team/Dism-Multi-language
- Ubuntu - bash脚本与 Windows - bat 脚本互相转换工具(Bash to Bat Converter
https://daniel-sc.github.io/bash-shell-to-bat-converter/
- windows-linux命令行对照表
https://www.geeksforgeeks.org/linux-vs-windows-commands/
- windows下类似apt这种包管理软件——scoop
https://blog.csdn.net/weixin_45191386/article/details/130662281
- windows kill 指定端口程序
netstat -ano | findstr :<port_number>
taskkill /PID <pid> /F
-
硬盘分区和文件强制删除工具(比大多数的粉碎工具都好用)
-
用于在其他系统去除windows的
\r
标识,避免macos和linux运行报错:
sed -i '' $'s/\r$//' filename
-
美化 power shell全教程 https://www.kwchang0831.dev/dev-env/pwsh/oh-my-posh
我的推荐主题:
oh-my-posh init pwsh | Invoke-Expression
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\montys.omp.json" | Invoke-Expression
Import-Module posh-git