自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

家行hang的博客

Programming is an art.

  • 博客(41)
  • 资源 (13)
  • 问答 (2)
  • 收藏
  • 关注

原创 今日刷题有感

感觉算法这个东西,有很多路可以走,局限性不是很大,今天看到一道leetcode题(1146. Snapshot Array),有的人用的各种骚操作(unordered_map, map.lower_bound, auto啥的),也有人用各种常规操作(vector,iterator等等),但是算法本质思想是一样的。所以,我觉得骚操作是永远学不完的,与其记忆那些骚操作,不如想想怎么用自己会的基本操作...

2019-08-19 12:03:14 231

原创 四大专业课知识点整理总结

链接总结:https://blog.csdn.net/FanceFu/article/details/79357048https://www.cnblogs.com/xdyixia/p/9274909.htmlhttps://www.cnblogs.com/mukekeheart/p/5731833.html

2019-07-09 09:09:07 591

原创 孔老师《数据挖掘与大数据分析 》第三次课堂小测复习笔记

大家好,我是五一劳动节一股清流,大致整理了一下孔老师要考的关于统计学的一点内容,基本都是套公式计算,ANOVA后面的列联表分析部分我貌似没有印象讲过,应该不会考,待我能下载上课视频再确认一下。欢迎大家批评指正。附上高清pdf链接:https://pan.baidu.com/s/1LlKB1kskw9hgmqfsWzLrfA提取码:oucy...

2019-05-04 11:35:03 503

原创 分解质因数算法

题目:将一个正整数分解质因数。例如:输入90,打印出90=2 * 3 * 3 * 5。分析:从1到N先找出最小的质因数,如果等于本身,那么说明只有一个质因数,如果不是,那么将该质因数打印出来,并将N/该质因数作为新的N值进行运算。设计步骤:1、如果这个质数恰等于n,则说明分解质因数的过程已经结束,打印出即可。2、如果n!=k,但n能被k整除,则应打印出k的值,并用n除以k的商,作为新的正整...

2019-04-17 09:24:57 3105 1

原创 研读pytorch版本的BERT分类代码

1 首先加载了tokenizer就是有个vocab.txt文件,里面每行是个token,比如:abcbcd吴家行然后Tokenizer这个类中有几个属性:vocab是个字典,也就是将上面的vocab.txt文件变成如下的形式:{ "abc": 0, "bcd": 1, "吴家行": 2,}ids_to_tokens调换vocab中token...

2019-04-15 16:47:12 5453 4

原创 你爱西加加么?

你爱西加加么?cinint a;cin >> a;coutint a = 5;cout << a << endl; // endl : '\n'vectorvector<int> a;vector<int> b(5); //定义一维动态数组含有五个元素vector<vector<int> >...

2019-04-13 16:14:48 153

原创 关于c语言的scanf()和gets()输入字符串

scanf() 和 gets() 是有区别的:scanf() 读取字符串时以空格为分隔,遇到空格就认为当前字符串结束了,所以无法读取含有空格的字符串。gets() 认为空格也是字符串的一部分,只有遇到回车键时才认为字符串输入结束,所以,不管输入了多少个空格,只要不按下回车键,对 gets() 来说就是一个完整的字符串。换句话说,gets() 用来读取一整行字符串。...

2019-04-11 13:06:10 1891

原创 求x的y次方对z取模(x^y)mod z:蒙格马利快速幂模算法

