// DeisIfy returns a pretty-printed deis logo along with the corresponding message
505868
func DeisIfy(msg string) string {
	var t = struct {
		Msg string
		C   map[string]string
	}{
		Msg: msg,
		C:   Colors,
	}
	tpl := "{{.C.Deis1}}\n{{.C.Deis2}} {{.Msg}}\n{{.C.Deis3}}\n"
	var buf bytes.Buffer
	template.Must(template.New("deis").Parse(tpl)).Execute(&buf, t)
	return buf.String()
}
1286457
func (p *parserMixin) Uints() (target *[]uint) {
	target = new([]uint)
	p.UintsVar(target)
	return
}
306007
func (d *DepsStage) Normalize() error {
	for _, d := range d.Deps {
		if err := d.Normalize(); err != nil {
			return err
		}
	}
	return nil
}
35311
func idents(ids []*syntax.Ident) []Ident {
	res := make([]Ident, len(ids))
	for i, id := range ids {
		res[i].Name = id.Name
		res[i].Pos = id.NamePos
	}
	return res
}
765978
func (_m *IdentityDeserializer) DeserializeIdentity(serializedIdentity []byte) (msp.Identity, error) {
	ret := _m.Called(serializedIdentity)

	var r0 msp.Identity
	if rf, ok := ret.Get(0).(func([]byte) msp.Identity); ok {
		r0 = rf(serializedIdentity)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(msp.Identity)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func([]byte) error); ok {
		r1 = rf(serializedIdentity)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
96297
func Deserialize(p []byte) *structs.DevUsage {
	uFlat := flat.GetRootAsDevUsage(p, 0)
	// get the # of interfaces
	iLen := uFlat.DeviceLength()
	u := &structs.DevUsage{
		Timestamp:  uFlat.Timestamp(),
		TimeDelta:  uFlat.TimeDelta(),
		Device: make([]structs.Device, iLen),
	}
	fDev := &flat.Device{}
	sDev := structs.Device{}
	for i := 0; i < iLen; i++ {
		if uFlat.Device(fDev, i) {
			sDev.Name = string(fDev.Name())
			sDev.RBytes = fDev.RBytes()
			sDev.RPackets = fDev.RPackets()
			sDev.RErrs = fDev.RErrs()
			sDev.RDrop = fDev.RDrop()
			sDev.RFIFO = fDev.RFIFO()
			sDev.RFrame = fDev.RFrame()
			sDev.RCompressed = fDev.RCompressed()
			sDev.RMulticast = fDev.RMulticast()
			sDev.TBytes = fDev.TBytes()
			sDev.TPackets = fDev.TPackets()
			sDev.TErrs = fDev.TErrs()
			sDev.TDrop = fDev.TDrop()
			sDev.TFIFO = fDev.TFIFO()
			sDev.TColls = fDev.TColls()
			sDev.TCarrier = fDev.TCarrier()
			sDev.TCompressed = fDev.TCompressed()
		}
		u.Device[i] = sDev
	}
	return u
}
152737
func (format *Identifier) ApplyFormatter(msg *core.Message) error {
	format.SetAppliedContent(msg, format.hash(msg))
	return nil
}
252684
func (msg *Message) Serialize() []byte {
	msg.DataLen = msgLenToBytes(int64(len(msg.Data)))
	buf := bytes.NewBuffer([]byte{})
	binary.Write(buf, binary.BigEndian, msg.MessageHeader)
	binary.Write(buf, binary.BigEndian, msg.Data[:])

	return buf.Bytes()
}
1161858
func (msg *MsgTx) SerializeSize() int {
	n := msg.baseSize()

	if msg.HasWitness() {
		// The marker, and flag fields take up two additional bytes.
		n += 2

		// Additionally, factor in the serialized size of each of the
		// witnesses for each txin.
		for _, txin := range msg.TxIn {
			n += txin.Witness.SerializeSize()
		}
	}

	return n
}
270890
func (c *Client) LinodeDiskImagize(linodeID int, diskID int, description *string,
	label *string) (jobID int, imageID int, err error) {

	args := make(map[string]interface{})
	args["LinodeID"] = linodeID
	args["DiskID"] = diskID
	args["Description"] = description
	args["Label"] = label

	data, err := c.apiCall("linode.disk.imagize", args)
	if err != nil {
		return 0, 0, err
	}

	out := struct {
		JobID   int `json:"JobID"`
		ImageID int `json:"ImageID"`
	}{}

	err = json.Unmarshal(data, &out)
	if err != nil {
		return 0, 0, err
	}

	return out.JobID, out.ImageID, nil
}
944350
func (c *Client) LinodeResize(linodeID int, planID int) error {
	args := make(map[string]interface{})
	args["LinodeID"] = linodeID
	args["PlanID"] = planID

	_, err := c.apiCall("linode.resize", args)
	if err != nil {
		return err
	}
	return nil
}
140082
func (b *LabelManagerConnectBody) Serialize(version uint8) ([]byte, error) {
	buf := make([]byte, 3)
	buf[0] = uint8(b.RedistDefault)
	binary.BigEndian.PutUint16(buf[1:3], b.Instance)
	return buf, nil
}
1029015
func Copysign(x, y float32) float32 {
	return float32(math.Copysign(float64(x), float64(y)))
}
269988
func SingularizeIdentifier(s string) string {
	if i := reverseIndexRune(s, '_'); i != -1 {
		s = s[:i] + "_" + inflector.Singularize(s[i+1:])
	} else {
		s = inflector.Singularize(s)
	}

	return snaker.SnakeToCamelIdentifier(s)
}
396931
func (ns *Namespace) Emojify(s interface{}) (template.HTML, error) {
	ss, err := cast.ToStringE(s)
	if err != nil {
		return "", err
	}

	return template.HTML(helpers.Emojify([]byte(ss))), nil
}
864751
func (ns *Namespace) Minify(r resource.Resource) (resource.Resource, error) {
	return ns.minifyClient.Minify(r)
}
1181575
func (m Client) Minify(mediatype media.Type, dst io.Writer, src io.Reader) error {
	return m.m.Minify(mediatype.Type(), dst, src)
}