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
const UNITS = [ | |
"bytes", | |
"KB", | |
"MB", | |
"GB", | |
"TB", | |
]; | |
export function formatBytes(bytes: number) { | |
const index = Math.min(Math.floor(Math.log10(bytes) / 3), UNITS.length - 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
function *chunk(array: any[], size: number) { | |
let from = 0; | |
while (from < array.length) { | |
const subarray = array.slice(from, from+size); | |
yield subarray; | |
from += size; | |
} | |
} |
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
async function sleep(msec: number) { | |
return new Promise(resolve => setTimeout(resolve, msec)); | |
} |
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 queue | |
import random | |
import time | |
from concurrent.futures import ThreadPoolExecutor, Executor, Future | |
from contextlib import contextmanager | |
from threading import Thread | |
from tqdm import tqdm | |
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
server { | |
listen 8081 default; | |
server_name localhost 127.0.0.1; | |
location /api/v1/ { | |
proxy_pass http://localhost:8082/; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 8 columns, instead of 2 in line 9.
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
year calendar_id title url category participants_count likes_count subscribers_count | |
2017 haskell5 Haskell (その5) Advent Calendar 2017 https://qiita.com/advent-calendar/2017/haskell5 Programming Langs 5 23 0 | |
2017 vivaldi Vivaldiブラウザー Advent Calendar 2017 https://qiita.com/advent-calendar/2017/vivaldi Web Technologies 1 3 0 | |
2017 yaruki やる気 Advent Calendar 2017 https://qiita.com/advent-calendar/2017/yaruki Miscellaneous 1 0 1 | |
2017 acquisition 買収 Advent Calendar 2017 https://qiita.com/advent-calendar/2017/acquisition Company 5 0 6 | |
2017 power_builder PowerBuilder Advent Calendar 2017 https://qiita.com/advent-calendar/2017/power_builder Programming Langs 1 0 3 | |
2017 enterprise Enterprise Advent Calendar 2017 https://qiita.com/advent-calendar/2017/enterprise Programming Langs 1 0 2 | |
2017 keyboard_mouth キーボードとマウスとコーヒーと Advent Calendar 2017 https://qiita.com/advent-calendar/2017/keyboard_mouth Miscellaneous 7 15 11 | |
2017 bpm bpm Advent Calendar 2017 https://qiita.com/advent-calendar/2017/bpm Services 1 0 1 | |
2017 techscore |
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
hoge |
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
@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off | |
:: ---------------------- | |
:: KUDU Deployment Script | |
:: Version: 1.0.15 | |
:: ---------------------- | |
:: Prerequisites | |
:: ------------- |
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 | |
import sys | |
import time | |
from glob import glob | |
from importlib import import_module, reload | |
from watchdog.events import FileSystemEventHandler, FileSystemEvent | |
from watchdog.observers import Observer | |
sys.path.append('plugins') |
NewerOlder