Return a fully-qualified sink string.
777043
def sink_path(cls, project, sink):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/sinks/{sink}", project=project, sink=sink
        )
483651
def depipe(s):
    """"""
    n = 0
    for i in reversed(s.split('|')):
        n = n / 60.0 + float(i)
    return n
124771
def _get_wrhiercfg(self):
        """"""
        prtfmt = self.gosubdag.prt_attr['fmt']
        prtfmt = prtfmt.replace('{GO} # ', '')
        prtfmt = prtfmt.replace('{D1:5} ', '')
        return {'name2prtfmt':{'ITEM':prtfmt, 'ID':'{GO}{alt:1}'},
                'max_indent': self.usrdct.get('max_indent'),
                'include_only': self.usrdct.get('include_only'),
                'item_marks': self.usrdct.get('item_marks', {}),
                'concise_prt': 'concise' in self.usrset,
                'indent': 'no_indent' not in self.usrset,
                'dash_len': self.usrdct.get('dash_len', 6),
                'sortby': self.usrdct.get('sortby')
               }
787088
def _get_object_as_soft(self):
        """"""
        soft = ["^%s = %s" % (self.geotype, self.name),
                self._get_metadata_as_string(),
                self._get_columns_as_string(),
                self._get_table_as_string()]
        return "\n".join(soft)
1103478
function sink (msg, done) {
    var metric = msg.metric
    var as_text = JSON.stringify(metric, null, 1)

    console.log(as_text)

    done()
  }
242617
def to_api_repr(self):
        """"""

        source_ref = {
            "projectId": self.source.project,
            "datasetId": self.source.dataset_id,
            "tableId": self.source.table_id,
        }

        configuration = self._configuration.to_api_repr()
        _helpers._set_sub_prop(configuration, ["extract", "sourceTable"], source_ref)
        _helpers._set_sub_prop(
            configuration, ["extract", "destinationUris"], self.destination_uris
        )

        return {
            "jobReference": self._properties["jobReference"],
            "configuration": configuration,
        }
1365340
def rest_of_string(self, offset=0):
        """"""
        if self.has_space(offset=offset):
            return self.string[self.pos + offset:]
        else:
            return ''
1054429
private String getDsDefStr(DsDef def) {
		return "DS:" + def.getDsName() + ":" + def.getDsType() + ":" + def.getHeartbeat() + ":" + formatDouble(def.getMinValue()) + ":"
				+ formatDouble(def.getMaxValue());
	}
1341925
def get_prefix(self):
        """"""
        prefix = self.bucket
        if self.prefix:
            prefix += self.delimiter + self.prefix
        return prefix
742095
def _raw_to_der(self, raw_signature):
        """"""
        component_length = self._sig_component_length()
        if len(raw_signature) != int(2 * component_length):
            raise ValueError("Invalid signature")

        r_bytes = raw_signature[:component_length]
        s_bytes = raw_signature[component_length:]
        r = int_from_bytes(r_bytes, "big")
        s = int_from_bytes(s_bytes, "big")
        return encode_dss_signature(r, s)
231086
public static <T> Filter<T> from(final Sink<T> sink) {
        return new NonMutatingFilter<T>() {
            @Override
            public boolean accepts(T item) throws IOException {
                sink.put(item);
                return true;
            }
            @Override
            public void close() {
                sink.close();
            }
        };
    }
7123
public Page<Sink> listSinks() {
    // [START logging_list_sinks]
    Page<Sink> sinks = logging.listSinks(ListOption.pageSize(100));
    for (Sink sink : sinks.iterateAll()) {
      // do something with the sink
    }
    // [END logging_list_sinks]
    return sinks;
  }
1217086
def _get_depthsr(self, goobj):
        """"""
        if 'reldepth' in self.gosubdag.prt_attr['flds']:
            return "R{R:02}".format(R=goobj.reldepth)
        return "D{D:02}".format(D=goobj.depth)
84144
def get_prefix(self):
        """"""
        prefix = self.bucket
        if self.prefix:
            prefix += self.separator + self.prefix
        return prefix
983940
public Sink updateSink(String sinkName, String datasetName) {
    // [START logging_update_sink]
    SinkInfo sinkInfo =
        SinkInfo.newBuilder(sinkName, DatasetDestination.of(datasetName))
            .setVersionFormat(SinkInfo.VersionFormat.V2)
            .setFilter("severity>=ERROR")
            .build();
    Sink sink = logging.update(sinkInfo);
    // [END logging_update_sink]
    return sink;
  }
959632
def _gen_full_path(self, filename, file_system=None):
        """"""
        if file_system is None:
            return '{}/{}'.format(self.dest_file_system, filename)
        else:
            if ":" not in file_system:
                raise ValueError("Invalid file_system specified: {}".format(file_system))
            return '{}/{}'.format(file_system, filename)
895637
@Override
  public void toSink(Sink<R> sink) {
    checkNotNull(sink, "sink cannot be null");

    SinkStreamlet<R> sinkStreamlet = new SinkStreamlet<>(this, sink);
    addChild(sinkStreamlet);
  }