text:
function [Priors, Mu, Sigma, Pix] = EM(Data, Priors0, Mu0, Sigma0)
%
% Expectation-Maximization estimation of GMM parameters.
% This source code is the implementation of the algorithms described in
% Section 2.6.1, p.47 of the book "Robot Programming by Demonstration: A
% Probabilistic Approach".
%
% Author:	Sylvain Calinon, 2009
%			http://programming-by-demonstration.org
%
% This function learns the parameters of a Gaussian Mixture Model
% (GMM) using a recursive Expectation-Maximization (EM) algorithm, starting
% from an initial estimation of the parameters.
%
%
% Inputs -----------------------------------------------------------------
%   o Data:    D x N array representing N datapoints of D dimensions.
%   o Priors0: 1 x K array representing the initial prior probabilities
%              of the K GMM components.
%   o Mu0:     D x K array representing the initial centers of the K GMM
%              components.
%   o Sigma0:  D x D x K array representing the initial covariance matrices
%              of the K GMM components.
% Outputs ----------------------------------------------------------------
%   o Priors:  1 x K array representing the prior probabilities of the K GMM
%              components.
%   o Mu:      D x K array representing the centers of the K GMM components.
%   o Sigma:   D x D x K array representing the covariance matrices of the
%              K GMM components.
%
% This source code is given for free! However, I would be grateful if you refer
% to the book (or corresponding article) in any academic publication that uses
% this code or part of it. Here are the corresponding BibTex references:
%
% @book{Calinon09book,
%   author="S. Calinon",
%   title="Robot Programming by Demonstration: A Probabilistic Approach",
%   publisher="EPFL/CRC Press",
%   year="2009",
%   note="EPFL Press ISBN 978-2-940222-31-5, CRC Press ISBN 978-1-4398-0867-2"
% }
%
% @article{Calinon07,
%   title="On Learning, Representing and Generalizing a Task in a Humanoid Robot",
%   author="S. Calinon and F. Guenter and A. Billard",
%   journal="IEEE Transactions on Systems, Man and Cybernetics, Part B",
%   year="2007",
%   volume="37",
%   number="2",
%   pages="286--298",
% }

%% Criterion to stop the EM iterative update
loglik_threshold = 1e-10;
maxIter = 1000;

%% Initialization of the parameters
[nbVar, nbData] = size(Data);
nbStates = size(Sigma0,3);
loglik_old = -realmax;
nbStep = 0;

