自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

你的朋友不及格,你很难过;你的朋友考了第一,你更难过。

我问佛∶世间为何有那麽多遗憾? 佛曰∶这是一个婆娑世界,婆娑既遗憾, 没有遗憾,给你再多幸福也不会体会快乐。

  • 博客(1208)
  • 资源 (12)
  • 论坛 (1)
  • 问答 (1)
  • 收藏
  • 关注

原创 [leetcode] 1594. Maximum Non Negative Product in a Matrix

DescriptionYou are given a rows x cols matrix grid. Initially, you are located at the top-left corner (0, 0), and in each step, you can only move right or down in the matrix.Among all possible paths starting from the top-left corner (0, 0) and ending in

2020-11-26 00:47:58 12

原创 python 线性回归拟合的题目

今天做了一个山景智能公司的线性回归的题目,做了老半天没做出来,心里非常的着急,最后几分钟做出来了,我都没有预料到。真是惊险又刺激的挑战加载库和导入数据import numpyimport sklearn.metricsx_train = numpy.array([[-0.8 , -0.8 ], [-0.8 , -0.48], [-0.8 , -0.16], [-0.8 , 0.16], [-0.8 , 0.48], [-0.8

2020-11-25 23:36:12 8

原创 [leetcode] 1504. Count Submatrices With All Ones

DescriptionGiven a rows * columns matrix mat of ones and zeros, return how many submatrices have all ones.Example 1:Input: mat = [[1,0,1], [1,1,0], [1,1,0]]Output: 13Explanation:There are 6 rectangles of side 1x1.There ar

2020-11-25 19:10:08 4

原创 mongodb 字符串日期范围查找

今天发现mongodb里面的日期是字符串类型,所以特地查了一下,怎么选择范围查找db.getCollection('...').find({"announced_on":{$gte:"2019-01-01",$lte:"2019-03-28"}})直接字符串进行比较就行了。参考文献mongodb中字符串日期的比较...

2020-11-23 15:24:27 22

原创 [leetcode] 1546. Maximum Number of Non-Overlapping Subarrays With Sum Equals Target

DescriptionGiven an array nums and an integer target.Return the maximum number of non-empty non-overlapping subarrays such that the sum of values in each subarray is equal to target.Example 1:Input: nums = [1,1,1,1,1], target = 2Output: 2Explanation:

2020-11-23 13:00:19 15

原创 [leetcode] 1477. Find Two Non-overlapping Sub-arrays Each With Target Sum

DescriptionGiven an array of integers arr and an integer target.You have to find two non-overlapping sub-arrays of arr each with sum equal target. There can be multiple answers so you have to find an answer where the sum of the lengths of the two sub-arr

2020-11-22 18:10:12

原创 [leetcode] 1262. Greatest Sum Divisible by Three

DescriptionGiven an array nums of integers, we need to find the maximum possible sum of elements of the array such that it is divisible by three.Example 1:Input: nums = [3,6,5,1,8]Output: 18Explanation: Pick numbers 3, 6, 1 and 8 their sum is 18 (maxi

2020-11-22 15:20:00 1

原创 [leetcode] 1227. Airplane Seat Assignment Probability

Descriptionn passengers board an airplane with exactly n seats. The first passenger has lost the ticket and picks a seat randomly. But after that, the rest of passengers will:Take their own seat if it is still available,Pick other seats randomly when t

2020-11-22 12:51:58

原创 [leetcode] 1223. Dice Roll Simulation

DescriptionA die simulator generates a random number from 1 to 6 for each roll. You introduced a constraint to the generator such that it cannot roll the number i more than rollMax[i] (1-indexed) consecutive times.Given an array of integers rollMax and a

2020-11-22 12:14:15

原创 [leetcode] 1218. Longest Arithmetic Subsequence of Given Difference

DescriptionGiven an integer array arr and an integer difference, return the length of the longest subsequence in arr which is an arithmetic sequence such that the difference between adjacent elements in the subsequence equals difference.Example 1:Input:

2020-11-22 00:21:48

原创 [leetcode] 1405. Longest Happy String

DescriptionA string is called happy if it does not have any of the strings ‘aaa’, ‘bbb’ or ‘ccc’ as a substring.Given three integers a, b and c, return any string s, which satisfies following conditions:s is happy and longest possible.s contains at mo

2020-11-22 00:04:05

原创 [leetcode] 1191. K-Concatenation Maximum Sum

DescriptionGiven an integer array arr and an integer k, modify the array by repeating it k times.For example, if arr = [1, 2] and k = 3 then the modified array will be [1, 2, 1, 2, 1, 2].Return the maximum sub-array sum in the modified array. Note that

2020-11-21 23:00:02 1

原创 [leetcode] 1186. Maximum Subarray Sum with One Deletion

DescriptionGiven an array of integers, return the maximum sum for a non-empty subarray (contiguous elements) with at most one element deletion. In other words, you want to choose a subarray and optionally delete one element from it so that there is still

2020-11-21 20:35:10 14

原创 [leetcode] 1155. Number of Dice Rolls With Target Sum

DescriptionYou have d dice, and each die has f faces numbered 1, 2, …, f.Return the number of possible ways (out of fd total ways) modulo 10^9 + 7 to roll the dice so the sum of the face up numbers equals target.Example 1:Input: d = 1, f = 6, target =

2020-11-21 19:15:07 8

原创 [leetcode] Longest Common Subsequence

DescriptionGiven two strings text1 and text2, return the length of their longest common subsequence.A subsequence of a string is a new string generated from the original string with some characters(can be none) deleted without changing the relative order

2020-11-21 00:01:42 26

原创 [leetcode] 1314. Matrix Block Sum

DescriptionGiven a m * n matrix mat and an integer K, return a matrix answer where each answer[i][j] is the sum of all elements mat[r][c] for i - K <= r <= i + K, j - K <= c <= j + K, and (r, c) is a valid position in the matrix.Example 1:In

2020-11-20 20:58:17 9

原创 [leetcode] 1140. Stone Game II

DescriptionAlice and Bob continue their games with piles of stones. There are a number of piles arranged in a row, and each pile has a positive integer number of stones piles[i]. The objective of the game is to end with the most stones.Alice and Bob ta

2020-11-20 20:18:46 9

原创 [leetcode] 1139. Largest 1-Bordered Square

DescriptionGiven a 2D grid of 0s and 1s, return the number of elements in the largest square subgrid that has all 1s on its border, or 0 if such a subgrid doesn’t exist in the grid.Example 1:Input: grid = [[1,1,1],[1,0,1],[1,1,1]]Output: 9Example 2:

2020-11-19 20:31:08 11

原创 [leetcode] 1105. Filling Bookcase Shelves

DescriptionWe have a sequence of books: the i-th book has thickness books[i][0] and height books[i][1].We want to place these books in order onto bookcase shelves that have total width shelf_width.We choose some of the books to place on this shelf (such

2020-11-19 19:05:25 12

原创 [leetcode] 1049. Last Stone Weight II

DescriptionWe have a collection of rocks, each rock has a positive integer weight.Each turn, we choose any two rocks and smash them together. Suppose the stones have weights x and y with x <= y. The result of this smash is:If x == y, both stones a

2020-11-18 23:14:28 16

原创 [leetcode] 1048. Longest String Chain

DescriptionGiven a list of words, each word consists of English lowercase letters.Let’s say word1 is a predecessor of word2 if and only if we can add exactly one letter anywhere in word1 to make it equal to word2. For example, “abc” is a predecessor of

2020-11-18 21:57:31 18

原创 字符串与子字符串前缀匹配算法Z-algorithm(比较难理解)

问题对于一个字符串s,设它的长度为lenz[i]所表示的是s[i…len-1]与s[0…len-1]的最长公共前缀如何求出z[i]数组?分析这道题的解法是一个z算法,我也是第一次接触,O(n)的解法能够想到我觉得挺难的,需要通过已知的串s和z[1]…z[i-1]来求z[i],设想一个z数组,z[i]表示他的最长公共前缀即s[i]…s[i+z[i]].我们将其称之为i这个位置控制的范围,称为一个Z-box。我们定义l,r为右端点最靠右的Z-box的控制范围(即i和i+z[i])。进行分类讨论

2020-11-18 13:32:28 16

原创 [leetcode] 1043. Partition Array for Maximum Sum

DescriptionGiven an integer array arr, you should partition the array into (contiguous) subarrays of length at most k. After partitioning, each subarray has their values changed to become the maximum value of that subarray.Return the largest sum of the g

2020-11-16 22:43:17 14

原创 [leetcode] 1039. Minimum Score Triangulation of Polygon

DescriptionGiven N, consider a convex N-sided polygon with vertices labelled A[0], A[i], …, A[N-1] in clockwise order.Suppose you triangulate the polygon into N-2 triangles. For each triangle, the value of that triangle is the product of the labels of t

2020-11-16 20:37:46 14

原创 pytorch transformers从头开始实现情感分析模型

最近用transformers用的比较多,用transformers加载预训练模型,然后做预测的教程挺多的,但是加载自己的数据进行训练的挺少的,我这里分享一下我的实现:数据准备数据来自于kaggle上面情感分析的数据,地址为:https://www.kaggle.com/lava18/google-play-store-apps?select=googleplaystore_user_reviews.csv导入函数import transformersfrom transformers impo

2020-11-15 18:03:49 39

原创 [leetcode] 53. Maximum Subarray

DescriptionGiven an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.Follow up: If you have figured out the O(n) solution, try coding another solution using the divide and conq

2020-11-15 15:36:53 18

原创 python K-Means算法从头实现

最近看了K-means算法的原理,想用python实现一下,发现网上大部分教程都是调包,我对算法原理比较感兴趣,所以特地从头实现了一下,我把代码分享出来import pandas as pdimport numpy as npclass K_Means: def __init__(self, k=2, tol=0.001, max_iter=300): self.k = k self.tol = tol self.max_iter = ma

2020-11-15 13:19:15 22

原创 [leetcode] 1027. Longest Arithmetic Subsequence

DescriptionGiven an array A of integers, return the length of the longest arithmetic subsequence in A.Recall that a subsequence of A is a list A[i_1], A[i_2], …, A[i_k] with 0 <= i_1 < i_2 < … < i_k <= A.length - 1, and that a sequence B i

2020-11-14 21:23:59 18

原创 [leetcode] 1025. Divisor Game

DescriptionAlice and Bob take turns playing a game, with Alice starting first.Initially, there is a number N on the chalkboard. On each player’s turn, that player makes a move consisting of:Choosing any x with 0 < x < N and N % x == 0.Replacing

2020-11-14 20:02:30 18

原创 [leetcode] 1024. Video Stitching

DescriptionYou are given a series of video clips from a sporting event that lasted T seconds. These video clips can be overlapping with each other and have varied lengths.Each video clip clips[i] is an interval: it starts at time clips[i][0] and ends at

2020-11-14 15:22:47 22

原创 [leetcode] 983. Minimum Cost For Tickets

DescriptionIn a country popular for train travel, you have planned some train travelling one year in advance. The days of the year that you will travel is given as an array days. Each day is an integer from 1 to 365.Train tickets are sold in 3 differen

2020-11-14 14:09:29 18

原创 [leetcode] 935. Knight Dialer

DescriptionThe chess knight has a unique movement, it may move two squares vertically and one square horizontally, or two squares horizontally and one square vertically (with both forming the shape of an L). The possible movements of chess knight are show

2020-11-14 11:43:41 22

原创 [leetcode] 931. Minimum Falling Path Sum

DescriptionGiven a square array of integers A, we want the minimum sum of a falling path through A.A falling path starts at any element in the first row, and chooses one element from each row. The next row’s choice must be in a column that is different

2020-11-14 10:16:07 16

原创 [leetcode] 898. Bitwise ORs of Subarrays

DescriptionWe have an array A of non-negative integers.For every (contiguous) subarray B = [A[i], A[i+1], …, A[j]] (with i <= j), we take the bitwise OR of all the elements in B, obtaining a result A[i] | A[i+1] | … | A[j].Return the number of possib

2020-11-14 00:37:27 57

原创 [leetcode] 877. Stone Game

DescriptionAlex and Lee play a game with piles of stones. There are an even number of piles arranged in a row, and each pile has a positive integer number of stones piles[i].The objective of the game is to end with the most stones. The total number of

2020-11-13 23:44:04 19

原创 [leetcode] 799. Champagne Tower

DescriptionWe stack glasses in a pyramid, where the first row has 1 glass, the second row has 2 glasses, and so on until the 100th row. Each glass holds one cup of champagne.Then, some champagne is poured into the first glass at the top. When the topmo

2020-11-13 19:48:36 20

原创 [leetcode] 1631. Path With Minimum Effort

DescriptionYou are a hiker preparing for an upcoming hike. You are given heights, a 2D array of size rows x columns, where heights[row][col] represents the height of cell (row, col). You are situated in the top-left cell, (0, 0), and you hope to travel to

2020-11-13 13:24:12 32

[leetcode] 1642. Furthest Building You Can Reach

DescriptionYou are given an integer array heights representing the heights of buildings, some bricks, and some ladders.You start your journey from building 0 and move to the next building by possibly using bricks or ladders.While moving from building i

2020-11-13 00:49:38 97

原创 [leetcode] 1562. Find Latest Group of Size M

DescriptionGiven an array arr that represents a permutation of numbers from 1 to n. You have a binary string of size n that initially has all its bits set to zero.At each step i (assuming both the binary string and arr are 1-indexed) from 1 to n, the bit

2020-11-13 00:12:31 28

原创 [leetcode] 1283. Find the Smallest Divisor Given a Threshold

DescriptionGiven an array of integers nums and an integer threshold, we will choose a positive integer divisor and divide all the array by it and sum the result of the division. Find the smallest divisor such that the result mentioned above is less than o

2020-11-12 20:14:46 31

异步框架上传客户端示例

android异步框架应用的一个小小的示例

2014-09-16

openfst-1.6.7.tar.gz

编译ctcdecode所需要的第三方库,下载地址为:https://sites.google.com/site/openfst/home/openfst-down/openfst-1.6.7.tar.gz

2020-05-06

RotateDemo.rar

QT5版本的旋转图片的动画,编译器用的mingW,代码进行了重构改良,文章请参考: https://blog.csdn.net/w5688414/article/details/90072287

2019-05-10

springboot getopenid demo

springboot实现用户信息授权获取用户的id, 写的教程地址为https://blog.csdn.net/w5688414/article/details/88541743

2019-03-13

pytorch 0.3.1 python3.6 CPU版本whl

pytorch 0.3.1 python3.6 CPU版本whl,这个属于老版本了,在官网上都不容易找到,我这里分享出来

2019-03-11

NUS-WIDE多标签分类数据集整理

博客地址为:https://blog.csdn.net/w5688414/article/details/84593705 用keras进行多标签分类的图片数据集,图片取自于NUS-WIDE数据集

2018-11-29

VGG_ILSVRC_16_layers_fc_reduced.h5

VGG_ILSVRC_16_layers_fc_reduced.h5文件,用于ssd keras模型,考虑到国内没有搜到该资源,我来当当搬运工

2018-11-07

Jetson-TX2 tensorflow-1.3.0-cp35-cp35m-linux_aarch64.whl

最近编译成功了tensorflow 1.3的版本,tensorflow-1.3.0-cp35-cp35m-linux_aarch64.whl,把编译成功的文件分享给大家

2017-12-25

bazel-0.6.1-dist.zip 下载

官网地址为:https://github.com/bazelbuild/bazel/releases/,但是很难下载下来,我用的是校园网,都下了好久,我把我下载的包分享给大家,希望对大家有用

2017-11-15

Connectionist Temporal Classification: A Tutorial with Gritty Details

教程:Connectionist Temporal Classification详解补充中文翻译的对应的英文原版教程,链接为:http://blog.csdn.net/w5688414/article/details/77867786,希望能帮助到大家

2017-09-14

操作系统原理第二章作业

操作系统教程,第二版,第二章课后习题答案。

2015-01-05

操作系统页面置换LRU,FIFO,OPT算法实现代码

LRU算法,FIFO算法,OPT算法,belady现象

2015-01-05

农民小飞侠的留言板

发表于 2020-01-02 最后回复 2020-01-02

TA创建的收藏夹 TA关注的收藏夹

TA关注的人 TA的粉丝

提示
确定要删除当前文章?
取消 删除