Gets the first fingerprint type from the protobuf.
160253
def GetFingerprint(self, name):
    """"""
    for result in self.results:
      if result.GetItem("name") == name:
        return result
1361110
function (input) {
    if (typeof input === 'string') {
      return farmhash.Fingerprint32String(input);
    }
    if (Buffer.isBuffer(input)) {
      return farmhash.Fingerprint32Buffer(input);
    }
    throw new Error('Expected a String or Buffer for input');
  }
276231
def fingerprint(self):
        """"""
        if self.num_vertices == 0:
            return np.zeros(20, np.ubyte)
        else:
            return sum(self.vertex_fingerprints)
583594
public SimpleEntry getFirst()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(this, tc, "getFirst");

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(this, tc, "getFirst", new Object[] {first, printList()});
    
    return first;          
  }
579450
public byte[] extractFingerprint(Wave wave) {

        int[][] coordinates; // coordinates[x][0..3]=y0..y3
        byte[] fingerprint = new byte[0];

        // resample to target rate
        Resampler resampler = new Resampler();
        int sourceRate = wave.getWaveHeader().getSampleRate();
        int targetRate = fingerprintProperties.getSampleRate();

        byte[] resampledWaveData = resampler.reSample(wave.getBytes(), wave.getWaveHeader().getBitsPerSample(),
                        sourceRate, targetRate);

        // update the wave header
        WaveHeader resampledWaveHeader = wave.getWaveHeader();
        resampledWaveHeader.setSampleRate(targetRate);

        // make resampled wave
        Wave resampledWave = new Wave(resampledWaveHeader, resampledWaveData);
        // end resample to target rate

        // get spectrogram's data
        Spectrogram spectrogram = resampledWave.getSpectrogram(sampleSizePerFrame, overlapFactor);
        double[][] spectorgramData = spectrogram.getNormalizedSpectrogramData();

        List<Integer>[] pointsLists = getRobustPointList(spectorgramData);
        int numFrames = pointsLists.length;

        // prepare fingerprint bytes
        coordinates = new int[numFrames][numRobustPointsPerFrame];

        for (int x = 0; x < numFrames; x++) {
            if (pointsLists[x].size() == numRobustPointsPerFrame) {
                Iterator<Integer> pointsListsIterator = pointsLists[x].iterator();
                for (int y = 0; y < numRobustPointsPerFrame; y++) {
                    coordinates[x][y] = pointsListsIterator.next();
                }
            } else {
                // use -1 to fill the empty byte
                for (int y = 0; y < numRobustPointsPerFrame; y++) {
                    coordinates[x][y] = -1;
                }
            }
        }
        // end make fingerprint

        // for each valid coordinate, append with its intensity
        List<Byte> byteList = new LinkedList<Byte>();
        for (int i = 0; i < numFrames; i++) {
            for (int j = 0; j < numRobustPointsPerFrame; j++) {
                if (coordinates[i][j] != -1) {
                    // first 2 bytes is x
                    byteList.add((byte) (i >> 8));
                    byteList.add((byte) i);

                    // next 2 bytes is y
                    int y = coordinates[i][j];
                    byteList.add((byte) (y >> 8));
                    byteList.add((byte) y);

                    // next 4 bytes is intensity
                    int intensity = (int) (spectorgramData[i][y] * Integer.MAX_VALUE); // spectorgramData is ranged from 0~1
                    byteList.add((byte) (intensity >> 24));
                    byteList.add((byte) (intensity >> 16));
                    byteList.add((byte) (intensity >> 8));
                    byteList.add((byte) intensity);
                }
            }
        }
        // end for each valid coordinate, append with its intensity

        fingerprint = new byte[byteList.size()];
        Iterator<Byte> byteListIterator = byteList.iterator();
        int pointer = 0;
        while (byteListIterator.hasNext()) {
            fingerprint[pointer++] = byteListIterator.next();
        }

        return fingerprint;
    }
