Skip to content

Instantly share code, notes, and snippets.

View mkim0710's full-sized avatar

mkim0710 mkim0710

View GitHub Profile
@mkim0710
mkim0710 / ExploreHiddenR.md
Created January 8, 2019 12:50 — forked from ZeccaLehn/ExploreHiddenR.md
[R] Explore Hidden Environments and Functions -- by example

Shows function Internals

library(BayesianFirstAid)
debugonce(bayes.t.test) # turns off debugging for function after first run
bayes.t.test(co2)

Returns hidden and unhidden environments

@mkim0710
mkim0710 / off_diagonal.R
Created May 12, 2019 09:32 — forked from dsparks/off_diagonal.R
Modifying select off-diagonal items in a matrix
# A method for modifying only select off-diagonal items in a matrix
# From "Thierry" and "Ben Bolker"
# At http://stackoverflow.com/a/11759744/479554
# A sample matrix
size <- 6
mat <- matrix(seq_len(size ^ 2), ncol = size)
print(mat)
# A companion matrix that indicates how "off" a diagonal is:
@mkim0710
mkim0710 / neuralnetR.R
Created May 31, 2020 08:15 — forked from mick001/neuralnetR.R
A neural network exaple in R. Full article at: http://datascienceplus.com/fitting-neural-network-in-r/
# Set a seed
set.seed(500)
library(MASS)
data <- Boston
# Check that no data is missing
apply(data,2,function(x) sum(is.na(x)))
# Train-test random splitting for linear model
@mkim0710
mkim0710 / ffmpeg.md
Created October 24, 2020 07:57 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
@mkim0710
mkim0710 / mermaid_2_svg.ps1
Created May 3, 2025 05:11 — forked from SoMaCoSF/mermaid_2_svg.ps1
mermaid to svg script, run within terminal in Composer/vscode (mcp next)
<#
.SYNOPSIS
Converts Mermaid diagram code to SVG with a text-based UI
.DESCRIPTION
This PowerShell script provides a menu-driven interface to convert Mermaid diagram code to SVG files
using either the Mermaid CLI (if installed) or the Mermaid Live Editor API.
.PARAMETER OutputPath
Path to save the SVG file (default: current directory)
.EXAMPLE
.\mermaid_to_svg.ps1