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
| void drawShifted( | |
| path g, | |
| pair trueshift, | |
| picture pic=currentpicture, | |
| Label label="", | |
| pen pen=currentpen, | |
| arrowbar arrow=None, | |
| arrowbar bar=None, | |
| margin margin=NoMargin, | |
| marker marker=nomarker |
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 Foundation | |
| final class FileIO { | |
| private let buffer:[UInt8] | |
| private var index: Int = 0 | |
| init(fileHandle: FileHandle = FileHandle.standardInput) { | |
| buffer = Array(try! fileHandle.readToEnd()!)+[UInt8(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 aiohttp | |
| import asyncio | |
| async def download(session, url, file): | |
| async with session.get(url) as res: | |
| with open(file, "wb") as f: | |
| f.write(await res.read()) |
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 dataclasses import dataclass | |
| @dataclass(frozen=True) | |
| class Var: | |
| name: str | |
| @dataclass(frozen=True) | |
| class 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
| struct Fix<T> { | |
| let x: (Fix<T>) -> T | |
| } | |
| func fix<T, U>(f: @escaping (@escaping (T) -> U) -> ((T) -> U)) -> (T) -> U { | |
| { _fix in | |
| f { (_fix.x(_fix))($0) } | |
| }( | |
| Fix { _fix in | |
| f { (_fix.x(_fix))($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
| type 'a fix = Fix of ('a fix -> 'a) | |
| let fix f = | |
| (fun (Fix x as fix) -> f (fun z -> x fix z)) | |
| (Fix (fun (Fix x as fix) -> f (fun z -> x fix z))) | |
| let factorial = fix @@ fun f n -> if n <= 0 then 1 else n * f (n - 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
| from bs4 import BeautifulSoup | |
| import re | |
| import requests | |
| import webbrowser | |
| registrationNumbers = [ | |
| "HHA000010715", | |
| "HHA000010711", | |
| "HHA000001827", |
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 | |
| # Check if qpdf is installed | |
| if ! command -v qpdf >/dev/null; then | |
| echo "qpdf not found. Please install qpdf and try again." | |
| exit 1 | |
| fi | |
| # Check if enough arguments are supplied | |
| if [ "$#" -lt 3 ]; then |
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 | |
| # Check if qpdf is installed | |
| if ! command -v qpdf >/dev/null; then | |
| echo "qpdf not found. Please install qpdf and try again." | |
| exit 1 | |
| fi | |
| # Check if enough arguments are supplied | |
| if [ "$#" -lt 3 ]; then |
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 | |
| name="$1" | |
| if [ -z "$name" ]; then | |
| echo "Usage: $0 <name>" | |
| exit 1 | |
| fi | |
| mkdir "$name" |