Questions tagged [periodic]

17 questions
3
votes
1 answer

Random number generator with freely chosen period

I want a simple (non-cryptographic) random number generation algorithm where I can freely choose the period. One candidate would be a special instance of LCG: X(n+1) = (aX(n)+c) mod m (m,c relatively prime; (a-1) divisible by all prime factors of m…
Adomas Baliuka
  • 1,384
  • 2
  • 14
  • 29
3
votes
2 answers

How to use Python websockets and asyncio to send data periodically and wait for receiving data but without blocking the sending process

I've Been searching for quite a long time now and practicing a bit but I can't find a solution. Here's my goal: I would like a Javascript Client that occasionally sends data to my server I'd like a server (in Python) that periodically (every…
Jarvis
  • 71
  • 1
  • 4
1
vote
0 answers

How to run Future/await with Timer.periodic in flutter

i want running next step mainTimerStart run after 2sec print 'Fist Timer End' mainTimerStart run after 3sec print 'Second Timer End' But.... now All the step work at once. look at my code button function code onPressed: () async { await…
최수형
  • 11
  • 2
1
vote
0 answers

Why do simulated arrival times from a Poisson distribution seem to show periodicity?

I am experimenting with simulated arrival times drawn from a Poisson distribution. To construct the arrival times, I am randomly drawing inter-arrival times from the inverse CDF, which is exponentially distributed. The formula for the inter-arrival…
grover
  • 927
  • 1
  • 10
  • 21
1
vote
1 answer

Flutter: what is the best practice for auto & periodic update of a flutter element

I'm trying to build a flutter app which shows a chart that reads data from a MySql database (a table) I want to update the chart when the data in the table is updated without manually refresh the page the table is updated by a script run by a…
graph b
  • 11
  • 2
1
vote
1 answer

How to approximate function for geometrically growing sequence?

I have the function to create x0: x0 = [] for i in range(0,N): if i == 0: a = 0.4 else: a = round(0.4 + 0.3*2**(i-1), 1) print(i, a) x0.append(a) which gives me data of growing sequence:…
Peter.k
  • 1,475
  • 23
  • 40
1
vote
1 answer

How to add a periodic task to a Service in minos?

I want to add a method to my minos.cqrs.Service to be executed every day at 9:00 AM. How can I do that? Here is my current code: from minos.cqrs import Service class MyService(Service): async def task(self) -> None: print("Running…
garciparedes
  • 1,749
  • 2
  • 18
  • 34
0
votes
1 answer

Fitting a periodic function to arbitrarily shaped periodic data points (Fourier series?)

I would like to find a fit for my data points which are periodic but non-trivial (they're not following a single sin, cos or tan function). These data points follow a periodic rectangle-ish/pulse-ish shape. The Fourier series should be able to help…
Jay
  • 9
  • 1
0
votes
0 answers

In my .net C# Windows service app I want to execute a function periodicaly. I am not sure how to wait/sleep the program in a precious way?

I have to execute a function periodically for a specific time in my windows service app. The function is reading out a current value from a remote CNC machine. The function will be executed every 35 ms for 30 seconds. Normally the data reading takes…
Dargento
  • 31
  • 3
0
votes
0 answers

Calculating Periodic values from YTD

I have a dataset which has 12 columns which includes an amount column which is arriving as YTD. I need to convert the Ytd into a periodic and populate in a new column. We are receiving 300-400k records per month with the month column changing and…
0
votes
1 answer

Detecting sinusoidal noise

I have spectroscopic signals that are disturbed by a pseudo-periodic signal. This disturbance is due to a bad positioning of the sensor and this one will badly integrate the number of photons it detects. Of course we could act on the positioning of…
Doci
  • 1
  • 1
0
votes
0 answers

How to implement long-lived periodic retries with Kafka?

We have a Kafka consumer that consumes an internal topic, processes the message and sends it to an external partner over rest: Topic ---> Consumer ---> Partner HTTP endpoint We frequently get 404 responses for some of the messages we send and want…
0
votes
0 answers

Is there a better way to run a python script periodically besides scheduler?

I have a python script that reads .csv files in a specific folder every x sec/min/hour automatically. I am trying to find better way(for performance and resources) to do it. The OS is Windows. Example code: import os from…
0
votes
1 answer

Transition between two coordinates set with minimum distance periodically (Python)

I have a set of sphere coordinates in 3D that evolves. They represent a stack of spheres which are continuously removed from a box from the bottom of the geometry, and reinserted at the top at a random location. Since this kind of simulation is…
yvrob
  • 105
  • 10
0
votes
0 answers

How to make a variable periodic

I have wrote this code in python and I need the temperature to be periodic (period = 1s)(like a Sin function). Tmax = 308 Tmin = 298 t1 = 600 t2 = t1+600 t3 = t2+1800 t4 = t3+600 tr = 3600 Tr = 273 def T(t): if t>0 and t<=t1/tr: Ti =…
1
2