TypeScript does two things:
- Compiles TypeScript to JavaScript ("transpiling").
- Performs static type analysis on your code.
// Type definitions for dygraphs 2.1 | |
// Project: http://dygraphs.com | |
// Definitions by: Dan Vanderkam <https://github.com/danvk> | |
// Martin Badin <https://github.com/martin-badin> | |
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | |
/// <reference types="google.visualization" /> | |
declare namespace dygraphs { | |
type DataArray = Array<Array<number | Date | null>>; |
TypeScript does two things:
/* | |
Copyright (c) 2012, Canal TP | |
This is an example file, do whatever you want with it! (for example if you are in Paris, invite us for a beer) | |
This shows the simplest way to use the osm.pbf reader. It just counts the number of objects in the file. | |
To build this file : | |
g++ -O2 -o counter example_counter.cc -losmpbf -lprotobuf | |
To run it: |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8' /> | |
<title>Raycasting with Mapbox</title> | |
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.4.0/mapbox-gl.js'></script> | |
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.4.0/mapbox-gl.css' rel='stylesheet' /> | |
<style> |
token.js |
h-index | organization | |
---|---|---|
347 | ||
314 | microsoft | |
216 | apache | |
206 | fossasia | |
203 | sindresorhus | |
142 | googlearchive | |
137 | mozilla | |
133 | alibaba | |
132 | spatie |
h-index | org/user | type | Rank (h-index) | Rank (stars) | |
---|---|---|---|---|---|
347 | Organization | 1 | 1 | ||
314 | microsoft | Organization | 2 | 2 | |
216 | apache | Organization | 3 | 4 | |
206 | fossasia | Organization | 4 | 13 | |
203 | sindresorhus | User | 5 | 5 | |
142 | googlearchive | Organization | 6 | ??? | |
137 | mozilla | Organization | 7 | 19 | |
133 | alibaba | Organization | 8 | 6 | |
132 | spatie | Organization | 9 | 65 |
Query | Number of results | |
---|---|---|
stars:15..20 created:2017-05-02..2017-05-11 | 742 | |
stars:15..20 created:2017-05-12..2017-05-20 | 630 | |
stars:15..20 created:2017-05-30..2017-06-07 | 631 | |
stars:15..20 created:2017-06-08..2017-06-17 | 771 | |
stars:15..20 created:2017-06-18..2017-06-26 | 638 | |
stars:15..20 created:2017-06-27..2017-07-05 | 674 | |
stars:15..20 created:2017-07-06..2017-07-14 | 643 |
def split_interval(a, b): | |
d = int((b - a) / 2) | |
return [(a, a + d), (a + d + 1, b)] | |
def split_by_days(stars, day_start, day_end): | |
start_fmt = day_start.strftime('%Y-%m-%d') | |
end_fmt = day_end.strftime('%Y-%m-%d') | |
q = query_for_star_dates(stars, start_fmt, end_fmt) | |
c = get_count(q) |
Query | Number of Results | |
---|---|---|
stars:400..420 | 2524 | |
stars:400..420 created:<2015 | 947 | |
stars:400..420 created:2015..2016 | 777 | |
stars:400..420 created:>2016 | 799 |