-
Notifications
You must be signed in to change notification settings - Fork 0
/
esiidgenerator.html
406 lines (334 loc) · 25 KB
/
esiidgenerator.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
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>IID Generator Using Elasticsearch — jukart's Blog</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="top" title="jukart's Blog" href="index.html"/>
<link rel="next" title="Making Of" href="making_of.html"/>
<link rel="prev" title="Jürgen Kartnaller @ Lovely Systems" href="index.html"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
<!-- start Mixpanel --><script type="text/javascript">(function(f,b){if(!b.__SV){var a,e,i,g;window.mixpanel=b;b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.set_once people.increment people.append people.track_charge people.clear_charges people.delete_user".split(" ");
for(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,e,d])};b.__SV=1.2;a=f.createElement("script");a.type="text/javascript";a.async=!0;a.src="//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";e=f.getElementsByTagName("script")[0];e.parentNode.insertBefore(a,e)}})(document,window.mixpanel||[]);
mixpanel.init("5bada2b895f5c876475da18567064055");</script><!-- end Mixpanel -->
<script>
mixpanel.track('esiidgenerator');
</script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="index.html" class="fa fa-home"> jukart</a>
<div role="search">
<form id ="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="">IID Generator Using Elasticsearch</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#generator-explained-curl">Generator Explained (curl)</a></li>
<li class="toctree-l2"><a class="reference internal" href="#optimized-for-real-world-use">Optimized for real world use</a></li>
<li class="toctree-l2"><a class="reference internal" href="#with-python">With Python</a></li>
<li class="toctree-l2"><a class="reference internal" href="#references">References</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="making_of.html">The making of this page</a><ul>
<li class="toctree-l2"><a class="reference internal" href="making_of.html#github-repository">Github Repository</a></li>
<li class="toctree-l2"><a class="reference internal" href="making_of.html#managing-the-repository-and-deployment">Managing The Repository And Deployment</a></li>
</ul>
</li>
</ul>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">jukart</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="fa fa-home"> Home</a> »</li>
<li>IID Generator Using Elasticsearch</li>
<li class="wy-breadcrumbs-aside">
<a href="http://www.lovelysystems.com">Lovely Systems</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document">
<div class="section" id="iid-generator-using-elasticsearch">
<h1>IID Generator Using Elasticsearch<a class="headerlink" href="#iid-generator-using-elasticsearch" title="Permalink to this headline">¶</a></h1>
<p>At our company we are using <a class="reference external" href="http://crate.io">Crate</a> as our database. Crate
has no built in support for autoincrementing integer ids.</p>
<p>So I came up to build my own generator:</p>
<blockquote>
<div><ul class="simple">
<li>needs to be fast (so not really superfast)</li>
<li>needs to work on a distributed system</li>
</ul>
</div></blockquote>
<p>First I found this <a class="reference external" href="http://blogs.perl.org/users/clinton_gormley/2011/10/elasticsearchsequence---a-blazing-fast-ticket-server.html">blog post from Clinton Gormley</a>
expaining how to use the version numbering built into elasticsearch to create
ids. The use is really simple but it has a big disadvantage, it can not be
backuped useing simple bulk files because it is not possible to write the
_version back into elasticsearch.</p>
<p>The current iid value needs to be stored in the _source of the document to be
able to dump the data.</p>
<div class="section" id="generator-explained-curl">
<h2>Generator Explained (curl)<a class="headerlink" href="#generator-explained-curl" title="Permalink to this headline">¶</a></h2>
<p>First I create a new document containing an integer value:</p>
<div class="highlight-python"><div class="highlight"><pre>>>> curl -XPUT http://localhost:9200/sequence/sequence/1?pretty= -d '{"iid": 0}'
{
"_index" : "sequence",
"_type" : "sequence",
"_id" : "1",
"_version" : 1,
"created" : true
}
</pre></div>
</div>
<p>First I need to increment the current id. This can be done without the need of
a read/modify/write cycle of the document by using the _update API:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">curl</span> <span class="o">-</span><span class="n">XPOST</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">9200</span><span class="o">/</span><span class="n">sequence</span><span class="o">/</span><span class="n">sequence</span><span class="o">/</span><span class="mi">1</span><span class="o">/</span><span class="n">_update</span> <span class="o">-</span><span class="n">d</span> <span class="s">'</span>
<span class="gp">... </span><span class="p">{</span>
<span class="gp">... </span> <span class="s">"script"</span><span class="p">:</span> <span class="s">"ctx._source.iid += 1"</span><span class="p">,</span>
<span class="gp">... </span> <span class="s">"lang"</span><span class="p">:</span> <span class="s">"groovy"</span>
<span class="gp">... </span><span class="p">}</span>
<span class="gp">... </span><span class="s">'</span>
<span class="go">{</span>
<span class="go"> "_index" : "sequence",</span>
<span class="go"> "_type" : "sequence",</span>
<span class="go"> "_id" : "1",</span>
<span class="go"> "_version" : 2</span>
<span class="go">}</span>
</pre></div>
</div>
<p>The response is not returning the changed document. With the parameter
<cite>fields</cite> the fields to be returns can be specified:</p>
<div class="highlight-python"><div class="highlight"><pre>>>> curl -XPOST http://localhost:9200/sequence/sequence/1/_update?fields=iid -d '
... {
... "script": "ctx._source.iid += 1",
... "lang": "groovy"
... }
... '
{
"_index" : "sequence",
"_type" : "sequence",
"_id" : "1",
"_version" : 3,
"get" : {
"found" : true,
"fields" : {
"iid" : [ 2 ]
}
}
}
</pre></div>
</div>
<p>All this works but it is not performing very good because I need a request
for every id. But it is also possible to request a bulk of ids by incrementing
the id by more than just 1:</p>
<div class="highlight-python"><div class="highlight"><pre>>>> curl -XPOST http://localhost:9200/sequence/sequence/1/_update?fields=iid -d '
... {
... "script": "ctx._source.iid += bulk_size",
... "params": {"bulk_size": 10},
... "lang": "groovy"
... }
... '
{
"_index" : "sequence",
"_type" : "sequence",
"_id" : "1",
"_version" : 4,
"get" : {
"found" : true,
"fields" : {
"iid" : [ 12 ]
}
}
}
</pre></div>
</div>
<p>Now I have requested 10 ids in one request. The ids I am allowed to use are
in the range(iid-10+1, iid).</p>
<p>Also note how I used the script this time. I use the <cite>params</cite> to define the
<cite>bulk size</cite>. This has the advantage that the script code is always the same.
elasticsearch can now use the cached version of the script and work faster
because it needs to compile the code only once.</p>
<p>The disadvantage in using bulks is that it is possible to create holes if an
app is restarted which has not fully consumed the reuested bulk.</p>
</div>
<div class="section" id="optimized-for-real-world-use">
<h2>Optimized for real world use<a class="headerlink" href="#optimized-for-real-world-use" title="Permalink to this headline">¶</a></h2>
<p>First I configure the index with a mapping. This needs to be done before the
first write to the index:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">curl</span> <span class="o">-</span><span class="n">XPOST</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">9200</span><span class="o">/</span><span class="n">sequence</span><span class="o">/</span><span class="n">_mapping</span> <span class="o">-</span><span class="n">d</span> <span class="s">'</span>
<span class="gp">... </span><span class="p">{</span>
<span class="gp">... </span> <span class="s">"settings"</span><span class="p">:</span> <span class="p">{</span>
<span class="gp">... </span> <span class="s">"number_of_shards"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
<span class="gp">... </span> <span class="s">"auto_expand_replicas"</span><span class="p">:</span> <span class="s">"0-all"</span>
<span class="gp">... </span> <span class="p">},</span>
<span class="gp">... </span> <span class="s">"mappings"</span><span class="p">:</span> <span class="p">{</span>
<span class="gp">... </span> <span class="s">"sequence"</span><span class="p">:</span> <span class="p">{</span>
<span class="gp">... </span> <span class="s">"_all"</span><span class="p">:</span> <span class="p">{</span><span class="s">"enabled"</span><span class="p">:</span> <span class="mi">0</span><span class="p">},</span>
<span class="gp">... </span> <span class="s">"_type"</span><span class="p">:</span> <span class="p">{</span><span class="s">"index"</span><span class="p">:</span> <span class="s">"no"</span><span class="p">},</span>
<span class="gp">... </span> <span class="s">"dynamic"</span><span class="p">:</span> <span class="s">"strict"</span><span class="p">,</span>
<span class="gp">... </span> <span class="s">"properties"</span><span class="p">:</span> <span class="p">{</span>
<span class="gp">... </span> <span class="s">"iid"</span><span class="p">:</span> <span class="p">{</span>
<span class="gp">... </span> <span class="s">"type"</span><span class="p">:</span> <span class="s">"string"</span><span class="p">,</span>
<span class="gp">... </span> <span class="s">"index"</span><span class="p">:</span> <span class="s">"no"</span><span class="p">,</span>
<span class="gp">... </span> <span class="p">},</span>
<span class="gp">... </span> <span class="p">},</span>
<span class="gp">... </span> <span class="p">}</span>
<span class="gp">... </span> <span class="p">}</span>
<span class="gp">... </span><span class="p">}</span><span class="s">'</span>
</pre></div>
</div>
<p>Then I optimize the update request:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">curl</span> <span class="o">-</span><span class="n">XPOST</span> <span class="s">"http://localhost:9200/sequence/sequence/1/_update?fields=iid&retry_on_conflict=5"</span> <span class="o">-</span><span class="n">d</span> <span class="s">'</span>
<span class="gp">... </span><span class="p">{</span>
<span class="gp">... </span> <span class="s">"script"</span><span class="p">:</span> <span class="s">"ctx._source.iid += bulk_size"</span><span class="p">,</span>
<span class="gp">... </span> <span class="s">"params"</span><span class="p">:</span> <span class="p">{</span><span class="s">"bulk_size"</span><span class="p">:</span> <span class="mi">10</span><span class="p">},</span>
<span class="gp">... </span> <span class="s">"lang"</span><span class="p">:</span> <span class="s">"groovy"</span><span class="p">,</span>
<span class="gp">... </span> <span class="s">"upsert"</span><span class="p">:</span> <span class="p">{</span>
<span class="gp">... </span> <span class="s">'iid'</span><span class="p">:</span> <span class="mi">10</span>
<span class="gp">... </span> <span class="p">},</span>
<span class="gp">... </span><span class="p">}</span><span class="s">'</span>
</pre></div>
</div>
<p><cite>upsert</cite> will be used if the document doesn’t exists to create the document
with the initial data. The value for <cite>iid</cite> must always be set to the
bulk_size.</p>
<p>The query parameter <cite>retry_on_conflict</cite> will retry the update if there is a
version conflict from the time the document is read until it is updated.</p>
</div>
<div class="section" id="with-python">
<h2>With Python<a class="headerlink" href="#with-python" title="Permalink to this headline">¶</a></h2>
<p>This is how it can be used with the <a class="reference external" href="http://elasticsearch-py.readthedocs.org/">elasticsearch python client</a>.</p>
<p>Get a client instance:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">elasticsearch</span> <span class="kn">import</span> <span class="n">Elasticsearch</span>
<span class="gp">>>> </span><span class="n">es</span> <span class="o">=</span> <span class="n">Elasticsearch</span><span class="p">()</span>
</pre></div>
</div>
<p>Create the mapping:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">es</span><span class="o">.</span><span class="n">indices</span><span class="o">.</span><span class="n">create</span><span class="p">(</span>
<span class="gp">... </span> <span class="s">'sequence'</span><span class="p">,</span>
<span class="gp">... </span> <span class="p">{</span>
<span class="gp">... </span> <span class="s">"settings"</span><span class="p">:</span> <span class="p">{</span>
<span class="gp">... </span> <span class="s">"number_of_shards"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
<span class="gp">... </span> <span class="s">"auto_expand_replicas"</span><span class="p">:</span> <span class="s">"0-all"</span>
<span class="gp">... </span> <span class="p">},</span>
<span class="gp">... </span> <span class="s">"mappings"</span><span class="p">:</span> <span class="p">{</span>
<span class="gp">... </span> <span class="s">"sequence"</span><span class="p">:</span> <span class="p">{</span>
<span class="gp">... </span> <span class="s">"_all"</span><span class="p">:</span> <span class="p">{</span><span class="s">"enabled"</span><span class="p">:</span> <span class="mi">0</span><span class="p">},</span>
<span class="gp">... </span> <span class="s">"_type"</span><span class="p">:</span> <span class="p">{</span><span class="s">"index"</span><span class="p">:</span> <span class="s">"no"</span><span class="p">},</span>
<span class="gp">... </span> <span class="s">"dynamic"</span><span class="p">:</span> <span class="s">"strict"</span><span class="p">,</span>
<span class="gp">... </span> <span class="s">"properties"</span><span class="p">:</span> <span class="p">{</span>
<span class="gp">... </span> <span class="s">"iid"</span><span class="p">:</span> <span class="p">{</span>
<span class="gp">... </span> <span class="s">"type"</span><span class="p">:</span> <span class="s">"string"</span><span class="p">,</span>
<span class="gp">... </span> <span class="s">"index"</span><span class="p">:</span> <span class="s">"no"</span><span class="p">,</span>
<span class="gp">... </span> <span class="p">},</span>
<span class="gp">... </span> <span class="p">},</span>
<span class="gp">... </span> <span class="p">}</span>
<span class="gp">... </span> <span class="p">}</span>
<span class="gp">... </span> <span class="p">},</span>
<span class="gp">... </span> <span class="n">ignore</span><span class="o">=</span><span class="mi">400</span> <span class="c"># ignore index already exists</span>
<span class="gp">... </span><span class="p">)</span>
</pre></div>
</div>
<p>Request a bulk:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">bulk_size</span> <span class="o">=</span> <span class="mi">10</span>
<span class="gp">>>> </span><span class="n">result</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_es_client</span><span class="p">()</span><span class="o">.</span><span class="n">update</span><span class="p">(</span>
<span class="gp">... </span> <span class="n">index</span><span class="o">=</span><span class="s">'lc_iidsequences'</span><span class="p">,</span>
<span class="gp">... </span> <span class="n">doc_type</span><span class="o">=</span><span class="s">'iid'</span><span class="p">,</span>
<span class="gp">... </span> <span class="nb">id</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">,</span>
<span class="gp">... </span> <span class="n">body</span><span class="o">=</span><span class="p">{</span>
<span class="gp">... </span> <span class="s">"script"</span><span class="p">:</span> <span class="s">"ctx._source['iid'] += bulk_size"</span><span class="p">,</span>
<span class="gp">... </span> <span class="s">"lang"</span><span class="p">:</span> <span class="s">"groovy"</span><span class="p">,</span>
<span class="gp">... </span> <span class="s">"params"</span><span class="p">:</span> <span class="p">{</span>
<span class="gp">... </span> <span class="s">"bulk_size"</span><span class="p">:</span> <span class="n">bulk_size</span>
<span class="gp">... </span> <span class="p">},</span>
<span class="gp">... </span> <span class="s">"upsert"</span><span class="p">:</span> <span class="p">{</span>
<span class="gp">... </span> <span class="s">'iid'</span><span class="p">:</span> <span class="n">bulk_size</span>
<span class="gp">... </span> <span class="p">},</span>
<span class="gp">... </span> <span class="p">},</span>
<span class="gp">... </span> <span class="n">retry_on_conflict</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span>
<span class="gp">... </span> <span class="n">fields</span><span class="o">=</span><span class="s">'iid'</span><span class="p">,</span>
<span class="gp">... </span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">iid</span> <span class="o">=</span> <span class="n">result</span><span class="p">[</span><span class="s">'get'</span><span class="p">][</span><span class="s">'fields'</span><span class="p">][</span><span class="s">'iid'</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span>
<span class="gp">>>> </span><span class="n">bulk</span> <span class="o">=</span> <span class="nb">range</span><span class="p">(</span><span class="n">iid</span><span class="p">,</span> <span class="n">iid</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">bulk_size</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">)</span>
</pre></div>
</div>
<p>Now the ids can be retrieved from <cite>bulk</cite> until it is exhausted:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="nb">id</span> <span class="o">=</span> <span class="n">bulk</span><span class="o">.</span><span class="n">pop</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div><ul class="simple">
<li><a class="reference external" href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-update.html">elasticsearch _update API</a></li>
<li><a class="reference external" href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-put-mapping.html">elasticsearch _mapping API</a></li>
</ul>
</div></blockquote>
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = 'jukartgithubio';
var disqus_identifier = 'esiidgenerator';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript></div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="making_of.html" class="btn btn-neutral float-right" title="Making Of">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="index.html" class="btn btn-neutral" title="Jürgen Kartnaller @ Lovely Systems"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.1',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>