test

Linux查找命令与find命令详解

╄→гoц情女王★ 提交于 2020-02-15 00:58:39
一、文件查找之locate命令 locate : 非实时的,查找时根据全系统文件数据库进行的,模糊查找, update 手动生成文件数据库 速度快 依赖于updatedb数据库 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #手动更新locate数据库 [root@lovelace scripts] # updatedb #使用locate查找文件 (速度好快的说) [root@lovelace scripts] # locate *.py /home/scripts/factorial .py /home/scripts/input .py /usr/lib/python2 .4 /fileinput .py /usr/lib/python2 .4 /fileinput .pyc /usr/lib/python2 .4 /fileinput .pyo /usr/lib/python2 .4 /site-packages/dogtail/rawinput .py /usr/lib/python2 .4 /site-packages/dogtail/rawinput .pyc /usr/lib/python2 .4 /site-packages/dogtail/rawinput .pyo /usr/lib/python2 .4 /test

Even But Not Even CodeForces - 1291A

前提是你 提交于 2020-02-15 00:33:28
Let’s define a number ebne (even but not even) if and only if its sum of digits is divisible by 2 but the number itself is not divisible by 2. For example, 13, 1227, 185217 are ebne numbers, while 12, 2, 177013, 265918 are not. If you’re still unsure what ebne numbers are, you can look at the sample notes for more clarification. You are given a non-negative integer s, consisting of n digits. You can delete some digits (they are not necessary consecutive/successive) to make the given number ebne. You cannot change the order of the digits, that is, after deleting the digits the remaining digits

softmax和分类模型

你说的曾经没有我的故事 提交于 2020-02-14 20:47:16
softmax和分类模型 内容包含: softmax回归的基本概念 如何获取Fashion-MNIST数据集和读取数据 softmax回归模型的从零开始实现,实现一个对Fashion-MNIST训练集中的图像数据进行分类的模型 使用pytorch重新实现softmax回归模型 softmax的基本概念 分类问题 一个简单的图像分类问题,输入图像的高和宽均为2像素,色彩为灰度。 图像中的4像素分别记为 \(x_1, x_2, x_3, x_4\) 。 假设真实标签为狗、猫或者鸡,这些标签对应的离散值为 \(y_1, y_2, y_3\) 。 我们通常使用离散的数值来表示类别,例如 \(y_1=1, y_2=2, y_3=3\) 。 权重矢量 \[ \begin{aligned} o_1 &= x_1 w_{11} + x_2 w_{21} + x_3 w_{31} + x_4 w_{41} + b_1 \end{aligned} \] \[ \begin{aligned} o_2 &= x_1 w_{12} + x_2 w_{22} + x_3 w_{32} + x_4 w_{42} + b_2 \end{aligned} \] \[ \begin{aligned} o_3 &= x_1 w_{13} + x_2 w_{23} + x_3 w_{33} + x_4 w_{43} +

动手深度学习task2——softmax

假如想象 提交于 2020-02-14 20:22:05
softmax与分类模型 [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-lXrlQNpD-1581673070121)(attachment:image.png)] torchvision包主要用来构建计算机视觉模型。 1.torchvision.datasets: 一些加载数据的函数及常用的数据集接口 2.torchvision.models:包含常用的模型结构(包括预训练模型),例如AlexNet、VGG、ResNet等 3.torchvision.transforms:常见的图片变换,例如裁剪、旋转等 4.torchvision.utils:其他的一些有用的方法 # 获取数据集 import torch import torchvision import torchvision . transforms as transforms import matplotlib . pyplot as plt import time import sys sys . path . append ( ".." ) 获取Fashion-MNIST训练集和读取数据 我们通过torchvision的torchvision.datasets来下载这个数据集。第一次调用时会自动从网上获取数据。我们通过参数train来指定获取训练数据集或测试数据集。

网络问题导致vscode无法运行测试用例

巧了我就是萌 提交于 2020-02-14 18:30:46
  写vs code插件的话,难免要写一些测试用例。vs code提供了end to end测试,在运行npm run test时,会下载当前最新版本(如果你没指定测试版本号的话)进行测试。但是由于网络问题,这个下载成功率有点低,我试了一下午,失败一下午。并且换了电信、移动网络,都不行。 $ npm run test > lua-tags@1.0.4 pretest E:\Documents\work\lua-tags > npm run compile > lua-tags@1.0.4 compile E:\Documents\work\lua-tags > tsc -p ./ > lua-tags@1.0.4 test E:\Documents\work\lua-tags > node ./out/test/runTest.js Downloading VS Code 1.42.1 from https://update.code.visualstudio.com/1.42.1/win32-archive/stable Downloaded VS Code 1.42.1 into .vscode-test/vscode-1.42.1 Test error: Error: spawn E:\Documents\work\lua-tags\.vscode-test\vscode-1

