碎片笔记
这里就比较乱了,不知道咋分类的就放在这里了。
古承风
写代码,但不做码农
展开
-
mendeley desktop (不是mendeley references manager)下载地址
话不多说,直接上传送门:原创 2023-01-11 11:07:45 · 3314 阅读 · 3 评论 -
利用sftp协议将nas挂载到服务器
利用sftp协议将nas挂载到服务器原创 2023-01-09 09:15:36 · 546 阅读 · 0 评论 -
远程连接wsl
传送门原创 2022-09-20 09:56:51 · 145 阅读 · 0 评论 -
tensor 转 rgb图像发现特别暗? 尝试反normalize
如果你从tensor生成的rgb图像非常暗,那么可能是由于你对图片进行了normalize, 可以尝试在生成rgb图像之前这么操作def inverse_normalize(tensor, mean, std): for t, m, s in zip(tensor, mean, std): t.mul_(s).add_(m) return tensorinput = inverse_normalize(tensor=input, mean=(0.485, 0.456,原创 2022-04-01 10:06:49 · 1166 阅读 · 1 评论 -
windows termnal preview 自定义一个远程服务器
它来了它来了,它带着颜值走来了:最新一代终端神器,windows terminal preview这很难不心动啊。如果windows安装了linux子系统它会自动识别出来,看起来很漂亮,那么如果要自己用SSH远程连接一个服务器,该怎么做呢?1. 打开设置中的json文件2. 红框标出的地方就是核心了。其实最核心的只有三个属性,commandline,guid和name,分别作为入口程序,唯一标识符和名称。3. 为新服务器生成一个唯一标识符进入uuid在线生成, 找到version1,原创 2022-03-26 14:47:50 · 938 阅读 · 0 评论 -
nvim插件管理
安装nvimsudo apt install nvim安装 vim-plugsh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'touch ~/.config/nvim/init.vim如果gith原创 2022-03-14 20:23:10 · 3378 阅读 · 0 评论 -
用lightgbm (向日葵连接不上ubuntu问题的解决)
下载并运行:脚本链接之后:sudo dpkg-reconfigure lightdm重启原创 2022-01-05 18:46:28 · 810 阅读 · 0 评论 -
pip 环境迁移
pip freeze > requirements.txtpip install -r requirements.txt原创 2021-09-21 18:51:52 · 414 阅读 · 0 评论 -
git常用操作
git config --global user.name "XXX"git config --global user.email "xxx@xxx.com"原创 2021-09-21 18:43:21 · 71 阅读 · 0 评论 -
sklean中自带的数据集
转载于: 知乎1. 调用方式例如:from sklearn import datasetsboston = datasets.load_boston() # 导入波士顿房价数据bostondataname.datadataname.targetdataname.feature_names2. Toy Datasets2.1. 波士顿房价-回归from sklearn import datasetsboston = datasets.load_bo.转载 2021-08-13 23:45:50 · 2237 阅读 · 0 评论 -
一键部署远程jupyter环境,可以自定义密码
#!/bin/bashpip install jupyter notebookpip install ipykerneljupyter notebook --generate-configecho "c.NotebookApp.ip='*'" >> ~/.jupyter/jupyter_notebook_config.pyecho "c.NotebookApp.token='YourPassWord'" >> ~/.jupyter/jupyter_notebook_co原创 2021-08-08 22:36:51 · 171 阅读 · 2 评论 -
python 调用系统命令
import subprocessimport sysdef run_shell(shell): """use python execute ubuntu's command Args: shell (str): command for ubuntu Returns: int: returncode during this executation , it will print the system's log ""原创 2021-07-11 15:57:18 · 120 阅读 · 0 评论 -
python format 保留小数位,补0
print("{:.2f}".format(3.1415926))传送门转载 2021-07-09 13:04:14 · 9189 阅读 · 0 评论 -
个人封装的python多进程处理类,跑满CPU,优化性能
另外,也可以用多线程的方式跑。原创 2021-07-09 12:39:27 · 1396 阅读 · 2 评论 -
git不小心将大文件提交到历史记录了,如何改写历史呢?
改写历史,去除大文件注意:下方命令中的 path/to/large/files 是大文件所在的路径,千万不要弄错!git filter-branch --tree-filter 'rm -f path/to/large/files' --tag-name-filter cat -- --allgit push origin --tags --forcegit push origin --all --force...转载 2021-07-06 14:19:27 · 223 阅读 · 0 评论 -
pydot 基础模板
import pydotdef test_pydot(): graph = pydot.Dot("test_graph", graph_type="graph", bgcolor="yellow") # add nodes my_node = pydot.Node("a", label="foo") graph.add_node(my_node) graph.add_node(pydot.Node("b", shape="circle")) #.原创 2021-07-02 21:02:11 · 378 阅读 · 0 评论 -
vscode python 代码片段 个人常用
{ // Place your snippets for python here. Each snippet is defined under a snippet name and has a prefix, body and // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: // .原创 2021-07-02 13:53:08 · 1477 阅读 · 0 评论 -
python logging常用模板
import logginglogging.basicConfig( # filename="access.log", format="%(asctime)s - %(name)s - %(levelname)s -%(module)s: %(message)s", datefmt="%Y-%m-%d %H:%M:%S %p", level=logging.INFO,)logging.info("Hello World")上面的代码中,filename的注释去掉原创 2021-07-02 00:30:36 · 355 阅读 · 2 评论 -
notion 工作流 可以嵌一切
notion工作流author: Garden LU创建时间: Jun 9, 2021 9:26 PM标签: 工作流, 效率notion 其实可以嵌入大多数网站在页内编辑,不过需要用浏览器。并且这个浏览器需要已经登录了该网站的账号才行。下面,给大家看一下我目前的工作流截图:[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Pir5sGvh-1623247657743)(notion%E5%B7%A5%E4%BD%9C%E6%B5%81%20e21c43be5d3542原创 2021-06-09 22:08:45 · 1253 阅读 · 0 评论 -
git 每次提交都需要输入账户密码?
git config --global credential.helper store之后,你下次提交最后一次输入密码就可以了。信息来源:https://www.cnblogs.com/zhaoyu1995/p/6508927.html原创 2020-12-06 23:02:19 · 840 阅读 · 0 评论