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
steps | |
2020-02-01 00:00:00 0 | |
2020-02-01 00:01:00 0 | |
2020-02-01 00:02:00 0 | |
2020-02-01 00:03:00 0 | |
2020-02-01 00:04:00 0 | |
2020-02-01 00:05:00 0 | |
2020-02-01 00:06:00 0 | |
2020-02-01 00:07:00 0 | |
2020-02-01 00:08:00 0 |
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
Subject datetime Type Count | |
User1 4/16/20 15:00 A1 1 | |
User2 3/28/20 13:00 A1 1 | |
User3 4/29/20 15:00 A1 1 | |
User4 5/2/20 9:00 A1 1 | |
User5 2/19/20 18:00 A1 1 | |
User6 4/20/20 16:00 A1 1 | |
User7 5/4/20 20:00 A1 1 | |
User8 4/4/20 16:00 A1 1 | |
User9 4/5/20 8:00 A1 1 |
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
# source: https://pypi.org/project/med2image/ | |
# https://stackoverflow.com/questions/29640641/how-to-convert-nii-format-file-into-2d-image | |
# requirements | |
#pip3 install pydicom | |
#pip3 install med2image | |
#pip3 install pudb | |
#pip3 install pfmisc | |
#$1 = input.nii |
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
for filename in *.jpg; do mv "$filename" "prefix_$filename"; done; |
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 sys | |
import os | |
from PIL import Image | |
import shutil | |
import numpy as np | |
mask_dir = "/Users/gireeshbogu/Downloads/MSNYD_8_22_17/MSNYD_8_22_17__AB_AXT1_fl2d_inopp_mbh_15/masks_machine/" | |
new_mask_dir = "/Users/gireeshbogu/Downloads/MSNYD_8_22_17__AB_AXT1_fl2d_inopp_mbh_15_masks/" | |
if not os.path.exists(new_mask_dir): |
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
# identify images with at least one mask (sum of all pixels > 0) and copy them to a new folder | |
# usage: script.py mask_dir new_mask_dir | |
import sys | |
import os | |
from PIL import Image | |
import shutil | |
import pandas as pd | |
import numpy as np |
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
from glob import glob | |
import cv2 | |
jpgs = glob('./*.jpg') | |
for image in jpgs: | |
img = cv2.imread(image) | |
cv2.imwrite(image[:-3] + 'png', img) |
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
# Simulate Omics style data for ML | |
import uuid | |
import itertools | |
features = 700 | |
subjects = 40 | |
columns_list = [] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.