Skip to content

Instantly share code, notes, and snippets.

View wxupjack's full-sized avatar
👍
我们遇到什么困难也不要怕。微笑着面对它,消除恐惧最好的办法,就是面对恐惧。坚持才是胜利,加油

Richard wxupjack

👍
我们遇到什么困难也不要怕。微笑着面对它,消除恐惧最好的办法,就是面对恐惧。坚持才是胜利,加油
View GitHub Profile
@wxupjack
wxupjack / ifGrayImg.py
Created September 29, 2020 09:35
determine whether the photo of surveillance camera is grayscale
'''
Some surveillance camera has 2 modes, RGB and Infrared. However,
the some frames under infrared mode is not completely "gray", they
are still 3 channels and value of three channels are not equal.
This function accepts image read by opencv(3-d numpy.ndarray), and
method ('rgb' or 'hsv'). 'rgb': consider 'gray' means r==g==b of
one pixel, smaller difference means geayer. 'hsv': consider gray
image is almost black in saturation channel.
'''
import cv2
// ==UserScript==
// @name B站学习机 | Bilibili+Youtube字幕全文阅读 | coursera-like subtitles fulltext reader
// @namespace https://gist.github.com/KnIfER/9e43ffa31c3b9831a500edf35595c1dc
// @version 4
// @description 在线字幕阅读或下载,B站油管秒变cousera! - Read & learn subtitles full text online!
// @author KnIfER
// @match https://*.bilibili.com/video/*
// @match https://*.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=bilibili.com
// @license MIT
@wxupjack
wxupjack / B站学习机.user.js
Last active June 5, 2023 11:20 — forked from KnIfER/B站学习机.user.js
[fix] 修复了b站更新api后无法使用等bug
// ==UserScript==
// @name B站学习机 | Bilibili+Youtube字幕全文阅读 | coursera-like subtitles fulltext reader
// @namespace https://gist.github.com/KnIfER/9e43ffa31c3b9831a500edf35595c1dc
// @version 4
// @description 在线字幕阅读或下载,B站油管秒变cousera! - Read & learn subtitles full text online!
// @author KnIfER
// @match https://*.bilibili.com/video/*
// @match https://*.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=bilibili.com
// @license MIT