Skip to content

Instantly share code, notes, and snippets.

View virus-warnning's full-sized avatar

Raymond Wu virus-warnning

View GitHub Profile
@virus-warnning
virus-warnning / coolpc_gpu.py
Created April 29, 2020 09:41
原價屋顯卡報價監測
import os
import re
import sys
import hashlib
import time
import locale
import requests
from bs4 import BeautifulSoup
@virus-warnning
virus-warnning / ubuntu20+wine.txt
Created May 12, 2020 06:47
Ubuntu 20 容器安裝 Wine Stable
FROM ubuntu:20.04
# 先把套件庫切換到國網中心加速
RUN sed -i 's/\(archive\|security\).ubuntu.com/free.nchc.org.tw/' /etc/apt/sources.list && \
dpkg --add-architecture i386 && \
apt-get update
# 搞定時區問題
# 如果沒處理, 安裝 software-properties-common 可能會弄爛
RUN export DEBIAN_FRONTEND=noninteractive && \
@virus-warnning
virus-warnning / rwqueue.py
Created June 18, 2021 18:59
測試 asyncio.Queue 的效率與 CPU 佔用邏輯
'''
I/O test for asyncio.Queue
QSIZE = 300000
QFILL = 300000
FORCE_SWITCH = False
enqueue(): Put 100000 items.
enqueue(): Put 200000 items.
enqueue(): Put 300000 items.