Results of 1 - 10 of about 65 for Pool (0.017 sec.)
- multiprocessing --- プロセスベースの並列処理 — Python 3.14.8 ドキュメント 14271
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 並行実行 » multiprocessing --- プロセスベースの並列処理 テーマ 自動 ライト ダーク | multiprocessing --- プロセスベースの並列処理 ¶
...multiple processors on a given machine. It runs on both POSIX and Windows. The multiprocessing module also introduces the Pool object which offers a convenient means of parallelizing the execution of a function across multiple input values, distribu...ions in a module so that child processes can successfully import that module. This basic example of data parallelism using Pool , from multiprocessing import Pool def f ( x ): return x * x if __name__ == '__main__' : with Pool ( 5 ) as p : print ( p...the threading module, like the ability to terminate , interrupt or kill a running process. 参考 concurrent.futures.ProcessPoolExecutor offers a higher level interface to push tasks to a background process without blocking execution of the calling pr... - https://man.mtool.work/python/3.14/library/multiprocessing.html
- multiprocessing --- プロセスベースの並列処理 — Python 3.14.8 ドキュメント 14199
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 並行実行 » multiprocessing --- プロセスベースの並列処理 テーマ 自動 ライト ダーク | multiprocessing --- プロセスベースの並列処理 ¶
...multiple processors on a given machine. It runs on both POSIX and Windows. The multiprocessing module also introduces the Pool object which offers a convenient means of parallelizing the execution of a function across multiple input values, distribu...ions in a module so that child processes can successfully import that module. This basic example of data parallelism using Pool , from multiprocessing import Pool def f ( x ): return x * x if __name__ == '__main__' : with Pool ( 5 ) as p : print ( p...the threading module, like the ability to terminate , interrupt or kill a running process. 参考 concurrent.futures.ProcessPoolExecutor offers a higher level interface to push tasks to a background process without blocking execution of the calling pr... - https://man.mtool.work/python/3.14/library/multiprocessing.html
- itertools --- 効率的なループ用のイテレータ生成関数群 — Python 3.14.8 ドキュメン... 9118
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 関数型プログラミング用モジュール » itertools --- 効率的なループ用のイテレータ生成関数群 テーマ 自動 ライト ダーク | itertools --- 効
...combinations ( iterable , r ): # combinations('ABCD', 2) → AB AC AD BC BD CD # combinations(range(4), 3) → 012 013 023 123 pool = tuple ( iterable ) n = len ( pool ) if r > n : return indices = list ( range ( r )) yield tuple ( pool [ i ] for i in in...: break else : return indices [ i ] += 1 for j in range ( i + 1 , r ): indices [ j ] = indices [ j - 1 ] + 1 yield tuple ( pool [ i ] for i in indices ) itertools. combinations_with_replacement ( iterable , r ) ¶ 入力 iterable から、それぞれの要素が複...等価です: def combinations_with_replacement ( iterable , r ): # combinations_with_replacement('ABC', 2) → AA AB AC BB BC CC pool = tuple ( iterable ) n = len ( pool ) if not n and r : return indices = [ 0 ] * r yield tuple ( pool [ i ] for i in indice... - https://man.mtool.work/python/3.14/library/itertools.html
- itertools --- 効率的なループ用のイテレータ生成関数群 — Python 3.14.8 ドキュメン... 9118
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 関数型プログラミング用モジュール » itertools --- 効率的なループ用のイテレータ生成関数群 テーマ 自動 ライト ダーク | itertools --- 効
...combinations ( iterable , r ): # combinations('ABCD', 2) → AB AC AD BC BD CD # combinations(range(4), 3) → 012 013 023 123 pool = tuple ( iterable ) n = len ( pool ) if r > n : return indices = list ( range ( r )) yield tuple ( pool [ i ] for i in in...: break else : return indices [ i ] += 1 for j in range ( i + 1 , r ): indices [ j ] = indices [ j - 1 ] + 1 yield tuple ( pool [ i ] for i in indices ) itertools. combinations_with_replacement ( iterable , r ) ¶ 入力 iterable から、それぞれの要素が複...等価です: def combinations_with_replacement ( iterable , r ): # combinations_with_replacement('ABC', 2) → AA AB AC BB BC CC pool = tuple ( iterable ) n = len ( pool ) if not n and r : return indices = [ 0 ] * r yield tuple ( pool [ i ] for i in indice... - https://man.mtool.work/python/3.14/library/itertools.html
- Event loop — Python 3.14.8 ドキュメント 8230
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » Event loop テーマ 自動 ライト ダーク | Event loop ¶ ソースコード: Lib/a
...( timeout = None ) ¶ Schedule the closure of the default executor and wait for it to join all of the threads in the ThreadPoolExecutor . Once this method has been called, using the default executor with loop.run_in_executor() will raise a RuntimeErr...です。 注釈 Both getaddrinfo and getnameinfo internally utilize their synchronous versions through the loop's default thread pool executor. When this executor is saturated, these methods may experience delays, which higher-level networking libraries ma...executor is None . The default executor can be set by loop.set_default_executor() , otherwise, a concurrent.futures.ThreadPoolExecutor will be lazy-initialized and used by run_in_executor() if needed. 以下はプログラム例です: import asyncio import co... - https://man.mtool.work/python/3.14/library/asyncio-eventloop.html
- concurrent.futures --- 並列タスク実行 — Python 3.14.8 ドキュメント 8230
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 並行実行 » concurrent.futures --- 並列タスク実行 テーマ 自動 ライト ダーク | concurrent.futures --- 並列タスク実行 ¶ Added in versi
...el interface for asynchronously executing callables. The asynchronous execution can be performed with threads, using ThreadPoolExecutor or InterpreterPoolExecutor , or separate processes, using ProcessPoolExecutor . Each implements the same interface...s) として実行するようにスケジュールし、呼び出し可能オブジェクトの実行を表現する Future オブジェクトを返します。 with ThreadPoolExecutor ( max_workers = 1 ) as executor : future = executor . submit ( pow , 323 , 1235 ) print ( future . result ()) map...りません。 もし fn の呼び出しが例外を送出した場合、その例外はイテレータから値を受け取る時に送出されます。 When using ProcessPoolExecutor , this method chops iterables into a number of chunks which it submits to the pool as separate tasks. The (approxi... - https://man.mtool.work/python/3.14/library/concurrent.futures.html
- Event loop — Python 3.14.8 ドキュメント 8230
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » Event loop テーマ 自動 ライト ダーク | Event loop ¶ ソースコード: Lib/a
...( timeout = None ) ¶ Schedule the closure of the default executor and wait for it to join all of the threads in the ThreadPoolExecutor . Once this method has been called, using the default executor with loop.run_in_executor() will raise a RuntimeErr...です。 注釈 Both getaddrinfo and getnameinfo internally utilize their synchronous versions through the loop's default thread pool executor. When this executor is saturated, these methods may experience delays, which higher-level networking libraries ma...executor is None . The default executor can be set by loop.set_default_executor() , otherwise, a concurrent.futures.ThreadPoolExecutor will be lazy-initialized and used by run_in_executor() if needed. 以下はプログラム例です: import asyncio import co... - https://man.mtool.work/python/3.14/library/asyncio-eventloop.html
- concurrent.futures --- 並列タスク実行 — Python 3.14.8 ドキュメント 8230
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 並行実行 » concurrent.futures --- 並列タスク実行 テーマ 自動 ライト ダーク | concurrent.futures --- 並列タスク実行 ¶ Added in versi
...el interface for asynchronously executing callables. The asynchronous execution can be performed with threads, using ThreadPoolExecutor or InterpreterPoolExecutor , or separate processes, using ProcessPoolExecutor . Each implements the same interface...s) として実行するようにスケジュールし、呼び出し可能オブジェクトの実行を表現する Future オブジェクトを返します。 with ThreadPoolExecutor ( max_workers = 1 ) as executor : future = executor . submit ( pow , 323 , 1235 ) print ( future . result ()) map...りません。 もし fn の呼び出しが例外を送出した場合、その例外はイテレータから値を受け取る時に送出されます。 When using ProcessPoolExecutor , this method chops iterables into a number of chunks which it submits to the pool as separate tasks. The (approxi... - https://man.mtool.work/python/3.14/library/concurrent.futures.html
- random --- 疑似乱数を生成する — Python 3.14.8 ドキュメント 8001
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 数値と数学モジュール » random --- 疑似乱数を生成する テーマ 自動 ライト ダーク | random --- 疑似乱数を生成する ¶ ソースコード: Lib/
...ndom def random_product ( * iterables , repeat = 1 ): "Random selection from itertools.product(*iterables, repeat=repeat)" pools = tuple ( map ( tuple , iterables )) * repeat return tuple ( map ( random . choice , pools )) def random_permutation ( it...erable , r = None ): "Random selection from itertools.permutations(iterable, r)" pool = tuple ( iterable ) r = len ( pool ) if r is None else r return tuple ( random . sample ( pool , r )) def random_combinat...ion ( iterable , r ): "Random selection from itertools.combinations(iterable, r)" pool = tuple ( iterable ) n = len ( pool ) indices = sorted ( random . sample ( range ( n ), r )) return tuple ( pool [ i ] for... - https://man.mtool.work/python/3.14/library/random.html
- random --- 疑似乱数を生成する — Python 3.14.8 ドキュメント 8001
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 数値と数学モジュール » random --- 疑似乱数を生成する テーマ 自動 ライト ダーク | random --- 疑似乱数を生成する ¶ ソースコード: Lib/
...ndom def random_product ( * iterables , repeat = 1 ): "Random selection from itertools.product(*iterables, repeat=repeat)" pools = tuple ( map ( tuple , iterables )) * repeat return tuple ( map ( random . choice , pools )) def random_permutation ( it...erable , r = None ): "Random selection from itertools.permutations(iterable, r)" pool = tuple ( iterable ) r = len ( pool ) if r is None else r return tuple ( random . sample ( pool , r )) def random_combinat...ion ( iterable , r ): "Random selection from itertools.combinations(iterable, r)" pool = tuple ( iterable ) n = len ( pool ) indices = sorted ( random . sample ( range ( n ), r )) return tuple ( pool [ i ] for... - https://man.mtool.work/python/3.14/library/random.html