Initiate the series of windows to add metadata
        to the contribution.
775747
def on_btn_metadata(self, event):
        
        # make sure we have a measurements file
        if not self.check_for_meas_file():
            return
        # make sure all files of the same type have been combined
        if not self.check_for_uncombined_files():
            return
        if self.data_model_num == 2:
            wait = wx.BusyInfo('Compiling required data, please wait...')
            wx.SafeYield()
            self.ErMagic_frame = ErMagicBuilder.MagIC_model_builder(self.WD, self, self.er_magic)
        elif self.data_model_num == 3:
            wait = wx.BusyInfo('Compiling required data, please wait...')
            wx.SafeYield()
            self.ErMagic_frame = ErMagicBuilder.MagIC_model_builder3(self.WD, self, self.contribution)
        #
        self.ErMagic_frame.Show()
        self.ErMagic_frame.Center()
        # gets total available screen space - 10%
        size = wx.DisplaySize()
        size = (size[0] - 0.3 * size[0], size[1] - 0.3 * size[1])
        self.ErMagic_frame.Raise()
        del wait
162242
def _init_metadata(self, **kwargs):
        """"""
        osid_objects.OsidRelationshipForm._init_metadata(self, **kwargs)
        self._completion_default = self._mdata['completion']['default_decimal_values'][0]
        self._level_default = self._mdata['level']['default_id_values'][0]
309753
def add(self, title, values, **kwargs):
        """"""
        if not is_list_like(values) and not isinstance(values, dict):
            values = [values]
        kwargs['title'] = title
        self.raw_series.append((values, kwargs))
        return self
49712
def attach(self, gui):
        """"""
        super(CorrelogramView, self).attach(gui)
        self.actions.add(self.toggle_normalization, shortcut='n')
        self.actions.separator()
        self.actions.add(self.set_bin, alias='cb')
        self.actions.add(self.set_window, alias='cw')
1351600
private void addManifestEntry() throws IOException {
		ZipEntry entry = new ZipEntry(JarFile.MANIFEST_NAME);
		filesArchive.putNextEntry(entry);
		try {
			manifest.write(this);
		} finally {
			filesArchive.closeEntry();
			manifest = null;
		}
	}
434020
def AddFiles(self, hash_id_metadatas):
    
    for hash_id, metadata in iteritems(hash_id_metadatas):
      self.AddFile(hash_id, metadata)
435617
def add_item_metadata(self, handle, key, value):
        
        _mkdir_if_missing(self._metadata_fragments_abspath)

        prefix = self._handle_to_fragment_absprefixpath(handle)
        fpath = prefix + '.{}.json'.format(key)

        _put_obj(fpath, value)
950524
def add_file(self, path):
        """"""
        libdoc = LibraryDocumentation(path)
        if len(libdoc.keywords) > 0:
            if libdoc.doc.startswith("Documentation for resource file"):
                # bah! The file doesn't have an file-level documentation
                # and libdoc substitutes some placeholder text.
                libdoc.doc = ""

            collection_id = self.add_collection(path, libdoc.name, libdoc.type,
                                                libdoc.doc, libdoc.version,
                                                libdoc.scope, libdoc.named_args,
                                                libdoc.doc_format)
            self._load_keywords(collection_id, libdoc=libdoc)
877778
def _init_metadata(self, **kwargs):
        """"""
        osid_objects.OsidObjectForm._init_metadata(self, **kwargs)
        self._taker_default = self._mdata['taker']['default_id_values'][0]
53153
def add_to_sources(self, action, doc_source):
        """"""
        mapping = self.sources.setdefault(action["_index"], {}).setdefault(
            action["_type"], {}
        )
        mapping[action["_id"]] = doc_source
337502
def _add_res(line):
    '''
    
    '''
    global resource
    fields = line.strip().split()

    if resource:
        ret.append(resource)
        resource = {}

    resource["resource name"] = fields[0]
    resource["local role"] = fields[1].split(":")[1]
    resource["local volumes"] = []
    resource["peer nodes"] = []
73118
def _put_metadata(self, fs_remote, ds):
        """"""

        from six import text_type
        from fs.errors import ResourceNotFoundError


        identity = ds.identity
        d = identity.dict

        d['summary'] = ds.config.metadata.about.summary
        d['title'] = ds.config.metadata.about.title

        meta_stack = self._meta_infos(ds)

        def do_metadata():
            for path, ident in meta_stack:
                fs_remote.setcontents(path, ident)


        try:
            # Assume the directories already exist
            do_metadata()
        except ResourceNotFoundError:
            # Nope, make them and try again.
            parts = ['vid', 'id', 'vname', 'name']
            for p in parts:
                dirname = os.path.join('_meta', p)
                fs_remote.makedir(dirname, allow_recreate=True, recursive=True)

            do_metadata()
