自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

楼上小宇_home

Write the code, Change the world

  • 博客(18)
  • 资源 (11)
  • 收藏
  • 关注

原创 关于某日访问次数最多的IP的topK问题的三种解法

题目描述在july大神的博客中,看到这样两道题:1. 海量日志数据,提取出某日访问百度次数最多的那个IP。2. 假设目前有一千万个记录(这些查询串的重复度比较高,虽然总数是1千万,但如果除去重复后,不超过3百万个。一个查询串的重复度越高,说明查询它的用户越多,也就是越热门。),请你统计最热门的10个查询串,要求使用的内存不能超过1G。现在我将两题结合一下:假如有1千万+的...

2018-08-19 20:32:01 7558 1

原创 TF-IDF 原理及sklearn中的tf-idf实例分析

背景介绍在一个大的文本语料库中,一些单词将出现很多次(例如 “the”, “a”, “is” 是英文),因此对文档的实际内容没有什么有意义的信息。 如果我们将直接计数数据直接提供给分类器,那么这些频繁词组会掩盖住那些我们关注但很少出现的词。 为了为了重新计算特征权重,并将其转化为适合分类器使用的浮点值,因此使用 tf-idf 变换是非常常见的。 Tf表示术语频率,而 tf-idf 表示术语...

2018-08-18 22:32:20 12251 3

原创 矩阵快速幂的问题

