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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
import "@openzeppelin/[email protected]/token/ERC20/ERC20.sol"; | |
import "@openzeppelin/[email protected]/access/Ownable.sol"; | |
import "@openzeppelin/[email protected]/utils/math/SafeMath.sol"; | |
contract Etiquette is ERC20, Ownable { | |
using SafeMath for uint256; |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
import "@openzeppelin/[email protected]/token/ERC20/ERC20.sol"; | |
import "@openzeppelin/[email protected]/access/Ownable.sol"; | |
import "@openzeppelin/[email protected]/utils/math/SafeMath.sol"; | |
contract Etiquette is ERC20, Ownable { | |
using SafeMath for uint256; |
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 asyncio | |
import time | |
async def async_wrapper(func): | |
loop = asyncio.get_event_loop() | |
return await loop.run_in_executor(None, func) | |
found = False | |
def consumer(): |
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
// useState 사용 | |
const [[diagram, feature, warning, vitalState], setDogInfo] = useState([ | |
"강아지 다이어그램", | |
"강아지 특징", | |
"강아지 주의사항", | |
"Vital State", | |
]); | |
// setDogInfo 사용 | |
// feature를 업데이트 한다고 하면.. |
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 requests | |
from pyquery import PyQuery as PQ | |
from urllib.request import urlretrieve | |
from urllib.parse import quote, unquote | |
import imagehash | |
from PIL import Image | |
import os | |
UA = r"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36" |
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 requests | |
from pyquery import PyQuery as PQ | |
import re | |
import random | |
import csv | |
max_length = 100 | |
url = r'https://namu.wiki/w/%EB%B6%84%EB%A5%98:%EC%83%9D%EC%84%A0' | |
appendix = ['', '?namespace=문서&cfrom=붉돔'] | |
filename = 'result.csv' |
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
prev_dir=$(pwd) | |
mkdir -p install | |
cd install | |
wget https://gist.githubusercontent.com/DPS0340/1fff66d8a34c2d1b97e22a0b29fae169/raw/3c792d12a317836389f72c0690e068d5ad0c66db/install.sh | |
chmod +x install.sh | |
echo "PATH=$(pwd):\$PATH" >> ~/.bashrc | |
source ~/.bashrc | |
cd $prev_dir |
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
# segment tree library | |
# MIT License, 2021 jiho lee | |
class SegTree: | |
def __init__(self, original: list, n: int) -> None: | |
len_original = len(original) | |
self.tree = [0 for i in range(len_original * 4)] | |
# it uses reference | |
self.original = original | |
self.init(1, 0, n) |
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
s = ''' | |
def convert(k): | |
res = [] | |
while k: | |
rem = k % 36 | |
if rem >= 10: | |
rem = chr((rem - 10) + ord('a')) | |
else: | |
rem = chr(rem + ord('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
Python 3 hrs 14 mins ███████░░░░░░░░░░░░░░ 33.9% | |
Other 2 hrs 21 mins █████▏░░░░░░░░░░░░░░░ 24.6% | |
Text 1 hr 6 mins ██▍░░░░░░░░░░░░░░░░░░ 11.7% | |
Java 1 hr 4 mins ██▎░░░░░░░░░░░░░░░░░░ 11.2% | |
YAML 40 mins █▍░░░░░░░░░░░░░░░░░░░ 7.1% |