- 네이버 블로그 본문은 `` 태그 내부에서 렌더링됨
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 successes<T>(xs: PromiseSettledResult<T>[]): T[] { | |
| return xs | |
| .filter((x): x is PromiseFulfilledResult<T> => x.status === "fulfilled") | |
| .map((x) => x.value) | |
| } |
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
| { | |
| "editor.tabSize": 2, | |
| "editor.indentSize": "tabSize", | |
| "editor.detectIndentation": false, | |
| "editor.formatOnSave": true, | |
| "editor.formatOnPaste": true, | |
| "[c][cpp]": { | |
| "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd" | |
| }, | |
| "[log]": { |
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
| type PluginName = `${string}/${string}` | |
| type Year = `${number}${number}${number}${number}` | |
| /** An array of glob patterns indicating the files that the configuration object should apply to. If not specified, the configuration object applies to all files matched by any other configuration object. */ | |
| type Files = string[] | |
| /** An array of glob patterns indicating the files that the configuration object should not apply to. If not specified, the configuration object applies to all files matched by {@link Files}. */ | |
| type Ignores = string[] | |
| /** An object containing settings related to how JavaScript is configured for linting. */ |
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
| export const TIME1 = { | |
| MILLISECOND: 1, | |
| SECOND: 1000, | |
| MINUTE: 1000 * 60, | |
| HOUR: 1000 * 60 * 60, | |
| DAY: 1000 * 60 * 60 * 24, | |
| WEEK: 1000 * 60 * 60 * 24 * 7, | |
| MONTH: 1000 * 60 * 60 * 24 * 30, | |
| YEAR: 1000 * 60 * 60 * 24 * 365, | |
| } |
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
| // ==UserScript== | |
| // @name NamuSettings | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1.0 | |
| // @description unfold footnotes by default and also other opinionated defaults (overwriteable) | |
| // @author scarf005 | |
| // @match https://namu.wiki/w/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=namu.wiki | |
| // @grant none | |
| // ==/UserScript== |
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 concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor | |
| def split_ranges(n: int, tasks: int) -> list[range]: | |
| "create list of ranges split evenly using number of jobs" | |
| return [range(i, i + n // tasks) for i in range(0, n, n // tasks)] | |
| def math_sum(n: int, _: int | None = None) -> int: |
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 datetime | |
| from datetime import datetime as Datetime | |
| # Get current date and time in local time zone | |
| current_time = datetime.datetime.now() | |
| # Format the date in ISO 8601 format | |
| iso_date = current_time.isoformat() | |
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 { map, pipe } from 'npm:iter-ops' | |
| type Card = { DESCRIPTION: string; UPGRADE_DESCRIPTION?: string } | |
| type Localization<T> = { [key: string]: T } | |
| type Cards = Localization<Card> | |
| const begin = '소멸. NL ' | |
| const end = ' NL 소멸.' | |
| const converter = (s: string) => s.startsWith(begin) ? s.replace(begin, '') + end : s |