-
Notifications
You must be signed in to change notification settings - Fork 29
/
template.html
86 lines (85 loc) · 2.69 KB
/
template.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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="keywords" content="python programming language,python faster way,python,programming,language,python2,python27">
<meta name="description" content="python programming language faster way">
<meta name="author" content="Zokis">
<link rel="icon" href="images/python.org.16.ico" sizes="16x16">
<link rel="icon" href="images/python.org.ico">
<link rel="stylesheet" type="text/css" href="stylesheets/compress.css" media="screen" />
<link rel="stylesheet" type="text/css" href="stylesheets/gments/monokai.css" media="screen" />
<title>Python: faster way</title>
</head>
<body>
<header>
<div class="container-super">
<h1>Python: faster way</h1>
<h2>
Tricks for your code run faster --
<a href="https://github.com/zokis/Python--Faster-Way">
<img src="images/blacktocat.png">
</a>
</h2>
</div>
</header>
<div class="container-fluid">
<a href="#platform"><h4>#Platform</h4></a>
<div class="row-fluid" id="platform">
<div class="span12"><pre class="python">
>>> import sys
>>> import platform
>>> platform.system()
'{{ plat_sys }}'
>>> platform.release()
'{{ plat_rel }}'
>>> sys.version
'{{ sys_version}}'
>>> import timeit
>>> from dis import dis
>>>
</pre></div>
</div>
{% for test in tests %}
<a href="#test{{ test.n }}"><h4>#Test {{ test.n }}</h4></a>
<div class="row-fluid" id="test{{ test.n }}">
{% for case in test.cases %}
<div class="span{{ test.span }}"><pre class="python">
{{ case.file_content }}
>>>
>>> min(timeit.repeat(a, number={{ case.number }}))
... {{ case.timeit_min }}
>>>
>>> dis(a)
{{ case.dis|e }}
>>>
</pre></div>
{% endfor %}
</div>
{% endfor %}
</div>
<script src="javascripts/highlight.pack.js"></script>
<script>
window.onload = function() {
var aCodes = document.getElementsByTagName('pre');
for (var i = 0; i < aCodes.length; i++) {
hljs.highlightBlock(aCodes[i]);
}
};
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-17236714-3']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>