1、在需要文件间调用的文件夹下创建Ipynb_importer.py文件,文件内容为 import io, os,sys,types from IPython import get_ipython from nbformat import read from IPython.core.interac ...
分类:
其他好文 时间:
2020-02-03 22:41:16
阅读次数:
122
今天写个程序用到java里面的split()函数时,发现可以有两个参数,之前用这个函数一直是用的一个参数,今天试了下两个参数的使用,记录一下区别。 下面是菜鸟里关于split()函数的定义 通过这个定义可以发现,第一个参数是split()函数对字符串分割的根据,第二个参数是分割的份数。 第二个参数有 ...
分类:
编程语言 时间:
2020-02-03 10:01:14
阅读次数:
79
1 from sklearn.datasets import load_diabetes 2 X,y=load_diabetes().data,load_diabetes().target 3 X_train,X_test,y_train,y_test=train_test_split(X,y,ra ...
分类:
其他好文 时间:
2020-02-03 09:17:20
阅读次数:
308
1.翻转字符串 join() 方法用于把数组中的所有元素放入一个字符串。元素是通过指定的分隔符进行分隔的。 split() split() 方法用于把一个字符串分割成字符串数组。 两个参数,第一个是以什么元素进行分割,第二个是保留的 如果把空字符串 ("") 用作 separator,那么 stri ...
分类:
其他好文 时间:
2020-02-02 23:17:35
阅读次数:
89
今天根据昨天爬取到的网址进行了二次爬取,爬取内容为每个信件的内容,然而本应该是一项很简单的任务,但是奈何数据是真的‘脏’,所以今天知识对所有的三万个网址进行了信件内容的爬取。 使用的时beautifulsoup进行爬取,在爬取的同时对数据进行了简单的处理,完善了一些bug。之后将按照下一步对怕爬取到 ...
分类:
其他好文 时间:
2020-02-02 19:45:52
阅读次数:
67
from django.utils.module_loading import import_string def import_string(dotted_path): """ Import a dotted module path and return the attribute/class d ...
分类:
其他好文 时间:
2020-02-02 16:09:24
阅读次数:
108
Given a binary tree . Split the binary tree into two subtrees by removing 1 edge such that the product of the sums of the subtrees are maximized. Sinc ...
分类:
其他好文 时间:
2020-02-02 15:59:08
阅读次数:
110
//class my_fileReader( e ) { console.log(e.target.files[0]); const reader = new FileReader(); // 用readAsText读取TXT文件内容 reader.readAsText(e.target.files ...
分类:
编程语言 时间:
2020-02-01 19:07:38
阅读次数:
266
计算属性关键词: computed demo1: <div id="app"> <p>原始字符串: {{ message }}</p> <p>计算后反转字符串: {{ reversedMessage }}</p> </div> <script> var vm = new Vue({ el: '#ap ...
分类:
其他好文 时间:
2020-02-01 16:41:34
阅读次数:
90
1 from sklearn.model_selection import train_test_split 2 from sklearn.datasets import load_diabetes 3 X,y=load_diabetes().data,load_diabetes().target ...
分类:
其他好文 时间:
2020-02-01 14:29:36
阅读次数:
89