This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * By Samarthya Lykamanuella on 2023-10-15 | |
| * SOURCE: https://www.circuitbasics.com/how-to-use-photoresistors-to-detect-light-on-an-arduino/ | |
| */ | |
| int PHOTO_PIN = A0; | |
| void setup() { | |
| // put your setup code here, to run once: | |
| Serial.begin(9600); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This class allows one to display an external image in Kotlin Jetpack Composable | |
| * without external dependencies such as Coil and Glide. | |
| * Written by Samarthya Lykamanuella (github.com/groaking) | |
| * --- | |
| * Load an ImageBitmap from a specific path, then convert it into a Painter | |
| * that can be loaded in a composable Image element. | |
| * SOURCE: https://developer.android.com/develop/ui/compose/graphics/images/custompainter | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Converts an array of images into an MP4 video | |
| # SOURCE: https://askubuntu.com/a/610945 | |
| base="/ssynthesia/ghostcity/git-local/02306.00013-neptunal-ix-oommf-nanoparticle/ix-meh-10/magick-export" | |
| fps=60 | |
| output_path="/ssynthesia/ghostcity/git-local/02306.00013-neptunal-ix-oommf-nanoparticle/ix-meh-10/dist/" | |
| ffmpeg -framerate $fps -i $base/overlaid-micrograph-%07d.png -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p $output_path/ffmpeg-output-$fps"fps".mp4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| file_masukan = "Permalloy Nanowire 200nm.csv" | |
| data_terbaca = pd.read_csv(file_masukan) | |
| x = data_terbaca["Oxs_TimeDriver::Simulation time"] | |
| y = data_terbaca["Oxs_UniformExchange:NiFe:Energy"] | |
| y2 = data_terbaca["Oxs_Demag::Energy"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import matplotlib.pyplot as plt | |
| import pandas as pd | |
| # Alamat tempat berkas CSV berada | |
| wd = '/ssynthesia/ghostcity/git-local/02306.00013-neptunal-ix-oommf-nanoparticle/ix-meh-12/' | |
| # Berkas CSV masukan | |
| csv = '200nm.csv' | |
| # Membaca berkas CSV hasil simulasi OOMMF |