自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

烨然的博客

路漫漫其修远,走一步有一步的收获

  • 博客(30)
  • 收藏
  • 关注

原创 vscode 本地安装language server && vscode python 无法跳转到定义

vscode中python代码定义跳转需要依赖python language server,有时候在vscode里自动安装python language server 很慢,可以下载nupkg安装包手动安装,如 https://pvsc.azureedge.net/python-language-server-stable/Python-Language-Server-win-x64.0.5.45.nupkg在vscode命令行里运行 Extensions: Open Extensions Folder

2020-08-16 17:24:58 1748 1

原创 vscode下载python langugage server失败;Linux下vscode安装python langugage server;

最近在win10下使用vscode远程连接linux服务器写python代码,撸码过程中发现远程vscode窗口里经常提示在下载Microsoft Python Langugage Server,30M的东西基本每次都下载失败。而且vscode的[转到定义]功能,也就是F12键无法使用,但F12在本地win10的代码中使用正常。推测F12无法使用是由于无法安装Microsoft Python Langugage Server导致的。解决措施:下载Python Langugage Server安装包,本地安

2020-08-06 16:21:16 522

原创 ubuntu环境配置

本人计算机配置为 Ubuntu18.04+gtx1060拨号上网sudo pppoeconf #配置用户 密码sudo pon dsl-provider #联网安装搜狗输入法# 官网下载搜狗安装包 https://pinyin.sogou.com/linux/sudo apt-get install fcitx-bin #安装fcitx-binsudo apt-get update --fix-missing #修复fcitx-bin安装失败的情况 sudo apt-get inst

2020-06-30 11:15:55 281

原创 java速查表

文章目录001.Math类002.数组工具类Arrays003. ArrayList004.Calendar005.Scanner类006.Random类007.String类008.System类009.StringBuilder类001.Math类java.util.Math类是数学相关的工具类,里面提供了大量的静态方法,完成与数学运算相关的操作。import java.lang.Math;double abs(); // 取绝对值double ceil(); //向上取整double fl

2020-06-10 20:37:33 704

原创 cv2.imread 读取buffer 或者 读取二进制文件

``import numpy as npimport cv2src = cv2.imread(‘1.jpg’, 1)print(src.shape)以二进制形式读取图片,并将图片恢复为numpy数组with open(‘1.jpg’, ‘rb’) as f:imageBin = f.read()img1 = np.frombuffer(imageBin, np.uint8)print("img1 shape ", img1.shape) # (83653,)img_cv = cv2.im

2020-06-02 16:05:44 5829

原创 pip换源 conda换源

pip换源Ubuntu中pip换源:~/.pip/pip.conf (没有就创建一个), 内容如下:[global]index-url = https://pypi.tuna.tsinghua.edu.cn/simpleWin10中pip换源在 C:\User\xx\pip目录下新建文件pip.ini,内容如下[global]timeout = 6000index-url = ...

2020-03-08 16:35:45 265

原创 Ubuntu常用命令

SCP复制文件scp -r /home/gaoye/data/ [email protected]:/home/gaoye/查看文件夹大小du -sh 查看所在文件夹大小du -h --max-depth=1 ##查看当前目录下各个文件夹大小通过alias自定义快捷命令(需要将alias指令写在.bashrc文件中)alias wat=‘watch -n 1 nv...

2020-03-08 16:26:39 90

原创 tensor处理速查表

1 torch.cattorch.cat((A, B), dim)将两个tensor在指定维度进行拼接 A = torch.zeros(2,3) B = torch.zeros(2,3) C = torch.cat((A,B), 0) ## shape [4,3] D = torch.cat((A,B), 1) ## shape [2,6]2 torch....

2020-03-05 16:00:19 233

原创 ubuntu18基本软件安装

以下为本人重装ubuntu18后的基本需求安装过程1 主机拨号上网sudo pppoeconf #配置用户 密码sudo pon dsl-provider #联网2 apt-fastsudo add-apt-repository ppa:apt-fast/stablesudo apt-get updatesudo apt-get install apt-fast3 翻墙4...

2020-02-29 15:56:27 197

原创 sublime text3使用

Ctrl + G : 跳转到某一行Ctrl + Shift +F :全局查找分屏快捷键: Alt +Shift+2设置tab键为若干空格{ "tab_size": 4, "translate_tabs_to_spaces": true }

2020-02-29 15:44:01 110

原创 python调用其他文件中的函数或者类

01 在同一个文件夹下,调用函数或者类A.py文件中def test(): print('this is test func')class A: def test(): print('this is a class named A, its func is test() ')B.py文件中# way 1from A import testfrom A i...

2020-02-29 15:36:58 1365

原创 简单的class及运算符重载

#include <iostream>#include <vector>#include <algorithm>using namespace std;class Action{ public: int room; int time; int type; Action(int room_, int time_, int type_)...

2020-02-29 15:34:13 540

原创 从文本中读入数据

测试代码时经常需要重定向输入输出,下面是一个简单例子。 freopen ("input.txt", "r", stdin); int n; cin>>n; cout<<"n is "<<n<<endl;

2020-02-29 15:29:25 470

原创 java环境配置

01.官网下载jdk点击安装02. win10 路径配置在"系统变量"中设置属性,JAVA_HOME,PATH(大小写无所谓),若已存在则点击"编辑",不存在则点击"新建"。变量名:JAVA_HOME变量值:C:\Program Files\Java\jdk1.8.0_212变量名:Path变量值:C:\Program Files\Java\jdk1.8.0_212\bin;C:\P...

