Skip to content

Instantly share code, notes, and snippets.

@MasWag
MasWag / PKGBUILD
Last active January 11, 2024 05:06
PKGBUILD for Microsoft SEAL 4.1.1
# Maintainer: Masaki Waga <[email protected]>
# Maintainer: Alex J. Malozemoff <[email protected]>
# Maintainer: Benjamin Cheng <[email protected]>
pkgname=sealcrypto
pkgver=4.1.1
pkgrel=1
pkgdesc='Microsoft library for fully homomorphic encryption'
arch=('x86_64')
url="https://www.microsoft.com/en-us/research/group/cryptography-research/"
license=('MIT')
@MasWag
MasWag / build_exim4_deb_with_arc.sh
Last active January 5, 2024 08:58
Script to build Exim with ARC support in a Debian Docker container
#!/bin/bash -ue
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@MasWag
MasWag / multi_line_cases.saty
Created December 14, 2023 08:43
Question about \cases with multiple lines in SATySFi/azmath
@require: stdja
@require: azmath/azmath
document (|
author = {MasWag};
show-title = true;
show-toc = false;
title = {条件が複数行に渡る\code(`\cases`);};
|) '<
+p{
@MasWag
MasWag / bibyfi-name-issue.saty
Created November 18, 2023 03:46
Example showing a potential issue on author ordering in BiByFi
@require: stdjareport
@require: bibyfi/bibyfi
@require: bibyfi/bibyfi-IEEETran
let bibs = [
(`sawada2013multichannel`, Article(|
author= [`Hiroshi Sawada`;`Hirokazu Kameoka`;`Shoko Araki`;`Naonori Ueda`];
title = `Multichannel Extensions of Non-Negative Matrix Factorization With Complex-Valued Data`;
journal = `IEEE Transactions on Audio, Speech, and Language Processing`;
year = `2013`;
@MasWag
MasWag / water_boiler.tex
Created October 16, 2023 06:36
A PTA modeling a water boiler
\documentclass{standalone}
\usepackage{amssymb,amsmath}
\usepackage{tikz}
\usepackage{mathtools}
\usetikzlibrary{automata,positioning,matrix,shapes.callouts}
\tikzstyle{every node}=[initial text=]
%%% Color setting
\definecolor{coloract}{rgb}{0.50, 0.70, 0.30}
\definecolor{colorclock}{rgb}{0.4, 0.4, 1}
\definecolor{colorloc}{rgb}{0.4, 0.4, 0.65}
FROM --platform=linux/amd64 ubuntu:18.04
# ModelSim requires i386 support
RUN dpkg --add-architecture i386
# Install required packages
RUN apt-get update && \
apt-get install -y xserver-xorg x11-apps \
locales libglib2.0-0 libfreetype6 \
libsm6 libxrender1 libfontconfig1 libxext6 xinit \
@MasWag
MasWag / share.css
Last active August 20, 2023 13:58
Share buttons for Hugo based on https://aakira.app/blog/2018/08/share/
.sns_parent {
text-align: center;
}
.sns_section {
display: inline-block;
text-align: left;
}
.sns_button {
float: left;
Start learning of no-invariant TA
[2023-08-18 18:25:20.038941] [0x00007ff84b102640] [info] Target DTA
digraph G {
loc0 [init=true, match=false]
loc1 [init=false, match=true]
loc0->loc1 [label="b", guard="{x1 <= 20, x1 >= 20}", reset="{x0 := 0}"]
loc0->loc0 [label="a", guard="{x0 <= 3, x0 >= 3}", reset="{x0 := 0}"]
}
[2023-08-18 18:25:20.042653] [0x00007ff84b102640] [info] Complement of the target DTA
@MasWag
MasWag / dynamic-vs-lexical-binding.el
Created June 25, 2023 04:18
Brief example showing dynamic binding and lexical binding in Emacs Lisp
;;; Brief example showing dynamic binding and lexical binding in Emacs Lisp (Comments are in Japanese)
;;; Lines staring with ";>" show the output produced in the REPL.
;; lexical bindingを無効化してdynamic bindingを使う
(setq lexical-binding nil)
;> nil
(defun retcl (x)
(lambda () (+ x 1)))
;> retcl
@MasWag
MasWag / PKGBUILD
Created April 26, 2023 23:42
PKGBUILD for open-usp-tukubai
# Maintainer: Masaki Waga <[email protected]>
# Contributor: Tatsunori Aoki <[email protected]>
DLAGENTS='https::/usr/bin/curl --insecure -fLC - --retry 3 --retry-delay 3 -o %o %u'
pkgname=open-usp-tukubai
pkgver=20230322
pkgrel=1
pkgdesc="An open source version of shell commands usp Tukubai."
arch=('any')