Categories
Mastering Development

Clear and Concise Way to apply Standardization to both Train and Test Set in R

I am selecting a 90/10 Training/Test split with some data in R. After I have the Training set. I would like to standardize it. I would then like to use the same mean and standard deviation used in the training set and apply that standardization to the test set. I would like to do this […]

Categories
Mastering Development

How to add using LINQ query in C#

using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Text.RegularExpressions; namespace Assignment_1_Keshav_Thakur_991549498 { class PayrollDatabase { static List<Payroll> Payroll = new List<Payroll> { new Payroll("1", "S3001","32", "10", "01-01-2020"), new Payroll("2", "S3002","23", "20", "02-01-2020"), new Payroll("3", "S3003","20", "30", "03-02-2020"), new Payroll("4", "S3004","40", "40", "04-05-2020"), new Payroll("5", "S3005","25", "50", "07-08-2020"), };//Payroll menu public static void […]

Categories
Linux Mastering Development

Output from Bonnie++ doesn’t match up

I just ran bonnie++ ten times to test the performance of a file server. After removing the verbose output this is what remains: format_version,bonnie_version,name,concurrency,seed,file_size,io_chunk_size,putc,putc_cpu,put_block,put_block_cpu,rewrite,rewrite_cpu,getc,getc_cpu,get_block,get_block_cpu,seeks,seeks_cpu,num_files,max_size,min_size,num_dirs,file_chunk_size,seq_create,seq_create_cpu,seq_stat,seq_stat_cpu,seq_del,seq_del_cpu,ran_create,ran_create_cpu,ran_stat,ran_stat_cpu,ran_del,ran_del_cpu,putc_latency,put_block_latency,rewrite_latency,getc_latency,get_block_latency,seeks_latency,seq_create_latency,seq_stat_latency,seq_del_latency,ran_create_latency,ran_stat_latency,ran_del_latency 1.98,1.98,15.local,1,1602631781,8G,,8192,5,901,93,45205,13,23092,10,1162,90,66262,8,369.7,16,1,,,,100,18,1,360,4,21,0,18,1,542,4,20,0,12295us,665ms,1903ms,48384us,1944ms,5397ms,1652ms,13917us,2866ms,507ms,4953us,803ms 1.98,1.98,15.local,1,1602631781,8G,,8192,5,891,93,46620,14,23701,10,1177,90,66461,8,674.0,15,1,,,,100,18,1,406,4,22,0,18,1,559,4,23,0,12010us,1415ms,1264ms,52618us,496ms,69643us,1267ms,10064us,515ms,958ms,4650us,829ms 1.98,1.98,15.local,1,1602631781,8G,,8192,5,909,93,47824,14,21431,9,1147,88,67050,8,754.3,17,1,,,,100,20,1,400,4,19,0,14,1,530,3,20,0,11888us,1177ms,2710ms,45197us,1021ms,127ms,398ms,4562us,2874ms,1317ms,4810us,1006ms 1.98,1.98,15.local,1,1602631781,8G,,8192,5,890,91,37540,12,21765,9,1183,90,66822,8,1419,22,1,,,,100,19,1,461,3,23,0,19,1,547,3,19,0,11992us,548ms,864ms,46664us,480ms,25566us,760ms,44844us,1036ms,704ms,4778us,6449ms 1.98,1.98,15.local,1,1602631781,8G,,8192,5,795,83,43425,13,23066,10,1218,93,938042,27,1282,17,1,,,,100,19,1,406,4,21,0,18,1,560,4,23,0,53141us,14308ms,2786ms,39855us,71572us,6216ms,1761ms,6592us,1224ms,511ms,4654us,504ms 1.98,1.98,15.local,1,1602631781,8G,,8192,5,870,91,37339,11,21559,9,1187,91,924835,26,1499,19,1,,,,100,20,1,401,5,25,1,19,1,545,4,20,0,11615us,907ms,1870ms,44530us,352ms,1694us,626ms,4660us,359ms,659ms,5166us,972ms 1.98,1.98,15.local,1,1602631781,8G,,8192,5,881,93,37399,11,22194,9,1199,92,66756,8,1341,21,1,,,,100,17,1,409,4,20,0,17,1,557,4,23,0,11831us,1334ms,1113ms,45929us,579ms,29992us,4185ms,4348us,985ms,521ms,4889us,442ms 1.98,1.98,15.local,1,1602631781,8G,,8192,5,879,92,37592,12,21603,9,1208,93,4320730,99,1485,18,1,,,,100,17,1,403,4,22,0,16,1,570,3,19,0,11683us,665ms,1118ms,23421us,158us,5495ms,1623ms,4401us,592ms,863ms,10107us,1072ms 1.98,1.98,15.local,1,1602631781,8G,,8192,5,879,92,37386,11,21728,9,1168,90,554500,18,1516,19,1,,,,100,19,1,410,4,25,1,18,1,553,3,27,1,11325us,1617ms,1546ms,42335us,476ms,1812us,681ms,4294us,357ms,870ms,4776us,261ms 1.98,1.98,15.local,1,1602631781,8G,,8192,5,850,92,37915,11,21600,9,1159,88,141678,10,1513,20,1,,,,100,20,1,403,5,22,0,16,1,604,3,22,0,12674us,1461ms,1496ms,62742us,382ms,123ms,786ms,5874us,690ms,956ms,5011us,795ms but pasting this into a spread sheet results in missing columns (there are two header columns fewer than there are data […]

Categories
Ask Electrical Engineering Engineering

Summing Amplifier – Resistor at non-inverting input terminal

This signal conditional circuit outputs the sum of five 76Ohm output sensors in the 10mV range and the voltage gains are 10,15,20,25,30. Could someone please explain to me why do we need a resistor at the non-inverting terminal of the summer amplifier and why do we need an inverting amplifier connected to the summing amplifier? […]

Categories
Mastering Development

Fast way to remove array of specific row values from 2D numpy array

I have a 2D array like this: a = np.array([[25, 83, 18, 71], [75, 7, 0, 85], [25, 83, 18, 71], [25, 83, 18, 71], [75, 48, 8, 43], [ 7, 47, 96, 94], [ 7, 47, 96, 94], [56, 75, 50, 0], [19, 49, 92, 57], [52, 93, 58, 9]]) and I want to […]

Categories
Mastering Development

Finding common intersection between various values of a columns in a dataframe where values are array/list

I have a dataframe whose first 5 rows looks like this. userID CategoryID sectorID agunii2035 [16, 17, 3, 12, 1] [2, 33, 29, 18, 23] agunii3007 [2, 4, 6, 3, 16] [4, 15, 29, 10, 18] agunii2006 [8, 16, 2, 5, 12] [38, 18, 7, 36, 33] agunii2003 [6, 4, 2, 5, 17] [37, 12, […]

Categories
Mastering Development

Is there a way to get my code to produce a line graph and instead of a graph that returns to the origin

My graph currently looks like this My Graph and I want to make it look like this Graph. Is there a way to get my code to connect each point to eachother instead of connecting the origin to each point. import turtle count = 0 def seq3np1(n): global count while(n != 1): count +=1 if(n […]

Categories
Mastering Development

SVG vector image not showing on HTML element

I am trying to create an icon button, everything works, except from the SVG image. When I add the SVG file as the background-image using CSS it doesn’t seem to appear. I even tried using the ::before pseudo-element (or class, am not sure which one it is). All the methods I have tried were all […]

Categories
Mastering Development

t test x not enough ‘x’ observations using R with package rstatix

I have the following dataset: structure(list(AgeGroup = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, […]

Categories
Mastering Development System & Network

how to mac and ip filtering with iptables

iptables -I FORWARD -p tcp -m multiport –dport 19,21,22,25,53,67,80,443,3128 -i eth2 -m set ! –match-set ip_mac src,src -j REJECT