This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import csv | |
import json | |
import sys | |
import datetime | |
def get_data( filename, from_ts, to_ts, metric, wiki=None, http2=None, anon=None, lazy = None ): | |
sample = [] | |
f = open( filename ) | |
delim = '\t' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/package.json b/package.json | |
index 1a709407c..fb4b9072f 100644 | |
--- a/package.json | |
+++ b/package.json | |
@@ -44,6 +44,7 @@ | |
"nyc": "13.0.1", | |
"oojs": "2.2.2", | |
"pre-commit": "1.2.2", | |
+ "preact": "8.4.2", | |
"qunit": "2.7.0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const wikiApis = require('express-wikimedia-api-proxy'); | |
const app = express(); | |
const cors = require('cors'); | |
const PORT = 8090 | |
const base = '/api/'; | |
app.use(cors()) | |
wikiApis(app, base, true); | |
app.listen(PORT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const wikiApis = require('express-wikimedia-api-proxy'); | |
const app = express(); | |
const cors = require('cors'); | |
const PORT = 8090 | |
const base = '/api/'; | |
app.use(cors()) | |
wikiApis(app, base, true); | |
app.listen(PORT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Tabs = () => { | |
// to be implemented but would deal with all the tab magic. | |
}; | |
const Header = ( { title, actions } ) => { | |
// to be implemented | |
} | |
// CategoryOverlay becomes an Overlay without any async properties. | |
// Very easy to test and easier to tweak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"words":{"土":"soil/earth","水":"water","山":"mountain","瓜":"melon","花":"flower","果":"fruit","苦":"bitter","西":"west","西瓜":"watermelon","苦瓜":"bitter gourd","虹":"rainbow","虫":"insect","工":"work","火山":"volcano","火":"fire","云":"cloud","萝卜":"radish","风":"wind","冬":"winter","电":"electricity","夏":"summer","桃":"peach","木":"wood","瀑":"waterfall/shower","土豆":"potato","豆":"beans/pea","苹果":"apple","茄":"eggplant","子":"son","茄子":"eggplant","星":"star","日":"sun (☀️)","生":"give birth","星期一":"monday","期":"period(time)","一":"one","星期二":"tuesday","二":"two","香蕉":"banana","香":"fragrant","饭团":"rice ball","团":"group","饭":"meal/food","杏":"apricot","口":"mouth","饼":"pastry/cake","鱼":"fish","海鲜":"seafood","海":"sea","面包":"bread","陨石":"aerolite","石":"stone","陨":"fall from sky","石榴":"pomegranate","田":"field","糕点":"pastry","饺":"dumpling","大":"big","人":"person","夫人":"madam","夫":"man","天":"sky","天人":"heaven","森":"forest","林":"in the woods","本":"foundation","玉":"jade","女":"woman/daughter","羊":"sheep","牛":"cow","白":"white","雨":"rain","士":"soldier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/includes/BookRenderingMediator.php b/includes/BookRenderingMediator.php | |
index 9d30550..400aec7 100644 | |
--- a/includes/BookRenderingMediator.php | |
+++ b/includes/BookRenderingMediator.php | |
@@ -192,10 +192,7 @@ class BookRenderingMediator implements LoggerAwareInterface { | |
'electron' => ElectronVirtualRestService::class, | |
]; | |
foreach ( $modules as $module => $class ) { | |
- if ( !isset( $config['modules'][$module] ) ) { | |
- throw new Exception( "VirtualRESTService module $module is not configured propely" ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* pint css */ | |
/* This css files can be applied to any wikipedia article. | |
Note: remove any other css applied to page. this is the only css needed to print. | |
*/ | |
/* | |
- Have some padding and body typeface | |
- Turn color to pure black. good for printing pure black | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/includes/specials/SpecialMobileLanguages.php b/includes/specials/SpecialMobileLanguages.php | |
index 735645e..d30655c 100644 | |
--- a/includes/specials/SpecialMobileLanguages.php | |
+++ b/includes/specials/SpecialMobileLanguages.php | |
@@ -22,22 +22,11 @@ class SpecialMobileLanguages extends MobileSpecialPage { | |
* @return array | |
*/ | |
private function getLanguages() { | |
- $api = new ApiMain( | |
- new DerivativeRequest( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Custom element autocomplete</title> | |
</head> | |
<body> | |
<h1>CustomElement AutoComplete</h1> | |
<p> | |
Upgrades a standard select element to work like an autocomplete by using CustomElements. | |
It will degrade on older browsers that do not support elements to a select dropdown. |