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
from enum import IntEnum | |
class Color(IntEnum): | |
Red = 1, | |
Yellow = 2, | |
Blue = 3, | |
def rule1(pile: list[Color]) -> bool: |
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
/** | |
* alphabet order | |
*/ | |
const alphabet = "abcdefghijklmnopqrstuvwxyz"; | |
const alphabetOrderMap = new Map([...alphabet].map((c, i) => [c, i])); | |
const orderAlphabetMap = new Map([...alphabet].map((c, i) => [i, c])); | |
/** | |
* utils | |
*/ |
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 | |
original = sys.argv[1] | |
dest = sys.argv[2] | |
txt = sys.stdin.read() | |
txt = txt.replace(original, dest) |
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
interface IBatterySize { | |
do(a: string, b: number): void; | |
} | |
class AA implements IBatterySize { | |
do(a: string, b: number) {} | |
} | |
class AAA implements IBatterySize { | |
do(a: string, b: number) {} |
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
FemaleVocals: | |
- Yanaginagi: | |
- Feel so good | |
- Chelly (EGOIST): | |
- Planetes | |
- Eiyuu unmei no uta | |
- All alone with you | |
- Zutomayo (Zuttomayonakadeiinoni) | |
- Kan saete kuyashiiwa | |
- Haze haseru haterumade |
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 { NavigationProp, useNavigation } from '@react-navigation/native'; | |
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; | |
import { | |
BackHandler, | |
AppState, | |
AppStateStatus, | |
Platform, | |
ToastAndroid, | |
} from 'react-native'; |
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 { useCallback, useEffect, useMemo, useState } from "react"; | |
import { useSearchParams } from "react-router-dom"; | |
export type UseSearchRes<QueryT, ResultT> = { | |
query: QueryT; | |
results: ResultT[] | null; | |
loadMore: () => Promise<boolean>; | |
navigateSearch: (query: Partial<QueryT>) => void; | |
isSearching: boolean; | |
canLoadMore: boolean; |
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 PaginationRes<T> = { | |
length: number | null; | |
partialData: T[] | null; | |
pageInd: number; | |
setPageInd: (pageInd: number) => void; | |
refreshData: () => void; | |
}; | |
function usePagination<T>( | |
getLength: () => Promise<number>, |
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 re | |
import sys | |
from PyPDF2 import PdfFileMerger | |
import re | |
def extractNum(string): | |
nums = re.findall("\d+", string) | |
if len(nums) == 0: | |
return 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
# Copyright (c) 2020-2021 Chanjung Kim (paxbun). All rights reserved. | |
# See Clang 10 documentation for more information. | |
BasedOnStyle: LLVM | |
AccessModifierOffset: -2 | |
AlignAfterOpenBracket: Align | |
AlignConsecutiveAssignments: true | |
AlignConsecutiveDeclarations: true | |
AlignConsecutiveMacros: true |
NewerOlder