Skip to content

Instantly share code, notes, and snippets.

View t-nissie's full-sized avatar

Takeshi Nishimatsu t-nissie

View GitHub Profile
@t-nissie
t-nissie / 00Iwanami.md
Last active January 2, 2025 21:31
『岩波数学公式I』の例の数値積分をJuliaのQuadGKパッケージを使って精度保証する

『岩波数学公式I』の例の数値積分をJuliaのQuadGKパッケージを使って精度保証する

2023年12月25日にJulia v1.10.0がリリースされました。おめでとうございます。

ちょうどJulia Advent Calendar 2023 https://qiita.com/advent-calendar/2023/julia に 積分のパッケージの紹介 https://zenn.dev/ohno/articles/440234fbb2adec がありました。

そのうちの一つ、QuadGKパッケージ https://juliamath.github.io/QuadGK.jl/stable/ を使って 『岩波数学公式I』のp.240の例の数値積分を精度保証しようとおもいます。 永らくゼロだとされ、1988年に訂正され、2018年にTwitterで少し話題になっていた積分です。

@t-nissie
t-nissie / 24BYJ28.md
Last active March 19, 2024 23:02
mount a 24BYJ28 stepper motor in Sherpa Micro Extruder

Sherpa Micro Extruder with 24BYJ28 stepper motor

Source of this document can be found in https://gist.github.com/t-nissie/b7ce633e8dfc24a7a87068b11062bfc9 .

Mount a cheap 24BYJ28 stepper motor in Sherpa Micro Extruder. 24BYJ28 with a small gear can be found in EasyThreeD printers, i.e. X3, K7, etc.

EasyThreeDの3Dプリンターに入っている ステッピングモーター (stepper motor) 24BYJ28 を

@t-nissie
t-nissie / 00EasythreedX3Klipper.md
Last active July 25, 2023 08:31
3DプリンターEasythreed X3にクリッパーをインストールした記録

3DプリンターEasythreed X3にKlipperをインストールした記録

3DプリンターEasyThreed X3の中古品にKlipperをインストールした記録。 X3のマザーボードのET4000+はRobin Liteの互換品と思われる。

この文章のオリジナルは https://gist.github.com/t-nissie/016d3d4c93b91c6c666c38aa6cf560d1 にある。

Klipper, Moonraker, Mainsailの詳細については解説していない。 それらについては https://gist.github.com/t-nissie/9256acaf29cc901fa1504d7ace79a2e3 が参考になるかもしれない。

@t-nissie
t-nissie / 00FujitsuArrowsTabQ508Ubuntu22.04LTS.md
Last active March 30, 2025 15:44
FUJITSU ARROWS Tab Q508/SEにUbuntu 22.04 LTS 日本語 RemixをインストールしてAnet ET4+をKlipperで制御

FUJITSU ARROWS Tab Q508/SEにUbuntu 22.04 LTS 日本語 Remixをインストールして3DプリンターをKlipperで制御

Atom x7-Z8700 1.6GHz/RAM:4GB/SSD:128GB/10.1インチなタブレットPC FUJITSU ARROWS Tab Q508/SE に Ubuntu 22.04 LTS 日本語 Remix という GNU/Linux をインストールして Klipper, Moonraker, Mainsailをインストールして 3DプリンターAnet ET4+を制御した記録。 2024年9月に 24.04 LTS でも動くことを確認したので、更新。 完全無保証

@t-nissie
t-nissie / 00DaisoWinder.md
Last active April 25, 2024 23:15
ミシン糸ワインダーの作り方

ミシン糸ワインダーの作り方

ロックミシン用にミシン糸を小分けにするなど 糸巻き(ボビン、スプール)に糸を均等に巻きつけたくなることがあります。 この文章はそんなときに便利なミシン糸ワインダーの作り方を解説しています。

この文章は https://gist.github.com/t-nissie/fbd639bcd427e46c7fdfc1529023d521 に置いてあります。

topview

umask 002 と UPG と 共有ディレクトリで共有gitレポジトリ

書きかけ

概要

各ユーザごとのUser private group (UPG) がプライマリユーザグループになっていればumask 002でかまわない。 umask 022とかumask 077にしがちな古参UNIXユーザは改心が必要。

デフォルト

@t-nissie
t-nissie / lifesaver.ino
Last active February 15, 2021 09:17
lifesaver.ino pushes a button every 22 minutes 22 seconds with an Arduino Nano and a servomotor
// lifesaver.ino
// Author: Takeshi Nishimatsu License: GPL-3.0-only
// Description: You may occasionally encounter situations in which you must push a
// button every 22 minutes 22 seconds, or you die. This lifesaver.ino saves your
// life by pushing a button automatically with an Arduino board and a servomotor.
// Wiring: To plug an SG90 servomotor to 6-4-2 pins of the ICSP connector on an
// Arduino board, the order of wires from the servomotor should be changed
// from GND(brown)-5V(red)-PWM(orange) to GND(brown)-PWM(orange)-5V(red).
// SG90 micro servomotor: http://akizukidenshi.com/download/ds/towerpro/SG90_a.pdf
// Seeed Grove 4-Digit Display: https://wiki.seeedstudio.com/Grove-4-Digit_Display/
@t-nissie
t-nissie / csvcxx.cpp
Last active May 8, 2020 07:23
コマンドライン引数に与えられた数組のコンマで区切られた整数 (csv) を読み取るプログラムをC++11, Fortran, Rubyで
// csvcxx.cpp
////
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
int main(int argc, char **argv)
{
for (int i=1;i<argc;++i) {
@t-nissie
t-nissie / 00BODICE.md
Last active October 17, 2020 03:52
文化式成人女子原型 | nbbbp.eps | New Bunka Basic Bodice Pattern | Bunka Sloper | 日本新文化式女装原型 | Pola Dasar Badan Wanita Bunka Baru

文化式成人女子原型 | nbbbp.eps | New Bunka Basic Bodice Pattern | Bunka Sloper | 日本新文化式女装原型 | Pola Dasar Badan Wanita Bunka Baru

文化式成人女子原型をPostScript言語で描きます

Drafting New Bunka Basic Bodice Pattern in PostScript language

nbbp

使い方

@t-nissie
t-nissie / 00CXXThreadSafeRNG.md
Last active February 2, 2022 07:42
C++11のthread safeな乱数生成器 (random number generator; RNG) のOpenMPでの使い方

C++11のthread safeな乱数生成器 (random number generator; RNG) のOpenMPでの使い方

C++11の乱数生成器 (random number generator; RNG) である<random>はとてもよくできている。 single threadで動くプログラムなら自作の珍妙なラッパを介さず直接使うべき。 thread safeなのでOpenMPからも使うことができる。 高速にかつ2カ所以上でRNGを使うことを前提にして、 ここgistに自作の珍妙なラッパを公開してみる。

指針

thread数ぶん作った乱数生成エンジンを2カ所 (main.cpp と timing.h) で使う。