text:
package cloudstack

import (
	"encoding/json"
	"fmt"
	"net/url"
	"strconv"
	"strings"
)

type AddImageStoreParams struct {
	p map[string]interface{}
}

func (p *AddImageStoreParams) toURLValues() url.Values {
	u := url.Values{}
	if p.p == nil {
		return u
	}
	if v, found := p.p["details"]; found {
		i := 0
		for k, vv := range v.(map[string]string) {
			u.Set(fmt.Sprintf("details[%d].key", i), k)
			u.Set(fmt.Sprintf("details[%d].value", i), vv)
			i++
		}
	}
	if v, found := p.p["name"]; found {
		u.Set("name", v.(string))
	}
	if v, found := p.p["provider"]; found {
		u.Set("provider", v.(string))
	}
	if v, found := p.p["url"]; found {
		u.Set("url", v.(string))
	}
	if v, found := p.p["zoneid"]; found {
		u.Set("zoneid", v.(string))
	}
	return u
}

func (p *AddImageStoreParams) SetDetails(v map[string]string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["details"] = v
	return
}

func (p *AddImageStoreParams) SetName(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["name"] = v
	return
}

func (p *AddImageStoreParams) SetProvider(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["provider"] = v
	return
}

func (p *AddImageStoreParams) SetUrl(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["url"] = v
	return
}

func (p *AddImageStoreParams) SetZoneid(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["zoneid"] = v
	return
}

// You should always use this function to get a new AddImageStoreParams instance,
// as then you are sure you have configured all required params
func (s *ImageStoreService) NewAddImageStoreParams(provider string) *AddImageStoreParams {
	p := &AddImageStoreParams{}
	p.p = make(map[string]interface{})
	p.p["provider"] = provider
	return p
}

// Adds backup image store.
func (s *ImageStoreService) AddImageStore(p *AddImageStoreParams) (*AddImageStoreResponse, error) {
	resp, err := s.cs.newRequest("addImageStore", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r AddImageStoreResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}
	return &r, nil
}

type AddImageStoreResponse struct {
	Details      []string `json:"details,omitempty"`
	Id           string   `json:"id,omitempty"`
	Name         string   `json:"name,omitempty"`
	Protocol     string   `json:"protocol,omitempty"`
	Providername string   `json:"providername,omitempty"`
	Scope        string   `json:"scope,omitempty"`
	Url          string   `json:"url,omitempty"`
	Zoneid       string   `json:"zoneid,omitempty"`
	Zonename     string   `json:"zonename,omitempty"`
}

type AddImageStoreS3Params struct {
	p map[string]interface{}
}

func (p *AddImageStoreS3Params) toURLValues() url.Values {
	u := url.Values{}
	if p.p == nil {
		return u
	}
	if v, found := p.p["accesskey"]; found {
		u.Set("accesskey", v.(string))
	}
	if v, found := p.p["bucket"]; found {
		u.Set("bucket", v.(string))
	}
	if v, found := p.p["connectiontimeout"]; found {
		vv := strconv.Itoa(v.(int))
		u.Set("connectiontimeout", vv)
	}
	if v, found := p.p["connectionttl"]; found {
		vv := strconv.Itoa(v.(int))
		u.Set("connectionttl", vv)
	}
	if v, found := p.p["endpoint"]; found {
		u.Set("endpoint", v.(string))
	}
	if v, found := p.p["maxerrorretry"]; found {
		vv := strconv.Itoa(v.(int))
		u.Set("maxerrorretry", vv)
	}
	if v, found := p.p["s3signer"]; found {
		u.Set("s3signer", v.(string))
	}
	if v, found := p.p["secretkey"]; found {
		u.Set("secretkey", v.(string))
	}
	if v, found := p.p["sockettimeout"]; found {
		vv := strconv.Itoa(v.(int))
		u.Set("sockettimeout", vv)
	}
	if v, found := p.p["usehttps"]; found {
		vv := strconv.FormatBool(v.(bool))
		u.Set("usehttps", vv)
	}
	if v, found := p.p["usetcpkeepalive"]; found {
		vv := strconv.FormatBool(v.(bool))
		u.Set("usetcpkeepalive", vv)
	}
	return u
}

func (p *AddImageStoreS3Params) SetAccesskey(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["accesskey"] = v
	return
}

func (p *AddImageStoreS3Params) SetBucket(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["bucket"] = v
	return
}

func (p *AddImageStoreS3Params) SetConnectiontimeout(v int) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["connectiontimeout"] = v
	return
}

func (p *AddImageStoreS3Params) SetConnectionttl(v int) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["connectionttl"] = v
	return
}

func (p *AddImageStoreS3Params) SetEndpoint(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["endpoint"] = v
	return
}

func (p *AddImageStoreS3Params) SetMaxerrorretry(v int) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["maxerrorretry"] = v
	return
}

func (p *AddImageStoreS3Params) SetS3signer(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["s3signer"] = v
	return
}

func (p *AddImageStoreS3Params) SetSecretkey(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["secretkey"] = v
	return
}

func (p *AddImageStoreS3Params) SetSockettimeout(v int) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["sockettimeout"] = v
	return
}

func (p *AddImageStoreS3Params) SetUsehttps(v bool) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["usehttps"] = v
	return
}

func (p *AddImageStoreS3Params) SetUsetcpkeepalive(v bool) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["usetcpkeepalive"] = v
	return
}

// You should always use this function to get a new AddImageStoreS3Params instance,
// as then you are sure you have configured all required params
func (s *ImageStoreService) NewAddImageStoreS3Params(accesskey string, bucket string, endpoint string, secretkey string) *AddImageStoreS3Params {
	p := &AddImageStoreS3Params{}
	p.p = make(map[string]interface{})
	p.p["accesskey"] = accesskey
	p.p["bucket"] = bucket
	p.p["endpoint"] = endpoint
	p.p["secretkey"] = secretkey
	return p
}

// Adds S3 Image Store
func (s *ImageStoreService) AddImageStoreS3(p *AddImageStoreS3Params) (*AddImageStoreS3Response, error) {
	resp, err := s.cs.newRequest("addImageStoreS3", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r AddImageStoreS3Response
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}
	return &r, nil
}

type AddImageStoreS3Response struct {
	Details      []string `json:"details,omitempty"`
	Id           string   `json:"id,omitempty"`
	Name         string   `json:"name,omitempty"`
	Protocol     string   `json:"protocol,omitempty"`
	Providername string   `json:"providername,omitempty"`
	Scope        string   `json:"scope,omitempty"`
	Url          string   `json:"url,omitempty"`
	Zoneid       string   `json:"zoneid,omitempty"`
	Zonename     string   `json:"zonename,omitempty"`
}

type ListImageStoresParams struct {
	p map[string]interface{}
}

func (p *ListImageStoresParams) toURLValues() url.Values {
	u := url.Values{}
	if p.p == nil {
		return u
	}
	if v, found := p.p["id"]; found {
		u.Set("id", v.(string))
	}
	if v, found := p.p["keyword"]; found {
		u.Set("keyword", v.(string))
	}
	if v, found := p.p["name"]; found {
		u.Set("name", v.(string))
	}
	if v, found := p.p["page"]; found {
		vv := strconv.Itoa(v.(int))
		u.Set("page", vv)
	}
	if v, found := p.p["pagesize"]; found {
		vv := strconv.Itoa(v.(int))
		u.Set("pagesize", vv)
	}
	if v, found := p.p["protocol"]; found {
		u.Set("protocol", v.(string))
	}
	if v, found := p.p["provider"]; found {
		u.Set("provider", v.(string))
	}
	if v, found := p.p["zoneid"]; found {
		u.Set("zoneid", v.(string))
	}
	return u
}

func (p *ListImageStoresParams) SetId(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["id"] = v
	return
}

func (p *ListImageStoresParams) SetKeyword(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["keyword"] = v
	return
}

func (p *ListImageStoresParams) SetName(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["name"] = v
	return
}

func (p *ListImageStoresParams) SetPage(v int) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["page"] = v
	return
}

func (p *ListImageStoresParams) SetPagesize(v int) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["pagesize"] = v
	return
}

func (p *ListImageStoresParams) SetProtocol(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["protocol"] = v
	return
}

func (p *ListImageStoresParams) SetProvider(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["provider"] = v
	return
}

func (p *ListImageStoresParams) SetZoneid(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["zoneid"] = v
	return
}

// You should always use this function to get a new ListImageStoresParams instance,
// as then you are sure you have configured all required params
func (s *ImageStoreService) NewListImageStoresParams() *ListImageStoresParams {
	p := &ListImageStoresParams{}
	p.p = make(map[string]interface{})
	return p
}

// This is a courtesy helper function, which in some cases may not work as expected!
func (s *ImageStoreService) GetImageStoreID(name string, opts ...OptionFunc) (string, error) {
	p := &ListImageStoresParams{}
	p.p = make(map[string]interface{})

	p.p["name"] = name

	for _, fn := range opts {
		if err := fn(s.cs, p); err != nil {
			return "", err
		}
	}

	l, err := s.ListImageStores(p)
	if err != nil {
		return "", err
	}

	if l.Count == 0 {
		return "", fmt.Errorf("No match found for %s: %+v", name, l)
	}

	if l.Count == 1 {
		return l.ImageStores[0].Id, nil
	}

	if l.Count > 1 {
		for _, v := range l.ImageStores {
			if v.Name == name {
				return v.Id, nil
			}
		}
	}
	return "", fmt.Errorf("Could not find an exact match for %s: %+v", name, l)
}

// This is a courtesy helper function, which in some cases may not work as expected!
func (s *ImageStoreService) GetImageStoreByName(name string, opts ...OptionFunc) (*ImageStore, int, error) {
	id, err := s.GetImageStoreID(name, opts...)
	if err != nil {
		return nil, -1, err
	}

	r, count, err := s.GetImageStoreByID(id, opts...)
	if err != nil {
		return nil, count, err
	}
	return r, count, nil
}

// This is a courtesy helper function, which in some cases may not work as expected!
func (s *ImageStoreService) GetImageStoreByID(id string, opts ...OptionFunc) (*ImageStore, int, error) {
	p := &ListImageStoresParams{}
	p.p = make(map[string]interface{})

	p.p["id"] = id

	for _, fn := range opts {
		if err := fn(s.cs, p); err != nil {
			return nil, -1, err
		}
	}

	l, err := s.ListImageStores(p)
	if err != nil {
		if strings.Contains(err.Error(), fmt.Sprintf(
			"Invalid parameter id value=%s due to incorrect long value format, "+
				"or entity does not exist", id)) {
			return nil, 0, fmt.Errorf("No match found for %s: %+v", id, l)
		}
		return nil, -1, err
	}

	if l.Count == 0 {
		return nil, l.Count, fmt.Errorf("No match found for %s: %+v", id, l)
	}

	if l.Count == 1 {
		return l.ImageStores[0], l.Count, nil
	}
	return nil, l.Count, fmt.Errorf("There is more then one result for ImageStore UUID: %s!", id)
}

