-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatom.xml
More file actions
136 lines (110 loc) · 10.7 KB
/
Copy pathatom.xml
File metadata and controls
136 lines (110 loc) · 10.7 KB
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
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Post Modern</title>
<link href="http://nlemke.github.com/atom.xml" rel="self"/>
<link href="http://nlemke.github.com/"/>
<updated>2011-08-21T19:25:43+02:00</updated>
<id>http://nlemke.github.com/</id>
<author>
<name>Norman Lemke</name>
</author>
<entry>
<title>ZOMG</title>
<link href="http://nlemke.github.com/blog/2011/08/21/testing-webfonts/"/>
<updated>2011-08-21T19:19:00+02:00</updated>
<id>http://nlemke.github.com/blog/2011/08/21/testing-webfonts</id>
<content type="html"><p>Whatever!</p>
</content>
</entry>
<entry>
<title>The Beginning</title>
<link href="http://nlemke.github.com/blog/2011/08/14/the-beginning/"/>
<updated>2011-08-14T14:40:00+02:00</updated>
<id>http://nlemke.github.com/blog/2011/08/14/the-beginning</id>
<content type="html"><h1>So</h1>
<p>this is the first post. Let's see where this is going :)</p>
<!--more-->
<p> <code>sample code</code></p>
<ul>
<li>itemize me please</li>
<li>and me too</li>
</ul>
<p>``` ruby</p>
<pre><code>class Fixnum
def prime?
('1' * self) !~ /^1?$|^(11+?)\1+$/
end
end
</code></pre>
<p>```</p>
<div><script src='https://gist.github.com/996818.js?file='></script>
<noscript><pre><code>@@ -590,7 +590,7 @@ class SpritesTest &lt; Test::Unit::TestCase
it &quot;should generate a sprite from nested folders&quot; do
css = render &lt;&lt;-SCSS
- @import &quot;nested/*.png&quot;;
+ @import &quot;nested/**/*.png&quot;;
@include all-nested-sprites;
SCSS
assert_correct css, &lt;&lt;-CSS</code></pre></noscript></div>
<h1>Including a file extension in the title enables highlighting</h1>
<div><figure role=code><figcaption><span>Time to be Awesome - awesome.r </span></figcaption>
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
<span class='line'>2</span>
<span class='line'>3</span>
<span class='line'>4</span>
<span class='line'>5</span>
<span class='line'>6</span>
<span class='line'>7</span>
<span class='line'>8</span>
</pre></td><td class='code' width='100%'><pre><code class='r'><div class='line'><span class="c1"># makes a commit trajectory plot coloured by committer</span>
</div><div class='line'>mktrjplt <span class="o">&lt;-</span> <span class="kr">function</span><span class="p">(</span>ident<span class="p">,</span> splitDF<span class="p">){</span>
</div><div class='line'> test <span class="o">&lt;-</span> dift<span class="p">(</span>ident<span class="p">,</span>splitDF<span class="p">)</span>
</div><div class='line'> test <span class="o">&lt;-</span> test<span class="p">[</span>order<span class="p">(</span>test<span class="p">$</span>CommittedDate<span class="p">),]</span>
</div><div class='line'> test <span class="o">&lt;-</span> cbind<span class="p">(</span>test<span class="p">,</span> index <span class="o">=</span> c<span class="p">(</span><span class="m">1</span>:dim<span class="p">(</span>test<span class="p">)[</span><span class="m">1</span><span class="p">]))</span>
</div><div class='line'> p <span class="o">&lt;-</span> qplot<span class="p">(</span>CommittedDate<span class="p">,</span>index<span class="p">,</span> data<span class="o">=</span>test<span class="p">,</span> geom<span class="o">=</span><span class="s">&quot;point&quot;</span><span class="p">,</span> colour <span class="o">=</span> Committer<span class="p">,</span>alpha <span class="o">=</span> <span class="m">1</span><span class="o">/</span><span class="m">8</span><span class="p">,</span> xlab <span class="o">=</span> <span class="s">&quot;Time&quot;</span><span class="p">,</span> ylab <span class="o">=</span> <span class="s">&quot;Number of Commits&quot;</span><span class="p">)</span>
</div><div class='line'> print<span class="p">(</span>p<span class="p">)</span>
</div><div class='line'><span class="p">}</span>
</div></code></pre></td></tr></table></div></figure></div>
<div><figure role=code><figcaption><span>Pyhton test - python.py </span></figcaption>
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
<span class='line'>2</span>
<span class='line'>3</span>
<span class='line'>4</span>
<span class='line'>5</span>
<span class='line'>6</span>
<span class='line'>7</span>
<span class='line'>8</span>
<span class='line'>9</span>
<span class='line'>10</span>
<span class='line'>11</span>
<span class='line'>12</span>
<span class='line'>13</span>
<span class='line'>14</span>
<span class='line'>15</span>
<span class='line'>16</span>
<span class='line'>17</span>
<span class='line'>18</span>
<span class='line'>19</span>
</pre></td><td class='code' width='100%'><pre><code class='py'><div class='line'><span class="c"># makes a commit trajectory plot coloured by committer</span>
</div><div class='line'><span class="sd">&quot;&quot;&quot;</span>
</div><div class='line'><span class="sd">Initialize database connection and global variables</span>
</div><div class='line'><span class="sd">&quot;&quot;&quot;</span>
</div><div class='line'><span class="k">def</span> <span class="nf">init</span><span class="p">(</span><span class="n">databasefile</span> <span class="o">=</span> <span class="s">&#39;/tmp/repositories&#39;</span><span class="p">):</span>
</div><div class='line'>
</div><div class='line'> <span class="c"># Open database, create if it doesn&#39;t exist</span>
</div><div class='line'> <span class="k">global</span> <span class="n">database</span><span class="p">,</span><span class="n">dbconnection</span>
</div><div class='line'> <span class="n">database</span> <span class="o">=</span> <span class="n">sqlite3</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="n">databasefile</span><span class="p">)</span>
</div><div class='line'> <span class="n">dbconnection</span> <span class="o">=</span> <span class="n">database</span><span class="o">.</span><span class="n">cursor</span><span class="p">()</span>
</div><div class='line'>
</div><div class='line'> <span class="c"># Set up table structure if it doesn&#39;t exist</span>
</div><div class='line'> <span class="n">dbconnection</span><span class="o">.</span><span class="n">execute</span><span class="p">(</span><span class="s">&quot;CREATE TABLE IF NOT EXISTS HarvestedRepository( </span><span class="se">\</span>
</div><div class='line'><span class="s"> Name TEXT PRIMARY KEY)&quot;</span><span class="p">)</span>
</div><div class='line'>
</div><div class='line'> <span class="c"># Regular expression for extracting the repository name</span>
</div><div class='line'> <span class="c"># from the timeline&#39;s XML title</span>
</div><div class='line'> <span class="k">global</span> <span class="n">repositorypattern</span>
</div><div class='line'> <span class="n">repositorypattern</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">compile</span><span class="p">(</span><span class="s">&#39;\S*$&#39;</span><span class="p">)</span>
</div></code></pre></td></tr></table></div></figure></div>
</content>
</entry>
</feed>