Skip to content

Instantly share code, notes, and snippets.

View woshichuanqilz's full-sized avatar
😃
热爱生命

Ori woshichuanqilz

😃
热爱生命
View GitHub Profile
@woshichuanqilz
woshichuanqilz / hand-written-svg-text-animation.markdown
Created November 24, 2022 09:39
Hand written SVG text animation

Hand written SVG text animation

A little hand written text animation made with anime.js. The masking is a little rough but you get the idea :P.

A Pen by Matthew Ellis on CodePen.

License.

@woshichuanqilz
woshichuanqilz / getContent.py
Created July 2, 2024 21:54
get text content from html
import os
import re
from bs4 import BeautifulSoup
from multiprocessing import Pool
def extract_html_content(file_path):
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
soup = BeautifulSoup(content, 'html.parser')
main_content = soup.get_text()
#!/usr/bin/python
import sqlite3
import shutil
from datetime import datetime, timedelta
import os
# Function to convert a Python datetime to Chrome timestamp format
def datetime_to_chrome_timestamp(dt):
chrome_epoch = datetime(1601, 1, 1)
return int((dt - chrome_epoch).total_seconds() * 1000000)
#!/bin/bash
# file content should be
#key:value1
#key:value2
# Read the key-value pairs from the file
data=$(cat file.txt)
# Search for a key using fzf
selected_key=$(echo "$data" | awk -F ':' '{print $1}' | fzf)
import whisper
model = whisper.load_model('small', 'cpu')
# model = whisper.load_model("base")
result = model.transcribe("output.wav")
print(result["text"])
#!/bin/bash
# 检查是否提供了文件名
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <filename>"
exit 1
fi
filename=$1
@woshichuanqilz
woshichuanqilz / DeleteGiteeRepoInBatch.py
Last active August 2, 2024 20:48
DeleteGiteeRepoInBatch.py
import requests
import datetime
import threading
access_token = "xxxx"
def check_latest_commit_date(item_list):
# 获取当前日期
current_date = datetime.datetime.now(datetime.timezone.utc)
id aliases tags
SqlitePythonCountChrome
# -*- coding: utf-8 -*-  
import datetime  
import sqlite3 
@woshichuanqilz
woshichuanqilz / python PDF to image.md
Created August 13, 2024 19:10
python pdf 2 image