This function will return the list of experiments.
426350
def load_experiments(self):
        
        logging.debug("Loading experiments.")
        # look for experiments in experiments directory
        exp_dir = self.config['dirs']['experiments_dir']
        for path in glob.glob(os.path.join(exp_dir, '[!_]*.py')):
            # get name of file and path
            name, ext = os.path.splitext(os.path.basename(path))
            # load the experiment
            try:
                # do not load modules that have already been loaded
                if name in loaded_modules:
                    continue
                imp.load_source(name, path)
                loaded_modules.add(name)
                logging.debug("Loaded experiment \"%s(%s)\"." % (name, path))
            except Exception as exception:
                logging.exception("Failed to load experiment %s: %s" %
                                  (name, exception))

        logging.debug("Finished loading experiments.")
        # return dict of experiment names and classes
        return ExperimentList.experiments
235452
def experiment(f=None, local_dependencies=None, start_chiboard=True, default_logdir=""):
  
  if not f:
    return lambda f: experiment(f, local_dependencies, start_chiboard, default_logdir)
  else:
    if sys.modules[f.__module__].__name__ == '__main__':
      a = Experiment(f, local_dependencies, start_chiboard, default_logdir)
      a.parse_args_and_run()

    return Experiment(f, local_dependencies, start_chiboard, default_logdir).run
337216
def retrieve_list(self, parsed_args):
        """"""
        neutron_client = self.get_client()
        _extra_values = parse_args_to_dict(self.values_specs)
        _merge_args(self, parsed_args, _extra_values,
                    self.values_specs)
        search_opts = self.args2search_opts(parsed_args)
        search_opts.update(_extra_values)
        if self.pagination_support:
            page_size = parsed_args.page_size
            if page_size:
                search_opts.update({'limit': page_size})
        if self.sorting_support:
            keys = parsed_args.sort_key
            if keys:
                search_opts.update({'sort_key': keys})
            dirs = parsed_args.sort_dir
            len_diff = len(keys) - len(dirs)
            if len_diff > 0:
                dirs += ['asc'] * len_diff
            elif len_diff < 0:
                dirs = dirs[:len(keys)]
            if dirs:
                search_opts.update({'sort_dir': dirs})
        data = self.call_server(neutron_client, search_opts, parsed_args)
        collection = _get_resource_plural(self.resource, neutron_client)
        return data.get(collection, [])
576776
def list_experiments
      response =  self.client.execute({
        api_method: self.analytics_experiments.list,
        parameters: {
          accountId: self.config.account_id.to_s,
          profileId: self.config.profile_id.to_s,
          webPropertyId: self.config.web_property_id
        }
      })
      response.data.items.collect(&:to_hash)
    end
1062884
def getExperiments(uuid: str):
    
    return jsonify([x.deserialize() for x in Experiment.query.all()])
378702
def full_research_organism(soup):
    ""
    if not raw_parser.research_organism_keywords(soup):
        return []
    return list(map(node_contents_str, raw_parser.research_organism_keywords(soup)))
266125
def samples(self):
        """"""
        names = self.series.dimensions
        for values in zip(*(getattr(self.series, name) for name in names)):
            yield dict(zip(names, values))
846684
def exp_files(self):
        
        ret = OrderedDict()
        # restore the order of the experiments
        exp_file = self.exp_file
        if osp.exists(exp_file):
            for key, val in safe_load(exp_file).items():
                ret[key] = val
        for project, d in self.projects.items():
            project_path = d['root']
            config_path = osp.join(project_path, '.project')
            if not osp.exists(config_path):
                continue
            for fname in glob.glob(osp.join(config_path, '*.yml')):
                if fname == '.project.yml':
                    continue
                exp = osp.splitext(osp.basename(fname))[0]
                if not isinstance(ret.get(exp), Archive):
                    ret[exp] = osp.join(config_path, exp + '.yml')
                if exp not in self._project_map[project]:
                    self._project_map[project].append(exp)
        return ret
1398
def data(self):
        """"""
        import warnings
        warnings.warn(
            '`data` attribute is deprecated and will be removed in a future release, '
            'use %s as an iterable instead' % (PaginatedResponse,),
            category=DeprecationWarning,
            stacklevel=2  # log wherever '.data' is referenced, rather than this line
        )
        return list(self)
