自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(128)
  • 收藏
  • 关注

原创 git总结

git add .:add all filesgit rm --cached <file>: undo addgit commit -am <message>:add and commit

2021-04-28 20:01:37 70

原创 GPU服务器环境配置

下载早期版本的whl文件:https://download.pytorch.org/whl/torch_stable.html

2021-03-23 16:45:55 1251 1

原创 ubuntu20 基础配置整理

换镜像源。参考文章安装openssh-sever。参考文章安装oh-my-zsh:参考文章1和文章2注:如果github太慢可以用gitee上的镜像:https://gitee.com/mirrors如clone oh-my-zsh时可将命令git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh修改为git clone https://gitee.com/mirrors/oh-my-zsh.git ~/.oh.

2021-01-25 01:43:29 571

原创 在Blender python中安装OpenEXR报错OpenEXR.cpp:1:10: fatal error: Python.h: No such file or directory

Blender python安装OpenEXR

2023-02-16 18:54:21 429

原创 Linux系统报错:ssl.SSLCertVerificationError

用python发邮件

2022-11-29 17:31:08 504

原创 在linux中本地安装blender LTS

下载blender

2022-11-15 11:17:36 851

原创 可以调整压缩率的savez

可以调整压缩率的savez

2022-10-04 11:20:50 254

原创 解决:拷贝一个git repo后git表示所有文件都modified

git小问题

2022-08-29 15:34:57 425

原创 在ubuntu20中安装cuda

安装cuda

2022-07-31 16:31:39 2342

原创 在ubuntu中使用keychron/京东京造键盘

在ubuntu中使用京东京造键盘

2022-07-31 15:33:52 1314

原创 在win中配置GAMES101的代码环境

搭建计算机图形学入门课程GAMES101的作业代码运行环境

2022-07-19 18:23:43 812

原创 在Win11中安装mitsuba2

在windows系统中安装mitsuba渲染器

2022-07-12 14:29:00 456

原创 python可变长参数

def f(a=1, b=2): print(a) print(b)# both are equivalentf(*[0], **{'b': 3})print('-----')f(0, b=3)

2022-01-24 16:32:44 561

