Skip to content

Instantly share code, notes, and snippets.

Avatar

Takeshi Nishimatsu t-nissie

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

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 June 24, 2023 19:35
FUJITSU ARROWS Tab Q508/SEにUbuntu 22.04 LTS 日本語 RemixをインストールしてAnet ET4+をKlipperで制御
View 00FujitsuArrowsTabQ508Ubuntu22.04LTS.md
@t-nissie
t-nissie / 00DaisoWinder.md
Last active July 31, 2023 13:04
ミシン糸ワインダーの作り方
View 00DaisoWinder.md
View umask002_UPG_git.md
@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
View lifesaver.ino
// 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で
View csvcxx.cpp
// 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
View 00BODICE.md
@t-nissie
t-nissie / 00CXXThreadSafeRNG.md
Last active February 2, 2022 07:42
C++11のthread safeな乱数生成器 (random number generator; RNG) のOpenMPでの使い方
View 00CXXThreadSafeRNG.md

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) で使う。

@t-nissie
t-nissie / ch02_perceptron.ml
Last active March 28, 2018 21:52
ゼロからOCamlで作るDeep Learning
View ch02_perceptron.ml
(* perceptron : float -> float -> float -> float -> float -> float *)
(* description: perceptron with two inputs x1 and x2*)
let perceptron b w1 w2 x1 x2 = if b +. w1 *. x1 +. w2 *. x2 >= 0.0 then 1.0 else 0.0
let and_gate = perceptron ~-.0.7 0.5 0.5
let nand_gate = perceptron 0.7 ~-.0.5 ~-.0.5
let or_gate = perceptron ~-.0.5 1.0 1.0
let nor_gate = perceptron 0.5 ~-.1.0 ~-.1.0
let xor_gate x1 x2 = and_gate (nand_gate x1 x2) (or_gate x1 x2)
(* tests *)
@t-nissie
t-nissie / MacPortsFFTW.md
Last active February 12, 2018 10:30
MacPortsのmath/fftw-3のconfigureオプションに--enable-openmpを加えたい
View MacPortsFFTW.md

MacPortsのmath/fftw-3のconfigureオプションに--enable-openmpを加えたい

MacPortsのmath/fftw-3のconfigureオプションに--enable-openmpを加えたいが、 /usr/bin/clangが-fopenmpを受け付けてくれないので今のところうまくいかない。

手元 (local) でmath/fftw-3/Portfileを変更してみる

MacPortsで自家製portsを使う方法を参考に。

$ sudo emacs /opt/local/etc/macports/sources.conf   # add a line of "file:///Users/t-nissie/ports"

$ mkdir -p ~/ports/math/fftw-3/files