Mu = Mu0;
Sigma = Sigma0;
Priors = Priors0;
%% EM fast matrix computation (see the commented code for a version
%% involving one-by-one computation, which is easier to understand)
while 1
  %% E-step %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  for i=1:nbStates
    %Compute probability p(x|i)
    Pxi(:,i) = gaussPDF(Data, Mu(:,i), Sigma(:,:,i));
  end
  %Compute posterior probability p(i|x)
  Pix_tmp = repmat(Priors,[nbData 1]).*Pxi;
  Pix = Pix_tmp ./ repmat(sum(Pix_tmp,2),[1 nbStates]);
  %Compute cumulated posterior probability
  E = sum(Pix);
  %% M-step %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  for i=1:nbStates
    %Update the priors
    Priors(i) = E(i) / nbData;
    %Update the centers
    Mu(:,i) = Data*Pix(:,i) / E(i);
    %Update the covariance matrices
    Data_tmp1 = Data - repmat(Mu(:,i),1,nbData);
    Sigma(:,:,i) = (repmat(Pix(:,i)',nbVar, 1) .* Data_tmp1*Data_tmp1') / E(i);
    %% Add a tiny variance to avoid numerical instability
    Sigma(:,:,i) = Sigma(:,:,i) + 1E-5.*diag(ones(nbVar,1));
  end
  %% Stopping criterion %%%%%%%%%%%%%%%%%%%%
  for i=1:nbStates
    %Compute the new probability p(x|i)
    Pxi(:,i) = gaussPDF(Data, Mu(:,i), Sigma(:,:,i));
  end
  %Compute the log likelihood
  F = Pxi*Priors';
  F(find(F<realmin)) = realmin;
  loglik = mean(log(F));
  %Stop the process depending on the increase of the log likelihood
  if (abs((loglik/loglik_old)-1) < loglik_threshold) || (nbStep >= maxIter)
    break;
  end
  loglik_old = loglik;
  nbStep = nbStep+1;
end

% %% EM slow one-by-one computation (better suited to understand the
% %% algorithm)
% while 1
%   %% E-step %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   for i=1:nbStates
%     %Compute probability p(x|i)
%     Pxi(:,i) = gaussPDF(Data, Mu(:,i), Sigma(:,:,i));
%   end
%   %Compute posterior probability p(i|x)
%   for j=1:nbData
%     Pix(j,:) = (Priors.*Pxi(j,:))./(sum(Priors.*Pxi(j,:))+realmin);
%   end
%   %Compute cumulated posterior probability
%   E = sum(Pix);
%   %% M-step %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   for i=1:nbStates
%     %Update the priors
%     Priors(i) = E(i) / nbData;
%     %Update the centers
%     Mu(:,i) = Data*Pix(:,i) / E(i);
%     %Update the covariance matrices
%     covtmp = zeros(nbVar,nbVar);
%     for j=1:nbData
%       covtmp = covtmp + (Data(:,j)-Mu(:,i))*(Data(:,j)-Mu(:,i))'.*Pix(j,i);
%     end
%     Sigma(:,:,i) = covtmp / E(i);
%   end
%   %% Stopping criterion %%%%%%%%%%%%%%%%%%%%
%   for i=1:nbStates
%     %Compute the new probability p(x|i)
%     Pxi(:,i) = gaussPDF(Data, Mu(:,i), Sigma(:,:,i));
%   end
%   %Compute the log likelihood
%   F = Pxi*Priors';
%   F(find(F<realmin)) = realmin;
%   loglik = mean(log(F));
%   %Stop the process depending on the increase of the log likelihood
%   if abs((loglik/loglik_old)-1) < loglik_threshold
%     break;
%   end
%   loglik_old = loglik;
%   nbStep = nbStep+1;
% end

%% Add a tiny variance to avoid numerical instability
for i=1:nbStates
  Sigma(:,:,i) = Sigma(:,:,i) + 1E-5.*diag(ones(nbVar,1));
end


text:
Return info about all pipelines.

### Synopsis

Return info about all pipelines.

```
pachctl list pipeline [<pipeline>] [flags]
```

### Options

```
      --full-timestamps     Return absolute timestamps (as opposed to the default, relative timestamps).
  -h, --help                help for pipeline
      --history string      Return revision history for pipelines. (default "none")
  -o, --output string       Output format when --raw is set: "json" or "yaml" (default "json")
      --raw                 Disable pretty printing; serialize data structures to an encoding such as json or yaml
  -s, --spec                Output 'create pipeline' compatibility specs.
      --state stringArray   Return only pipelines with the specified state. Can be repeated to include multiple states
```

### Options inherited from parent commands

```
      --no-color   Turn off colors.
  -v, --verbose    Output verbose logs
```

redpajama_set_name: RedPajamaGithub


text:
package com.navercorp.pinpoint.web.view;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.navercorp.pinpoint.web.vo.ResponseTimeStatics;

import java.io.IOException;

public class ResponseTimeStatisticsSerializer extends JsonSerializer<ResponseTimeStatics> {

    @Override
    public void serialize(ResponseTimeStatics responseTimeStatics, JsonGenerator jgen, SerializerProvider serializerProvider) throws IOException {

        jgen.writeStartObject();

        jgen.writeFieldName(ResponseTimeStatics.TOTAL_COUNT);
        jgen.writeNumber(responseTimeStatics.getTotalCount());

        jgen.writeFieldName(ResponseTimeStatics.SUM_ELAPSED_TIME);
        jgen.writeNumber(responseTimeStatics.getSumTime());

        jgen.writeFieldName(ResponseTimeStatics.AVG_ELAPSED_TIME);
        jgen.writeNumber(responseTimeStatics.getAvgTime());

        jgen.writeFieldName(ResponseTimeStatics.MAX_ELAPSED_TIME);
        jgen.writeNumber(responseTimeStatics.getMaxTime());

        jgen.writeEndObject();
    }

}


text:
/*
jQuery Blink Wiggle and Bob
Author: WonderGroup, Jordan Thomas
URL: http://labs.wondergroup.com/demos/mini-ui/index.html
License: MIT (http://en.wikipedia.org/wiki/MIT_License)
*/
jQuery.fn.blink = function(o) {
	var d = { speed: 200, blinks: 3, callback: null };
	var o = jQuery.extend(d, o);
	return this.each( function() {
		var calls = 0;
		for (i=1;i<=o.blinks;i++) {
			$(this).animate({
				opacity: 0
			}, o.speed).animate({
				opacity: 1
			}, o.speed, function() {
				calls++;
				if (calls == o.blinks && jQuery.isFunction(o.callback)) { o.callback(); }
			});
		}
	});
};
jQuery.fn.wiggle = function(o) {
	var d = { speed: 50, wiggles: 3, travel: 5, callback: null };
	var o = jQuery.extend(d, o);

	return this.each( function() {
		var cache = this;
		var wrap = jQuery(this).wrap('

').css("position","absolute");
		var calls = 0;
		for (i=1;i<=o.wiggles;i++) {
			jQuery(this).animate({
				left: "-=" + o.travel
			}, o.speed).animate({
				left: "+=" + o.travel*2
			}, o.speed*2).animate({
				left: "-=" + o.travel
			}, o.speed, function() {
				calls++;
				if (jQuery(cache).parent().hasClass('wiggle-wrap')) {
					jQuery(cache).parent().replaceWith(cache);
				}
				if (calls == o.wiggles && jQuery.isFunction(o.callback)) { o.callback(); }
			});
		}
	});
};
jQuery.fn.bob = function(o) {
	var d = { speed: 50, bobs: 3, travel: 5, callback: null };
	var o = jQuery.extend(d, o);

	return this.each( function() {
		var cache = this;
		var wrap = jQuery(this).wrap('

').css("position","relative");
		var calls = 0;
		for (i=1;i<=o.bobs;i++) {
			jQuery(this).animate({
				top: "-=" + o.travel
			}, o.speed).animate({
				top: "+=" + o.travel*2
			}, o.speed*2).animate({
				top: "-=" + o.travel
			}, o.speed, function() {
				calls++;
				if (jQuery(cache).parent().hasClass('bob-wrap')) {
					jQuery(cache).parent().replaceWith(cache);
				}
				if (calls == o.bobs && jQuery.isFunction(o.callback)) { o.callback(); }
			});
		}
	});
};


text:
<?php

declare( strict_types=1 );

namespace Fincallorca\DateTimeBundle\DependencyInjection;

use DateTimeZone;
use Fincallorca\DateTimeBundle\Component\DateTimeZoneContainer;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;

/**
 * Class Configuration
 *
 * @package Fincallorca\DateTimeBundle
 */
class Configuration implements ConfigurationInterface
{
    /**
     * {@inheritdoc}
     */
    public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder('datetime');

        // @formatter:off
        $treeBuilder->getRootNode()
            ->info('DateTime Bundle Configuration')
            ->children()
                ->scalarNode('database')
                    ->info('The timezone of the datetime values which are saved and will be saved in the database. If empty, the server timezone (see `date_default_timezone_get`) wil be choosen.')
                    ->defaultNull()
                    ->cannotBeEmpty()
                    ->validate()
                        ->ifTrue(function ($_value) { return $this->isInvalidTimezone($_value); })
                        ->thenInvalid('Invalid timezone "%s" for config parameter "datetime.client" set. Please check https://www.php.net/manual/en/timezones.america.php.')
                    ->end()
                ->end()
                ->scalarNode('client')
                    ->info('The timezone of the client. If not set, the value of `date_default_timezone_get` will be chosen.')
                    ->defaultNull()
                    ->cannotBeEmpty()
                    ->validate()
                        ->ifTrue(function ($_value) { return $this->isInvalidTimezone($_value); })
                        ->thenInvalid('Invalid timezone "%s" for config parameter "datetime.client" set. Please check https://www.php.net/manual/en/timezones.america.php.')
                    ->end()
                ->end()
            ->end();
        // @formatter:on

        return $treeBuilder;
    }

    /**
     * Returns `true` if the submitted string is *not* a valid timezone, else `false`.
     *
     * @param string|null $timezoneName
     *
     * @return boolean
     *
     * @link http://us.php.net/manual/en/timezones.others.php
     *
     */
    protected function isInvalidTimezone(?string $timezoneName): bool
    {
        return is_null($timezoneName) ? false : ( !DateTimeZoneContainer::isValidTimezone($timezoneName) );
    }
}


text:
/*
326 Power of Three

Given an integer, write a function to determine if it is a power of three.

Follow up:
 Could you do it without using any loop / recursion?

*/


text: A GUI app for cucumber


text:
package tutorial.progress_monitor_demo;

public class Test {

  final static String tag = Test.class.getPackage().getName();

  public static void main(String[] args) {
    System.out.println(tag);
    ProgressMonitorDemo.main();
  }

}


text:
#pragma once
#include <aws/directconnect/DirectConnect_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/directconnect/model/Tag.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace DirectConnect
{
namespace Model
{

  /**
   *
Information about a tag associated with an Direct Connect
   * resource.

See Also:
   AWS
   * API Reference

   */
  class AWS_DIRECTCONNECT_API ResourceTag
  {
  public:
    ResourceTag();
    ResourceTag(Aws::Utils::Json::JsonView jsonValue);
    ResourceTag& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
The Amazon Resource Name (ARN) of the resource.

     */
    inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }

    /**
     *
The Amazon Resource Name (ARN) of the resource.

     */
    inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }

    /**
     *
The Amazon Resource Name (ARN) of the resource.

     */
    inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }

    /**
     *
The Amazon Resource Name (ARN) of the resource.

     */
    inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }

    /**
     *
The Amazon Resource Name (ARN) of the resource.

     */
    inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }

    /**
     *
The Amazon Resource Name (ARN) of the resource.

     */
    inline ResourceTag& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}

    /**
     *
The Amazon Resource Name (ARN) of the resource.

     */
    inline ResourceTag& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}

    /**
     *
The Amazon Resource Name (ARN) of the resource.

     */
    inline ResourceTag& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}

    /**
     *
The tags.

     */
    inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }

    /**
     *
The tags.

     */
    inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }

    /**
     *
The tags.

     */
    inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }

    /**
     *
The tags.

     */
    inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }

    /**
     *
The tags.

     */
    inline ResourceTag& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}

    /**
     *
The tags.

     */
    inline ResourceTag& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}

    /**
     *
The tags.

     */
    inline ResourceTag& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }

    /**
     *
The tags.

     */
    inline ResourceTag& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }

  private:

    Aws::String m_resourceArn;
    bool m_resourceArnHasBeenSet = false;

    Aws::Vector<Tag> m_tags;
    bool m_tagsHasBeenSet = false;
  };

} // namespace Model
} // namespace DirectConnect
} // namespace Aws


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Collections.Generic;
using Cake.Core.Tooling;

