Questions tagged [replicate]
280 questions
2
votes
2 answers
How to find repeating numbers in a column in SQL server . Eg 11111, 33333333, 5555555555,7777777 etc
I need to identify repeated numbers( Eg: 1111, 33333333, 5555555555,777777777 etc.) in a column.
How can I do this in sql server without having to hard code every scenario. The max length is 10 of the column. Any help is appreciated.

user2675491
- 23
- 1
- 4
2
votes
2 answers
replicating and iterating in R
This line of code rep(c(0), 2)
creates
x
1 0
2 0
I would like to somehow extend this, in a way appropriate for R, so that I end up with something like the vector below. Basically, I'd like to append integers pairwise as such:
x
1 0
2…

tumultous_rooster
- 12,150
- 32
- 92
- 149
2
votes
1 answer
How does Hadoop dfs.replicate work?
I have a 2 node hadoop (1 is the master/slave and another slave) setup and 4 input files each of size 1GB.
When i set dfs.replicate to 2, then the entire data is copied over to both the nodes which is understandable. But my question is that, how do…

user1566063
- 23
- 3
2
votes
2 answers
R data.table efficient replication by group
I am running into some memory allocation problems trying to replicate some data by groups using data.table and rep.
Here is some sample data:
ob1 <-…

Brad
- 813
- 1
- 10
- 20
2
votes
2 answers
Fastest method of producing a copy of a MySQL database
We have a very large database that we need to occasionally replicate on our dev+staging machines.
At the moment we use mysqldump and then import the database script using "mysql -u xx -p dbname < dumpscript.sql"
This would be fine if it didn't take…

MeatPopsicle
- 832
- 13
- 28
2
votes
0 answers
Replicating data between two databases with NHibernate
Good evening everyone.
I'm looking for a way to replicate data between two database, would select some (or all) tables, probably all the data that are determined within these tables, and copy it to other tables with the same structure, but in…

Gustavo Gonçalves
- 528
- 1
- 12
- 33
1
vote
1 answer
MySQL Replication - Trigger wont replicate to slave
Ok here is my scenario
Server running master DB with other DB's for each site also on server.
an update is written to master DB, and a trigger inserts this record into the relevant DB for a specific site which is intended to be replicated down to…

JazziJeff
- 721
- 4
- 17
- 35
1
vote
4 answers
Repeat a table multiple times on same page
I have a fairly complicated html table containing lots of PHP, CSS etc., and it comprises about 200 lines of code. I need to reproduce the table in three different areas on my webpage. What is the best approach to replicating the table the 2nd and…

DanielAttard
- 3,467
- 9
- 55
- 104
1
vote
0 answers
Receiving CORS error on API, tried editing headers, not working
This is my API request code for Replicate AI API and it is showing CORS error, and I tried adding the line below to headers but it still didn't work...
'Access-Control-Allow-Origin':'*',
'Access-Control-Allow-Methods':'POST,PATCH,OPTIONS'
This is…

Benjamin Sloutsky
- 163
- 1
- 11
1
vote
1 answer
Asynchronous Replicate API in Python
I am writing a telegram bot that will generate images using this stable diffusion model: https://replicate.com/mbentley124/openjourney-img2img
I am using the replicate module. however, the code snippet below slows down the bot when someone sends a…

xss1de
- 13
- 3
1
vote
1 answer
How to make Optuna get replicable results?
I'm using optuna to tune LGBM. Random seeds had been set but each time Optuna got different set of best params.
Here's my optuna code:
def get_hpo_params(opt_X_train, opt_X_val, opt_y_train, opt_y_val, n_trials=180, cat_features=""):
def…

Cherry Wu
- 3,844
- 9
- 43
- 63
1
vote
1 answer
how to add Replicate api key?
i´m trying to use Replicate to run some neural networks in the cloud but it yields this error message:
ReplicateError: No API token provided. You need to set the REPLICATE_API_TOKEN environment variable or create a client with…

Omar Morales Rivera
- 195
- 1
- 8
1
vote
1 answer
How to replicate a process 1000 times and save the results as you go?
I need to repeat a process 1000 times and save the results as I go along, but I’m not sure how to do it.
Here’s what I have:
x1 = runif(4000, min = 0, max = 1)
x2 = runif(4000, min = 0, max = 1)
y <- 1*x1 - 2*x2 + rnorm(4000)
df <- data.frame(y, x1,…

bandcar
- 649
- 4
- 11
1
vote
2 answers
mean for replicate lists in R?
I have simulation and data structures as follows (just a toy example):
foo = function(mu=0,lambda=1){
x1 = rnorm(1,mu) #X~N(μ,1)
y1 = rexp(1,lambda) #Y~Exp(λ)
list(x=x1,y=y1)
}
mu = 1; lambda = 2 #true values: E(X)=μ=1;…

John Stone
- 635
- 4
- 13
1
vote
2 answers
How to repeat query on different parts of a dataset in R?
I want to repeat a particular query on a large dataset and I am sure the answer to my question is quite basic, but after reading various sources on 'for' loops, repeat and replicate functions for about 2 hours, I still can't find any examples which…

user197410
- 31
- 4