# Questions tagged [time]

19785 questions

1

votes

0

answer

7

Views

### Change the value (time) in a dataset into text in R

I am working with this dataset:
TPdata:
id Tp1 Sp2 time
A 1 7 08:00:00
B 2 8 09:00:00
C 3 9 18:30:00
D 4 10 20:00:00
E 5 11 08:00:00
F 6 12 09:00:00
I would like to change the entries 08:00:00 in column time to 'early'. I thought this would work but it isn't:
TPdata$time[...

1

votes

1

answer

230

Views

### HTTP requests for real time application, performance tips

I'm using Java's OkHttp3 to send multiple POST requests to the same REST endpoint, which is a third party AWS server on the same region as mine. I need those requests to be processed as fast as possible (even 1ms counts).
Right now the only performance tips I'm applying are very basic: I'm using HTT...

1

votes

0

answer

35

Views

### My PHP Socket Server keeps shutting down on Windows Server

I started a PHP Socket server on Windows Server 2012 R2 by running the command: php -q C:\path\to\server.php. The problem that I have is that after several hours the server I am not able to connect in JavaScript. I have done hours of researching to figure this about, but since there is no errors I d...

1

votes

1

answer

107

Views

### PowerBI DAX: Budget reallocation for future dates based on Spend actual

Could you please help me how to write a DAX measure in Power BI Desktop that would a) calculate the budget left for a set period (quarter) by subtracting total spend from total budget and b) redistribute the resulted budget leftover daily based on a daily % skew (that is set up manually)?
Please se...

1

votes

2

answer

96

Views

### Pandas - Create a 10-min time series from dataframe of events with start and end date and time

I have a dataframe df1 of events with start and end date:
ID EventID Start End Duration
0 G01 1001 2017-10-16 06:03:37.440 2017-10-16 06:24:24.440 00:20:47
1 G07 1001 2017-10-16 06:11:04.600 2017-10-16 07:28:43.520 01:17:38.920000
2 G02...

1

votes

0

answer

44

Views

### Building a Arima model in python

I have just started to study about the ARIMA models and I am trying to model a variable for which I have plotted the series, auto-correlation and partial auto-correlation(with a 95% confidence bands) and have run the augmented dickey fuller test. I am using statsmodels package in python3.
The variab...

1

votes

0

answer

29

Views

### Freeze with tkinter and other script

I have this code ,i have made a calcule script for test but time.sleep froze textfield
import subprocess
import tkinter as tk
from threading import Thread
import os
ospath = os.path.dirname(os.path.abspath(__file__))
path = (ospath +'\\calcule.py')
master = tk.Tk()
master.geometry('930x450+400+400')...

1

votes

0

answer

53

Views

### How to avoid MySQL + Django TimeField shooting itself in the foot at midnight?