namespace Cake.Common.Tools.NSIS
{
    /// <summary>
    /// Contains settings used by the <see cref="MakeNSISRunner"/>.
    /// </summary>
    // ReSharper disable once InconsistentNaming
    public sealed class MakeNSISSettings : ToolSettings
    {
        /// <summary>
        /// Gets or sets the script compiler defines.
        /// </summary>
        public IDictionary<string, string> Defines { get; set; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);

        /// <summary>
        /// Gets or sets a value indicating whether to disable current directory change to that of the script file.
        /// </summary>
        public bool NoChangeDirectory { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to disable inclusion of the <c>nsisconf.nsh</c> file.
        /// </summary>
        public bool NoConfig { get; set; }
    }
}


text:
package com.amazonaws.services.sqs.model;

import java.io.Serializable;

/**
 *

 * Encloses a message ID for successfully enqueued message of a
 * SendMessageBatch.
 *

 */
public class SendMessageBatchResultEntry implements Serializable, Cloneable {

    /**
     * An identifier for the message in this batch.
     */
    private String id;

    /**
     * An identifier for the message.
     */
    private String messageId;

    /**
     * An MD5 digest of the non-URL-encoded message body string. This can be
     * used to verify that Amazon SQS received the message correctly. Amazon
     * SQS first URL decodes the message before creating the MD5 digest. For
     * information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.
     */
    private String mD5OfMessageBody;

