- 博客(15)
- 收藏
- 关注
原创 强化学习笔记
Markov Reward ProcessMarkov Chain:P(xt+1∣x1,...,xt)=P(xt+1∣xt)P(x_{t+1}|x_1,...,x_t)=P(x_{t+1}|x_t)P(xt+1∣x1,...,xt)=P(xt+1∣xt)State space: x={1,...,k}x=\{1,...,k\}x={1,...,k}Transition matrix QQQ : Qij=P(xt+1=j∣xt=i)Q_{ij}=P(x_{t+1}=j|x_t=i)Qij
2021-04-17 20:52:34
146
原创 带你认识Github
简要介绍一下Github的入门使用。Github是一个代码托管平台,也就是大家把代码上传起来的云盘。但是不只是云盘,Github更强大的地方是团队协作能力。Github更是一个社区,大家在这里以开源的精神分享代码。注意:Git和Github并不是一个东西。Github是一个网站,Git是一个代码版本控制工具,也就是用来管理代码的上传的,将会在后续教程中介绍。首页最常用的是左侧的仓库列表...
2020-03-30 00:12:33
324
原创 Pycharm使用教程
下载安装官方下载链接分为community和professional两个版本,其中社区版免费使用,专业版收费、但可以使用教育账号或者特殊手段。一般来说社区版就够用了。新建项目新建一个文件夹test,我们将python项目放在这个文件夹中。打开pycharm,选择Create New Project,在location中选择项目路径文件夹。下面有一个Project Interpreter的选...
2020-03-26 21:13:11
1946
1
原创 conda使用教程
这里的conda,指的是anaconda和miniconda,两者的区别是,前者有(十分卡顿的)UI界面,后者只能使用命令行。这里推荐miniconda,方便快捷。miniconda是什么?如果你用python,那就离不开miniconda。在python里面,我们经常导入很多包(import xxx),许多包需要我们手动安装,如果你不想把各种乱七八糟的包装在一块的话,那么minicond...
2020-03-26 00:44:09
2197
原创 Visual Studio 使用教程 for C/C++
或许现在的你还习惯于使用Dev c++,习惯于直接用Dev C++直接打开一个.c/.cpp文件。可你要知道,这并不是一个好的编程习惯(尤其是对于非脚本型语言)。实际上,你每一个程序都应该是一个项目(Project),应该把你的程序源代码和其他文件全部放在一个项目文件夹里面。那么,像VS这样的IDE,就来强制改正你的习惯了。本文适用于2017和2019版本。新建一个项目文件夹打开Visu...
2020-03-01 20:03:37
10597
原创 最长递增序列
#include <iostream>using namespace std;int main(){ int num[100] = { 0 }; char temp; int n = 0; while (temp = getchar()) { if (temp == ' ') n++; else if (temp == '\n') break; ...
2019-12-19 13:16:16
121
原创 LeetCode · 动态规划 · 专题
5. 最长回文子串给定一个字符串s,找到s中最长的回文子串。你可以假设s的最大长度为 1000。#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h>#include <string.h>char * longestPalindrome(char * s){ // ...
2019-12-11 18:58:28
166
原创 常用conda命令
anaconda比conda多了图形界面,个人认为没有必要,miniconda搭配conda命令完全够用。切换为中科大源conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/conda config --add channels https://mirrors.ustc.edu.cn/anacon...
2019-12-09 19:27:59
450
原创 Qt平移动画
void Pokemon::moveTo(int x, int y){ /* stop(); state = MOVE; qreal distance = sqrt(pow(x - this->x(), 2) + pow(x - this->y(), 2)); if (x - this->x() > 0) direc...
2019-11-29 20:09:39
1280
原创 MySQL的bug备忘录
bug 1Warning: (1366, "Incorrect string value: '\\xD6\\xD0\\xB9\\xFA\\xB1\\xEA...' for column 'VARIABLE_VALUE' at row 1")原因:utf-8编码问题解决方法:修改utf-8编码# 查看编码mysql> show variables like '%char%';# ...
2019-11-11 21:23:06
135
原创 计算运行时间
import datetimestart = datetime.datetime.now()# Your taskend = datetime.datetime.now()print("Time used:")print(end - start)
2019-10-12 17:36:50
171
原创 Git常用命令
克隆仓库git clone http://git.oschina.net/yiibai/git-start.gitgit clone http://git.oschina.net/yiibai/git-start.git mygit管理已有仓库# 初始化git init# 跟踪文件/将文件放到暂存区git add hello.pygit add FileFold# 暂存所有文...
2019-10-12 17:34:30
128
原创 pip升级所有包
import pipfrom subprocess import callfrom pip._internal.utils.misc import get_installed_distributionsfor dist in get_installed_distributions(): call("pip install --upgrade " + dist.project_name...
2019-10-12 17:28:20
3040
原创 Evaluting the result of clustering method by F value
F1 scoreIn statistical analysis of binary classification, the F1F1F1 score (also F-score or F-measure) is a measure of a test’s accuracy. It considers both the precision ppp and the recall rrr of the...
2019-05-29 21:56:32
213
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人