836672
def _init_metadata(self, **kwargs):
        """"""
        osid_objects.OsidObjectForm._init_metadata(self, **kwargs)
        self._cumulative_default = self._mdata['cumulative']['default_boolean_values'][0]
        self._minimum_score_default = self._mdata['minimum_score']['default_cardinal_values'][0]
        self._maximum_score_default = self._mdata['maximum_score']['default_cardinal_values'][0]
29027
def _init_metadata(self, **kwargs):
        """"""
        osid_objects.OsidObjectForm._init_metadata(self, **kwargs)
        self._group_default = self._mdata['group']['default_boolean_values'][0]
        self._avatar_default = self._mdata['avatar']['default_id_values'][0]
67261
def addthisbunch(bunchdt, data, commdct, thisbunch, theidf):
    """"""
    key = thisbunch.key.upper()
    obj = copy.copy(thisbunch.obj)
    abunch = obj2bunch(data, commdct, obj)
    bunchdt[key].append(abunch)
    return abunch
1066872
def upload(
    ctx, files, max_threads, prompt, forward, reverse, tags, metadata, project_id, coerce_ascii
):
    """"""

    appendables = {}
    if tags:
        appendables["tags"] = []
        for tag in tags:
            appendables["tags"].append(tag)

    if metadata:
        appendables["metadata"] = {}
        for metadata_kv in metadata:
            split_metadata = metadata_kv.split("=", 1)
            if len(split_metadata) > 1:
                metadata_value = split_metadata[1]
                appendables["metadata"][split_metadata[0]] = metadata_value

    appendables = validate_appendables(appendables, ctx.obj["API"])

    if (forward or reverse) and not (forward and reverse):
        click.echo("You must specify both forward and reverse files", err=True)
        ctx.exit(1)

    if forward and reverse:
        if len(files) > 0:
            click.echo(
                "You may not pass a FILES argument when using the "
                " --forward and --reverse options.",
                err=True,
            )
            ctx.exit(1)
        files = [(forward, reverse)]
    elif len(files) == 0:
        click.echo(ctx.get_help())
        return
    else:
        files = list(files)

        # "intelligently" find paired files and tuple them
        paired_files = []
        single_files = set(files)

        for filename in files:
            # convert "read 1" filenames into "read 2" and check that they exist; if they do
            # upload the files as a pair, autointerleaving them
            pair = re.sub("[._][Rr]1[._]", lambda x: x.group().replace("1", "2"), filename)

            # we don't necessary need the R2 to have been passed in; we infer it anyways
            if pair != filename and os.path.exists(pair):
                if not prompt and pair not in single_files:
                    # if we're not prompting, don't automatically pull in files
                    # not in the list the user passed in
                    continue

                paired_files.append((filename, pair))

                if pair in single_files:
                    single_files.remove(pair)

                single_files.remove(filename)

        auto_pair = True

        if prompt and len(paired_files) > 0:
            pair_list = ""
            for p in paired_files:
                pair_list += "\n  {}  &  {}".format(os.path.basename(p[0]), os.path.basename(p[1]))

            answer = click.confirm(
                "It appears there are paired files:{}\nInterleave them after upload?".format(
                    pair_list
                ),
                default="Y",
            )

            if not answer:
                auto_pair = False

        if auto_pair:
            files = paired_files + list(single_files)

    total_size = sum(
        [
            (_file_size(x[0], uncompressed=True) + _file_size(x[1], uncompressed=True))
            if isinstance(x, tuple)
            else _file_size(x, uncompressed=False)
            for x in files
        ]
    )

    upload_kwargs = {
        "metadata": appendables["valid_metadata"],
        "tags": appendables["valid_tags"],
        "project": project_id,
        "coerce_ascii": coerce_ascii,
        "progressbar": progressbar(length=total_size, label="Uploading..."),
    }

    run_via_threadpool(
        ctx.obj["API"].Samples.upload,
        files,
        upload_kwargs,
        max_threads=max_threads,
        graceful_exit=False,
    )
738814
def _add(self, isoel, col1, col2, method, meta):
        """"""
        self._data[method][col1][col2]["isoelastics"] = isoel
        self._data[method][col1][col2]["meta"] = meta

        # Use advanced slicing to flip the data columns
        isoel_flip = [iso[:, [1, 0, 2]] for iso in isoel]
        self._data[method][col2][col1]["isoelastics"] = isoel_flip
        self._data[method][col2][col1]["meta"] = meta