Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
Python-3.10.14 /
Doc /
includes /
Delete
Unzip
Name
Size
Permission
Date
Action
sqlite3
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
custom.c
987
B
-rw-r--r--
2024-03-19 22:46
custom2.c
3.38
KB
-rw-r--r--
2024-03-19 22:46
custom3.c
4.52
KB
-rw-r--r--
2024-03-19 22:46
custom4.c
4.81
KB
-rw-r--r--
2024-03-19 22:46
dbpickle.py
2.8
KB
-rw-r--r--
2024-03-19 22:46
email-alternative.py
1.68
KB
-rw-r--r--
2024-03-19 22:46
email-dir.py
3
KB
-rw-r--r--
2024-03-19 22:46
email-headers.py
950
B
-rw-r--r--
2024-03-19 22:46
email-mime.py
930
B
-rw-r--r--
2024-03-19 22:46
email-read-alternative.py
2.84
KB
-rw-r--r--
2024-03-19 22:46
email-simple.py
585
B
-rw-r--r--
2024-03-19 22:46
email-unpack.py
1.55
KB
-rw-r--r--
2024-03-19 22:46
minidom-example.py
1.54
KB
-rw-r--r--
2024-03-19 22:46
mp_newtype.py
1.89
KB
-rw-r--r--
2024-03-19 22:46
mp_pool.py
3.8
KB
-rw-r--r--
2024-03-19 22:46
mp_workers.py
1.55
KB
-rw-r--r--
2024-03-19 22:46
run-func.c
1.94
KB
-rw-r--r--
2024-03-19 22:46
setup.py
329
B
-rw-r--r--
2024-03-19 22:46
sublist.c
1.55
KB
-rw-r--r--
2024-03-19 22:46
test.py
3.56
KB
-rw-r--r--
2024-03-19 22:46
turtle-star.py
155
B
-rw-r--r--
2024-03-19 22:46
typestruct.h
2.42
KB
-rw-r--r--
2024-03-19 22:46
tzinfo_examples.py
5.72
KB
-rw-r--r--
2024-03-19 22:46
Save
Rename
import time import random from multiprocessing import Process, Queue, current_process, freeze_support # # Function run by worker processes # def worker(input, output): for func, args in iter(input.get, 'STOP'): result = calculate(func, args) output.put(result) # # Function used to calculate result # def calculate(func, args): result = func(*args) return '%s says that %s%s = %s' % \ (current_process().name, func.__name__, args, result) # # Functions referenced by tasks # def mul(a, b): time.sleep(0.5*random.random()) return a * b def plus(a, b): time.sleep(0.5*random.random()) return a + b # # # def test(): NUMBER_OF_PROCESSES = 4 TASKS1 = [(mul, (i, 7)) for i in range(20)] TASKS2 = [(plus, (i, 8)) for i in range(10)] # Create queues task_queue = Queue() done_queue = Queue() # Submit tasks for task in TASKS1: task_queue.put(task) # Start worker processes for i in range(NUMBER_OF_PROCESSES): Process(target=worker, args=(task_queue, done_queue)).start() # Get and print results print('Unordered results:') for i in range(len(TASKS1)): print('\t', done_queue.get()) # Add more tasks using `put()` for task in TASKS2: task_queue.put(task) # Get and print some more results for i in range(len(TASKS2)): print('\t', done_queue.get()) # Tell child processes to stop for i in range(NUMBER_OF_PROCESSES): task_queue.put('STOP') if __name__ == '__main__': freeze_support() test()