Categories

## Can the forked be unforked? :)

So….BTC, BCH, BTG and BSV all trade at different prices/values. All have forked off from BTC and have different development teams, theories, practices, technology, etc. I noticed that when you look at the amount of coins mined on sites like coinmarketcap.com, it shows the following circulating supplies for each: BTC = 18,287,125 BCH = 18,351,063 […]

Categories

## Replace values in multiple columns by values of another column on condition in R

I have a data frame similar to this: > var1<-c(“01″,”01″,”01″,”02″,”02″,”02″,”03″,”03″,”03″,”04″,”04″,”04”) > var2<-c(“0″,”4″,”6″,”8″,”3″,”2″,”5″,”5″,”7″,”7″,”8″,”9”) > var3<-c(“07″,”41″,”60″,”81″,”38″,”22″,”51″,”53″,”71″,”72″,”84″,”97”) > var4<-c(“107″,”241″,”360″,”181″,”238″,”222″,”351″,”453″,”171″,”372″,”684″,”197”) > df<-data.frame(var1,var2,var3,var4) > df var1 var2 var3 var4 1 01 0 07 107 2 01 4 41 241 3 01 6 60 360 4 02 8 81 181 5 02 3 38 238 6 02 2 22 222 7 […]

Categories

## Two-Way Repeated Measures ANOVA: Error in lm.fit()… 0 non-na cases (rstatix)

I am trying to run a Two-Way Repeated Measures ANOVA using the R Statix package based on the description from here however I am running into the subject error with my dataset. The data consist of 10 replicate biomass measurements recorded at each of 8 Locations across 5 months (10 reps x 8 locations x […]

Categories

## Finding percentile_cont

Hope I can express this clearly. I am using the pgAdmin 4 tool in PostgreSQL 12. I am going through end of chapter (6) exercises in the book “Practical SQL” by Anthony DeBarros and am having problem getting my query to run. There are two tables with (total) population per county per state and I […]

Categories

## Generating data of fixed size from a given set using Zipf probability distribution

I need to generate data sets from a given set using discrete probability distributions like zipf, geometric etc. For example, say we are given a set of elements A=(1,2,3,4,5), I need to generate a data set of size 100 such that; -data set consist of elements of A -the elements (1,2,3,4,5) are distributed in the […]

Categories

## How to minimize the sum of the elements in the final array after performing k number of operation

This question is asked in my interview coding and there were 12 test cases and i am only able to pass 8 of them. minSum(List values, int k) method need to complete. Example : nums = [10,20,7] and k=4 ans answer for this array is 5+5+4=14. Each operation consists of removing element from the array, […]

Categories

## Parsing a .pdb file in Python and creating a dictionary for specific record types

First, let me start by saying that I’m doing this as a Python exercise and I’m not allowed to use Biopython. I am writing a script that will help me parse any .pdb file generated from a trajectory. I am trying to create a dictionary that would link the chain variable with the resNumber variable. […]

Categories

## How to get extremes from already determined groups of peak/valley indexes? [python]

I’m sorry if i’m butchering the question but essentially i have 3 arrays. One array which is the signal data, and an array of peak indexes and an array of valley indexes. The problem however is that sometimes there will be multiple indexes for a peak in a row before there is a valley index. […]

Categories

## Combine blocks of different images and produce a new image

I have six photographs. I changed them into block structure. Consider an image of size 200×200. 1. I converted into blocks of 10×10 so now I have 400 blocks in total each of size 10×10. I did this for each image. 2. Then I found the mean value for each block. Again for all images. […]

Categories

## How to improve MySQL stored procedure run for 20 seconds

I have a stored procedure which will run for 20 seconds and make high cpu usage, I found it in the slow query log, this stored procedure always exist and will run for 15 to 30 seconds. I believe this stored procedure caused the high CPU usage. So I am trying to use explain to […]