Skip to content

Instantly share code, notes, and snippets.

View palindrom615's full-sized avatar

Whoemoon Jang palindrom615

View GitHub Profile
@palindrom615
palindrom615 / download.py
Created April 26, 2022 13:40
Concurrent dowload in python
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 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")
@palindrom615
palindrom615 / .gitignore
Last active May 1, 2020 18:44
script downloading naver × dispatch photos
.vscode
img
.DS_Store
@palindrom615
palindrom615 / evernoteParser.go
Created January 24, 2019 05:30
personal go script for extracting urls from evernote scraps
package main
import (
"encoding/xml"
"fmt"
"io/ioutil"
"os"
"strings"
)
@palindrom615
palindrom615 / unique_ptr.cpp
Last active May 25, 2018 03:55
unique_ptr의 문제점 번역
// 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