body stringlengths 26 98.2k | body_hash int64 -9,222,864,604,528,158,000 9,221,803,474B | docstring stringlengths 1 16.8k | path stringlengths 5 230 | name stringlengths 1 96 | repository_name stringlengths 7 89 | lang stringclasses 1
value | body_without_docstring stringlengths 20 98.2k |
|---|---|---|---|---|---|---|---|
def main():
'Orchestration function for the CLI.'
args = _parse_args()
path = pathlib.Path('lists', args.words)
try:
words = _load_words(path)
except IOError:
print('Exiting.')
return
if (args.quiz_length is not None):
if (args.quiz_length == 0):
print... | 2,238,173,093,987,113,500 | Orchestration function for the CLI. | deutscheflash.py | main | n-Holmes/deutscheflash | python | def main():
args = _parse_args()
path = pathlib.Path('lists', args.words)
try:
words = _load_words(path)
except IOError:
print('Exiting.')
return
if (args.quiz_length is not None):
if (args.quiz_length == 0):
print('Starting quiz in endless mode. Answ... |
def _load_words(path):
'Encapsulates the loading/newfile creation logic.'
try:
words = WordList(path)
print('Words successfully loaded.')
except FileNotFoundError:
print(f'No word list found with given name.')
newfile = force_console_input('Would you like to create a new word... | -75,499,848,688,464,940 | Encapsulates the loading/newfile creation logic. | deutscheflash.py | _load_words | n-Holmes/deutscheflash | python | def _load_words(path):
try:
words = WordList(path)
print('Words successfully loaded.')
except FileNotFoundError:
print(f'No word list found with given name.')
newfile = force_console_input('Would you like to create a new wordlist with the specified name? Y/N: ', options=['y'... |
def _quiz(wordlist, quiz_length):
'Runs a command line quiz of the specified length.'
pd.options.mode.chained_assignment = None
(answered, correct) = (0, 0)
for (word, gender) in wordlist.get_words(quiz_length):
guess = input(f'What is the gender of {word}? ').lower()
if (guess in ('quit... | 4,043,416,046,314,861,000 | Runs a command line quiz of the specified length. | deutscheflash.py | _quiz | n-Holmes/deutscheflash | python | def _quiz(wordlist, quiz_length):
pd.options.mode.chained_assignment = None
(answered, correct) = (0, 0)
for (word, gender) in wordlist.get_words(quiz_length):
guess = input(f'What is the gender of {word}? ').lower()
if (guess in ('quit', 'exit')):
break
answered += ... |
def _quiz_endless(wordlist):
'Runs quizzes in batches of 20 until quit or exit is answered.'
(correct, answered) = (0, 0)
finished = False
while (not finished):
results = _quiz(wordlist, 20)
correct += results[0]
answered += results[1]
finished = (not results[2])
retu... | -2,987,331,019,402,010,000 | Runs quizzes in batches of 20 until quit or exit is answered. | deutscheflash.py | _quiz_endless | n-Holmes/deutscheflash | python | def _quiz_endless(wordlist):
(correct, answered) = (0, 0)
finished = False
while (not finished):
results = _quiz(wordlist, 20)
correct += results[0]
answered += results[1]
finished = (not results[2])
return (correct, answered) |
def _add_words(wordlist):
'CLI for adding words individually to the wordlist.'
print('Type a word with gender eg `m Mann` or `quit` when finished.')
while True:
input_str = input()
if (input_str in ('quit', 'exit')):
print('Exiting word addition mode...')
break
... | 3,481,984,767,297,867,000 | CLI for adding words individually to the wordlist. | deutscheflash.py | _add_words | n-Holmes/deutscheflash | python | def _add_words(wordlist):
print('Type a word with gender eg `m Mann` or `quit` when finished.')
while True:
input_str = input()
if (input_str in ('quit', 'exit')):
print('Exiting word addition mode...')
break
try:
(gender, word) = input_str.split(... |
def _import_words(wordlist, import_path):
'Loads words from a csv file at import_path into `wordlist`.'
new_words = pd.read_csv(import_path)
words_added = 0
repetitions = 0
for (_, row) in new_words.iterrows():
try:
wordlist.add(row.Gender, row.Word)
words_added += 1
... | -6,439,961,186,866,336,000 | Loads words from a csv file at import_path into `wordlist`. | deutscheflash.py | _import_words | n-Holmes/deutscheflash | python | def _import_words(wordlist, import_path):
new_words = pd.read_csv(import_path)
words_added = 0
repetitions = 0
for (_, row) in new_words.iterrows():
try:
wordlist.add(row.Gender, row.Word)
words_added += 1
except ValueError:
repetitions += 1
r... |
def load(self, path: pathlib.Path):
'Load stored data.'
try:
self.words = pd.read_csv(path.with_suffix('.csv'))
with path.with_suffix('.json').open() as f:
self.structure = json.loads(f.read())
self.words.set_index(self.structure['index'], inplace=True)
except FileNotFoun... | -6,622,118,397,276,711,000 | Load stored data. | deutscheflash.py | load | n-Holmes/deutscheflash | python | def load(self, path: pathlib.Path):
try:
self.words = pd.read_csv(path.with_suffix('.csv'))
with path.with_suffix('.json').open() as f:
self.structure = json.loads(f.read())
self.words.set_index(self.structure['index'], inplace=True)
except FileNotFoundError as exception... |
def new(self, language: str='german', score_inertia: int=2):
'Create a new wordlist.\n \n Args:\n language (str): The name of a language in the GENDERS dictionary.\n score_inertia (int): Determines how resistant scores are to change.\n Must be a positive integer. ... | 1,183,356,809,231,257,900 | Create a new wordlist.
Args:
language (str): The name of a language in the GENDERS dictionary.
score_inertia (int): Determines how resistant scores are to change.
Must be a positive integer. Higher values will require more consecutive
correct answers to reduce the frequency of a specific word. | deutscheflash.py | new | n-Holmes/deutscheflash | python | def new(self, language: str='german', score_inertia: int=2):
'Create a new wordlist.\n \n Args:\n language (str): The name of a language in the GENDERS dictionary.\n score_inertia (int): Determines how resistant scores are to change.\n Must be a positive integer. ... |
def save(self, path: pathlib.Path):
'Saves words to a .csv file and structure to a .json.'
self.words.to_csv(path.with_suffix('.csv'))
with path.with_suffix('.json').open(mode='w') as f:
f.write(json.dumps(self.structure)) | -4,607,551,903,324,488,700 | Saves words to a .csv file and structure to a .json. | deutscheflash.py | save | n-Holmes/deutscheflash | python | def save(self, path: pathlib.Path):
self.words.to_csv(path.with_suffix('.csv'))
with path.with_suffix('.json').open(mode='w') as f:
f.write(json.dumps(self.structure)) |
def format_gender(self, gender_string: str):
'Attempts to find a matching gender for gender_string.\n \n Args:\n gender_string (str): A gender for the word list or an alias of a gender.\n \n Returns:\n The associated gender.\n \n Raises:\n V... | -3,906,294,576,666,651,000 | Attempts to find a matching gender for gender_string.
Args:
gender_string (str): A gender for the word list or an alias of a gender.
Returns:
The associated gender.
Raises:
ValueError: `gender_string` does not match any gender or alias. | deutscheflash.py | format_gender | n-Holmes/deutscheflash | python | def format_gender(self, gender_string: str):
'Attempts to find a matching gender for gender_string.\n \n Args:\n gender_string (str): A gender for the word list or an alias of a gender.\n \n Returns:\n The associated gender.\n \n Raises:\n V... |
def add(self, gender: str, word: str):
'Add a new word to the list.\n \n Args:\n gender (str): The gender of the word being added.\n word (str): The word to add.\n \n Raises:\n ValueError: `gender` does not match the current wordlist or the word is\n ... | 8,154,714,252,581,393,000 | Add a new word to the list.
Args:
gender (str): The gender of the word being added.
word (str): The word to add.
Raises:
ValueError: `gender` does not match the current wordlist or the word is
already present in the list. | deutscheflash.py | add | n-Holmes/deutscheflash | python | def add(self, gender: str, word: str):
'Add a new word to the list.\n \n Args:\n gender (str): The gender of the word being added.\n word (str): The word to add.\n \n Raises:\n ValueError: `gender` does not match the current wordlist or the word is\n ... |
def get_words(self, n: int, distribution: str='weighted'):
'Selects and returns a sample of words and their genders.\n\n Args:\n n (int): The number of results wanted.\n distribution (str): The sampling method to use. Either `uniform` or\n `weighted`.\n\n Yields:\n... | 3,524,817,988,150,667,000 | Selects and returns a sample of words and their genders.
Args:
n (int): The number of results wanted.
distribution (str): The sampling method to use. Either `uniform` or
`weighted`.
Yields:
A tuple of strings in the format (word, gender). | deutscheflash.py | get_words | n-Holmes/deutscheflash | python | def get_words(self, n: int, distribution: str='weighted'):
'Selects and returns a sample of words and their genders.\n\n Args:\n n (int): The number of results wanted.\n distribution (str): The sampling method to use. Either `uniform` or\n `weighted`.\n\n Yields:\n... |
def update_weight(self, word, guess):
'Update the weighting on a word based on the most recent guess.\n \n Args:\n word (str): The word to update. Should be in the index of self.words.\n guess (bool): Whether the guess was correct or not.\n '
row = self.words.loc[word]... | -5,768,436,137,946,433,000 | Update the weighting on a word based on the most recent guess.
Args:
word (str): The word to update. Should be in the index of self.words.
guess (bool): Whether the guess was correct or not. | deutscheflash.py | update_weight | n-Holmes/deutscheflash | python | def update_weight(self, word, guess):
'Update the weighting on a word based on the most recent guess.\n \n Args:\n word (str): The word to update. Should be in the index of self.words.\n guess (bool): Whether the guess was correct or not.\n '
row = self.words.loc[word]... |
@staticmethod
def _get_aliases(genders: dict):
'Create a dictionary of aliases and the genders they refer to.\n May have issues if multiple genders have the same article or first letter.\n '
aliases = {}
for (gender, article) in genders.items():
aliases[gender[0]] = gender
alia... | -1,152,857,438,026,829,700 | Create a dictionary of aliases and the genders they refer to.
May have issues if multiple genders have the same article or first letter. | deutscheflash.py | _get_aliases | n-Holmes/deutscheflash | python | @staticmethod
def _get_aliases(genders: dict):
'Create a dictionary of aliases and the genders they refer to.\n May have issues if multiple genders have the same article or first letter.\n '
aliases = {}
for (gender, article) in genders.items():
aliases[gender[0]] = gender
alia... |
def check_files(test_dir, expected):
'\n Walk test_dir.\n Check that all dirs are readable.\n Check that all files are:\n * non-special,\n * readable,\n * have a posix path that ends with one of the expected tuple paths.\n '
result = []
locs = []
if filetype.is_file(test_dir):
... | -2,608,846,497,619,735,000 | Walk test_dir.
Check that all dirs are readable.
Check that all files are:
* non-special,
* readable,
* have a posix path that ends with one of the expected tuple paths. | tests/extractcode/extractcode_assert_utils.py | check_files | adityaviki/scancode-toolk | python | def check_files(test_dir, expected):
'\n Walk test_dir.\n Check that all dirs are readable.\n Check that all files are:\n * non-special,\n * readable,\n * have a posix path that ends with one of the expected tuple paths.\n '
result = []
locs = []
if filetype.is_file(test_dir):
... |
def check_no_error(result):
'\n Check that every ExtractEvent in the `result` list has no error or warning.\n '
for r in result:
assert (not r.errors)
assert (not r.warnings) | 4,965,643,873,960,140,000 | Check that every ExtractEvent in the `result` list has no error or warning. | tests/extractcode/extractcode_assert_utils.py | check_no_error | adityaviki/scancode-toolk | python | def check_no_error(result):
'\n \n '
for r in result:
assert (not r.errors)
assert (not r.warnings) |
def is_posixpath(location):
'\n Return True if the `location` path is likely a POSIX-like path using POSIX path\n separators (slash or "/")or has no path separator.\n\n Return False if the `location` path is likely a Windows-like path using backslash\n as path separators (e.g. "").\n '
has_slashe... | 8,070,831,654,675,916,000 | Return True if the `location` path is likely a POSIX-like path using POSIX path
separators (slash or "/")or has no path separator.
Return False if the `location` path is likely a Windows-like path using backslash
as path separators (e.g. ""). | tests/extractcode/extractcode_assert_utils.py | is_posixpath | adityaviki/scancode-toolk | python | def is_posixpath(location):
'\n Return True if the `location` path is likely a POSIX-like path using POSIX path\n separators (slash or "/")or has no path separator.\n\n Return False if the `location` path is likely a Windows-like path using backslash\n as path separators (e.g. ).\n '
has_slashes ... |
def to_posix(path):
'\n Return a path using the posix path separator given a path that may contain posix\n or windows separators, converting \\ to /. NB: this path will still be valid in\n the windows explorer (except as a UNC or share name). It will be a valid path\n everywhere in Python. It will not b... | 7,799,554,777,917,881,000 | Return a path using the posix path separator given a path that may contain posix
or windows separators, converting \ to /. NB: this path will still be valid in
the windows explorer (except as a UNC or share name). It will be a valid path
everywhere in Python. It will not be valid for windows command line operations. | tests/extractcode/extractcode_assert_utils.py | to_posix | adityaviki/scancode-toolk | python | def to_posix(path):
'\n Return a path using the posix path separator given a path that may contain posix\n or windows separators, converting \\ to /. NB: this path will still be valid in\n the windows explorer (except as a UNC or share name). It will be a valid path\n everywhere in Python. It will not b... |
def assertRaisesInstance(self, excInstance, callableObj, *args, **kwargs):
'\n This assertion accepts an instance instead of a class for refined\n exception testing.\n '
kwargs = (kwargs or {})
excClass = excInstance.__class__
try:
callableObj(*args, **kwargs)
except exc... | -8,746,952,931,495,039,000 | This assertion accepts an instance instead of a class for refined
exception testing. | tests/extractcode/extractcode_assert_utils.py | assertRaisesInstance | adityaviki/scancode-toolk | python | def assertRaisesInstance(self, excInstance, callableObj, *args, **kwargs):
'\n This assertion accepts an instance instead of a class for refined\n exception testing.\n '
kwargs = (kwargs or {})
excClass = excInstance.__class__
try:
callableObj(*args, **kwargs)
except exc... |
def check_extract(self, test_function, test_file, expected, expected_warnings=None, check_all=False):
'\n Run the extraction `test_function` on `test_file` checking that a map of\n expected paths --> size exist in the extracted target directory.\n Does not test the presence of all files unless ... | -4,760,245,005,146,296,000 | Run the extraction `test_function` on `test_file` checking that a map of
expected paths --> size exist in the extracted target directory.
Does not test the presence of all files unless `check_all` is True. | tests/extractcode/extractcode_assert_utils.py | check_extract | adityaviki/scancode-toolk | python | def check_extract(self, test_function, test_file, expected, expected_warnings=None, check_all=False):
'\n Run the extraction `test_function` on `test_file` checking that a map of\n expected paths --> size exist in the extracted target directory.\n Does not test the presence of all files unless ... |
def helperUpdate(self, test_name, hpss_path, zstash_path=ZSTASH_PATH):
'\n Test `zstash update`.\n '
self.hpss_path = hpss_path
use_hpss = self.setupDirs(test_name)
self.create(use_hpss, zstash_path)
print_starred('Running update on the newly created directory, nothing should happen')
... | 4,622,368,254,584,358,000 | Test `zstash update`. | tests/test_update.py | helperUpdate | E3SM-Project/zstash | python | def helperUpdate(self, test_name, hpss_path, zstash_path=ZSTASH_PATH):
'\n \n '
self.hpss_path = hpss_path
use_hpss = self.setupDirs(test_name)
self.create(use_hpss, zstash_path)
print_starred('Running update on the newly created directory, nothing should happen')
self.assertWorksp... |
def helperUpdateDryRun(self, test_name, hpss_path, zstash_path=ZSTASH_PATH):
'\n Test `zstash update --dry-run`.\n '
self.hpss_path = hpss_path
use_hpss = self.setupDirs(test_name)
self.create(use_hpss, zstash_path)
print_starred('Testing update with an actual change')
self.assertW... | -5,544,989,246,331,524,000 | Test `zstash update --dry-run`. | tests/test_update.py | helperUpdateDryRun | E3SM-Project/zstash | python | def helperUpdateDryRun(self, test_name, hpss_path, zstash_path=ZSTASH_PATH):
'\n \n '
self.hpss_path = hpss_path
use_hpss = self.setupDirs(test_name)
self.create(use_hpss, zstash_path)
print_starred('Testing update with an actual change')
self.assertWorkspace()
if (not os.path.... |
def helperUpdateKeep(self, test_name, hpss_path, zstash_path=ZSTASH_PATH):
'\n Test `zstash update --keep`.\n '
self.hpss_path = hpss_path
use_hpss = self.setupDirs(test_name)
self.create(use_hpss, zstash_path)
self.add_files(use_hpss, zstash_path, keep=True)
files = os.listdir('{}... | -7,607,693,718,521,320,000 | Test `zstash update --keep`. | tests/test_update.py | helperUpdateKeep | E3SM-Project/zstash | python | def helperUpdateKeep(self, test_name, hpss_path, zstash_path=ZSTASH_PATH):
'\n \n '
self.hpss_path = hpss_path
use_hpss = self.setupDirs(test_name)
self.create(use_hpss, zstash_path)
self.add_files(use_hpss, zstash_path, keep=True)
files = os.listdir('{}/{}'.format(self.test_dir, s... |
def helperUpdateCache(self, test_name, hpss_path, zstash_path=ZSTASH_PATH):
'\n Test `zstash update --cache`.\n '
self.hpss_path = hpss_path
self.cache = 'my_cache'
use_hpss = self.setupDirs(test_name)
self.create(use_hpss, zstash_path, cache=self.cache)
self.add_files(use_hpss, zs... | 3,580,585,394,761,558,500 | Test `zstash update --cache`. | tests/test_update.py | helperUpdateCache | E3SM-Project/zstash | python | def helperUpdateCache(self, test_name, hpss_path, zstash_path=ZSTASH_PATH):
'\n \n '
self.hpss_path = hpss_path
self.cache = 'my_cache'
use_hpss = self.setupDirs(test_name)
self.create(use_hpss, zstash_path, cache=self.cache)
self.add_files(use_hpss, zstash_path, cache=self.cache)
... |
def run(self, video_path=0, start_frame=0, conf_thresh=0.6):
' Runs the test on a video (or webcam)\n \n # Arguments\n video_path: A file path to a video to be tested on. Can also be a number, \n in which case the webcam with the same number (i.e. 0) is \n ... | -1,364,219,550,252,942,600 | Runs the test on a video (or webcam)
# Arguments
video_path: A file path to a video to be tested on. Can also be a number,
in which case the webcam with the same number (i.e. 0) is
used instead
start_frame: The number of the first frame of the video to be processed
b... | testing_utils/videotest.py | run | hanhejia/SSD | python | def run(self, video_path=0, start_frame=0, conf_thresh=0.6):
' Runs the test on a video (or webcam)\n \n # Arguments\n video_path: A file path to a video to be tested on. Can also be a number, \n in which case the webcam with the same number (i.e. 0) is \n ... |
def navier_stokes_rk(tableau: ButcherTableau, equation: ExplicitNavierStokesODE, time_step: float) -> TimeStepFn:
'Create a forward Runge-Kutta time-stepper for incompressible Navier-Stokes.\n\n This function implements the reference method (equations 16-21), rather than\n the fast projection method, from:\n "... | 4,482,756,570,041,704,000 | Create a forward Runge-Kutta time-stepper for incompressible Navier-Stokes.
This function implements the reference method (equations 16-21), rather than
the fast projection method, from:
"Fast-Projection Methods for the Incompressible Navier–Stokes Equations"
Fluids 2020, 5, 222; doi:10.3390/fluids5040222
Args:
... | jax_cfd/base/time_stepping.py | navier_stokes_rk | google/jax-cfd | python | def navier_stokes_rk(tableau: ButcherTableau, equation: ExplicitNavierStokesODE, time_step: float) -> TimeStepFn:
'Create a forward Runge-Kutta time-stepper for incompressible Navier-Stokes.\n\n This function implements the reference method (equations 16-21), rather than\n the fast projection method, from:\n "... |
def explicit_terms(self, state):
'Explicitly evaluate the ODE.'
raise NotImplementedError | -551,977,913,440,895,400 | Explicitly evaluate the ODE. | jax_cfd/base/time_stepping.py | explicit_terms | google/jax-cfd | python | def explicit_terms(self, state):
raise NotImplementedError |
def pressure_projection(self, state):
'Enforce the incompressibility constraint.'
raise NotImplementedError | 1,062,503,044,627,755,400 | Enforce the incompressibility constraint. | jax_cfd/base/time_stepping.py | pressure_projection | google/jax-cfd | python | def pressure_projection(self, state):
raise NotImplementedError |
def _check_fc_port_and_init(self, wwns, hostid, fabric_map, nsinfos):
'Check FC port on array and wwn on host is connected to switch.\n\n If no FC port on array is connected to switch or no ini on host is\n connected to switch, raise a error.\n '
if (not fabric_map):
msg = _('No FC ... | 7,124,849,976,200,785,000 | Check FC port on array and wwn on host is connected to switch.
If no FC port on array is connected to switch or no ini on host is
connected to switch, raise a error. | Cinder/Mitaka/extend/fc_zone_helper.py | _check_fc_port_and_init | Huawei/OpenStack_Driver | python | def _check_fc_port_and_init(self, wwns, hostid, fabric_map, nsinfos):
'Check FC port on array and wwn on host is connected to switch.\n\n If no FC port on array is connected to switch or no ini on host is\n connected to switch, raise a error.\n '
if (not fabric_map):
msg = _('No FC ... |
def _get_one_fc_port_for_zone(self, initiator, contr, nsinfos, cfgmap_from_fabrics, fabric_maps):
'Get on FC port per one controller.\n\n task flow:\n 1. Get all the FC port from the array.\n 2. Filter out ports belonged to the specific controller\n and the status is connected.\n ... | 3,187,681,805,082,868,000 | Get on FC port per one controller.
task flow:
1. Get all the FC port from the array.
2. Filter out ports belonged to the specific controller
and the status is connected.
3. Filter out ports connected to the fabric configured in cinder.conf.
4. Get active zones set from switch.
5. Find a port according to three case... | Cinder/Mitaka/extend/fc_zone_helper.py | _get_one_fc_port_for_zone | Huawei/OpenStack_Driver | python | def _get_one_fc_port_for_zone(self, initiator, contr, nsinfos, cfgmap_from_fabrics, fabric_maps):
'Get on FC port per one controller.\n\n task flow:\n 1. Get all the FC port from the array.\n 2. Filter out ports belonged to the specific controller\n and the status is connected.\n ... |
def __init__(self, data_dir, log_level=None, scope_host='127.0.0.1', dry_run=False):
'Setup the basic code to take a single timepoint from a timecourse experiment.\n\n Parameters:\n data_dir: directory where the data and metadata-files should be read/written.\n io_threads: number of thr... | 3,253,398,444,944,715,300 | Setup the basic code to take a single timepoint from a timecourse experiment.
Parameters:
data_dir: directory where the data and metadata-files should be read/written.
io_threads: number of threads to use to save image data out.
loglevel: level from logging library at which to log information to the
... | scope/timecourse/base_handler.py | __init__ | drew-sinha/rpc-scope | python | def __init__(self, data_dir, log_level=None, scope_host='127.0.0.1', dry_run=False):
'Setup the basic code to take a single timepoint from a timecourse experiment.\n\n Parameters:\n data_dir: directory where the data and metadata-files should be read/written.\n io_threads: number of thr... |
def add_background_job(self, function, *args, **kws):
'Add a function with parameters *args and **kws to a queue to be completed\n asynchronously with the rest of the timepoint acquisition. This will be\n run in a background thread, so make sure that the function acts in a\n threadsafe manner. ... | 2,761,595,359,836,609,000 | Add a function with parameters *args and **kws to a queue to be completed
asynchronously with the rest of the timepoint acquisition. This will be
run in a background thread, so make sure that the function acts in a
threadsafe manner. (NB: self.logger *is* thread-safe.)
All queued functions will be waited for completio... | scope/timecourse/base_handler.py | add_background_job | drew-sinha/rpc-scope | python | def add_background_job(self, function, *args, **kws):
'Add a function with parameters *args and **kws to a queue to be completed\n asynchronously with the rest of the timepoint acquisition. This will be\n run in a background thread, so make sure that the function acts in a\n threadsafe manner. ... |
def run_position(self, position_name, position_coords):
'Do everything required for taking a timepoint at a single position\n EXCEPT focusing / image acquisition. This includes moving the stage to\n the right x,y position, loading and saving metadata, and saving image\n data, as generated by ac... | -4,009,590,888,470,571,500 | Do everything required for taking a timepoint at a single position
EXCEPT focusing / image acquisition. This includes moving the stage to
the right x,y position, loading and saving metadata, and saving image
data, as generated by acquire_images() | scope/timecourse/base_handler.py | run_position | drew-sinha/rpc-scope | python | def run_position(self, position_name, position_coords):
'Do everything required for taking a timepoint at a single position\n EXCEPT focusing / image acquisition. This includes moving the stage to\n the right x,y position, loading and saving metadata, and saving image\n data, as generated by ac... |
def configure_timepoint(self):
"Override this method with global configuration for the image acquisitions\n (e.g. camera configuration). Member variables 'scope', 'experiment_metadata',\n 'timepoint_prefix', and 'positions' may be specifically useful."
pass | -2,345,780,675,447,022,000 | Override this method with global configuration for the image acquisitions
(e.g. camera configuration). Member variables 'scope', 'experiment_metadata',
'timepoint_prefix', and 'positions' may be specifically useful. | scope/timecourse/base_handler.py | configure_timepoint | drew-sinha/rpc-scope | python | def configure_timepoint(self):
"Override this method with global configuration for the image acquisitions\n (e.g. camera configuration). Member variables 'scope', 'experiment_metadata',\n 'timepoint_prefix', and 'positions' may be specifically useful."
pass |
def finalize_timepoint(self):
'Override this method with global finalization after the images have been\n acquired for each position. Useful for altering the self.experiment_metadata\n dictionary before it is saved out.\n '
pass | 6,943,338,214,605,275,000 | Override this method with global finalization after the images have been
acquired for each position. Useful for altering the self.experiment_metadata
dictionary before it is saved out. | scope/timecourse/base_handler.py | finalize_timepoint | drew-sinha/rpc-scope | python | def finalize_timepoint(self):
'Override this method with global finalization after the images have been\n acquired for each position. Useful for altering the self.experiment_metadata\n dictionary before it is saved out.\n '
pass |
def finalize_acquisition(self, position_name, position_dir, position_metadata):
'Called after acquiring images for a single postiion.\n\n Parameters:\n position_name: name of the position in the experiment metadata file.\n position_dir: pathlib.Path object representing the directory whe... | 5,483,981,047,952,919,000 | Called after acquiring images for a single postiion.
Parameters:
position_name: name of the position in the experiment metadata file.
position_dir: pathlib.Path object representing the directory where
position-specific data files and outputs are written. Useful for
reading previous image data.
... | scope/timecourse/base_handler.py | finalize_acquisition | drew-sinha/rpc-scope | python | def finalize_acquisition(self, position_name, position_dir, position_metadata):
'Called after acquiring images for a single postiion.\n\n Parameters:\n position_name: name of the position in the experiment metadata file.\n position_dir: pathlib.Path object representing the directory whe... |
def cleanup(self):
'Override this method with any global cleanup/finalization tasks\n that may be necessary.'
pass | -4,469,802,585,313,322,000 | Override this method with any global cleanup/finalization tasks
that may be necessary. | scope/timecourse/base_handler.py | cleanup | drew-sinha/rpc-scope | python | def cleanup(self):
'Override this method with any global cleanup/finalization tasks\n that may be necessary.'
pass |
def get_next_run_time(self):
'Override this method to return when the next timepoint run should be\n scheduled. Returning None means no future runs will be scheduled.'
return None | 1,995,302,963,786,831,400 | Override this method to return when the next timepoint run should be
scheduled. Returning None means no future runs will be scheduled. | scope/timecourse/base_handler.py | get_next_run_time | drew-sinha/rpc-scope | python | def get_next_run_time(self):
'Override this method to return when the next timepoint run should be\n scheduled. Returning None means no future runs will be scheduled.'
return None |
def acquire_images(self, position_name, position_dir, position_metadata):
"Override this method in a subclass to define the image-acquisition sequence.\n\n All most subclasses will need to do is return the following as a tuple:\n (images, image_names, new_metadata), where:\n images is a lis... | 6,055,405,891,119,240,000 | Override this method in a subclass to define the image-acquisition sequence.
All most subclasses will need to do is return the following as a tuple:
(images, image_names, new_metadata), where:
images is a list of the acquired images
image_names is a list of the generic names for each of these images
(n... | scope/timecourse/base_handler.py | acquire_images | drew-sinha/rpc-scope | python | def acquire_images(self, position_name, position_dir, position_metadata):
"Override this method in a subclass to define the image-acquisition sequence.\n\n All most subclasses will need to do is return the following as a tuple:\n (images, image_names, new_metadata), where:\n images is a lis... |
@classmethod
def main(cls, timepoint_dir=None, **cls_init_args):
"Main method to run a timepoint.\n\n Parse sys.argv to find an (optional) scheduled_start time as a positional\n argument. Any arguments that contain an '=' will be assumed to be\n python variable definitions to pass to the class ... | -877,967,456,654,929,700 | Main method to run a timepoint.
Parse sys.argv to find an (optional) scheduled_start time as a positional
argument. Any arguments that contain an '=' will be assumed to be
python variable definitions to pass to the class init method. (Leading
'-' or '--' will be stripped, and internal '-'s will be converted to '_'.)
... | scope/timecourse/base_handler.py | main | drew-sinha/rpc-scope | python | @classmethod
def main(cls, timepoint_dir=None, **cls_init_args):
"Main method to run a timepoint.\n\n Parse sys.argv to find an (optional) scheduled_start time as a positional\n argument. Any arguments that contain an '=' will be assumed to be\n python variable definitions to pass to the class ... |
def __init__(self, metadata=None, acl=None, local_vars_configuration=None):
'FolderUpdateRequest - a model defined in OpenAPI'
if (local_vars_configuration is None):
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._metadata = None
self... | 3,986,587,360,082,399,000 | FolderUpdateRequest - a model defined in OpenAPI | libica/openapi/libgds/models/folder_update_request.py | __init__ | umccr-illumina/libica | python | def __init__(self, metadata=None, acl=None, local_vars_configuration=None):
if (local_vars_configuration is None):
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._metadata = None
self._acl = None
self.discriminator = None
if ... |
@property
def metadata(self):
'Gets the metadata of this FolderUpdateRequest. # noqa: E501\n\n Metadata about this folder and its contents # noqa: E501\n\n :return: The metadata of this FolderUpdateRequest. # noqa: E501\n :rtype: object\n '
return self._metadata | 8,785,109,363,569,681,000 | Gets the metadata of this FolderUpdateRequest. # noqa: E501
Metadata about this folder and its contents # noqa: E501
:return: The metadata of this FolderUpdateRequest. # noqa: E501
:rtype: object | libica/openapi/libgds/models/folder_update_request.py | metadata | umccr-illumina/libica | python | @property
def metadata(self):
'Gets the metadata of this FolderUpdateRequest. # noqa: E501\n\n Metadata about this folder and its contents # noqa: E501\n\n :return: The metadata of this FolderUpdateRequest. # noqa: E501\n :rtype: object\n '
return self._metadata |
@metadata.setter
def metadata(self, metadata):
'Sets the metadata of this FolderUpdateRequest.\n\n Metadata about this folder and its contents # noqa: E501\n\n :param metadata: The metadata of this FolderUpdateRequest. # noqa: E501\n :type: object\n '
self._metadata = metadata | 2,897,326,740,404,116,500 | Sets the metadata of this FolderUpdateRequest.
Metadata about this folder and its contents # noqa: E501
:param metadata: The metadata of this FolderUpdateRequest. # noqa: E501
:type: object | libica/openapi/libgds/models/folder_update_request.py | metadata | umccr-illumina/libica | python | @metadata.setter
def metadata(self, metadata):
'Sets the metadata of this FolderUpdateRequest.\n\n Metadata about this folder and its contents # noqa: E501\n\n :param metadata: The metadata of this FolderUpdateRequest. # noqa: E501\n :type: object\n '
self._metadata = metadata |
@property
def acl(self):
'Gets the acl of this FolderUpdateRequest. # noqa: E501\n\n Optional array to replace the acl on the resource. # noqa: E501\n\n :return: The acl of this FolderUpdateRequest. # noqa: E501\n :rtype: list[str]\n '
return self._acl | 2,604,555,036,963,380,700 | Gets the acl of this FolderUpdateRequest. # noqa: E501
Optional array to replace the acl on the resource. # noqa: E501
:return: The acl of this FolderUpdateRequest. # noqa: E501
:rtype: list[str] | libica/openapi/libgds/models/folder_update_request.py | acl | umccr-illumina/libica | python | @property
def acl(self):
'Gets the acl of this FolderUpdateRequest. # noqa: E501\n\n Optional array to replace the acl on the resource. # noqa: E501\n\n :return: The acl of this FolderUpdateRequest. # noqa: E501\n :rtype: list[str]\n '
return self._acl |
@acl.setter
def acl(self, acl):
'Sets the acl of this FolderUpdateRequest.\n\n Optional array to replace the acl on the resource. # noqa: E501\n\n :param acl: The acl of this FolderUpdateRequest. # noqa: E501\n :type: list[str]\n '
self._acl = acl | -4,355,485,165,373,844,500 | Sets the acl of this FolderUpdateRequest.
Optional array to replace the acl on the resource. # noqa: E501
:param acl: The acl of this FolderUpdateRequest. # noqa: E501
:type: list[str] | libica/openapi/libgds/models/folder_update_request.py | acl | umccr-illumina/libica | python | @acl.setter
def acl(self, acl):
'Sets the acl of this FolderUpdateRequest.\n\n Optional array to replace the acl on the resource. # noqa: E501\n\n :param acl: The acl of this FolderUpdateRequest. # noqa: E501\n :type: list[str]\n '
self._acl = acl |
def to_dict(self):
'Returns the model properties as a dict'
result = {}
for (attr, _) in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value))
e... | 8,442,519,487,048,767,000 | Returns the model properties as a dict | libica/openapi/libgds/models/folder_update_request.py | to_dict | umccr-illumina/libica | python | def to_dict(self):
result = {}
for (attr, _) in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value))
elif hasattr(value, 'to_dict'):
... |
def to_str(self):
'Returns the string representation of the model'
return pprint.pformat(self.to_dict()) | 5,849,158,643,760,736,000 | Returns the string representation of the model | libica/openapi/libgds/models/folder_update_request.py | to_str | umccr-illumina/libica | python | def to_str(self):
return pprint.pformat(self.to_dict()) |
def __repr__(self):
'For `print` and `pprint`'
return self.to_str() | -8,960,031,694,814,905,000 | For `print` and `pprint` | libica/openapi/libgds/models/folder_update_request.py | __repr__ | umccr-illumina/libica | python | def __repr__(self):
return self.to_str() |
def __eq__(self, other):
'Returns true if both objects are equal'
if (not isinstance(other, FolderUpdateRequest)):
return False
return (self.to_dict() == other.to_dict()) | 6,448,287,465,076,176,000 | Returns true if both objects are equal | libica/openapi/libgds/models/folder_update_request.py | __eq__ | umccr-illumina/libica | python | def __eq__(self, other):
if (not isinstance(other, FolderUpdateRequest)):
return False
return (self.to_dict() == other.to_dict()) |
def __ne__(self, other):
'Returns true if both objects are not equal'
if (not isinstance(other, FolderUpdateRequest)):
return True
return (self.to_dict() != other.to_dict()) | -7,576,450,624,861,716,000 | Returns true if both objects are not equal | libica/openapi/libgds/models/folder_update_request.py | __ne__ | umccr-illumina/libica | python | def __ne__(self, other):
if (not isinstance(other, FolderUpdateRequest)):
return True
return (self.to_dict() != other.to_dict()) |
def set_basis_shells(self, basis, element):
'Expands parameters into a basis set'
basis[element] = even_temper_expansion(self.shells) | 2,004,290,286,107,989,000 | Expands parameters into a basis set | basisopt/opt/eventemper.py | set_basis_shells | robashaw/basisopt | python | def set_basis_shells(self, basis, element):
basis[element] = even_temper_expansion(self.shells) |
def __init__(self, destination, filesToMove=None, filesToRetrieve=None, dumpOnException=True):
'Establish the new and return directories'
self.initial = pathTools.armiAbsPath(os.getcwd())
self.destination = None
if (destination is not None):
self.destination = pathTools.armiAbsPath(destination)
... | 899,575,214,240,729,200 | Establish the new and return directories | armi/utils/directoryChangers.py | __init__ | sammiller11235/armi | python | def __init__(self, destination, filesToMove=None, filesToRetrieve=None, dumpOnException=True):
self.initial = pathTools.armiAbsPath(os.getcwd())
self.destination = None
if (destination is not None):
self.destination = pathTools.armiAbsPath(destination)
self._filesToMove = (filesToMove or []... |
def __enter__(self):
'At the inception of a with command, navigate to a new directory if one is supplied.'
runLog.debug('Changing directory to {}'.format(self.destination))
self.moveFiles()
self.open()
return self | 1,383,282,025,872,974,300 | At the inception of a with command, navigate to a new directory if one is supplied. | armi/utils/directoryChangers.py | __enter__ | sammiller11235/armi | python | def __enter__(self):
runLog.debug('Changing directory to {}'.format(self.destination))
self.moveFiles()
self.open()
return self |
def __exit__(self, exc_type, exc_value, traceback):
'At the termination of a with command, navigate back to the original directory.'
runLog.debug('Returning to directory {}'.format(self.initial))
if ((exc_type is not None) and self._dumpOnException):
runLog.info('An exception was raised within a Dir... | -3,199,904,071,785,294,300 | At the termination of a with command, navigate back to the original directory. | armi/utils/directoryChangers.py | __exit__ | sammiller11235/armi | python | def __exit__(self, exc_type, exc_value, traceback):
runLog.debug('Returning to directory {}'.format(self.initial))
if ((exc_type is not None) and self._dumpOnException):
runLog.info('An exception was raised within a DirectoryChanger. Retrieving entire folder for debugging.')
self._retrieveE... |
def __repr__(self):
'Print the initial and destination paths'
return '<{} {} to {}>'.format(self.__class__.__name__, self.initial, self.destination) | -8,354,109,074,681,529,000 | Print the initial and destination paths | armi/utils/directoryChangers.py | __repr__ | sammiller11235/armi | python | def __repr__(self):
return '<{} {} to {}>'.format(self.__class__.__name__, self.initial, self.destination) |
def open(self):
'\n User requested open, used to stalling the close from a with statement.\n\n This method has been made for old uses of :code:`os.chdir()` and is not\n recommended. Please use the with statements\n '
if self.destination:
_changeDirectory(self.destination) | -3,969,173,263,933,147,000 | User requested open, used to stalling the close from a with statement.
This method has been made for old uses of :code:`os.chdir()` and is not
recommended. Please use the with statements | armi/utils/directoryChangers.py | open | sammiller11235/armi | python | def open(self):
'\n User requested open, used to stalling the close from a with statement.\n\n This method has been made for old uses of :code:`os.chdir()` and is not\n recommended. Please use the with statements\n '
if self.destination:
_changeDirectory(self.destination) |
def close(self):
'User requested close.'
if (self.initial != os.getcwd()):
_changeDirectory(self.initial) | -180,057,568,129,970,720 | User requested close. | armi/utils/directoryChangers.py | close | sammiller11235/armi | python | def close(self):
if (self.initial != os.getcwd()):
_changeDirectory(self.initial) |
def retrieveFiles(self):
'Retrieve any desired files.'
initialPath = self.destination
destinationPath = self.initial
fileList = self._filesToRetrieve
self._transferFiles(initialPath, destinationPath, fileList) | -7,277,374,237,445,609,000 | Retrieve any desired files. | armi/utils/directoryChangers.py | retrieveFiles | sammiller11235/armi | python | def retrieveFiles(self):
initialPath = self.destination
destinationPath = self.initial
fileList = self._filesToRetrieve
self._transferFiles(initialPath, destinationPath, fileList) |
def _retrieveEntireFolder(self):
'Retrieve all files.'
initialPath = self.destination
destinationPath = self.initial
folderName = os.path.split(self.destination)[1]
destinationPath = os.path.join(destinationPath, f'dump-{folderName}')
fileList = os.listdir(self.destination)
self._transferFil... | -994,987,351,423,495,400 | Retrieve all files. | armi/utils/directoryChangers.py | _retrieveEntireFolder | sammiller11235/armi | python | def _retrieveEntireFolder(self):
initialPath = self.destination
destinationPath = self.initial
folderName = os.path.split(self.destination)[1]
destinationPath = os.path.join(destinationPath, f'dump-{folderName}')
fileList = os.listdir(self.destination)
self._transferFiles(initialPath, desti... |
@staticmethod
def _transferFiles(initialPath, destinationPath, fileList):
'\n Transfer files into or out of the directory.\n\n .. warning:: On Windows the max number of characters in a path is 260.\n If you exceed this you will see FileNotFound errors here.\n\n '
if (not fileList... | 6,407,889,324,405,903,000 | Transfer files into or out of the directory.
.. warning:: On Windows the max number of characters in a path is 260.
If you exceed this you will see FileNotFound errors here. | armi/utils/directoryChangers.py | _transferFiles | sammiller11235/armi | python | @staticmethod
def _transferFiles(initialPath, destinationPath, fileList):
'\n Transfer files into or out of the directory.\n\n .. warning:: On Windows the max number of characters in a path is 260.\n If you exceed this you will see FileNotFound errors here.\n\n '
if (not fileList... |
def convert_cerberus_schema_to_pyspark(schema: Mapping[(str, Any)]) -> StructType:
'\n Convert a cerberus validation schema to a pyspark schema.\n\n Assumes that schema is not nested.\n The following are required in spark schema:\n * `nullable` is False by default\n * `metadata` is an empty dict by d... | -1,252,817,147,515,248,600 | Convert a cerberus validation schema to a pyspark schema.
Assumes that schema is not nested.
The following are required in spark schema:
* `nullable` is False by default
* `metadata` is an empty dict by default
* `name` is the name of the field | cishouseholds/pyspark_utils.py | convert_cerberus_schema_to_pyspark | ONS-SST/cis_households | python | def convert_cerberus_schema_to_pyspark(schema: Mapping[(str, Any)]) -> StructType:
'\n Convert a cerberus validation schema to a pyspark schema.\n\n Assumes that schema is not nested.\n The following are required in spark schema:\n * `nullable` is False by default\n * `metadata` is an empty dict by d... |
def get_or_create_spark_session() -> SparkSession:
'\n Create a spark_session, hiding console progress and enabling HIVE table overwrite.\n Session size is configured via pipeline config.\n '
config = get_config()
session_size = config.get('pyspark_session_size', 'm')
spark_session = sessions[s... | 5,581,483,572,705,639,000 | Create a spark_session, hiding console progress and enabling HIVE table overwrite.
Session size is configured via pipeline config. | cishouseholds/pyspark_utils.py | get_or_create_spark_session | ONS-SST/cis_households | python | def get_or_create_spark_session() -> SparkSession:
'\n Create a spark_session, hiding console progress and enabling HIVE table overwrite.\n Session size is configured via pipeline config.\n '
config = get_config()
session_size = config.get('pyspark_session_size', 'm')
spark_session = sessions[s... |
def column_to_list(df: DataFrame, column_name: str):
'Fast collection of all records in a column to a standard list.'
return [row[column_name] for row in df.collect()] | -1,705,344,995,723,576,600 | Fast collection of all records in a column to a standard list. | cishouseholds/pyspark_utils.py | column_to_list | ONS-SST/cis_households | python | def column_to_list(df: DataFrame, column_name: str):
return [row[column_name] for row in df.collect()] |
def __init__(self, storage_name='TUT-urban-acoustic-scenes-2018-development', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'T... | -6,900,135,253,286,699,000 | Constructor
Parameters
----------
storage_name : str
Name to be used when storing dataset on disk
Default value 'TUT-urban-acoustic-scenes-2018-development'
data_path : str
Root path where the dataset is stored. If None, os.path.join(tempfile.gettempdir(), 'dcase_util_datasets')
is used.
Default ... | dcase_util/datasets/tut.py | __init__ | ankitshah009/dcase_util | python | def __init__(self, storage_name='TUT-urban-acoustic-scenes-2018-development', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'T... |
def process_meta_item(self, item, absolute_path=True, **kwargs):
'Process single meta data item\n\n Parameters\n ----------\n item : MetaDataItem\n Meta data item\n\n absolute_path : bool\n Convert file paths to be absolute\n Default value True\n\n ... | 8,631,365,302,105,927,000 | Process single meta data item
Parameters
----------
item : MetaDataItem
Meta data item
absolute_path : bool
Convert file paths to be absolute
Default value True | dcase_util/datasets/tut.py | process_meta_item | ankitshah009/dcase_util | python | def process_meta_item(self, item, absolute_path=True, **kwargs):
'Process single meta data item\n\n Parameters\n ----------\n item : MetaDataItem\n Meta data item\n\n absolute_path : bool\n Convert file paths to be absolute\n Default value True\n\n ... |
def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
if (not self.meta_container.exists()):
meta_data = collections.OrderedDict()
for fold in self.folds():
fold_data = MetaDataContainer(filename=self.evaluation_setup_filena... | 3,391,747,241,571,636,000 | Prepare dataset for the usage.
Returns
-------
self | dcase_util/datasets/tut.py | prepare | ankitshah009/dcase_util | python | def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
if (not self.meta_container.exists()):
meta_data = collections.OrderedDict()
for fold in self.folds():
fold_data = MetaDataContainer(filename=self.evaluation_setup_filena... |
def __init__(self, storage_name='TUT-urban-acoustic-scenes-2018-mobile-development', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default v... | 1,561,665,692,632,164,600 | Constructor
Parameters
----------
storage_name : str
Name to be used when storing dataset on disk
Default value 'TUT-urban-acoustic-scenes-2018-mobile-development'
data_path : str
Root path where the dataset is stored. If None, os.path.join(tempfile.gettempdir(), 'dcase_util_datasets')
is used.
D... | dcase_util/datasets/tut.py | __init__ | ankitshah009/dcase_util | python | def __init__(self, storage_name='TUT-urban-acoustic-scenes-2018-mobile-development', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default v... |
def process_meta_item(self, item, absolute_path=True, **kwargs):
'Process single meta data item\n\n Parameters\n ----------\n item : MetaDataItem\n Meta data item\n\n absolute_path : bool\n Convert file paths to be absolute\n Default value True\n\n ... | -5,714,219,792,530,615,000 | Process single meta data item
Parameters
----------
item : MetaDataItem
Meta data item
absolute_path : bool
Convert file paths to be absolute
Default value True | dcase_util/datasets/tut.py | process_meta_item | ankitshah009/dcase_util | python | def process_meta_item(self, item, absolute_path=True, **kwargs):
'Process single meta data item\n\n Parameters\n ----------\n item : MetaDataItem\n Meta data item\n\n absolute_path : bool\n Convert file paths to be absolute\n Default value True\n\n ... |
def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
if (not self.meta_container.exists()):
meta_data = collections.OrderedDict()
for fold in self.folds():
fold_data = MetaDataContainer(filename=self.evaluation_setup_filena... | 3,391,747,241,571,636,000 | Prepare dataset for the usage.
Returns
-------
self | dcase_util/datasets/tut.py | prepare | ankitshah009/dcase_util | python | def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
if (not self.meta_container.exists()):
meta_data = collections.OrderedDict()
for fold in self.folds():
fold_data = MetaDataContainer(filename=self.evaluation_setup_filena... |
def __init__(self, storage_name='TUT-acoustic-scenes-2017-development', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'TUT-aco... | -5,582,155,284,692,130,000 | Constructor
Parameters
----------
storage_name : str
Name to be used when storing dataset on disk
Default value 'TUT-acoustic-scenes-2017-development'
data_path : str
Root path where the dataset is stored. If None, os.path.join(tempfile.gettempdir(), 'dcase_util_datasets')
is used.
Default value ... | dcase_util/datasets/tut.py | __init__ | ankitshah009/dcase_util | python | def __init__(self, storage_name='TUT-acoustic-scenes-2017-development', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'TUT-aco... |
def process_meta_item(self, item, absolute_path=True, **kwargs):
'Process single meta data item\n\n Parameters\n ----------\n item : MetaDataItem\n Meta data item\n\n absolute_path : bool\n Convert file paths to be absolute\n Default value True\n\n ... | -1,739,020,471,136,129,800 | Process single meta data item
Parameters
----------
item : MetaDataItem
Meta data item
absolute_path : bool
Convert file paths to be absolute
Default value True | dcase_util/datasets/tut.py | process_meta_item | ankitshah009/dcase_util | python | def process_meta_item(self, item, absolute_path=True, **kwargs):
'Process single meta data item\n\n Parameters\n ----------\n item : MetaDataItem\n Meta data item\n\n absolute_path : bool\n Convert file paths to be absolute\n Default value True\n\n ... |
def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
if (not self.meta_container.exists()):
meta_data = collections.OrderedDict()
for fold in self.folds():
fold_data = MetaDataContainer(filename=self.evaluation_setup_filena... | 3,391,747,241,571,636,000 | Prepare dataset for the usage.
Returns
-------
self | dcase_util/datasets/tut.py | prepare | ankitshah009/dcase_util | python | def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
if (not self.meta_container.exists()):
meta_data = collections.OrderedDict()
for fold in self.folds():
fold_data = MetaDataContainer(filename=self.evaluation_setup_filena... |
def __init__(self, storage_name='TUT-acoustic-scenes-2017-evaluation', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'TUT-acou... | -9,213,234,814,557,370,000 | Constructor
Parameters
----------
storage_name : str
Name to be used when storing dataset on disk
Default value 'TUT-acoustic-scenes-2017-evaluation'
data_path : str
Root path where the dataset is stored. If None, os.path.join(tempfile.gettempdir(), 'dcase_util_datasets')
is used.
Default value N... | dcase_util/datasets/tut.py | __init__ | ankitshah009/dcase_util | python | def __init__(self, storage_name='TUT-acoustic-scenes-2017-evaluation', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'TUT-acou... |
def process_meta_item(self, item, absolute_path=True, filename_map=None, **kwargs):
'Process single meta data item\n\n Parameters\n ----------\n item : MetaDataItem\n Meta data item\n\n absolute_path : bool\n Convert file paths to be absolute\n Default v... | -9,129,877,326,963,806,000 | Process single meta data item
Parameters
----------
item : MetaDataItem
Meta data item
absolute_path : bool
Convert file paths to be absolute
Default value True
filename_map : OneToOneMappingContainer
Filename map
Default value None | dcase_util/datasets/tut.py | process_meta_item | ankitshah009/dcase_util | python | def process_meta_item(self, item, absolute_path=True, filename_map=None, **kwargs):
'Process single meta data item\n\n Parameters\n ----------\n item : MetaDataItem\n Meta data item\n\n absolute_path : bool\n Convert file paths to be absolute\n Default v... |
def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
if (not self.meta_container.exists()):
if os.path.isfile(self.evaluation_setup_filename(setup_part='evaluate')):
meta_data = collections.OrderedDict()
data = MetaData... | -447,023,462,507,112,400 | Prepare dataset for the usage.
Returns
-------
self | dcase_util/datasets/tut.py | prepare | ankitshah009/dcase_util | python | def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
if (not self.meta_container.exists()):
if os.path.isfile(self.evaluation_setup_filename(setup_part='evaluate')):
meta_data = collections.OrderedDict()
data = MetaData... |
def __init__(self, storage_name='TUT-rare-sound-events-2017-development', data_path=None, included_content_types=None, synth_parameters=None, dcase_compatibility=True, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing ... | -74,513,701,993,971,360 | Constructor
Parameters
----------
storage_name : str
Name to be used when storing dataset on disk
Default value 'TUT-rare-sound-events-2017-development'
data_path : str
Root path where the dataset is stored. If None, os.path.join(tempfile.gettempdir(), 'dcase_util_datasets')
is used.
Default valu... | dcase_util/datasets/tut.py | __init__ | ankitshah009/dcase_util | python | def __init__(self, storage_name='TUT-rare-sound-events-2017-development', data_path=None, included_content_types=None, synth_parameters=None, dcase_compatibility=True, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing ... |
def event_labels(self, scene_label=None):
'List of unique event labels in the meta data.\n\n Parameters\n ----------\n\n Returns\n -------\n labels : list\n List of event labels in alphabetical order.\n\n '
labels = ['babycry', 'glassbreak', 'gunshot']
la... | 5,440,641,249,336,538,000 | List of unique event labels in the meta data.
Parameters
----------
Returns
-------
labels : list
List of event labels in alphabetical order. | dcase_util/datasets/tut.py | event_labels | ankitshah009/dcase_util | python | def event_labels(self, scene_label=None):
'List of unique event labels in the meta data.\n\n Parameters\n ----------\n\n Returns\n -------\n labels : list\n List of event labels in alphabetical order.\n\n '
labels = ['babycry', 'glassbreak', 'gunshot']
la... |
def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
Path().makedirs(path=os.path.join(self.local_path, self.evaluation_setup_folder))
return self | 4,117,275,585,569,429,500 | Prepare dataset for the usage.
Returns
-------
self | dcase_util/datasets/tut.py | prepare | ankitshah009/dcase_util | python | def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
Path().makedirs(path=os.path.join(self.local_path, self.evaluation_setup_folder))
return self |
def train(self, fold=None, scene_label=None, event_label=None, filename_contains=None, **kwargs):
'List of training items.\n\n Parameters\n ----------\n fold : int\n Fold id, if None all meta data is returned.\n Default value "None"\n scene_label : str\n ... | 4,145,418,168,248,244,700 | List of training items.
Parameters
----------
fold : int
Fold id, if None all meta data is returned.
Default value "None"
scene_label : str
Scene label
Default value "None"
event_label : str
Event label
Default value "None"
filename_contains : str:
String found in filename
Default valu... | dcase_util/datasets/tut.py | train | ankitshah009/dcase_util | python | def train(self, fold=None, scene_label=None, event_label=None, filename_contains=None, **kwargs):
'List of training items.\n\n Parameters\n ----------\n fold : int\n Fold id, if None all meta data is returned.\n Default value "None"\n scene_label : str\n ... |
def test(self, fold=None, scene_label=None, event_label=None, filename_contains=None, **kwargs):
'List of testing items.\n\n Parameters\n ----------\n fold : int\n Fold id, if None all meta data is returned.\n Default value "None"\n scene_label : str\n Sc... | -4,721,525,730,540,040,000 | List of testing items.
Parameters
----------
fold : int
Fold id, if None all meta data is returned.
Default value "None"
scene_label : str
Scene label
Default value "None"
event_label : str
Event label
Default value "None"
filename_contains : str:
String found in filename
Default value... | dcase_util/datasets/tut.py | test | ankitshah009/dcase_util | python | def test(self, fold=None, scene_label=None, event_label=None, filename_contains=None, **kwargs):
'List of testing items.\n\n Parameters\n ----------\n fold : int\n Fold id, if None all meta data is returned.\n Default value "None"\n scene_label : str\n Sc... |
def eval(self, fold=None, scene_label=None, event_label=None, filename_contains=None, **kwargs):
'List of evaluation items.\n\n Parameters\n ----------\n fold : int\n Fold id, if None all meta data is returned.\n Default value "None"\n scene_label : str\n ... | -6,001,605,031,914,855,000 | List of evaluation items.
Parameters
----------
fold : int
Fold id, if None all meta data is returned.
Default value "None"
scene_label : str
Scene label
Default value "None"
event_label : str
Event label
Default value "None"
filename_contains : str:
String found in filename
Default va... | dcase_util/datasets/tut.py | eval | ankitshah009/dcase_util | python | def eval(self, fold=None, scene_label=None, event_label=None, filename_contains=None, **kwargs):
'List of evaluation items.\n\n Parameters\n ----------\n fold : int\n Fold id, if None all meta data is returned.\n Default value "None"\n scene_label : str\n ... |
def __init__(self, storage_name='TUT-rare-sound-events-2017-evaluation', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'TUT-ra... | -7,324,006,037,048,576,000 | Constructor
Parameters
----------
storage_name : str
Name to be used when storing dataset on disk
Default value 'TUT-rare-sound-events-2017-evaluation'
data_path : str
Root path where the dataset is stored. If None, os.path.join(tempfile.gettempdir(), 'dcase_util_datasets')
is used.
Default value... | dcase_util/datasets/tut.py | __init__ | ankitshah009/dcase_util | python | def __init__(self, storage_name='TUT-rare-sound-events-2017-evaluation', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'TUT-ra... |
def event_labels(self, scene_label=None):
'List of unique event labels in the meta data.\n\n Parameters\n ----------\n\n Returns\n -------\n labels : list\n List of event labels in alphabetical order.\n\n '
labels = ['babycry', 'glassbreak', 'gunshot']
la... | 5,440,641,249,336,538,000 | List of unique event labels in the meta data.
Parameters
----------
Returns
-------
labels : list
List of event labels in alphabetical order. | dcase_util/datasets/tut.py | event_labels | ankitshah009/dcase_util | python | def event_labels(self, scene_label=None):
'List of unique event labels in the meta data.\n\n Parameters\n ----------\n\n Returns\n -------\n labels : list\n List of event labels in alphabetical order.\n\n '
labels = ['babycry', 'glassbreak', 'gunshot']
la... |
def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
scene_label = 'synthetic'
subset_map = {'test': 'evaltest'}
param_hash = 'bbb81504db15a03680a0044474633b67'
Path().makedirs(path=os.path.join(self.local_path, self.evaluation_setup_folde... | -3,734,793,682,527,956,000 | Prepare dataset for the usage.
Returns
-------
self | dcase_util/datasets/tut.py | prepare | ankitshah009/dcase_util | python | def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
scene_label = 'synthetic'
subset_map = {'test': 'evaltest'}
param_hash = 'bbb81504db15a03680a0044474633b67'
Path().makedirs(path=os.path.join(self.local_path, self.evaluation_setup_folde... |
def train(self, fold=None, scene_label=None, event_label=None, filename_contains=None, **kwargs):
'List of training items.\n\n Parameters\n ----------\n fold : int\n Fold id, if None all meta data is returned.\n Default value None\n\n scene_label : str\n ... | -8,536,662,320,516,184,000 | List of training items.
Parameters
----------
fold : int
Fold id, if None all meta data is returned.
Default value None
scene_label : str
Scene label
Default value None"
event_label : str
Event label
Default value None"
filename_contains : str:
String found in filename
Default value... | dcase_util/datasets/tut.py | train | ankitshah009/dcase_util | python | def train(self, fold=None, scene_label=None, event_label=None, filename_contains=None, **kwargs):
'List of training items.\n\n Parameters\n ----------\n fold : int\n Fold id, if None all meta data is returned.\n Default value None\n\n scene_label : str\n ... |
def test(self, fold=None, scene_label=None, event_label=None, filename_contains=None, **kwargs):
'List of testing items.\n\n Parameters\n ----------\n fold : int\n Fold id, if None all meta data is returned.\n Default value None\n\n scene_label : str\n Sc... | 3,664,463,538,941,354,000 | List of testing items.
Parameters
----------
fold : int
Fold id, if None all meta data is returned.
Default value None
scene_label : str
Scene label
Default value None
event_label : str
Event label
Default value None
filename_contains : str:
String found in filename
Default value No... | dcase_util/datasets/tut.py | test | ankitshah009/dcase_util | python | def test(self, fold=None, scene_label=None, event_label=None, filename_contains=None, **kwargs):
'List of testing items.\n\n Parameters\n ----------\n fold : int\n Fold id, if None all meta data is returned.\n Default value None\n\n scene_label : str\n Sc... |
def eval(self, fold=None, scene_label=None, event_label=None, filename_contains=None, **kwargs):
'List of evaluation items.\n\n Parameters\n ----------\n fold : int\n Fold id, if None all meta data is returned.\n Default value None\n\n scene_label : str\n ... | -8,291,817,922,858,719,000 | List of evaluation items.
Parameters
----------
fold : int
Fold id, if None all meta data is returned.
Default value None
scene_label : str
Scene label
Default value None
event_label : str
Event label
Default value None
filename_contains : str:
String found in filename
Default value... | dcase_util/datasets/tut.py | eval | ankitshah009/dcase_util | python | def eval(self, fold=None, scene_label=None, event_label=None, filename_contains=None, **kwargs):
'List of evaluation items.\n\n Parameters\n ----------\n fold : int\n Fold id, if None all meta data is returned.\n Default value None\n\n scene_label : str\n ... |
def __init__(self, storage_name='TUT-sound-events-2017-development', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'TUT-sound-... | -3,263,301,835,810,722,300 | Constructor
Parameters
----------
storage_name : str
Name to be used when storing dataset on disk
Default value 'TUT-sound-events-2017-development'
data_path : str
Root path where the dataset is stored. If None, os.path.join(tempfile.gettempdir(), 'dcase_util_datasets')
is used.
Default value Non... | dcase_util/datasets/tut.py | __init__ | ankitshah009/dcase_util | python | def __init__(self, storage_name='TUT-sound-events-2017-development', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'TUT-sound-... |
def process_meta_item(self, item, absolute_path=True, **kwargs):
'Process single meta data item\n\n Parameters\n ----------\n item : MetaDataItem\n Meta data item\n\n absolute_path : bool\n Convert file paths to be absolute\n Default value True\n\n ... | -1,739,020,471,136,129,800 | Process single meta data item
Parameters
----------
item : MetaDataItem
Meta data item
absolute_path : bool
Convert file paths to be absolute
Default value True | dcase_util/datasets/tut.py | process_meta_item | ankitshah009/dcase_util | python | def process_meta_item(self, item, absolute_path=True, **kwargs):
'Process single meta data item\n\n Parameters\n ----------\n item : MetaDataItem\n Meta data item\n\n absolute_path : bool\n Convert file paths to be absolute\n Default value True\n\n ... |
def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
if (not self.meta_container.exists()):
meta_data = MetaDataContainer()
annotation_files = Path().file_list(path=os.path.join(self.local_path, 'meta'), extensions=['ann'])
for... | 8,341,942,799,083,488,000 | Prepare dataset for the usage.
Returns
-------
self | dcase_util/datasets/tut.py | prepare | ankitshah009/dcase_util | python | def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
if (not self.meta_container.exists()):
meta_data = MetaDataContainer()
annotation_files = Path().file_list(path=os.path.join(self.local_path, 'meta'), extensions=['ann'])
for... |
def __init__(self, storage_name='TUT-sound-events-2017-evaluation', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'TUT-sound-e... | 7,848,956,586,064,885,000 | Constructor
Parameters
----------
storage_name : str
Name to be used when storing dataset on disk
Default value 'TUT-sound-events-2017-evaluation'
data_path : str
Root path where the dataset is stored. If None, os.path.join(tempfile.gettempdir(), 'dcase_util_datasets')
is used.
Default value None... | dcase_util/datasets/tut.py | __init__ | ankitshah009/dcase_util | python | def __init__(self, storage_name='TUT-sound-events-2017-evaluation', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'TUT-sound-e... |
def process_meta_item(self, item, absolute_path=True, **kwargs):
'Process single meta data item\n\n Parameters\n ----------\n item : MetaDataItem\n Meta data item\n\n absolute_path : bool\n Convert file paths to be absolute\n Default value True\n\n ... | -3,948,935,948,919,123,000 | Process single meta data item
Parameters
----------
item : MetaDataItem
Meta data item
absolute_path : bool
Convert file paths to be absolute
Default value True | dcase_util/datasets/tut.py | process_meta_item | ankitshah009/dcase_util | python | def process_meta_item(self, item, absolute_path=True, **kwargs):
'Process single meta data item\n\n Parameters\n ----------\n item : MetaDataItem\n Meta data item\n\n absolute_path : bool\n Convert file paths to be absolute\n Default value True\n\n ... |
def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
if (not self.meta_container.exists()):
evaluate_filename = self.evaluation_setup_filename(setup_part='evaluate', scene_label=self.scene_labels()[0])
eval_file = MetaDataContainer(fil... | -757,908,430,912,708,200 | Prepare dataset for the usage.
Returns
-------
self | dcase_util/datasets/tut.py | prepare | ankitshah009/dcase_util | python | def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
if (not self.meta_container.exists()):
evaluate_filename = self.evaluation_setup_filename(setup_part='evaluate', scene_label=self.scene_labels()[0])
eval_file = MetaDataContainer(fil... |
def __init__(self, storage_name='TUT-acoustic-scenes-2016-development', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'TUT-aco... | -3,304,384,571,127,493,600 | Constructor
Parameters
----------
storage_name : str
Name to be used when storing dataset on disk
Default value 'TUT-acoustic-scenes-2016-development'
data_path : str
Root path where the dataset is stored. If None, os.path.join(tempfile.gettempdir(), 'dcase_util_datasets')
is used.
Default value ... | dcase_util/datasets/tut.py | __init__ | ankitshah009/dcase_util | python | def __init__(self, storage_name='TUT-acoustic-scenes-2016-development', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'TUT-aco... |
def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
if (not self.meta_container.exists()):
meta_data = {}
for fold in range(1, self.crossvalidation_folds):
fold_data = MetaDataContainer(filename=self.evaluation_setup_filen... | 5,525,513,403,574,800,000 | Prepare dataset for the usage.
Returns
-------
self | dcase_util/datasets/tut.py | prepare | ankitshah009/dcase_util | python | def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
if (not self.meta_container.exists()):
meta_data = {}
for fold in range(1, self.crossvalidation_folds):
fold_data = MetaDataContainer(filename=self.evaluation_setup_filen... |
def process_meta_item(self, item, absolute_path=True, **kwargs):
'Process single meta data item\n\n Parameters\n ----------\n item : MetaDataItem\n Meta data item\n\n absolute_path : bool\n Convert file paths to be absolute\n Default value True\n\n ... | -1,739,020,471,136,129,800 | Process single meta data item
Parameters
----------
item : MetaDataItem
Meta data item
absolute_path : bool
Convert file paths to be absolute
Default value True | dcase_util/datasets/tut.py | process_meta_item | ankitshah009/dcase_util | python | def process_meta_item(self, item, absolute_path=True, **kwargs):
'Process single meta data item\n\n Parameters\n ----------\n item : MetaDataItem\n Meta data item\n\n absolute_path : bool\n Convert file paths to be absolute\n Default value True\n\n ... |
def __init__(self, storage_name='TUT-acoustic-scenes-2016-evaluation', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'TUT-acou... | 8,314,640,026,505,892,000 | Constructor
Parameters
----------
storage_name : str
Name to be used when storing dataset on disk
Default value 'TUT-acoustic-scenes-2016-evaluation'
data_path : str
Root path where the dataset is stored. If None, os.path.join(tempfile.gettempdir(), 'dcase_util_datasets')
is used.
Default value N... | dcase_util/datasets/tut.py | __init__ | ankitshah009/dcase_util | python | def __init__(self, storage_name='TUT-acoustic-scenes-2016-evaluation', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'TUT-acou... |
def process_meta_item(self, item, absolute_path=True, **kwargs):
'Process single meta data item\n\n Parameters\n ----------\n item : MetaDataItem\n Meta data item\n\n absolute_path : bool\n Convert file paths to be absolute\n Default value True\n\n ... | 3,187,019,170,696,663,000 | Process single meta data item
Parameters
----------
item : MetaDataItem
Meta data item
absolute_path : bool
Convert file paths to be absolute
Default value True | dcase_util/datasets/tut.py | process_meta_item | ankitshah009/dcase_util | python | def process_meta_item(self, item, absolute_path=True, **kwargs):
'Process single meta data item\n\n Parameters\n ----------\n item : MetaDataItem\n Meta data item\n\n absolute_path : bool\n Convert file paths to be absolute\n Default value True\n\n ... |
def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
if (not self.meta_container.exists()):
evaluate_filename = self.evaluation_setup_filename(setup_part='evaluate')
eval_file = MetaDataContainer(filename=evaluate_filename)
if ... | 3,599,202,904,819,247,600 | Prepare dataset for the usage.
Returns
-------
self | dcase_util/datasets/tut.py | prepare | ankitshah009/dcase_util | python | def prepare(self):
'Prepare dataset for the usage.\n\n Returns\n -------\n self\n\n '
if (not self.meta_container.exists()):
evaluate_filename = self.evaluation_setup_filename(setup_part='evaluate')
eval_file = MetaDataContainer(filename=evaluate_filename)
if ... |
def __init__(self, storage_name='TUT-acoustic-scenes-2016-development', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'TUT-aco... | -1,871,470,950,716,974,300 | Constructor
Parameters
----------
storage_name : str
Name to be used when storing dataset on disk
Default value 'TUT-acoustic-scenes-2016-development'
data_path : str
Root path where the dataset is stored. If None, os.path.join(tempfile.gettempdir(), 'dcase_util_datasets')
is used.
Default value ... | dcase_util/datasets/tut.py | __init__ | ankitshah009/dcase_util | python | def __init__(self, storage_name='TUT-acoustic-scenes-2016-development', data_path=None, included_content_types=None, **kwargs):
"\n Constructor\n\n Parameters\n ----------\n\n storage_name : str\n Name to be used when storing dataset on disk\n Default value 'TUT-aco... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.