Codeforces Round #619 (Div. 2):A. Three Strings

好久不见. 提交于 2020-02-14 18:25:17
Discription You are given three strings a, b and c of the same length n. The strings consist of lowercase English letters only. The i-th letter of a is ai, the i-th letter of b is bi, the i-th letter of c is ci. For every i (1≤i≤n) you must swap (i.e. exchange) ci with either ai or bi. So in total you’ll perform exactly n swap operations, each of them either ci↔ai or ci↔bi (i iterates over all integers between 1 and n, inclusive). For example, if a is “code”, b is “true”, and c is “help”, you can make c equal to “crue” taking the 1-st and the 4-th letters from a and the others from b. In this

[python]Python 中 if not 用法

时光总嘲笑我的痴心妄想 提交于 2020-02-14 17:30:46
在python 判断语句中 None, False, 空字符串"", 0, 空列表[], 空字典{}, 空元组()都相当于 False not None == not False == not '' == not 0 == not [] == not {} == not () 需要注意的是'0'这个进行判断返回的是true def test(val): if not val: print 'not' else: print 'yes' test(0) test(None) test('0') if not 0: print 1111 返回 not not yes 1111 来源: https://www.cnblogs.com/taoshihan/p/12307530.html

Hibernate整合C3P0实现连接池

此生再无相见时 提交于 2020-02-14 14:02:40
Hibernate整合C3P0实现连接池 Hibernate中可以使用默认的连接池,无论功能与性能都不如C3PO(网友反映,我没有测试过),C3P0是一个开源的JDBC连接池,它实 现了数据源和JNDI绑定,支持JDBC3规范和JDBC2的标准扩展。目前使用它的开源项目有Hibernate,Spring等。 C3P0是一个易于使用JDBC3规范和JDBC2可选的扩展定义的功能增强,使传统的JDBC驱动程序“enterprise-ready”库。 特别是C3P0提供了一些有用的服务:适应传统的基于DriverManager中的JDBC驱动程序的新的类javax.sql.DataSource 的计划获取数据库连接。 透明和PreparedStatement的背后的数据源,可以“包装”围绕传统驱动程序或任意UNPOOLED的的数据源的连接池。c3p0的数 据源都引用和序列化的,因此适合于宽各种基于JNDI命名服务结合。Statement和ResultSet的主要清理时,连接池和报表进行检查,以防止 资源枯竭,当客户端使用的懒惰,但共同的资源管理策略,只清理自己的连接.... 该库采用JDBC 2和3规格定义的方法。都写在JavaBean风格的数据源,提供所有必需的和最重要的可选属性(以及一些不规范的),无参数构造。 所有JDBC定义的内部接口的实现

Hibernate整合C3P0实现连接池

最后都变了- 提交于 2020-02-14 14:01:39
Hibernate中可以使用默认的连接池,无论功能与性能都不如C3PO(网友反映,我没有测试过),C3P0是一个开源的JDBC连接池,它实现了数据源和JNDI绑定,支持JDBC3规范和JDBC2的标准扩展。目前使用它的开源项目有Hibernate,Spring等。 C3P0是一个易于使用JDBC3规范和JDBC2可选的扩展定义的功能增强,使传统的JDBC驱动程序“enterprise-ready”库。特别是C3P0提供了一些有用的服务:适应传统的基于DriverManager中的JDBC驱动程序的新的类javax.sql.DataSource的计划获取数据库连接。 透明和PreparedStatement的背后的数据源,可以“包装”围绕传统驱动程序或任意UNPOOLED的的数据源的连接池。c3p0的数据源都引用和序列化的,因此适合于宽各种基于JNDI命名服务结合。Statement和ResultSet的主要清理时,连接池和报表进行检查,以防止资源枯竭,当客户端使用的懒惰,但共同的资源管理策略,只清理自己的连接.... 该库采用JDBC 2和3规格定义的方法。都写在JavaBean风格的数据源,提供所有必需的和最重要的可选属性(以及一些不规范的),无参数构造。 所有JDBC定义的内部接口的实现(ConnectionPoolDataSource的的PooledConnection

trainloss与test loss大小大概多少

試著忘記壹切 提交于 2020-02-14 12:13:41
一个好的网络,二者的差距应该是很低的。但一般情况下因为网络不可避免地存在一定程度上的过拟合,所以肯定是train_loss低于test_lost,但如果低太多,就得考虑是过拟合的问题还是因为样本的特征空间不统一的问题。   一般训练集不大时,最终训练的网络及容易过拟合,也就是说train-loss一定会收敛,但是test-loss不会收敛;  训练时的loss会低于test的loss大概1~2个数量级,通常是10倍左右。 来源: CSDN 作者: 追梦小狂魔 链接: https://blog.csdn.net/qq_15557299/article/details/104307690