-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
407 lines (374 loc) · 19.2 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
<!DOCTYPE html>
<html lang="zh" dir="auto">
<head>
<meta name="generator" content="Hugo 0.136.4"><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="index, follow">
<title>Yorksite</title>
<meta name="description" content="">
<meta name="author" content="Yorkson">
<link rel="canonical" href="https://yorks0n.github.io/">
<link crossorigin="anonymous" href="/assets/css/stylesheet.a64d292f66122a1e5591815ee8c06e138b9cb7dda180c36c77cfcf3f15fa04b5.css" integrity="sha256-pk0pL2YSKh5VkYFe6MBuE4uct92hgMNsd8/PPxX6BLU=" rel="preload stylesheet" as="style">
<link rel="icon" href="https://yorks0n.github.io/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="https://yorks0n.github.io/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="https://yorks0n.github.io/favicon-32x32.png">
<link rel="apple-touch-icon" href="https://yorks0n.github.io/apple-touch-icon.png">
<link rel="mask-icon" href="https://yorks0n.github.io/safari-pinned-tab.svg">
<meta name="theme-color" content="#2e2e33">
<meta name="msapplication-TileColor" content="#2e2e33">
<link rel="alternate" type="application/rss+xml" href="https://yorks0n.github.io/index.xml">
<link rel="alternate" type="application/json" href="https://yorks0n.github.io/index.json">
<link rel="alternate" hreflang="zh" href="https://yorks0n.github.io/">
<noscript>
<style>
#theme-toggle,
.top-link {
display: none;
}
</style>
<style>
@media (prefers-color-scheme: dark) {
:root {
--theme: rgb(29, 30, 32);
--entry: rgb(46, 46, 51);
--primary: rgb(218, 218, 219);
--secondary: rgb(155, 156, 157);
--tertiary: rgb(65, 66, 68);
--content: rgb(196, 196, 197);
--hljs-bg: rgb(46, 46, 51);
--code-bg: rgb(55, 56, 62);
--border: rgb(51, 51, 51);
}
.list {
background: var(--theme);
}
.list:not(.dark)::-webkit-scrollbar-track {
background: 0 0;
}
.list:not(.dark)::-webkit-scrollbar-thumb {
border-color: var(--theme);
}
}
</style>
</noscript>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-GvrOXuhMATgEsSwCs4smul74iXGOixntILdUW9XmUC6+HX0sLNAK3q71HotJqlAn" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-cpW21h6RZv/phavutF+AuVYrr+dA8xD9zs6FwLpaCct6O9ctzYFfFr4dgmgccOTx" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
{left: '\\(', right: '\\)', display: false},
{left: '\\[', right: '\\]', display: true}
],
throwOnError : false
});
});
</script>
<meta property="og:title" content="Yorksite" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://yorks0n.github.io/" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Yorksite"/>
<meta name="twitter:description" content=""/>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Yorksite",
"url": "https://yorks0n.github.io/",
"description": "",
"thumbnailUrl": "https://yorks0n.github.io/favicon.ico",
"sameAs": [
"https://github.com/Yorks0n", "index.xml"
]
}
</script>
</head>
<body class="list" id="top">
<script>
if (localStorage.getItem("pref-theme") === "dark") {
document.body.classList.add('dark');
} else if (localStorage.getItem("pref-theme") === "light") {
document.body.classList.remove('dark')
} else if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.body.classList.add('dark');
}
</script>
<header class="header">
<nav class="nav">
<div class="logo">
<a href="https://yorks0n.github.io/" accesskey="h" title="Yorksite (Alt + H)">Yorksite</a>
<div class="logo-switches">
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" 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>
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</button>
<ul class="lang-switch"><li>|</li>
</ul>
</div>
</div>
<ul id="menu">
<li>
<a href="https://yorks0n.github.io/archives/" title="📋 Archive">
<span>📋 Archive</span>
</a>
</li>
<li>
<a href="https://yorks0n.github.io/tags/" title="🏷 Tags">
<span>🏷 Tags</span>
</a>
</li>
<li>
<a href="https://yorks0n.github.io/search/" title="🔍 Search (Alt + /)" accesskey=/>
<span>🔍 Search</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="main">
<article class="first-entry home-info">
<header class="entry-header">
<h1>Yorksite</h1>
</header>
<div class="entry-content">
All those moments will be lost in time, like tears in rain
</div>
<footer class="entry-footer">
<div class="social-icons">
<a href="https://github.com/Yorks0n" target="_blank" rel="noopener noreferrer me" title="Github">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path
d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22">
</path>
</svg>
</a>
<a href="index.xml" target="_blank" rel="noopener noreferrer me" title="Rss">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M4 11a9 9 0 0 1 9 9" />
<path d="M4 4a16 16 0 0 1 16 16" />
<circle cx="5" cy="19" r="1" />
</svg>
</a>
</div>
</footer>
</article>
<article class="post-entry">
<header class="entry-header">
<h2>点名的风还是吹到了Blog
</h2>
</header>
<div class="entry-content">
<p>历史真是个圈。</p>
</div>
<footer class="entry-footer"><span title='2024-10-23 00:00:00 +0000 UTC'>十月 23, 2024</span> · Yorkson</footer>
<a class="entry-link" aria-label="post link to 点名的风还是吹到了Blog" href="https://yorks0n.github.io/posts/nine_questions/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2>从Raindrop迁移到了Anybox
</h2>
</header>
<div class="entry-content">
<p>苦raindrop久矣,终于找到趁手的书签管理工具了</p>
</div>
<footer class="entry-footer"><span title='2024-10-22 00:00:00 +0000 UTC'>十月 22, 2024</span> · Yorkson</footer>
<a class="entry-link" aria-label="post link to 从Raindrop迁移到了Anybox" href="https://yorks0n.github.io/posts/change_to_anybox/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2>数据可视化——基本图形元素及其应用
</h2>
</header>
<div class="entry-content">
<p>介绍可视化作图过程中使用的基本元素,简单分析不同数据类型与适合使用的展示方式。</p>
</div>
<footer class="entry-footer"><span title='2023-07-19 00:00:00 +0000 UTC'>七月 19, 2023</span> · Yorkson</footer>
<a class="entry-link" aria-label="post link to 数据可视化——基本图形元素及其应用" href="https://yorks0n.github.io/posts/basic_elements_data_vis/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2>单变量异常值检测方法
</h2>
</header>
<div class="entry-content">
<p>整理一下检测单变量异常值的方法。</p>
</div>
<footer class="entry-footer"><span title='2023-07-17 14:01:55 +0800 +0800'>七月 17, 2023</span> · Yorkson</footer>
<a class="entry-link" aria-label="post link to 单变量异常值检测方法" href="https://yorks0n.github.io/posts/outlier_detection/outlier_detection/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2>复现一张相关性图
</h2>
</header>
<div class="entry-content">
<p>前几天看到群里有人问如何画一张类似下图的、带拟合线与误差的相关性图,这里找点数据来演示一下怎么画。
找了点数字画了个例子,假设数据读进来是这样的两列:
绘图的部分我用了这些
leg <- theme(title=element_text(size=15), axis.text.x=element_text(size=14), axis.text.y=element_text(size=14), legend.text=element_text(size=14)) label_text <- paste0("r = ", round(cor(subdata$Na,subdata$K),2)) library(ggplot2) ggplot(subdata, aes(x = log(Na), y = log(K))) + geom_point(size = 2,color = "#31705a") + stat_smooth(method = "lm", color = "#31705a")+ theme_classic() + annotate("text", x=5.8, y=9, label= label_text) + leg 以上代码画出来的图如下: 其中各部分的解释如下
leg <- theme(title=element_text(size=15), axis.text.x=element_text(size=14), axis.text.y=element_text(size=14), legend.text=element_text(size=14)) # 用于指定字体大小等,可以先忽略 label_text <- paste0("r = ", round(cor(subdata$Na,subdata$K),2)) # 用于计算相关系数r的值,并处理成标在图上的「r = xxx」的文本 library(ggplot2) # 用ggplot2包画图 ggplot(subdata, aes(x = log(Na), y = log(K))) + #指定画图的数据subdata,在aes(x = ,y = )中指定横纵坐标轴 geom_point(size = 2,color = "#31705a") + #绘制散点部分,点的大小为2,颜色为浅绿色 stat_smooth(method = "lm", color = "#31705a")+ #绘制拟合线部分,method = "lm" 使用线性拟合,颜色同前 theme_classic() + # 使用ggplot的classic画图主题,是个只显示横纵坐标轴的主题 annotate("text", x=5.8, y=9, label= label_text) + # 添加上文字标注,类型是"text",位置在x=5.8,y=9 leg # 添加之前指定的字体大小部分,不关键 </p>
</div>
<footer class="entry-footer"><span title='2023-05-30 09:24:00 +0800 +0800'>五月 30, 2023</span> · Yorkson</footer>
<a class="entry-link" aria-label="post link to 复现一张相关性图" href="https://yorks0n.github.io/posts/corplot_case/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2>【读文献】单细胞分析最佳实践
</h2>
</header>
<div class="entry-content">
<p>Best practices for single-cell analysis across modalities</p>
</div>
<footer class="entry-footer"><span title='2023-04-07 00:00:00 +0000 UTC'>四月 7, 2023</span> · Yorkson</footer>
<a class="entry-link" aria-label="post link to 【读文献】单细胞分析最佳实践" href="https://yorks0n.github.io/posts/read-single-cell-best-practice/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2>Docker 打包 Shiny App
</h2>
</header>
<div class="entry-content">
<p>介绍了如何将 Shiny App 打包成 Docker 格式,方便在不同设备环境下托管</p>
</div>
<footer class="entry-footer"><span title='2023-03-28 09:30:49 +0000 UTC'>三月 28, 2023</span> · Yorkson</footer>
<a class="entry-link" aria-label="post link to Docker 打包 Shiny App" href="https://yorks0n.github.io/posts/docker-pack-shiny-app/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2>部署预印本追踪 TRxiv 到 Github Action
</h2>
</header>
<div class="entry-content">
<p>将JS写的抓取 Altmetric 热门预印本,与 bioRxiv API 结合后储存在 csv 文件中的过程,部署在 Github Action 中。官方文档写的顺序都有点混乱,网上找到的教程又经常都比较老了,因此自己记录一个。
新建Github仓库 新建一个public仓库,名叫TRxiv,并将远程仓库git clone到本地。
git clone [email protected]:Yorks0n/TRxiv.git cd TRxiv 创建一个动作元数据文件 要让仓库里能被以Action的形式直接调用,需要在根目录中创建一个action.yml配置文件,可以在这个文件中指定Action的输入和输出,调用的参数及运行环境
# action.yml name: 'trxiv' description: 'Tracking popular bioRxiv and medRxiv preprints' runs: using: 'node16' main: 'dist/index.js' 准备运行的代码 手动将写好的JS脚本拷贝进来,完整代码在此 Yorkson/TRxiv。
# 在这里初始化一下npm npm init -y 准备一个.gitignore文件,防止在推送的时候把不必要的文件放到储存库,可以用下面这个工具,或者自己写一下,比如这里就可能有node_modules
https://www.toptal.com/developers/gitignore
文件推送到远程仓库 然后push到远程仓库
git add . git commit -m "Initialize" git push 打包软件 因为前面把node_modules 从上传的文件列表中忽略了,但脚本index.js内有些依赖的包,所以最好把软件和依赖打包在一起,官方推荐用ncc
npm install @vercel/ncc 然后对index.js 进行打包
ncc build index.js -o dist 打包产物会存放于dist/index.js
...</p>
</div>
<footer class="entry-footer"><span title='2023-03-24 16:30:23 +0000 UTC'>三月 24, 2023</span> · Yorkson</footer>
<a class="entry-link" aria-label="post link to 部署预印本追踪 TRxiv 到 Github Action" href="https://yorks0n.github.io/posts/deploy-trxiv-github-action/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2>Hello, again
</h2>
</header>
<div class="entry-content">
<p>我为什么又开始写 Blog 了?</p>
</div>
<footer class="entry-footer"><span title='2023-03-24 15:29:49 +0000 UTC'>三月 24, 2023</span> · Yorkson</footer>
<a class="entry-link" aria-label="post link to Hello, again" href="https://yorks0n.github.io/posts/hello-again/"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2>1 dataset 100 visualizations 中有意思的可视化
</h2>
</header>
<div class="entry-content">
<p>分享最近看到的一组有意思的数据可视化</p>
</div>
<footer class="entry-footer"><span title='2023-03-09 20:40:01 +0000 UTC'>三月 9, 2023</span> · Yorkson</footer>
<a class="entry-link" aria-label="post link to 1 dataset 100 visualizations 中有意思的可视化" href="https://yorks0n.github.io/posts/interesting-1-dataset-100-visualizations/"></a>
</article>
<footer class="page-footer">
<nav class="pagination">
<a class="next" href="https://yorks0n.github.io/page/2/">下一页 »
</a>
</nav>
</footer>
</main>
<footer class="footer">
<span>© 2024 <a href="https://yorks0n.github.io/">Yorksite</a></span>
<span>
Powered by
<a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
<a href="https://github.com/adityatelange/hugo-PaperMod/" rel="noopener" target="_blank">PaperMod</a>
</span>
</footer>
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
<path d="M12 6H0l6-6z" />
</svg>
</a>
<script>
let menu = document.getElementById('menu')
if (menu) {
menu.scrollLeft = localStorage.getItem("menu-scroll-position");
menu.onscroll = function () {
localStorage.setItem("menu-scroll-position", menu.scrollLeft);
}
}
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener("click", function (e) {
e.preventDefault();
var id = this.getAttribute("href").substr(1);
if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({
behavior: "smooth"
});
} else {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView();
}
if (id === "top") {
history.replaceState(null, null, " ");
} else {
history.pushState(null, null, `#${id}`);
}
});
});
</script>
<script>
var mybutton = document.getElementById("top-link");
window.onscroll = function () {
if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
mybutton.style.visibility = "visible";
mybutton.style.opacity = "1";
} else {
mybutton.style.visibility = "hidden";
mybutton.style.opacity = "0";
}
};
</script>
<script>
document.getElementById("theme-toggle").addEventListener("click", () => {
if (document.body.className.includes("dark")) {
document.body.classList.remove('dark');
localStorage.setItem("pref-theme", 'light');
} else {
document.body.classList.add('dark');
localStorage.setItem("pref-theme", 'dark');
}
})
</script>
</body>
</html>