1208341
public function fingerprint()
    {
        if (is_null($route = $this->route())) {
            throw new RuntimeException('Unable to generate fingerprint. Route unavailable.');
        }

        return sha1(implode('|', array_merge(
            $route->methods(), array($route->domain(), $route->uri(), $this->ip())
        )));
    }
599039
public @Nonnull Collection<FingerprintFacet> getSortedFacets() {
        List<FingerprintFacet> r = new ArrayList<>(getFacets());
        r.sort(new Comparator<FingerprintFacet>() {
            public int compare(FingerprintFacet o1, FingerprintFacet o2) {
                long a = o1.getTimestamp();
                long b = o2.getTimestamp();
                if (a < b) return -1;
                if (a == b) return 0;
                return 1;
            }
        });
        return r;
    }
1280846
public byte[] getFingerprintFromInputStream(InputStream inputStream) {
        byte[] fingerprint = null;
        try {
            fingerprint = new byte[inputStream.available()];
            inputStream.read(fingerprint);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return fingerprint;
    }
780741
def fingerprint type=DEFAULT_FINGERPRINT
      unless fingerprints[type]
        return [] unless self.smiles
        #http://openbabel.org/docs/dev/FileFormats/MolPrint2D_format.html#molprint2d-format
        if type == "MP2D"
          fp = obconversion(smiles,"smi","mpd").strip.split("\t")
          name = fp.shift # remove Title
          fingerprints[type] = fp.uniq # no fingerprint counts
        #http://openbabel.org/docs/dev/FileFormats/Multilevel_Neighborhoods_of_Atoms_(MNA).html
        elsif type== "MNA"
          level = 2 # TODO: level as parameter, evaluate level 1, see paper
          fp = obconversion(smiles,"smi","mna","xL\"#{level}\"").split("\n")
          fp.shift # remove Title
          fingerprints[type] = fp
        else # standard fingerprints
          fp = OpenBabel::OBFingerprint.find_fingerprint(type)
          obmol = OpenBabel::OBMol.new
          obconversion = OpenBabel::OBConversion.new
          obconversion.set_in_format "smi"
          obconversion.read_string obmol, self.smiles
          result = OpenBabel::VectorUnsignedInt.new
          fp.get_fingerprint(obmol,result)
          # TODO: %ignore *::DescribeBits @ line 163 openbabel/scripts/openbabel-ruby.i
          #p OpenBabel::OBFingerprint.describe_bits(result)
          # convert result to a list of the bits that are set
          # from openbabel/scripts/python/pybel.py line 830
          # see also http://openbabel.org/docs/dev/UseTheLibrary/Python_Pybel.html#fingerprints
          result = result.to_a
          bitsperint = OpenBabel::OBFingerprint.getbitsperint()
          bits_set = []
          start = 1
          result.each do |x|
            i = start
            while x > 0 do
              bits_set << i if (x % 2) == 1
              x >>= 1
              i += 1
            end
            start += bitsperint
          end
          fingerprints[type] = bits_set
        end
        save
      end
      fingerprints[type]
    end
184859
public Fingerprint getLogicalFingerprint (String retina_name, String logical_name) throws ApiException {
        // verify required params are set
        if(retina_name == null || logical_name == null ) {
             throw new ApiException(400, "missing required params");
        }
        // create path and map variables
        String path = "/fingerprints/byName".replaceAll("\\{format\\}","json");

        // query params
        Map<String, String> queryParams = new HashMap<String, String>();
        Map<String, String> headerParams = new HashMap<String, String>();

        if(!"null".equals(String.valueOf(retina_name)))
            queryParams.put("retina_name", String.valueOf(retina_name));
        if(!"null".equals(String.valueOf(logical_name)))
            queryParams.put("logical_name", String.valueOf(logical_name));
        String contentType = "application/json";

        try {
            Object response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams
                , null, headerParams, contentType);
            if(response != null) {
                if (response instanceof String) {
                        @SuppressWarnings("unchecked")
                        Fingerprint result = (Fingerprint) ApiInvoker.deserialize( (String) response, ""
                                , Fingerprint.class, null);return result;
                }
                else if (response instanceof java.io.ByteArrayInputStream) {
                        @SuppressWarnings("unchecked")
                        Fingerprint result =    (Fingerprint) response;return result;
                }
                
            }
            else {
                return null;
            }
        } catch (ApiException ex) {
            if(ex.getCode() == 404) {
            	return null;
            }
            else {
                throw ex;
            }
        }
        return null;}
