for _ in range(n)中 _ 是占位符, 表示不在意变量的值 只是用于循环遍历n次。 例如在一个序列中只想取头和尾,就可以使用_ 其实意思和for each in range(n)是一个意思,_只是一个代词,可以为each, 也可以为其它任意符合规范的符号,只是方便后续引用。 ————— ...
分类:
编程语言 时间:
2020-02-20 22:18:16
阅读次数:
127
numpy基础学习 numpy得基础属性 使用numpy 创建一个矩阵 关于numpy得各种属性 np.ndim : 输出矩阵得维度 np.shape: 输出矩阵得形状大小 np.size : 输出矩阵中一共有多少个元素 如何使用numpy创建各种各样得矩阵 1. 创建静态矩阵 2. 在创建时设置矩 ...
分类:
编程语言 时间:
2020-02-20 20:05:52
阅读次数:
81
叮叮铛~今天我们推出Oracle异常恢复的第一个系列:“TRUNCATETABLE恢复系列”,这个系列主要围绕truncatetable实现的内部原理和几种恢复方式来展开。
分类:
其他好文 时间:
2020-02-20 18:35:07
阅读次数:
81
1、直接插入排序 def insert_sort(alist): """插入排序""" n = len(alist) for j in range(1,n): i = j while i > 0: if alist[i] < alist[i-1]: alist[i],alist[i-1] = ali ...
分类:
编程语言 时间:
2020-02-20 13:19:44
阅读次数:
75
Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is , if 6 is a decimal number and 110 is a bi ...
分类:
其他好文 时间:
2020-02-20 12:54:51
阅读次数:
69
输入一个字符串s,一个数字n和一个字符c,统计这个字符c在字符串s中第n次出现的位置 输入格式: 输入3行。第1行是字符串s,第2行是数字n,第3行是被查找的字符c。 输出格式: 第n个字符在字符串中的位置值。如果字符串中不存在第n个字符c,打印出'no' 输入样例: abcabcabc 2 a 输 ...
分类:
其他好文 时间:
2020-02-20 09:35:05
阅读次数:
157
[toc] 代码分解 代码包括四个部分,分别是: 工具类:utils 训练及测试代码:train_eval 模型:models.TextCNN 主函数:main 在notebook中依次运行前三个部分,最后执行main就可以开始训练了 colab链接:https://colab.research.g ...
分类:
其他好文 时间:
2020-02-20 09:19:27
阅读次数:
161
In the computer world, use restricted resource you have to generate maximum benefit is what we always want to pursue. For now, suppose you are a domin ...
分类:
其他好文 时间:
2020-02-20 09:18:04
阅读次数:
62
Have Fun with Numbers Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it ...
分类:
其他好文 时间:
2020-02-20 00:09:35
阅读次数:
70
核心思想:取一个初始值,将数组中比该值小的放在其左边,比其大的放在右边, 再对左、右子数组进行相同操作,直到数组排好序。 def quicksort(nums): l = 0 r = len(nums) - 1 _quicksort(nums,l,r) def _quicksort(nums,l,r ...
分类:
编程语言 时间:
2020-02-19 21:10:59
阅读次数:
86