- 博客(25)
- 资源 (1)
- 收藏
- 关注
原创 sudo: python: command not found
记录一下在linux服务器命令行直接运行python的问题:直接运行python (不加sudo) 报permission denied运行 sudo python 又报 sudo: python: command not found解决办法:执行下面的 sudo env PATH="$PATH" python例如: sudo env PATH="$PATH" python train.py......
2022-06-10 20:07:36 2256 3
原创 Pycharm中配置ssh解释器
Pycharm中配置ssh:Setting-Project-python interpreter增加一个interpreter 上图中,Host填:XXXXXXXXXX.natapp.cc (这个在NATAPP购买后会有)Port填:XXXXXX (这个在NATAPP购买后你自己可以设定)Username填你的Kella填完后点击next,进入这个界面在这里面输入你的密码,随后点击next最后一步,这里有个文件夹同步,就是说pycharm会在你的笔记本本地以及服务器端进行同步,同步的位
2021-08-05 11:51:32 1782 1
原创 ubuntu服务器安装anaconda
1.下载anaconda在清华镜像源下载需要的anaconda,可以用浏览器访问https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive,来选择最新的anaconda包 wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2021.05-Linux-x86_64.sh下载完后,会在你的根目录位置有一个2.安装anacondabash Anaconda3-20
2021-06-26 16:02:51 944
原创 牛客网-Pancake sorting
题目描述We start with a stack n of pancakes of distinct sizes. The problem is to convert the stack to one in which the pancakes are in size order with the smallest on the top and the largest on the bottom. To do this, we are allowed to flip the top k pancakes
2020-07-23 12:42:49 156
原创 编程题c++积累
1. 有不确定多少组的测试数据链接:https://www.cnblogs.com/chuyds/p/10625037.html#include<bits/stdc++.h>using namespace std;int main(){ int n; while(cin >> n) { cout << n << endl; } return 0;}...
2020-07-22 14:18:57 102
原创 牛客网-反序数
来源:牛客网题目:题目描述设N是一个四位数,它的9倍恰好是其反序数(例如:1234的反序数是4321)求N的值输入描述:程序无任何输入数据。输出描述:输出题目要求的四位数,如果结果有多组,则每组结果之间以回车隔开。#include<stdio.h>#include<stdlib.h>#include<cstdio>#include<iostream>#include<string>#include<algorithm
2020-07-22 13:40:05 214
原创 吉吉生词
unit 14analogoustearconcealprejudicecommerceconstitutionalconstituentsubstitutesupposeopposingproponentperiodicalpredictableanticipate#fall short ofsuperiorityinferioritysuperstitionwill
2020-07-21 22:58:03 221 1
原创 我的python编程题技能积累
1.接收多组数据(不确定有多少组):示例代码:while True: try: a, b = map(int, input().split()) print(a+b) except: break pass
2020-06-22 20:52:04 245
原创 农夫过河问题
题目描述有一个农夫带一只羊、一筐菜和一只狼过河。如果没有农夫看管,则狼要吃羊,羊要吃菜。但是船很小,只够农夫带一样东西过河。问农夫该如何解此难题?我的代码:#include<cstdio>#include<iostream>#include<stdlib.h>#include<cstring>#include<vector>#include<queue>#include<set>using names
2020-06-22 00:37:20 1646
原创 加法等式
题目描述设a、b、c 均是0 到9 之间的数字,abc、bcc 是两个三位数,且有:abc+bcc=532。求满足条件的所有a、b、c 的值。我的代码:#include<cstdio>#include<iostream>#include<stdlib.h>using namespace std;int main(){ for (int a = 0; a <= 9; a++) { for (int b = 0; b <= 9; b++)
2020-06-19 10:20:12 195
原创 [编程题]完数与盈数
链接:https://www.nowcoder.com/questionTerminal/df0d850e41894d06a165bf445ec8a8b4?answerType=1&f=discussion来源:牛客网一个数如果恰好等于它的各因子(该数本身除外)子和,如:6=3+2+1,则称其为“完数”;若因子之和大于该数,则称其为“盈数”。求出2 到60 之间所有“完数”和“盈数”,并以如下形式输出: E: e1 e2 e3 …(ei 为完数) G: g1 g2 g3 …(gi 为盈数)我的
2020-06-19 10:10:22 506
原创 反序相等
设N是一个四位数,它的9倍恰好是其反序数(例如:1234 的反序数是4321),求N的值。我的代码:#include<cstdio>#include<iostream>#include<stdlib.h>#include<string>#include<algorithm>using namespace std;int main(){ for (int i = 1000; i <= 1111; i++) { st
2020-06-19 00:51:13 180
原创 邮票
某人有8 角的邮票5 张,1 元的邮票4 张,1 元8 角的邮票6 张,用这些邮票中的一张或若干张可以得到多少中不同的邮资?我的代码:#include<cstdio>#include<string>#include<iostream>#include<algorithm>#include<map>using namespace std;int main(){ map<float, bool> value; fo
2020-06-17 20:45:47 214
原创 对称平方数
题目描述打印所有不超过n(n<256)的,其平方具有对称性质的数。如11*11=121。#include<cstdio>#include<string>#include<iostream>using namespace std;int main(){ bool is_symmetric(string str); for (int i = 1; i < 256; i++) { string str = std::to_string(i*i
2020-06-17 18:25:04 316
原创 problemC
输入描述:有多组数据,输入数据的第一行为一个正整数,表示字符序列的数目,每组数据为一行字符序列。输出描述:对每个字符序列,取出所得整数的最大素因子,若字符序列中没有数字或者找出的整数为0,则输出0,每个整数占一行输出。示例1输入3sdf0ejg3.f?9f?4afd0s&2d79*(gabcde输出138570我的代码:#include<iostream>#include<cstdio>#include<string>#in
2020-06-17 12:55:22 140
原创 Python实现A*算法,地图是二维数组形式
def A_star(pos_start, pos_end, map): """ :param pos_start: 起点位置, 例如(3,3) :param pos_end: 终点位置, 例如(9,9) :param map: 用于记录地图信息的二维矩阵,0表示空白,1表示墙体等障碍物,9表示食物(终点) :return: "...
2020-05-06 13:33:03 974
原创 进度
项目地址:https://github.com/weimin17/Object-Detection_HelmetDetection①Object-Detection_HelmetDetection/tensorflow/models/research/setup.pybuild 并 install
2020-02-17 11:05:17 216
原创 读写挂载的txt出现Input/output error
通过程序往挂载目录的txt里写入,程序报错Input/output error。将txt地址更改为本地地址,问题解决。原因未知,插个眼,日后再更。
2019-11-12 00:24:58 909
原创 大型软件设计——进度报告
项目地址:https://github.com/wuqian5000/Large-scale-software-design
2019-11-02 16:57:03 388
原创 python:从数据集中每个类中挑选出若干样本
可用于制作训练集、gallery等"""By Fivethousand从图片数据集中的每一类都挑选若干张图片,用于制作gallery"""import osimport randomimport shutildataset_path='F:\python_programs/tasks_from_King\datasets\CASIA-WebFace-part' ...
2019-09-05 15:27:08 1767
原创 python 自动生成图片集的验证集(图片对+label)
"""By Fivethousand输入图片二级目录根目录,随机生成该图片集的验证集(图片对+label)"""import osimport randomcorrect_label="1"error_label="0"def V_S_G(loadpath,savepath="./AutoSaved.txt",split=",",same_num=10,diff_num=50)...
2019-08-28 17:34:10 542
原创 python两级目录图像文件夹批量resize
"""by Fivethousand"""import osimport cv2NEW_SIZE=112 #新的图片的分辨率Load_Path='F:\python_programs\\tasks_from_King\datasets\CASIA-WebFace-part' #读取原来的数据集的地址Save_Path='F:\p...
2019-08-28 17:29:42 358
原创 pycharm打开->项目无法打开选定的文件夹下的情况,pycharm的Content根目录设置。
1.点击左上角文件,选择设置,弹出设置界面。2.选择项目这一栏中:Project Structure3.点击右侧栏“添加Content根”的 “x“即可删除当前根目录,点击”添加Content根“即可增加根目录...
2019-07-29 15:48:56 1736
原创 Linux服务器上cuda,cudnn,pytorch, nvidia驱动器版本兼容的问题
Linux服务器上cuda,cudnn,pytorch, nvidia驱动器版本兼容的问题踩了巨多坑啊!!!!!真的不要想当然的以为把包下下来了就万事大吉了,一定要注意版本兼容的问题!!!首先:查看NVIDIA驱动号还有cuda版本nvidia-smi显示如下界面,可以发现驱动器版本是430.26 Cuda版本是10.2驱动器的安装和cuda的安装可以看看参照博客,这里不再叙述。...
2019-07-25 13:11:06 1809 5
原创 马踏棋盘问题(C语言)——基于贪心算法优化的深度优先搜索
马踏棋盘问题(C语言)——基于贪心算法优化的深度优先搜索(动态展示马的路径)#include<stdio.h>#include<stdlib.h>#include<time.h>#include<Windows.h>#define WIDTH 24#define VERTICAL 1 //垂直的路#define HORI...
2019-07-21 14:36:14 1264 2
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人