Add artifact with given framing to the environment.

        :param object artifact: Artifact to be added.
346861
def add_artifact(self, artifact):
        '''
        '''
        artifact.env_time = self.age
        self.artifacts.append(artifact)
        self._log(logging.DEBUG, "ARTIFACTS appended: '{}', length={}"
                  .format(artifact, len(self.artifacts)))
719366
def _AddEdge(self, start_node, end_node):
    

    self.graph[start_node].outgoing.append(end_node)

    # This check is necessary because an artifact can provide attributes that
    # are not covered by the graph because they are not relevant for the
    # requested artifacts.
    if end_node in self.graph:
      self.graph[end_node].incoming.append(start_node)
43786
def add_object(self, start, obj, object_size):
        

        self._store(start, obj, object_size, overwrite=False)
149143
def add_to_initial_stack(self, frame):
    """"""
    if not self._setable_initial_frames:
      raise ValueError(
          "This instance does not allow to manually set initial frame stack.")
    assert_msg = "{}, {}".format(frame.shape, self._initial_frames.shape[:1])
    assert frame.shape == self._initial_frames.shape[2:], assert_msg
    initial_frames = np.roll(self._initial_frames, shift=-1, axis=1)
    initial_frames[0, -1, ...] = frame
    self._initial_frames = initial_frames
654989
def create_artifact_response(self, request, artifact, bindings=None,
                                 status=None, sign=False, issuer=None,
                                 sign_alg=None, digest_alg=None):
        

        rinfo = self.response_args(request, bindings)
        response = self._status_response(ArtifactResponse, issuer, status,
                                         sign=sign, sign_alg=sign_alg,
                                         digest_alg=digest_alg, **rinfo)

        msg = element_to_extension_element(self.artifact[artifact])
        response.extension_elements = [msg]

        logger.info("Response: %s", response)

        return response
337519
def <<(item)
    if(item.kind_of? Zyps::GameObject)
      self.add_object(item)
    elsif(item.kind_of? Zyps::EnvironmentalFactor)
      self.add_environmental_factor(item)
    else
      raise "Invalid item: #{item.class}" 
    end
    self
  end
12212
def register_target_artifact_metadata(self, target: str, metadata: dict):
        """"""
        with self.context_lock:
            self.artifacts_metadata[target.name] = metadata
556716
private static Artifact validateArtifact(final Artifact artifact) {
        if (!artifact.getFile().isFile()) {
            throw new IllegalArgumentException("<"+artifact.getFile()+"> is not a file");
        }
        return artifact;
    }
339610
def add_effect(self, effect):
        
        effect.register_scene(self._scene)
        self._effects.append(effect)
132618
def serialize_artifact_json_blobs(artifacts):
    
    for artifact in artifacts:
        blob = artifact['blob']
        if (artifact['type'].lower() == 'json' and
                not isinstance(blob, str)):
            artifact['blob'] = json.dumps(blob)

    return artifacts
1290526
def addObject(self, object, name=None):
    
    if name is None:
      name = len(self.objects)

    self.objects[name] = object
960880
public void addBuildArtifact(String notation, String path, String pom) {
        Artifact artifact = new DefaultArtifact(notation);
        artifact = artifact.setFile( new File(path) );
        
        this.buildArtifacts.add( artifact );
        
        String pomNotation = new StringBuilder( artifact.getGroupId() ).append(":")
            .append( artifact.getArtifactId() ).append(":")
            .append( Const.POM).append(":").append( artifact.getBaseVersion() ).toString();
        
        artifact = new DefaultArtifact(pomNotation);
        artifact = artifact.setFile( new File(pom) );
        
        this.buildArtifacts.add( artifact );
    }
1217687
def RegisterArtifact(self,
                       artifact_rdfvalue,
                       source="datastore",
                       overwrite_if_exists=False,
                       overwrite_system_artifacts=False):
    """"""
    artifact_name = artifact_rdfvalue.name
    if artifact_name in self._artifacts:
      if not overwrite_if_exists:
        details = "artifact already exists and `overwrite_if_exists` is unset"
        raise rdf_artifacts.ArtifactDefinitionError(artifact_name, details)
      elif not overwrite_system_artifacts:
        artifact_obj = self._artifacts[artifact_name]
        if not artifact_obj.loaded_from.startswith("datastore:"):
          # This artifact was not uploaded to the datastore but came from a
          # file, refuse to overwrite.
          details = "system artifact cannot be overwritten"
          raise rdf_artifacts.ArtifactDefinitionError(artifact_name, details)

    # Preserve where the artifact was loaded from to help debugging.
    artifact_rdfvalue.loaded_from = source
    # Clear any stale errors.
    artifact_rdfvalue.error_message = None
    self._artifacts[artifact_rdfvalue.name] = artifact_rdfvalue
273010
def addProxyObject(self, obj, proxied):
        
        self.proxied_objects[id(obj)] = proxied
        self.proxied_objects[id(proxied)] = obj
908722
def build_artifacts=( artifacts )
      @resolver.clearBuildArtifacts()

      unless artifacts.is_a? Array
        artifacts = [artifacts]
      end

      artifacts.each do |artifact|
        # Hash of notation => path or notation => { :path =>, :pom => }
        if artifact.is_a? Hash

          notation, opts = artifact.shift

          if opts.is_a? Hash
            @resolver.add_build_artifact( notation, opts[:path], opts[:pom] )
          else
            @resolver.add_build_artifact( notation, opts )
          end

        else
          raise "invalid build_artifacts format"
        end
      end
    end
1284671
def addFrame(self):
        """"""
        fr = "/tmp/vpvid/" + str(len(self.frames)) + ".png"
        screenshot(fr)
        self.frames.append(fr)
157573
protected void addRelevantPluginDependencies(Set<Artifact> artifacts) throws MojoExecutionException {
        if (pluginDependencies == null) {
            return;
        }

        Iterator<Artifact> iter = this.pluginDependencies.iterator();
        while (iter.hasNext()) {
            Artifact classPathElement = iter.next();
            getLog().debug("Adding plugin dependency artifact: " + classPathElement.getArtifactId() + " to classpath");
            artifacts.add(classPathElement);
        }
    }