Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
# MIT License
# Copyright (C) 2024 by Akira TAMAMORI
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
;; 起動時間をメッセージバッファに表示
(add-hook 'after-init-hook
(lambda ()
(message "init time: %.3f sec"
(float-time (time-subtract after-init-time before-init-time)))))
;; ロードパスの設定
(add-to-list 'load-path "~/.emacs.d/lisp/")
;; C-zを無効化
# -*- coding: utf-8 -*-
"""マイク音声入力によるストリーミング音声認識(発話区間検出付き)via VOSK.
Copyright (C) 2022 by Akira TAMAMORI
Copyright (C) 2022 by Koji INOUE
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
;; C-zを無効化
(global-unset-key "\C-z")
;; ロードパスを追加
(add-to-list 'load-path "~/.emacs.d/lisp/")
;; theme
(if (display-graphic-p)
(load-theme 'solarized-light t))
;; (load-theme 'solarized-light t)
@tam17aki
tam17aki / init-auctex2.el
Last active January 9, 2024 08:28
Setting for AUCTeX
(eval-when-compile
(require 'latex-math-preview nil t)
(require 'reftex nil t)
(require 'tex nil t)
(require 'tex-jp nil t)
(require 'preview nil t))
(eval-when-compile (setq byte-compile-warnings '(cl-functions)))
;; https://mytexpert.osdn.jp/index.php?Emacs/AUCTeX#fd84843a
@tam17aki
tam17aki / consult-selected.el
Last active January 8, 2024 03:37
A consult extension for selected.el
;;; consult-selected.el --- Consult extension for selected.el -*- lexical-binding: t; -*-
;; Copyright (C) 2022 ballforest
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
@tam17aki
tam17aki / gla.py
Last active December 27, 2023 07:15
Estimation of phase spectrum based on the Griffin-Lim algorithm.
"""Griffin-Lim algorithm.
Copyright (C) 2023 by Akira Tamamori
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@tam17aki
tam17aki / YaGLU.py
Last active December 25, 2023 07:17
# -*- coding: utf-8 -*-
"""A wrapper for PyTorch GLU (Gate Linear Unit).
Copyright (C) 2023 by Akira Tamamori
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@tam17aki
tam17aki / mhd_demo_many_datasets.ipynb
Last active December 16, 2023 14:54
mhd_demo_many_datasets.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tam17aki
tam17aki / gmhd_demo_many_datasets.ipynb
Last active December 16, 2023 14:51
Generalized Mahalanobis depth in the reproducing kernel Hilbert space (GMHD) in Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.