2020-02-29 15:27:50 238

原创 python常用函数整理

1. 判断文件/文件夹是否存在import osif os.path.exists("test.txt"): pass2. 目录连接import osnew_path = os.path.join(root_path, 'test.txt')

2020-02-28 16:48:22 524

原创 Ubuntu Win10双系统 时间不同步

计算机上安装Ubuntu 和Win10双系统后,会出现时间不同步现象,原因是Ununtu会认为Bios硬件时间是UTC时间(Universal Time Coordinated,北京时间比UTC时间早八个小时)进而修改Bios时间,Win10认为Bios硬件时间是本地时间(北京时间),从而双系统切换后时间不同步。简单的解决方案是,修改Win10对BIos硬件时间的对待方式,让Win10把硬件时间...

2020-02-23 09:25:58 354

原创 《java语言程序设计进阶》翁凯课程笔记

Java语言程序设计进阶定义数组:int[] A = new int[100];读取输入:Scanner in = new Scanner(System.in);int x ;x = in.nextInt();while(x != -1){ sum +=x; x = in.nextInt();}3. for-each循环,对于数组data中每个...

2020-02-18 09:42:47 324

原创 博客迁移

最终还是决定将博客迁移到博客园里面,原因主要是博客园界面简洁,没有太多弹窗广告,很喜欢用博客园来做笔记。个人链接如下:https://www.cnblogs.com/yeran/...

2019-04-14 16:07:28 98

原创 python 多进程和多线程

在计算大量数据时,可以使用多进程 多线程机制来加速计算import multiprocessingimport osdef run_proc(name): print('Child process {0} {1} Running '.format(name, os.getpid()))if __name__ == '__main__': print('Parent pr...

2019-02-22 21:06:31 117

原创 Matplotlib 常用画图函数整理

import matplotlib.pyplot as pltimport numpy as npx = np.linspace(-1, 1, 50)y1 = 2 * x + 1y2 = x**2plt.figure(num = 5, figsize = (4, 4))plt.plot(x, y1)plt.plot(x, y2, color = 'red', linewidth ...

2019-02-15 20:27:03 516

原创 python数据处理常用函数

1 . pandasimport pandas as pd## 读取data = pd.read_csv(filename,header=None)data =data.valuesprint(data.shape) ##此时 data 可作为numpy 数组来使用## 保存## 将 list 转化为 numpy 格式data_numpy = np.array(data_l...

2019-02-13 15:57:10 692

原创 常用命令-其他篇

1 locate 查找时若没有找到,可能需要更新索引数据库,指令为sudo updatedb2 pppoeconf 拨号上网打开pppoe拨号上网命令:sudo pon dsl-provider关闭连接:sudo poff dsl-provider...

2019-01-18 10:39:19 134

原创 深度学习基础理论

1. 卷积后特征图大小计算特征图边长 = ( 原图边长 - 卷积核边长 +1 ) / 步长反卷积

2019-01-12 10:26:45 275

原创 pytorch-gpu 安装失败记录

ubuntu18 系统上已经配置好gpu加速环境,安装pytorch-gpu 后出现以下问题:import torchx = torch.Tensor(2,3)x_cuda = x.cuda()x可以正常,当定义x_cuda 后,命令行卡住,不再继续输出...

2018-12-10 20:26:12 1197

原创 python 报错

Bug1. This application failed to start because it could not find or load the Qt platform plugin “xcb” in “”.sln :pip uninstall matplotlibpip install matplotlib

2018-10-31 15:56:39 120

原创 C++常用函数整理

1. memset函数解释:函数原型:常用形式:

2018-10-18 13:57:00 1535

原创 vector 使用整理

借鉴网上资料,整理了vector使用的一些方法,记录下来,方便以后查阅vector初始化vector&amp;lt;int&amp;gt;a(10) //只定义长度vector&amp;lt;int&amp;gt;a(10,1)//长度为10,初始值为1vector&amp;lt;int&amp;gt;a(b); //用b向量来创建a向量,整体复制性赋值vector&amp;lt;int&amp;gt;a(b.begin()

2018-07-29 17:15:35 291 2

原创 c++ 获取系统时间转换为字符串,整型转换为字符换

#include &lt;iostream&gt;#include &lt;string&gt;#include &lt;sstream&gt;#include &lt;time.h&gt;using namespace std;string get_time_str() //return a string of time{ time_t ts = time(NULL); ...

2018-07-28 11:52:10 742

原创 神舟笔记本 安装Ubuntu 16 双系统安装卡死

在Install ubuntu 选项上按e 然后在quite splash 后面加上 nouveau.modeset=0 F10保存后安装重启时在Ubuntu 选项上按e 然后在quite splash 后面加上 (如果有---删去即可) nouveau.modeset=0 打开终端 sudo gedit /etc/modprobe.d/blacklist-nouveau.co...

2018-06-19 19:18:14 4016 2

原创 ubuntu18重装后 基本需求安装

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA300B7755AFCFAEsudo add-apt-repository 'deb https://typora.io ./linux/'sudo apt-get updatesudo apt-get install typora

2018-06-05 21:59:10 1140

空空如也

空空如也

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

TA关注的人

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