« first day (3289 days earlier)      last day (813 days later) » 

6:49 AM
-1
Q: Python subprocess and Popen doesnt show the output for MongoDB service on Ubuntu

fenderogiI am trying to read "PRIMARY" or "SECONDARY" status of my 3 members replica set by using subprocess in my code from Ubuntu Shell. But it doesn't show the output without terminating the code with "CTRL+C". Here is my code: from subprocess import Popen, PIPE def check_primary_mongodb_services(): ...

 
 
1 hour later…
 
3 hours later…
12:19 PM
1
Q: Display the total number of records in the data set

Wesley def total_records(num_records): f""" Task 5: Display the total number of records in the data set. The function should display a message in the following format: "There are {num_records} records in the data set." Where {num_records} is the value of the parameter passed t...

 
 
2 hours later…
2:13 PM
0
Q: How do I sync a windows10 folder with an AWS server running ubuntu-docker?

StevphenAs the title says I've got an AWS EC2 ubuntu-docker 20.4 and I want to sync a local folder from my Windows10 machine. Everything I can find online seems to be from 5+ years ago, in some cases that warn they're very old. I can't find a stackoverflow question that answers this specific question. Wh...

 
2:35 PM
0
Q: Python: Why re.sub() is actually keeping the replace pattern

JeranI though re.sub() is for replacemenmt. For example: import re print(re.sub('ab', 'ad', 'abc')) The output is 'adc' of course. However, when I try this: s = "hello world!" print(re.sub("[^A-Za-z]", "+", s)) The output is weirdly 'hello+world+' instead of '+++++ +++++!'. It actually keeps all the...

 
 
4 hours later…

« first day (3289 days earlier)      last day (813 days later) »