// Lists image stores.
func (s *ImageStoreService) ListImageStores(p *ListImageStoresParams) (*ListImageStoresResponse, error) {
	resp, err := s.cs.newRequest("listImageStores", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r ListImageStoresResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}
	return &r, nil
}

type ListImageStoresResponse struct {
	Count       int           `json:"count"`
	ImageStores []*ImageStore `json:"imagestore"`
}

type ImageStore struct {
	Details      []string `json:"details,omitempty"`
	Id           string   `json:"id,omitempty"`
	Name         string   `json:"name,omitempty"`
	Protocol     string   `json:"protocol,omitempty"`
	Providername string   `json:"providername,omitempty"`
	Scope        string   `json:"scope,omitempty"`
	Url          string   `json:"url,omitempty"`
	Zoneid       string   `json:"zoneid,omitempty"`
	Zonename     string   `json:"zonename,omitempty"`
}

type DeleteImageStoreParams struct {
	p map[string]interface{}
}

func (p *DeleteImageStoreParams) toURLValues() url.Values {
	u := url.Values{}
	if p.p == nil {
		return u
	}
	if v, found := p.p["id"]; found {
		u.Set("id", v.(string))
	}
	return u
}

func (p *DeleteImageStoreParams) SetId(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["id"] = v
	return
}

// You should always use this function to get a new DeleteImageStoreParams instance,
// as then you are sure you have configured all required params
func (s *ImageStoreService) NewDeleteImageStoreParams(id string) *DeleteImageStoreParams {
	p := &DeleteImageStoreParams{}
	p.p = make(map[string]interface{})
	p.p["id"] = id
	return p
}

// Deletes an image store or Secondary Storage.
func (s *ImageStoreService) DeleteImageStore(p *DeleteImageStoreParams) (*DeleteImageStoreResponse, error) {
	resp, err := s.cs.newRequest("deleteImageStore", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r DeleteImageStoreResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}
	return &r, nil
}

type DeleteImageStoreResponse struct {
	Displaytext string `json:"displaytext,omitempty"`
	Success     string `json:"success,omitempty"`
}

type CreateSecondaryStagingStoreParams struct {
	p map[string]interface{}
}

func (p *CreateSecondaryStagingStoreParams) toURLValues() url.Values {
	u := url.Values{}
	if p.p == nil {
		return u
	}
	if v, found := p.p["details"]; found {
		i := 0
		for k, vv := range v.(map[string]string) {
			u.Set(fmt.Sprintf("details[%d].key", i), k)
			u.Set(fmt.Sprintf("details[%d].value", i), vv)
			i++
		}
	}
	if v, found := p.p["provider"]; found {
		u.Set("provider", v.(string))
	}
	if v, found := p.p["scope"]; found {
		u.Set("scope", v.(string))
	}
	if v, found := p.p["url"]; found {
		u.Set("url", v.(string))
	}
	if v, found := p.p["zoneid"]; found {
		u.Set("zoneid", v.(string))
	}
	return u
}

func (p *CreateSecondaryStagingStoreParams) SetDetails(v map[string]string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["details"] = v
	return
}

func (p *CreateSecondaryStagingStoreParams) SetProvider(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["provider"] = v
	return
}

func (p *CreateSecondaryStagingStoreParams) SetScope(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["scope"] = v
	return
}

func (p *CreateSecondaryStagingStoreParams) SetUrl(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["url"] = v
	return
}

func (p *CreateSecondaryStagingStoreParams) SetZoneid(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["zoneid"] = v
	return
}

// You should always use this function to get a new CreateSecondaryStagingStoreParams instance,
// as then you are sure you have configured all required params
func (s *ImageStoreService) NewCreateSecondaryStagingStoreParams(url string) *CreateSecondaryStagingStoreParams {
	p := &CreateSecondaryStagingStoreParams{}
	p.p = make(map[string]interface{})
	p.p["url"] = url
	return p
}

// create secondary staging store.
func (s *ImageStoreService) CreateSecondaryStagingStore(p *CreateSecondaryStagingStoreParams) (*CreateSecondaryStagingStoreResponse, error) {
	resp, err := s.cs.newRequest("createSecondaryStagingStore", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r CreateSecondaryStagingStoreResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}
	return &r, nil
}

type CreateSecondaryStagingStoreResponse struct {
	Details      []string `json:"details,omitempty"`
	Id           string   `json:"id,omitempty"`
	Name         string   `json:"name,omitempty"`
	Protocol     string   `json:"protocol,omitempty"`
	Providername string   `json:"providername,omitempty"`
	Scope        string   `json:"scope,omitempty"`
	Url          string   `json:"url,omitempty"`
	Zoneid       string   `json:"zoneid,omitempty"`
	Zonename     string   `json:"zonename,omitempty"`
}

type ListSecondaryStagingStoresParams struct {
	p map[string]interface{}
}

func (p *ListSecondaryStagingStoresParams) toURLValues() url.Values {
	u := url.Values{}
	if p.p == nil {
		return u
	}
	if v, found := p.p["id"]; found {
		u.Set("id", v.(string))
	}
	if v, found := p.p["keyword"]; found {
		u.Set("keyword", v.(string))
	}
	if v, found := p.p["name"]; found {
		u.Set("name", v.(string))
	}
	if v, found := p.p["page"]; found {
		vv := strconv.Itoa(v.(int))
		u.Set("page", vv)
	}
	if v, found := p.p["pagesize"]; found {
		vv := strconv.Itoa(v.(int))
		u.Set("pagesize", vv)
	}
	if v, found := p.p["protocol"]; found {
		u.Set("protocol", v.(string))
	}
	if v, found := p.p["provider"]; found {
		u.Set("provider", v.(string))
	}
	if v, found := p.p["zoneid"]; found {
		u.Set("zoneid", v.(string))
	}
	return u
}

func (p *ListSecondaryStagingStoresParams) SetId(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["id"] = v
	return
}

func (p *ListSecondaryStagingStoresParams) SetKeyword(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["keyword"] = v
	return
}

func (p *ListSecondaryStagingStoresParams) SetName(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["name"] = v
	return
}

func (p *ListSecondaryStagingStoresParams) SetPage(v int) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["page"] = v
	return
}

func (p *ListSecondaryStagingStoresParams) SetPagesize(v int) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["pagesize"] = v
	return
}

func (p *ListSecondaryStagingStoresParams) SetProtocol(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["protocol"] = v
	return
}

func (p *ListSecondaryStagingStoresParams) SetProvider(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["provider"] = v
	return
}

func (p *ListSecondaryStagingStoresParams) SetZoneid(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["zoneid"] = v
	return
}

// You should always use this function to get a new ListSecondaryStagingStoresParams instance,
// as then you are sure you have configured all required params
func (s *ImageStoreService) NewListSecondaryStagingStoresParams() *ListSecondaryStagingStoresParams {
	p := &ListSecondaryStagingStoresParams{}
	p.p = make(map[string]interface{})
	return p
}

// This is a courtesy helper function, which in some cases may not work as expected!
func (s *ImageStoreService) GetSecondaryStagingStoreID(name string, opts ...OptionFunc) (string, error) {
	p := &ListSecondaryStagingStoresParams{}
	p.p = make(map[string]interface{})

	p.p["name"] = name

	for _, fn := range opts {
		if err := fn(s.cs, p); err != nil {
			return "", err
		}
	}

	l, err := s.ListSecondaryStagingStores(p)
	if err != nil {
		return "", err
	}

	if l.Count == 0 {
		return "", fmt.Errorf("No match found for %s: %+v", name, l)
	}

	if l.Count == 1 {
		return l.SecondaryStagingStores[0].Id, nil
	}

	if l.Count > 1 {
		for _, v := range l.SecondaryStagingStores {
			if v.Name == name {
				return v.Id, nil
			}
		}
	}
	return "", fmt.Errorf("Could not find an exact match for %s: %+v", name, l)
}

// This is a courtesy helper function, which in some cases may not work as expected!
func (s *ImageStoreService) GetSecondaryStagingStoreByName(name string, opts ...OptionFunc) (*SecondaryStagingStore, int, error) {
	id, err := s.GetSecondaryStagingStoreID(name, opts...)
	if err != nil {
		return nil, -1, err
	}

	r, count, err := s.GetSecondaryStagingStoreByID(id, opts...)
	if err != nil {
		return nil, count, err
	}
	return r, count, nil
}

// This is a courtesy helper function, which in some cases may not work as expected!
func (s *ImageStoreService) GetSecondaryStagingStoreByID(id string, opts ...OptionFunc) (*SecondaryStagingStore, int, error) {
	p := &ListSecondaryStagingStoresParams{}
	p.p = make(map[string]interface{})

	p.p["id"] = id

	for _, fn := range opts {
		if err := fn(s.cs, p); err != nil {
			return nil, -1, err
		}
	}

	l, err := s.ListSecondaryStagingStores(p)
	if err != nil {
		if strings.Contains(err.Error(), fmt.Sprintf(
			"Invalid parameter id value=%s due to incorrect long value format, "+
				"or entity does not exist", id)) {
			return nil, 0, fmt.Errorf("No match found for %s: %+v", id, l)
		}
		return nil, -1, err
	}

	if l.Count == 0 {
		return nil, l.Count, fmt.Errorf("No match found for %s: %+v", id, l)
	}

	if l.Count == 1 {
		return l.SecondaryStagingStores[0], l.Count, nil
	}
	return nil, l.Count, fmt.Errorf("There is more then one result for SecondaryStagingStore UUID: %s!", id)
}

// Lists secondary staging stores.
func (s *ImageStoreService) ListSecondaryStagingStores(p *ListSecondaryStagingStoresParams) (*ListSecondaryStagingStoresResponse, error) {
	resp, err := s.cs.newRequest("listSecondaryStagingStores", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r ListSecondaryStagingStoresResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}
	return &r, nil
}

type ListSecondaryStagingStoresResponse struct {
	Count                  int                      `json:"count"`
	SecondaryStagingStores []*SecondaryStagingStore `json:"secondarystagingstore"`
}

type SecondaryStagingStore struct {
	Details      []string `json:"details,omitempty"`
	Id           string   `json:"id,omitempty"`
	Name         string   `json:"name,omitempty"`
	Protocol     string   `json:"protocol,omitempty"`
	Providername string   `json:"providername,omitempty"`
	Scope        string   `json:"scope,omitempty"`
	Url          string   `json:"url,omitempty"`
	Zoneid       string   `json:"zoneid,omitempty"`
	Zonename     string   `json:"zonename,omitempty"`
}

type DeleteSecondaryStagingStoreParams struct {
	p map[string]interface{}
}

