- 博客(124)
- 资源 (1)
- 收藏
- 关注
原创 rdkit的图可视化
因为当初想用rdkit生成的图去进行可视化,就去找了相关的博客去看。RDKit | 基于RDKit绘制带原子和键的索引、注释和立体化学https://zhuanlan.zhihu.com/p/163827512。有几个问题出现:1:最初出现是因为rdkit的版本是2017年的,有点老,所以就新建了一个2020的rdkit版本。https://zhuanlan.zhihu.com/p/163827512.2:新版本可以跑通这个代码,但是就是无法生成图片。尝试了用jupyter notebo
2021-05-15 16:15:50
630
原创 conda安装包时出现错误You will need to adjust your conda configuration to proceed.
在服务器上用$ conda create -n rdkit python=3.6去创建新环境,一直出现下面的问题:$ conda create -n rdkit python=3.6Solving environment: failed# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<&
2020-11-06 10:30:34
5390
原创 用Vscode连接服务器
1:下载vscode链接:https://code.visualstudio.com/Download2:对vscode的操作https://blog.youkuaiyun.com/nzzfsw/article/details/105585803?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~all~first_rank_v2~rank_v28-1-105585803.nonecase&utm_term=vsco.
2020-11-04 16:28:01
454
1
原创 在win10环境部署bert,client端一直运行,且无输出
我在跑一个程序时,出现了这行代码。from bert_serving.client import BertClient查看一些博客,只通过cmd输入两行安装代码:代码没有错误,可以运行,但是一直不出现结果。我最开始以为是数据太大,运行时间过长。但是我把单行代码逐一测试,发现无法出结果。解决办法:1:安装了Tensorflow环境(我一直以为这个论文程序是pytorch版本,没想到这两行代码是需要tensorflow的环境。也有一个收获就是pytorh和tensorflow也可
2020-10-28 21:16:04
1707
2
原创 graphviz.backend.ExecutableNotFound: failed to execute [‘dot‘, ‘-Tpng‘, ‘-O‘, ‘XXX.gv‘]问题解决方法
看了一个博客https://blog.youkuaiyun.com/lizzy05/article/details/88529030。不仅需要在python中成功安装graphviz,还要在系统中安装,这需要去官网下载安装包。Graphviz下载的官网地址https://graphviz.org/documentation/,但是官网的现在没有办法下载,找了好久都没有找到。但是通过这个网址可以下载。https://www.softpedia.com/get/Others/Miscellaneous/?utm_s
2020-10-26 19:09:34
1246
原创 安装pytorch,以及pip安装好pytorch后在pycharm中报错后的处理办法
想安装pytorch已经很久了,一直没有行动。今天受到刺激,打算一定要安装成功。记录一下整个过程。在安装pytorch之前,python的安装和pycharm的安装已经完成。网上有很多教程,我是按照https://www.sohu.com/a/337364638_120255642这个教程进行的。pytorch是在https://pytorch.org/get-started/locally/#windows-pip这个网页选择自己适合的版本进行安装。下面是我选择的版本:开.
2020-06-28 22:09:36
6645
2
原创 小白学Python ——最终测试:爬取数据
爬取一本三国演义:import urllib.requestfrom bs4 import BeautifulSoupimport time# 首先向第一个url发送请求,得到相应url = 'http://www.shicimingju.com/book/sanguoyanyi.html'headers ={ 'User-Agent':' Mozilla/5.0 ...
2019-01-17 19:24:30
523
原创 Python实训代码2----12
第2天到12天实训代码:链接: https://pan.baidu.com/s/1LTojrrSgE7L4q0rJJyYl6w 提取码: b9vn
2019-01-17 16:45:28
767
原创 小白学Python ——day12
老师授课内容:day12-实训121、选择器 标签选择器 类选择器 id选择器 每一个标签都可以添加一个id属性,id的值在整个html文件中必须是唯一的 层级选择器 就是一级一级的找下去 选择器1 选择器2 选择器3 选择器4 空格:后面的是前面的子节点或者子孙节点都可以 &g...
2019-01-17 16:33:06
201
原创 小白学Python ——day11
老师授课内容:day11-实训111、图片标签 src 图片的地址,本地的图片地址 width\height 一般指定一个,如果两个都指定,图片有可能变形,指定一个会等比例缩放 title 图片的标题 alt 图片路径不对的时候才会显示2、音频、视频标签 audio(src\controls\loop\autoplay) ...
2019-01-17 16:30:23
185
原创 小白学Python ——day10
老师授课内容:day10-实训101、异常处理 什么叫做异常? 再写代码的时候,会出现两种错误。第一种错误:语法错误没有办法处理,第二种错误:代码再执行的过程中,碰到了一些错误,这些错误都可以通过异常处理来解决。 优点:可以让你的代码更加的健壮 异常分为官方异常、自定义异常。一般用的都是官方异常 NameError\KeyError\IndexError\AttributeEr...
2019-01-15 20:01:34
761
1
原创 小白学Python ——day9
老师授课内容:day09-实训31、面向对象语法 见代码 对象作为参数传递 小明与牌2、继承 认识继承 生活角度。继承 父类 子类 父类 子类 父类 子类 父类...
2019-01-15 14:59:03
226
原创 递归统计文件夹大小------python
import osdef dirsize(dirpath): # 思路:先将文件夹里面所有的文件大小统计出来, # 遍历这个文件夹,得到文件夹下面所有的文件 filenames_list = os.listdir(dirpath) # 遍历这个列表,判断该元素是文件还是文件夹,如果是文件,统计大小,如果是文件夹,递归调用自己 total_si...
2019-01-11 20:25:17
678
原创 递归删除文件夹------python
# 递归删除文件夹def myrmdir(dirpath): # 思路:先将文件夹里面所有的文件删除掉,如果是空文件夹,删除之, # 遍历这个文件夹,得到文件夹下面所有的文件 filename_list = os.listdir(dirpath) print(filename_list) #遍历这个列表,判断该元素是文件还是文件夹,如果是文件...
2019-01-11 20:18:33
476
原创 自己实现splitext()和os.path.join()-------python
import os# 官方版本path = r'C:\User\zbil\Desktop\实训\day5.txt'print(os.path.splitext(path))# 自己实现def mysplitext(path): lt = path.split('.') # print(lt) second = '.' + lt[-1] ...
2019-01-11 20:02:42
250
原创 小白学Python ——day8
老师授课内容:day08-实训81、文件操作 什么是文件操作?通过代码去读写文件。读?(读取里面的内容)写?(修改里面的内容) 程序的读写,基于内存的,将内容读取到内容中。 内存:小(4g,16g,32g),程序都需要运行再内存中,小,读写快,断电消失 硬盘:500g,1t,大,读写慢(固态硬盘),永久保存 程序运行的时候,会产生一些数据,日志信息,...
2019-01-11 19:55:34
183
原创 查询手机归属地---- python
问题:根据一个手机号的前7位来查询号码归属地代码:string = """5582|1860101|010|北京市|北京联通GSM卡5583|1860100|010|北京市|北京联通GSM卡5584|1368141|010|北京市|北京移动神州行卡5585|1860111|010|北京市|北京联通GSM卡5586|1358198|010|北京市|北京移动动感地带卡558...
2019-01-10 20:46:02
615
原创 歌词解析------python
今天学到一个好玩的东西,就是用python把歌词分解,当你可以做到把这首歌和程序同时运行,那么就可以做到歌词与声音同步。代码:string = '''[ti:蓝莲花][ar:许巍][al:时光漫步][by:(5nd音乐网)www.5nd.com][offset:500][00:00.20]蓝莲花[00:00.80]没有什么能够阻挡[00:06.53]你对自由地向...
2019-01-10 19:35:47
625
原创 小白学Python ——day7
老师授课内容day07-实训71、模块学习 何为模块?模块就是工具包,工具包里面会有好多的函数,如果想使用模块里面的函数,就需要导入这个模块,通过import导入即可使用 分类: (1)官方模块,python自带模块 random\os\time\math (2)第三方模块 python之所以非常强大,由于有很多优秀的第三方库...
2019-01-10 19:25:57
272
原创 小白学Python ——day6
老师授课内容:day06-实训61、函数高级 递归函数 什么叫做递归函数?自己调用自己的函数叫做递归函数,所以递归函数其实就是一种循环。 写递归函数一定要有退出条件,否则程序崩溃 汉诺塔问题 匿名函数 函数名代表的是什么?2、高阶函数 map\filter\reduce\sorted3、选择排序和冒...
2019-01-10 09:41:02
154
原创 小白学Python ——day5
老师授课内容:day05-实训51、常用函数字符串函数(非常重要) ord() 给一个字符,转化为ascii值 chr() 给一个ascii值,转化为字符 join() 将列表里面的字符串按照特定的字符拼接 ljust(width, 字符) 共多少个,居左对齐 rjust() 居右对齐 center() 居中对齐 zfill() 右对齐,左边0填充 strip() ...
2019-01-10 09:27:20
199
原创 十进制转换------Python
# 二进制:def binary(number): number_str = '' shang = number while 1: number_str += str(shang % 2) shang = shang // 2 if shang == 0: break num...
2019-01-09 17:33:10
199
原创 删除列表中指定的所有重复元素------Python
eg:输入:[1, 2, 3, 4, 3, 5, 3] 删除:3结果: [1, 2, 4, 5]def shan(lt, item): count = lt.count(item) if count == 0: print('没有元素,不能删除') return for i in range(count): ...
2019-01-09 10:56:43
3563
原创 等腰三角形----python
问题:打印一个等腰三角形解析: * *** ************1 j<4-0 打印空格,其它打印*2 j<4-1 打印空格,其它打印*3 j<4-2 打印空格,其它打印*1 n2 n+13 n+24 n+3i n+i-1答案:第一种方法:def deng(n): # 外层循环就是n行 for i ...
2019-01-08 18:00:28
4521
原创 字母图形-----python
问题:给一个字符,打印出下面的图形输入'F'输出:# F# EF# DEF# CDEF# BCDEF# ABCDEF解析:'''i = 2j的变化是:0~10 :E 1 : FF-1 F-0i = 3j的变化是:0~20 :D 1 : E 2 : FF-2 F-1 F-0i = 4j的变化应该是3-0F-3 ...
2019-01-08 17:54:11
2678
原创 小白学Python ——day4
老师授课内容day04-实训41、双重循环 循环也可以嵌套,如果循环里面还有循环,称之为双重循环2、函数 定义:在项目的开发过程中,有一些代码会被反复的使用到。程序猿就会将这个代码块封装起来,那么封装起来的代码块就叫做函数 函数就是代码块 优点: 面向函数编程(每一个功能都是一个一个函数) 面向对象编程(每一个功能都是一个一个对象的方法)...
2019-01-07 21:06:05
231
原创 小白学Python ——day3
实训第三天内容:day03-实训30、ascii值和字符之间的转化 ord() : 将字符转化为整型 chr() : 将整型转化为字符1、while循环 什么是循环?一直在重复的做某件事情 到代码中 格式: while 表达式: 语句块(循环体) 过程:首先判断表达式的真假,如果是真的,执行语句块,再...
2019-01-05 20:28:17
489
原创 小白学Python ——day2
今天老师主要讲的内容如下:day02-实训21、数据类型 字符串长度 求解字符串长度,无论是英文还是中文,求解的是里面字符的个数 ascii表格,就是常用字符和二进制之间的对应关系 字符0-9 48-57 A-Z 65-90 a-z 97-122 中...
2019-01-04 20:55:44
256
原创 小白学Python ——day1
今天是我们实习的第一天,来到郑州千峰的培训基地。在选择实习方向上,我们寝室选择听从学霸室友的建议,学习Python。因为这在研究生的学习中应用很广泛。第一天学习很简单,就是了解Python,知道Python现在的用处,Python的安装环境以及如何安装,编写一些简单的程序等。从Python的稳定性考虑,老师建议我们使用Python3.6的版本,以及使用VSCcode编辑器。下面是我们所使用的软...
2019-01-03 20:45:06
349
原创 Abelian Period
Problem DescriptionLet S be a number string, and occ(S,x) means the times that number x occurs in S.i.e. S=(1,2,2,1,3),occ(S,1)=2,occ(S,2)=2,occ(S,3)=1.String u,w are matched if fo
2016-10-19 16:33:37
327
原创 Find Q
Problem DescriptionByteasar is addicted to the English letter 'q'. Now he comes across a string S consisting of lowercase English letters.He wants to find all the continous substrings of S,
2016-10-19 16:29:23
431
原创 New Year Permutation
DescriptionUser ainta has a permutation p1, p2, ..., pn. As the New Year is coming, he wants to make his permutation as pretty as possible.Permutation a1, a2, ..., an is prettier than permut
2016-09-23 21:41:27
468
原创 New Year Transportation
DescriptionNew Year is coming in Line World! In this world, there are n cells numbered by integers from 1 to n, as a 1 × n board. People live in cells. However, it was hard to move between disti
2016-09-23 14:30:06
401
原创 Subsequence
DescriptionA sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal le
2016-09-11 10:28:51
257
原创 Aggressive cows
DescriptionFarmer John has built a new long barn, with N (2 His C (2 <= C <= N) cows don't like this barn layout and become aggressive towards each other once put into a stall. To prevent the
2016-09-09 16:30:58
335
原创 Cable master
DescriptionInhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize the most honest contest ever. It wa
2016-09-09 15:42:11
276
原创 HDOJ 2674-N!Again【数论】
DescriptionWhereIsHeroFrom: Zty, what are you doing ? Zty: I want to calculate N!...... WhereIsHeroFrom: So easy! How big N is ? Z
2016-09-06 17:27:23
261
原创 lightoj 1214 - Large Division 大数对小数取余
DescriptionGiven two integers, a and b, you should check whether a is divisible by b or not. We know that an integer a is divisible by an integer b if and only if there exists an integer c such
2016-09-06 16:55:27
400
原创 1078 - Integer Divisibility
DescriptionIf an integer is not divisible by 2 or 5, some multiple of that number in decimal notation is a sequence of only a digit. Now you are given the number and the only allowable digit, you
2016-09-06 16:28:36
377
原创 http://blog.youkuaiyun.com/wjzdmr/article/details/39050839
Given a code (not optimized), and necessary inputs, you have to find the output of the code for the inputs. The code is as follows:int a, b, c, d, e, f;int fn( int n ) { if( n == 0 ) return a
2016-09-06 15:33:20
478
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人