自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(80)
  • 收藏
  • 关注

原创 Buildin Functions in Hive

[Hive] Buildin Functions in Hive2021-09-29Introduction时间函数、字符串函数、数学计算函数。Content文章目录[Hive] Buildin Functions in HiveIntroductionContentUsageDate FunctionsUNIX_TIMESTAMP()UNIX_TIMESTAMP()UNIX_TIMESTAMP()FROM_UNIXTIME()TO_DATE()YEAR()MONTH()DAY()HOUR()

2021-09-30 16:27:38 285

原创 [业务经验] 算法实践

2020-11-10 关于算法在实际落地场景中,可能面临的问题。1、模型上线后不符合预期,如何排查检查线上服务:线上模型是否正常更新;是否有把最新的模型更新到线上;看线上流量请求是否正常;看打分监控是否正常检查模型:看线上日志打分是否符合预期。通过ctr/pctr先后验一致性,判断模型性能的问题(多分类的ctr/pctr不准确)检查训练:通过看acc和auc等指标,判断训练过程问题是否有问题检查特征:特征覆盖度、特征取值、线上线下一致性等是否有问题检查样本:正负样本比例、.

2020-11-10 23:44:15 426

原创 [C++] typedef

[C++] typedef2020/10/311. 概述typedef为C语言关键字,作用为一种数据类型定义别名。包括内部数据类型(int,char等)和自定义的数据类型(struct等)。typedef本身是一种存储类的关键字,与auto、extern、static、register等关键字不能出现在同一个表达式中。2. 作用及用法2.1 typedef的用法使用typedef定义新类型的方法:在传统的变量声明表达式里,用(新的)类型名替换变量名,然后把关键字typedef加在该语句的开

2020-11-01 15:57:25 320

原创 [Spark/ML] 特征取值分布与特征分桶

[Spark/ML] 特征取值分布与特征分桶2020/10/17分桶将连续型特征离散化为离散特征。当数值特征跨越不同的数量级时,模型可能会只对大的特征值敏感,这种情况可以考虑分桶操作。分桶后得到的稀疏向量,内积乘法运算速度更快,计算结果更方便存储;对异常数据有很强的鲁棒性分桶方法等频分桶每个桶内的数据量严格相等,可能存在的问题是同一个桶内的数据取值差异较大。等距分桶根据值域等距截取,相同数值范围内的数据落入同一个桶。适用于数据分布均匀的情况,否则可能会导致各个桶内数据量不均

2020-10-19 18:22:04 1865 1

原创 [Spark] json解析