func (p *DeleteSecondaryStagingStoreParams) toURLValues() url.Values {
	u := url.Values{}
	if p.p == nil {
		return u
	}
	if v, found := p.p["id"]; found {
		u.Set("id", v.(string))
	}
	return u
}

func (p *DeleteSecondaryStagingStoreParams) SetId(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["id"] = v
	return
}

// You should always use this function to get a new DeleteSecondaryStagingStoreParams instance,
// as then you are sure you have configured all required params
func (s *ImageStoreService) NewDeleteSecondaryStagingStoreParams(id string) *DeleteSecondaryStagingStoreParams {
	p := &DeleteSecondaryStagingStoreParams{}
	p.p = make(map[string]interface{})
	p.p["id"] = id
	return p
}

// Deletes a secondary staging store .
func (s *ImageStoreService) DeleteSecondaryStagingStore(p *DeleteSecondaryStagingStoreParams) (*DeleteSecondaryStagingStoreResponse, error) {
	resp, err := s.cs.newRequest("deleteSecondaryStagingStore", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r DeleteSecondaryStagingStoreResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}
	return &r, nil
}

type DeleteSecondaryStagingStoreResponse struct {
	Displaytext string `json:"displaytext,omitempty"`
	Success     string `json:"success,omitempty"`
}

type UpdateCloudToUseObjectStoreParams struct {
	p map[string]interface{}
}

func (p *UpdateCloudToUseObjectStoreParams) toURLValues() url.Values {
	u := url.Values{}
	if p.p == nil {
		return u
	}
	if v, found := p.p["details"]; found {
		i := 0
		for k, vv := range v.(map[string]string) {
			u.Set(fmt.Sprintf("details[%d].key", i), k)
			u.Set(fmt.Sprintf("details[%d].value", i), vv)
			i++
		}
	}
	if v, found := p.p["name"]; found {
		u.Set("name", v.(string))
	}
	if v, found := p.p["provider"]; found {
		u.Set("provider", v.(string))
	}
	if v, found := p.p["url"]; found {
		u.Set("url", v.(string))
	}
	return u
}

func (p *UpdateCloudToUseObjectStoreParams) SetDetails(v map[string]string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["details"] = v
	return
}

func (p *UpdateCloudToUseObjectStoreParams) SetName(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["name"] = v
	return
}

func (p *UpdateCloudToUseObjectStoreParams) SetProvider(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["provider"] = v
	return
}

func (p *UpdateCloudToUseObjectStoreParams) SetUrl(v string) {
	if p.p == nil {
		p.p = make(map[string]interface{})
	}
	p.p["url"] = v
	return
}

// You should always use this function to get a new UpdateCloudToUseObjectStoreParams instance,
// as then you are sure you have configured all required params
func (s *ImageStoreService) NewUpdateCloudToUseObjectStoreParams(provider string) *UpdateCloudToUseObjectStoreParams {
	p := &UpdateCloudToUseObjectStoreParams{}
	p.p = make(map[string]interface{})
	p.p["provider"] = provider
	return p
}

// Migrate current NFS secondary storages to use object store.
func (s *ImageStoreService) UpdateCloudToUseObjectStore(p *UpdateCloudToUseObjectStoreParams) (*UpdateCloudToUseObjectStoreResponse, error) {
	resp, err := s.cs.newRequest("updateCloudToUseObjectStore", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r UpdateCloudToUseObjectStoreResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}
	return &r, nil
}

type UpdateCloudToUseObjectStoreResponse struct {
	Details      []string `json:"details,omitempty"`
	Id           string   `json:"id,omitempty"`
	Name         string   `json:"name,omitempty"`
	Protocol     string   `json:"protocol,omitempty"`
	Providername string   `json:"providername,omitempty"`
	Scope        string   `json:"scope,omitempty"`
	Url          string   `json:"url,omitempty"`
	Zoneid       string   `json:"zoneid,omitempty"`
	Zonename     string   `json:"zonename,omitempty"`
}


text:
Lambeth Advice Network

Client: Lambeth Advice Network

The back story

The Lambeth Advice Network is a group of affiliated charity NGOs providing help and advice to residents of Lambeth. I was asked to set up a simple, well designed website to direct users to the networks websites and highlight affiliated national organisations.

The Association site

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Landing page

The Lancastrians Crest

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

The new Lancastrians crest

redpajama_set_name: RedPajamaGithub


text:
USING_NS_STD_CC_CD_MF

//Decoders.
cc::Point mf::_decodeAsPoint(const cc::Value &value)
{
    return cc::Point(value.asValueVector().at(0).asFloat(),
                     value.asValueVector().at(1).asFloat());
}
bool mf::_decodeAsCheck(const cc::Value &value)
{
    return value.asBool();
}
cc::Point mf::_decodeAsPosition(const cc::Value &value, cc::Node *pNode)
{
    //Constants
    constexpr auto kIndex_X    = 0;
    constexpr auto kIndex_Y    = 1;
    constexpr auto kIndex_Type = 2;

    constexpr auto kType_Abs = 0;
    constexpr auto kType_Per = 4;

    //Get the values.
    auto x = value.asValueVector().at(kIndex_X).asFloat();
    auto y = value.asValueVector().at(kIndex_Y).asFloat();

    auto type = value.asValueVector().at(kIndex_Type).asInt();

    MF_ASSERT_EX(
        ((type == kType_Abs) || (type == kType_Per)),
        "SceneBuilder - _decodeAsPosition",
        "Tried decoded an unsuported type of position: (%d)",
        type
    );

    if(type == kType_Abs)
    {
        return cc::Vec2(x, y);
    }
    else if(type == kType_Per)
    {
        auto size = (pNode && pNode->getParent())
                    ? pNode->getParent()->getContentSize()
                    : cc::Director::getInstance()->getWinSize();

        return mf::GraphicsHelper::getAbsolutePosition(x, y, size);
    }

    return cc::Point::ZERO; //Just to make the compile happy.
}

std::string mf::_decodeAsSpriteFrame(const cc::Value &value)
{
    return value.asValueVector().at(1).asString();
}
std::string mf::_decodeAsBlock(const cc::Value &value)
{
    return value.asValueVector().at(0).asString();
}
cc::Color3B mf::_decodeAsColor3(const cc::Value &value)
{
    auto color = cc::Color3B(value.asValueVector().at(0).asInt(),
                             value.asValueVector().at(1).asInt(),
                             value.asValueVector().at(2).asInt());
    return color;
}

cc::Size mf::_decodeAsSize(const cc::Value &value, cc::Node *pNode)
{
    //Constants.
    constexpr auto kIndex_Width  = 0;
    constexpr auto kIndex_Height = 1;
    constexpr auto kIndex_Type   = 2;

    constexpr auto kType_Abs = 0;
    constexpr auto kType_Per = 1;

    //Get the Values.
    auto w = value.asValueVector().at(kIndex_Width ).asFloat();
    auto h = value.asValueVector().at(kIndex_Height).asFloat();

    auto type = value.asValueVector().at(kIndex_Type).asInt();

    MF_ASSERT_EX(
        ((type == kType_Abs) || (type == kType_Per)),
        "SceneBuilder - _decodeAsSize",
        "Tried decoded an unsuported type of size: (%d)",
        type
    );

    if(type == kType_Abs)
    {
        return cc::Size(w, h);
    }
    else if(type == kType_Per)
    {
        auto parentSize = (pNode && pNode->getParent())
                          ? pNode->getParent()->getContentSize()
                          : cc::Director::getInstance()->getWinSize();

        return cc::Size(
                   parentSize.width  * (w / 100.0f),
                   parentSize.height * (h / 100.0f)
               );
    }

    return cc::Size::ZERO; //Just to make the compile happy.
}

float mf::_decodeAsDegrees(const cc::Value &value)
{
    return value.asFloat();
}
float mf::_decodeAsFontScale(const cc::Value &value)
{
    return value.asValueVector().at(0).asFloat();
}
std::string mf::_decodeAsString(const cc::Value &value)
{
    return value.asString();
}
int mf::_decodeAsByte(const cc::Value &value)
{
    return value.asInt();
}


text:
package nyc.angus.huffman.encode;

import java.util.HashMap;
import java.util.Map;
import java.util.PriorityQueue;

import nyc.angus.huffman.sort.CharEntry;

public class EncoderFactory {

	private EncoderFactory() {
		// Utility class, should not be instantiated.
	}

	/**
	 * Return a map of characters to the code that should be used for the character.
	 *
	 * @param queue
	 *        Characters ordered by the frequency with which they occur.
	 * @return Mapping from character to its encoding.
	 */
	public static Map<Character, String> createEncodings(final PriorityQueue<CharEntry> queue) {

		final CharEntry root = createTree(queue);

		final Map<Character, String> codes = new HashMap<>();

		traverseTreeAndStoreHuffmanCodes("", codes, root);

		return codes;
	}

	/**
	 * Create encoding tree that can be used to generate huffman codes.
	 */
	public static CharEntry createTree(final PriorityQueue<CharEntry> queue) {
		while (queue.size() > 1) {
			final CharEntry a = queue.poll();
			final CharEntry b = queue.poll();

			final CharEntry parent = new CharEntry(a, b, a.getFrequency() + b.getFrequency());
			queue.add(parent);
		}

		assert queue.size() == 1;

		return queue.poll();
	}

	/**
	 * Recursively traverse the encoding tree and update <tt>codes</tt> with the character and its encoding (based on
	 * this traversal).
	 */
	private static void traverseTreeAndStoreHuffmanCodes(final String string, final Map<Character, String> codes, final CharEntry entry) {
		if (entry == null) {
			return;
		}

		if (entry.getChar() != null) {
			codes.put(entry.getChar(), string);
		} else {
			traverseTreeAndStoreHuffmanCodes(string + "0", codes, entry.getLeftChild());
			traverseTreeAndStoreHuffmanCodes(string + "1", codes, entry.getRightChild());
		}
	}

}


text:
using System.Linq;
using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using System.Configuration;
using KayakoRestApi.Core.Departments;
using KayakoRestApi;
using System.Diagnostics;
using KayakoRestApi.Core.Constants;
using KayakoRestApi.Core.Tickets;

namespace KayakoRestApi.IntegrationTests
{
	[TestFixture(Description = "A set of tests testing Api methods around Tickets")]
	public class TicketTests : UnitTestBase
	{
        [Test]
		public void GetAllTickets()
		{
			DepartmentCollection depts = TestSetup.KayakoApiService.Departments.GetDepartments();
			TicketCollection tickets = TestSetup.KayakoApiService.Tickets.GetTickets(depts.Select(d => d.Id).ToArray());

			Assert.IsNotNull(tickets, "No tickets were returned");
			Assert.IsNotEmpty(tickets, "No tickets were returned");
		}

