Skip to content

Instantly share code, notes, and snippets.

View githubhy's full-sized avatar
💭
I may be slow to respond.

Asher githubhy

💭
I may be slow to respond.
View GitHub Profile
@githubhy
githubhy / gist:179559994119a43d2b17129c3817153e
Last active May 4, 2022 10:13
Regular expression for Chinese characters
perl: /[^u4E00-u9FA5]/
js: match(/[\u4E00-\u9FA5]/)
Example:
use `<([^u4E00-u9FA5]*<[^u4E00-u9FA5]+>[^u4E00-u9FA5]*)*>` to match `<封爵 河津亭侯→安國鄉侯→向鄉侯→舞陽侯→晉王<追尊>→晉帝<追尊>>`
@githubhy
githubhy / convolutional_code.py
Created May 21, 2024 10:15 — forked from YairMZ/convolutional_code.py
Example implementation of non-recursive convolutional code
import math
class DecodingError(Exception):
"""Raised if no path ends in the zero state"""
pass
class TrellisPath:
def __init__(self, last_state=0):
@githubhy
githubhy / levin.m
Created August 2, 2024 12:47 — forked from mattdsp/levin.m
Least squares FIR digital filter design with prescribed magnitude AND phase response using Levinson's algorithm
function x = levin(a,b)
% function x = levin(a,b)
% solves system of complex linear equations toeplitz(a)*x=b
% using Levinson's algorithm
% a ... first row of positive definite Hermitian Toeplitz matrix
% b ... right hand side vector
%
% Author: Mathias C. Lang, Vienna University of Technology, AUSTRIA
% 1997-09
% [email protected]
@githubhy
githubhy / cask-update.md
Created August 22, 2024 01:23 — forked from yanaokahiroki/cask-update.md
homebrew caskを更新

概要

brew install <formula名> --cask でインストールしたアプリケーションを最新バーションに更新する方法がわからなかったのでメモ。

下のコマンドを知るまでは各アプリケーションを起動してそれぞれをそれぞれの方法で更新していた。

コマンド

更新コマンド