- 博客(406)
- 资源 (22)
- 收藏
- 关注
原创 211214-Word公式自动化AutoField
Word中6步公式居中及自动化编号更行https://guokliu.blog.csdn.net/Step 1: 插入公式Step 2: 定义格式Step 3: 插入域码Step 4: 回车显示Step 5: 重复二三Step 6: 全选更新
2021-12-14 10:34:39 993
原创 211213-LaTex生成Reference但无法显示Journal
问题:利用Zotero导出bib文件,然后LaTex排版,参考文献中没有期刊的名字。-分析Zotero生成的期刊名对应的字段是journaltitle,而LaTex在unsrt排序中,只识别journal,故此可将journaltitle=替换成journal=, 问题解决。...
2021-12-13 14:22:31 1962 1
原创 211212-LaTex排版IEEE双栏公式的3种方法
方法1: IEEE官方修改(本文推荐)\begin{figure*} \begin{equation} \label{eq-13} +++++++++++++++++ Put equation here +++++++++++++++++ \end{equation} \hrulefill % \vspace*{4pt}\end{figure*}方法2: IEEE官方,\begin{document}前插入\newcounter{my.
2021-12-12 18:57:45 6498
原创 211209-自定义Sklearn混淆矩阵及参数理解
在计算转移矩阵的时候,预测类别可能是实际类别的子集,sklearn自带的混淆矩阵不能直接使用,此处自定义,并进一步理解sklearn中混淆矩阵的定义。混淆矩阵Matlab中X-Target, Y-Output (Link)Sklearn中X-Output, Y-Target (Link)代码import numpy as npfrom sklearn.metrics import confusion_matrixdef my_confusion_matrix(y_true, y
2021-12-09 15:10:31 1558
原创 211201-LaTex插入图片作为公式且居中
Demo 1\begin{equation}[Son-Goku]\adjincludegraphics[valign=c, width=0.25in]{Figures/super1.png} + [Vegeta]\adjincludegraphics[valign=c, width=0.25in]{Figures/super2.png} = [Kugeta]\adjincludegraphics[valign=c, width=0.25in]{Figures/super3.png}\end{eq..
2021-12-02 13:12:48 748
原创 211130-Python谱图(Spectogram)分析Demo
STFT 算法对信号分段进行FFT处理, 每次处理的结果都是谱图中的一列;每段芯好的长度越短,时间轴上的精度越高,频率轴上的精度越低时间轴和频率轴的分辨率是一堆不可调和的矛盾根据傅立叶变换的不确定原理,我们不能同时获得频率和时间的高分辨率specgram() 函数第一个参数:信号的组数第二个参数:FFT的长度第三个参数:信号的采样频率overlap: 连续两块数据之间的重叠部分的长度, 该参数越接近FFT的长度,FFT运算的次数越多,时间轴上的精度越大import numpy a
2021-11-30 10:53:04 1970 1
原创 211112-多维数据分布MMD相似性计算Demo
运行结果main函数import matplotlib.pyplot as pltimport numpy as npmean1 = [0, 0]cov1 = [[5, 0], [-5, 10]] # diagonal covariancemean2 = [10, 0]cov2 = [[5, 0], [5, 10]] # diagonal covariancex1, y1 = np.random.multivariate_normal(mean1, cov1, 500..
2021-11-12 14:13:24 2172
原创 211111-Python十进制转二十六(用于Excel表格自动化统计)
base = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'def decTo26(num): l = [] while True: num,rem = divmod(num, 26) print(num, rem) l.append(base[rem-1]) if num == 0: print(l) return ''.join(l[::-1])num = 27
2021-11-11 17:36:57 849
原创 211024-Pytorch模型训练中显示进度条
# ! with tqdm def fit(self, args, model, device, train_loader, optimizer, epoch, vis=True): # print('Epochs: ', epoch) correct = 0 L = len(train_loader.dataset) model.train() with tqdm(train_loader, unit="bat...
2021-10-24 11:13:04 24035 2
原创 211014-Python短时傅里叶变换
from scipy import signalimport matplotlib.pyplot as pltrng = np.random.default_rng()fs = 10e3N = 1e5amp = 2 * np.sqrt(2)noise_power = 0.01 * fs / 2time = np.arange(N) / float(fs)mod = 500*np.cos(2*np.pi*0.25*time)carrier = amp * np.sin(2*np.pi*3e
2021-10-14 18:59:34 325
原创 211014-VsCode Interpreter两种指定与冲突解决
VsCode选择解释的方法有两种可在环境设置中配置Python解释器也可以通过代码脚本的的形式指定Python解释器二者灵活使用可提高不同解释器切换的效率,但是也存在冲突的情况,例如No module...., 可通过删除脚本#!/usr/bin/python的方式解决。...
2021-10-14 09:02:27 403
原创 210817-IRLS迭代最小二乘法
Code 1:from numpy import array, diag, dot, maximum, empty, repeat, ones, sumfrom numpy.linalg import invdef IRLS(y, X, maxiter, w_init = 1, d = 0.0001, tolerance = 0.001): n,p = X.shape delta = array( repeat(d, n) ).reshape(1,n) w = repeat(1, n)..
2021-08-17 17:35:26 3379 3
原创 210806-IEEE TII 投稿要求
TII checklist for manuscript submissionsAuthors should consider the following points before submitting a new paper. Otherwise the submission would be automatically rejected.New manuscripts cannot exceed 8 pages. Note that usually in the review process
2021-08-06 10:14:50 4284 5
原创 210723-如何将Logo放到Beamer的title中
参考以下代码更换即可:\begin{frame}\frametitle{\makebox[\framewidth]{Table of Contents\hfill\raisebox{-0.65ex}{\includegraphics[height=1cm]{Figures/hust_logo.pdf}}}}\tableofcontents\end{frame}
2021-07-23 14:28:58 2187
原创 210719-学术写作:“Dataset”还是“Data set”?
Ref: https://www.zumolabs.ai/post/2020/11/09/is-it-data-set-or-dataset
2021-07-19 14:42:25 1046 3
原创 210617-LaTex矩阵多表格绘制
\begin{table}[h] \caption{Multi-subtable demo} \label{tab:label all table} % Table 1 \begin{subtable}[t]{0.48\textwidth} \centering \caption{Subcaption A} \label{tab:label subtable A} \begin{NiceMatrixBlock}[auto-columns-width] .
2021-06-17 14:10:43 974
原创 210608-TexLive2020手动安装宏包
Download the package: https://ctan.org/pkg/pgf-pie?lang=enAssuming you are using TexLive2020: Copy to /usr/local/texlive/2020/texmf-dist/tex/latexOpen a terminal and execute the followssudo mktexlsrsudo texhashRecompile your main.texThat’..
2021-06-08 13:20:20 1044
原创 210531-IEEE Latex模板下载
https://journals.ieeeauthorcenter.ieee.org/create-your-ieee-journal-article/authoring-tools-and-templates/tools-for-ieee-authors/ieee-article-templates/August 26, 2015IEEEtran is a LaTeX class for authors of the Institute of Electrical andElectronics
2021-05-31 13:56:30 716
原创 210206-结合tcolorbox与minted编写LaTex代码块
效果图源代码\documentclass{article}\newcounter{commentCount}\newcounter{filePrg}\newcounter{inputPrg}\usepackage{geometry}\geometry{paper=letterpaper,margin=2cm}\usepackage{ifthen}\usepackage{fontawesome}\usepackage[dvipsnames]{xcolor}\usepac.
2021-02-06 11:05:17 844
原创 210205-Minted选择性代码插入及样式定制与高亮
效果主文件\documentclass[a4paper]{article}\usepackage[top=0.5in, bottom=0.5in, left=0.5in, right=0.5in]{geometry}\usepackage[utf8]{inputenc}\usepackage{minted}\usemintedstyle[python]{pastie}\newmintedfile[pycode]{python}{bgcolor=mintedbackgroun..
2021-02-05 15:16:23 493
原创 200108-如何通过中国国航App获取行程单
下载中国国航APP (中英文都行)如果是护照订票,在App-行程中,根据提示绑定护照信息审核通过后,在App-行程中找到对应航班并点击进入服务预订-发送行程服务信息,输入邮箱有延迟,邮箱过了一会就可以收到了...
2021-01-09 11:17:45 11114
原创 201224-MacOS使用Mounty非安全退出NFTS后磁盘无法加载
找一台Windows,cmd输入以下命令chkdsk f: /f,注意第一个f是磁盘代号,第二个/f 是相应的命令C:\Users\USR_NAME>chkdsk f: /f输出结果Microsoft Windows [版本 10.0.18363.836](c) 2019 Microsoft Corporation。保留所有权利。C:\Users\USR_NAME>chkdsk f: /f文件系统的类型是 NTFS。卷标是 My Passport。阶段 1: 检查基.
2020-12-25 09:29:07 1060
原创 201216-JupyterLab服务器远程配置
如何获取远程服务器的密钥pythonfrom IPython.lib import passwd passwd() Enter password: Verify password:'sha1:xxxx
2020-12-17 07:02:26 705 1
原创 201215-Python二维数组缺失索引的不同结果
a = np.arange(25).reshape(5,5)x1 = a[1:]x2 = a[:,1:]print(a)print(x1)print(x2)[[ 0 1 2 3 4] [ 5 6 7 8 9] [10 11 12 13 14] [15 16 17 18 19] [20 21 22 23 24]] [[ 5 6 7 8 9] [10 11 12 13 14] [15 16 17 18 19] [20 21 22 23 24]] [[
2020-12-15 14:44:53 235
原创 201212-Argparse在Python命令行与Jupyter交互模式中的不同设置
1.在命令行中使用argparseargparseargparse 是 Python 内置的一个用于命令项选项与参数解析的模块,通过在程序中定义好我们需要的参数,argparse 将会从 sys.argv 中解析出这些参数,并自动生成帮助和使用信息。当然,Python 也有第三方的库可用于命令行解析,而且功能也更加强大,比如 docopt,Click。- 创建 ArgumentParser() 对象- 调用 add_argument() 方法添加参数- 使用 parse_args() 解析添加
2020-12-13 04:51:06 783
原创 201208-PyTorch求解矩阵正交基
参考 MATLAB Linkorth is obtained from U in the singular value decomposition, [U,S] = svd(A,‘econ’). If r = rank(A), the first r columns of U form an orthonormal basis for the range of A.步骤:svd分解按秩索引代码from scipy import linalg as LAimport to.
2020-12-09 06:16:20 1861
原创 201207-四步十秒通过VSCode创建Python代码片段Snippet
如何操作:Step 1: 安装插件Snippet CreatorStep 2: 在py文件中编辑好并选中需要的python代码片段Step 3: 调出控制台,并输入Create SnippetWin: Ctrl + Shift + PMac: Command + Shift + PStep 4: 选择代码片段的相关描述语言:python名称:python.json配置文件中的名称(所有Snippet都会保存在这里)命令:后面快捷插入Snippet的快捷命令名称描述:代码块的相关
2020-12-08 01:04:31 1704
原创 201204-通过一个A4纸张扫描的例子通俗理解PyTorch中LSTM的参数定义
讲解import torchfrom torch import nnimport torch.nn.functional as F# 【第1步】 扫描仪参数设置 batch = 10 # 任意值:batch批训练的样本数量,可依据算力及模型性能调整batchFirst = True # 将bacth设置成input的第一个维度,与CNN等传统NN保持一致a4_width = 21 # 扫描仪每一个时间步step扫描到的特征a4_height = 2.
2020-12-05 01:54:14 286
原创 201121-将numpy数组等像素保存为图片
Specifying and saving a figure with exact size in pixels# %% Demoimport matplotlib.pyplot as pltfrom matplotlib.image import imreadimport numpy# Settingw = 5h = 5im_np = numpy.random.rand(h, w)# Plot and savefig = plt.figure(frameon=False)fig
2020-11-22 06:01:14 475
原创 201117-MacOS上通过VsCode配置跳板机连接服务器
Remote SSH: Tips and Tricks# Jump box with public IP addressHost <HUST> HostName <xxx.xxx.xxx.xxx> User <user_name> IdentityFile /Users/<user_name>/.ssh/id_rsa# Target machine with private IP addressHost <Titan&g
2020-11-18 10:10:26 2546 1
原创 201111-Web of Science检索规则
Link检索规则大写字母不区分大小写:可以使用大写、小写或混合大小写。例如,AIDS、Aids 以及 aids 可查找相同的结果。检索运算符在各个检索字段中,检索运算符(AND、OR、NOT、NEAR 和 SAME)的使用会有所变化。例如:在“主题”字段中可以使用 AND,但在“出版物名称”或“来源出版物”字段中却不能使用。您可以在多数字段中使用 NEAR,但不要在“出版年”字段中使用。在“地址”字段中可以使用 SAME,但不能在其他字段中使用。请记住,使用检索运算符时不区分大小写。例如,
2020-11-12 00:46:01 2427
原创 201026-Outlook自动删除POP/SMTP邮件分析及解决方法
原因分析:LinkWhen you connect to your POP3 mail server from your first computer, your email messages are downloaded to Outlook.When you connect from your second computer, your email messages are downloaded to Outlook.When you connect from your third
2020-10-27 00:35:20 582
原创 201025-Neptune官方测试文件
import numpy as npimport neptune# The init() function called this way assumes that# NEPTUNE_API_TOKEN environment variable is defined.neptune.init('guokliu/sandbox')neptune.create_experiment(name='minimal_example')# log some metricsfor i in rang
2020-10-26 05:04:41 737
原创 201025-Neptune中记录PyTorchLightning中的Accuracy
没有Logger的代码⚠️ forward要return模型的output⚠️traning_step要return模型的loss否则虽然code可以正常运行,但是logger没法正确记录一下记录四种记录acc的方式:accm1, accm2, accm4 以及accsm3# PyTorch Lightning 1.x + Neptune [Basic Example]# Before you start# Install dependencies# Step 1: I..
2020-10-26 00:01:31 1146
原创 201024-5步PyTorchLightning中设置并访问tensorboard
导入工具箱from pytorch_lightning.loggers import TensorBoardLogger写入记录def training_step(self, batch, batch_idx): self.log('my_loss', loss, on_step=True, on_epoch=True, prog_bar=True, logger=True)创建记录器loggerlogger = TensorBoardLogger('tb_logs', n.
2020-10-25 06:58:35 6990 1
原创 201024-Neptune中的初始化Pytorch-Lightning设置
Step 1:网页中点击:All project后创建新项目,⚠️:首先得在网页中创建自己的项目。Step 2:在terminal中设置tokenexport NEPTUNE_API_TOKEN="your_token"Step 3:在代码中设置自己的project_name公共项目 (demo)neptune_logger = NeptuneLogger( api_key="ANONYMOUS", project_name="shared/pytorch-light
2020-10-25 05:47:32 1042
原创 201023-Web of Science (WOS) 输出标签简写对照
Ref: Web of Science Core Collection Field Tags LinkWeb of Science Core Collection Field TagsThese two-character field tags identify fields in records that you e-mail, export, or save. They cover articles, books, and conference proceedings.FN File Name
2020-10-24 01:16:55 2499 1
原创 201009-MacOS下利用PDFtk为Zotero添加学位论文书签
问题出处:https://github.com/l0o0/jasminum/issues/7解决方案:感谢分享!顺便说下macos(10.15)用户:下载:https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg路径:/opt/pdflabs/pdftk/. (该路径默认对外隐藏无法选取)选择路径的技巧:shift+command+G: 输入:/opt/pdfla
2020-10-10 08:21:16 3117 6
原创 200925-Numpy指定列排序
输入a = np.array([[9, 2, 3], [4, 5, 6], [7, 0, 5]])b = a[a[:, 1].argsort()]print(a)print(b)输出[[9 2 3] [4 5 6] [7 0 5]][[7 0 5] [9 2 3] [4 5 6]]Ref: https://stackoverflow.com/questions/2828059/sorting-arrays-in-.
2020-09-25 22:46:56 361
原创 200826-阿里云CentOS配置TextLive2020若干细节
Key1: CentOS 安装TextLivehttps://blog.csdn.net/symuamua/article/details/104346416https://blog.csdn.net/m0_37952030/article/details/90646388Key2: 挂载镜像,/mnt就是一个根目录下的一个文件夹:mount -o loop texlive2020.iso /mnt/ Key3: 安装texlive2020清华镜像:https://mirrors.tun
2020-08-26 11:18:33 446
recurrent neural network without a phd
2018-04-16
A jupyter note result html file for Surface defect detection
2018-03-04
MNIST_data
2018-02-05
Chrome and SurfEasy Extension for Linux
2017-12-02
斯坦福大学凸优化课程Convex Optimization字幕及Youtube字幕下载代码
2017-11-08
tensorflow_gpu-1.2.0rc2-cp36-cp36m-win_amd64.whl
2017-06-14
tensorflow-1.2.0rc2-cp36-cp36m-win_amd64.whl
2017-06-14
2017大数据发展趋势Top10白皮书
2017-01-12
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人