MySQL 5.7.22 (but this happened with earlier versions) too. Happened with Django 1.8, now with Django 1.11, so wide range of MySQL and Django versions.
class ShootFootAtMidnight(models.Model):
time = models.TimeField(blank=True, null=True)
time_source = models.ForeignKey(TimeSource)
def save(self, *...

1

votes

0

answer

69

Views

### Choropleth Map - visualize data over time

I have data from 2000-2016 that I want to display year by year on a choropleth map. Does anyone have experience doing this in Python, or any recommendations?
I have been working with folium, but haven't been able to figure out how to add the time dimension.

1

votes

1

answer

53

Views

### requests.get is very slow while fetching websites

I am trying to build a simple terminal app to search stuff online through the terminal.
When I submit get requests through the library, I get very large wall times. I can't seem to pinpoint the problem.
Its fast when I directly type into the browser.
I have already skipped proxies in my script file...

1

votes

0

answer

386

Views

### online time series anomalies detection with apache spark

we have a data pipeline system
apache kafka---->spark steaming----->spark mlib
the data consumed is time series data (e.g. each record is in the form [key,value,timestamp])
we want to monitor time series anomalies for each key (like twitter anomalies https://anomaly.io/anomaly-detection-twitter-r/)...

1

votes

0

answer

60

Views

### Real-time audio processing to “translate” frequencies

I would like to know if there is a way to do real-time audio processing in Android, to translate the listening of the audible band to various ultrasound band centered for example on 20, or 40 or 60 kHz.
I've already found a way to display a real-time spectrogram based on the use of AudioRecord.
But...

1

votes

0

answer

40

Views

### Dependency inversion implementations for real time applications

After reading Robert Martin's 'Clean Architecture', I want to implement dependency inversion for computational heavy real time applications. More precisely:
decoupling and independence of lowlevel IO modules
no / minimal overhead
static polymorphism
The use of interfaces / actract classes with virtu...

1

votes

0

answer

129

Views

### Time-series forecasting: size of training data for cross-validation

Continuing my previous topic from here:
Keras LSTM: a time-series multi-step multi-features forecasting - poor results
I would like to ask You about of strategy of finding the right network. I have read a lot about 'test and trail' and 'no rule for setting right size of hidden neuron'’. From the...

1

votes

1

answer

34

Views

### Count Cycles in a time series

I have a device that is sending continuously data. The data received changes the waveform in time. For example, for some hours I could receive data like this one:
https://www.dropbox.com/s/g6thhtat1zx9rxm/1.PNG?dl=0
and after some time to begin receiving data like this:
https://www.dropbox.com/s/u10...

1

votes

0

answer

28

Views

### How to turn time series padding into a function in R and run it on a list

I am new to using R.
I have a data frame which has dates and a list of counties and another target variable 't'. I split the dataframe into a list of dataframes using the split function. Now i need to pad each data frame in the list with the missing dates and value of zero for the target 't'.
I trie...

1

votes

3

answer

379

Views

### Best javascript data structure for an ordered object that i can insert into and iterate [closed]

I want a object of let's say grocery items. each grocery item has an ID and a price. I want to be able to easily update that price by ID and not search through a list which is why i cant it to be like this:
{ '42434' : { price: 10}, '234324' : { price: 20}, '6456' : { price: 30}}
I also want all t...

1

votes

0

answer

86

Views

### Analyzing time complexity of m operations in Union-Find structure

The task is to find the time complexity in the worst case of m operations in Union-Find structure of 'find' and 'union', when all the 'union' operations occur before all the 'find' operations.
The union-find structure starts with n disjointed sets, that contain one element each. Moreover, each set i...

1

votes

2

answer

206

Views

### Range median query in an array in O(1) time using preprocessing

In classroom we learnt about RMQ to LCA to RMQ problems and how to support the operation range minimum query in O(1) time. As an exercise my professor has assigned me to support the operation : Range median query in O(n) space, O(n) preprocessing time and O(1) select time.
Let's say I have an array...

1

votes

0

answer

18

Views

### Odoo Frontend take time duration of timesheet and transform it into float

Timesheet have a field duration (float).
I'm making a module that let user to save timesheet by website and i'm using the
Now in the controller i need to take back data with post.get('name') and i get back a string, for example '01:30'..... with float became 1,5 (hours spent).
There is some library...

1

votes

0

answer

135

Views

### How to visualize time series of tensor in tensorboard projector?

I want to visualize a time series of a single high dimensional tensor (like an embedding vector) in the tensorboard projector. So I want to visualize all previous versions of this tensor in one visualization, like rows in an embedding matrix, and maybe associate some metadata with each version (e.g....

1

votes

1

answer

224

Views

### A linear regression with recursive feature elimination resulted in zero and large coefficients - . Is that right?

I am trying to build a simple linear regression model with RFE using sklearn. I got 49 features selected. When I inspected the coefficients I found some of them very large and others are zeros. The data is energy demand timeseries, and some features supposed to influence the predictions are getting...

1

votes

1

answer

175

Views

### Calculating RMSE for Prophet Model in Python

I'm new to learning python, and I'm creating a time series model which predicts total sales each month using the Prophet model. I am needing help getting the RMSE of my model! Thanks!
from fbprophet import Prophet
#Creating Dataframe#
proph = train.groupby(['date_block_num'])[ 'item_cnt_day'].sum()...

1

votes

1

answer

260

Views

### Improve Big O notation of algorithm from O(n^2) to something better

I'm looking to improve an algorithm that I currently have which, whilst it works, currently has the complexity of O(n^2). I'm looking to reduce that complexity if possible, or improve/change the algorithm itself in order to improve the runtime.
I have a list of strings that each contain multiple wo...

1

votes

0

answer

115

Views

### Long running Rest API calls withTHTTPClient

To listening of events from a Rest server I need a long running HTTP request.
How we do that with Delphi?
My current solution works but the stop of the request from the caller side is not solved properly. I have to stop the thread by using Thread.Terminate. This thread kill leads to unwanted memory...

1

votes

2

answer

246

Views

### Time-series charts for large amounts of data

I have a couple of thousand time-series covering several years at second-granularity. I'd like to store the data in a suitable DB (i.e. one that scales well and can retain all data at original granularity, e.g. Druid, openTSDB or similar). The goal is to be able to view the data in a browser (e.g....

1

votes

0

answer

530

Views

### Flutter: StreamBuilder uses old stream instead of new stream

I'm trying to show a Google-Firestore real-time list on my Flutter app using Flutter's StreamBuilder.
However, the stream seems to be using both the old data and the new data, instead of just the new one. (See below)
//This is the widget with the stream
Expanded(
child: StreamBuilder(
stream: _fir...

1

votes

1

answer

61

Views

### finding time complexity formula of an algorithm for checking if number is prime

I have some difficulties in finding time complexity formula (T(n)) of an algorithm for checking if number is prime.
Here is the function :
Is_prime_number (n)
{
if (n==1) return 0;
if (n==2) return 1;
if (n mod 2==0) return 0;
for(i=2; i*i

1

votes

0

answer

27

Views

### ts plot with seaborn returns exception

I am trying to make a timeseries plot with Seaborn.
My data is:
plot_data
Deflated_Index_Norm CCI_Norm BCI_Norm Date
0 1.0 1.000000 1.0 1989-01-01
1 1.0 1.009339 1.0 1989-01-01
2 1.0 0.992044 1.0 1989-01-01
3 1.0 1.007378 1.0 1989-01-01
4 1.0 0.998444 1.0 1989-01-01
5...

1

votes

0

answer

40

Views

### openfire not connecting from android genymotion emulator

I trying to develop chat demo app using openfire and smack in android.
I setup openfire in my local pc using this following tutorial
[ https://kpblogs.com/mobile-development/android/android-chat-application-using-openfire-server-and-xmpp-smack-client/ ]
here is my code
MyService.java
public class My...

1

votes

2

answer

170

Views

### Python pandas groupby category and integer variables results in pandas last and tail difference

UPDATE:
Please download my full dataset here.
my datatype is:
>>> df.dtypes
increment int64
spread float64
SYM_ROOT category
dtype: object
I have realized that the problem might have been caused by the fact that my SYM_ROOT is a category variable.
To replicate the issue you might w...

1

votes

1

answer

42

Views

### Which has a higher order of growth, c.n.(log (base 1.5) n) or d.(n^(log (base 1.5) 2))

I was looking at an example from a book. The final equation comes to ( c⋅n log (base 1.5) n)+ d.(n^(log (base 1.5) 2)) . I assume that the second function has a higher order of growth. As it evaluates to roughly n ^ 1.71, but the example choses the first function as the one with a highe...

1

votes

0

answer

40

Views

### Time prediction using specialised setup in Keras

I'm working on a project where I have to predict the future states of a 1D vector with y entries. I'm trying to do this using an ANN setup with LSTM units in combination with a convolution layer. The method I'm using is based on the method they used in a (pre-release paper). The suggested setup is a...

1

votes

1

answer

76

Views

### Cointegration Test with Trend

I have a data frame (df) with two variables where having already found out my order requires 5 lags I then tested the mean vector of the differenced series to see if I needed to consider (i) intercept (ii) no intercept and (iii) intercept and a time trend.
adfTest(df[,1], lags = 5, type = 'c') # p-v...

1

votes

0

answer

119

Views

### Forecasting Multiple Time Series Prediction using LSTM

I am trying to forecast the demand of an item per week using LSTM network altogether.For this purpose, I am using the Rossmann Sales data from Kaggle. It looks like this:
date date_block_num shop_id item_id item_price item_cnt_day
02.01.2013 0 59 22154 999 1
03.01.2013 0 25 2552 8...

1

votes

0

answer

191

Views

### How can I convert a gregorian time vector into datetime in Python?

I have a vector of time in Gregorian type. I want to convert it in the common format of dates with year, month, day, hour, minute and seconds.
I tried this:
from datetime import datetime
datetime.fromordinal(736364.94)
It returns always something only with the information of year, month and day. Lik...

1

votes

3

answer

320

Views

### How to listen to multiple children in Firebase?

I am currently trying to develop an app with which users can track their location. It is important that other users must not see the location of others not being in the group.
In order to listen to location updates from all users in the group I was wandering if attaching a ChildEventListener to eac...

1

votes

0

answer

102

Views

### OTP Hardware Compliant with OATH TOTP with php library

I am trying to use this php library OTPHP with a c200 feitian OTP hardware token (it states that is Compliant with OATH TOTP). The library works with google authentificator.
I can't figure out how to make it work with the hardware OTP.
They provided me with a 40 chars SEED (in a .txt file) somethin...

1

votes

0

answer

180

Views

### How to do the realtime graph using victory?

may I know how to do the realtime line chart using victory?
The victory library: https://github.com/FormidableLabs/victory
Temperature
`${p.timestamp} $${p.temperature}`}
/>
This is when the new temperature added it will automatically updated to the graph. Now I using it with the Redux and the back...

1

votes

0

answer

61

Views

### Tracking time spent viewing email in Google Analytics via a tracking pixel

So I'm experimenting with tracking email activity through Google Analytics.
I can create a simple tracking pixel that indicates if the email has been opened and sends that event to GA like so:
But is there a way to send a hit to GA that records user timing?
I can see user timing variables in GA's Me...