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
def passing_grade(maths,physics,chemistry): | |
if maths >= 35 and physics >= 35 and chemistry >= 35: | |
avg_marks = (maths + physics + chemistry) / 3 | |
if avg_marks <= 59: | |
print("C Grade") | |
elif avg_marks <= 69: | |
print("B Grade") | |
else: | |
print("A Grade") | |
else: |
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 numpy as np | |
from sklearn.preprocessing import MinMaxScaler | |
from sklearn import metrics | |
df = pd.read_csv('mammographic_masses.data.txt',feature_names=['BI_RADS','age','shape','margin','density','severity']) | |
df = df.replace('?', np.nan) | |
#check data is not baised and equally distributed | |
df.describe(include='all') | |
df.dropna(inplace=True) |
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
sftp = Net::SFTP.start(@sftp_details['server_ip'], @sftp_details['server_username'], :password => decoded_pswd) | |
if sftp | |
begin | |
sftp.dir.foreach(@sftp_details['server_folder_path']) do |entry| | |
print_memory_usage do | |
print_time_spent do | |
if entry.file? && entry.name.end_with?("csv") | |
batch_size_cnt = 0 | |
sftp.file.open("#{@sftp_details['server_folder_path']}/#{entry.name}") do |file| | |
header = file.gets |