Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.html « hugo-tanka-theme-demo « blog - github.com/nanxstats/hugo-tanka.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0523187bb82b6857ff127912e33761912cbb59db (plain)
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
<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title> Tanka Theme Demo - Hugo Tanka Theme </title>
    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content="320">
    <meta name="referrer" content="no-referrer">
    <meta name="description" content="" />
    <meta property="og:site_name" content="Hugo Tanka Theme" />
    <meta property="og:locale" content="en_US" />
    <meta property="og:type" content="article" />
    <meta property="og:url" content="https://nanx.me/hugo-tanka/blog/hugo-tanka-theme-demo/" />
    <meta property="og:title" content="Tanka Theme Demo" />
    <meta property="og:image" content="https://nanx.me/hugo-tanka/images/example.jpg" />
    <meta property="og:description" content="" />

    <meta name="twitter:card" content="summary_large_image" />
    
    <meta name="twitter:title" content="Tanka Theme Demo" />
    <meta name="twitter:description" content="" />
    <meta name="twitter:image" content="https://nanx.me/hugo-tanka/images/example.jpg" />

    <link rel="canonical" href="https://nanx.me/hugo-tanka/blog/hugo-tanka-theme-demo/">

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha512-MoRNloxbStBcD8z3M/2BmnT+rg4IsMxPkXaGh2zD6LGNNFE80W3onsAhRcMAMrSoyWL9xD7Ert0men7vR8LUZg==" crossorigin="anonymous" />

    <link rel="stylesheet" href="https://nanx.me/hugo-tanka/css/custom.css" />

    
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.2.0/styles/github-gist.min.css" integrity="sha512-od7JLoOTxM8w/HSKGzP9Kexc20K9p/M2zxSWsd7H1e4Ctf+8SQFtCWEZnW5u6ul5ehSECa5QmOk9ju2nQMmlVA==" crossorigin="anonymous" />
    

    

    <link rel="shortcut icon"
        href="https://nanx.me/hugo-tanka/images/favicon.png">

    
    <link href="https://nanx.me/hugo-tanka/index.xml" rel="alternate" type="application/rss+xml" title="Hugo Tanka Theme" />
    
</head>

<body>
    
<div class="mt-xl header">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-auto">
                <a href="https://nanx.me/hugo-tanka/">
                    <h1 class="name">Hugo Tanka Theme</h1>
                </a>
            </div>
        </div>

        <div class="row justify-content-center">
            <ul class="nav nav-primary">
                
                <li class="nav-item">
                    <a class="nav-link" href="https://nanx.me/hugo-tanka/">
                        
                        Home
                    </a>
                </li>
                
                <li class="nav-item">
                    <a class="nav-link" href="https://nanx.me/hugo-tanka/about/">
                        
                        About
                    </a>
                </li>
                
                <li class="nav-item">
                    <a class="nav-link" href="https://github.com/nanxstats">
                        
                        GitHub
                    </a>
                </li>
                
                <li class="nav-item">
                    <a class="nav-link" href="https://twitter.com/nanxstats">
                        
                        Twitter
                    </a>
                </li>
                
                <li class="nav-item">
                    <a class="nav-link" href="https://nanx.me/hugo-tanka/index.xml">
                        
                        Subscribe
                    </a>
                </li>
                
            </ul>
        </div>
    </div>
</div>

<div class="content">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-sm-12 col-lg-8">
                <h1 class="mx-0 mx-md-4 blog-post-title">Tanka Theme Demo</h1>

                <div class="mb-md-4 meta">
                    
                    
                    <span class="author" title="Nan Xiao">
                        Nan Xiao
                    </span>
                    
                    

                    <span class="date middot" title='Sat Nov 21 2020 12:00:00 UTC'>
                        2020-11-21
                    </span>

                    <span class="reading-time middot">
                        2 min read
                    </span>

                    <div class="d-none d-md-inline tags">
                        <ul class="list-unstyled d-inline">
                            
                        </ul>
                    </div>
                </div>

                <div class="markdown blog-post-content">
                    
    <p><a href="https://github.com/nanxstats/hugo-tanka">Tanka</a> is a Bootstrap-based minimalist theme for Hugo.</p>
<div class="figure">
<p><img src="https://nanx.me/hugo-tanka/images/example.jpg" alt=""></p>
<p class="caption">Vik, Iceland. Photo by <a href="https://unsplash.com/photos/MLKrf51NV8w">Adam Jang</a>.</p>
</div>
<h2 id="typography">Typography</h2>
<p>Follows the Bootstrap typography.</p>
<h1 id="h1-heading">h1 Heading</h1>
<h2 id="h2-heading">h2 Heading</h2>
<h3 id="h3-heading">h3 Heading</h3>
<h4 id="h4-heading">h4 Heading</h4>
<h5 id="h5-heading">h5 Heading</h5>
<h6 id="h6-heading">h6 Heading</h6>
<hr>
<p><strong>This is bold text</strong></p>
<p><strong>This is bold text</strong></p>
<p><em>This is italic text</em></p>
<p><em>This is italic text</em></p>
<p><del>Deleted text</del></p>
<blockquote>
<p>Block quotes are
written like so.</p>
<p>They can span multiple paragraphs,
if you like.</p>
</blockquote>
<p>Some text, and some <code>code</code> and then a nice plain <a href="https://nanx.me" title="title text!">link with title</a>.</p>
<p>and then</p>
<ul>
<li>Create a list by starting a line with <code>+</code>, <code>-</code>, or <code>*</code></li>
<li>Sub-lists are made by indenting 2 spaces:
<ul>
<li>Marker character change forces new list start:
<ul>
<li>Ac tristique libero volutpat at</li>
</ul>
</li>
</ul>
</li>
<li>Very easy!</li>
</ul>
<p>vs.</p>
<ol>
<li>Lorem ipsum dolor sit amet</li>
<li>Consectetur adipiscing elit</li>
<li>Integer molestie lorem at massa</li>
</ol>
<h2 id="math">Math</h2>
<p>Inline formula <code>$S_n = \sum_{i=1}^n X_i$</code> example.</p>
<p>$$S(n, k) = \frac{1}{k!}\sum_{i=0}^{k} (-1)^{i} \binom{k}{i} (k-i)^n.$$</p>
<h2 id="code">Code</h2>
<p>Inline <code>code</code> example</p>
<h3 id="r">R</h3>
<div class="highlight"><pre style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-r" data-lang="r">library(<span style="color:#a31515">&#34;msaenet&#34;</span>)

