- using Ansible command line:
 
ansible-playbook --connection=local 127.0.0.1 playbook.yml- using inventory:
 
127.0.0.1 ansible_connection=local| #ifndef __CONSUMERPRODUCERQUEUE_H__ | |
| #define __CONSUMERPRODUCERQUEUE_H__ | |
| #include <queue> | |
| #include <mutex> | |
| #include <condition_variable> | |
| /* | |
| * Some references in order | |
| * | 
ansible-playbook --connection=local 127.0.0.1 playbook.yml127.0.0.1 ansible_connection=local| #define BOOST_RESULT_OF_USE_DECLTYPE | |
| #include <chrono> | |
| #include <thread> | |
| #include <boost/mpi.hpp> | |
| #include <iostream> | |
| #include <sstream> | |
| #include <utility> | 
Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and  sample rate to 22050 Hz:
| """Simple demo of using Flask with aiohttp via aiohttp-wsgi's | |
| WSGIHandler. | |
| """ | |
| import asyncio | |
| from aiohttp import web | |
| from aiohttp_wsgi import WSGIHandler | |
| from flask import Flask, render_template | 
| """ | |
| This gist shows how to run asyncio loop in a separate thread. | |
| It could be useful if you want to mix sync and async code together. | |
| Python 3.7+ | |
| """ | |
| import asyncio | |
| from datetime import datetime | |
| from threading import Thread | |
| from typing import Tuple, List, Iterable | 
This is a script to change the sound speed in real time like for example background music in pygame.
The script generates the raw data of a sound file each time there is space in the queue. The sample will scale to the desired speed which you can modify with sound_Factor.
To play the music, you just need to get buffers from the queue and pass them to your music stream. Exemple for pygame :
# musique update
if channel.get_queue() == None:| # files/env: | |
| Defaults env_keep += "SSH_AUTH_SOCK" | |
| # tasks/main.yml | |
| - name: ensure sudo keeps SSH_AUTH_SOCK in environment | |
| copy: src=env | |
| dest=/etc/sudoers.d/env | |
| mode=0440 | |
| owner=root | |
| group=root |