-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1499 lines (968 loc) · 163 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<!-- hexo-inject:begin --><!-- hexo-inject:end --><meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge" >
<link rel="dns-prefetch" href="https://jackyin.space">
<title>khan's study and life blog - 学习记录站</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="酿一壶孟婆汤,大梦人间一场">
<meta property="og:type" content="website">
<meta property="og:title" content="khan's study and life blog - 学习记录站">
<meta property="og:url" content="https://jackyin.space/index.html">
<meta property="og:site_name" content="khan's study and life blog - 学习记录站">
<meta property="og:description" content="酿一壶孟婆汤,大梦人间一场">
<meta property="og:locale" content="zh">
<meta property="article:author" content="Jack Yin | INFJ">
<meta name="twitter:card" content="summary">
<link rel="icon" href="/assets/liangx.jpg">
<link rel="stylesheet" type="text/css" href="/./main.0cf68a.css">
<style type="text/css">
#container.show {
background: linear-gradient(0deg,#f45050,#0e84f9);
}
</style>
<!--自定义看板娘-->
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
<script src="/live2d-widget/autoload.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css"/>
<!--
<link rel="stylesheet" href="/lib/highlight/styles/atom-one-dark.css">
-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/atom-one-dark.min.css">
<!-- <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js"></script> -->
<script src="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js"></script>
<!-- <link rel="stylesheet" href="https://oindk07nf.qnssl.com/atom-one-dark.css" media="screen" type="text/css"/> -->
<meta name="generator" content="Hexo 4.2.1"><link rel="alternate" href="/atom.xml" title="khan's study and life blog - 学习记录站" type="application/atom+xml"><!-- hexo-inject:begin --><!-- hexo-inject:end -->
</head>
<body>
<!-- hexo-inject:begin --><!-- hexo-inject:end --><div id="container" q-class="show:isCtnShow">
<canvas id="anm-canvas" class="anm-canvas"></canvas>
<div class="left-col" q-class="show:isShow">
<div class="overlay" style="background: #0e84f9"></div>
<div class="intrude-less">
<header id="header" class="inner">
<a href="/" class="profilepic">
<img src="/assets/liang.jpg" class="js-avatar">
</a>
<hgroup>
<h1 class="header-author" style="margin-bottom: 0%;"><a href="/">Jack Yin | INFJ</a></h1>
</hgroup>
<nav class="header-menu">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/archives">所有文章</a></li>
<li><a href="/tags/youth">一蓑烟雨任平生</a></li>
</ul>
</nav>
<nav class="header-smart-menu" style="margin-bottom: 1px;">
<a q-on="click: openSlider(e, 'innerArchive')" href="javascript:void(0)">标签检索</a>
<a q-on="click: openSlider(e, 'friends')" href="javascript:void(0)">友情链接</a>
<a q-on="click: openSlider(e, 'archives')" href="javascript:void(0)">归档</a>
<a q-on="click: openSlider(e, 'aboutme')" href="javascript:void(0)">关于</a>
</nav>
<nav class="header-nav">
<div class="social">
<a class="github" target="_blank" href="https://github.com/khan-yin" title="github"><i class="icon-github"></i></a>
<a class="zhihu" target="_blank" href="https://www.zhihu.com/people/khan-55-55" title="zhihu"><i class="icon-zhihu"></i></a>
<a class="bilibili" target="_blank" href="https://space.bilibili.com/351001593" title="bilibili"><i class="icon-bilibili"></i></a>
<a class="twitter" target="_blank" href="https://x.com/jack_kehan" title="twitter"><i class="icon-twitter"></i></a>
<a class="mail" target="_blank" href="mailto:[email protected]" title="mail"><i class="icon-mail"></i></a>
</div>
<!-- 网易云音乐插件 -->
<div style=" position: absolute;bottom:100px left:auto; width:85%">
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=230 height=86 src="https://music.163.com/outchain/player?type=2&id=446935665&auto=0&height=66"></iframe>
</div>
</nav>
</header>
</div>
</div>
<div class="mid-col" q-class="show:isShow,hide:isShow|isFalse">
<nav id="mobile-nav">
<div class="overlay js-overlay" style="background: #0e84f9"></div>
<div class="btnctn js-mobile-btnctn">
<div class="slider-trigger list" q-on="click: openSlider(e)"><i class="icon icon-sort"></i></div>
</div>
<div class="intrude-less">
<header id="header" class="inner">
<div class="profilepic">
<img src="/assets/liang.jpg" class="js-avatar">
</div>
<hgroup>
<h1 class="header-author js-header-author">Jack Yin | INFJ</h1>
</hgroup>
<nav class="header-nav">
<div class="social">
<a class="github" target="_blank" href="https://github.com/khan-yin" title="github"><i class="icon-github"></i></a>
<a class="zhihu" target="_blank" href="https://www.zhihu.com/people/khan-55-55" title="zhihu"><i class="icon-zhihu"></i></a>
<a class="bilibili" target="_blank" href="https://space.bilibili.com/351001593" title="bilibili"><i class="icon-bilibili"></i></a>
<a class="twitter" target="_blank" href="https://x.com/jack_kehan" title="twitter"><i class="icon-twitter"></i></a>
<a class="mail" target="_blank" href="mailto:[email protected]" title="mail"><i class="icon-mail"></i></a>
</div>
</nav>
<nav class="header-menu js-header-menu">
<ul style="width: 70%">
<li style="width: 33.333333333333336%"><a href="/">Home</a></li>
<li style="width: 33.333333333333336%"><a href="/archives">所有文章</a></li>
<li style="width: 33.333333333333336%"><a href="/tags/youth">一蓑烟雨任平生</a></li>
</ul>
</nav>
</header>
</div>
<div class="mobile-mask" style="display:none" q-show="isShow"></div>
</nav>
<div id="wrapper" class="body-wrap">
<div class="menu-l">
<div class="canvas-wrap">
<canvas data-colors="#eaeaea" data-sectionHeight="100" data-contentId="js-content" id="myCanvas1" class="anm-canvas"></canvas>
</div>
<div id="js-content" class="content-ll">
<article id="post-ubuntu22-04-日常化" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2024/10/09/ubuntu22-04-%E6%97%A5%E5%B8%B8%E5%8C%96/">ubuntu22.04 日常化</a>
</h1>
<a href="/2024/10/09/ubuntu22-04-%E6%97%A5%E5%B8%B8%E5%8C%96/" class="archive-article-date">
<time datetime="2024-10-09T10:17:37.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2024-10-09</time>
</a>
</header>
<div class="article-entry" itemprop="articleBody">
<p>最近有在折腾一些Ubuntu日常化的东西,给电脑重新装了双系统,相比前几年,ubuntu22.04之后系统确实变得非常好用了,软件生态支持也变多了,为了更加日常化的使用折腾了一些相关软件的安装,这边做一个简单的记录。</p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color1">linux</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2024/10/09/ubuntu22-04-%E6%97%A5%E5%B8%B8%E5%8C%96/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-Dynamicgo-支持-Protobuf-动态反射" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2023/12/27/Dynamicgo-%E6%94%AF%E6%8C%81-Protobuf-%E5%8A%A8%E6%80%81%E5%8F%8D%E5%B0%84/">Dynamicgo 支持 Protobuf 动态反射</a>
</h1>
<a href="/2023/12/27/Dynamicgo-%E6%94%AF%E6%8C%81-Protobuf-%E5%8A%A8%E6%80%81%E5%8F%8D%E5%B0%84/" class="archive-article-date">
<time datetime="2023-12-27T08:57:00.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2023-12-27</time>
</a>
</header>
<div class="article-entry" itemprop="articleBody">
<h2 id="背景"><a href="#背景" class="headerlink" title="背景"></a>背景</h2><p>Dynamicgo 是字节跳动自研的高性能 Golang RPC 编解码基础库,能在动态处理 RPC 数据(不依赖代码生成)的同时保证高性能,主要用于实现高性能 RPC 动态代理场景(见 <a href="https://mp.weixin.qq.com/s/KPfD5qp70uup6_ZI9UdYww" target="_blank" rel="noopener">dynamicgo 介绍</a>)。<br>Protobuf 是一种跨平台、可扩展的序列化数据传输协议,该协议序列化压缩特性使其具有优秀的传输速率,在常规静态 RPC 微服务场景中已经得到了广泛的应用。但是对于上述特殊的动态代理场景,我们调研发现目前业界主流的 Protobuf 协议基础库并不能满足我们的需求:</p>
<ul>
<li><a href="https://github.com/protocolbuffers/protobuf-go" target="_blank" rel="noopener">google.golang.org/protobuf</a>:Protobuf 官方源码支持协议转换和字段动态反射。实现过程依赖于反射完整的中间结构体 Message 对象来进行管理,使用过程中带来了很多不必要字段的数据性能开销,并且在处理多层嵌套数据时操作较为复杂,不支持内存字符串 io 流 IDL 解析。</li>
<li><a href="https://github.com/jhump/protoreflect" target="_blank" rel="noopener">github.com/jhump/protoreflect</a>:Protobuf 动态反射第三方库可支持文件和内存字符串 io 流 IDL 解析,适合频繁泛化调用,协议转换过程与官方源码一致,均未实现 inplace 转换,且内部实现存在Go版本兼容性问题。</li>
<li><a href="https://github.com/cloudwego/fastpb" target="_blank" rel="noopener">github.com/cloudwego/fastpb</a>:Protobuf 快速序列化第三方库,通过静态代码方式读写消息结构体,不支持协议转换和动态 IDL 解析。<br>因此如何设计自研一个功能完备、高性能、可扩展的 Protobuf 协议动态代理基础库是十分有必要的。<br><a href="https://github.com/khan-yin" target="_blank" rel="noopener">@khan-yin</a>和<a href="https://github.com/iStitches" target="_blank" rel="noopener">@iStitches</a>两位同学经过对 Protobuf 协议源码机制的深入学习,设计了高性能 Protobuf 协议动态泛化调用链路,能满足绝大多数 Protobuf 动态代理场景,并且性能优于官方实现,目前 PR<a href="https://github.com/cloudwego/dynamicgo/pull/37" target="_blank" rel="noopener">#37</a> 已经合入代码仓库。</li></ul>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color3">Go</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2023/12/27/Dynamicgo-%E6%94%AF%E6%8C%81-Protobuf-%E5%8A%A8%E6%80%81%E5%8F%8D%E5%B0%84/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-既往不恋,纵情向前,江湖再见——22岁那年,在北京的日子" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2022/03/31/%E6%97%A2%E5%BE%80%E4%B8%8D%E6%81%8B%EF%BC%8C%E7%BA%B5%E6%83%85%E5%90%91%E5%89%8D%EF%BC%8C%E6%B1%9F%E6%B9%96%E5%86%8D%E8%A7%81%E2%80%94%E2%80%9422%E5%B2%81%E9%82%A3%E5%B9%B4%EF%BC%8C%E5%9C%A8%E5%8C%97%E4%BA%AC%E7%9A%84%E6%97%A5%E5%AD%90/">既往不恋,纵情向前,江湖再见——22岁那年,在北京的日子</a>
</h1>
<a href="/2022/03/31/%E6%97%A2%E5%BE%80%E4%B8%8D%E6%81%8B%EF%BC%8C%E7%BA%B5%E6%83%85%E5%90%91%E5%89%8D%EF%BC%8C%E6%B1%9F%E6%B9%96%E5%86%8D%E8%A7%81%E2%80%94%E2%80%9422%E5%B2%81%E9%82%A3%E5%B9%B4%EF%BC%8C%E5%9C%A8%E5%8C%97%E4%BA%AC%E7%9A%84%E6%97%A5%E5%AD%90/" class="archive-article-date">
<time datetime="2022-03-30T16:41:32.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2022-03-31</time>
</a>
</header>
<div class="article-entry" itemprop="articleBody">
<h2 id="既往不恋,纵情向前,江湖再见——22岁那年,在北京的日子"><a href="#既往不恋,纵情向前,江湖再见——22岁那年,在北京的日子" class="headerlink" title="既往不恋,纵情向前,江湖再见——22岁那年,在北京的日子"></a>既往不恋,纵情向前,江湖再见——22岁那年,在北京的日子</h2><p>2022年3月31日0:52,睡不着,日常拖延症+强迫症导致清东西到现在,等会还想清扫一下弄脏的地板。</p>
<p><strong>莲竹花园甲2号楼一门101,从今天起,这里将不再是我的家</strong>,本来是昨天的机票,天气不似预期,不打算买高铁,还想再飞上一次云霄,所以倔强的又改签了机票,不过正好也让我多看一眼这里吧,最近东航事件其实让我也有一点小慌,希望能平安到达吧。</p>
<p>不出所料,我对这个城市并没有什么留恋,每天晚上我都会思考很多,有天夜里我的脑海里突然冒出来了那句:<strong>劝君更进一杯酒,西出阳关无故人。</strong> 这一刻我才真正明白什么是独在异乡为异客的感觉,什么才是我心里最想要的。</p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color1">youth</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2022/03/31/%E6%97%A2%E5%BE%80%E4%B8%8D%E6%81%8B%EF%BC%8C%E7%BA%B5%E6%83%85%E5%90%91%E5%89%8D%EF%BC%8C%E6%B1%9F%E6%B9%96%E5%86%8D%E8%A7%81%E2%80%94%E2%80%9422%E5%B2%81%E9%82%A3%E5%B9%B4%EF%BC%8C%E5%9C%A8%E5%8C%97%E4%BA%AC%E7%9A%84%E6%97%A5%E5%AD%90/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-菜鸡的算法岗日常实习面经总结" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2022/01/08/%E8%8F%9C%E9%B8%A1%E7%9A%84%E7%AE%97%E6%B3%95%E5%B2%97%E6%97%A5%E5%B8%B8%E5%AE%9E%E4%B9%A0%E9%9D%A2%E7%BB%8F%E6%80%BB%E7%BB%93/">菜鸡的算法岗日常实习面经总结</a>
</h1>
<a href="/2022/01/08/%E8%8F%9C%E9%B8%A1%E7%9A%84%E7%AE%97%E6%B3%95%E5%B2%97%E6%97%A5%E5%B8%B8%E5%AE%9E%E4%B9%A0%E9%9D%A2%E7%BB%8F%E6%80%BB%E7%BB%93/" class="archive-article-date">
<time datetime="2022-01-08T12:06:00.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2022-01-08</time>
</a>
</header>
<div class="article-entry" itemprop="articleBody">
<p><img src="/2022/01/08/%E8%8F%9C%E9%B8%A1%E7%9A%84%E7%AE%97%E6%B3%95%E5%B2%97%E6%97%A5%E5%B8%B8%E5%AE%9E%E4%B9%A0%E9%9D%A2%E7%BB%8F%E6%80%BB%E7%BB%93/1.jpg" alt="66CC884772E6FB9A1E2BA12BC9E7C9C4.jpg"></p>
<h2 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h2><blockquote>
<p>第一次在掘金写面经,其实今年过得不尽人意,好在能找找实习调整一下心态吧,终于有钱换手机了!<strong>要说有什么新年愿望,那就希望2022一切好运吧。</strong> 虽然是实习面经但是其实也没怎么准备,随缘,放弃了bat的部门,估计对学历和论文有门槛(尝试性投了深圳字节直接挂简历,<strong>我永远喜欢bytedance</strong>😭),10月投b站简历挂,旷视面试没过以后就没投了,后面去学车了,结果科目二没过,有点闲看到有朋友也在投,就不抱希望还是投了3家,比较幸运最后拿到了美团和商汤的实习offer,感谢面试官们手下留情🤣。</p>
</blockquote>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color1">youth</a>
</li>
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color1">计算机视觉</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2022/01/08/%E8%8F%9C%E9%B8%A1%E7%9A%84%E7%AE%97%E6%B3%95%E5%B2%97%E6%97%A5%E5%B8%B8%E5%AE%9E%E4%B9%A0%E9%9D%A2%E7%BB%8F%E6%80%BB%E7%BB%93/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-回首向来萧瑟处,归去,也无风雨也无晴|2021年终总结" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2022/01/08/%E5%9B%9E%E9%A6%96%E5%90%91%E6%9D%A5%E8%90%A7%E7%91%9F%E5%A4%84%EF%BC%8C%E5%BD%92%E5%8E%BB%EF%BC%8C%E4%B9%9F%E6%97%A0%E9%A3%8E%E9%9B%A8%E4%B9%9F%E6%97%A0%E6%99%B4%EF%BD%9C2021%E5%B9%B4%E7%BB%88%E6%80%BB%E7%BB%93/">回首向来萧瑟处,归去,也无风雨也无晴|2021年终总结</a>
</h1>
<a href="/2022/01/08/%E5%9B%9E%E9%A6%96%E5%90%91%E6%9D%A5%E8%90%A7%E7%91%9F%E5%A4%84%EF%BC%8C%E5%BD%92%E5%8E%BB%EF%BC%8C%E4%B9%9F%E6%97%A0%E9%A3%8E%E9%9B%A8%E4%B9%9F%E6%97%A0%E6%99%B4%EF%BD%9C2021%E5%B9%B4%E7%BB%88%E6%80%BB%E7%BB%93/" class="archive-article-date">
<time datetime="2022-01-08T12:04:00.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2022-01-08</time>
</a>
</header>
<div class="article-entry" itemprop="articleBody">
<p><img src="/2022/01/08/%E5%9B%9E%E9%A6%96%E5%90%91%E6%9D%A5%E8%90%A7%E7%91%9F%E5%A4%84%EF%BC%8C%E5%BD%92%E5%8E%BB%EF%BC%8C%E4%B9%9F%E6%97%A0%E9%A3%8E%E9%9B%A8%E4%B9%9F%E6%97%A0%E6%99%B4%EF%BD%9C2021%E5%B9%B4%E7%BB%88%E6%80%BB%E7%BB%93/1.jpg" alt="66CC884772E6FB9A1E2BA12BC9E7C9C4.jpg"></p>
<h2 id="⏱2021-2022"><a href="#⏱2021-2022" class="headerlink" title="⏱2021-2022"></a>⏱2021-2022</h2><blockquote>
<p>说来惭愧,没想到在掘金这样神圣的技术社区,我的第一篇文章竟然是与技术无关的年终总结。(主要是想白嫖到周边棒球帽🧢,本来是打算发布已经写好的<a href="https://juejin.cn/post/7050660953846710302" target="_blank" rel="noopener">算法岗实习面经</a>,有兴趣的朋友可以继续看看)</p>
</blockquote>
<p>时间总是过的很快,我也是偶然间打开掘金看到的这个活动才意识到今年已经快要过去了,想了很久2021年对我而言到底意味着什么,好像过得很混乱,<strong>想的太多,做的太少,以前总是能在不确定性中规划好一些时间,但今年很多事情都是被时间推着走入不确定的维度。</strong></p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color1">youth</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2022/01/08/%E5%9B%9E%E9%A6%96%E5%90%91%E6%9D%A5%E8%90%A7%E7%91%9F%E5%A4%84%EF%BC%8C%E5%BD%92%E5%8E%BB%EF%BC%8C%E4%B9%9F%E6%97%A0%E9%A3%8E%E9%9B%A8%E4%B9%9F%E6%97%A0%E6%99%B4%EF%BD%9C2021%E5%B9%B4%E7%BB%88%E6%80%BB%E7%BB%93/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-PAT笔记" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2021/10/16/PAT%E7%AC%94%E8%AE%B0/">PAT笔记</a>
</h1>
<a href="/2021/10/16/PAT%E7%AC%94%E8%AE%B0/" class="archive-article-date">
<time datetime="2021-10-16T06:19:00.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2021-10-16</time>
</a>
</header>
<div class="article-entry" itemprop="articleBody">
<h1 id="PAT笔记"><a href="#PAT笔记" class="headerlink" title="PAT笔记"></a>PAT笔记</h1><p>这里记录了一下常用的保研机试,剑指offer和PAT题目分类解析,主要用来快速回顾和复习相关模板,以及数据结构相关的知识点。</p>
<h2 id="字符串"><a href="#字符串" class="headerlink" title="字符串"></a>字符串</h2><ul>
<li>在c++中处理字符串类型的题目时,我们一般使用<code>string</code>,有时候我们也使用<code>char[]</code>方式进行操作。</li>
<li><code>HH:MM:SS</code>可以直接通过字符串字典序排序</li>
<li>输入一个包含空格的字符串需要使用<code>getline(cin,s1)</code><h2 id="STL"><a href="#STL" class="headerlink" title="STL"></a>STL</h2></li>
<li><code>vector<int></code>本省具备有字典序比较的方法,重载了<code>< == ></code>的运算符号</li>
<li><code>vector<int>::iterator iter=find(vec.begin(),vec.end(),target); if(iter==vec.end()) cout << "Not found" << endl;</code></li>
</ul>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color5">数据结构</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2021/10/16/PAT%E7%AC%94%E8%AE%B0/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-集成学习专题——Xgboost-LightGBM" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2021/06/18/%E9%9B%86%E6%88%90%E5%AD%A6%E4%B9%A0%E4%B8%93%E9%A2%98%E2%80%94%E2%80%94Xgboost-LightGBM/">集成学习专题——Xgboost&LightGBM</a>
</h1>
<a href="/2021/06/18/%E9%9B%86%E6%88%90%E5%AD%A6%E4%B9%A0%E4%B8%93%E9%A2%98%E2%80%94%E2%80%94Xgboost-LightGBM/" class="archive-article-date">
<time datetime="2021-06-17T16:11:00.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2021-06-18</time>
</a>
</header>
<div class="article-entry" itemprop="articleBody">
<h1 id="XGBoost算法"><a href="#XGBoost算法" class="headerlink" title="XGBoost算法"></a>XGBoost算法</h1><p>XGBoost是陈天奇等人开发的一个开源机器学习项目,高效地实现了GBDT算法并进行了算法和工程上的许多改进,被广泛应用在Kaggle竞赛及其他许多机器学习竞赛中并取得了不错的成绩。<strong>XGBoost本质上还是一个GBDT,但是力争把速度和效率发挥到极致,所以叫X (Extreme) GBoosted,</strong> 包括前面说过,两者都是boosting方法。XGBoost是一个优化的分布式梯度增强库,旨在实现高效,灵活和便携。 它在Gradient Boosting框架下实现机器学习算法。 XGBoost提供了<strong>并行树提升</strong>(也称为GBDT,GBM),可以快速准确地解决许多数据科学问题。 相同的代码在主要的分布式环境(Hadoop,SGE,MPI)上运行,并且可以解决超过数十亿个样例的问题。XGBoost利用了核外计算并且能够使数据科学家在一个主机上处理数亿的样本数据。最终,将这些技术进行结合来做一个端到端的系统以最少的集群系统来扩展到更大的数据集上。Xgboost<strong>以CART决策树为子模型</strong>,通过Gradient Tree Boosting实现多棵CART树的集成学习,得到最终模型。下面我们来看看XGBoost的最终模型构建:</p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color5">datawhale</a>
</li>
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color5">机器学习</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2021/06/18/%E9%9B%86%E6%88%90%E5%AD%A6%E4%B9%A0%E4%B8%93%E9%A2%98%E2%80%94%E2%80%94Xgboost-LightGBM/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-集成学习专题——GBDT" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2021/06/17/%E9%9B%86%E6%88%90%E5%AD%A6%E4%B9%A0%E4%B8%93%E9%A2%98%E2%80%94%E2%80%94GBDT/">集成学习专题——GBDT</a>
</h1>
<a href="/2021/06/17/%E9%9B%86%E6%88%90%E5%AD%A6%E4%B9%A0%E4%B8%93%E9%A2%98%E2%80%94%E2%80%94GBDT/" class="archive-article-date">
<time datetime="2021-06-17T15:59:00.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2021-06-17</time>
</a>
</header>
<div class="article-entry" itemprop="articleBody">
<h2 id="梯度提升决策树-GBDT"><a href="#梯度提升决策树-GBDT" class="headerlink" title="梯度提升决策树(GBDT)"></a>梯度提升决策树(GBDT)</h2><p>(1) 基于残差学习的提升树算法:<br>在前面的学习过程中,我们一直讨论的都是分类树,比如Adaboost算法,并没有涉及回归的例子。在上一小节我们提到了一个加法模型+前向分步算法的框架,那能否使用这个框架解决回归的例子呢?答案是肯定的。接下来我们来探讨下如何使用加法模型+前向分步算法的框架实现回归问题。<br>在使用加法模型+前向分步算法的框架解决问题之前,我们需要首先确定框架内使用的基函数是什么,在这里我们使用决策树分类器。前面第二章我们已经学过了回归树的基本原理,<strong>树算法最重要是寻找最佳的划分点,分类树用纯度来判断最佳划分点使用信息增益(ID3算法),信息增益比(C4.5算法),基尼系数(CART分类树)。但是在回归树中的样本标签是连续数值,可划分点包含了所有特征的所有可取的值。所以再使用熵之类的指标不再合适,取而代之的是平方误差,它能很好的评判拟合程度。</strong> 基函数确定了以后,我们需要确定每次提升的标准是什么。回想Adaboost算法,在Adaboost算法内使用了分类错误率修正样本权重以及计算每个基本分类器的权重,那回归问题没有分类错误率可言,也就没办法在这里的回归问题使用了,因此我们需要另辟蹊径。模仿分类错误率,我们用每个样本的残差表示每次使用基函数预测时没有解决的那部分问题。因此,我们可以得出如下算法: </p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color5">datawhale</a>
</li>
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color5">机器学习</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2021/06/17/%E9%9B%86%E6%88%90%E5%AD%A6%E4%B9%A0%E4%B8%93%E9%A2%98%E2%80%94%E2%80%94GBDT/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-集成学习专题——adaboost原理和sklearn实现" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2021/06/17/%E9%9B%86%E6%88%90%E5%AD%A6%E4%B9%A0%E4%B8%93%E9%A2%98%E2%80%94%E2%80%94adaboost%E5%8E%9F%E7%90%86%E5%92%8Csklearn%E5%AE%9E%E7%8E%B0/">集成学习专题——adaboost原理和sklearn实现</a>
</h1>
<a href="/2021/06/17/%E9%9B%86%E6%88%90%E5%AD%A6%E4%B9%A0%E4%B8%93%E9%A2%98%E2%80%94%E2%80%94adaboost%E5%8E%9F%E7%90%86%E5%92%8Csklearn%E5%AE%9E%E7%8E%B0/" class="archive-article-date">
<time datetime="2021-06-17T15:15:00.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2021-06-17</time>
</a>
</header>
<div class="article-entry" itemprop="articleBody">
<h1 id="1-导论"><a href="#1-导论" class="headerlink" title="1. 导论"></a>1. 导论</h1><p>在前面的学习中,我们探讨了一系列简单而实用的回归和分类模型,同时也探讨了如何使用集成学习家族中的Bagging思想去优化最终的模型。Bagging思想的实质是:通过Bootstrap 的方式对全样本数据集进行抽样得到抽样子集,对不同的子集使用同一种基本模型进行拟合,然后投票得出最终的预测。我们也从前面的探讨知道:Bagging主要通过降低方差的方式减少预测误差。<strong>那么,本章介绍的Boosting是与Bagging截然不同的思想,Boosting方法是使用同一组数据集进行反复学习,得到一系列简单模型,然后组合这些模型构成一个预测性能十分强大的机器学习模型。</strong> 显然,Boosting思想提高最终的预测效果是通过不断减少偏差的形式,与Bagging有着本质的不同。在Boosting这一大类方法中,笔者主要介绍两类常用的Boosting方式:Adaptive Boosting 和 Gradient Boosting 以及它们的变体Xgboost、LightGBM以及Catboost。</p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color5">datawhale</a>
</li>
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color5">机器学习</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2021/06/17/%E9%9B%86%E6%88%90%E5%AD%A6%E4%B9%A0%E4%B8%93%E9%A2%98%E2%80%94%E2%80%94adaboost%E5%8E%9F%E7%90%86%E5%92%8Csklearn%E5%AE%9E%E7%8E%B0/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<article id="post-集成学习专题——voting-bagging" class="article article-type-post article-index" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2021/06/16/%E9%9B%86%E6%88%90%E5%AD%A6%E4%B9%A0%E4%B8%93%E9%A2%98%E2%80%94%E2%80%94voting-bagging/">集成学习专题——voting&bagging</a>
</h1>
<a href="/2021/06/16/%E9%9B%86%E6%88%90%E5%AD%A6%E4%B9%A0%E4%B8%93%E9%A2%98%E2%80%94%E2%80%94voting-bagging/" class="archive-article-date">
<time datetime="2021-06-16T15:55:00.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2021-06-16</time>
</a>
</header>
<div class="article-entry" itemprop="articleBody">
<h2 id="投票法的思路"><a href="#投票法的思路" class="headerlink" title="投票法的思路"></a>投票法的思路</h2><p><strong>投票法是集成学习中常用的技巧,可以帮助我们提高模型的泛化能力,减少模型的错误率。</strong>举个例子,在航空航天领域,每个零件发出的电信号都对航空器的成功发射起到重要作用。如果我们有一个二进制形式的信号:</p>
<p>11101100100111001011011011011</p>
<p>在传输过程中第二位发生了翻转</p>
<p>10101100100111001011011011011</p>
<p>这导致的结果可能是致命的。一个常用的纠错方法是重复多次发送数据,并以少数服从多数的方法确定正确的传输数据。一般情况下,错误总是发生在局部,因此融合多个数据是降低误差的一个好方法,这就是投票法的基本思路。</p>
<p>对于回归模型来说,投票法最终的预测结果是多个其他回归模型预测结果的平均值。</p>
<p>对于分类模型,<strong>硬投票法</strong>的预测结果是多个模型预测结果中出现次数最多的类别,<strong>软投票</strong>对各类预测结果的概率进行求和,最终选取概率之和最大的类标签。</p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<i class="icon-price-tags icon"></i>
<ul class="article-tag-list">
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color5">datawhale</a>
</li>
<li class="article-tag-list-item">
<a href="javascript:void(0)" class="js-tag article-tag-list-link color5">机器学习</a>
</li>
</ul>
</div>
<p class="article-more-link">
<a class="article-more-a" href="/2021/06/16/%E9%9B%86%E6%88%90%E5%AD%A6%E4%B9%A0%E4%B8%93%E9%A2%98%E2%80%94%E2%80%94voting-bagging/">展开全文 >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<aside class="wrap-side-operation">
<div class="mod-side-operation">
<div class="jump-container" id="js-jump-container" style="display:none;">
<a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
<i class="icon-font icon-back"></i>
</a>
<div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
<i class="icon-font icon-plane jump-plane"></i>
</div>
</div>
</div>
</aside>
<nav id="page-nav">
<span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="page-number" href="/page/3/">3</a><span class="space">…</span><a class="page-number" href="/page/5/">5</a><a class="extend next" rel="next" href="/page/2/">下一页</a>
</nav>
</div>
</div>
</div>
<footer id="footer">
<div class="outer">
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
}
});
MathJax.Hub.Queue(function() {
var all = MathJax.Hub.getAllJax(), i;
for(i=0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';