Skip to content

Instantly share code, notes, and snippets.

View zemmyang's full-sized avatar

Angeleene (Zemmy) Ang zemmyang

View GitHub Profile
@zemmyang
zemmyang / run_all.lsf
Last active September 6, 2022 06:01
Lumerical FDTD - Script to run all .fsp files in directory to job queue and run
files = splitstring(dir,endl);
for(i=1:length(files)) {
if (findstring(files{i},"fsp") != -1) {
if (fileexists(files{i})) {
?files{i}; # displays the filename to confirm
load(files{i});
addjob(files{i});
# alternatively, this code can also be used to run
@zemmyang
zemmyang / hangman.py
Created December 16, 2020 19:24
Simple Hangman Python Game
import random
def welcome():
s = "hi!"
print(s)
def generate_word():
f = open("hangman_words.txt", "r")
x = []
for i in f:
@zemmyang
zemmyang / simple_game.py
Created December 16, 2020 19:26
Simple Betting Game in Python
import random
def intro_banner():
s = "Welcome to the Game!"
print(s)
def game_over():
s = "Game Over. Bye!"
@zemmyang
zemmyang / main.py
Created November 23, 2022 15:44
Send HTTP request from one Google Cloud Function to another HTTP-triggered Google Cloud Function
# the HTTP-triggered GCF does not need to have "Allow Unauthenticated" set
import urllib
import json
import google.auth.transport.requests
import google.oauth2.id_token
url = <YOUR URL>
@zemmyang
zemmyang / generate_dicom_report.py
Created January 22, 2023 11:42
Sort DICOM files with sequence descriptions + selected metadata and save as CSV
from typing import List
from pathlib import Path
import SimpleITK as sitk
from enum import Enum
from tqdm import tqdm
class DICOMTag(Enum):
Unspecified = 0xFFFF, 0xFFFF
@zemmyang
zemmyang / README.md
Last active October 17, 2023 14:39
Luck-influenced Blackjack game in JS

Little blackjack game in Javascript, with a luck slider that influences what cards that end up at the top of the deck + a betting/money system. Inspired by the blackjack minigame in Fallout: New Vegas.

Written as an exercise in learning JS and also as a distraction from current events.

It's not pretty, it's probably not efficient, but it works.

@zemmyang
zemmyang / dicompiler.py
Created November 2, 2023 07:39
DICOMpiler
"""
DICOMpiler
Splits a folder of DICOM files in one folder into subfolders by series UID
Warning: will throw an error if there are non-DICOM files in the folder
If you want to split the files according to another identifier, change 0x0020000e into the DICOM tag that you want.
Some useful tags to sort by:
0x00200011 Series Number
0x0020000e Series Instance UID