原创 正态分布随机数列的期望与方差分布(Student`s Theorem)

X1,⋯ ,Xn∼iidN(μ,σ2)X_1,\cdots,X_n \sim \text{iid} N(\mu,\sigma^2)X1​,⋯,Xn​∼iidN(μ,σ2)Xˉ∼N(μ,σ2n)\bar X \sim N(\mu, \dfrac{\sigma^2}{n})Xˉ∼N(μ,nσ2​)∑i=1n(Xi−Xˉ)2∼σ2χ2(n−1)\sum_{i=1}^n (X_i-\bar X)^2 \sim \sigma^2 \chi^2(n-1)∑i=1n​(Xi​−Xˉ)2∼σ2χ2(n−1)Xˉ\b

2021-11-26 12:30:49 1469

原创 随机向量的协方差

设a⃗=[a1,a2,⋯ ,an]⊤\vec a = [a_1,a_2,\cdots, a_n]^\topa=[a1​,a2​,⋯,an​]⊤X⃗=[X1,X2,⋯ ,Xn]⊤\vec X = [X_1,X_2,\cdots, X_n]^\topX=[X1​,X2​,⋯,Xn​]⊤b⃗=[b1,b2,⋯ ,bn]⊤\vec b = [b_1,b_2,\cdots, b_n]^\topb=[b1​,b2​,⋯,bn​]⊤Y⃗=[Y1,Y2,⋯ ,Yn]⊤\vec Y = [Y_1,Y_2,\cdots

2021-11-12 14:41:50 1987

原创 CS seminar exercise template in latex

\documentclass[addpoints,UTF8]{exam}\usepackage[fontset=windows]{ctex} % Chinese support\usepackage{zhnumber} % Chinese number support\usepackage{amsmath} % Math formula support\usepackage{listings} % Code s

2021-10-19 00:22:33 97

原创 numpy数值计算实例

∑i=−5050∑j=−5050∑k=−50501i2+j2+k2−0.25\sum_{i=-50}^{50}\sum_{j=-50}^{50}\sum_{k=-50}^{50}\frac{1}{i^2+j^2+k^2-0.25}i=−50∑50​j=−50∑50​k=−50∑50​i2+j2+k2−0.251​代码:import numpy as npk = 50N = 2*k+1n1 = np.arange(-k, k+1, 1)n1 = np.tile(n1[:, np.newaxis

2021-10-17 22:46:33 115

原创 文件批量重命名

去除文件名中的"PNG":ls | while read f; do mv "$f" "$(echo $f | sed 's/PNG//g')"; done重命名为顺序数字:ls -v | cat -n | while read n f; do mv -n "$f" "$n.ext"; done ls | cat -n | while read n f; do mv "$f" `printf "%04d.ext" $n`; done # with leading zerosnum=0; f

2021-10-14 15:14:11 90

原创 c++ move

考虑一个场景:#include <iostream>#include <cstring>class String{private: char *m_Data; unsigned m_Size;public: String(); String(const char* p) { m_Size = strlen(p)+1; m_Data = new char[m_Size]; memcpy

2021-08-11 17:14:54 96

原创 C++高阶语法

lvalue & rvaluervalue举例#include <string>using namespace std;int getValue(){ return 100;}int main(){ int a = 10; int b = getValue(); string firstname = "Wu"; string lastname = "Jun"; string fullname = firstname + lastname;}这段代码中

2021-08-11 15:20:38 112

原创 shell总结

列出子文件夹中所有文件的扩展名find . -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u

2021-07-06 19:47:36 52

转载 How to Fix ‘E: Could not get lock /var/lib/dpkg/lock’ Error in Ubuntu Linux

https://itsfoss.com/could-not-get-lock-error/

2021-06-12 12:15:34 48

转载 Run a command that is shadowed by an alias

You can also prefix a back slash to disable the alias: \lsEdit: Other ways of doing the same include:Use “command”: command ls as per Mikel.Use the full path: /bin/ls as per uther.Quote the command: “ls” or ‘ls’ as per Mikel comment.You can remove th.

2021-06-08 22:16:12 610

原创 Implement Divison

#include "stdio.h"// 16-bit integerint divisor = 3;int reminder = 17; // also the dividendint quotient = 0;void divide(){ divisor <<= 15; for (int i = 0; i < 16; ++i) { if ((reminder -= divisor) >= 0) { quoti

2021-06-03 11:42:08 56

原创 Xilinx FPGA编程备忘录

按键布局 U LCR Dup-down-left-right-center用iverilog检查语法错误iverilog -o a.vpp <tb file> <dependency files>if [ $? -eq 0 ]; then vvp a.vppfi用Vivado debug右键*_tb.v文件,点击Set as Top点击Run Simulation如需添加新的变量,参考这里;如需删除,选中相应变量后按delete即可多选左侧

2021-05-27 17:50:39 141

原创 NPC conversions

3SAT to HC

2021-05-26 15:12:57 119

原创 解决:pip is configured with locations that require TLS/SSL, howeve......

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available问题是OpenSSL版本过低或未安装解决方法:到OpenSSL官网下载Win64 OpenSSL Light安装后pip恢复正常参考:https://blog.csdn.net/wbj_code_life/article/details/97887891...

2021-04-24 15:22:20 307

原创 win10下删除linux双系统

下载并安装EFI管理工具EasyUEFI,试用版就够用了备份EFI启动项。依次点击:管理EFI启动项——其他操作——备份3. 删除ubuntu启动项4. 打开磁盘管理器,删除ubuntu分区

2021-04-15 20:32:02 364

原创 vscode下运行matlab程序

用到三个扩展程序:Matlab:代码高亮、语法检查、用户片段matlab-formatter:代码格式化Matlab Interactive Terminal:集成终端Matlab在settings.json中做如下配置: "files.associations": {"*.m": "matlab"}, "[matlab]": { "files.encoding": "gb2312" }, "matlab.matlabpath": "C:\\Program Files\\MATLA

2021-04-10 18:04:47 2752

原创 最小二乘法的数学解释

我们做出如下假设:y(i)=θ⊤x(i)+ϵ(i)y^{(i)}=\theta^\top x^{(i)} + \epsilon^{(i)}y(i)=θ⊤x(i)+ϵ(i)其中ϵ(i)∼N(0,σ2)\epsilon^{(i)} \sim N(0, \sigma^2)ϵ(i)∼N(0,σ2)亦即P(ϵ(i))=12πσexp⁡(−(ϵ(i))22σ2)P(\epsilon^{(i)}) = \dfrac{1}{\sqrt{2\pi}\sigma} \exp \left(-\dfrac{(\epsil

2021-04-03 23:47:56 205 1

转载 pipdeptree 查看Python包之间的依赖关系

# 安装pip install pipdeptree -i http://mirrors.aliyun.com/pypi/simple/ # 帮助信息pipdeptree --help# 查看pipdeptree的依赖包pipdeptree -p pipdeptree # 查看哪些包依赖pipdeptreepipdeptree -p pipdeptree -r

2021-04-01 09:59:56 658

原创 matlab基础语法

size(matrix):查看矩阵各维度长度permute(matrix, dimorder):按照dimorder重排各个维度,与reshape不同reshape(matrix, newshape):按照newshape改变矩阵的形状

2021-03-11 21:36:30 104

原创 从google drive上下载大文件

前提:有一个翻墙软件直接从网页下载慢且容易断线,从客户端下载就好很多安装google drive for desktop:链接

2021-03-10 11:11:40 3599

原创 make a PR on github

首先进入作者的repository,点击Fork,克隆出一个属于自己的repository,在其中的任何修改不会影响作者的repository复制自己的repository链接,并下载git clone <link>进入目标文件夹后,新建一个分支并命名git checkout -b <branch name>修改文件git add <modified files name>git commit -m "explain what y..

2021-03-09 22:18:27 123

原创 手动实现keras.utils.to_categorical

def to_categorical_1d(train_labels): ret = np.zeros((len(train_labels), train_labels.max()+1)) ret[np.arange(len(ret)), train_labels] = 1 return reta = np.array([5, 0, 4, 1, 9, 2, 1, 3, 1, 4])R = to_categorical_1d(a)print(a)print(R)[5 0

2021-03-07 15:12:01 134

原创 jupyterlab基础配置

修改conda的default working directory命令行输入jupyter lab --generate-config,效果为在C:\Users\<username>\.jupyter下创建配置文件jupyter_notebook_config.py修改该文件中的c.ServerApp.root_dir条目为想要的工作目录即可interactive matplotlib参考conda install -y nodejspip install ipympljup

2021-03-06 20:34:59 227

原创 求解argmin |Ax|

问题:给定矩阵 AAA, 求解x0=arg min⁡x∥Ax∥\boldsymbol{x_0} = \argmin_\boldsymbol{x}\|A\boldsymbol{x}\|x0​=xargmin​∥Ax∥解:∥Ax∥2=∥UDV⊤x∥2=∥DV⊤x∥2=∥y∥=1y=V⊤x∥Dy∥2=(σ1y1+⋯+σryr)2≥σr2\begin{aligned}\|Ax\|^2 & = \|UDV^\top x\|^2 \\ & = \|DV^\top x\|^2 \\&a

2021-03-03 21:57:42 698

原创 ubuntu的conda虚拟环境下安装OpenEXR

安装依赖环境:sudo apt install libopenexr-devpip install openexr如果是在conda虚拟环境下安装,可能会报链接错误:解决方法非常暴力,直接把库拷贝到虚拟环境下:cd ~/miniconda3/envs/<env_name>/libcp /usr/lib/x86_64-linux-gnu/libIex* .cp /usr/lib/x86_64-linux-gnu/libImath* .cp /usr/lib/x86_64-lin.

2021-03-03 16:25:14 347

原创 image downsampling in python

1 适用于灰度图像或者三通道图像的降采样def downsampling(img, k): """ Down-sample an image of shape (h, w) into an image of shape(h/k, w/k), by averaging every k*k elements. img: an image of 2D or 3D k: edge length of the kernel Can apply t

2021-03-02 01:22:07 962

原创 dcraw使用小结

查看照片信息:dcraw -i -v [image]color options-w: use the white balance specified by camera-o 1: specify output color space as sRGBinterpolation options-q 3: interpolation with highest quality-d/D/E: no interpolationoutput options-4: linear 16 bit-T: w

2021-03-01 11:47:49 444

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除