Skip to content

Instantly share code, notes, and snippets.

@yano404
yano404 / bethebloch.jl
Created December 16, 2021 08:32
Bethe-Bloch
module BethebBloch
import Unitful: Quantity, 𝐋, 𝐌, 𝐓, @u_str
export ∂ᵨₓE, ∂ₓE, calcrange, energyloss
uLength = Quantity{<:Number,𝐋}
uEnergy = Quantity{<:Number,𝐋^2 * 𝐌 * 𝐓^(-2)}
uDensity = Quantity{<:Number,𝐌 * 𝐋^(-3)}
uStoppingPower = Quantity{<:Number,𝐋^4 * 𝐓^(-2)}
mₚ = 938.272u"MeV/c^2"
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2001 Jul 18
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
" for OpenVMS: sys$login:.vimrc
@yano404
yano404 / latex.json
Created June 16, 2021 16:06
LaTeX Snippets for VSCode
{
// Place your snippets for latex here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@yano404
yano404 / WeizsackerBethePlot.jl
Last active July 11, 2021 13:27
Plot Weizsäcker-Bethe Mass Formula
"""
Weizsäcker-Betheの質量公式
$$
B(Z,A)
= a_1 A
- a_2 A^{2/3}
- a_3 \frac{(A-2Z)^2}{A}
- a_4 \frac{Z^2}{A^{1/3}}
+ \delta (A)
$$
@yano404
yano404 / koppen.py
Last active June 17, 2023 20:07
気象庁のホームページから世界103地点の気象データを入手して、気候区分を判定するプログラム
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__version__ = '0.0.1'
## import required libraries
import pandas
from decimal import Decimal
import numpy as np
## CONSTANT
PROGRAM_DESCRIPTION = '''