search for: elapsed_tim

Displaying 12 results from an estimated 12 matches for "elapsed_tim".

Did you mean: elapsed_time
2010 Jul 12
2
exercise in frustration: applying a function to subsamples
...nalyze all my data (I have reduced it to a couple hundred thousand records with about half a dozen records. I get the same result from ddply and split/lapply: > ddply(moreinfo,c("m_id","sale_year","sale_week"), > + function(df) data.frame(res = fitdist(df$elapsed_time,"exp"),est = > res$estimate,sd = res$sd)) > Error in fitdist(df$elapsed_time, "exp") : > data must be a numeric vector of length greater than 1 > and > > lapply(split(moreinfo,list(moreinfo$m_id,moreinfo$sale_year,moreinfo$sale_week)), > + functio...
2015 Oct 20
1
[PATCH v3 07/13] v2v: factor out copying of output data
...- let end_time = gettimeofday () in - - (* Calculate the actual size on the target, returns an updated - * target structure. - *) - let t = actual_target_size t in - - (* If verbose, print the virtual and real copying rates. *) - let elapsed_time = end_time -. start_time in - if verbose () && elapsed_time > 0. then ( - let mbps size time = - Int64.to_float size /. 1024. /. 1024. *. 10. /. time - in - - printf "virtual copying rate: %.1f M bits/sec\n%!" -...
2010 Jul 15
1
How do I combine lists of data.frames into a single data frame?
The data.frame is constructed by one of the following functions: funweek <- function(df) if (length(df$elapsed_time) > 5) { rv = fitdist(df$elapsed_time,"exp") rv$year = df$sale_year[1] rv$sample = df$sale_week[1] rv$granularity = "week" rv } funmonth <- function(df) if (length(df$elapsed_time) > 5) { rv = fitdist(df$elapsed_time,"exp") rv$y...
2017 May 19
2
noinline changes between 3.8 and 4.0?
...k>; class ticking_clock { public: using duration = tick_duration; using rep = duration::rep; using period = duration::period; using time_point = time_point<ticking_clock, duration>; static constexpr bool is_steady = true; static time_point now() noexcept; }; void f(long &elapsed_time) { auto start = ticking_clock::now(); this_thread::sleep_for(tick_duration(71)); auto finish = ticking_clock::now(); auto dur = finish - start; elapsed_time = dur.count(); } The functions defined in the resultant IR are marked `noinline` in 4.0 but do not have that same attrib...
2010 Jul 22
1
How do I get rid of list elements where the value is NULL before applying rbind?
Here is the function that makes the data.frames in the list: funweek <- function(df) if (length(df$elapsed_time) > 5) { res = fitdist(df$elapsed_time,"exp") year = df$sale_year[1] sample = df$sale_week[1] mid = df$m_id[1] estimate = res$estimate sd = res$sd samplesize = res$n loglik = res$loglik aic = res$aic bic = res$bic chisq = res$chisq chisqp...
2010 Jul 16
1
I need help making a data.fame comprised of selected columns of an original data frame.
I must have missed something simple, but still, i don't know what. I obtained my basic data as follows: x <- sprintf("SELECT m_id,sale_date,YEAR(sale_date) AS sale_year,WEEK(sale_date) AS sale_week,return_type,0.0001 + DATEDIFF(return_date,sale_date) AS elapsed_time FROM `merchants2`.`risk_input` WHERE DATEDIFF(return_date,sale_date) IS NOT NULL") moreinfo <- dbGetQuery(con, x) I then made the data frame I want to use as follows: fun_m_id <- function(df) if (length(df$elapsed_time) > 5) { rv = fitdist(df$elapsed_time,"exp")...
2010 Jul 08
1
Query about using timestamps returned by SQL as 'factor' for split
I have a simple query as follows: "SELECT m_id,sale_date,YEAR(sale_date),WEEK(sale_date),return_type,DATEDIFF(return_date,sale_date) AS elapsed_time FROM risk_input" I can get, and view, all the data that that query returns. The question is, sale_date is a timestamp, and I need to call split to group this data by m_id and the week in which the sale occurred. Obviously, I would normally need both YEAR and WEEK so that data from April th...
2015 Aug 11
41
[PATCH v2 00/17] v2v: add --in-place mode
This series is a second attempt to add a mode of virt-v2v operation where it leaves the config and disk image conversion, rollback on errors, registering with the destination hypervisor, etc. to a third-party toolset, and performs only tuning of the guest OS to run in the KVM-based hypervisor. The first 14 patches are just refactoring and rearrangement of the code, factoring the implementation
2010 Jul 21
0
One problem with RMySQL and a query that returns an empty recordset
...the above error, I never see about two thirds of the results that ought to be produced. At the time that the error occurs, x contains the following SQL query: SELECT m_id,sale_date,YEAR(sale_date) AS sale_year,MONTH(sale_date) AS sale_month,return_type,0.0001 + DATEDIFF(return_date,sale_date) AS elapsed_time FROM `merchants2`.`risk_input` WHERE m_id = 361 AND return_type = 1 AND DATEDIFF(return_date,sale_date) IS NOT NULL; If I execute this SQL, I find the resultset is empty. So assigning the value returned by dbGetQuery to moreinfo works ONLY if the resultset is not empty. It fails with a fatal er...
2015 May 15
0
[PATCH 3/4] ocaml tools: Use global variables to store trace (-x) and verbose (-v) flags.
...let start_time = gettimeofday () in if Sys.command cmd <> 0 then error (f_"qemu-img command failed, see earlier errors"); @@ -393,7 +393,7 @@ let rec main () = (* If verbose, print the virtual and real copying rates. *) let elapsed_time = end_time -. start_time in - if verbose && elapsed_time > 0. then ( + if verbose () && elapsed_time > 0. then ( let mbps size time = Int64.to_float size /. 1024. /. 1024. *. 10. /. time in @@ -412,7 +412,7 @@ let rec...
2015 May 15
5
[PATCH 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
.. and a lot of refactoring. https://bugzilla.redhat.com/show_bug.cgi?id=1167623 Rich.
2015 May 15
6
[PATCH v2 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
https://bugzilla.redhat.com/show_bug.cgi?id=1167623