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
# -*- coding:utf-8 -*- | |
""" | |
Convert https://raw.githubusercontent.com/petronny/gfwlist2pac/master/gfwlist.pac for unbound. | |
""" | |
import re | |
with open("gfwlist.conf", 'w') as wp: | |
for line in open("gfwlist.pac"): |
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
@ECHO OFF & CD/D "%~dp0" | |
::save as CRLF/ANSI format | |
::usage: drag ONNX model to .bat to start processing | |
:start | |
IF "%~1"=="" GOTO :END | |
:proc | |
python -m onnxsim "%~nx1" "%~nx1.sim.onnx" |
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 onnx | |
import onnxoptimizer as optimizer | |
onnxfile = 'ONNX_FILE_NAME' | |
onnx_model = onnx.load(f'{onnxfile}.onnx') | |
inputs = onnx_model.graph.input | |
name_to_input = {} | |
for input in inputs: | |
name_to_input[input.name] = input |
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
/* | |
* Arduino interface for the use of WS2812 strip LEDs | |
* Uses Adalight protocol and is compatible with Boblight, Prismatik etc... | |
* "Magic Word" for synchronisation is 'Ada' followed by LED High, Low and Checksum | |
* @author: Wifsimster <wifsimster@gmail.com> | |
* @library: FastLED v3.001 | |
* @date: 11/22/2015 | |
*/ | |
#include <FastLED.h> | |
#define NUM_LEDS 50 // 设置灯珠总数(貌似不能超过 400 个 |
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 os | |
import shutil | |
from PIL import Image | |
def check_size(image_a, image_b): | |
global i_size | |
w_a, h_a = Image.open(image_a).size | |
w_b, h_b = Image.open(image_b).size | |
if w_a == w_b and h_a == h_b: |
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 os | |
import re | |
import json | |
import urllib | |
import requests | |
import wget | |
from tqdm import tqdm | |
from bs4 import BeautifulSoup | |
# 执行推理用 | |
import numpy as np |
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
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
# Author: Sg4Dylan -- <sg4dylan#gmail.com> | |
# Licence: GPLv3 | |
import requests | |
import re | |
import json | |
import time |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// ==UserScript== | |
// @name GoHFS-Exporter | |
// @namespace http://tampermonkey.net/ | |
// @version 2020.10.18(0.1) | |
// @description Export link from Go HFS to aria2 | |
// @author SgDylan | |
// @match https://example.com/* | |
// ==/UserScript== | |
let downloadFileUrl = []; |