Skip to content

Instantly share code, notes, and snippets.

View 2minchul's full-sized avatar
😀

Colin (MinChul Lee) 2minchul

😀
View GitHub Profile
@2minchul
2minchul / pdf_convert.py
Created October 17, 2023 07:13
html to pdf converter streamlit example
import pdfkit
import streamlit as st
# Streamlit 애플리케이션 설정
st.set_page_config(page_title="HTML to PDF Converter", page_icon="📄")
st.title("HTML to PDF 변환기")
# HTML 파일 업로드
uploaded_file = st.file_uploader("변환할 HTML 파일을 업로드하세요", type="html")
We can't make this file beautiful and searchable because it's too large.
subject
[PATCH v4 18/18] btrfs: only set QUOTA_ENABLED when done reading qgroups
[PATCH v4 17/18] btrfs: track data relocation with simple quota
[PATCH v4 16/18] btrfs: track metadata relocation cow with simple quota
[PATCH v4 15/18] btrfs: check generation when recording simple quota delta
[PATCH v4 14/18] btrfs: simple quota auto hierarchy for nested subvols
[PATCH v4 13/18] btrfs: record simple quota deltas
[PATCH v4 12/18] btrfs: inline owner ref lookup helper
[PATCH v4 11/18] btrfs: new inline ref storing owning subvol of data extents
[PATCH v4 10/18] btrfs: track original extent owner in head_ref
tls:tls_device_offload_set
tls:tls_device_decrypted
tls:tls_device_rx_resync_send
tls:tls_device_rx_resync_nh_schedule
tls:tls_device_rx_resync_nh_delay
tls:tls_device_tx_resync_req
tls:tls_device_tx_resync_send
mac80211:drv_return_void
mac80211:drv_return_int
mac80211:drv_return_bool
@2minchul
2minchul / example.py
Created March 17, 2023 16:00
Kakao 우편번호 서비스 for python
from concurrent.futures import ThreadPoolExecutor, as_completed
from typing import Optional, List, Tuple, Dict
import requests
from bs4 import BeautifulSoup
def search_many_postcode(queries: List[Tuple[str, str]]) -> Dict[tuple, Optional[dict]]:
"""
:param queries: list of tuple(keyword, zipcode)
@2minchul
2minchul / gcp_poxy.go
Created December 5, 2022 09:08
Use http proxy in golang gcs package
package main
import (
"context"
"crypto/tls"
"io"
"net/http"
"net/url"
"cloud.google.com/go/storage"
@2minchul
2minchul / average.py
Created July 14, 2022 12:28
Get RGB average of PIL image
from PIL import Image
def get_rgb_average(img: Image) -> tuple:
histogram = img.histogram()
r = max(range(256), key=lambda x: histogram[x])
g = max(range(256), key=lambda x: histogram[256 + x])
b = max(range(256), key=lambda x: histogram[512 + x])
return r, g, b
@2minchul
2minchul / main.go
Last active April 5, 2022 10:13
Golang TCP server
package main
import (
"encoding/hex"
"errors"
"flag"
"fmt"
"io"
"log"
"net"
@2minchul
2minchul / update_trackers.py
Last active November 20, 2021 17:42
Update qBittorrent tracker list from url
import json
import os
import requests
trackers_list_url = 'https://newtrackon.com/api/stable'
qbt_host = 'http://localhost:8081'
custom_trackers = '''
http://open.acgnxtracker.com:80/announce
@2minchul
2minchul / ndjson_to_csv.py
Created September 5, 2021 12:27
ndjson to csv. recommend pypy3
import csv
import json
import sys
import os.path
import tqdm
def main() -> int:
if len(sys.argv) == 2:
in_filename = sys.argv[1]
@2minchul
2minchul / csv_to_ndjson.go
Created September 5, 2021 12:04
csv_to_ndjson written in go
package main
import (
"bufio"
"encoding/csv"
"encoding/json"
"os"
)
func main() {