    /**
     * An MD5 digest of the non-URL-encoded message attribute string. This
     * can be used to verify that Amazon SQS received the message batch
     * correctly. Amazon SQS first URL decodes the message before creating
     * the MD5 digest. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.
     */
    private String mD5OfMessageAttributes;

    /**
     * An identifier for the message in this batch.
     *
     * @return An identifier for the message in this batch.
     */
    public String getId() {
        return id;
    }

    /**
     * An identifier for the message in this batch.
     *
     * @param id An identifier for the message in this batch.
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * An identifier for the message in this batch.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param id An identifier for the message in this batch.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public SendMessageBatchResultEntry withId(String id) {
        this.id = id;
        return this;
    }

    /**
     * An identifier for the message.
     *
     * @return An identifier for the message.
     */
    public String getMessageId() {
        return messageId;
    }

    /**
     * An identifier for the message.
     *
     * @param messageId An identifier for the message.
     */
    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    /**
     * An identifier for the message.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param messageId An identifier for the message.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public SendMessageBatchResultEntry withMessageId(String messageId) {
        this.messageId = messageId;
        return this;
    }

    /**
     * An MD5 digest of the non-URL-encoded message body string. This can be
     * used to verify that Amazon SQS received the message correctly. Amazon
     * SQS first URL decodes the message before creating the MD5 digest. For
     * information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.
     *
     * @return An MD5 digest of the non-URL-encoded message body string. This can be
     *         used to verify that Amazon SQS received the message correctly. Amazon
     *         SQS first URL decodes the message before creating the MD5 digest. For
     *         information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.
     */
    public String getMD5OfMessageBody() {
        return mD5OfMessageBody;
    }