1140232
def list_experiment(args):
    ''''''
    nni_config = Config(get_config_filename(args))
    rest_port = nni_config.get_config('restServerPort')
    rest_pid = nni_config.get_config('restServerPid')
    if not detect_process(rest_pid):
        print_error('Experiment is not running...')
        return
    running, _ = check_rest_server_quick(rest_port)
    if running:
        response = rest_get(experiment_url(rest_port), REST_TIME_OUT)
        if response and check_response(response):
            content = convert_time_stamp_to_date(json.loads(response.text))
            print(json.dumps(content, indent=4, sort_keys=True, separators=(',', ':')))
        else:
            print_error('List experiment failed...')
    else:
        print_error('Restful server is not running...')
662314
def raw_data_engine(**kwargs):
    """"""
    logger.debug("cycles_engine")
    raise NotImplementedError

    experiments = kwargs["experiments"]
    farms = []
    barn = "raw_dir"

    for experiment in experiments:
        farms.append([])

    return farms, barn
616623
def finish_experiment(self, session, exp_id):
        '''
        '''
        self.logger.debug('Finishing %s' %exp_id)
        experiments = session.get('experiments', [])
        experiments = [x for x in experiments if x != exp_id]
        session['experiments'] = experiments
        return experiments
846507
def _find_experiment_tag(self):
    
    with self._experiment_from_tag_lock:
      if self._experiment_from_tag is None:
        mapping = self.multiplexer.PluginRunToTagToContent(
            metadata.PLUGIN_NAME)
        for tag_to_content in mapping.values():
          if metadata.EXPERIMENT_TAG in tag_to_content:
            self._experiment_from_tag = metadata.parse_experiment_plugin_data(
                tag_to_content[metadata.EXPERIMENT_TAG])
            break
    return self._experiment_from_tag
1319167
def get_specs(data):
    
    # sort the specimen names
    speclist = []
    for rec in data:
        try:
            spec = rec["er_specimen_name"]
        except KeyError as e:
            spec = rec["specimen"]
        if spec not in speclist:
            speclist.append(spec)
    speclist.sort()
    return speclist
710504
def find_all(self, cls):
        """"""
        final_results = []
        for db_result in read_by_indexes(cls.get_table_name(), []):
            obj = cls.from_data(db_result['value'])
            final_results.append(obj)

        return final_results
331800
def project_list(self):
        """"""
        return [(i, self.projects[i]) for i in sorted(self.projects.keys())]
331984
def results(self):
        """"""

        # Add all saved samples (and ancillary quantities) to the results.
        with warnings.catch_warnings():
            warnings.simplefilter("ignore")
            results = [('niter', self.it - 1),
                       ('ncall', np.array(self.saved_nc)),
                       ('eff', self.eff),
                       ('samples', np.array(self.saved_v)),
                       ('samples_id', np.array(self.saved_id)),
                       ('samples_batch', np.array(self.saved_batch,
                                                  dtype='int')),
                       ('samples_it', np.array(self.saved_it)),
                       ('samples_u', np.array(self.saved_u)),
                       ('samples_n', np.array(self.saved_n)),
                       ('logwt', np.array(self.saved_logwt)),
                       ('logl', np.array(self.saved_logl)),
                       ('logvol', np.array(self.saved_logvol)),
                       ('logz', np.array(self.saved_logz)),
                       ('logzerr', np.sqrt(np.array(self.saved_logzvar))),
                       ('information', np.array(self.saved_h)),
                       ('batch_nlive', np.array(self.saved_batch_nlive,
                                                dtype='int')),
                       ('batch_bounds', np.array(self.saved_batch_bounds))]

        # Add any saved bounds (and ancillary quantities) to the results.
        if self.sampler.save_bounds:
            results.append(('bound', copy.deepcopy(self.bound)))
            results.append(('bound_iter',
                            np.array(self.saved_bounditer, dtype='int')))
            results.append(('samples_bound',
                            np.array(self.saved_boundidx, dtype='int')))
            results.append(('scale', np.array(self.saved_scale)))

        return Results(results)