[Spark] json解析2020/10/17sql 直接解析利用get_json_object(json, '$.field')val sql = """ |select | get_json_object(json_data, '$.name') as name, | get_json_object(json_data, '$.sex') as sex, | get_json_object(j

2020-10-19 18:17:03 209

原创 [Spark] Spark SQL Join Types with examples

Spark SQL supports all basic join operations available in traditional SQL, though Spark Core Joins has huge performance issues when not designed with care as it involves data shuffling across the network, in the other hand Spark SQL Joins comes with more

2020-09-18 22:40:44 176

原创 [SQL/Java] 数据膨胀和时间格式转换

今天在工作中遇到两个问题两张hive表关联时,由于a表存在重复数据,造成另外一张b表的数据膨胀。Java的时间格式转换函数的使用一、关联的数据膨胀在计算广告的点击率预估中,需要通过点击表关联曝光表,从而生成label表。数据膨胀就发生在关联的过程中,代码如下:-- sql 1select case when (click.imei is not null and click.id is not null and click.url is not null) then 1 else.

2020-09-18 11:51:43 944

原创 [经验分享] 覃超直播课-入职新公司后,如何快速斩头露角

本文为2020-09-17超哥的直播课内容笔记。重要提示:本文为超哥自己大厂和创业经历+身旁牛人的经验作为个体,一定要独立思考和判断结合自己具体情况工作和学生时代的区别学校-有限博弈 vs 工作-无限博弈学习和考试内容固定;工作则不同(1000分 vs 50分)好的工作天花板很高,有1000分。坏的工作天花板很低,只有50分。同样的努力程度,却可以达到不同的高度。软实力(战略、情商等等)异常重要理工男在这块普遍不是很关注。同理心 Empathy -> 利他.

2020-09-18 11:46:24 419

原创 [C++] lower_bound in C++

[C++] lower_bound in C++用于寻找已排序数组,或者已被partition的数组中的bound的indexThe lower_bound() method in C++ is used to return an iterator pointing to the first element in the range [first, last) which has a value not less than val. This means that the funtion retur

2020-09-06 23:10:03 137

原创 [C++] How to find the biggest key in a std::map?

[C++] How to find the biggest key in a std::map?The method m.rbegin();Maps (and sets) are sorted, so the first element is the smallest, and the last element is the largest. By default maps use std::less, but you can switch the comparer and this would of

2020-09-06 23:08:38 199

原创 2020-09-06 第11篇

这是我在CSDN的第11篇每周总结。写作是为了逼迫自己思考,培养思考,总结和回顾的习惯。学习篇本周终于将LC刷到了200题,截止今日为202。但是也存在较严重的问题,就是很多新题都只刷过一遍。还需要大量的时间进行五毒神掌的过遍数。业务上对于自顶向下的newspaper式的编码方式的刻意练习,感觉良好。代码可以写的非常熟练和快速。而且我发现自己的打字速度和熟练度也越来越好了,包括英文打字。继续坚持。设计模式这块,需要抽出整块的时间进行学习。还没想好学习计划。此外,python的学习也要排上日程。因为

2020-09-06 23:07:16 102

原创 [DSA] training camp week-4

[DSA] training camp week-42020/08/31-2020/09/06完成情况TitleKeywordsRounds455. Assign-CookiesGreedy3/5121. Best-Time-to-Buy-and-Sell-StockDP1/5102. Binary-Tree-Level-Order-TraversalBFS3/5107. Binary-Tree-Level-Order-Traversal-II

2020-09-06 22:42:25 133

原创 [DSA] training camp week-3

2020/08/24-2020/08/31完成情况TitleKeywordsRounds70. Climbing Stairsrecursion/LRU4/577. Combinationsrecursion/backtracking2/522. Generate-Parenthesesrecursion/backtracking3/517. Letter-Combinations-of-a-Phone-Numberrecursion/backt.

2020-08-31 23:53:14 137

原创 [DSA] training camp week-2

2020/08/17-2020/08/23完成情况NumberKeywordsRounds3. Longest Substring Without Repeating CharactersSlide window/Hashmap/String1/576. Minimum Window SubstringSlide window/Hashmap/String1/549. Group-AnagramsHashmap1/5187. Repeated DN.

2020-08-31 23:52:28 148

原创 2020-08-31 第10篇

这是我在CSDN的第10篇博文。写作是为了逼迫自己思考,培养思考,总结和回顾的习惯。学习篇中间隔了两周没有写周总结了,总结和反思自己总是痛苦的,如果没有坚定的信念和强大的动力,很容易半途而废。过去三周,我参加了覃超的《算法训练营》,开始按部就班有节奏的刷题。很累,不仅身体上,还有精神上。每天要早起晚睡的利用时间,并且刷过的题还经常遗忘。业务上的东西我不是很喜欢,感觉产品的逻辑就很拧巴,让人不适。不过代码倒是写得越来越熟练了。对java也开始有了一定的感觉(主要是通过看视频,并且对C++的熟练也让我对

2020-08-31 23:50:06 144

原创 [DSA] training camp week-1

2020/08/10-2020/08/16完成情况NumberKeywordsRounds146. LRUCacheLinkedList2/51. Two SumArray/HashMap3/511. Container With Most WaterArray3/583. Move ZeroesArray3/570. Climbing StairsRecursion4/515. 3SumArray3/5206. Re.

2020-08-22 19:04:41 165

原创 [Spark] OOM问题及解决方案

1. 背景最近在业务开发过程中,遇到如下需求:一张Hive表中存储着item id和描述这个id的文本(已经切词,各个词语之间' '分隔)。另外还有一份数据,其中存储了各个词语和该词语对应的embedding vector。现要计算每个id对应文本的词向量表示,即将同一个id对应的文本中所有词语embedding vector求和。2. 问题描述在计算embedding vector求和过程中,出现了OOM问题。//代码1val sql = s"select id, text from tabl

2020-08-22 18:51:09 258

原创 [C++] push_back vs emplace_back

push_back vs emplace_back总结:push_back分为两步:先创建一个临时的构造器,然后将这个临时构造器移动或者拷贝到目标容器中。emplace_back仅有一步:直接在目标容器的目标位置,原地创建构造器即可,无需移动或者拷贝操作。关键观点:函数void emplace_back(Type&& _Val)完全等价于push_back(Type&& _Val),没有意义,因为是多余的。函数void emplace_back(Args&&a

2020-08-17 22:23:37 145

原创 2020-08-09 第9篇

这是我在CSDN的第9篇博文。写作是为了逼迫自己思考,培养思考,总结和回顾的习惯。学习篇数据结构和算法本周对数据结构与算法感到腻烦。没有进行任何训练,停滞了一周。从下周开始,跟随《算法训练营》按部就班进行训练。阅读《程序员修炼之道》、《UNIX编程艺术》后者写的非常好,对UNIX的编程哲学和历史有了较为深刻的认识。记录若干知识点hive 内置函数IntelliJ IDEA 快捷键运动篇本周立秋,下了几场雨,天气凉爽了一些,开始恢复例行跑步。本周跑量25km。思考篇

2020-08-10 00:12:27 123

原创 [Hive] Hive字符串函数

String Functions in HiveThe string functions in Hive are listed below:ASCII( string str )The ASCII function converts the first character of the string into its numeric ascii value.Example1: ASCII('abc') returns 97Example2: ASCII('A') returns 65CONCA

2020-08-10 00:03:20 173

原创 [Hive] Hive内建函数

Hive Built-in FunctionsFunctions in Hive are categorized as below.Numeric and Mathematical Functions: These functions mainly used to perform mathematical calculations.Date Functions: These functions are used to perform operations on date data types like

2020-08-10 00:02:28 76

原创 [Hive] Hive常用日期函数

Date Functions in HiveDate data types do not exist in Hive. In fact the dates are treated as strings in Hive. The date functions are listed below.UNIX_TIMESTAMP()This function returns the number of seconds from the Unix epoch (1970-01-01 00:00:00 UTC) u

2020-08-10 00:01:42 296

原创 [Hive] Hive数据类型

Data Types in HiveHive data types are categorized into two types. They are the primitive and complex data types.The primitive data types include Integers, Boolean, Floating point numbers and strings. The below table lists the size of each data type:Type

2020-08-10 00:01:07 110

原创 [Hive] Hive条件函数

Conditional Functions in HiveHive supports three types of conditional functions. These functions are listed below:IF( Test Condition, True Value, False Value )The IF condition evaluates the “Test Condition” and if the “Test Condition” is true, then it r

2020-08-10 00:00:15 188

原创 [Hive] Hive常用数学函数

Numeric and Mathematical Functions in HiveThe Numerical functions are listed below in alphabetical order. Use these functions in SQL queries.ABS( double n )The ABS function returns the absolute value of a number.Example: ABS(-100)ACOS( double n )The

2020-08-09 23:59:12 157

原创 2020-08-01 第8篇

这是我在CSDN的第8篇博文。写作是为了逼迫自己思考,培养思考,总结和回顾的习惯。学习篇数据结构和算法,在LeetCode上刷题2020/07/30 51 [1/5]2020/07/29 290 [1/5]2020/07/29 409 [1/5]2020/07/29 49 [1/5]2020/07/28 46 [1/5]2020/07/28 1365 [1/5]2020/07/26 35 [1/5]2020/07/26 34 [1/5]2020/07/26 33 [1/5]2020

2020-08-01 23:25:11 98

原创 [Office] How To Count Comma Separated Values In A Single Cell In Excel?

How To Count Comma Separated Values In A Single Cell In Excel?If cell content is separated by comma in a single cell, such as “A1, A2, A3, A4, A5”, and you want to count the total number of comma separated values in this cell, what can you do? In this cas

2020-07-31 23:50:20 109

原创 [Office] Excel计算单元格中由逗号分隔的值个数

背景现在有一组数据,特点为在单个单元格的数据通过 , 分隔,例如A1,A2,A3,A4,A5。现需要统计各行单元格中逗号分隔的值的个数。例如上述例子中,逗号分隔值个数应为5。方法键入如下公式:=LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1),",",""))+1其中A1表示数据所在位置,通过具体情况指定即可,图片中为B2。效果如下:解释以apple, orange,pair,peach为例1、TRIM(A1) 表示将字符串中所有的空格剥除,结果为apple,

2020-07-31 23:45:14 12579 3

原创 [Scala] Java vs Scala特性比较

Java vs Scala: What is the Difference?What is Java?Java is a multi-platform, object-oriented, network-centric, programming language developed by Sun Microsystems. Java is a programming language and a computing platform for application development. It was

2020-07-28 22:25:04 277

原创 [Scala] Scala与Java特性对比

Scala vs Java[Scala vs Java]([https://www.knowledgehut.com/blog/programming/scala-vs-java#::text=When%20Scala%20is%20compared%20with,enhanced%20code%20readability%20and%20conciseness.](https://www.knowledgehut.com/blog/programming/scala-vs-java#::text=Whe

2020-07-28 22:24:31 176

原创 [C++] string反转的5种方法

Different methods to reverse a string in C/C++Different methods to reverse a string in C/C++Given a string, write a C/C++ program to reverse it.1. Write own reverse function by swapping characters:One simple solution is to write our own reverse functio

2020-07-27 19:34:35 23641

原创 [Linux] Iterm2登录远程终端中文乱码显示

Iterm2 remote ssh connection server garbled problemThe server is Linux, connected to the iterm2 ssh of the Mac, the Chinese display garbled, can not input Chinese, but the local terminal can display and inputthe reason:The character set of the terminal

2020-07-27 19:25:07 475

原创 [英语] 自建专业词典

这里记录所有平日里遇到编程相关的专业英语词汇,自建词典。add notes添加注释no string under cursor光标下没有字符串interpolated string插值字符串transient短暂的wrapped array包装数组Executions per second每秒执行次数Archived已归档aport贡献,作用identifier标识Throwable抛出的// Note that on non-constrained syste.

2020-07-25 22:27:24 923

原创 [C++] 变量存储类型-英文版

Variable Storage ClassesAutomatic: autostorage is automatically allocated on function/block entry and automatically freed when the function/block is exitedmay not be used with global variables (which have storage space that exists for the life of the p

2020-07-25 17:50:36 294

原创 [C++] C++异常处理-英文版

Exception Handling in C++Exception Handling in C++One of the advantages of C++ over C is Exception Handling. Exceptions are run-time anomalies or abnormal conditions that a program encounters during its execution. There are two types of exceptions: a)Syn

2020-07-25 17:41:02 221

原创 [C++] Core Dump若干原因分析-英文版

Core Dump (Segmentation fault) in C/C++Core Dump/Segmentation fault is a specific kind of error caused by accessing memory that “does not belong to you”.When a piece of code tries to do read and write operation in a read only location in memory or freed

2020-07-25 17:35:45 245

原创 [C++] C String存储方式-英文版

Storage for Strings in CIn C, a string can be referred to either using a character pointer or as a character array.Strings as character arrayschar str[4] = "GfG"; /*One extra for string terminator*/``/* OR */char str[4] = {‘G’, ‘f’, ‘G’, '\0'}; /* '

2020-07-25 17:32:59 285

原创 [个人思考] 2020-07-24 关于技术人的个人成长

最近的一点思考。背景最近一直利用上下班和吃饭等的间隙,听覃超,陈皓和王争的专栏。让我有了很多不一样的思考。这感觉,就好像电池人从matrix中觉醒一般,醍醐灌顶。思考1、业务代码开发很毁人忙忙碌碌一整天,纠缠于业务上的各种琐事。和产品,各种业务人员对接,分析数据,解决bug,不停的切换。一大圈下来,整个人就像被掏空。最重要的是,这样的工作节奏挤压了我们用于自我提升的时间和空间,以及精力。业务开发最毁人的地方在于,它耗尽了我们原本可以快速成长的青春,然后再将青春不在的我们无情抛弃。从某种意义上.

2020-07-24 23:28:08 242

原创 2020-07-24 第7篇

这是我在CSDN的第7篇博文。写作是为了逼迫自己思考,培养思考,总结和回顾的习惯。学习篇学习算法和数据结构,在B站上学习编程视频,同时在LeetCode上刷题。2020/07/20 119 [1/5]2020/07/20 4 [1/5]2020/07/20 114 [1/5]2020/07/20 113 [1/5]刷题最大的误区,只做一遍。刷题二大误区,不看高票题解。思考篇意识到几个问题:要想高效的读懂源码,必须学习设计模式。《设计模式之美》学习提上日程业务代码开

2020-07-24 20:59:18 72

原创 [C++] 指针使用异常记录

背景最近在线上so开发过程中,遇到core dump问题,猜测可能是指针所指向的变量值为NULL导致,请教了周围大神,发现了指针误操作导致的内存异常。问题复现#include <iostream>#include <vector>#include <ctime>using namespace std;struct ItemInfo { int id; string name; float score;};static const char

2020-07-24 20:24:02 334

空空如也

空空如也

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

TA关注的人

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