    /**
     * An MD5 digest of the non-URL-encoded message body string. This can be
     * used to verify that Amazon SQS received the message correctly. Amazon
     * SQS first URL decodes the message before creating the MD5 digest. For
     * information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.
     *
     * @param mD5OfMessageBody An MD5 digest of the non-URL-encoded message body string. This can be
     *         used to verify that Amazon SQS received the message correctly. Amazon
     *         SQS first URL decodes the message before creating the MD5 digest. For
     *         information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.
     */
    public void setMD5OfMessageBody(String mD5OfMessageBody) {
        this.mD5OfMessageBody = mD5OfMessageBody;
    }

    /**
     * An MD5 digest of the non-URL-encoded message body string. This can be
     * used to verify that Amazon SQS received the message correctly. Amazon
     * SQS first URL decodes the message before creating the MD5 digest. For
     * information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param mD5OfMessageBody An MD5 digest of the non-URL-encoded message body string. This can be
     *         used to verify that Amazon SQS received the message correctly. Amazon
     *         SQS first URL decodes the message before creating the MD5 digest. For
     *         information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public SendMessageBatchResultEntry withMD5OfMessageBody(String mD5OfMessageBody) {
        this.mD5OfMessageBody = mD5OfMessageBody;
        return this;
    }

    /**
     * An MD5 digest of the non-URL-encoded message attribute string. This
     * can be used to verify that Amazon SQS received the message batch
     * correctly. Amazon SQS first URL decodes the message before creating
     * the MD5 digest. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.
     *
     * @return An MD5 digest of the non-URL-encoded message attribute string. This
     *         can be used to verify that Amazon SQS received the message batch
     *         correctly. Amazon SQS first URL decodes the message before creating
     *         the MD5 digest. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.
     */
    public String getMD5OfMessageAttributes() {
        return mD5OfMessageAttributes;
    }