long Montgomery(long a,long b,long m){ long r=1; a %=m; while(b>1) { if((b&1)!=0) r = (r*a)%m; a = (a*a)%m; b/=2; } return (r*a)...

2019-04-10 23:29:01 2322

原创 孔老师《数据挖掘与大数据分析 》第二次课堂小测复习笔记

马上迎来孔老师第二次课堂小测,闲着没事整理了一下要考的内容,本人大概是清明节的一股清流吧。。奉上手稿,以供参考~

2019-04-06 15:51:54 544

原创 LeetCode - 1017. Convert to Base -2

Given a number N, return a string consisting of "0"s and "1"s that represents its value in base -2 (negative two).The returned string must have no leading zeroes, unless the string is “0”.Example 1:...

2019-04-01 10:49:54 226

原创 tensorflow学习笔记(5) - 激励函数的使用

import tensorflow as tfimport numpy as npimport matplotlib.pyplot as pltdef add_layer(inputs, in_size, out_size, activate_function=None): Weights = tf.Variable(tf.random_normal( [in_s...

2019-03-25 10:57:36 165

原创 tensorflow学习笔记(4) - Placeholder

import tensorflow as tfinput1 = tf.placeholder(tf.float32)input2 = tf.placeholder(tf.float32)'''注意:multiply 是元素相乘matmul 是矩阵相乘'''output = tf.multiply(input1, input2)with tf.Session() as ses...

2019-03-25 09:14:52 215

原创 tensorflow学习笔记(3) - Variable变量

import tensorflow as tfstate = tf.Variable(0, name='counter')# print(state.name)one = tf.constant(1)new_value = tf.add(state, one)update = tf.assign(state, new_value)init = tf.initialize_all_va...

2019-03-25 09:14:20 181

原创 tensorflow学习笔记(2) - Session会话

import tensorflow as tfmatrix1 = tf.constant([[3, 3]])matrix2 = tf.constant([[2], [2]])product = tf.matmul(matrix1, matrix2)# method 1sess = tf.Session()result = sess.r...

2019-03-25 09:13:33 219

原创 tensorflow学习笔记(1) - 第一个tensorflow程序

import numpy as npimport tensorflow as tf# creat datax_data = np.random.rand(100).astype(np.float32) # 随机生成100个数,每个数的类型是float32y_data = x_data*0.1+0.3### create tensorflow structure start ###...

2019-03-23 19:56:03 728

原创 LeetCode-561. Array Partition I(Quick Sort快速排序)

561. Array Partition I题目Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), …, (an, bn) which makes sum of min(ai, bi) for all i from...

2019-03-06 08:46:54 178

原创 LeetCode-746. Min Cost Climbing Stairs(DP)

746. Min Cost Climbing Stairs题目On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed).Once you pay the cost, you can either climb one or two steps. You need to find m...

2019-03-04 15:12:29 116

原创 LeetCode-1004. Max Consecutive Ones III【Sliding Window】

1004. Max Consecutive Ones III题目Given an array A of 0s and 1s, we may change up to K values from 0 to 1.Return the length of the longest (contiguous) subarray that contains only 1s.Example 1:Inpu...

2019-03-04 12:38:12 133

原创 LeedCode-53. Maximum Subarray

53. Maximum Subarray题目:Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.Example:Input: [-2,1,-3,4,-1,2,1,-5,...

2019-03-01 20:40:17 89

原创 LeetCode-14. Longest Common Prefix

14. Longest Common Prefix题目:Write a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string “”.Example 1:Input: [“flower...

2019-03-01 20:40:07 96

原创 ACM中快速将整形转化成字符串

//首先定义一个确定大小的字符数组char str[100];int num = 7;sprintf(str, &amp;amp;amp;quot;%d&amp;amp;amp;quot;, num);

2019-03-01 20:39:51 256

原创 LeetCode-108. Convert Sorted Array to Binary Search Tree

108. Convert Sorted Array to Binary Search Tree题目Given an array where elements are sorted in ascending order, convert it to a height balanced BST.For this problem, a height-balanced binary tree is ...

2019-03-01 20:39:40 78

原创 LeetCode-122. Best Time to Buy and Sell Stock II

122. Best Time to Buy and Sell Stock II题目:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete as ...

2019-03-01 20:39:34 92

原创 LeetCode-168. Excel Sheet Column Title

168. Excel Sheet Column Title题目Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example:1 -&amp;amp;amp;amp;gt; A2 -&amp;amp;amp;amp;gt; B3 -&amp;amp;amp;amp;gt; C...26 -&amp;amp;amp;am

2019-03-01 20:39:28 95

原创 LeetCode-136. Single Number

136. Single Number题目Given a non-empty array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you imp...

2019-03-01 20:39:10 102

原创 LeetCode-172. Factorial Trailing Zeroes

172. Factorial Trailing Zeroes题目Given an integer n, return the number of trailing zeroes in n!.Example 1:Input: 3Output: 0Explanation: 3! = 6, no trailing zero.Example 2:Input: 5Output: 1Exp...

2019-03-01 20:39:05 131

原创 LeetCode-169. Majority Element

169. Majority Element题目Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and t...

2019-03-01 20:38:59 128

原创 万能头文件(C++)

#include&amp;amp;amp;lt;bits/stdc++.h&amp;amp;amp;gt;using namespace std;

2019-03-01 20:38:44 12076

原创 LeetCode-205. Isomorphic Strings

205. Isomorphic Strings题目Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a character must ...

2019-03-01 20:38:34 137

原创 判断一个数字是否是2的幂次方

这段代码可以说是人生中比较自豪的一段代码了,直接想到了位运算,因为2的幂次方化为二进制一定只有一个1bool isPowerOfTwo(int n) { if(n==0)return false; int bits=0; int k =n; while(k!=0){ if(k&amp;amp;amp;1==1)bits++; if(bits&amp;amp;gt;...

2019-03-01 20:38:25 630

原创 LeetCode-141. Linked List Cycle

141. Linked List Cycle题目Given a linked list, determine if it has a cycle in it.To represent a cycle in the given linked list, we use an integer pos which represents the position (0-indexed) in the ...

2019-03-01 20:38:13 84

原创 Python 读取 excel 文件导入 mysql 数据库

&amp;quot;&amp;quot;&amp;quot;功能:将Excel数据导入到MySQL数据库&amp;quot;&amp;quot;&amp;quot;import xlrdimport pymysql# Open the workbook and define the worksheetbook = xlrd.open_workbook(&amp;quot;名单.xlsx&amp;quot;) # excel文件名

2019-01-19 11:20:37 609 1

原创 Spark aggregateMessage() 实现 PageRank算法

Project 2Jiahang, 2018/12/14RequirementsUse aggregateMessage to implement PageRank, and use relation.txt to test this algorithm, develop the code and write the report.Basic content about Spark tau...

2018-12-29 10:24:56 706

原创 Matlab 2017a + VS2017 C++编译器

Matlab 2017a + VS2017 C++编译器安装完成Matlab 2017a和Visual Studio Professional 2017以后,在matlab命令行窗口输入mex -setup命令后,提示找不到编译器。在确认matlab和VS2017安装无误后:找到matlab 2017a的安装路径,如D:\ProgramFiles\MATLAB\R2016b下载http...

2018-12-23 08:38:48 4073 3

原创 Django运行(For Windows)

Django运行(For Windows)创建虚拟环境python -m venv venv激活虚拟环境venv/Scripts/activate退出虚拟环境venv/Scripts/deactivate依照requirements.txt安装需要的包pip install -r requirements.txt创建数据库python manage.py makemig...

2018-12-10 12:09:25 593

翻译 用于视觉跟踪的层次化卷积特性

用于视觉跟踪的层次化卷积特性摘要视觉目标跟踪是一项具有挑战性的工作,由于目标对象的变形、突然运动、背景杂波和遮挡等因素,使目标对象的外观发生明显变化。本文利用在对象识别数据集上训练的深度卷积神经网络提取的特征来提高跟踪准确性和鲁棒性,最后一个卷积层的输出对目标的语义信息 (为什么叫做语义信息?) 进行编码,这些表示对显著的外观变化具有鲁棒性,然而,它们的空间分辨率过于粗糙,无法精确定位...

2018-09-10 11:11:22 1578

原创 基于自适应弹性网络回归的目标跟踪(OBJECT TRACKING WITH ADAPTIVE ELASTIC NET REGRESSION)阅读笔记

基于自适应弹性网络回归的目标跟踪(OBJECT TRACKING WITH ADAPTIVE ELASTIC NET REGRESSION)阅读笔记摘要近年来,各种基于回归的跟踪方法取得了很大的成功,然而,在大多数方法中,提取的所有特征都是用来表示对象的,而不需要进行特征选择。 (这里的意思是提取的所有特征全都用上了,而不是选择着去用) 本文提出了一种 基于自适应权(adap...

2018-08-31 19:46:34 2600 1

翻译 DeepPavlov配置文件

配置文件chainer 配置{ "chainer": { "in": ["x"], "in_y": ["y"], "pipe": [ ... ], "out": ["y_predicted"] }}chainer 是 DeepPavlov 的核心概念,它从异构组件(基于

2018-08-25 17:57:58 1113

翻译 混合面向目标的机器人

import jsonimport copy# pretty printsfrom pprint import pprint# creating directory for json configsimport osif not os.path.isdir("gobot"): os.mkdir("gobot")import deeppavlov注意:“...

2018-08-23 08:45:59 434

转载 机器学习-监督学习&&无监督学习

监督学习(supervised learning)通过已有的训练样本(即已知数据以及其对应的输出)来训练,从而得到一个最优模型,再利用这个模型将所有新的数据样本映射为相应的输出结果,对输出结果进行简单的判断从而实现分类的目的,那么这个最优模型也就具有了对未知数据进行分类的能力。在社会中,我们在很小的时候就被大人教授这是鸟啊,那是猪啊,这个是西瓜、南瓜,这个可以吃、那个不能吃啊之类的,我们眼里见到的...

2018-06-27 09:37:51 216

孔老师《数据挖掘与大数据分析 》第二次课堂小测复习笔记

拉格朗日乘子 梯度下降 优化论等内容 孔老师《数据挖掘与大数据分析 》第二次课堂小测复习笔记

2019-04-09

算法导论中文版

ACM 算法导论 机械工业出版社 原书第二版

2019-03-27

计算机网络自顶向下方法 英文版6e

计算机网络计算机网络计算机网络计算机网络计算机网络计算机网络

2019-03-27

深度学习(中文)

深度学习(中文) 第一部分 应用数学与机器学习基础 第二部分 深层网络:现代实践 第三部分 深度学习研究

2019-03-23

算法图解(中文)

算法图解 acm必备好书 生动形象

2019-03-23

数据结构实践课-哈夫曼树-文件的压缩解压(MFC)

数据结构实践课-哈夫曼树-文件的压缩解压(MFC)

2019-03-23

数据结构实践课-景点信息管理系统(MFC)

数据结构实践课 MFC景点信息管理系统

2019-03-23

挑战程序设计竞赛 算法和数据结构

ACM必备 挑战程序设计竞赛 挑战程序设计竞赛 挑战程序设计竞赛

2019-03-23

软件构架实践(英文版)

软件构架实践(英文版) 软件体系结构推荐书籍 软件体系结构推荐书籍

2019-03-22

MySQL下载安装使用全过程

MySQL下载安装使用全过程

2018-12-29

hcf所需的环境配置资源

hcf目标跟踪代码中所需要的部分环境资源..

2018-09-11

matlab 2017a+vs2017附件

matlab2017对于vs2017的补丁,可以成功运行mex等程序....

2018-09-11

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

TA关注的人

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