- 博客(39)
- 资源 (1)
- 收藏
- 关注
原创 线性回归-Ridge脊回归
线性回归 Linear Regression假设model是y^=f(x)=Xβ\hat{y} = f(x) = X\betay^=f(x)=Xβ我们可以写个基类,表示了线性回归必须的一些参数class LinearRegressionBase: def __init__(self): # beta: shape (p, 1) self.beta = None def fit(self, X, y): # X: shape (n
2021-10-10 21:10:26 653
原创 一篇很靠谱的CMake入门教程
文章目录CMake是什么CMake工程的文件和结构写一个顶层的CMakeLists.txt文件使用CMakeLists.txt描述一个构建目标CMake的一些基础语法显示帮助信息 `message()`变量条件语句`foreach`循环函数`find_package`函数`find_libraries`函数一种更通用的写法CMake常用变量全局编译选项工作目录信息CMake版本系统信息CMake常...
2019-09-07 23:00:09 832
原创 使用jupyter themes更换Jupyter notebook主题 ,添加自定义字体
使用 jupyter themes 更换 jupyter notebook 的主题github仓库官网,请查看https://github.com/dunovank/jupyter-themes安装Jupyter themes的教程有很多,最简单的就是pip install jupyterthemes,然后可以通过jt命令调用,具体的请看github我的配置方案是$ jt -t gr...
2019-05-31 11:04:02 1715
原创 系统分析与设计作业 1
文章目录简答1. 软件工程的定义2. 解释导致 software crisis 本质原因、表现,述说克服软件危机的方法3. 软件生命周期4. SWEBoK 的 15 个知识域([An Overview of the SWEBOK Guide](https://www.sebokwiki.org/wiki/An_Overview_of_the_SWEBOK_Guide) 请中文翻译其名称与简短说明)...
2019-03-13 00:15:05 287
原创 [算法设计与分析] CLFP 有容量限制的设施选址问题
Capacitated Facility Location Problems可查看我的Github文章目录Capacitated Facility Location Problems问题背景Capacitated Facility Location ProblemProblem Instance问题参考问题求解解法1:模拟退火 SA代码:简介基本参数设置解法2:贪心+局部搜索 Greedy +...
2018-12-23 20:31:05 2065 2
原创 Leetcode 97. Interleaving String
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.Example 1:Input: s1 = "aabcc", s2 = "dbbca", s3 = "aadbbcbcac"Output: trueExample 2:Input: s1 = "aabcc&quo
2018-12-11 17:07:28 163
原创 LeetCode 87. Scramble String(补上周)
题目Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation of s1 = "great": great / \ gr ...
2018-12-03 21:36:46 181
原创 Leetcode 264. Ugly Number II
Write a program to find the n-th ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5.Example:Input: n = 10Output: 12Explanation: 1, 2, 3, 4, 5, 6, 8, 9, 10, 12 ...
2018-11-15 16:07:49 204
原创 Leetcode 152. Maximum Product Subarray
题目Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product.Example 1:Input: [2,3,-2,4]Output: 6Explanation: [2,3] ...
2018-11-10 09:41:14 158
原创 Leetcode 120. Triangle
题目Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[ [2], [3,4], [6,5...
2018-11-02 16:58:18 162
原创 Leetcode 063. Unique Paths II
https://leetcode.com/problems/unique-paths-ii/description/题目A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).The robot can only move either down or r...
2018-10-27 01:21:47 165
原创 Leetcode 134. Gas Station
题目There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to it...
2018-10-17 21:22:44 171
原创 Leetcode 55. Jump Game
题目Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determine if y...
2018-10-17 09:33:22 360
原创 Leetcode 279. Perfect Squares
题目Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, …) which sum to n.Example 1:Input: n = 12Output: 3 Explanation: 12 = 4 + 4 + 4.Example 2...
2018-10-16 15:29:04 151
原创 Leetcode 130. Surrounded Regions
题目Given a 2D board containing 'X' and'O'(the letter O), capture all regions surrounded by 'X'.A region is captured by flipping all 'O's into 'X's in that surrounded region.Example:X X X XX O O X...
2018-10-14 23:51:26 218
原创 Leetcode 200. Number of Islands
题目Given a 2d grid map of '1's (land) and'0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assu...
2018-10-14 22:55:54 156
原创 Leetcode 310. Minimum Height Trees
For a undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Among all possible rooted trees, those with minimum height are called mini...
2018-10-07 22:24:44 196
原创 Leetcode 773. Sliding Puzzle
题目On a 2x3 board, there are 5 tiles represented by the integers 1 through 5, and an empty square represented by 0.A move consists of choosing 0 and a 4-directionally adjacent number and swapping it....
2018-09-30 19:14:20 437
原创 Leetcode 207. Course Schedule
Leetcode 207. Course Schedule题目There are a total of n courses you have to take, labeled from 0 to n-1.Some courses may have prerequisites, for example to take course 0 you have to first take cours...
2018-09-23 02:11:56 156
原创 Leetcode 240. Search a 2D Matrix II
Leetcode 240. Search a 2D Matrix II题目Solution with O(n2) or O(nlogn)分析Solution with O(nlogn)分析Solution with O(nlog3) = O(n1.58)分析Solution with O(m+n)分析Leetcode 240. Search...
2018-09-13 21:12:07 534
原创 Leetcode 215. Kth Largest Element in an Array
Leetcode 215. Kth Largest Element in an Array题目Find the **k**th largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element....
2018-09-09 16:18:24 182
原创 Leetcode 31. Next Permutation
Leetcode 31. Next Permutation题目:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it mu...
2018-08-12 23:24:59 203
原创 Leetcode 15. 3Sum
Leetcode 15. 3Sum题目Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:The s...
2018-08-03 10:41:08 256
原创 Leetcode 11. Container With Most Water
Leetcode 11. Container With Most Water题目Given n non-negative integers a1, a2, …, an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints ...
2018-07-31 11:33:28 148
原创 Leetcode 005 Longest Palindromic Substring
Leetcode 005 Longest Palindromic Substring题目Solution分析Leetcode 005 Longest Palindromic Substring找到一个字符串中最长的回文串题目Given a string s, find the longest palindromic substring in s. ...
2018-07-27 23:06:12 168
原创 Leetcode 004 Median of Two Sorted Arrays
Leetcode 004 Median of Two Sorted Arrays题目My Solution (O(n) not O(logn))分析Leetcode 004 Median of Two Sorted Arrays写出给定的两个数组中所有数字的中位数题目There are two sorted arrays nums1 and nums2 ...
2018-07-26 14:50:03 174
原创 Leetcode 003 Longest Substring Without Repeating Characters
题目如下Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given &amp
2018-07-25 22:12:02 212
原创 数据库系统 串行化 各种概念的总结
冲突可串行: 冲突的优先图观测可串行化: 观测等价于某个可串行化调度 - 观测等价: 两个调度S1和S2 1. Ti在S1中读A的初始值,那么在S2中也读A的初始值 2. 如果在S1中读到的是Tj写的A,那么在S2中也必须读Tj写的A 3. 如果S1执行了最后一次对A的写,那么S2也必须执行最后一次对A的写严格的:在一个事务写入的值在其提交或者中止之前没有...
2018-06-18 15:06:56 2160
原创 Junit学习笔记
Study report of JUnitStudy report of JUnitjunit是什么用法实例其他的运行junit是什么junit是java的单元测试工具,当前看来最大的作用是无需新建main函数即可验证单一函数,确实是神器,我们可以看一下他的用法。用法实例// Hello类public class Hello { ...
2018-04-16 19:18:05 214
原创 Ant学习笔记
Study report of Ant实训学习的Ant笔记,基本上是个入门简陋的版本,要是想要认真学习的话还是推荐去找文档学习Study report of AntAnt简介入门解释projecttargetproperty常用任务复制文件删除mkdirmove利用ant部署Java项目打war包Ant简介...
2018-04-16 19:15:12 215
原创 Java入门学习笔记
Study report of Java中级实训第一周的Java学习笔记,记录的比较粗略,而且不深入,毕竟教程限于篇幅也是比较粗略的,而且因为这个学期已经学习了C#,两者还是有不少共通之处。而且作为C系语言,C++也是有不少相像的地方的。Study report of JavaJava基本的运行数据类型基本数据类型复合数据类型引用类型流程控制语句循环语句分支语...
2018-04-16 19:10:49 187
原创 Vi/Vim学习笔记
Study report of Vi/Vim中级实训时候学习的,做一下记录Study report of Vi/VimVi编辑器的使用基本操作进入Vi切换模式退出Vi命令行模式功能键进入插入模式移动光标删除文字复制替换行操作下命令 - Last line mode列出行号查找字符Vi编辑器的使用基本操作...
2018-04-16 19:07:57 706
原创 概率论笔记
第一章 基本概念1 Visual techniques11 Dot-plot 点图12 Stem-and-Leaf 茎叶图13 Histogram 直方图14 Boxplots 箱线图2 Measures of Locationmean 均值trimmed means 截断均值median 中位数variance 方差standard deviations 标准差
2018-01-10 22:30:47 1520
原创 Chrome被hao123.com劫持了,消灭它
1 修改属性右键点开Chrome的快捷方式的属性,发现[目标]这个选项里在最后多了一个hao123.com的url,把这个删掉 点开浏览器试一试,不行的话打开属性里的[起始位置]里的目录,把其中的Chrome.exe文件的属性里的hao123.com也删掉 2. 改perference这都不行还可以用一个更暴力一点的方式。 我们打开C:\Users\******\AppData\Local\
2017-12-11 22:41:47 9118
原创 关于JS闭包的分析和解释(菜鸟的)
关于JS闭包的分析和解释(菜鸟的)1. 完成计数器闭包JS的闭包是一个强大的功能,最基础的利用闭包的例子是完成一个封装的计数器。 我们可以先来看一下如何用朴素的思想完成计数器。var counterValue = 0;var counter = function() { return (++counterValue);};counter(); // 1counter();
2017-11-26 14:05:22 356
原创 运算符重载
C++提供了新的数据类型称为类,对类的对象进行操作时,我们当然可以用函数完成一切操作。但是为了将操作表示得更加直观,我们可以将运算符重新定义,使得操作更容易理解。 比如string类重载了+运算符,使用+可以把两个不同的字符串连接在一起,这种重新定义让程序员的使用更加方便也更加直观。我们将这种重新定义成为重载。 为了方便说明,我们用一个简单的类来做示例class Complex { pri
2017-03-24 17:56:45 721
原创 深拷贝
欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl
2017-03-22 15:00:28 384
原创 中大生活费估计
在中大生活一个月16340063 本人学院目录在中大生活一个月一 衣二 食细节计算总计三 住四 行五 总计相信大家在报道后的第一个月里已经走上了吃土的道路,那么钱都到哪里去了,博主略做统计。我们把开销分为衣食住行四个部分做个简单的估计。一、 衣 事由 支出 军训服 ¥100 其他 ¥100 合计 ¥2001二、 食1.细节 我们按照早饭5元,午
2016-10-07 16:42:42 695 13
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人