Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vigeng/python-snippets
common python programming snippets.
https://github.com/vigeng/python-snippets
Last synced: about 1 month ago
JSON representation
common python programming snippets.
- Host: GitHub
- URL: https://github.com/vigeng/python-snippets
- Owner: ViGeng
- Created: 2024-06-13T12:14:47.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-06-17T11:38:04.000Z (7 months ago)
- Last Synced: 2024-06-17T13:02:57.994Z (7 months ago)
- Language: Python
- Size: 590 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python Programming Snippets
- [x] [Inter-process communication](inter-process-comm/producer_consumer.py)
* Producer-consumer problem
* using `multiprocessing` queue
* on different processes on the same machine on different CPUs
* ![CPU Utilization rate](./assets/readme/ipc.png)
- [x] [multi thread and routines](./concurrency/routines.py)
* using `threading` and event loop
* server-client communication
* ![running log](./assets/readme/routines.png)
- [x] multi-process: server and client: [multi-process](./network/multiproc.py), [multi-process and IPC](./network/multiproc-sep-worker.py)
* using `multiprocessing` and `websockets`
* server-client communication
* ![two processes are running on different cores](./assets/readme/multi-process.png)
## TODO
- [ ] Network
- [ ] webrtc