1265600
public OmemoFingerprint getFingerprint(OmemoDevice userDevice)
            throws CorruptedOmemoKeyException {

        T_IdKeyPair keyPair = loadOmemoIdentityKeyPair(userDevice);
        if (keyPair == null) {
            return null;
        }

        return keyUtil().getFingerprintOfIdentityKey(keyUtil().identityKeyFromPair(keyPair));
    }
297810
protected static String fingerprint(SchemaMigrationDescriptor descriptor) {
        return DigestUtils.md5Hex(SerializationUtils.serialize(descriptor.getSchemaMigration()));
    }
131206
public String getFingerprint() {
        RSAPublicKey key = InstanceIdentityProvider.RSA.getPublicKey();
        if (key == null) {
            return null;
        }
        // TODO replace with org.jenkinsci.remoting.util.KeyUtils once JENKINS-36871 changes are merged
        try {
            MessageDigest digest = MessageDigest.getInstance("MD5");
            digest.reset();
            byte[] bytes = digest.digest(key.getEncoded());
            StringBuilder result = new StringBuilder(Math.max(0, bytes.length * 3 - 1));
            for (int i = 0; i < bytes.length; i++) {
                if (i > 0) {
                    result.append(':');
                }
                int b = bytes[i] & 0xFF;
                result.append(Character.forDigit((b>>4)&0x0f, 16)).append(Character.forDigit(b&0xf, 16));
            }
            return result.toString();
        } catch (NoSuchAlgorithmException e) {
            throw new IllegalStateException("JLS mandates MD5 support");
        }
    }
187777
private static ProtocolSigFingerprint getSigFingerprint(
      Class <? extends VersionedProtocol> protocol, long serverVersion) {
    String protocolName = protocol.getName();
    synchronized (PROTOCOL_FINGERPRINT_CACHE) {
      ProtocolSigFingerprint sig = PROTOCOL_FINGERPRINT_CACHE.get(protocolName);
      if (sig == null) {
        int[] serverMethodHashcodes = getFingerprints(protocol.getMethods());
        sig = new ProtocolSigFingerprint(
            new ProtocolSignature(serverVersion, serverMethodHashcodes),
            getFingerprint(serverMethodHashcodes));
        PROTOCOL_FINGERPRINT_CACHE.put(protocolName, sig);
      }
      return sig;
    }
  }
316424
public static String fingerprint(Class cl, String methodName) {
		return fingerprint(cl.getCanonicalName() + "." + methodName);
	}
1007732
def finger(self, match, hash_type=None):
        '''
        
        '''
        if hash_type is None:
            hash_type = __opts__['hash_type']

        matches = self.name_match(match, True)
        ret = {}
        for status, keys in six.iteritems(matches):
            ret[status] = {}
            for key in keys:
                if status == 'local':
                    path = os.path.join(self.opts['pki_dir'], key)
                else:
                    path = os.path.join(self.opts['pki_dir'], status, key)
                ret[status][key] = salt.utils.crypt.pem_finger(path, sum_type=hash_type)
        return ret
201979
private boolean matchesFingerprint(byte[] buffer, Pattern fingerprint)
   {
      return fingerprint.matcher(m_charset == null ? new String(buffer) : new String(buffer, m_charset)).matches();
   }