    /**
     * An MD5 digest of the non-URL-encoded message attribute string. This
     * can be used to verify that Amazon SQS received the message batch
     * correctly. Amazon SQS first URL decodes the message before creating
     * the MD5 digest. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.
     *
     * @param mD5OfMessageAttributes An MD5 digest of the non-URL-encoded message attribute string. This
     *         can be used to verify that Amazon SQS received the message batch
     *         correctly. Amazon SQS first URL decodes the message before creating
     *         the MD5 digest. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.
     */
    public void setMD5OfMessageAttributes(String mD5OfMessageAttributes) {
        this.mD5OfMessageAttributes = mD5OfMessageAttributes;
    }

    /**
     * An MD5 digest of the non-URL-encoded message attribute string. This
     * can be used to verify that Amazon SQS received the message batch
     * correctly. Amazon SQS first URL decodes the message before creating
     * the MD5 digest. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param mD5OfMessageAttributes An MD5 digest of the non-URL-encoded message attribute string. This
     *         can be used to verify that Amazon SQS received the message batch
     *         correctly. Amazon SQS first URL decodes the message before creating
     *         the MD5 digest. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public SendMessageBatchResultEntry withMD5OfMessageAttributes(String mD5OfMessageAttributes) {
        this.mD5OfMessageAttributes = mD5OfMessageAttributes;
        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getId() != null) sb.append("Id: " + getId() + ",");
        if (getMessageId() != null) sb.append("MessageId: " + getMessageId() + ",");
        if (getMD5OfMessageBody() != null) sb.append("MD5OfMessageBody: " + getMD5OfMessageBody() + ",");
        if (getMD5OfMessageAttributes() != null) sb.append("MD5OfMessageAttributes: " + getMD5OfMessageAttributes() );
        sb.append("}");
        return sb.toString();
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
        hashCode = prime * hashCode + ((getMessageId() == null) ? 0 : getMessageId().hashCode());
        hashCode = prime * hashCode + ((getMD5OfMessageBody() == null) ? 0 : getMD5OfMessageBody().hashCode());
        hashCode = prime * hashCode + ((getMD5OfMessageAttributes() == null) ? 0 : getMD5OfMessageAttributes().hashCode());
        return hashCode;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;
        if (obj == null) return false;

        if (obj instanceof SendMessageBatchResultEntry == false) return false;
        SendMessageBatchResultEntry other = (SendMessageBatchResultEntry)obj;

        if (other.getId() == null ^ this.getId() == null) return false;
        if (other.getId() != null && other.getId().equals(this.getId()) == false) return false;
        if (other.getMessageId() == null ^ this.getMessageId() == null) return false;
        if (other.getMessageId() != null && other.getMessageId().equals(this.getMessageId()) == false) return false;
        if (other.getMD5OfMessageBody() == null ^ this.getMD5OfMessageBody() == null) return false;
        if (other.getMD5OfMessageBody() != null && other.getMD5OfMessageBody().equals(this.getMD5OfMessageBody()) == false) return false;
        if (other.getMD5OfMessageAttributes() == null ^ this.getMD5OfMessageAttributes() == null) return false;
        if (other.getMD5OfMessageAttributes() != null && other.getMD5OfMessageAttributes().equals(this.getMD5OfMessageAttributes()) == false) return false;
        return true;
    }

    @Override
    public SendMessageBatchResultEntry clone() {
        try {
            return (SendMessageBatchResultEntry) super.clone();

        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }

    }

}


text:
var express = require("express"),
    request = require("request");

var router = express.Router();

router.use(express.static("public"));

router.get("/", function(req, res) {
    res.render("index");
});

router.get("/:username", function(req, res) {
    var username = req.params.username.replace(/\W/g, ""); // strip out all non-alphanumeric chars

    request({
        url: "https://api.discogs.com/users/" + username + "/collection/folders/0/releases",
        headers: {
            "User-Agent": "vinylist/0.1 http://github.com/montyanderson/vinylist"
        }
    }, function(err, reqres, body) {
        if(!err) {
            res.render("profile", {
                username: username,
                collection: JSON.parse(body).releases
            });
        } else {
            console.log(err);
            console.log(url);
        }
    });
});

module.exports = router;