Skip to content

Instantly share code, notes, and snippets.

@dlxj
dlxj / asr_fbank_mfcc.ipynb
Created November 15, 2024 00:07 — forked from murphypei/asr_fbank_mfcc.ipynb
ASR FBANK MFCC 特征提取
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dlxj
dlxj / Change CRLF to LF to all Files.md
Created October 25, 2024 03:45 — forked from tjsudarsan/Change CRLF to LF to all Files.md
Change End of Line Sequence from CRLF to LF to all files in the project for supporting ESLint

Converting the End of Line Sequence from CRLF to LF in any of your project files

Execute the following commands in your root of your project folder

NOTE: Do not do the following steps without commiting your data. As it clears all the git cache and it will clear all your changes in your project.

  1. First disable the autoCRLF in the git config by running the following command in your terminal git config core.autocrlf false

  2. Then remove the cached files in the git. Run the following command:

@dlxj
dlxj / gen_config.py
Created October 15, 2024 06:37 — forked from zombie110year/gen_config.py
解析 SSR 订阅链接,输出 shadowsocks-rust 的配置文件
import requests as r
from base64 import urlsafe_b64decode as b64decode
from typing import List, Optional
import json
订阅服务器 = "*"
def query(url: str) -> Optional[str]:
resp = r.get(url, timeout=30)
if resp.status_code == 200:
@dlxj
dlxj / DynamicMethodInvoker.cs
Created September 8, 2024 01:37 — forked from BYJRK/DynamicMethodInvoker.cs
Livet Handy Snippets
public static class DynamicMethodInvoker
{
public static void Invoke(object targetObject, string methodName)
{
if (targetObject == null)
throw new ArgumentNullException(nameof(targetObject));
if (methodName == null)
throw new ArgumentNullException(nameof(methodName));
var targetObjectType = targetObject.GetType();
@dlxj
dlxj / blob_conversions_util.js
Created July 18, 2024 09:30 — forked from Jonarod/blob_conversions_util.js
Javascript utility to convert Blob to Base64, ImageData or ObjectUrl back and forth. Tree shakeable and promise based.
const BlobToBase64 = function(blob){
let blobUrl = URL.createObjectURL(blob);
return new Promise((resolve, reject) => {
let img = new Image();
img.onload = () => resolve(img);
img.onerror = err => reject(err);
img.src = blobUrl;
}).then(img => {
URL.revokeObjectURL(blobUrl);
@dlxj
dlxj / iptv-to-hls.sh
Created March 27, 2024 07:06 — forked from drzax/iptv-to-hls.sh
IPTV to HTTP live streaming
#!/bin/bash
while true; do
currTime=`date +%Y%m%d%H%M`
if [ "$currTime" -ge 201507081658 -a "$currTime" -le 201507082300 ]; then
echo "$currTime: Stream should be on. Start ffmpeg if the process does not exist"
if [ "$(pidof ffmpeg)" ]; then
echo "$currTime: ffmpeg already running."
sleep 10
else
@dlxj
dlxj / m3u8-to-mp4.md
Created March 27, 2024 03:44 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@dlxj
dlxj / mamba-gpt.py
Created January 26, 2024 08:18 — forked from thistleknot/mamba-gpt.py
Mamba GPT
# -*- coding: utf-8 -*-
"""SimplerMambaSSM.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1g9qpeVcFa0ca0cnhmqusO4RZtQdh9umY
"""
#!pip install mamba-ssm causal-conv1d
@dlxj
dlxj / VideoNoteGist.py
Created January 19, 2024 09:13 — forked from sz1262011/VideoNoteGist.py
实现飞书妙记/十行笔记等软件类似功能
# !/usr/bin/env python3
# -*- coding: utf-8 -*
import streamlit as st
import re
import os
import jieba
from collections import Counter
import pyecharts.options as opts
from pyecharts.charts import WordCloud
@dlxj
dlxj / JapaneseRegex.js
Created July 24, 2023 09:15 — forked from ryanmcgrath/JapaneseRegex.js
Regex to test for presence of Japanese characters
// REFERENCE UNICODE TABLES:
// http://www.rikai.com/library/kanjitables/kanji_codes.unicode.shtml
// http://www.tamasoft.co.jp/en/general-info/unicode.html
//
// TEST EDITOR:
// http://www.gethifi.com/tools/regex
//
// UNICODE RANGE : DESCRIPTION
//
// 3000-303F : punctuation