webapp rec – How to create an application that runs 24/7, and do some tasks at some specific times?

I want to create a (web)application that always runs in the background. At certain specific times, the application has to perform tasks.

Example: An application that displays a number and is set to 0 every first day of the month. The number increases by 1 every day at 8:00 PM. Furthermore, the number will be increased by 10 on the 7th, 14th, 21st, and 28th day of the month at 3:00 AM.

The app must therefore always be on (as in: the app must always ‘wait / listen’ for times to perform tasks, and execute them when the time comes). These tasks are on specific days of the month, at specific times of the day. In the actual application, the tasks will use a MySQL or SQLite database.

My question: Is this realistic? And if so: Which software / programming language can I use best for this? My preference would be in Anroid Studio, with the programming language Java.

azure – Sentiment analysis for speech in MS Teams meetings (classrooms to be more specific)

I’m looking for a solution that could be used with MS Teams for Education that could be used for sentiment analysis in real time during classroom discussions in synchronous on-line learning. I assume Azure’s Speech to Text could capture what is said but not sure what tools are available for the analysis.
Comments by individual students are not as important as gauging the overall sentiment in the classroom and ideally it would go past simply positive/negative to detecting mood, words or phrases that are being used frequently, lapses between questions and answers, etc.
Ideally the data could then be fed into Power BI for providing real-time indicators of what is happening in the class.

Any suggestions?

How to send BTC amount from one specific address in Bitcoin Core

I canceled one transaction that was in the memory pool, now I would like to make sure that this transaction will not be sent anymore sending all BTC amount of the original address of this transaction to another address, but when I go to send BTC in Bitcoin Core, I can’t choose one specific address to send the amount. So what Can I do to “empty” the bitcoins of this address using Bitcoin Core?

Can’t block specific IP address with iptables, ubuntu 16.04

I’m trying to troubleshoot Fail2ban recognizing our http-get-dos trigger, but not actually banning the offending host. I can see it adding entries to iptables rules, but they don’t have any affect.

So I tried to manually ban a host, and I cant get that to work either.

I’m trying to drop all traffic from a specific host. I inserted a DROP rule, and appended a DROP rule, so they bookend everything. I’ve X’ed out the ip address of the host I’m trying to ban. This host can still connect to my web server, and get web pages.

I must be missing something stupid.
Here’s the iptables -nvL output:

