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

How to increase the speed and efficiency of the python code. The code needs to run on 20MM rows

How to improve the speed and efficiency of the code. The sample is as follows:df = [ [‘121’, ‘2017-10-01’, ‘2017-11-01’, ‘2017-12-01’, ‘2017-09-01’, 414, ‘2017-09-25’,10, ‘2017-09-30’], [‘121’, ‘2017-10-01’, ‘2017-11-01’, ‘2017-12-01’, ‘2017-10-01’, 405, ‘2017-10-22’, 21, ‘2017-10-31’], [‘121’, ‘2017-10-01’, ‘2017-11-01′,’2017-12-01’, ‘2017-11-01’,393, ‘2017-11-22’, 21, ‘2017-11-30’], [‘121’, ‘2017-10-01’, ‘2017-11-01′,’2017-12-01’, ‘2017-12-01’,345, ‘2017-12-21’,21, ‘2017-12-31’] ] data = pd.DataFrame(df, columns = [‘acc’, ‘m1’, […]

Categories
Mastering Development System & Network

OpenSource+Free+Secure CLUSTER/HA Software, Sync Multi-Zone Mail/Web User Data+DataBase, & Keep Single-Zone Unsynced

QUESTIONS : • For three Debian (GNU/Linux) v10/Buster KVM VPS based nodes, what free & open-source & secure cluster/HA software can i/user use ? • please mention if i/user can obtain cluster/HA (& ha administration) sw/source-code over encrypted connection ? • which cluster/HA sw can be configured to use minimum AES-256/RSA-16384/etc (encryption) based encrypted-communication for […]

Categories
Mastering Development

Row wise count of Zeros’ and NA in R for Columns

I want to find count of rows with respect to number of Zero’s and NA’s in the data frame , for example number of rows having zeros in only 1 column etc.. code for the df is below and need to find for columns from M1 to M5 O/P needed for Zeros and NA , […]

Categories
Mastering Development Software

Maintain order of processing data same order in which data received using multi-treading design

In one of the interview below question asked to me Suppose there is a stream of emails that we are fetching from a mail server. We need to do some processing on these emails and print the output in the same order in which we received the emails. If we fetch emails in the order […]

Categories
Mastering Development

Failed to insert in the sequential model layer

I have the script below where I am trying to insert the dataframe into a sequential model, this dataframe is composed by the following structure: m1 = Average of 12 readings (In a window of 60 data) – Example ((2 + 5 + 7 …) / 12) d1 = Standard deviation of the 12 data […]

Categories
Mastering Development

how to define and declare although it is defined and declared?

i know the question looks confusing but truthfully it isn’t like it seems. im building a programme about drone ( sorry if it doesnt make sense) Here from this code i get error "(line 116 )identifier "camrecord" is undefined " and "Compiler Error C2065 ‘(line 116) identifier’ : undeclared identifier" although i already identify and […]

Categories
Mastering Development

Using dplyr to generate multiple pairwise comparisons

I would like to use dplyr to split a dataset on several variables, and then automatically do pairwise comparions between different levels of a specific variable. To illustrate the concept I generate some mock data df <- data.frame(id = rep(c(1,2,3),each=4),trt = rep(c(“a”,”b”),each=3),method=rep(c(“m1″,”m2″,”m3”)),result=rnorm(12)) > df id trt method result 1 1 a m1 -1.417685956 2 1 […]

Categories
Mastering Development

Getting and saving results from multiple data frames

I have nine different data frames df1, df2, df3, df4, df5, df6, df7, df8 and df9. I want to write a function that apply the following calculation using the mice package for each data frame individually: imputed_Data <- mice(df, m=3, maxit = 3, method = ‘pmm’, seed = 500) by the end, I should get […]

Categories
Mastering Development

Grabbing result from a picker view for use in other view controller

Hello fellow programmers, I am having some trouble figuring out passing data between view controllers. my initial view controller(SelectCarViewController) consists of two pickers(year and make/model) I have a Label that displays the year once selected and a label that displays the make/model once selected. Once the two are filled in an invisible button(search parts) will […]