Skip to content

Instantly share code, notes, and snippets.

View leopku's full-sized avatar

Song Liu leopku

View GitHub Profile
@qinmenghua
qinmenghua / nianfo.py
Created November 1, 2018 14:03
TudouCode Demo in Python 3. 与佛论禅 Python 3 版 Demo(源码参见 https://github.com/lersh/TudouCode/ )。
# !/usr/bin/env python3
#
# nianfo.py - TudouCode Demo in Python 3
# Credit: https://github.com/lersh/TudouCode/
#
# Note:
#
# This is the first version('佛曰') of TudouCode('与佛论禅').
# The second version('如是我闻') needs compression and I can't debug.
#
@kumon
kumon / feture_extraction.py
Last active January 5, 2021 22:35
画像特徴空間の可視化 [TensorFlowでDeep Learning 19] ref: https://qiita.com/kumonkumon/items/ab56708eebc01077d0ee
import csv
import tensorflow as tf
import tensorflow_hub as hub
module = hub.Module("https://tfhub.dev/google/imagenet/mobilenet_v2_140_224/feature_vector/2")
height, width = hub.get_expected_image_size(module)
ch = 3
batch_size = 10
image_list = tf.convert_to_tensor(['images/img_{:04d}.jpg'.format(i+1) for i in range(2500)])
#!/bin/bash
clear
cat << EOF
################### 腾讯视频(MacOS)缓存文件合成脚本 ###################
Author: eightpigs <[email protected]>
Date: 2018-04-14
@uraimo
uraimo / dnsovertls.md
Last active June 2, 2025 03:20
Configure your Mac to use DNS over TLS
@steven2358
steven2358 / ffmpeg.md
Last active November 8, 2025 03:30
FFmpeg cheat sheet
/**
* 说明信息
* 1.目录结构:
* ├── avatar.jpg
* ├── qrcode.jpg
* ├── share-image.js
* ├── simhei.ttf
* └── template.jpg
* 2.备注:若出现资源路径异常时,则使用path.join(__dirname, "./simhei.ttf")的方式进行资源加载
* 3.示例:
const express = require('express');
const app = express();
const puppeteer = require('puppeteer');
const ua = require("useragent");
function isBot(userAgent) {
const agent = ua.is(userAgent);
return !agent.webkit && !agent.opera && !agent.ie &&
!agent.chrome && !agent.safari && !agent.mobile_safari &&
!agent.firefox && !agent.mozilla && !agent.android;
@nonwip
nonwip / ffmpeg.md
Last active May 22, 2025 00:17
Convert video files to MP4 through FFMPEG

This is my personal list of functions that I wrote for converting mov files to mp4!

Command Flags

Flag Options Description
-codec:a libfaac, libfdk_aac, libvorbis Audio Codec
-quality best, good, realtime Video Quality
-b:a 128k, 192k, 256k, 320k Audio Bitrate
-codec:v mpeg4, libx264, libvpx-vp9 Video Codec
@hscspring
hscspring / 结巴词性标记集
Last active October 24, 2025 15:55
结巴词性对照表
- a 形容词
- ad 副形词
- ag 形容词性语素
- an 名形词
- b 区别词
- c 连词
- d 副词
- df
- dg 副语素
- e 叹词
@ruanbekker
ruanbekker / cheatsheet-elasticsearch.md
Last active September 17, 2025 09:41
Elasticsearch Cheatsheet : Example API usage of using Elasticsearch with curl