Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Upload takes too long.
Post: RE: Upload takes too long.
You can can your python script directly from the scheduled task. Scheduled task also has some nice features like a timeout. You can tell the Task Scheduler to kill the job if it runs for longer than x... |
|
BrendanD |
General Coding Help |
29 |
7,602 |
Apr-04-2020, 02:12 PM |
|
|
Thread: Access a variable of a daemon
Post: RE: Access a variable of a daemon
Oh, the joys of the corporate firewall...
You must be on linux if you are using daemon.
You might want to start here:
Networking and Interprocess Communication
If you don't have sockets, then you are ... |
|
BrendanD |
General Coding Help |
8 |
3,385 |
Apr-03-2020, 07:29 PM |
|
|
Thread: Upload takes too long.
Post: RE: Upload takes too long.
Almost forgot. My code assumes the time in your file is always four digits e.g. 0930, not 930. If this is not the case time will not be parsed properly for times between 0000 and 1200. |
|
BrendanD |
General Coding Help |
29 |
7,602 |
Apr-03-2020, 05:30 PM |
|
|
Thread: Upload takes too long.
Post: RE: Upload takes too long.
Here is my example of just reading the csv into values and parsing the date. I have added code that will abort if it tries to read more than one line from a csv. Note that your code reads each line of... |
|
BrendanD |
General Coding Help |
29 |
7,602 |
Apr-03-2020, 03:41 PM |
|
|
Thread: Access a variable of a daemon
Post: RE: Access a variable of a daemon
From a little google-fu, I think you might be better off using Pyro4. I haven't used it, but it looks more like what you want i.e. inter-process communication. |
|
BrendanD |
General Coding Help |
8 |
3,385 |
Apr-03-2020, 02:13 PM |
|
|
Thread: Upload takes too long.
Post: RE: Upload takes too long.
Yep. That is it. Select UTC i.e. Grenwich Mean. Of course, if this software does any plots/displays or such for you, they may be labeled in UTC instead of local time... |
|
BrendanD |
General Coding Help |
29 |
7,602 |
Apr-02-2020, 10:58 PM |
|
|
Thread: Upload takes too long.
Post: RE: Upload takes too long.
So 21:48 was your local time?
(Can you set your AWS to UTC? When dealing with instruments and data, UTC is king of the hill. No worries about conversion.) |
|
BrendanD |
General Coding Help |
29 |
7,602 |
Apr-02-2020, 08:43 PM |
|
|
Thread: Upload takes too long.
Post: RE: Upload takes too long.
Um.... you are lucky I am good at guessing...
I can guess the year is 2020, I can guess 93 is the day of the year, I can guess 2148 is the time, I can guess 101 is the record number. Amiright? Is 214... |
|
BrendanD |
General Coding Help |
29 |
7,602 |
Apr-02-2020, 08:32 PM |
|
|
Thread: Upload takes too long.
Post: RE: Upload takes too long.
Post an example of your csv and I'll help you parse the datetime. If you do not care about the accuracy of datetime to within five minutes, why care so much about uploading every five minutes? _shrug_... |
|
BrendanD |
General Coding Help |
29 |
7,602 |
Apr-02-2020, 07:39 PM |
|
|
Thread: It seems like the overall Python syntax would be error prone
Post: RE: It seems like the overall Python syntax would ...
(Apr-02-2020, 12:12 AM)CynthiaMoore Wrote: It's very different from when I used to type BAL statements onto punch cards on an 029. **tongue**Hahaha! You are more fossilized than I am! **tongue** |
|
BrendanD |
News and Discussions |
13 |
5,901 |
Apr-02-2020, 06:42 PM |
|
|
Thread: FTP with special character in password
Post: RE: FTP with special character in password
How about normalizing your password string first?
import unicodedata
norm_password = unicodedata.normalize('NFKD', password)Edit: u2019 is a right apostrophe. Maybe you need a different one? See: http... |
|
BrendanD |
Networking |
5 |
4,429 |
Apr-02-2020, 06:38 PM |
|
|
Thread: Upload takes too long.
Post: RE: Upload takes too long.
WOW is obviously blocking uploads per site made less than five minutes apart. They do not state this in their docs they only suggest in their faq that five minutes is the recommended upload frequency ... |
|
BrendanD |
General Coding Help |
29 |
7,602 |
Apr-02-2020, 06:20 PM |
|
|
Thread: Access a variable of a daemon
Post: RE: Access a variable of a daemon
Hmm. Can't find docs for python-daemon but I did a quick search of its code and found nothing called token_length. Have you written classes in python before? If you are accessing a daemon from a diffe... |
|
BrendanD |
General Coding Help |
8 |
3,385 |
Apr-02-2020, 06:06 PM |
|
|
Thread: FTP with special character in password
Post: RE: FTP with special character in password
I am assuming you have already tested the ftp from the command line or from a GUI?
Have you tried utf-8 or ansi encoding? |
|
BrendanD |
Networking |
5 |
4,429 |
Apr-02-2020, 02:10 PM |
|
|
Thread: FTP with special character in password
Post: RE: FTP with special character in password
|
BrendanD |
Networking |
5 |
4,429 |
Apr-01-2020, 08:35 PM |
|
|
Thread: It seems like the overall Python syntax would be error prone
Post: RE: It seems like the overall Python syntax would ...
My only dislike, really, is that sometimes the code is too vertical (i.e. laddered) if you adopt the most consistent coding style. |
|
BrendanD |
News and Discussions |
13 |
5,901 |
Apr-01-2020, 08:33 PM |
|
|
Thread: It seems like the overall Python syntax would be error prone
Post: RE: It seems like the overall Python syntax would ...
It is a design aesthetic(thank god for spellcheck). Whether you like it or not is completely subjective. As a fossil whose first language was ATARI BASIC and then fortran, I like it a lot more than I ... |
|
BrendanD |
News and Discussions |
13 |
5,901 |
Apr-01-2020, 08:28 PM |
|
|
Thread: Upload takes too long.
Post: RE: Upload takes too long.
I looked over at the WOW page. Your datestr above is supposed to be the measurement time, the one that should be in your csv file. Or I am misunderstanding. I don;t understand what you mean by: Quote:... |
|
BrendanD |
General Coding Help |
29 |
7,602 |
Apr-01-2020, 08:21 PM |
|
|
Thread: Upload takes too long.
Post: RE: Upload takes too long.
Okay so:
1) Does WOW only take data with timestamps exactly 5 minutes apart? (per siteid)
OR
2) Does WOW only allow one upload every 5 minutes? (per siteid)
Without the correct answer to this question... |
|
BrendanD |
General Coding Help |
29 |
7,602 |
Apr-01-2020, 07:19 PM |
|
|
Thread: Access a variable of a daemon
Post: RE: Access a variable of a daemon
A static method can neither modify object state nor class state. https://realpython.com/instance-class-an...ic-methods
Additionally, in your __main__ code, it looks like you want to call from the com... |
|
BrendanD |
General Coding Help |
8 |
3,385 |
Apr-01-2020, 07:12 PM |