sudo iptables -nvL
Chain INPUT (policy ACCEPT 6226 packets, 31M bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 DROP       all  --  *      *       XX.XX.XX.XX
85222 7764K fail2ban-xmlrpc  tcp  --  *      *              tcp dpt:80
85222 7764K fail2ban-HTTP  tcp  --  *      *              tcp dpt:80
85222 7764K fail2ban-HTTP  tcp  --  *      *              tcp dpt:80
 137K   16M fail2ban-BadBots  tcp  --  *      *              multiport dports 80,443
   82  7136 fail2ban-sasl  tcp  --  *      *              multiport dports 25,465,587,143,220,993,110,995
   82  7136 fail2ban-postfix  tcp  --  *      *              multiport dports 25,465,587
 137K   16M fail2ban-apache-overflows  tcp  --  *      *              multiport dports 80,443
 137K   16M fail2ban-apache-noscript  tcp  --  *      *              multiport dports 80,443
16620 1181K fail2ban-ssh-ddos  tcp  --  *      *              multiport dports 22
16621 1181K fail2ban-ssh  tcp  --  *      *              multiport dports 22
    0     0 DROP       all  --  *      *       XX.XX.XX.XX

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 6649 packets, 5149K bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain fail2ban-BadBots (1 references)
 pkts bytes target     prot opt in     out     source               destination
 137K   16M RETURN     all  --  *      *  

Chain fail2ban-HTTP (2 references)
 pkts bytes target     prot opt in     out     source               destination
 170K   16M RETURN     all  --  *      *  
    0     0 RETURN     all  --  *      *  

Chain fail2ban-apache-noscript (1 references)
 pkts bytes target     prot opt in     out     source               destination
 137K   16M RETURN     all  --  *      *  

Chain fail2ban-apache-overflows (1 references)
 pkts bytes target     prot opt in     out     source               destination
 137K   16M RETURN     all  --  *      *  

Chain fail2ban-postfix (1 references)
 pkts bytes target     prot opt in     out     source               destination
   82  7136 RETURN     all  --  *      *  

Chain fail2ban-sasl (1 references)
 pkts bytes target     prot opt in     out     source               destination
   82  7136 RETURN     all  --  *      *  

Chain fail2ban-ssh (1 references)
 pkts bytes target     prot opt in     out     source               destination
16621 1181K RETURN     all  --  *      *  

Chain fail2ban-ssh-ddos (1 references)
 pkts bytes target     prot opt in     out     source               destination
16620 1181K RETURN     all  --  *      *  

Chain fail2ban-xmlrpc (1 references)
 pkts bytes target     prot opt in     out     source               destination

and here’s the iptables -S output:

sudo iptables -S
-N fail2ban-BadBots
-N fail2ban-HTTP
-N fail2ban-apache-noscript
-N fail2ban-apache-overflows
-N fail2ban-postfix
-N fail2ban-sasl
-N fail2ban-ssh
-N fail2ban-ssh-ddos
-N fail2ban-xmlrpc
-A INPUT -p tcp -m tcp --dport 80 -j fail2ban-xmlrpc
-A INPUT -p tcp -m tcp --dport 80 -j fail2ban-HTTP
-A INPUT -p tcp -m tcp --dport 80 -j fail2ban-HTTP
-A INPUT -p tcp -m multiport --dports 80,443 -j fail2ban-BadBots
-A INPUT -p tcp -m multiport --dports 25,465,587,143,220,993,110,995 -j fail2ban-sasl
-A INPUT -p tcp -m multiport --dports 25,465,587 -j fail2ban-postfix
-A INPUT -p tcp -m multiport --dports 80,443 -j fail2ban-apache-overflows
-A INPUT -p tcp -m multiport --dports 80,443 -j fail2ban-apache-noscript
-A INPUT -p tcp -m multiport --dports 22 -j fail2ban-ssh-ddos
-A INPUT -p tcp -m multiport --dports 22 -j fail2ban-ssh
-A fail2ban-BadBots -j RETURN
-A fail2ban-HTTP -j RETURN
-A fail2ban-HTTP -j RETURN
-A fail2ban-apache-noscript -j RETURN
-A fail2ban-apache-overflows -j RETURN
-A fail2ban-postfix -j RETURN
-A fail2ban-sasl -j RETURN
-A fail2ban-ssh -j RETURN
-A fail2ban-ssh-ddos -j RETURN
-A fail2ban-xmlrpc -j RETURN

python – How to find cell data value at a specific cell position?

I have this next code to select the cell position at a given condition. This is from a raster. As you’ll see I’m using NumPy and Pandas for this:

f = np.column_stack(np.where(demData>0))

When I print f I get something like this:


((  0  89)
 (  0  90)
 (  0  91)
 (  1  90)
 (  1  91)
 (  1  92)
 (  1  93)
 (  2  92)
 (  2  93))

Now with this previous result, what I’d like to obtain is the data value at that cell position. For example:

df = pd.DataFrame(demDataStage)

And, the result:


I have in mind something like this next code but I only get a single value (the last one corresponding to the last cell in f) but not an array. The result B is a NumPy array but a single number is showing:

row = f(:,0)
col = f(:,1) 

for i in row:
    for c in col:
        B = df.at(i,c)

As you can see it’s not a list or array that returns the cell’s data value from the raster at each row,col cell position. I have more that 200 columns and rows so it’s easier with something similar to what I showed above but I haven’t found the way yet. Any suggestion is very appreciated, thanks!

screen – How to set minimum width under developer options only for specific apps?

My device is a Samsung Galaxy A40 running Android 10 (but it probably doesn’t matter that much in this case)

I want an app to think that my screen is the size of a tablet, because in that app it might be beneficial to have larger screen size. I went to developer settings, and under “Minimum width” , I changed the default value which was 360 dp, to 800 dp. Now the app thinks my display is larger, and it gives me a slightly better interface. However, the only problem is that now the rest of the OS also thinks that this is my screen size.

Is there any way to set the “minimum width” only for that app, and not the rest of the Android interface?

Sending lightning payment between TOR lighning nodes, any specific setup required?

I have two c-lightning nodes in different VMs in Qubes OS, both routed through TOR VM.
They both can connect to other public nodes and establish channels with them but when I try sending satoshis between them the sending node gives “Could not find a route” code 205 right away, like it’s not even trying.
At the same time in the terminal where lightningd is running I get:

20-07-01T12:46:17.482Z DEBUG gossipd: REPLY WIRE_GOSSIP_GETCHANNELS_REPLY with 0 fds
2020-07-01T12:46:17.484Z DEBUG gossipd: Trying to find a route from (me) to 0xxx_ID_EDITEDOUT_XXX for 40000000msat
2020-07-01T12:46:17.484Z DEBUG gossipd: REPLY WIRE_GOSSIP_GETROUTE_REPLY with 0 fds

Is it possible the problem for that to be related to TOR, considering that I can connect to and open channels with public nodes just fine?
I haven’t opened direct channel between the nodes, since I want to play with routing.
But each of those nodes has established channel with some of the most well connected nodes, so route exist for sure.

how to create specific google groups with set of filters(paarameters)

I have an enterprise account and there are around 1500 employees across 4 location (A,B,C,D). If i want to create a group which has people from location A and D who belongs to some specific function like design team. How I will create a group with these parameters also if any new joiner added to the group they need to automatically add to the group which i created since the new joiner falls under the parameter i selected.

How to NOT a specific pattern?

been going around in cirlces on this:

{1/3, 1, 0.22, 3, "v", 4} /. _?NumericQ -> "999"

Now I’m trying to replace everything that is not a number; is there a way to do this? using Not or Except perhaps…I’ve tried but I must be getting the syntax wrong!