Skip to content

Instantly share code, notes, and snippets.

View terasakisatoshi's full-sized avatar

Satoshi Terasaki terasakisatoshi

View GitHub Profile
@terasakisatoshi
terasakisatoshi / README.md
Created September 30, 2023 04:55
Lamp.jl/Images

Images used in Lamp.jl's documentation

@terasakisatoshi
terasakisatoshi / paulis.jl
Created August 24, 2023 03:02
materials for improving type stability of `svdMPO` and `qn_svdMPO`
N = 16
paulis = [
["Z", 1],
["Z", 2],
["Z", 3],
["Z", 4],
["Z", 5],
["Z", 6],
["Z", 7],
["Z", 8],
@terasakisatoshi
terasakisatoshi / vqe.html
Last active June 3, 2023 17:36
VQE In Julia
<!DOCTYPE html><html lang="en"><head><meta name="viewport" content="width=device-width"><meta charset="utf-8">
<meta name="pluto-insertion-spot-meta">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="white"><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#2a2928"><meta name="color-scheme" content="light dark"><link rel="icon" type="image/png" sizes="16x16" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.25/frontend-dist/favicon-16x16.347d2855.png" integrity="sha384-3qsGeVLdddzV9oIkj3PhXXQX2CZCjOD/CiyrPQOX6InOWw3HAHClrsQhPfX9uRAj" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="32x32" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.25/frontend-dist/favicon-32x32.8789add4.png" integrity="sha384-cOe5vSoBIgKNgkUL27p9RpsGVY0uBg9PejLccDy+fR8ZD1Iv5dF1MGHjIZAIZwm6" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="96x96" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.25/frontend-dist/favicon-96x96.48689391.png" integrity=
@terasakisatoshi
terasakisatoshi / draw_implicit_functions.html
Last active May 29, 2023 02:34
JuliaLang で学ぶ陰関数定理の応用
<!DOCTYPE html><html lang="en"><head><meta name="viewport" content="width=device-width"><meta charset="utf-8">
<meta name="pluto-insertion-spot-meta">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="white"><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#2a2928"><meta name="color-scheme" content="light dark"><link rel="icon" type="image/png" sizes="16x16" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.25/frontend-dist/favicon-16x16.347d2855.png" integrity="sha384-3qsGeVLdddzV9oIkj3PhXXQX2CZCjOD/CiyrPQOX6InOWw3HAHClrsQhPfX9uRAj" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="32x32" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.25/frontend-dist/favicon-32x32.8789add4.png" integrity="sha384-cOe5vSoBIgKNgkUL27p9RpsGVY0uBg9PejLccDy+fR8ZD1Iv5dF1MGHjIZAIZwm6" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="96x96" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.25/frontend-dist/favicon-96x96.48689391.png" integrity=
@terasakisatoshi
terasakisatoshi / jl_sida.ipynb
Last active May 7, 2023 13:26
Barnsley fern in Julia
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@terasakisatoshi
terasakisatoshi / mojo
Last active May 7, 2023 13:20
Mojo vs Python (Barnsley fern)
from Benchmark import Benchmark
from Vector import DynamicVector
from Random import random_f64
from Pointer import DTypePointer
from DType import DType
let plt = Python.import_module("matplotlib.pyplot")
let np = Python.import_module("numpy")
@register_passable("trivial")
@terasakisatoshi
terasakisatoshi / English_Conversation_Practice.txt
Created April 8, 2023 09:40
ChatGPT 君と英語での対話をする.
Me> I would like to ask you several questions in English. I'm trying to write sentences with proper English, but I may make some mistakes. If so, please feel free to comment on anything and everything.
ChatGPT> Sure, I'd be happy to help you with your questions and provide feedback on your English. Go ahead and ask your questions!
Me> My question is "I would liking to know the versn of Python?"
ChatGPT> Great! Here's the correct way to phrase your question: "I would like to know the version of Python."
You can use "like" instead of "liking" to make it sound more natural. Also, don't forget to add "the" before "version" to make it clear which specific version you're asking about.
@terasakisatoshi
terasakisatoshi / add.ts
Created April 8, 2023 09:07
ChatGPT knows TypeScript more than I do.
// sample.ts
function add(a: number, b: number): number {
return a + b;
}
console.log(add(1, 2));
@terasakisatoshi
terasakisatoshi / mcmc_Metropolis.jl.html
Created March 31, 2023 07:17
mcmc Metropolis 自己相関
<!DOCTYPE html><html lang="en"><head><meta name="viewport" content="width=device-width"><meta charset="utf-8">
<meta name="pluto-insertion-spot-meta">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="white"><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#2a2928"><meta name="color-scheme" content="light dark"><link rel="icon" type="image/png" sizes="16x16" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.22/frontend-dist/favicon-16x16.347d2855.png" integrity="sha384-3qsGeVLdddzV9oIkj3PhXXQX2CZCjOD/CiyrPQOX6InOWw3HAHClrsQhPfX9uRAj" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="32x32" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.22/frontend-dist/favicon-32x32.8789add4.png" integrity="sha384-cOe5vSoBIgKNgkUL27p9RpsGVY0uBg9PejLccDy+fR8ZD1Iv5dF1MGHjIZAIZwm6" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="96x96" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.22/frontend-dist/favicon-96x96.48689391.png" integrity=
@terasakisatoshi
terasakisatoshi / circleart.jl.html
Created February 21, 2023 08:25
目標画像ぽいデータを円で構成する.
This file has been truncated, but you can view the full file.
<!DOCTYPE html><html lang="en"><head><meta name="viewport" content="width=device-width"><meta charset="utf-8">
<meta name="pluto-insertion-spot-meta">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="white"><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#2a2928"><meta name="color-scheme" content="light dark"><link rel="icon" type="image/png" sizes="16x16" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.22/frontend-dist/favicon-16x16.347d2855.png" integrity="sha384-3qsGeVLdddzV9oIkj3PhXXQX2CZCjOD/CiyrPQOX6InOWw3HAHClrsQhPfX9uRAj" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="32x32" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.22/frontend-dist/favicon-32x32.8789add4.png" integrity="sha384-cOe5vSoBIgKNgkUL27p9RpsGVY0uBg9PejLccDy+fR8ZD1Iv5dF1MGHjIZAIZwm6" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="96x96" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.22/frontend-dist/favicon-96x96.48689391.png" integrity=