-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcommunity.html
More file actions
282 lines (240 loc) · 12.3 KB
/
community.html
File metadata and controls
282 lines (240 loc) · 12.3 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
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
---
layout: null
permalink: /community/
title: Community
description: the ICIQ community and friends.
---
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{ title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv = "X-UA-Compatible" content = "IE = edge">
<meta name="subtitle" content="{{ page.subtitle }}">
{% if site.author.OtherName %}
<meta name="author" content="{{site.author.name}} | {{site.author.OtherName}}">
{% else %}
<meta name="author" content="{{site.author.name}}">
{% endif %}
{% include metadata.html %}
<!-- Le styles -->
<!-- Le styles -->
<link rel="stylesheet" media="screen" href="https://fontlibrary.org/face/quattrocento-sans" type="text/css"/>
<link rel="stylesheet" media="screen" href="https://fontlibrary.org/face/rosario" type="text/css"/>
<!-- Bootstrap -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
<link href = "/assets/css/bootstrap.min.css" rel = "stylesheet">
<!-- Self-defined style -->
<link rel="stylesheet" type="text/css" href="/assets/css/style.css">
<!-- favicon -->
<link rel="shortcut icon" href="/assets/img/favicon.ico">
<!-- Le javascript -->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src = "https://code.jquery.com/jquery.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src = "/assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/assets/js/strftime.js"></script>
<script type="text/javascript">
(function ($, undefined) {
// Put custom repo URL's in this object, keyed by repo name.
var repoUrls = {
};
// Put custom repo descriptions in this object, keyed by repo name.
var repoDescriptions = {
};
var repos = [];
function repoUrl(repo) {
return repoUrls[repo.name] || repo.html_url;
}
function repoDescription(repo) {
return repoDescriptions[repo.name] || repo.description;
}
function addRecentlyUpdatedRepo(repo) {
var $item = $("<li>");
var $name = $("<a>").attr("href", repo.html_url).text(repo.name);
$item.append($("<span>").addClass("name").append($name));
var $time = $("<a>").attr("href", repo.html_url + "/commits").text(strftime("%h %e, %Y", repo.pushed_at));
$item.append($("<span>").addClass("time").append($time));
$item.append('<span class="bullet">⋅</span>');
var $open_issues = $("<a>").attr("href", repo.html_url + "/open_issues").text(repo.open_issues + " open_issues");
$item.append($("<span>").addClass("open_issues").append($open_issues));
var $watchers = $("<a>").attr("href", repo.html_url + "/watchers").text(repo.watchers + " watchers");
$item.append($("<span>").addClass("watchers").append($watchers));
$item.append('<span class="bullet">⋅</span>');
var $forks = $("<a>").attr("href", repo.html_url + "/network").text(repo.forks + " forks");
$item.append($("<span>").addClass("forks").append($forks));
$item.appendTo("#recently-updated-repos");
}
function addRepo(repo) {
var $item = $("<li>").addClass("repo rep " + (repo.language || '').toLowerCase());
var $link = $("<a>").attr("href", repoUrl(repo)).appendTo($item);
$link.append($("<h2>").text(repo.name));
// $link.append($("<h3>").text(repo.watchers + " watchers" + " / " + repo.open_issues + " open issues"));
$link.append($("<p style='line-height:1em;'>").text(repoDescription(repo)));
//$link.append($("<p style='line-height:1em;'>").text("Updated " +
// strftime("%h %e, %Y", repo.pushed_at)));
$link.append($("<h3 style='top:23px; right:1px;'>").addClass("language").text(repo.language));
$item.appendTo("#repos");
}
// The following way of querying multiple urls is inspired by blog http://blog.timsommer.be/using-promises-to-merge-async-jquery-ajax-calls/
// and discussion with Jake on https://forum.jquery.com/topic/how-to-use-ajax-or-getjson-to-query-multiple-urls-and-then-sort-the-combined-data?reply=true.
// More about promises and deferred queries in jQuery may be found at http://www.nurkiewicz.com/2013/03/promises-and-deferred-objects-in-jquery.html.
//var tokenkey='9594d317ed5';
var promises=[]; //to store the array of returned promises of each query.
var temprepos=[];
// This is to return the promises of every query on different urls.
function queryorgrepo(requrl){
return $.ajax({
url: requrl,
//async: false,
dataType: 'json',
//headers: 'Authorization: token '+tokenkey,
success: function () {
//We only need results.data in the end. Is this blank function correct?
// return result.data;
}
});
};
// Call organization names from the YAML.
var orgnames =
[{% for item in site.author.ghorgs %}
{% if forloop.last != true %}
'{{ item.name }}',
{% else %}
'{{item.name}}'
{% endif %}
{% endfor %}];
//Define url list as a combination of user's url and the orgs' urls.
var orgurls = ['https://api.github.com/users/{{site.author.github}}/repos?per_page=100&callback=?'];
for (var indx = 0; indx < orgnames.length; indx++){
orgurls[indx + 1] = "https://api.github.com/orgs/"+orgnames[indx]+"/repos?per_page=100&callback=?";
};
for (var indx = 0; indx < orgurls.length; indx++){
//add promises in each loop of query.
promises.push(queryorgrepo(orgurls[indx]));
}
// Invoke each function stored in the result array and proceed when they are all done
$.when.apply(this, promises).done(function () {
// Fetch the result from each arguments.
var tempdata = [];
// Each argument contains the result of one succes ajax function.
// in this case, three arguments exist, one for each ajax call.
for (var i = 0; i < arguments.length; i++) {
// retrieve the entries from the argument parameter
values = arguments[i][0].data;
//console.log(values);
// Push the retrieved value to a global function variable, which we can.
// this function is processed synchronously, when all ajax calls have been completed
tempdata.push(values);
};
// merge the arrays to get the collected repos.
for (var i = 0; i < tempdata.length; i++) {
$.merge(repos, tempdata[i]);
};
// sort the repos and define html elememts.
$(function () {
$("#num-repos").text(repos.length);
// Convert pushed_at to Date.
$.each(repos, function (i, repo) {
repo.pushed_at = new Date(repo.pushed_at);
var weekHalfLife = 1.146 * Math.pow(10, -9);
var pushDelta = (new Date) - Date.parse(repo.pushed_at);
var createdDelta = (new Date) - Date.parse(repo.created_at);
var weightForPush = 1;
var weightForWatchers = 1.314 * Math.pow(10, 7);
repo.hotness = weightForPush * Math.pow(Math.E, -1 * weekHalfLife * pushDelta);
repo.hotness += weightForWatchers * repo.watchers / createdDelta;
});
// Sort by highest # of watchers.
repos.sort(function (a, b) {
if (a.hotness < b.hotness) return 1;
if (b.hotness < a.hotness) return -1;
return 0;
});
// Only first 12 hotest repos are shown.
$.each(repos.slice(0,12), function (i, repo) {
addRepo(repo);
});
// Sort by most-recently pushed to.
repos.sort(function (a, b) {
if (a.pushed_at < b.pushed_at) return 1;
if (b.pushed_at < a.pushed_at) return -1;
return 0;
});
$.each(repos.slice(0, 3), function (i, repo) {
addRecentlyUpdatedRepo(repo);
});
});//function
}); //when.apply.done
})(jQuery);
</script>
</head>
<body>
{% include navbar.html %}
<div class="container"> <!-- Twitter bootstrap has all body content in a container -->
<header class="jumbotron subhead">
<h1 class="entry-title">{{ page.title }}</h1>
<p>{{ page.subtitle }}</p>
</header>
<div class="row">
<div class="row">
<h2>Non-for-profit organization network with the ICIQ community:</h2>
<ul style="list-style-type:row">
<li><a href="http://iciq.github.io/" target="_blank">ICIQ</a>: the open community stands for Information, Computation, Intelligence and Quantum.
We have scientists, journalists, enterprineurs, students and many other professionals
who are interested in crossing the boundaries between classical and quantum information sciences to shape the future and
organize group studies, online talks, open discussions and news sharing.
Check out our <a href="https://www.reddit.com/{{site.author.reddit}}">QuantumInformation subreddit</a> and <a href="https://plus.google.com/communities/112872767737673370045" target="_blank">Google+ community on quantum information science</a> (the biggest as of Feb 2016).</li>
<li><a href="http://juliaquantum.github.io/" target="_blank">JuliaQuantum</a>: for establishing standards and computational libraries in Julia for quantum science and technology.
<a href="http://julialang.org/" target="_blank">JuliaLang</a> is the head organization of the Julia programming language;
and <a href="http://juliaCN.github.io/" target="_blank">JuliaCN</a> is the Julia programming language organization for Chinese speakers.</li>
<li><a href="http://cquic-github.github.io/" target="_blank">CQuIC@GitHub</a>: for CQuIC members who do code for science. </li>
</ul>
</div>
</div>
<div class="row">
<h2 align="center">Sharing code repositories</h2>
<div id="wrapper" class="grid clearfix">
<div id="main" class="grid-1">
<div><h2>ICIQ and friends' Open-source Repositories</h2></div>
<h4> This is an automated index to the top 12 public Github repositories by ICIQ and friend-organizations.
All of them are released under open-source initiative licenses,
so you are free -- and invited! -- to use and distribute.
You are also encouraged to send pull requests with corrections or
improvements on these community common resources.</h4>
</div>
<div class="grid grid-3">
<div id="statistics" class="grid-1 alpha header">
<h1 style="margin: 5px 5px 0;">Statistics</h1>
<p style="margin: 5px 5px 0px;"> <a href="https://github.com/{{site.author.github}}/repositories"><span id="num-repos"> </span> public repos</a> </p>
<p style="margin: 5px 5px 0px;"><a href="https://github.com/{{site.author.github}}">https://github.com/{{site.author.github}}</a></p>
</div>
<div id="recently-updated" class="grid-2 omega header">
<h1 style="margin: 5px 5px 0;">Recently updated <a href="https://github.com/{{site.author.github}}/repositories">View All on GitHub</a></h1>
<ol id="recently-updated-repos" style="margin-left: -15px; margin-top: 15px"></ol>
</div>
</div>
<ol id="repos"></ol>
</div>
</div>
<!-- <div class="row">
<div class="col-md-6 col-xs-11">
<h4> <a href="https://github.com/i2000s" onClick="recordOutboundLink(this, 'Outbound Links', 'Github'); return false;" >
<img src="{{site.url}}/assets/img/icon-github.png" alt="github"> Coding </a></h4>
<div class="excerpt" height="300px">
<div class="scroll">
{% github_feed i2000s, 5 %}
</div>
</div>
</div> -->
<div class="col-md-6 col-xs-11">
<h4><a property="account" href="https://twitter.com/{{site.author.twitter}}" onclick="recordOutboundLink(this, 'Outbound Links', 'Twitter'); return false;"><img src="/assets/img/icon-twitter.png" height=45px alt="Twitter"> Discussing </a></h4>
<div class="excerpt" height="300px">
<div class="scroll">
{% twitter_feed ICIQ_project, 20 %}
</div>
</div>
</div>
<!--</div> -->
{% include footer.html %}