This file contains hidden or 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
| package com.twitter.scalding.sources | |
| import cascading.tuple.Fields | |
| import cascading.tap.Tap; | |
| import org.elasticsearch.hadoop.cascading.EsTap | |
| import com.twitter.scalding._ | |
| abstract class ElasticsearchSource extends Source { |
This file contains hidden or 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
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net" | |
| "os" | |
| "os/signal" |
This file contains hidden or 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
| #!/bin/bash | |
| top=$(mktemp) | |
| tmp1=$(mktemp) | |
| tmp2=$(mktemp) | |
| i=1 | |
| while [[ $(jq 'keys | length' $top) -lt 5000 ]]; do | |
| echo iteration $i - $(jq 'keys | length' $top) |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
| { | |
| "Main_Page": { | |
| "2022/03/15": { | |
| "views": 2411822, | |
| "rank": 1 | |
| }, | |
| "2022/03/14": { | |
| "views": 2622773, | |
| "rank": 1 | |
| }, |
This file contains hidden or 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 os, json | |
| from fastapi import FastAPI | |
| app = FastAPI() | |
| SUGGEST_FILES_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../data/") | |
| SUGGESTIONS = {} | |
| RESULTS = {} | |
| @app.on_event("startup") |
This file contains hidden or 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 os, json | |
| from fastapi import FastAPI | |
| app = FastAPI() | |
| SUGGEST_FILES_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../data/") | |
| SUGGESTIONS = {} | |
| RESULTS = {} | |
| @app.on_event("startup") |
This file contains hidden or 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 time | |
| from math import log2, log | |
| from typing import Any, Dict | |
| # Code copied from here | |
| # https://github.com/wikimedia/mediawiki-extensions-CirrusSearch/blob/85572945a8f97829ac9c9a2c95bb97a40c24ac73/includes/BuildDocument/Completion/QualityScore.php | |
| class Scorer(): |
This file contains hidden or 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
| ➜ merino-explorations git:(main) ✗ k6 run --vus 5 --duration 10m -e HOST=local ./load-tests/test.js | |
| /\ |‾‾| /‾‾/ /‾‾/ | |
| /\ / \ | |/ / / / | |
| / \/ \ | ( / ‾‾\ | |
| / \ | |\ \ | (‾) | | |
| / __________ \ |__| \__\ \_____/ .io | |
| execution: local | |
| script: ./load-tests/test.js |
This file contains hidden or 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 http from "k6/http"; | |
| import { SharedArray } from 'k6/data'; | |
| export const options = { | |
| scenarios: { | |
| warmup: { | |
| executor: 'ramping-arrival-rate', | |
| preAllocatedVUs: 200, | |
| timeUnit: '1s', | |
| startRate: 0, |
This file contains hidden or 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 http from "k6/http"; | |
| import { SharedArray } from 'k6/data'; | |
| export const options = { | |
| scenarios: { | |
| warmup: { | |
| executor: 'ramping-arrival-rate', | |
| preAllocatedVUs: 200, | |
| timeUnit: '1s', | |
| startRate: 0, |
OlderNewer