This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from IPython.display import Audio | |
from pathlib import Path | |
def _playsoundJupyter(sound, block=True): | |
sound = Path(sound) | |
sound = str(Path(get_ipython().home_dir, sound.name)) | |
audio = Audio(sound, autoplay=False) | |
display(audio) | |
from platform import system |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def save(self, savefile): | |
"""Do the TTS API request and write result to file. | |
Args: | |
savefile (string): The path and file name to save the ``mp3`` to. | |
Raises: | |
:class:`gTTSError`: When there's an error with the API request. | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
import os | |
root = Path(__file__).parent | |
git_folders = root.rglob("*.git") | |
for git_dir in git_folders: | |
git = git_dir.parent | |
print('stash and pull master: ', git) | |
res = os.system(f'(cd {git} && git stash && git checkout master && git pull)') |
OlderNewer