		[Test]
		public void GetTicket()
		{
			DepartmentCollection depts = TestSetup.KayakoApiService.Departments.GetDepartments();
			TicketCollection tickets = TestSetup.KayakoApiService.Tickets.GetTickets(depts.Select(d => d.Id).ToArray());

			Assert.IsNotNull(tickets, "No tickets were returned");
			Assert.IsNotEmpty(tickets, "No tickets were returned");

			Ticket ticketToGet = tickets[new Random().Next(tickets.Count)];

			Trace.WriteLine("GetTicket using ticket id: " + ticketToGet.Id);

			Ticket ticketById = TestSetup.KayakoApiService.Tickets.GetTicket(ticketToGet.Id);
			Ticket ticketByDisplayId = TestSetup.KayakoApiService.Tickets.GetTicket(ticketToGet.DisplayId);

			//CompareTickets(ticketById, ticketToGet);
			CompareTickets(ticketById, ticketByDisplayId);
			//CompareTickets(ticketByDisplayId, ticketToGet);
		}

		[Test(Description="Tests creating, updating and deleting departments")]
		public void CreateUpdateDeleteTicket()
		{
			string subject = "Ticket Subject";
			string fullname = "Ticket FullName";
			string email = "ticket@email.com";
			string contents = "Contents of the ticket";
			int deptId = 3;
			int statusId = 1;
			int priorityId = 1;
			int typeId = 1;
			int ownerId = 1;
			TicketCreationType type = TicketCreationType.Default;

            TicketRequest request = new TicketRequest()
            {
                Subject = subject,
                FullName = fullname,
                Email = email,
                Contents = contents,
                DepartmentId = deptId,
				TemplateGroupId = 1,
                TicketStatusId = statusId,
                TicketPriorityId = priorityId,
                TicketTypeId = typeId,
                OwnerStaffId = ownerId,
                CreationType = type,
                AutoUserId = true,
            };

			//Ticket createdTicket = TestSetup.KayakoApiService.Tickets.CreateTicket(subject, fullname, email, contents, deptId, statusId, priorityId, typeId, ownerId, type);
            Ticket createdTicket = TestSetup.KayakoApiService.Tickets.CreateTicket(request);

			Assert.IsNotNull(createdTicket);
			Assert.AreEqual(createdTicket.Subject, subject);
			Assert.AreEqual(createdTicket.FullName, fullname);
			Assert.AreEqual(createdTicket.Email, email);
			Assert.AreEqual(createdTicket.DepartmentId, deptId);
			Assert.AreEqual(createdTicket.StatusId, statusId);
			Assert.AreEqual(createdTicket.PriorityId, priorityId);
			Assert.AreEqual(createdTicket.Replies, 0);
			Assert.AreEqual(createdTicket.TypeId, typeId);
			//Assert.AreEqual(createdTicket.OwnerStaffId, ownerId);

			request.Id = createdTicket.Id;
			request.Subject = "Updated " + subject;
			request.FullName = "Updated " + fullname;
			request.Contents = "Updated " + contents;
			request.TemplateGroupId = 1;

			Ticket updatedTicket = TestSetup.KayakoApiService.Tickets.UpdateTicket(request);

			Assert.IsNotNull(updatedTicket);
			//Assert.AreEqual(updatedTicket.Subject, request.Subject);
			//Assert.AreEqual(updatedTicket.FullName, request.FullName);
			//Assert.AreEqual(updatedTicket.Email, request.Email);
			//Assert.AreEqual(updatedTicket.DepartmentId, request.DepartmentId);
			//Assert.AreEqual(updatedTicket.StatusId, request.TicketStatusId);
			//Assert.AreEqual(updatedTicket.PriorityId, request.TicketPriorityId);
			//Assert.AreEqual(updatedTicket.Replies, 0);
			//Assert.AreEqual(updatedTicket.TypeId, request.TicketTypeId);
			//Assert.AreEqual(updatedTicket.OwnerStaffId, request.OwnerStaffId);

			bool success = TestSetup.KayakoApiService.Tickets.DeleteTicket(updatedTicket.Id);

			Assert.IsTrue(success);
		}

        private void CompareTickets(Ticket one, Ticket two)
        {
			Assert.AreEqual(one.CreationMode, two.CreationMode);
			Assert.AreEqual(one.CreationTime, two.CreationTime);
			Assert.AreEqual(one.CreationType, two.CreationType);
			Assert.AreEqual(one.Creator, two.Creator);
			Assert.AreEqual(one.DepartmentId, two.DepartmentId);
			Assert.AreEqual(one.DisplayId, two.DisplayId);
			Assert.AreEqual(one.Email, two.Email);
			Assert.AreEqual(one.EscalationRuleId, two.EscalationRuleId);
			Assert.AreEqual(one.TemplateGroupId, two.TemplateGroupId);
			Assert.AreEqual(one.FlagType, two.FlagType);
			Assert.AreEqual(one.FullName, two.FullName);
			Assert.AreEqual(one.Id, two.Id);
			Assert.AreEqual(one.IPAddress, two.IPAddress);
			Assert.AreEqual(one.IsEscalated, two.IsEscalated);
			Assert.AreEqual(one.LastActivity, two.LastActivity);
			Assert.AreEqual(one.LastReplier, two.LastReplier);
			Assert.AreEqual(one.LastStaffReply, two.LastStaffReply);
			Assert.AreEqual(one.LastUserReply, two.LastUserReply);
			Assert.AreEqual(one.NextReplyDue, two.NextReplyDue);

			Assert.AreEqual(one.Posts.Count, two.Posts.Count);
			Assert.AreEqual(one.Notes.Count, two.Notes.Count);

			for (int i = 0; i < one.Notes.Count; i++)
			{
				TicketNoteTests.CompareTicketNote(one.Notes[i], two.Notes[i]);
			}

			Assert.AreEqual(one.OwnerStaffId, two.OwnerStaffId);
			Assert.AreEqual(one.OwnerStaffName, two.OwnerStaffName);

			for (int i = 0; i < one.Posts.Count; i++)
			{
				TicketPostTests.CompareTicketPost(one.Posts[i], two.Posts[i]);
			}

			Assert.AreEqual(one.PriorityId, two.PriorityId);
			Assert.AreEqual(one.Replies, two.Replies);
			Assert.AreEqual(one.ResolutionDue, two.ResolutionDue);
			Assert.AreEqual(one.SlaPlanId, two.SlaPlanId);
			Assert.AreEqual(one.StatusId, two.StatusId);
			Assert.AreEqual(one.Subject, two.Subject);
			Assert.AreEqual(one.Tags, two.Tags);
			Assert.AreEqual(one.TypeId, two.TypeId);
			Assert.AreEqual(one.UserId, two.UserId);
			Assert.AreEqual(one.UserOrganization, two.UserOrganization);
			Assert.AreEqual(one.UserOrganizationId.HasValue, two.UserOrganizationId.HasValue);

			if (one.UserOrganizationId.HasValue)
			{
				Assert.AreEqual(one.UserOrganizationId.Value, two.UserOrganizationId.Value);
			}

			//Assert.AreEqual(one.Watcher, two.Watcher);
			//Assert.AreEqual(one.Workflow, two.Workflow);

			AssertObjectXmlEqual<Ticket>(one, two);
        }
	}
}


text:
<?php

/*
 * This file is part of the RollerworksPasswordStrengthValidator package.
 *
 * (c) Sebastiaan Stok <s.stok@rollerscapes.net>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Rollerworks\Component\PasswordStrength\Command;

use Rollerworks\Component\PasswordStrength\Blacklist\UpdatableBlacklistProviderInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;

class BlacklistDeleteCommand extends BlacklistCommonCommand
{
    const MESSAGE = '<info>Successfully removed %d password(s) from your blacklist database.</info>';

    /**
     * {@inheritdoc}
     */
    protected function configure()
    {
        $this
            ->setName('rollerworks-password:blacklist:delete')
            ->setDescription('removes passwords from your blacklist database')
            ->addArgument('passwords', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'space separated list of words to remove')
            ->addOption('file', null, InputOption::VALUE_OPTIONAL, 'Text file to read for deletion, every line is considered one word')
        ;
    }

    protected function attemptAction(UpdatableBlacklistProviderInterface $service, $password)
    {
        return $service->isBlacklisted($password) && true === $service->delete($password);
    }
}


text:
package com.sharingapples.sync.store;

/**
 * Created by ranjan on 12/14/15.
 */
public interface StorageSession {
  Object run(Engine session);
}


text:
package org.elasticsearch.zeromq.exception;

import org.elasticsearch.transport.TransportException;

/**
 * @author tlrx
 */
public class ZMQTransportException extends TransportException {

    public ZMQTransportException(String msg) {
        super(msg);
    }

    public ZMQTransportException(String msg, Throwable cause) {
        super(msg, cause);
    }
}


text:
<DOMSymbolItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ns.adobe.com/xfl/2008/" name="Component Assets/ScrollBarSkins/ScrollArrowUp_icon" itemID="456df209-00000192" sourceLibraryItemHRef="Component Assets/ScrollBarSkins/ScrollArrowUp_icon" sourceLastModified="1164927258" symbolType="graphic" lastModified="1168290248" lastUniqueIdentifier="1">
  <timeline>
    <DOMTimeline name="ScrollArrowUp_icon">
      <layers>
        <DOMLayer name="icon" color="#4FFF4F" current="true" isSelected="true" autoNamed="false">
          <frames>
            <DOMFrame index="0" keyMode="9728">
              <elements>
                <DOMSymbolInstance libraryItemName="Component Assets/Shared/arrowIcon" name="">
                  <matrix>
                    <Matrix a="-1" d="-1" tx="7" ty="4"/>
                  </matrix>
                  <transformationPoint>
                    <Point x="3.5" y="2"/>
                  </transformationPoint>
                </DOMSymbolInstance>
              </elements>
            </DOMFrame>
          </frames>
        </DOMLayer>
      </layers>
    </DOMTimeline>
  </timeline>
</DOMSymbolItem>


text:
@protocol JScrollViewViewDelegate;

@interface JScrollView_PageControl_AutoScroll : UIView<UIScrollViewDelegate>
{
    UIView *firstView;
    UIView *middleView;
    UIView *lastView;

    UIGestureRecognizer     *tap;
    __unsafe_unretained id <JScrollViewViewDelegate>  _delegate;
    NSTimer         *autoScrollTimer;
}
@property (nonatomic,readonly)    UIScrollView *scrollView;
@property (nonatomic,readonly)  UIPageControl *pageControl;
@property (nonatomic,assign)    NSInteger currentPage;
@property (nonatomic,strong)    NSMutableArray *viewsArray;
@property (nonatomic,assign)    NSTimeInterval    autoScrollDelayTime;

@property (nonatomic,assign) id<JScrollViewViewDelegate> delegate;

