Skip to content

Instantly share code, notes, and snippets.

import requests
import requests_mock
import requests_cache
with requests_mock.mock() as mock:
mock.get("mock://test", text="test")
requests_cache.install_cache("test_cache", backend="memory")
# -> RecursionError: maximum recursion depth exceeded
1kastner /
Created Dec 27, 2015
In case you needed to abort the downloads because of an unstable connection
import os
import os.path
import re
import shutil
DB_BASE = "/home/marvin/projectrepository/AudioFiles/voxforge"
for f in os.listdir("."):
match = re.match("(.*)\.tgz.[0-9]", f)
if match:
# Elie Khoury <>
# Date: Thu Aug 22 18:17:29 CEST 2013
# Copyright (C) 2012-2013 Idiap Research Institute, Martigny, Switzerland
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
You can’t perform that action at this time.