-
Notifications
You must be signed in to change notification settings - Fork 3
/
community.html
331 lines (285 loc) · 16.4 KB
/
community.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
---
layout: null
permalink: /community/
title: Community
subtitle: How science is done and for what.
description: Xiaodong's self-described contribution to the community.
---
<!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 = "{{ site.baseurl }}/assets/css/bootstrap.min.css" rel = "stylesheet">
<!-- Self-defined style -->
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/assets/css/style.css">
<!-- favicon -->
<link rel="apple-touch-icon" sizes="57x57" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="{{ site.baseurl }}/assets/img/favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="{{ site.baseurl }}/assets/img/favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="{{ site.baseurl }}/assets/img/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="{{ site.baseurl }}/assets/img/favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{ site.baseurl }}/assets/img/favicon/favicon-16x16.png">
<link rel="manifest" href="{{ site.baseurl }}/assets/img/favicon/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="{{ site.baseurl }}/assets/img/favicon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!-- 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 = "{{ site.baseurl }}/assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="{{ site.baseurl }}/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">
<p>This is a fast developing world. Data streams are expanding exponentially.
Man-made machines are gaining new capacity every day to replace human forces in every possible area.
Today, increasing number of scientists and engineers, including me, are working on the quantum information frontier to build the fundation for making machines in extreme complexity, which will be eventually more intelligent and efficient than ourselves in terms of processing information and creating new ideas.
As far as I can see, we are approaching to a critical point that a revolution will dramatically change our personal life, ways of doing research, teaching and working, relationships among people and things, and ultimately the social structure of the human world.
We need to rethink about and rebuild our purpose of living, our common sense, moral standards, law systems, policies and the attribution model of profits, knowledge and tools--before it is too late.
</p>
<p>As a scientist, I am taking some time off to develop tools, to share my works and to organize some social activities.
If you find those are opportunities for your to take advantage and participation of, I'd be more than happy to welcome you to the journey of defining sustainable development of humanity.
</p>
<!--<div class="row">
<h2>Callout: JuliaQuantum is discussing the coming Google Summer of Code projects for 2016. Come to join <a href="https://github.com/JuliaQuantum/JuliaQuantum.github.io/issues/32" target="_blank">our discussion</a>.</h2>
</div> -->
<div class="row">
<h2>Non-for-profit organizations that I co-created for communities:</h2>
<ul style="list-style-type:row">
<li><a href="http://cquic.github.io/" target="_blank">CQuIC@GitHub</a>: for CQuIC members who do code for science. </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. </li>
<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 our <a href="https://plus.google.com/communities/112872767737673370045" target="_blank">Google+ community on quantum information science</a> (the biggest as of Feb 2016).</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>Xiaodong Qi's Open-source Repositories</h2></div>
<h4> This is an automated index to the top 12 public Github repositories managed by Xiaodong Qi.
All of them are released under open-source initiative licenses,
so you are free -- and invited! -- to use or adapt them as long as you
acknowledge the source. If you do use them, I hope you'll drop me
a note by email. I also encourage 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-4 col-xs-11">
<h4> <a href="https://github.com/{{ site.author.github }}" onClick="recordOutboundLink(this, 'Outbound Links', 'Github'); return false;" >
<img src="{{ site.baseurl }}/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-4 col-xs-11">
<h4><a property="account" href="https://twitter.com/{{site.author.twitter}}" onclick="recordOutboundLink(this, 'Outbound Links', 'Twitter'); return false;"><img src="{{ site.baseurl }}/assets/img/icon-twitter.png" height=45px alt="Twitter"> Discussing </a></h4>
<div class="excerpt" height="300px">
<div class="scroll">
{% twitter_feed i2000s, 5 %}
</div>
</div>
</div>
<div class="col-md-4 col-xs-11">
<h4> <a href="https://github.com/{{ site.author.github }}/{{site.author.readingrepo}}/commits/master/" onClick="recordOutboundLink(this, 'Outbound Links', 'Github'); return false;" >
<img src="{{site.baseurl}}/assets/img/icon-stackoverflow.png" height=40px></img> Reading </a></h4>
<div class="excerpt" height="300px">
<div class="scroll">
{% github_repo_feed i2000s, Archive, 5 %} <!-- The link is different for different people. Use author's github repo and readingrepo names here. -->
</div>
</div>
</div>
</div>
<div class="row">
<h2>Here are some <a href="{{site.baseurl}}/tools.html" target="_blank">tools I use for work</a>. </h2>
<br>
</div>
<!--<div class="row">
<h2>My pholosophy on Open Science can be found <a href="/philosophy.html" target="_blank">here</a>. </h2>
<br>
</div> -->
{% include footer.html %}