-(void)shouldAutoShow:(BOOL)shouldStart;//自动滚动,界面不在的时候请调用这个停止timer

@end

@protocol JScrollViewViewDelegate <NSObject>

@optional
- (void)didClickPage:(JScrollView_PageControl_AutoScroll *)view atIndex:(NSInteger)index;

@end


text:
[Full Changelog](https://github.com/CellProfiling/cam_acq/compare/0.7.4...0.7.5)

**Merged pull requests:**

- Bump version to 0.7.5 [\#199](https://github.com/CellProfiling/cam_acq/pull/199) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Update release instructions [\#198](https://github.com/CellProfiling/cam_acq/pull/198) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Link to release instructions in readme [\#197](https://github.com/CellProfiling/cam_acq/pull/197) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Change default branch to master [\#196](https://github.com/CellProfiling/cam_acq/pull/196) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Update changelog [\#195](https://github.com/CellProfiling/cam_acq/pull/195) ([github-actions[bot]](https://github.com/apps/github-actions))

## [0.7.4](https://github.com/CellProfiling/cam_acq/tree/0.7.4) (2020-03-11)

[Full Changelog](https://github.com/CellProfiling/cam_acq/compare/0.7.3...0.7.4)

**Merged pull requests:**

- 0.7.4 [\#194](https://github.com/CellProfiling/cam_acq/pull/194) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Update release procedure [\#193](https://github.com/CellProfiling/cam_acq/pull/193) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Update changelog generator action [\#192](https://github.com/CellProfiling/cam_acq/pull/192) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add generate changelog action [\#191](https://github.com/CellProfiling/cam_acq/pull/191) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add release drafter [\#190](https://github.com/CellProfiling/cam_acq/pull/190) ([MartinHjelmare](https://github.com/MartinHjelmare))

## [0.7.3](https://github.com/CellProfiling/cam_acq/tree/0.7.3) (2020-03-10)

[Full Changelog](https://github.com/CellProfiling/cam_acq/compare/0.7.2...0.7.3)

**Merged pull requests:**

- 0.7.3 [\#189](https://github.com/CellProfiling/cam_acq/pull/189) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix release and publish actions [\#188](https://github.com/CellProfiling/cam_acq/pull/188) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Bump version to 0.7.3.dev0 [\#187](https://github.com/CellProfiling/cam_acq/pull/187) ([MartinHjelmare](https://github.com/MartinHjelmare))

## [0.7.2](https://github.com/CellProfiling/cam_acq/tree/0.7.2) (2020-03-10)

[Full Changelog](https://github.com/CellProfiling/cam_acq/compare/0.7.1...0.7.2)

**Merged pull requests:**

- 0.7.2 [\#186](https://github.com/CellProfiling/cam_acq/pull/186) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add rc label check action [\#185](https://github.com/CellProfiling/cam_acq/pull/185) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Update release instructions [\#184](https://github.com/CellProfiling/cam_acq/pull/184) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Bump version to 0.7.2.dev0 [\#183](https://github.com/CellProfiling/cam_acq/pull/183) ([MartinHjelmare](https://github.com/MartinHjelmare))

## [0.7.1](https://github.com/CellProfiling/cam_acq/tree/0.7.1) (2020-03-10)

[Full Changelog](https://github.com/CellProfiling/cam_acq/compare/0.7.0...0.7.1)

**Merged pull requests:**

- 0.7.1 [\#182](https://github.com/CellProfiling/cam_acq/pull/182) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix release workflow jobs [\#181](https://github.com/CellProfiling/cam_acq/pull/181) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Bump version to 0.7.1.dev0 [\#180](https://github.com/CellProfiling/cam_acq/pull/180) ([MartinHjelmare](https://github.com/MartinHjelmare))

## [0.7.0](https://github.com/CellProfiling/cam_acq/tree/0.7.0) (2020-03-10)

[Full Changelog](https://github.com/CellProfiling/cam_acq/compare/0.6.0...0.7.0)

**Merged pull requests:**

- 0.7.0 [\#179](https://github.com/CellProfiling/cam_acq/pull/179) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix release deps [\#178](https://github.com/CellProfiling/cam_acq/pull/178) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add github actions CI [\#177](https://github.com/CellProfiling/cam_acq/pull/177) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Scheduled monthly dependency update for March [\#176](https://github.com/CellProfiling/cam_acq/pull/176) ([pyup-bot](https://github.com/pyup-bot))
- Update author email [\#175](https://github.com/CellProfiling/cam_acq/pull/175) ([MartinHjelmare](https://github.com/MartinHjelmare))

## [0.6.0](https://github.com/CellProfiling/cam_acq/tree/0.6.0) (2020-02-14)

[Full Changelog](https://github.com/CellProfiling/cam_acq/compare/0.5.0...0.6.0)

**Breaking Changes:**

- Replace os.path with pathlib [\#169](https://github.com/CellProfiling/cam_acq/pull/169) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Refactor sample [\#165](https://github.com/CellProfiling/cam_acq/pull/165) ([MartinHjelmare](https://github.com/MartinHjelmare))

**Closed issues:**

- Replace str.format with f-strings [\#168](https://github.com/CellProfiling/cam_acq/issues/168)

**Merged pull requests:**

- 0.6.0 [\#174](https://github.com/CellProfiling/cam_acq/pull/174) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Use leicaimage instead of leicaexperiment [\#173](https://github.com/CellProfiling/cam_acq/pull/173) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Scheduled monthly dependency update for February [\#172](https://github.com/CellProfiling/cam_acq/pull/172) ([pyup-bot](https://github.com/pyup-bot))
- Change license to Apache 2.0 [\#171](https://github.com/CellProfiling/cam_acq/pull/171) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Make toggle automation more robust [\#170](https://github.com/CellProfiling/cam_acq/pull/170) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Convert format strings to f-strings [\#167](https://github.com/CellProfiling/cam_acq/pull/167) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Order automations functions and classes logically [\#166](https://github.com/CellProfiling/cam_acq/pull/166) ([MartinHjelmare](https://github.com/MartinHjelmare))

## [0.5.0](https://github.com/CellProfiling/cam_acq/tree/0.5.0) (2019-12-12)

[Full Changelog](https://github.com/CellProfiling/cam_acq/compare/0.4.0...0.5.0)

**Breaking Changes:**

- Remove gain plugin [\#162](https://github.com/CellProfiling/cam_acq/pull/162) ([MartinHjelmare](https://github.com/MartinHjelmare))

**Merged pull requests:**

- 0.5.0 [\#164](https://github.com/CellProfiling/cam_acq/pull/164) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix make\_proj [\#163](https://github.com/CellProfiling/cam_acq/pull/163) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add lint to scripts [\#161](https://github.com/CellProfiling/cam_acq/pull/161) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix travis pypi deploy round 2 [\#160](https://github.com/CellProfiling/cam_acq/pull/160) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix travis pypi deploy [\#159](https://github.com/CellProfiling/cam_acq/pull/159) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Update manifest to exclude more files [\#158](https://github.com/CellProfiling/cam_acq/pull/158) ([MartinHjelmare](https://github.com/MartinHjelmare))

## [0.4.0](https://github.com/CellProfiling/cam_acq/tree/0.4.0) (2019-12-07)

[Full Changelog](https://github.com/CellProfiling/cam_acq/compare/0.3.1...0.4.0)

**Breaking Changes:**

- Refactor to use asyncio [\#91](https://github.com/CellProfiling/cam_acq/pull/91) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Replace gain plugin with automation [\#57](https://github.com/CellProfiling/cam_acq/pull/57) ([MartinHjelmare](https://github.com/MartinHjelmare))

**Closed issues:**

- Add config validation using voluptuous [\#145](https://github.com/CellProfiling/cam_acq/issues/145)
- Add entry\_point support for plugins [\#127](https://github.com/CellProfiling/cam_acq/issues/127)
- Only fire events after calculating gain [\#117](https://github.com/CellProfiling/cam_acq/issues/117)
- Update release procedure [\#108](https://github.com/CellProfiling/cam_acq/issues/108)
- Move to asyncio core with event loop [\#92](https://github.com/CellProfiling/cam_acq/issues/92)
- Bump leicacam version to 0.2.2 [\#86](https://github.com/CellProfiling/cam_acq/issues/86)
- Move job queue to center [\#84](https://github.com/CellProfiling/cam_acq/issues/84)
- Add delay action [\#82](https://github.com/CellProfiling/cam_acq/issues/82)
- Update readme [\#76](https://github.com/CellProfiling/cam_acq/issues/76)
- Add csv sample creator file support [\#73](https://github.com/CellProfiling/cam_acq/issues/73)
- Clean up sample behavior and signatures [\#71](https://github.com/CellProfiling/cam_acq/issues/71)
- Clean up logging format output [\#70](https://github.com/CellProfiling/cam_acq/issues/70)
- Clean up child threads at stop event [\#67](https://github.com/CellProfiling/cam_acq/issues/67)
- Fire both api image events and sample image events [\#66](https://github.com/CellProfiling/cam_acq/issues/66)
- Add event\_type attribute to all events [\#64](https://github.com/CellProfiling/cam_acq/issues/64)
- Abstract the directory structure of the sample away from the plugins [\#62](https://github.com/CellProfiling/cam_acq/issues/62)
- Abstract all microscope specifics from core and plugins [\#61](https://github.com/CellProfiling/cam_acq/issues/61)
- Replace gain plugin flow with yaml automation [\#59](https://github.com/CellProfiling/cam_acq/issues/59)
- Fix main module [\#58](https://github.com/CellProfiling/cam_acq/issues/58)

**Merged pull requests:**

- Update readme [\#156](https://github.com/CellProfiling/cam_acq/pull/156) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Clean up sample action schema container [\#155](https://github.com/CellProfiling/cam_acq/pull/155) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Round gain value to integer [\#154](https://github.com/CellProfiling/cam_acq/pull/154) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Filter duplicate consecutive image replies [\#153](https://github.com/CellProfiling/cam_acq/pull/153) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix cmd sent future done [\#152](https://github.com/CellProfiling/cam_acq/pull/152) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Clean yaml loading in tests [\#151](https://github.com/CellProfiling/cam_acq/pull/151) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add custom cli args [\#150](https://github.com/CellProfiling/cam_acq/pull/150) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add automation config validation schema [\#149](https://github.com/CellProfiling/cam_acq/pull/149) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add leica config validation schema [\#148](https://github.com/CellProfiling/cam_acq/pull/148) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Remove sample state loading [\#147](https://github.com/CellProfiling/cam_acq/pull/147) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add config validation [\#146](https://github.com/CellProfiling/cam_acq/pull/146) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add start and stop delay [\#144](https://github.com/CellProfiling/cam_acq/pull/144) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix receive reply [\#143](https://github.com/CellProfiling/cam_acq/pull/143) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix api send service schema [\#142](https://github.com/CellProfiling/cam_acq/pull/142) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix plugin action type names [\#141](https://github.com/CellProfiling/cam_acq/pull/141) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Use existing sample implicitly on next well check [\#140](https://github.com/CellProfiling/cam_acq/pull/140) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Create sample helper [\#139](https://github.com/CellProfiling/cam_acq/pull/139) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Extract event match helper [\#138](https://github.com/CellProfiling/cam_acq/pull/138) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Enhance actions interface [\#137](https://github.com/CellProfiling/cam_acq/pull/137) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add vscode to gitignore [\#136](https://github.com/CellProfiling/cam_acq/pull/136) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Load plugin from config [\#135](https://github.com/CellProfiling/cam_acq/pull/135) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add pypi release to makefile [\#134](https://github.com/CellProfiling/cam_acq/pull/134) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Make leica api more robust [\#133](https://github.com/CellProfiling/cam_acq/pull/133) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Bump leicacam to 0.4.0 [\#132](https://github.com/CellProfiling/cam_acq/pull/132) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Move tests to correct location [\#131](https://github.com/CellProfiling/cam_acq/pull/131) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Move sample to plugins [\#130](https://github.com/CellProfiling/cam_acq/pull/130) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Move automations to plugins [\#129](https://github.com/CellProfiling/cam_acq/pull/129) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Move api to plugins [\#128](https://github.com/CellProfiling/cam_acq/pull/128) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Enable external plugins via entry\_points [\#126](https://github.com/CellProfiling/cam_acq/pull/126) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add Python 3.8 travis and tox env [\#125](https://github.com/CellProfiling/cam_acq/pull/125) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix tox [\#124](https://github.com/CellProfiling/cam_acq/pull/124) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Scheduled monthly dependency update for November [\#123](https://github.com/CellProfiling/cam_acq/pull/123) ([pyup-bot](https://github.com/pyup-bot))
- Add travis pypi deploy [\#122](https://github.com/CellProfiling/cam_acq/pull/122) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Clean up sample return values [\#121](https://github.com/CellProfiling/cam_acq/pull/121) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add a complete workflow test [\#120](https://github.com/CellProfiling/cam_acq/pull/120) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add exceptions [\#119](https://github.com/CellProfiling/cam_acq/pull/119) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fire gain event and remove sample overwrite [\#118](https://github.com/CellProfiling/cam_acq/pull/118) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix docs build [\#116](https://github.com/CellProfiling/cam_acq/pull/116) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Scheduled monthly dependency update for October [\#115](https://github.com/CellProfiling/cam_acq/pull/115) ([pyup-bot](https://github.com/pyup-bot))
- Scheduled monthly dependency update for September [\#114](https://github.com/CellProfiling/cam_acq/pull/114) ([pyup-bot](https://github.com/pyup-bot))
- Update black repo urls [\#113](https://github.com/CellProfiling/cam_acq/pull/113) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix empty sample config [\#112](https://github.com/CellProfiling/cam_acq/pull/112) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Convert readme to markdown [\#111](https://github.com/CellProfiling/cam_acq/pull/111) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add .readthedocs.yml config file [\#110](https://github.com/CellProfiling/cam_acq/pull/110) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix docs build [\#109](https://github.com/CellProfiling/cam_acq/pull/109) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Update release procedure [\#107](https://github.com/CellProfiling/cam_acq/pull/107) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Bump pydocstyle to 4.0.1 [\#106](https://github.com/CellProfiling/cam_acq/pull/106) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix image metadata [\#105](https://github.com/CellProfiling/cam_acq/pull/105) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add requirements\_dev.txt [\#104](https://github.com/CellProfiling/cam_acq/pull/104) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Clean requirements [\#103](https://github.com/CellProfiling/cam_acq/pull/103) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Bump scipy to 1.3.1 [\#102](https://github.com/CellProfiling/cam_acq/pull/102) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Bump ruamel.yaml to 0.16.5 [\#101](https://github.com/CellProfiling/cam_acq/pull/101) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Update changelog script [\#100](https://github.com/CellProfiling/cam_acq/pull/100) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Bump pylint to 2.3.1 [\#99](https://github.com/CellProfiling/cam_acq/pull/99) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Use VERSION file to single source version [\#98](https://github.com/CellProfiling/cam_acq/pull/98) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Bump min supported Python version to 3.6 [\#97](https://github.com/CellProfiling/cam_acq/pull/97) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Bump dependencies [\#96](https://github.com/CellProfiling/cam_acq/pull/96) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add pyup [\#95](https://github.com/CellProfiling/cam_acq/pull/95) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Bump pytest and pytest-asyncio [\#94](https://github.com/CellProfiling/cam_acq/pull/94) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add template functions [\#93](https://github.com/CellProfiling/cam_acq/pull/93) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add black code formatter [\#90](https://github.com/CellProfiling/cam_acq/pull/90) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Test dev 0.4.0 round 2 [\#88](https://github.com/CellProfiling/cam_acq/pull/88) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Upgrade leicacam to version 0.2.2 [\#87](https://github.com/CellProfiling/cam_acq/pull/87) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Move job queue and run and add job methods to center [\#85](https://github.com/CellProfiling/cam_acq/pull/85) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Test dev 0.4.0 round 1 [\#83](https://github.com/CellProfiling/cam_acq/pull/83) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Use standard yaml loader/dumper to preserve config [\#80](https://github.com/CellProfiling/cam_acq/pull/80) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add delay action option in automations [\#79](https://github.com/CellProfiling/cam_acq/pull/79) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Remove old code [\#78](https://github.com/CellProfiling/cam_acq/pull/78) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Update readme [\#77](https://github.com/CellProfiling/cam_acq/pull/77) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Clean up gain calculation [\#75](https://github.com/CellProfiling/cam_acq/pull/75) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add loading of sample state from csv file [\#74](https://github.com/CellProfiling/cam_acq/pull/74) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Clean up sample method and signatures [\#72](https://github.com/CellProfiling/cam_acq/pull/72) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Clean logging [\#69](https://github.com/CellProfiling/cam_acq/pull/69) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Clean up child thread upon stop event [\#68](https://github.com/CellProfiling/cam_acq/pull/68) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fire sample image event when sample image changes [\#65](https://github.com/CellProfiling/cam_acq/pull/65) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Refactor events [\#63](https://github.com/CellProfiling/cam_acq/pull/63) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Simplify rename image plugin [\#60](https://github.com/CellProfiling/cam_acq/pull/60) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Use new leica interface libraries [\#56](https://github.com/CellProfiling/cam_acq/pull/56) ([MartinHjelmare](https://github.com/MartinHjelmare))

## [0.3.1](https://github.com/CellProfiling/cam_acq/tree/0.3.1) (2018-05-23)

[Full Changelog](https://github.com/CellProfiling/cam_acq/compare/0.3...0.3.1)

**Merged pull requests:**

- 0.3.1 [\#81](https://github.com/CellProfiling/cam_acq/pull/81) ([MartinHjelmare](https://github.com/MartinHjelmare))

## [0.3](https://github.com/CellProfiling/cam_acq/tree/0.3) (2017-08-18)

[Full Changelog](https://github.com/CellProfiling/cam_acq/compare/0.2...0.3)

**Breaking Changes:**

- Make settings configurable from config [\#31](https://github.com/CellProfiling/cam_acq/pull/31) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Allow DNS for host [\#29](https://github.com/CellProfiling/cam_acq/pull/29) ([MartinHjelmare](https://github.com/MartinHjelmare))

**Merged pull requests:**

- 0.3 [\#34](https://github.com/CellProfiling/cam_acq/pull/34) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Update readme with latest option changes [\#33](https://github.com/CellProfiling/cam_acq/pull/33) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Move version to const.py [\#32](https://github.com/CellProfiling/cam_acq/pull/32) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix setting log level via cmd line or config file [\#30](https://github.com/CellProfiling/cam_acq/pull/30) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix bugs [\#28](https://github.com/CellProfiling/cam_acq/pull/28) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add port option [\#27](https://github.com/CellProfiling/cam_acq/pull/27) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix rst nested bullet syntax in readme [\#26](https://github.com/CellProfiling/cam_acq/pull/26) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Update readme with install and run instructions [\#25](https://github.com/CellProfiling/cam_acq/pull/25) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix missing package data [\#24](https://github.com/CellProfiling/cam_acq/pull/24) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix logging [\#23](https://github.com/CellProfiling/cam_acq/pull/23) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix typo in contributing instruction [\#22](https://github.com/CellProfiling/cam_acq/pull/22) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add contributing instructions [\#21](https://github.com/CellProfiling/cam_acq/pull/21) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add entry\_points instead of scripts [\#20](https://github.com/CellProfiling/cam_acq/pull/20) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix template rendering [\#19](https://github.com/CellProfiling/cam_acq/pull/19) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Merge command line arguments into config dict [\#18](https://github.com/CellProfiling/cam_acq/pull/18) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix bugs [\#17](https://github.com/CellProfiling/cam_acq/pull/17) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Update tox travis section to not deprecated style [\#16](https://github.com/CellProfiling/cam_acq/pull/16) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add tests for command module [\#15](https://github.com/CellProfiling/cam_acq/pull/15) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Refactor/eventbus [\#14](https://github.com/CellProfiling/cam_acq/pull/14) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix rst syntax in readme [\#13](https://github.com/CellProfiling/cam_acq/pull/13) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add tox testing and linting [\#12](https://github.com/CellProfiling/cam_acq/pull/12) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add Well class and refactor to use the new class [\#11](https://github.com/CellProfiling/cam_acq/pull/11) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add template feature using jinja [\#10](https://github.com/CellProfiling/cam_acq/pull/10) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Refactor control method in Control class [\#9](https://github.com/CellProfiling/cam_acq/pull/9) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Refactor image module and handling [\#8](https://github.com/CellProfiling/cam_acq/pull/8) ([MartinHjelmare](https://github.com/MartinHjelmare))

## [0.2](https://github.com/CellProfiling/cam_acq/tree/0.2) (2017-01-19)

**Merged pull requests:**

- 0.2 [\#7](https://github.com/CellProfiling/cam_acq/pull/7) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Bug fixes [\#6](https://github.com/CellProfiling/cam_acq/pull/6) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Use matrixscreener package and api [\#5](https://github.com/CellProfiling/cam_acq/pull/5) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add Sphinx docs and version string [\#4](https://github.com/CellProfiling/cam_acq/pull/4) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add formatting function [\#2](https://github.com/CellProfiling/cam_acq/pull/2) ([cwinsnes](https://github.com/cwinsnes))

\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*


text:
MDictionary::MDictionary() :
    d(MSharedPtr<MDictionary>(new MDictionaryPrivate()))
{
}


text:
layout: default
---

{{ page.title }}

    {% if page.subtitle %}
{{ page.subtitle }}
{% endif %}

{{ content }}

  {% include tags_list.html tag_count=page.tags.size %}


text:
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
	http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
	http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd">

	<!-- 定义连接管理器 -->
	<bean id="httpClientConnectionManager"
		class="org.apache.http.impl.conn.PoolingHttpClientConnectionManager">
		<property name="maxTotal" value="${http.maxTotal}" />
		<property name="defaultMaxPerRoute" value="${http.defaultMaxPerRoute}" />
	</bean>

	<!-- httpclient的构建器 -->
	<bean id="httpClientBuilder" class="org.apache.http.impl.client.HttpClientBuilder">
		<property name="connectionManager" ref="httpClientConnectionManager" />
	</bean>

	<!-- 定义Httpclient对象 -->
	<!-- 该对象是多例的 -->
	<bean class="org.apache.http.impl.client.CloseableHttpClient"
		factory-bean="httpClientBuilder" factory-method="build" scope="prototype">
	</bean>

	<!-- 请求参数的构建器 -->
	<bean id="requestConfigBuilder" class="org.apache.http.client.config.RequestConfig.Builder">
		<!-- 创建连接的最长时间 -->
		<property name="connectTimeout" value="${http.connectTimeout}" />
		<!-- 从连接池中获取到连接的最长时间 -->
		<property name="connectionRequestTimeout" value="${http.connectionRequestTimeout}" />
		<!-- 数据传输的最长时间 -->
		<property name="socketTimeout" value="${http.socketTimeout}" />
		<!-- 提交请求前测试连接是否可用 -->
		<property name="staleConnectionCheckEnabled" value="${http.staleConnectionCheckEnabled}" />
	</bean>

	<!-- 定义请求参数对象 -->
	<bean class="org.apache.http.client.config.RequestConfig"
		factory-bean="requestConfigBuilder" factory-method="build" />

	<!-- 定期关闭无效连接 -->
	<bean class="com.blog.common.httpclient.IdleConnectionEvictor">
		<constructor-arg index="0" ref="httpClientConnectionManager" />
	</bean>

</beans>


text:
package org.apache.felix.framework.cache;

import org.apache.felix.framework.Logger;
import org.apache.felix.framework.util.StringMap;
import org.apache.felix.framework.util.Util;
import org.apache.felix.framework.util.WeakZipFileFactory;
import org.apache.felix.framework.util.WeakZipFileFactory.WeakZipFile;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.Map;
import java.util.zip.ZipEntry;

/**
 * <p>
 * This class implements a bundle archive revision for a standard bundle
 * JAR file. The specified location is the URL of the JAR file. By default,
 * the associated JAR file is copied into the revision's directory on the
 * file system, but it is possible to mark the JAR as 'by reference', which
 * will result in the bundle JAR be used 'in place' and not being copied. In
 * either case, some of the contents may be extracted into the revision
 * directory, such as embedded JAR files and native libraries.
 * </p>
**/
class JarRevision extends BundleArchiveRevision
{
    private static final transient String BUNDLE_JAR_FILE = "bundle.jar";

    private final WeakZipFileFactory m_zipFactory;
    private final File m_bundleFile;
    private final WeakZipFile m_zipFile;

    public JarRevision(
        Logger logger, Map configMap, WeakZipFileFactory zipFactory,
        File revisionRootDir, String location, boolean byReference, InputStream is)
        throws Exception
    {
        super(logger, configMap, revisionRootDir, location);

        m_zipFactory = zipFactory;

        if (byReference)
        {
            m_bundleFile = new File(location.substring(
                location.indexOf(BundleArchive.FILE_PROTOCOL)
                    + BundleArchive.FILE_PROTOCOL.length()));
        }
        else
        {
            m_bundleFile = new File(getRevisionRootDir(), BUNDLE_JAR_FILE);
        }

        // Save and process the bundle JAR.
        initialize(byReference, is);

        // Open shared copy of the JAR file.
        WeakZipFile zipFile = null;
        try
        {
            // Open bundle JAR file.
            zipFile = m_zipFactory.create(m_bundleFile);
            // Error if no jar file.
            if (zipFile == null)
            {
                throw new IOException("No JAR file found.");
            }
            m_zipFile = zipFile;
        }
        catch (Exception ex)
        {
            if (zipFile != null) zipFile.close();
            throw ex;
        }
    }

    public Map<String, Object> getManifestHeader() throws Exception
    {
        // Read and parse headers into a case insensitive map of manifest attributes and return it.
        ZipEntry manifestEntry = m_zipFile.getEntry("META-INF/MANIFEST.MF");

        Map<String, Object> manifest = manifestEntry != null ? BundleCache.getMainAttributes(new StringMap(), m_zipFile.getInputStream(manifestEntry), manifestEntry.getSize()) : null;

        return manifest;
    }

    public Content getContent() throws Exception
    {
        return new JarContent(getLogger(), getConfig(), m_zipFactory,
            this, getRevisionRootDir(), m_bundleFile, m_zipFile);
    }

    protected void close() throws Exception
    {
        m_zipFile.close();
    }

    //
    // Private methods.
    //

    private void initialize(boolean byReference, InputStream is)
        throws Exception
    {
        try
        {
            // If the revision directory does not exist, then create it.
            if (!BundleCache.getSecureAction().fileExists(getRevisionRootDir()))
            {
                if (!BundleCache.getSecureAction().mkdir(getRevisionRootDir()))
                {
                    getLogger().log(
                        Logger.LOG_ERROR,
                        getClass().getName() + ": Unable to create revision directory.");
                    throw new IOException("Unable to create archive directory.");
                }

                if (!byReference)
                {
                    URLConnection conn = null;
                    try
                    {
                        if (is == null)
                        {
                            // Do it the manual way to have a chance to
                            // set request properties such as proxy auth.
                            URL url = BundleCache.getSecureAction().createURL(
                                null, getLocation(), null);
                            conn = BundleCache.getSecureAction().openURLConnection(url);

                            // Support for http proxy authentication.
                            String auth = BundleCache.getSecureAction()
                                .getSystemProperty("http.proxyAuth", null);
                            if ((auth != null) && (auth.length() > 0))
                            {
                                if ("http".equals(url.getProtocol()) ||
                                    "https".equals(url.getProtocol()))
                                {
                                    String base64 = Util.base64Encode(auth);
                                    conn.setRequestProperty(
                                        "Proxy-Authorization", "Basic " + base64);
                                }
                            }
                            is = BundleCache.getSecureAction()
                                .getURLConnectionInputStream(conn);
                        }

                        // Save the bundle jar file.
                        BundleCache.copyStreamToFile(is, m_bundleFile);
                    }
                    finally
                    {
                        // This is a hack to fix an issue on Android, where
                        // HttpURLConnections are not properly closed. (FELIX-2728)
                        if ((conn != null) && (conn instanceof HttpURLConnection))
                        {
                            ((HttpURLConnection) conn).disconnect();
                        }
                    }
                }
            }
        }
        finally
        {
            if (is != null) is.close();
        }
    }
}


text:
namespace Org.Cen.RobotManager.Graph
{
    public class MotionDataItem
    {
        public int PidTime { get; set; }
        public int NormalPosition { get; set; }
        public int NormalSpeed { get; set; }
        public int Position { get; set; }
        public int Speed { get; set; }
    }
}


text:
layout: page
title: Wind Logistics Party
date: 2016-05-24
author: Benjamin Cunningham
tags: weekly links, java
status: published
summary: Cras mollis pulvinar augue at.
banner: images/banner/office-01.jpg
booking:
  startDate: 04/22/2019
  endDate: 04/24/2019
  ctyhocn: BOWFLHX
  groupCode: WLP
published: true
---
Pellentesque hendrerit vehicula augue non ultrices. Pellentesque eget auctor ex. Suspendisse eget ante vitae massa imperdiet faucibus dapibus aliquam massa. Fusce porta malesuada ex in fringilla. Praesent ullamcorper maximus arcu quis egestas. Etiam nunc leo, gravida vitae nibh at, pulvinar auctor diam. Quisque ut interdum justo.

1 Fusce ultrices justo ac aliquam maximus
1 Etiam bibendum magna sed dignissim ornare
1 Sed sit amet lacus interdum, dapibus enim nec, venenatis nisl
1 Integer ullamcorper dolor euismod tellus elementum, vel gravida mauris dapibus.

Vivamus vitae erat lacus. Aliquam mattis lorem et lectus tempus accumsan. Nullam sagittis, erat ut dictum suscipit, libero leo posuere magna, a semper risus enim quis elit. Praesent ac pretium massa. Nunc varius justo ac justo tincidunt, in laoreet felis dignissim. Cras pulvinar elit augue, et lacinia quam lobortis ac. Etiam nec dapibus leo, in vehicula metus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec quis ligula varius massa sodales euismod. Aenean sapien massa, efficitur id quam ac, tristique consequat velit. Integer consectetur suscipit vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Praesent sit amet euismod neque. Sed sapien purus, fermentum quis tempus id, vestibulum id eros.


text:
//! =============================================================================
//! \file
//! \brief
//!     This is a sample description
//!
//! =============================================================================

#ifndef IMPROC_PROFILE_TOOLS_H
#define IMPROC_PROFILE_TOOLS_H

//
// Output information to a Debug Console
// This is supplied by the environment: - standard logging output (GCC environment)
//                                      - platform/IDE dependent  (MSVC environment)
// Note: active in Release too.
//
#ifdef _MSC_VER /* MSVC compiler specific */

    #define WIN32_LEAN_AND_MEAN
    #define NOMINMAX
    #include <Windows.h>
    #include <string>

    #define TRACE_MESSAGE(MESSAGE) OutputDebugStringW((std::wstring(MESSAGE) + L"\n").c_str());

#elif defined(__GNUC__) /* GCC compiler specific */

    #include <string>
    #include <iostream>

    #define TRACE_MESSAGE(MESSAGE) std::wclog << MESSAGE << L"\n";

#else /* Sorry, environment not supported */

    #define TRACE_MESSAGE(MESSAGE)

#endif /* _MSC_VER || __GNUC__ */

//
// Record elapsed CPU clock cycles between 2 timepoints
//
// Note: active in Release too.
//
#ifdef PROFILE_DEBUGINFO

    #include "CpuRdtsc.hpp"

    #define REGISTER_TIMED_BLOCK(ID)                    \
        int64_t start = 0, end = 0, avg = 0, count = 0; \
        std::wstring blockID = L#ID;
    #define BEGIN_TIMED_BLOCK() \
        start = rdtsc();
    #define END_TIMED_BLOCK() \
        end = rdtsc();        \
        avg += (end - start); \
        count++;
    #define PROFILE_TRACE_BLOCK(MESSAGE) \
        TRACE_MESSAGE(blockID + std::wstring(MESSAGE) + std::to_wstring((count != 0) ? (avg / count) : avg))

#else /* !defined( PROFILE_DEBUGINFO )*/

    #define REGISTER_TIMED_BLOCK(ID)
    #define BEGIN_TIMED_BLOCK()
    #define END_TIMED_BLOCK()
    #define PROFILE_TRACE_BLOCK(MESSAGE)

#endif /* defined( PROFILE_DEBUGINFO ) */

#endif /* IMPROC_PROFILE_TOOLS_H */


text:
<?php

/*
 * This file is part of the andreas-weber/php-runner library.
 *
 * (c) Andreas Weber <code@andreas-weber.me>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace AndreasWeber\Runner\Test\Task\Stub;

use AndreasWeber\Runner\Payload\PayloadInterface;
use AndreasWeber\Runner\Task\Exception\RetryException;

class RetryExceptionTaskStub extends RunCounterTaskStub
{
    public function run(PayloadInterface $payload)
    {
        parent::run($payload);

        if ($this->getRunsCount() < 2) {
            // 2 retries triggered by exception
            throw new RetryException();
        }

        return null;
    }
}


text:
using System;
using System.Diagnostics;
using System.IO;

namespace WebDAVSharp.Server.Stores.DiskStore
{
    /// <summary>
    /// This class implements a disk-based <see cref="IWebDAVStore"/>.
    /// </summary>
    [DebuggerDisplay("Disk Store ({RootPath})")]
    public sealed class WebDAVDiskStore : IWebDAVStore
    {
        private readonly string _RootPath;
        private readonly IWebDAVStoreCollection _RootCollection;

        /// <summary>
        /// Initializes a new instance of the <see cref="WebDAVDiskStore"/> class.
        /// </summary>
        /// <param name="rootPath">
        /// The root path of a folder on disk to host in this <see cref="WebDAVDiskStore"/>.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// <para><paramref name="rootPath"/> is <c>null</c>.</para>
        /// </exception>
        /// <exception cref="DirectoryNotFoundException">
        /// <para><paramref name="rootPath"/> specifies a folder that does not exist.</para>
        /// </exception>
        public WebDAVDiskStore(string rootPath)
        {
            if (rootPath == null)
                throw new ArgumentNullException(rootPath);
            if (!Directory.Exists(rootPath))
                throw new DirectoryNotFoundException(rootPath);

            _RootPath = rootPath;
            _RootCollection = new WebDAVDiskStoreCollection(null, rootPath);
        }

        /// <summary>
        /// Gets the root path for the folder that is hosted in this <see cref="WebDAVDiskStore"/>.
        /// </summary>
        public string RootPath
        {
            get
            {
                return _RootPath;
            }
        }

        #region IWebDAVStore Members

        /// <summary>
        /// Gets the root collection of this <see cref="IWebDAVStore"/>.
        /// </summary>
        public IWebDAVStoreCollection Root
        {
            get
            {
                return _RootCollection;
            }
        }

        #endregion
    }
}


text:
package com.restfully.shop.test;

import com.restfully.shop.domain.Customer;
import com.restfully.shop.services.JavaMarshaller;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;

import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
import javax.ws.rs.core.Response;

/**
 * @author Bill Burke
 * @version $Revision: 1 $
 */
public class CustomerResourceTest {
    private static Client client;

    @BeforeClass
    public static void initClient() {
        client = ClientBuilder.newClient();
        client.register(JavaMarshaller.class);
    }

    @AfterClass
    public static void closeClient() {
        client.close();
    }

    @Test
    public void testCustomerResource() throws Exception {
        System.out.println("*** Create a new Customer ***");
        Customer newCustomer = new Customer();
        newCustomer.setFirstName("Bill");
        newCustomer.setLastName("Burke");
        newCustomer.setStreet("256 Clarendon Street");
        newCustomer.setCity("Boston");
        newCustomer.setState("MA");
        newCustomer.setZip("02115");
        newCustomer.setCountry("USA");

        Response response = client.target("http://localhost:8080/services/customers")
                .request().post(Entity.entity(newCustomer, "application/example-java"));
        if (response.getStatus() != 201) throw new RuntimeException("Failed to create");
        String location = response.getLocation().toString();
        System.out.println("Location: " + location);
        response.close();

        System.out.println("*** GET Created Customer **");
        Customer customer = client.target(location).request().get(Customer.class);
        System.out.println(customer);

        customer.setFirstName("William");
        response = client.target(location).request().put(Entity.entity(customer, "application/example-java"));
        if (response.getStatus() != 204) throw new RuntimeException("Failed to update");

        // Show the update
        System.out.println("**** After Update ***");
        customer = client.target(location).request().get(Customer.class);
        System.out.println(customer);
    }

}


text:
"""Check fasta."""
import Bio
import re
import pandas as pd
import sys

class CheckFasta():
    """Check different instances of fasta."""

    def __init__(self):
        """Initialize."""
        # self.design_file = design_file

    def confirm_fasta(self, fasta_file):
        """Check if the given file is a fasta."""
        with open(fasta_file, 'r') as f_in:
            # read the first line
            fasta_header = f_in.readline()
            # check if there is a >
            if fasta_header[:1] != ">":
                raise TypeError
            elif len(fasta_header.split(">")[1]) == 0:
                raise TypeError
            try:
                second_line = next(f_in)
                for x in list(set(second_line)):
                    if x in ['A', 'T', 'G', 'C', 'N']:
                        pass
                    else:
                        # TODO: check this for all sequences
                        raise TypeError
            except StopIteration:
                raise TypeError
            return True

    def duplicate(self, fasta_file):
        """Check if a fasta file has duplicate sequences (based on name)."""
        seqs = Bio.SeqIO.parse(fasta_file)
        seq_header = []
        for seq in seqs:
            seq_header.append(seq.description)
        if len(seq_header) != len(set(seq_header)):
            raise ValueError

def remove_special_chars(self, fasta_file, out_fasta):
    """Remove special characters from sequence name."""
    seqs = Bio.SeqIO.parse(fasta_file)
    for seq in seqs:
        seq_id = re.sub('[|]', '_', seq.id)
        seq.id = seq_id
        Bio.SeqIO.write(seq, out_fasta, "fasta")

def gff_fasta(fasta_file, gff_file):
    """Check if gff file and fasta file are compatible."""
    seqs = Bio.SeqIO.parse(fasta_file)
    df = pd.read_csv(gff_file, sep="\t", comment='#', header=None)

    seq_header = []
    for seq in seqs:
        fa_id = set(seq_header.append(seq.id))

    gff_id = set(df[0].tolist())
    if fa_id == gff_id:
        pass
    else:
        sys.exit('GFF file and Reference fasta do not have same ids!')

def match_gff_fasta(fasta_file, gff_file, out_fasta):
    """Rename the sequence baesd on the GFF file."""
    seqs = Bio.SeqIO.parse(fasta_file)
    df = pd.read_csv(gff_file, sep="\t", comment='#', header=None)

    acc_ids = set(df[0].tolist())

    for seq in seqs:
        for acc in acc_ids:
            if acc in seq.id:
                seq.description = acc + " " + seq.description
                Bio.SeqIO.write(seq, out_fasta, "fasta")

#TODO: implement these checks
def check_quotations(gff_file):
    """Check if there are quotations in gff file."""
    with open(gff_file) as g:
        content = g.readlines()
        for l in content:
            if '"' in l:
                raise TypeError("There is a quotation in above line, remove them first")


text:
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()

def GetRGBColor(colorName):
    '''
        Return the red, green and blue components for a
        color as doubles.
    '''
    rgb = [0.0, 0.0, 0.0]  # black
    vtk.vtkNamedColors().GetColorRGB(colorName, rgb)
    return rgb

# use implicit modeller / interpolation to perform 3D morphing
#
# make the letter v, t and k
letterV = vtk.vtkVectorText()
letterV.SetText("v")
letterT = vtk.vtkVectorText()
letterT.SetText("t")
letterK = vtk.vtkVectorText()
letterK.SetText("k")

# create implicit models of each
blobbyV = vtk.vtkImplicitModeller()
blobbyV.SetInputConnection(letterV.GetOutputPort())
blobbyV.SetMaximumDistance(.2)
blobbyV.SetSampleDimensions(50, 50, 12)
blobbyV.SetModelBounds(-0.5, 1.5, -0.5, 1.5, -0.5, 0.5)

blobbyT = vtk.vtkImplicitModeller()
blobbyT.SetInputConnection(letterT.GetOutputPort())
blobbyT.SetMaximumDistance(.2)
blobbyT.SetSampleDimensions(50, 50, 12)
blobbyT.SetModelBounds(-0.5, 1.5, -0.5, 1.5, -0.5, 0.5)

blobbyK = vtk.vtkImplicitModeller()
blobbyK.SetInputConnection(letterK.GetOutputPort())
blobbyK.SetMaximumDistance(.2)
blobbyK.SetSampleDimensions(50, 50, 12)
blobbyK.SetModelBounds(-0.5, 1.5, -0.5, 1.5, -0.5, 0.5)

# Interpolate the data
interpolate = vtk.vtkInterpolateDataSetAttributes()
interpolate.AddInputConnection(blobbyV.GetOutputPort())
interpolate.AddInputConnection(blobbyT.GetOutputPort())
interpolate.AddInputConnection(blobbyK.GetOutputPort())
interpolate.SetT(0.0)

# extract an iso surface
blobbyIso = vtk.vtkContourFilter()
blobbyIso.SetInputConnection(interpolate.GetOutputPort())
blobbyIso.SetValue(0, 0.1)

# map to rendering primitives
blobbyMapper = vtk.vtkPolyDataMapper()
blobbyMapper.SetInputConnection(blobbyIso.GetOutputPort())
blobbyMapper.ScalarVisibilityOff()
# now an actor
blobby = vtk.vtkActor()
blobby.SetMapper(blobbyMapper)
blobby.GetProperty().SetDiffuseColor(GetRGBColor('banana'))

# Create the RenderWindow, Renderer and both Actors
#
ren1 = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren1)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)

camera = vtk.vtkCamera()
camera.SetClippingRange(0.265, 13.2)
camera.SetFocalPoint(0.539, 0.47464, 0)
camera.SetPosition(0.539, 0.474674, 2.644)
camera.SetViewUp(0, 1, 0)

ren1.SetActiveCamera(camera)

#  now  make a renderer and tell it about lights and actors

renWin.SetSize(300, 350)

ren1.AddActor(blobby)
ren1.SetBackground(1, 1, 1)
renWin.Render()

subIters = 4.0
i = 0
while i < 2:
    j = 1
    while j <= subIters:
        t = i + j / subIters
        interpolate.SetT(t)
        renWin.Render()
        j += 1
    i += 1

renWin.Render()

iren.Initialize()
#iren.Start()