AWS chat

For discussing AWS topics
Oct 15, 2020 13:50
Hello Everyone,
Can anyone provide an answer to the below question:
https://serverfault.com/questions/1036919/using-multiple-permit-open-with-match-groups-in-sshd-config-file-in-aws
 

Python

Room rules: sopython.com/chatroom Code formatting guide: tinyu...
Jan 23, 2020 20:41
Hello ..
I'm using multiprocessing...in that i have a query..
in process1, i connect a server via websocket which takes input from the user..
in process2, i get the search result and post it back to the user..
so the class in process1 will be shared in process2 or not??

if it not shared, then what should i do.. i can only create only 1 websocket connection
Dec 13, 2019 15:21
ok.. got it
Thanks
one more thing if the loop gets over then the number of threads will also get decreased??
Dec 13, 2019 15:17
well i can determine in the slack whether it is a bot or not ....
so what i understood is that in the query() function, i have to determine whether it is a bot or not,
if it is a bot i have to create a function with only return statement...??? but you said that every function has return in the end ..
so how can i close that
Dec 13, 2019 15:11
i put return in slack_post
Dec 13, 2019 15:10
yes
Dec 13, 2019 15:10
i tried that but it is not working
Dec 13, 2019 15:09
well if i create that function then how am i going to stop it..
will stopping that thread will be sufficient..or is there any other way i can stop it
Dec 13, 2019 15:04
Hello All,

i new to python and have created a slack bot in it

https://pastebin.com/LjHc4gfB

There are 2 problem in this one:

i'm trying to do it in multithreaded manner as it should be able to handle multiple request at the same time but unable to make it in that manner
the another thing is when it posts the message in slack it takes that message as the input
For example: if user input ip address
it output its details (which it should do)
but it takes that output as the input (which it should not do) and that cycle goes on and on
Jul 1, 2018 10:53
dir(module name)
Jul 1, 2018 10:52
hello,
iam new in python and i want to access python documentation in eclipse,
i familiar in java as for any function i have to press ctrl+space and it shows the help menu but here iam not getting it
i searched over the net and it says help(module name)
 
Jan 7, 2019 01:49
i want to update the file
Jan 7, 2019 01:49
awk '{ print $0, ($1 % 2 ? "odd" : "even") " number" }' file > newfile

this command is not updating the file it is creating a new file
Jan 7, 2019 01:48
@Fawkes your regex doesn't do anything to identify even or odd numbers, do you still need help with this?

basically never use sed -i twice on the same file, you can usually refactor to a single sed script and run multiple actions on the filei want to update the existing file not create a new file
Dec 23, 2018 06:26
the output which i am getting is as
99
odd number
even number
100
odd number
even number
Dec 23, 2018 06:24
i am new to script
here is the link:https://pastebin.com/AAa373jK
the script is find the odd and even number from a text file and have to update the same file by writing the number as odd/even
for eg:if the txt file have number like
99
100
then it should update as
99 odd number
100 even number
Dec 23, 2018 06:22
hi
 

Java

Dedicated to the discussion of the Java programming language a...
Aug 1, 2018 06:43
but these days everything is virtualised so its hard to say
Aug 1, 2018 06:42
NIC--network interface card
Aug 1, 2018 06:40
the OS or kernel will ping
Aug 1, 2018 06:39
how can it itself ping
Aug 1, 2018 06:39
NIC is only hardware
Aug 1, 2018 06:39
but i thought at the end it is the system which respond back not the NIC
Aug 1, 2018 06:38
well i said that only,but the interviewer said that it will ping because of NIC
Aug 1, 2018 06:37
it is not responding
Aug 1, 2018 06:37
that is the only info...
Aug 1, 2018 06:33
if my server is in hang state,will it ping or not??
Aug 1, 2018 06:28
can i ask it??
Aug 1, 2018 06:28
i have a que which isn't related to java,but it's a very very basic question
Aug 1, 2018 06:27
hi
Jan 8, 2018 13:15
okay understood....
Jan 8, 2018 13:13
i mean what is the error in the story
Jan 8, 2018 13:13
@Wietlol whats the story??
Jan 8, 2018 13:13
@wi
Jan 8, 2018 13:09
-2
Q: Copy file into specific directory in java

FawkesBelow is the code for copy a file from one directory to another directory. For eg: if the filename is Red-Already over,Red-Already Over(slow),NEFFEX-Destiny,then it should create a directory name red and copy the file into it, For another artist it should NEFFEX folder and copy the file into it. ...

Aug 13, 2017 09:28
but then also nothing happened
Aug 13, 2017 09:28
i created seperate thread for it
Aug 13, 2017 09:27
something is wrong with the logic
Aug 13, 2017 09:27
but then also abnormal speed
Aug 13, 2017 09:27
i did with timer also
Aug 13, 2017 09:27
every 2-3 seconds
Aug 13, 2017 09:27
no
Aug 13, 2017 09:24
sorry not able to understand
Aug 13, 2017 09:20
Aug 13, 2017 09:19
inside while loop speed one is written
Aug 13, 2017 09:19
and then there is while loop]
Aug 13, 2017 09:19
System.currentmillis
Aug 13, 2017 09:18
before only
Aug 13, 2017 09:18
yes i had already tried both but then also iam getting abnormal speed
Aug 13, 2017 04:04
eg:44310.43KBPS,375960.44KBPS