-
Leetcode刷题(house robber)
```import ( “fmt”)var maxNum intvar table []intfunc rob(nums []int) int { maxNum = 0 table = nil table = make([]int, len(nums)) for i:=0; i<len(nums); i++{ table[i] = -1 }if len(nums)==1{ return nums[0]}for i:=len(nu...…
-
Leetcode刷题(combination sum)golang and python
import ( "sort")var results [][]intfunc combinationSum(candidates []int, target int) [][]int { results = nil sort.Ints(candidates) var result []int // fmt.Println(candidates) traversal(len(candidates)-1, target, result, candidate...…
-
Leetcode刷题(permutations ii)golang
import ( "sort")var results [][]intvar note intfunc permuteUnique(nums []int) [][]int { results = nil note = -1 sort.Ints(nums) var res []int var positions = make(map[int]int, len(nums)) traversal(res, nums, positions) retu...…
-
每日一练 Leetcode Golang
Add Two Numbers(https://leetcode.com/problems/add-two-numbers/) MediumYou are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the...…
-
Mysql Practice Leetcode Hard 1
Leetcode-1850-Department Top Three SalariesRuntime: 330 ms, faster than 99.95% of MySQL online submissions for Department Top Three Salaries. Initial: SELECT @Rank := 0, @Sal := null, @Type := null Merge the table of Department into t...…
-
Pytorch Environment
深度学习服务器搭建硬件环境系统是ubuntu 16.04 显卡是4*RTX2080软件环境CUDA Version 9.0,CUDNN Version 7.4CUDA和CUDNN分别可以从官网下载,具体地址[1][2].由于cudnn需要注册登录才能下载,不想注册登录的同学,可以直接点击这里百度云,提取码:6zz6。 Anaconda Version 4.5.11下载地址[3] Pytorch,其下载地址和安装方式见[4]安装过程声明:博主是第一次安装搭建深度学习服务器并成功完成,以此...…
-
Rasa NLU及自定义NLU组件
1 Rasa安装推荐在Linux中安装。因为要使用mitie的模型,而在windows里这个模型安装的时候需要进行编译,所以安装会非常麻烦。我自己是在虚拟机中安装了deepin的虚拟机,可以安装pycharm这个IDE,方便debug。 最好使用功能Anaconda新建一个虚拟环境,以避免包依赖混乱 安装代码如下,安装rasa core会自动安装对应版本的rasa nlupip install rasa_core==0.9.8pip install -U scikit-learn sk...…