Skip to content

Instantly share code, notes, and snippets.

View hustbill's full-sized avatar

Hua Zhang hustbill

  • Redmond, 98052
View GitHub Profile
@hustbill
hustbill / fetch_story_sections.py
Last active September 24, 2020 16:45
Python crawler - fetch the story sections from website
#coding=utf-8
import urllib
import re
import os
import glob
import urllib.request
from urllib.parse import urljoin
from urllib.parse import urlparse
主要功能
视频翻译
上传视频文件,AI自动生成中英双语字幕
视频转写
上传视频文件,一键快速生成视频字幕
字幕翻译
上传生肉字幕,智能制作熟肉文件
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@hustbill
hustbill / findMedianSortedArrays
Created April 10, 2015 07:42
find Median of Two Sorted Arrays
public class Solution {
/*
The solution use the find Kth element in the sorted two arrays. We compare the ith element in A and jth element in B, where i+j = k-1.
A[i]> A[j], both right part of A and left part of B should be discarded.
A[i]< A[j], both left part of A and right part of B should be discarded.
*/
public double findMedianSortedArrays(int A[], int B[]) {
int m = A.length;
int n = B.length;