前言这个问题,本科ACM时期做过专门的总结,但是,由于后来也没有使用过相关的知识,就忘得差不多了最近回顾了一下之前的博客链接快速幂取模算法 快速幂算法模板 矩阵乘法快速幂模板 相关的地址矩阵快速幂的写法 while(N) { if(N&1) res=res*A; n>>=...

2018-08-31 00:20:38 5342

原创 55道常见的计算机面试题

此图来源: http://www.chinahadoop.cn/course/1160

2018-08-30 20:49:29 11924

原创 快速排序的递归和非递归实现 c语言版本

#include <iostream>void quick_sort(int s[], int l, int r){ if (l < r) { int i = l, j = r, pivot = s[l]; while (i < j) { whil

2018-08-30 17:48:43 10685 2

原创 利用cre2进行分组模式匹配的实例

code#include <stdio.h>#include <stdlib.h>#include <string.h>#include <cre2.h>int init_ptn(const char *str_ptn, cre2_regexp_t **pPtn){ // 初始化cre2的正则表达式 cre2_opt...

2018-08-28 09:04:26 5550

原创 python 通过队列实现栈

前言原理比较简单,不再赘述codeimport collectionsclass MyStack: def __init__(self): """ Initialize your data structure here. """ self.queue = collections.deque() d...

2018-08-26 17:52:24 5422

原创 python实现二叉树的重建2 之由中序遍历和后序遍历重建

前言通过上一节对python实现二叉树的重建1 之由前序遍历和中序遍历重建,我相信我们再来做这个问题就不难了,完全可以照猫画虎的来实现,具体的原理几乎是一样的,直接上代码了code# 通用解法 def buildTree(self, inorder, postorder): """ :type inorder: List[int] :...

2018-08-26 15:27:51 5826

原创 python实现二叉树的重建1 之由前序遍历和中序遍历重建

前言此题是关于树的面试题目的常见题型,题目的含义很清晰,这个就不用多说了解法关于这道题的解法有很多不同的样式,通用的解法是这样的: 假如现在我们有如下两个遍历的情况preorder: [1, 2, 4, 5, 3, 6]inorder: [4, 2, 5, 1, 6, 3]那么我们建树的办法通常是1.用先序遍历的第一个元素也就是1,作为root2.然后在ino...

2018-08-26 14:54:35 6031 2

原创 由动态规划计算编辑距离引发的思考

简单介绍编辑距离算法: https://www.cnblogs.com/BlackStorm/p/5400809.html https://wizardforcel.gitbooks.io/the-art-of-programming-by-july/content/05.02.html https://www.dreamxu.com/books/dsa/dp/edit-distance...

2018-08-24 21:21:23 5360

原创 使用python建立简单的树机构

代码import sysclass TreeNode: def __init__(self, x): self.val = x self.left = None self.right = Noneclass Solution: def preorderTraversal(self, root): "...

2018-08-21 17:54:49 5853

原创 2019秋招面试常考题目

自然语言处理tf-idf的公式编辑距离的代码和思想新词发现的公司和原理大数据相关十道海量数据处理面试题叙述hadoop中的map-reduce过程,以及shuffle过程杂题2^32=4G...

2018-08-19 21:51:23 5956

原创 c语言使用指定字符串替换特定的子串

前言当前程序是在linux环境下执行的代码#include<stdio.h>#include<stdlib.h>#include<string.h>#define MAX_UTF8_RES_LEN 1024int replace_all(char* str, size_t strLen, const char* d, const char...

2018-08-14 16:12:50 12863 2

原创 c语言从stdin读入

代码#include<stdio.h>#include<stdlib.h>intmain(int argc, char* argv[]){ char * line = NULL; size_t len = 0; ssize_t read_len; while ((read_len=getline(&line, &...

2018-08-09 11:22:59 9284

原创 python 实现桶排序

前言桶排序(Bucket sort)或所谓的箱排序,是一个排序算法,工作的原理是将数组分到有限数量的桶里。每个桶再个别排序(有可能再使用别的排序算法或是以递归方式继续使用桶排序进行排序)。桶排序是鸽巢排序的一种归纳结果。当要被排序的数组内的数值是均匀分配的时候,桶排序使用线性时间( Θ ( n ) {\displaystyle \Theta (n)} {\displaystyle \Theta...

2018-08-09 09:35:36 10232

原创 Google的一篇很好的解释语音模型、声学模型、解码器之间关系的文章

链接一个团队如何将语音识别这一梦想变为现实

2018-08-08 11:26:38 7745

原创 docker 常用命令集合

查看imagesdocker images查看containerdocker psdocker container ps -a启动containerdocker container start #####暂停containerdocker container stop #####删除containerdocker conta...

2018-08-04 18:20:04 5276

原创 linux 下根据cpp文件快速书写头文件

假设我们现在有一个hello.cc文件,我们如果想要书写它的头文件hello.h,使用如下的命令即可:cat hello.cc | grep "^\w.*)$" > hello.h然后我们在hello.h中添加我们依赖的头文件即可...

2018-08-02 20:12:51 5410

银行笔试-计算机知识部分_sty修改.pdf

银行笔试-Java基础知识必备,java常用基础知识,java学习资料

2019-10-05

item_seleted

QT中使用rubberband橡皮筋等方法进行选中多个物体,展示效果如下: https://img-blog.csdnimg.cn/20190122112611529.gif

2019-01-22

python画小猪佩奇

用python快速画出小猪佩奇,具体的效果展示可以看这里:https://img-blog.csdnimg.cn/20190120103016165.gif

2019-01-20

Box2D_v2.1.2已经编译好的文件

Box2D is a 2D physics engine for games. For help with Box2D, please visit http://www.box2d.org. There is a forum there where you may post your questions.

2018-11-07

Box2D_v2.1.2

Box2D_v2.1.2 Box2D is a 2D physics engine for games. For help with Box2D, please visit http://www.box2d.org. There is a forum there where you may post your questions.

2018-11-07

2018 Google kickstart Problem A. Planet Distance 输入数据

2018 Google kickstart Problem A. Planet Distance 输入数据

2018-05-27

笨方法学python3 Learn Python 3 the Hard Way

笨方法学Python号称最经典的python入门书籍现在出python3版本的了,你还不快来学? 英文高清带书签版本 You Will Learn Python 3! Zed Shaw has perfected the world’s best system for learning Python 3. Follow it and you will succeed—just like the millions of beginners Zed has taught to date! You bring the discipline, commitment, and persistence

2018-04-06

用python进行数据分析 第二版 Python for Data Analysis, 2nd Edition

用python进行数据分析 第二版 英文高清带书签版本 Get complete instructions for manipulating, processing, cleaning, and crunching datasets in Python. Updated for Python 3.6, the second edition of this hands-on guide is packed with practical case studies that show you how to solve a broad set of data analysis problems effectively. You’ll learn the latest versions of pandas, NumPy, IPython, and Jupyter in the process. Written by Wes McKinney, the creator of the Python pandas project, this book is a practical, modern introduction to data science tools in Python. It’s ideal for analysts new to Python and for Python programmers new to data science and scientific computing. Data files and related material are available on GitHub. Use the IPython shell and Jupyter notebook for exploratory computing Learn basic and advanced features in NumPy (Numerical Python) Get started with data analysis tools in the pandas library Use flexible tools to load, clean, transform, merge, and reshape data Create informative visualizations with matplotlib Apply the pandas groupby facility to slice, dice, and summarize datasets Analyze and manipulate regular and irregular time series data Learn how to solve real-world data analysis problems with thorough, detailed examples

2018-04-06

SQL与关系数据库理论:如何编写健壮的SQL代码 第二版

对于数据库管理与开发人员来说,使用 SQL 时会到处遭遇困难和陷阱。只有深入理解关系理论,并将理论应用于实践,才能避免这些困难和陷阱。 《SQL 与关系数据库理论:如何编写健壮的 SQL 代码(第 2 版)》作者深入阐述了关系理论,以严谨的态度对 SQL 与关系理论进行详尽而深入的对比、讨论和思考,并且使用大量示例和练习展示怎样才能将关系理论正确地应用到 SQL 中,得到健壮的 SQL 代码,为高级数据库开发人员提供大量常见 SQL 问题的解决之道。

2018-02-26

学习 Go 语言(Golang)

学习 Go 语言(Golang),简单易懂的Go语言教程,让你分分钟学会GO语言

2018-01-26

nginx的1.12.2 下 载

nginx-1.12.2的下载应用,免安装,即可运行。 nginx-1.12.2的下载应用,免安装,即可运行

2018-01-26

空空如也

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

TA关注的人

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