-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
506 lines (298 loc) · 20.6 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- 渲染优化 -->
<meta name="renderer" content="webkit">
<meta name="force-rendering" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="HandheldFriendly" content="True" >
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!--icon-->
<link rel="shortcut icon" href="/images/favicon.ico">
<!-- meta -->
<title>Syize の blog</title>
<!-- OpenGraph -->
<meta property="og:type" content="website">
<meta property="og:title" content="Syize の blog">
<meta property="og:url" content="https://blog.syize.cn/index.html">
<meta property="og:site_name" content="Syize の blog">
<meta property="og:locale" content="en_US">
<meta property="article:author" content="Syize">
<meta name="twitter:card" content="summary_large_image">
<link rel="stylesheet" href="/css/style/main.css">
<link rel="stylesheet" href="/css/style/dark.css">
<script src="/js/darkmode.js"></script>
<!-- custom head -->
<meta name="generator" content="Hexo 7.3.0"></head>
<body>
<div id="app" tabindex="-1">
<header class="header">
<div class="header__left">
<a href="/" class="button">
<span class="logo__text">Syize の blog</span>
</a>
</div>
<div class="header__right">
<div class="navbar__menus">
<a href="/" class="navbar-menu button">home</a>
<a href="/tags/" class="navbar-menu button">tags</a>
<a href="/archives/" class="navbar-menu button">archives</a>
<a href="/categories/" class="navbar-menu button">categories</a>
<a href="/about/" class="navbar-menu button">about</a>
<a href="/friend/" class="navbar-menu button">links</a>
</div>
<a href="javaScript:void(0);" id="btn-toggle-dark">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>
</a>
<a class="dropdown-icon button" id="btn-dropdown" tabindex="0"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" width='24' height='24' fill="none" stroke="currentColor" stroke-width="0.7" stroke-linecap="round" stroke-linejoin="round"><path fill="currentColor" d="M3.314,4.8h13.372c0.41,0,0.743-0.333,0.743-0.743c0-0.41-0.333-0.743-0.743-0.743H3.314c-0.41,0-0.743,0.333-0.743,0.743C2.571,4.467,2.904,4.8,3.314,4.8z M16.686,15.2H3.314c-0.41,0-0.743,0.333-0.743,0.743s0.333,0.743,0.743,0.743h13.372c0.41,0,0.743-0.333,0.743-0.743S17.096,15.2,16.686,15.2z M16.686,9.257H3.314c-0.41,0-0.743,0.333-0.743,0.743s0.333,0.743,0.743,0.743h13.372c0.41,0,0.743-0.333,0.743-0.743S17.096,9.257,16.686,9.257z"></path></svg></a>
<div class="dropdown-menus" id="dropdown-menus">
<a href="/" class="dropdown-menu button">home</a>
<a href="/tags/" class="dropdown-menu button">tags</a>
<a href="/archives/" class="dropdown-menu button">archives</a>
<a href="/categories/" class="dropdown-menu button">categories</a>
<a href="/about/" class="dropdown-menu button">about</a>
<a href="/friend/" class="dropdown-menu button">links</a>
</div>
</div>
</header>
<div class="cover">
<div class="cover__logo">
<img no-lazy alt="author Image" class="cover__avatar" src="/images/avatar.png">
</div>
<div class="cover__intro">
<p>欲望大过了能力,由此产生了焦虑</p>
</div>
</div>
<main class="main">
<div class="post-list">
<div class='post-entry content-card'>
<div class="post-entry__header"></div>
<div class="post-entry__content">
<h2 class="post-entry__title">
使用GitHub的Action自动生成和部署Hexo博客
</h2>
<p>最近又有点犯懒了,甚至博客都有点懒得写,主要是感觉每次都要生成一次博客文件然后推送,真的很麻烦啊。我在笔记本上面配置好的环境,经常忘记同步到台式上,博客的源文件也经常忘记拉取更新,导致一些旧的博客莫名奇妙就消失了,还要我手动去提交记录里面找到文件恢复出来。于是索性研究了一下怎么用GitHub的Action自动生成和部署博客,一劳永逸。</p>
</div>
<div class="post-entry__meta">
<a href="/archives/2024/12/" class="post-meta__date button">2024-12-04</a>
<span class="separate-dot"></span><a href="/categories/Hexo/" class="button">Hexo</a>
</div>
<div class="post-entry__tags"><a href="/tags/Hexo/" class="post-tags__link button"># Hexo</a></div>
<a href="/2024/12/04/hexo-github-actions/" class="post-entry__link">使用GitHub的Action自动生成和部署Hexo博客</a>
</div>
<div class='post-entry content-card'>
<div class="post-entry__header"></div>
<div class="post-entry__content">
<h2 class="post-entry__title">
pycurl多进程下载数据
</h2>
<p>在我为组里写的海雾反演工具包中,有一个葵花卫星数据下载的函数。因为葵花卫星数据是通过FTP方式下载的,而Python的requests库又不支持FTP协议,所以只好借助了pycurl来下载数据。</p>
<p>最近葵花数据的下载异常的慢,而pycurl似乎没有多线程下载的功能(我在撰写这篇发现pycurl中有一个<code>CurlMulti</code>对象,似乎可以通过该对象实现在一个Python进程中同时下载多个数据片段),pycurl对多线程的支持也不好,无奈只能自己想办法实现多进程下载的功能了。</p>
</div>
<div class="post-entry__meta">
<a href="/archives/2024/11/" class="post-meta__date button">2024-11-05</a>
<span class="separate-dot"></span><a href="/categories/Python/" class="button">Python</a>
</div>
<div class="post-entry__tags"><a href="/tags/Python/" class="post-tags__link button"># Python</a><a href="/tags/pycurl/" class="post-tags__link button"># pycurl</a></div>
<a href="/2024/11/05/pycurl-multiple-process-download/" class="post-entry__link">pycurl多进程下载数据</a>
</div>
<div class='post-entry content-card'>
<div class="post-entry__header"></div>
<div class="post-entry__content">
<h2 class="post-entry__title">
使用meson构建打包Python包
</h2>
<p>最近在重构组里的代码上遇到一件稍微棘手的事情。导师的旧代码是使用Fortran编写的,其对一些Python无法方便读取的二进制数据做了非常精细的操作,导致将代码完全Python化的难度直线上升。折衷的方案是通过使用<code>numpy.f2py</code>工具,将Fortran代码转换成Python扩展,这样就引入了新的问题,如何将扩展的编译融合进Python包的打包和安装过程中。</p>
<p><a target="_blank" rel="noopener" href="https://mesonbuild.com/">meson</a>构建系统是我在几个月前无意中了解到的新工具,其包含了能够帮助编译和打包的Python模块,并且现有的一些项目都已完全将meson作为后端,例如<a target="_blank" rel="noopener" href="https://github.com/scipy/scipy/tree/main">scipy</a>,<a target="_blank" rel="noopener" href="https://github.com/numpy/numpy">numpy</a>。因此我决定将这作为一个练手的机会,使用meson来帮助构建这个Python包。</p>
</div>
<div class="post-entry__meta">
<a href="/archives/2024/10/" class="post-meta__date button">2024-10-03</a>
<span class="separate-dot"></span><a href="/categories/Python/" class="button">Python</a>
<span class="separate-dot"></span><a href="/categories/Python/meson/" class="button">meson</a>
</div>
<div class="post-entry__tags"><a href="/tags/Python/" class="post-tags__link button"># Python</a><a href="/tags/meson/" class="post-tags__link button"># meson</a></div>
<a href="/2024/10/03/build-python-package-with-meson/" class="post-entry__link">使用meson构建打包Python包</a>
</div>
<div class='post-entry content-card'>
<div class="post-entry__header"></div>
<div class="post-entry__content">
<h2 class="post-entry__title">
使用cfgrib将数据保存为GRIB文件
</h2>
<p>最近想要将导师的WRF工具包里的一些功能使用Python重写,因为想要使用优雅的方式实现,所以不可避免的涉及到了GRIB文件的读写。花了两天时间摸清楚了如何将数据写入GRIB文件,期间还遇到一些比较奇怪的问题。</p>
</div>
<div class="post-entry__meta">
<a href="/archives/2024/09/" class="post-meta__date button">2024-09-23</a>
<span class="separate-dot"></span><a href="/categories/Python/" class="button">Python</a>
</div>
<div class="post-entry__tags"><a href="/tags/Python/" class="post-tags__link button"># Python</a></div>
<a href="/2024/09/23/write-grib-with-cfgrib/" class="post-entry__link">使用cfgrib将数据保存为GRIB文件</a>
</div>
<div class='post-entry content-card'>
<div class="post-entry__header"></div>
<div class="post-entry__content">
<h2 class="post-entry__title">
在Ubuntu 22.04服务器上配置VNC服务
</h2>
<p>今天想登陆进组里的Ubuntu服务器查看一下网络是如何配置的,因为之前是直接在图形界面设置的,但是现在服务器在机房懒得进去,就干脆研究了一下怎么设置VNC服务端,好远程连进去。</p>
<p>网上搜索了一大堆教程,全都是抄来抄去教你怎么配置<code>xstartup</code>文件,明明ArchWiki上就有<a target="_blank" rel="noopener" href="https://wiki.archlinuxcn.org/wiki/TigerVNC#%E4%B8%BA%E8%99%9A%E6%8B%9F%EF%BC%88%E6%97%A0%E7%95%8C%E9%9D%A2%EF%BC%89%E4%BC%9A%E8%AF%9D%E8%BF%90%E8%A1%8C_vncserver">相关的教程</a>,简单设置一下就好了。</p>
</div>
<div class="post-entry__meta">
<a href="/archives/2024/05/" class="post-meta__date button">2024-05-13</a>
<span class="separate-dot"></span><a href="/categories/Linux/" class="button">Linux</a>
<span class="separate-dot"></span><a href="/categories/Linux/VNC/" class="button">VNC</a>
</div>
<div class="post-entry__tags"><a href="/tags/Linux/" class="post-tags__link button"># Linux</a><a href="/tags/VNC/" class="post-tags__link button"># VNC</a></div>
<a href="/2024/05/13/ubuntu-22-04-tigervnc-server/" class="post-entry__link">在Ubuntu 22.04服务器上配置VNC服务</a>
</div>
<div class='post-entry content-card'>
<div class="post-entry__header"></div>
<div class="post-entry__content">
<h2 class="post-entry__title">
配置dnsmasq使用DoH
</h2>
<p>最近学院的网络异常的差,DNS查询也异常的慢。索性升级一下台式dnsmasq的配置,使用DoH来解析DNS。这样DNS的解析请求就可以通过台式配置好的SSH隧道使用服务器的代理。</p>
</div>
<div class="post-entry__meta">
<a href="/archives/2024/05/" class="post-meta__date button">2024-05-11</a>
<span class="separate-dot"></span><a href="/categories/dnsmasq/" class="button">dnsmasq</a>
</div>
<div class="post-entry__tags"><a href="/tags/dnsmasq/" class="post-tags__link button"># dnsmasq</a></div>
<a href="/2024/05/11/dnsmasq-doh/" class="post-entry__link">配置dnsmasq使用DoH</a>
</div>
<div class='post-entry content-card'>
<div class="post-entry__header"></div>
<div class="post-entry__content">
<h2 class="post-entry__title">
撸一个禁止Windows自动更新的脚本
</h2>
<p>忽然翻到了之前自己写的一个禁止Windows自动更新的脚本,记录一下</p>
</div>
<div class="post-entry__meta">
<a href="/archives/2023/11/" class="post-meta__date button">2023-11-22</a>
<span class="separate-dot"></span><a href="/categories/Windows/" class="button">Windows</a>
</div>
<div class="post-entry__tags"><a href="/tags/Windows/" class="post-tags__link button"># Windows</a></div>
<a href="/2023/11/22/fk-windows-update/" class="post-entry__link">撸一个禁止Windows自动更新的脚本</a>
</div>
<div class='post-entry content-card'>
<div class="post-entry__header"></div>
<div class="post-entry__content">
<h2 class="post-entry__title">
电脑通过USB连接树莓派Zero(Bad USB)
</h2>
<p>最近正在不断的修改代码、训练模型,每次训练都至少需要40分钟左右的时间,实在是无聊。所以又拿出了我的树莓派Zero 2W,看看所谓的BadUSB怎么搞。</p>
<p>其实大概一两年前我就搞过,但是在我的Arch系统上完全复现不出网上的那些教程所谓的最后效果。试过了包括但不限于来自CSDN,StackOverflow,UbuntuAsk等各大论坛上的教程,各种配置都试过了,但是效果就是不好(至少在我的Arch系统上不好)。真是可恶啊,小小的一个事情竟然没有一个比较靠谱的实现教程。</p>
<p>经过参考著名的USB攻击平台项目 <a target="_blank" rel="noopener" href="https://github.com/RoganDawes/P4wnP1">P4wnP1</a> 的设置,我截取了其中的部分代码进行了设置,最终完成了<strong>电脑通过USB连接树莓派Zero</strong>这个目标。</p>
</div>
<div class="post-entry__meta">
<a href="/archives/2023/11/" class="post-meta__date button">2023-11-16</a>
<span class="separate-dot"></span><a href="/categories/Linux/" class="button">Linux</a>
</div>
<div class="post-entry__tags"><a href="/tags/Linux/" class="post-tags__link button"># Linux</a></div>
<a href="/2023/11/16/rpi-zero-bad-usb/" class="post-entry__link">电脑通过USB连接树莓派Zero(Bad USB)</a>
</div>
<div class='post-entry content-card'>
<div class="post-entry__header"></div>
<div class="post-entry__content">
<h2 class="post-entry__title">
Linux下STM32的开发环境配置和烧录指令
</h2>
<p>最近做海雾的预报比较无聊,总得找个东西打发时间,于是翻出了大概两年前嫖的别人的板子。当时他们的创业园办公室要被收回了,于是我就去捡垃圾,看看有什么好东西。然后就搞到了这块<code>STM32F103VET6</code>野火指南者板子,上面还有一块屏幕,挺香的。</p>
<p>翻了一下野火官方的教学视频,发现是用的Keil开发的,但是我的Arch没法运行Keil,所以又花了两天时间弄清楚如何在Arch上开发,编译,烧录STM32的程序。</p>
</div>
<div class="post-entry__meta">
<a href="/archives/2023/11/" class="post-meta__date button">2023-11-08</a>
<span class="separate-dot"></span><a href="/categories/STM32/" class="button">STM32</a>
<span class="separate-dot"></span><a href="/categories/STM32/Linux/" class="button">Linux</a>
</div>
<div class="post-entry__tags"><a href="/tags/Linux/" class="post-tags__link button"># Linux</a><a href="/tags/STM32/" class="post-tags__link button"># STM32</a></div>
<a href="/2023/11/08/linux-stm32-development/" class="post-entry__link">Linux下STM32的开发环境配置和烧录指令</a>
</div>
<div class='post-entry content-card'>
<div class="post-entry__header"></div>
<div class="post-entry__content">
<h2 class="post-entry__title">
PyQt中的国际化问题
</h2>
<p>最近自己搞的海雾识别可视化界面已经基本完善可用了,唯一的不足就是没有弄国际化。因为网上有关 PyQt 国际化的示例实在是太不全了,方法五花八门,甚至连 Stack Overflow 上都没有很好的解决方法。经过自己的不断搜索,以及阅读 PyQt 上的手册,终于搞明白了 PyQt5 和 PyQt6 两个版本 PyQt 国际化的方法。</p>
<img src="/2023/11/05/pyqt-translation/image-20231105205151967.png" class="" alt="image-20231105205151967">
</div>
<div class="post-entry__meta">
<a href="/archives/2023/11/" class="post-meta__date button">2023-11-05</a>
<span class="separate-dot"></span><a href="/categories/Python/" class="button">Python</a>
</div>
<div class="post-entry__tags"><a href="/tags/Python/" class="post-tags__link button"># Python</a><a href="/tags/PyQt/" class="post-tags__link button"># PyQt</a></div>
<a href="/2023/11/05/pyqt-translation/" class="post-entry__link">PyQt中的国际化问题</a>
</div>
</div>
<div class="nav">
<div class="nav__prev">
</div>
<div class="nav__next">
<a href="/page/2/" class="nav__link">
<div>
<div class="nav__label">
Next
</div>
<div class="nav__title">
Page 2
</div>
</div>
<div>
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M434.944 790.624l-45.248-45.248L623.04 512l-233.376-233.376 45.248-45.248L713.568 512z" fill="#808080"></path></svg>
</div>
</a>
</div>
</div>
</main>
<footer class="footer">
<p class="footer-copyright">
Copyright © 2021 - 2024 <a href="/">Syize の blog</a>
</p>
<p>Powered by <a href="https://hexo.io" target="_blank">Hexo</a> | Theme - <a href="https://github.com/ChrAlpha/hexo-theme-cards" target="_blank">Cards</a></p>
</footer>
</div>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VF6Y5KEM39"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-VF6Y5KEM39');
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/[email protected]/dist/jquery.fancybox.min.css">
<script src="https://cdn.jsdelivr.net/npm/@fancyapps/[email protected]/dist/jquery.fancybox.min.js"></script>
<script>
let lazyloadT = Boolean('false'),
auto_fancybox = Boolean('false')
if (auto_fancybox) {
$(".post__content").find('img').each(function () {
var element = document.createElement("a");
$(element).attr("data-fancybox", "gallery");
$(element).attr("href", $(this).attr("src"));
if (lazyloadT) {
$(element).attr("href", $(this).attr("data-srcset"));
}
$(this).wrap(element);
});
} else {
$(".post__content").find("fancybox").find('img').each(function () {
var element = document.createElement("a");
$(element).attr("data-fancybox", "gallery");
$(element).attr("href", $(this).attr("src"));
if (lazyloadT) {
$(element).attr("href", $(this).attr("data-srcset"));
}
$(this).wrap(element);
});
}
</script>
<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js'></script>
<script>
mermaid.initialize(JSON.stringify(''));
</script>
</body>
</html>