matt

docker︱在nvidia-docker中使用tensorflow-gpu/jupyter

岁酱吖の 提交于 2019-12-04 08:38:13
docker小白… 搭建基础:宿主机已经有CUDA8.0 进出快捷键: ctrl+d 退出容器且关闭, docker ps 查看无 ctrl+p+q 退出容器但不关闭, docker ps 查看有 使用docker restart命令重启容器 使用docker attach命令进入容器 文章目录 一、安装 二、nvidia-smi的使用 1、拉取镜像、开启容器 2.上传容器与创建镜像 3.容器与镜像删减 . 4.容器改名 5.容器的保存 . 6.在tensorflow容器中打开Jupyter notebook 主题换色(参考:https://github.com/dunovank/jupyter-themes): 延伸一:如果修改Jupyter notebook密码 延伸二:报错:OSError: [Errno 99] Cannot assign requested address . 7.在容器中打开nvidia/digits 三、tensorflow安装 延伸: 延伸二: 延伸三:上传至阿里云 延伸三:docker 之中screen 与主机的环境不一样,py版本不一样 参考: 一、安装 参考: Docker Compose + GPU + TensorFlow = ❤️ Docker版本分为CE(community edution)和EE(enterprise edition)

TZOJ 5962 Happy Matt Friends(计数DP)

女生的网名这么多〃 提交于 2019-12-03 02:11:28
描述 Matt hzs N friends. They are playing a game together. Each of Matt’s friends has a magic number. In the game, Matt selects some (could be zero) of his friends. If the xor (exclusive-or) sum of the selected friends’magic numbers is no less than M , Matt wins. Matt wants to know the number of ways to win. 输入 The first line contains only one integer T , which indicates the number of test cases. For each test case, the first line contains two integers N, M (1 ≤ N ≤ 40, 0 ≤ M ≤ 106). In the second line, there are N integers ki (0 ≤ ki ≤ 106), indicating the i-th friend’s magic number. 输出 For

Kestrel Running which framework?

匿名 (未验证) 提交于 2019-12-03 01:22:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a new ASP.NET 5 project and setup the project.json as below; "frameworks" : { "dnx451" : { "dependencies" : { "ExternalLibrary" : "1.3.0" } }, "dnxcore50" : {} } I'm running the project through Kestrel with the default command defined in project.json. "kestrel" : "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5001" Everything works fine. The project runs and the dependency works well. The only thing I don't understand it who decides on which underlying framework to use? As far as I understand the

Dire Wolf――HDU5115(区间DP)

匿名 (未验证) 提交于 2019-12-02 23:49:02
题意 就是有一对狼,每个狼有初始的攻击力,并且还能给左右两边的狼提供攻击力加成,当冒险家杀死一头狼的时候他也会受到这个狼目前攻击力的伤害 实例解析 3 3 5 7 8 2 0 有三头狼,刚开始第二头狼给他左右两边的狼各加2攻击力,由于第一头狼左边没有狼,所以只给第二头狼加,第三头狼还那样,一系列操作后攻击力为(5,13,9),从左往右杀死狼 1、受到5点攻击,且第二头狼的攻击力加成消失(5,9) 2、受到5点攻击,且第三头狼攻击加成消失(7) 3最后结果5+5+7=17 题解 dp[i][j]=min(dp[i][j], dp[i][k-1]+dp[k+1][j]+a[k]+b[i-1]+b[j+1]) dp[i][i]=a[i]+b[i-1]+b[j+1]; 这个dp[i][j]中的i、j就代表在原给出的序列中杀死第i到j头狼的最小伤害 其中这个k(i<=k<=j)就是枚举那一头狼是最后杀死的 这个dp[i][i]就提供了dp[i][j]的结果,所以要确定求dp[i][j]的时候dp[k][k](i<=k<=j)已经求出来了(典型的由部分推整体) C++代码 #include<bits/stdc++.h> using namespace std; int a[300],b[300]; int dp[300][300]; const int inf = 999999999; int

HDU 5119 Happy Matt Friends (背包DP + 滚动数组)

与世无争的帅哥 提交于 2019-11-29 12:36:26
题目链接: HDU 5119 Problem Description Matt has N friends. They are playing a game together. Each of Matt’s friends has a magic number. In the game, Matt selects some (could be zero) of his friends. If the xor (exclusive-or) sum of the selected friends’magic numbers is no less than M , Matt wins. Matt wants to know the number of ways to win. Input The first line contains only one integer \(T\) , which indicates the number of test cases. For each test case, the first line contains two integers \(N, M (1 \le N \le 40, 0 \le M \le 10^6)\) . In the second line, there are \(N\) integers \(k_i (0 ≤ k_i