This file contains 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 function can be used to read the images from the dataset created by the patchify_dataset.py. | |
Example Usage: | |
X_test, y_test = get_images("ModMonuSeg/Test/", (im_width, im_height), gt_extension='png') | |
""" | |
def get_images(parent_dir, im_shape, img_folder="TissueImages/", gt_folder="GroundTruth/", gt_extension=None): | |
tissue_dir = parent_dir + img_folder | |
gt_dir = parent_dir + gt_folder | |
im_width, im_height = im_shape |
This file contains 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 selenium import webdriver | |
from selenium.webdriver.firefox.options import Options | |
import time | |
import urllib.request | |
from PIL import Image | |
import os | |
def cr_folder(folder_name): | |
if not os.path.exists(folder_name): | |
os.makedirs(folder_name) |
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.
This file contains 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
#Author : Muhammad Ehsan ul Haq | |
#Read the data from the text file | |
dataAlpha = read.table("dataAlpha.txt", header = TRUE) | |
dataBravo = read.table("dataBravo.txt", header = TRUE) | |
#number of no-responses | |
noResponseAlpha = sum(dataAlpha == -1) | |
noResponseBravo = sum(dataBravo == -1) | |
print(sprintf("Number of no Responses in Alpha = %d", noResponseAlpha)) |
This file contains 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
//Author Name : Muhammad Ehsan ul Haq | |
fun main(args : Array<String>) { | |
//active probability totalRate/UserNeededRate Required probability | |
var Users = UsersNumberPrediction(0.25, 8000/500, 0.9) | |
println("Number of Users that can be connected simultaneously using Packet Switching = " + Users) | |
println("SMG = " + Users.toDouble()/(8000.0/500.0)) | |
} | |
fun factorial(A: Int) : Double{ | |
if(A <= 1) |