This file contains 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 | |
from aiohttp import ClientSession | |
CONCURRENT_DOWNLOADS = 16 | |
semaphore = asyncio.Semaphore(CONCURRENT_DOWNLOADS) | |
def limit_concurrent(f): | |
async def wrapper(*args, **kwargs): | |
async with semaphore: |
This file contains 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
-- This script may be used with the auth-filter. Be sure to configure it as you wish. | |
-- | |
-- Requirements: | |
-- luaossl | |
-- <http://25thandclement.com/~william/projects/luaossl.html> | |
-- luaposix | |
-- <https://github.com/luaposix/luaposix> | |
-- | |
local sysstat = require("posix.sys.stat") | |
local unistd = require("posix.unistd") |
This file contains 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
.vscode | |
img | |
.DS_Store |
This file contains 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
package main | |
import ( | |
"encoding/xml" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"strings" | |
) |
This file contains 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
// C++ | |
int main() { | |
// std::unique_ptr<string> hoge(new string("hoge")); 와 같습니다. | |
// 타입을 두번 쓰는 것을 피하고, new 키워드를 없앨 수가 있습니다. | |
auto hoge = std::make_unique<std::string>("hoge"); | |
auto piyo = std::make_unique<std::string>("piyo"); | |
println(*hoge); // => hoge | |
println(*piyo); // => piyo | |
hoge = std::move(piyo); // 변수 piyo에 있는 포인터의 소유권은 변수 hoge로 이동. | |
println(*hoge); // => piyo |