dat = msaenet.sim.gaussian(
  n = 150, p = 500, rho = 0.5,
  coef = rep(1, 10), snr = 5, p.train = 0.7,
  seed = 1001
)

msaenet.fit = msaenet(
  dat$x.tr, dat$y.tr,
  alphas = seq(0.1, 0.9, 0.1),
  nsteps = 10L, tune.nsteps = <span style="color:#a31515">&#34;ebic&#34;</span>,
  seed = 1005
)

msaenet.fit$best.step
msaenet.nzv(msaenet.fit)
plot(msaenet.fit, label = <span style="color:#00f">TRUE</span>)
plot(msaenet.fit, type = <span style="color:#a31515">&#34;criterion&#34;</span>)
plot(msaenet.fit, type = <span style="color:#a31515">&#34;dotplot&#34;</span>, label = <span style="color:#00f">TRUE</span>, label.cex = 1)
</code></pre></div><h3 id="python">Python</h3>
<div class="highlight"><pre style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-python" data-lang="python">@requires_authorization(roles=[<span style="color:#a31515">&#34;ADMIN&#34;</span>])
<span style="color:#00f">def</span> somefunc(param1=<span style="color:#a31515">&#39;&#39;</span>, param2=0):
    <span style="color:#a31515">r</span><span style="color:#a31515">&#39;&#39;&#39;A docstring&#39;&#39;&#39;</span>
    <span style="color:#00f">if</span> param1 &gt; param2: <span style="color:#008000"># interesting</span>
        <span style="color:#00f">print</span> <span style="color:#a31515">&#39;Gre</span><span style="color:#a31515">\&#39;</span><span style="color:#a31515">ater&#39;</span>
    <span style="color:#00f">return</span> (param2 - param1 + 1 + 0b10l) <span style="color:#00f">or</span> None

<span style="color:#00f">class</span> <span style="color:#2b91af">SomeClass</span>:
    <span style="color:#00f">pass</span>

&gt;&gt;&gt; message = <span style="color:#a31515">&#39;&#39;&#39;interpreter
</span><span style="color:#a31515">... prompt&#39;&#39;&#39;</span>
</code></pre></div><h3 id="stan">Stan</h3>
<pre><code class="language-stan" data-lang="stan">// Multivariate Regression Example
// Taken from stan-reference-2.8.0.pdf p.66

data {
  int&lt;lower=0&gt; N;             // num individuals
  int&lt;lower=1&gt; K;             // num ind predictors
  int&lt;lower=1&gt; J;             // num groups
  int&lt;lower=1&gt; L;             // num group predictors
  int&lt;lower=1,upper=J&gt; jj[N]; // group for individual
  matrix[N,K] x;              // individual predictors
  row_vector[L] u[J];         // group predictors
  vector[N] y;                // outcomes
}
parameters {
  corr_matrix[K] Omega;       // prior correlation
  vector&lt;lower=0&gt;[K] tau;     // prior scale
  matrix[L,K] gamma;          // group coeffs
  vector[K] beta[J];          // indiv coeffs by group
  real&lt;lower=0&gt; sigma;        // prediction error scale
}
model {
  tau ~ cauchy(0,2.5);
  Omega ~ lkj_corr(2);
  to_vector(gamma) ~ normal(0, 5);
  {
    row_vector[K] u_gamma[J];
    for (j in 1:J)
      u_gamma[j] &lt;- u[j] * gamma;
    beta ~ multi_normal(u_gamma, quad_form_diag(Omega, tau));
  }
  {
    vector[N] x_beta_jj;
    for (n in 1:N)
      x_beta_jj[n] &lt;- x[n] * beta[jj[n]];
    y ~ normal(x_beta_jj, sigma);
  }
}

# Note: Octothorpes indicate comments, too!
</code></pre>


                </div>

                
            </div>
        </div>
    </div>
</div>

<section id="comments">
    <div class="py-3 content">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-sm-12 col-lg-8">
                    <div class="comments">
                        <script src="https://utteranc.es/client.js" repo=""
                            issue-term="pathname" label="comment" theme="github-light" crossorigin="anonymous" async>
                            </script>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>



    

    
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.2.0/highlight.min.js" integrity="sha512-TDKKr+IvoqZnPzc3l35hdjpHD0m+b2EC2SrLEgKDRWpxf2rFCxemkgvJ5kfU48ip+Y+m2XVKyOCD85ybtlZDmw==" crossorigin="anonymous"></script>
        
            <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.2.0/languages/r.min.js" defer></script>
        
            <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.2.0/languages/python.min.js" defer></script>
        
            <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.2.0/languages/stan.min.js" defer></script>
        
        <script>
            window.addEventListener('load', function() {
                hljs.initHighlighting();
            }, true);
        </script>
    

    

    
    
        
<script src="https://nanx.me/hugo-tanka/js/math-code.js"></script>
<script async src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML"></script>


    
</body>

</html>