text:
@INPROCEEDINGS{6816449,
author={D. Bian and M. Kuzlu and M. Pipattanasomporn and S. Rahman},
booktitle={ISGT 2014},
title={Assessment of communication technologies for a home energy management system},
year={2014},
volume={},
number={},
pages={1-5},
keywords={energy management systems;home networks;power system reliability;power system simulation;communication technology assessment;home energy management system;HEM system;reliability;power consumption;ZigBee;Wi-Fi;Ethernet;OPNET simulation;always-on scheme;turn-on-in-loop scheme;Zigbee;IEEE 802.11 Standards;Reliability;Throughput;Smart grids;Wireless communication;Smart grid;premises area network;home energy management system;OPNET},
doi={10.1109/ISGT.2014.6816449},
ISSN={},
month={Feb},}


text:
package commander

import (
	"fmt"
	"regexp"
	"strings"
)

// _Option
type _Option struct {
	actor                // actor
	usage     string     // usage
	required  bool       // option required
	desc      string     // desc
	show      bool       // show on options
	line      bool       // show on options in new line
	arguments _Arguments // arguments
}

func newOption(usage string, args ...interface{}) *_Option {
	o := &_Option{
		usage: strings.TrimSpace(usage),
	}
	o.regexpNames()
	o.regexpArguments()
	o.regexpRequired()
	if len(args) >= 1 {
		desc, _ := args[0].(string)
		o.Description(desc)
	}
	if len(args) >= 2 {
		o.setAction(args[1])
	}
	if len(args) >= 3 {
		defs := make([]string, 0, len(args)-2)
		for _, arg := range args[2:] {
			defs = append(defs, fmt.Sprintf("%v", arg))
		}
		def := fmt.Sprintf("[default: %v]", strings.Join(defs, ","))
		if len(o.desc) != 0 {
			o.desc += " " + def
		} else {
			o.desc = def
		}
	}
	return o
}

func (o *_Option) regexpNames() {
	o.names = regexpOption(o.usage)
}

func (o *_Option) regexpArguments() {
	o.arguments.Set(o.usage)
}

func (o *_Option) regexpRequired() {
	if strings.HasPrefix(o.usage, "(") {
		o.required = true
	}
}

func (o _Option) Valid() bool {
	return len(o.names) != 0 && len(o.usage) != 0
}

func (o _Option) Name() string {
	return strings.Join(o.names, "|")
}

func (o _Option) Names() []string {
	return o.names
}

func (o _Option) IsRequired() bool {
	return o.required
}

func (o _Option) IsOptional() bool {
	return !o.IsRequired()
}

func (o *_Option) Description(desc string) *_Option {
	o.desc = strings.TrimSpace(desc)
	o.show = len(o.desc) != 0
	return o
}

func (o *_Option) Aliases(aliases []string) *_Option {
	s := strings.TrimSpace(strings.Join(aliases, " "))
	if len(s) != 0 {
		o.usage += " " + s
		o.regexpNames()
		o.regexpArguments()
		o.regexpRequired()
	}
	return o
}

func (o _Option) UsageString(ones ...bool) string {
	if ok, _ := regexp.MatchString(`^[\[(].+[)\]]$`, o.usage); !ok || len(o.names) > 1 {
		strs := make([]string, len(o.names))
		arg := strings.Join(o.arguments.Get(), " ")
		for i, name := range o.names {
			if len(arg) != 0 {
				strs[i] = name + "=" + arg
			} else {
				strs[i] = name
			}
		}
		s := strings.Join(strs, "|")

		if o.line && len(ones) != 0 && ones[0] {
		} else if o.line || o.IsRequired() {
			s = fmt.Sprintf("(%s)", s)
		} else {
			s = fmt.Sprintf("[%s]", s)
		}
		return s
	}
	return regexp.MustCompile(`(\s*,\s*-)|(\s-)`).ReplaceAllString(o.usage, "|-")
}

func (o _Option) OptionString() (s string) {
	if !o.show {
		return ""
	}
	s = regexp.MustCompile(`^[\[(].+[)\]]$`).
		ReplaceAllStringFunc(o.usage, func(str string) string {
			if len(str) > 2 {
				return str[1 : len(str)-1]
			}
			return str
		})
	s = regexp.MustCompile(`(\s*[,|]\s*-)`).ReplaceAllString(s, " -")
	s = Format.Description(s, o.desc)
	return
}

func (o _Option) run(c Context) _Result {
	if r := o.actor.run(c); r != nil && r.Break() {
		return r
	}
	return nil
}

license: MIT

repository: diablur/go-commander

license_type: permissive

repo_name: diablur/go-commander

branch_name: refs/heads/master

extension: go


text:
package runtime

import (
	"reflect"
	"testing"
)

func TestParseKeyValues(t *testing.T) {
	type args struct {
		in []string
	}
	tests := []struct {
		name    string
		args    args
		wantRes map[string]string
		wantErr bool
	}{
		{
			name: "empty, int, string, bool",
			args: args{
				[]string{
					"TEST_INSTANCE_ROLE=",
					"TEST_CASE_SEQ=0",
					"TEST_ARTIFACTS=/artifacts",
					"TEST_SIDECAR=true",
				},
			},
			wantErr: false,
			wantRes: map[string]string{
				"TEST_INSTANCE_ROLE": "",
				"TEST_CASE_SEQ":      "0",
				"TEST_ARTIFACTS":     "/artifacts",
				"TEST_SIDECAR":       "true",
			},
		},
		{
			name: "empty, string, int, complex",
			args: args{
				[]string{
					"TEST_BRANCH=",
					"TEST_RUN=e765696a-bdf2-408e-8b39-aeb0e90c0ff6",
					"TEST_GROUP_INSTANCE_COUNT=200",
					"TEST_GROUP_ID=single",
					"TEST_INSTANCE_PARAMS=bucket_size=2|n_find_peers=1|timeout_secs=300|auto_refresh=true|random_walk=false|n_bootstrap=1",
					"TEST_SUBNET=30.38.0.0/16",
				},
			},
			wantErr: false,
			wantRes: map[string]string{
				"TEST_BRANCH":               "",
				"TEST_RUN":                  "e765696a-bdf2-408e-8b39-aeb0e90c0ff6",
				"TEST_GROUP_INSTANCE_COUNT": "200",
				"TEST_GROUP_ID":             "single",
				"TEST_INSTANCE_PARAMS":      "bucket_size=2|n_find_peers=1|timeout_secs=300|auto_refresh=true|random_walk=false|n_bootstrap=1",
				"TEST_SUBNET":               "30.38.0.0/16",
			},
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			gotRes, err := ParseKeyValues(tt.args.in)
			if (err != nil) != tt.wantErr {
				t.Errorf("ParseKeyValues() error = %v, wantErr %v", err, tt.wantErr)
				return
			}
			if !reflect.DeepEqual(gotRes, tt.wantRes) {
				t.Errorf("ParseKeyValues() = %v, want %v", gotRes, tt.wantRes)
			}
		})
	}
}

gha_license_id: NOASSERTION


text:
# Copyright (c) 2013-2018 LG Electronics, Inc.

SUMMARY = "libwebosi18n library can be used by non-QT C++ components for localization"
AUTHOR = "Edwin Hoogerbeets <edwin.hoogerbeets@lge.com>"
SECTION = "webos/libs"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"

DEPENDS = "libpbnjson boost"

inherit webos_cmake
inherit pkgconfig
inherit webos_public_repo

SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
S = "${WORKDIR}/git"

SRCREV = "5dce4ba2db88d46d9f3dcb772af326bfabeaa25d"

repository: webOS-ports/meta-webos-ports

repo_name: webOS-ports/meta-webos-ports

branch_name: refs/heads/kirkstone

gha_language: BitBake

extension: bb


text:
package validator

import (
	"errors"
	"reflect"
	"strconv"

	"github.com/elsonwu/i18n"
)

type Array struct {
	CoreValidate
}

func (self *Array) Filter(f reflect.StructField, fv reflect.Value) bool {
	return f.Type.Kind() == reflect.Array || f.Type.Kind() == reflect.Slice
}

func (self *Array) Validate(f reflect.StructField, fv reflect.Value) []error {
	if "required" == f.Tag.Get("required") && (fv.IsNil() || 0 == fv.Len()) {
		return []error{errors.New(i18n.T("%s cannot be blank", FieldName(f)))}
	}

	// if the item in array/slice is struct,
	// we need to run handler.Validate again.
	if !fv.IsNil() {
		for i := 0; i < fv.Len(); i++ {
			if v := fv.Index(i); v.Kind() == reflect.Struct {
				if v.CanAddr() && v.Addr().CanInterface() {
					if errs := self.CoreValidate.handler.Validate(v.Addr().Interface(), nil); errs != nil {
						return errs
					}
				}
			}
		}
	}

	min := f.Tag.Get("min")
	if "" != min {
		min2, err := strconv.Atoi(min)
		if err != nil {
			return []error{err}
		}

		if min2 > fv.Len() {
			return []error{errors.New(i18n.T("%s's length is too small", FieldName(f)))}
		}
	}

	max := f.Tag.Get("max")
	if "" != max {
		max2, err := strconv.Atoi(max)
		if err != nil {
			return []error{err}
		}

		if max2 < fv.Len() {
			return []error{errors.New(i18n.T("%s's length  is too big", FieldName(f)))}
		}
	}

	return nil
}

repository: elsonwu/validator

repo_name: elsonwu/validator


text:
package urlp

type node string

func (n node) IsParam() bool {
	if len(n) < 1 {
		return false
	}

	return n[0] == ':'
}

func (n node) IsWildcard() bool {
	return n == "*"
}

type Pattern struct {
	Path       string
	Nodes      []node
	Static     bool
	NoOfParams int
}

func NewPattern(path string) *Pattern {
	if path == "/" || path == "" {
		return &Pattern{
			Path:   path,
			Nodes:  []node{"/"},
			Static: true,
		}
	}

	var (
		nodes []node

		lenPath    = len(path)
		noOfParams = 0
	)

	c := 0 // cursor
	i := 0
	var newNode bool
	for {
		i++

		if i == lenPath || path[i] == '/' {
			part := path[c:i]

			if part == "/" {
				break // at last trailing slash
			}

			if char := part[1]; char == ':' || char == '*' {
				part = part[1:] // strip off / prefix

				if char == ':' {
					noOfParams++
				}

				nodes = append(nodes, node(part))

				newNode = true
			} else {
				if newNode || nodes == nil {
					nodes = append(nodes, node(part))

					newNode = false
				} else {
					nodes[len(nodes)-1] += node(part)
				}
			}

			c = i // move cursor
		}

		if i >= lenPath {
			break
		}
	}

	return &Pattern{
		Path:       path,
		Nodes:      nodes,
		Static:     noOfParams == 0,
		NoOfParams: noOfParams * 2,
	}
}

// RootPath is a utility function to return the first Node in our list of
// Nodes, which should be the path up to the first :param
func (p *Pattern) RootPath() string {
	root := p.Nodes[0]
	if root == "" || root[0] == ':' {
		return "/"
	}

	return string(root)
}

func (p *Pattern) Match(path string) (Params, bool) {
	lenPath := len(path)
	z := lenPath - 1

	// normalize the path for ts
	if lenPath > 1 && path[z] == '/' {
		path = path[:z] // trim ts
		lenPath--
		z--
	} else if path == "" {
		path = "/"
	}

	// static, match exactly
	if p.Static {
		return nil, p.Path == path
	}

	var ok bool = true
	var pr Params

	c := 0 // cursor location

	for _, v := range p.Nodes {
		if v.IsWildcard() {
			c = lenPath
			break
		}
		if v.IsParam() {
			c++
			if ok = !(c > lenPath); !ok {
				break
			}

			i := c
			for {
				if c > z || path[c] == '/' {
					if pr == nil {
						pr = make(Params, 0, p.NoOfParams)
					}
					pr = append(pr, string(v[1:]), path[i:c])

					break
				}
				c++
			}

			continue
		}

		i := c
		c = c + len(v)

		if ok = !(c > lenPath); !ok {
			break // if cursor + node length exceed the length of the path
		}
		if ok = (string(v) == path[i:c]); !ok {
			break // if the current node does not match the same node in path
		}
	}

	return pr, (c == lenPath)
}

type Params []string

func (p Params) Get(k string) string {
	r := len(p) - 2

	for i, v := range p {
		if k == v && i%2 == 0 {
			if i > r {
				return ""
			}

			return p[i+1]
		}
	}

	return ""
}

func (p Params) Map() map[string]string {
	m := map[string]string{}

	i := 0
	j := len(p)
	for ; i < j; i++ {
		var v string
		if i+1 < j {
			v = p[i+1]
		}

		m[p[i]] = v
		i++ // increment so i is always the "key" index
	}

	return m
}

repository: nowk/urlp

repo_name: nowk/urlp


text:
// Package wave reads and writes wave (.wav) file.
package wave

import (
	"bytes"
	"encoding/binary"
	"fmt"
	"io"
	"io/ioutil"
)

const (
	WAVE_FORMAT_PCM        = 0x1
	WAVE_FORMAT_EXTENSIBLE = 0xFFFE
)

type UnknownFormatTagError struct {
	FormatTag uint16
}

func (e *UnknownFormatTagError) Error() string {
	return fmt.Sprintf("unknown format tag: %d", e.FormatTag)
}

type WAVE struct {
	FormatTag      uint16
	Channels       uint16
	SamplesPerSec  uint32
	AvgBytesPerSec uint32
	BlockAlign     uint16
	BitsPerSample  uint16
	DataSize       uint32
	RawData        []byte
	offset         int
}

func (v *WAVE) Read(p []byte) (n int, err error) {
	frames := len(v.RawData)
	size := len(p)

	for n = 0; n < size; n++ {
		i := v.offset + n
		if i >= frames {
			return n, io.EOF
		}
		p[n] = v.RawData[i]
	}
	v.offset += size
	return
}

func (v *WAVE) Write(b []byte) (n int, err error) {
	size := len(b)

	for n = 0; n < size; n++ {
		v.RawData = append(v.RawData, b[n])
	}
	v.DataSize += uint32(size)
	return
}

func (v *WAVE) Bytes() []byte {
	buf := new(bytes.Buffer)

	binary.Write(buf, binary.BigEndian, []byte("RIFF"))
	if v.FormatTag == WAVE_FORMAT_PCM {
		binary.Write(buf, binary.LittleEndian, uint32(v.DataSize+36))
	} else if v.FormatTag == WAVE_FORMAT_EXTENSIBLE {
		binary.Write(buf, binary.LittleEndian, uint32(v.DataSize+72))
	}
	binary.Write(buf, binary.BigEndian, []byte("WAVEfmt "))
	if v.FormatTag == WAVE_FORMAT_PCM {
		binary.Write(buf, binary.LittleEndian, uint32(16))
	} else if v.FormatTag == WAVE_FORMAT_EXTENSIBLE {
		binary.Write(buf, binary.LittleEndian, uint32(40))
	}
	binary.Write(buf, binary.LittleEndian, v.FormatTag)
	binary.Write(buf, binary.LittleEndian, v.Channels)
	binary.Write(buf, binary.LittleEndian, v.SamplesPerSec)
	binary.Write(buf, binary.LittleEndian, v.AvgBytesPerSec)
	binary.Write(buf, binary.LittleEndian, v.BlockAlign)
	binary.Write(buf, binary.LittleEndian, v.BitsPerSample)
	if v.FormatTag == WAVE_FORMAT_EXTENSIBLE {
		binary.Write(buf, binary.LittleEndian, uint16(22))                         // cbSize
		binary.Write(buf, binary.LittleEndian, v.BitsPerSample)                    // validBitsPerSample
		binary.Write(buf, binary.LittleEndian, uint32(getChannelMask(v.Channels))) // channelMask
		//binary.Write(buf, binary.LittleEndian, uint16(0))            // reserved
		guid := [16]byte{0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
		binary.Write(buf, binary.BigEndian, guid)
		binary.Write(buf, binary.BigEndian, []byte("fact"))                             // fact chunk is an optional chunk
		binary.Write(buf, binary.LittleEndian, uint32(4))                               // 4 bytes
		binary.Write(buf, binary.LittleEndian, uint32(v.DataSize/uint32(v.BlockAlign))) // zero padding
	}
	binary.Write(buf, binary.BigEndian, []byte("data"))
	binary.Write(buf, binary.LittleEndian, v.DataSize)
	binary.Write(buf, binary.LittleEndian, v.RawData)

	return buf.Bytes()
}

func OpenFile(path string) (audio *WAVE, err error) {
	var file []byte

	if file, err = ioutil.ReadFile(path); err != nil {
		return
	}

	audio = &WAVE{}
	reader := bytes.NewReader(file)

	binary.Read(io.NewSectionReader(reader, 20, 2), binary.LittleEndian, &audio.FormatTag)
	if !(audio.FormatTag == WAVE_FORMAT_PCM || audio.FormatTag == WAVE_FORMAT_EXTENSIBLE) {
		err = &UnknownFormatTagError{audio.FormatTag}
		return
	}

	binary.Read(io.NewSectionReader(reader, 22, 2), binary.LittleEndian, &audio.Channels)
	binary.Read(io.NewSectionReader(reader, 24, 4), binary.LittleEndian, &audio.SamplesPerSec)
	binary.Read(io.NewSectionReader(reader, 28, 4), binary.LittleEndian, &audio.AvgBytesPerSec)
	binary.Read(io.NewSectionReader(reader, 32, 2), binary.LittleEndian, &audio.BlockAlign)
	binary.Read(io.NewSectionReader(reader, 34, 2), binary.LittleEndian, &audio.BitsPerSample)

	if audio.FormatTag == WAVE_FORMAT_PCM {
		binary.Read(io.NewSectionReader(reader, 40, 4), binary.LittleEndian, &audio.DataSize)
	} else if audio.FormatTag == WAVE_FORMAT_EXTENSIBLE {
		binary.Read(io.NewSectionReader(reader, 76, 4), binary.LittleEndian, &audio.DataSize)
	}

	buf := new(bytes.Buffer)
	if audio.FormatTag == WAVE_FORMAT_PCM {
		io.Copy(buf, io.NewSectionReader(reader, 44, int64(audio.DataSize)))
	} else if audio.FormatTag == WAVE_FORMAT_EXTENSIBLE {
		io.Copy(buf, io.NewSectionReader(reader, 80, int64(audio.DataSize)))
	}
	audio.RawData = buf.Bytes()

	return
}

func New(samplesPerSec uint32, bitsPerSample, channels uint16) (audio *WAVE, err error) {
	audio = &WAVE{}

	if bitsPerSample > 16 {
		audio.FormatTag = WAVE_FORMAT_EXTENSIBLE
	} else {
		audio.FormatTag = WAVE_FORMAT_PCM
	}

	audio.SamplesPerSec = samplesPerSec
	audio.Channels = channels
	audio.BitsPerSample = bitsPerSample
	audio.BlockAlign = audio.Channels * audio.BitsPerSample / 8
	audio.AvgBytesPerSec = audio.SamplesPerSec * uint32(audio.BlockAlign)
	audio.RawData = []byte{}
	return
}

func getChannelMask(c uint16) (mask uint32) {
	if c == 1 {
		mask = 0x4
	} else if c == 2 {
		mask = 0x3 //
	} else if c == 4 {
		mask = 0x33
	} else if c == 6 {
		mask = 0x3f
	} else if c == 8 {
		mask = 0x63f
	}
	return
}

repository: moutend/go-wave

repo_name: moutend/go-wave


text:
package model

import (
	"constant"
	"math/rand"
	"time"

	"gopkg.in/mgo.v2/bson"
)

var defaultSelector = bson.M{}

func getredisDefaultExpire() int64 {
	rand.Seed(time.Now().UnixNano())
	return constant.RedisDefaultExpire + rand.Int63n(constant.RedisDefaultRandExpire)
}

repository: zn-cn/WechatServiceCenter

repo_name: zn-cn/WechatServiceCenter


text:
package rle

// maxRunLen is the max length for a single run.
// If a run is longer it's just spread out into
// multiple runs to simplify things.
const maxRunLen = 259

// Run contains a run byte along with its length.
type Run struct {
	Byte byte
	Len  int
}

// Encode encodes a single run.
func (r Run) Encode() []byte {
	// Less than the long encode form.
	if r.Len < 4 {
		data := make([]byte, r.Len)
		for i := range data {
			data[i] = r.Byte
		}

		return data
	}

	// Long encode form up to the max byte.
	return []byte{r.Byte, r.Byte, r.Byte, r.Byte, byte(r.Len - 4)}
}

// EncodedLen gets the length of the encoded run.
func (r Run) EncodedLen() int {
	// Less than the long encode form
	if r.Len < 4 {
		return r.Len
	}

	// Long encode form up to the max byte.
	return 5 // 4 repeats, along with a length byte.
}


text:
@article{pmid27087480,
 abstract = {The Melanoma Research Foundation (MRF) has charted a comprehensive assessment of the current state of melanoma research and care. Intensive discussions among members of the MRF Scientific Advisory Council and Breakthrough Consortium, a group that included clinicians and scientists, focused on four thematic areas - diagnosis/early detection, prevention, tumor cell dormancy (including metastasis), and therapy (response and resistance). These discussions extended over the course of 2015 and culminated at the Society of Melanoma Research 2015 International Congress in November. Each of the four groups has outlined their thoughts as per the current status, challenges, and opportunities in the four respective areas. The current state and immediate and long-term needs of the melanoma field, from basic research to clinical management, are presented in the following report.Copyright © 2016 John Wiley & Sons A/S. Published by John Wiley & Sons Ltd},
 annote = {[PubMed Central:$\backslash$href\https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5228487\\PMC5228487\] [DOI:$\backslash$href\https://dx.doi.org/10.1111/pcmr.12475\\10.1111/pcmr.12475\] [PubMed:$\backslash$href\https://www.ncbi.nlm.nih.gov/pubmed/27087480\\27087480\]},
 author = {G., Merlino and M., Herlyn and D.E., Fisher and B.C., Bastian and K.T., Flaherty and M.A., Davies and J.A., Wargo and C., Curiel-Lewandrowski and M.J., Weber and S.A., Leachman and M.S., Soengas and M., Mcmahon and J.W., Harbour and S.M., Swetter and A.E., Aplin and M.B., Atkins and M.W., Bosenberg and R., Dummer and J.E., Gershenwald and A.C., Halpern and D., Herlyn and G.C., Karakousis and J.M., Kirkwood and M., Krauthammer and R.S., Lo and G.V., Long and G., Mcarthur and A., Ribas and L., Schuchter and J.A., Sosman and K.S., Smalley and P., Steeg and N.E., Thomas and H., Tsao and T., Tueting and A., Weeraratna and G., Xu and R., Lomax and A., Martin and S., Silverstein and T., Turnham},
 isbn = {1755-1471},
 journal = {Pigment Cell and Melanoma Research},
 keywords = {*melanoma,basic research,cancer epidemiology,controlled study,diagnosis,doctor patient relation,dormancy,human,metastasis,scientist,tumor resistance},
 number = {4},
 pages = {no pagination},
 title = {The state of melanoma: Challenges and opportunities},
 url = {http://www.interscience.wiley.com/jpages/1755-1471%5Cnhttp://ovidsp.ovid.com/ovidweb.cgi?T=JS&PAGE=reference&D=emed18b&NEWS=N&AN=609943527},
 volume = {29},
 year = {2016}
}

repository: uzh-dqbm-cmi/lab-website

repo_name: uzh-dqbm-cmi/lab-website

gha_license_id: MIT

gha_language: TeX

extension: bib


text:
cmake_minimum_required(VERSION 3.5)
project(hello C)
add_executable(hello hello.c)
include(CheckOutput.cmake)
include(CheckNoPrefixSubDir.cmake)

extension: cmake


text:
include(FindPackageHandleStandardArgs)

# Search paths for CCSR
set(CMAKE_LIBRARY_PATH /home/kuhl/public-ogl/assimp/lib ${CMAKE_LIBRARY_PATH})
set(CMAKE_INCLUDE_PATH /home/kuhl/public-ogl/assimp/include ${CMAKE_INCLUDE_PATH})
# Search paths for IVS
set(CMAKE_LIBRARY_PATH /research/kuhl/public-ogl/assimp/lib ${CMAKE_LIBRARY_PATH})
set(CMAKE_INCLUDE_PATH /research/kuhl/public-ogl/assimp/include ${CMAKE_INCLUDE_PATH})
# Search path for Rekhi lab
set(CMAKE_LIBRARY_PATH /home/campus11/kuhl/public-ogl/assimp/lib ${CMAKE_LIBRARY_PATH})
set(CMAKE_INCLUDE_PATH /home/campus11/kuhl/public-ogl/assimp/include ${CMAKE_INCLUDE_PATH})

# The assimp library is linked to zlib
FIND_PACKAGE(ZLIB)
FIND_LIBRARY(ASSIMP_LIBRARIES assimp)
FIND_PATH(ASSIMP_INCLUDE_DIRS assimp/mesh.h)

if(ASSIMP_SOURCE)
find_package_handle_standard_args(ASSIMP DEFAULT_MSG
    ASSIMP_INCLUDE_DIRS
    ASSIMP_SOURCE
)
else()
find_package_handle_standard_args(ASSIMP DEFAULT_MSG
    ASSIMP_LIBRARIES
    ASSIMP_INCLUDE_DIRS
    ZLIB_LIBRARIES
)
endif()

repository: JohnRThomas/opengl-examples

repo_name: JohnRThomas/opengl-examples


text:
// Copyright (c) 2022 Target Brands, Inc. All rights reserved.
//
// Use of this source code is governed by the LICENSE file in this repository.

package secret

import (
	"strings"

	"github.com/go-vela/cli/internal/output"

	"github.com/go-vela/sdk-go/vela"

	"github.com/go-vela/types/constants"

	"github.com/sirupsen/logrus"
)

// Remove deletes a secret based on the provided configuration.
func (c *Config) Remove(client *vela.Client) error {
	logrus.Debug("executing remove for secret configuration")

	// check if the secret type is org
	if strings.EqualFold(c.Type, constants.SecretOrg) {
		// set default for the secret repo
		c.Repo = "*"
	}

	// provide the repo name for the secret
	name := c.Repo

	// check if secret type is shared
	if strings.EqualFold(c.Type, constants.SecretShared) {
		// provide the team name for the secret
		name = c.Team
	}

	logrus.Tracef("removing secret %s/%s/%s/%s/%s", c.Engine, c.Type, c.Org, name, c.Name)

	// send API call to remove a secret
	//
	// https://pkg.go.dev/github.com/go-vela/sdk-go/vela?tab=doc#SecretService.Remove
	msg, _, err := client.Secret.Remove(c.Engine, c.Type, c.Org, name, c.Name)
	if err != nil {
		return err
	}

	// handle the output based off the provided configuration
	switch c.Output {
	case output.DriverDump:
		// output the msg in dump format
		//
		// https://pkg.go.dev/github.com/go-vela/cli/internal/output?tab=doc#Dump
		return output.Dump(msg)
	case output.DriverJSON:
		// output the msg in JSON format
		//
		// https://pkg.go.dev/github.com/go-vela/cli/internal/output?tab=doc#JSON
		return output.JSON(msg)
	case output.DriverSpew:
		// output the msg in spew format
		//
		// https://pkg.go.dev/github.com/go-vela/cli/internal/output?tab=doc#Spew
		return output.Spew(msg)
	case output.DriverYAML:
		// output the msg in YAML format
		//
		// https://pkg.go.dev/github.com/go-vela/cli/internal/output?tab=doc#YAML
		return output.YAML(msg)
	default:
		// output the msg in stdout format
		//
		// https://pkg.go.dev/github.com/go-vela/cli/internal/output?tab=doc#Stdout
		return output.Stdout(*msg)
	}
}

repository: go-vela/cli

repo_name: go-vela/cli

branch_name: refs/heads/main

gha_language: Go


text:
@article{Batty2015,
author = {Batty, Michael},
doi = {10.1080/21681376.2014.987540},
file = {:home/tim/Downloads/21681376\%2E2014\%2E987540.pdf:pdf},
issn = {2168-1376},
journal = {Regional Studies, Regional Science},
number = {March},
pages = {29--32},
title = {{A perspective on city dashboards}},
url = {http://www.tandfonline.com/doi/abs/10.1080/21681376.2014.987540},
volume = {2},
year = {2015}
}
@article{Handy2011,
abstract = {Although bicycling as a mode of transportation can mitigate traffic congestion, improve environmental quality, and yield health benefits, it accounts for a small share of all commute trips in the U.S. This paper aims to expand our understanding of the individual decision to bicycle commute through a cross-sectional study of bicycle commuting in six small U.S. cities. The study was designed to explore the relationships between bicycle commuting and socio-demographic characteristics, individual attitudes, and the physical and social environments of the workplace. Results show that residential preference for a good environment for bicycling, a measure of self-selection, is associated with bicycle commuting. The physical environment, including a short distance to work, safe streets for bicycling, and high monthly parking costs around the workplace, is also important. The social environment of the workplace has an impact as well. This research provides an empirical basis for the development of policies and programs to increase bicycle commuting.},
author = {Handy, Susan L. and Xing, Yan},
doi = {10.1080/15568310903514789},
file = {:home/tim/Downloads/Factors Correlated with Bicycle Commuting$\backslash$: A Study in Six Small Cities.pdf:pdf},
isbn = {1556-8318},
issn = {1556-8318},
journal = {International Journal of Sustainable Transportation},
keywords = {bicycle commuting,forthcoming in international journal,of sustainable transportation,physical environment,self-selection,social environment},
pages = {91--110},
title = {{Factors Correlated with Bicycle Commuting: A Study in Six Small U.S. Cities}},
volume = {5},
year = {2011}
}
@article{Holden2015,
author = {Holden, Meg and {Moreno Pires}, Sara},
doi = {10.1080/21681376.2014.987541},
file = {:home/tim/Downloads/21681376\%2E2014\%2E987541.pdf:pdf},
issn = {2168-1376},
journal = {Regional Studies, Regional Science},
number = {March 2015},
pages = {33--38},
title = {{The minority report: social hope in next generation indicators work. Commentary on Rob Kitchin et al.’s ‘Knowing and governing cities through urban indicators, city benchmarking, and real-time dashboards’}},
url = {http://www.tandfonline.com/doi/abs/10.1080/21681376.2014.987541},
volume = {2},
year = {2015}
}
@article{Kitchin,
author = {Kitchin, Rob and Lauriault, Tracey P and Mcardle, Gavin},
doi = {10.1080/21681376.2014.983149},
file = {:home/tim/Downloads/21681376\%2E2014\%2E983149.pdf:pdf},
number = {March 2015},
pages = {37--41},
title = {{Regional Studies , Regional Science Knowing and governing cities through urban indicators , city benchmarking and real-time dashboards}}
}
@article{Larsen2013,
abstract = {ABSTRACT Concern over climate change, traffic congestion, and the health consequences of sedentary lifestyles has resulted in a surge of interest in cycling as an efficient form of sustainable transportation. In order to best serve the needs of current cyclists and attract future ones, methodologies are needed to objectively determine the optimum location of new cycling facilities. This article uses Montr\'{e}al, Canada, as a case study to demonstrate various methods for locating facilities. This research can be beneficial to transportation engineers and planners since it uses readily available data sources to recommend additions and improvements to a city's cycling infrastructure. ABSTRACT Concern over climate change, traffic congestion, and the health consequences of sedentary lifestyles has resulted in a surge of interest in cycling as an efficient form of sustainable transportation. In order to best serve the needs of current cyclists and attract future ones, methodologies are needed to objectively determine the optimum location of new cycling facilities. This article uses Montr\'{e}al, Canada, as a case study to demonstrate various methods for locating facilities. This research can be beneficial to transportation engineers and planners since it uses readily available data sources to recommend additions and improvements to a city's cycling infrastructure.},
annote = {Grid based accidents, travel survey, cycle survey, POIs},
author = {Larsen, Jacob and Patterson, Zachary and El-Geneidy, Ahmed},
doi = {10.1080/15568318.2011.631098},
file = {:home/tim/Downloads/Building for bicycling.pdf:pdf},
issn = {1556-8318},
journal = {International Journal of Sustainable Transportation},
keywords = {Grid based accidents,POIs,cycle survey,travel survey},
mendeley-tags = {Grid based accidents,POIs,cycle survey,travel survey},
pages = {299--317},
title = {{Build It. But Where? The Use of Geographic Information Systems in Identifying Locations for New Cycling Infrastructure}},
url = {http://dx.doi.org/10.1080/15568318.2011.631098},
volume = {7},
year = {2013}
}
@article{Ngoduy2013,
abstract = {This paper aims to describe a model which represents the formulation of decision-making processes (over a number of years) affecting the step-changes of walking and cycling (WaC) schemes. These processes can be seen as being driven by a number of causal factors, many of which are associated with the attitudes of a variety of factors, in terms of both determining whether any scheme will be implemented and, if it is implemented, the extent to which it is used. The outputs of the model are pathways as to how the future might unfold (in terms of a number of future time steps) with respect to specific pedestrian and cyclist schemes. The transitions of the decision making processes are formulated using a qualitative simulation method, which describes the step-changes of the WaC scheme development. In this article a Bayesian belief network (BBN) theory is extended to model the influence between and within factors in the dynamic decision making process. © 2013 Copyright Taylor and Francis Group, LLC.},
author = {Ngoduy, Dong and Watling, David and Timms, Paul and Tight, Miles},
doi = {10.1080/15568318.2012.674627},
file = {:home/tim/Downloads/DYNAMIC\_BAYESIAN\_BELIEF\_NETWORK\_FOR\_THE\_DEVELOPMENT\_OF\_WALKING\_AND\_CYCLING\_SCHEMES.pdf:pdf},
issn = {1556-8318},
journal = {International Journal of Sustainable Transportation},
keywords = {causal effects,dynamic bayesian belief network,walking and cycling (WaC)},
pages = {366--388},
title = {{Dynamic Bayesian Belief Network to Model the Development of Walking and Cycling Schemes}},
url = {http://www.scopus.com/inward/record.url?eid=2-s2.0-84873916365\&partnerID=tZOtx3y1},
volume = {7},
year = {2013}
}
@article{Rybarczyk2010,
abstract = {Sustainable transport has become an important goal in transportation planning and research in recent decades. One emphasis of sustainable transport is to develop a multi-modal transportation system, in which bicycling facility planning is playing an important role. Recently, many bicycle facility planning methods have been proposed, and can be divided into two groups: supply- and demand-based models. While these two groups of models have been applied separately, few studies, however, have incorporated variables from these two groups of models together for bicycle facility planning. To address this issue, this paper proposes a multi-criteria evaluation (MCE) analysis to integrate both supply- and demand-based criteria for bicycle facility planning. Analysis was performed at two geographic levels: network level and neighborhood level, and a Geographic Information System (GIS) based exploratory spatial data analysis (ESDA) method was applied to explore the spatial patterns of bicycle facilities at the neighborhood level. This model was applied to Milwaukee City, WI, U.S.A., and results suggest that a combination of GIS and MCE analysis can serve as a better alternative to plan for optimal bicycle facilities, highlighting inadequacies of typical supply-side measures, and meet multiple planning objectives of government agencies, planners and bicyclists. ?? 2009 Elsevier Ltd. All rights reserved.},
annote = {Applying BLOS},
author = {Rybarczyk, Greg and Wu, Changshan},
doi = {10.1016/j.apgeog.2009.08.005},
file = {:home/tim/Downloads/2010a\_AG.pdf:pdf},
isbn = {0143-6228},
issn = {01436228},
journal = {Applied Geography},
keywords = {Bicycle planning,Geographic information systems,Multi-criteria analysis,Sustainable transportation},
number = {2},
pages = {282--293},
publisher = {Elsevier Ltd},
title = {{Bicycle facility planning using GIS and multi-criteria decision analysis}},
url = {http://dx.doi.org/10.1016/j.apgeog.2009.08.005},
volume = {30},
year = {2010}
}


text:
/*
Copyright oVirt Authors
SPDX-License-Identifier: Apache-2.0
*/

package clients

import (
	"context"
	"fmt"
	"strconv"

	apicorev1 "k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/api/errors"
	"sigs.k8s.io/controller-runtime/pkg/client"
)

type OvirtCreds struct {
	URL      string
	Username string
	Password string
	CAFile   string
	Insecure bool
}

func GetCredentialsSecret(coreClient client.Client, namespace string, secretName string) (*OvirtCreds, error) {
	var credentialsSecret apicorev1.Secret
	key := client.ObjectKey{Namespace: namespace, Name: secretName}

	if err := coreClient.Get(context.Background(), key, &credentialsSecret); err != nil {
		if errors.IsNotFound(err) {
			return nil, fmt.Errorf("error getting credentials secret %q in namespace %q: %v", secretName, namespace, err)
		}
		return nil, err
	}

	o := OvirtCreds{}
	o.URL = string(credentialsSecret.Data["ovirt_url"])
	o.Username = string(credentialsSecret.Data["ovirt_username"])
	o.Password = string(credentialsSecret.Data["ovirt_password"])
	o.CAFile = string(credentialsSecret.Data["ovirt_cafile"])
	insecure, err := strconv.ParseBool(string(credentialsSecret.Data["ovirt_insecure"]))
	if err == nil {
		o.Insecure = insecure
	}

	return &o, nil
}

repository: hongkailiu/cluster-api-provider-ovirt

repo_name: hongkailiu/cluster-api-provider-ovirt


text:
DESCRIPTION = "ARM Trusted Firmware Poplar"

LICENSE="BSD"
LIC_FILES_CHKSUM = "file://license.md;md5=829bdeb34c1d9044f393d5a16c068371"

COMPATIBLE_MACHINE = "poplar"

DEPENDS = " u-boot-poplar openssl-native"

SRCREV = "dc20ebf4faf350567f537e204453497666bd6f6d"

SRC_URI = "git://github.com/linaro/poplar-arm-trusted-firmware.git;name=atf;branch=latest;"

S = "${WORKDIR}/git"

# /usr/lib/atf/bl1.bin not shipped files. [installed-vs-shipped]
INSANE_SKIP_${PN} += "installed-vs-shipped"

export LDFLAGS=""

do_compile() {

    oe_runmake CROSS_COMPILE=${TARGET_PREFIX} all fip DEBUG=1 PLAT=${COMPATIBLE_MACHINE} SPD=none \
		       BL33=${DEPLOY_DIR_IMAGE}/u-boot.bin
}

do_install() {
    install -D -p -m0644 ${S}/build/${COMPATIBLE_MACHINE}/debug/bl1.bin ${D}${libdir}/atf/bl1.bin
    install -D -p -m0644 ${S}/build/${COMPATIBLE_MACHINE}/debug/fip.bin ${D}${libdir}/atf/fip.bin
}

FILES_${PN} += "${libdir}/atf/*"


text:
@article{borner2014lead,
 author = {Börner, Dirk and Kalz, Marco and Specht, Marcus},
 journal = {Computers & Education},
 pages = {10--19},
 publisher = {Elsevier},
 title = {Lead me gently: Facilitating knowledge gain through attention-aware ambient learning displays},
 volume = {78},
 year = {2014}
}

repository: mkalz/mkalz-academic

repo_name: mkalz/mkalz-academic


text:
package healthcontroller

import (
	"net/http/httptest"
	"gin-boilerplate/testutil"
	"testing"

	"github.com/gin-gonic/gin"
	"github.com/golang/mock/gomock"
	"github.com/stretchr/testify/suite"
)

type HealthControllerTestSuite struct {
	suite.Suite

	recorder       *httptest.ResponseRecorder
	ginContext     *gin.Context
	mockController *gomock.Controller

	healthController HealthController
}

func TestHealthController(t *testing.T) {
	suite.Run(t, new(HealthControllerTestSuite))
}

func (suite *HealthControllerTestSuite) SetupTest() {
	suite.recorder = httptest.NewRecorder()
	suite.ginContext, _ = gin.CreateTestContext(suite.recorder)
	suite.mockController = gomock.NewController(suite.T())

	suite.healthController = NewHealthController()
}

func (suite *HealthControllerTestSuite) TearDownTest() {
}

func (suite *HealthControllerTestSuite) TestHealthController() {
	suite.healthController.Check(suite.ginContext)

	expectedResponse := gin.H{
		"message": "gin-boilerplate is up and running",
	}

	suite.Equal(200, suite.recorder.Code)
	suite.Equal(testutil.MustMarshal(expectedResponse), suite.recorder.Body.String())
}

repository: ishnmu/gin-boilerplate

repo_name: ishnmu/gin-boilerplate


text:
@article{Borysiuk20181701,
 author = {Borysiuk, Z. and Konieczny, M. and Kręcisz, K. and Pakosz, P. and Królikowska, B.},
 document_type = {Article},
 doi = {10.2147/CIA.S167782},
 journal = {Clinical Interventions in Aging},
 note = {cited By 1},
 pages = {1701-1708},
 source = {Scopus},
 title = {Effect of six-week intervention program on postural stability measures and muscle coactivation in senior-aged women},
 url = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-85057353690&doi=10.2147%2fCIA.S167782&partnerID=40&md5=2ba307e9a19d8c6403bae0f301340d1f},
 volume = {13},
 year = {2018}
}

repository: kkrecisz/academic-kickstart

repo_name: kkrecisz/academic-kickstart


text:
// +build integration localintegration

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package stack_test

import (
	"io/ioutil"
	"path/filepath"
	"strings"
	"testing"

	"gopkg.in/yaml.v3"

	"github.com/aws/copilot-cli/internal/pkg/deploy/cloudformation/stack"

	"github.com/aws/copilot-cli/internal/pkg/manifest"
	"github.com/aws/copilot-cli/internal/pkg/template"

	"github.com/stretchr/testify/require"
)

const (
	jobManifestPath   = "job-manifest.yml"
	jobStackPath      = "job-test.stack.yml"
	jobParamsPath     = "job-test.params.json"
	envControllerPath = "custom-resources/env-controller.js"
)

func TestScheduledJob_Template(t *testing.T) {
	path := filepath.Join("testdata", "workloads", jobManifestPath)
	manifestBytes, err := ioutil.ReadFile(path)
	require.NoError(t, err)
	mft, err := manifest.UnmarshalWorkload(manifestBytes)
	require.NoError(t, err)
	v, ok := mft.(*manifest.ScheduledJob)
	require.True(t, ok)
	serializer, err := stack.NewScheduledJob(v, envName, appName, stack.RuntimeConfig{})

	tpl, err := serializer.Template()
	require.NoError(t, err, "template should render")
	parser := template.New()
	envController, err := parser.Read(envControllerPath)
	require.NoError(t, err)
	zipFile := envController.String()
	t.Run("CF Template should be equal", func(t *testing.T) {
		actualBytes := []byte(tpl)
		actualString := string(actualBytes)
		// Cut out zip file from EnvControllerAction for more readable output
		actualString = strings.ReplaceAll(actualString, zipFile, "Abracadabra")
		actualBytes = []byte(actualString)
		mActual := make(map[interface{}]interface{})
		require.NoError(t, yaml.Unmarshal(actualBytes, mActual))

		expected, err := ioutil.ReadFile(filepath.Join("testdata", "workloads", jobStackPath))
		require.NoError(t, err, "should be able to read expected bytes")
		expectedBytes := []byte(expected)
		mExpected := make(map[interface{}]interface{})
		require.NoError(t, yaml.Unmarshal(expectedBytes, mExpected))
		// Cut out zip file from EnvControllerAction
		require.Equal(t, mExpected, mActual)
	})

	t.Run("Parameter values should render properly", func(t *testing.T) {
		actualParams, err := serializer.SerializedParameters()
		require.NoError(t, err)

		path := filepath.Join("testdata", "workloads", jobParamsPath)
		wantedCFNParamsBytes, err := ioutil.ReadFile(path)
		require.NoError(t, err)

		require.Equal(t, string(wantedCFNParamsBytes), actualParams)
	})

}

repository: patnolanireland/copilot-cli

repo_name: patnolanireland/copilot-cli

branch_name: refs/heads/mainline


text:
DESCRIPTION = "Provides a central location for modules to report monitoring metrics, such \
as counters of the number of times interesting events have happened, and \
programs to collect up and send those metrics to monitoring services."

SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
PR = "r0"

MAINTAINER=	"Poky <poky@yoctoproject.org>"
HOMEPAGE=	"https://metacpan.org/release/Metrics-Any"

LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Artistic-1.0;md5=cda03bbdc3c1951996392b872397b798 \
file://${COMMON_LICENSE_DIR}/GPL-1.0-or-later;md5=30c0b8a5048cc2f4be5ff15ef0d8cf61"

SRC_URI = "https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Metrics-Any-0.07.tar.gz"

SRC_URI[md5sum] = "99ab22e40b7a9b13cf371521e93ed45d"
SRC_URI[sha256sum] = "537ff8c75ddae3accd0be26bd5da01712c4db72d81a6617d934b162e75f63b42"
DEPENDS += "module-build-perl-native"
DEPENDS += "test-fatal-perl-native"

S = "${WORKDIR}/Metrics-Any-${PV}"

inherit cpan_build allarch

BBCLASSEXTEND = "native"

repository: rehsack/meta-cpan

repo_name: rehsack/meta-cpan


text:
@misc{menichinelli_first_2013-1,
 author = {Menichinelli, Massimo},
 journal = {The Open Design + Hardware Group},
 month = {March},
 title = {The First Draft of the Open Design Definition},
 url = {http://design.okfn.org/2013/03/08/the-first-draft-of-the-open-design-definition/},
 urldate = {2016-03-22},
 year = {2013}
}


text:
# generated from genmsg/cmake/pkg-msg-paths.cmake.develspace.in

set(service2_MSG_INCLUDE_DIRS "")
set(service2_MSG_DEPENDENCIES std_msgs;geometry_msgs)


text:
include(FetchContent)

find_package(expected-lite QUIET)
if (expected-lite_FOUND )
    message(STATUS "Local installation of expected-lite found.")
else()
    message(STATUS "Fetching dependency expected-lite...")
    FetchContent_Declare(
            expected-lite
            GIT_REPOSITORY https://github.com/fbdtemme/expected-lite.git
            GIT_TAG        master
    )
    FetchContent_MakeAvailable(expected-lite)
endif()

repository: blockspacer/bencode

repo_name: blockspacer/bencode


text:
@ARTICLE{8526323,
author={J. {Dass} and V. {Sarin} and R. N. {Mahapatra}},
journal={IEEE Transactions on Parallel and Distributed Systems},
title={Fast and Communication-Efficient Algorithm for Distributed Support Vector Machine Training},
year={2019},
volume={30},
number={5},
pages={1065-1076},
keywords={learning (artificial intelligence);matrix algebra;multiprocessing systems;pattern classification;support vector machines;supervised learning models;classification problem;machine learning;computational requirements;big data problems;scalable distributed algorithms;model training;distributed algorithm;SVM training;low-rank approximations;storage requirements;training stage;benchmark data sets;communication-efficient algorithm;distributed support vector machine training;computation requirements;QR decomposition;kernel matrix;Support vector machines;Kernel;Training;Matrix decomposition;Optimization;Benchmark testing;Convergence;Machine learning;support vector machines;classification algorithms;parallel programming;distributed computing;message passing;quadratic programming;iterative algorithms;optimization;multicore processing},
doi={10.1109/TPDS.2018.2879950},
ISSN={1045-9219},
month={May},
}

repository: jyotikrd/academic-kickstart

repo_name: jyotikrd/academic-kickstart


text:
@Book{xie2015,
  title = {Dynamic Documents with {R} and knitr},
  author = {Yihui Xie},
  publisher = {Chapman and Hall/CRC},
  address = {Boca Raton, Florida},
  year = {2015},
  edition = {2nd},
  note = {ISBN 978-1498716963},
  url = {http://yihui.name/knitr/},
}

@article{garcia2009robust,
  title={Robust linear clustering},
  author={Garc{\'\i}a-Escudero, Luis Angel and Gordaliza, Alfonso and San Martin, Roberto and Van Aelst, Stefan and Zamar, Ruben},
  journal={Journal of the Royal Statistical Society: Series B (Statistical Methodology)},
  volume={71},
  number={1},
  pages={301--318},
  year={2009},
  publisher={Wiley Online Library}
}

@article{van2006linear,
  title={Linear grouping using orthogonal regression},
  author={Van Aelst, Stefan and Wang, Xiaogang Steven and Zamar, Ruben H and Zhu, Rong},
  journal={Computational Statistics \& Data Analysis},
  volume={50},
  number={5},
  pages={1287--1312},
  year={2006},
  publisher={Elsevier}
}

@article{weber1974structure,
  title={The structure of world protein consumption and future nitrogen requirements},
  author={Weber, Adolf and Weber, Ernst},
  journal={European Review of Agricultural Economics},
  volume={2},
  number={2},
  pages={169--192},
  year={1974},
  publisher={Oxford University Press}
}

@article{mcleod1994diagnostic,
  title={Diagnostic checking of periodic autoregression models with application},
  author={McLeod, A Ian},
  journal={Journal of Time Series Analysis},
  volume={15},
  number={2},
  pages={221--233},
  year={1994},
  publisher={Wiley Online Library}
}

@misc{ wiki:fraser,
       author = "Wikipedia",
       title = "Río Fraser --- Wikipedia{,} La enciclopedia libre",
       year = "2017",
       url = "https://es.wikipedia.org/w/index.php?title=R%C3%ADo_Fraser&oldid=98298707",
       note = "[Internet; descargado 28-abril-2017]"
}

@book{hoff2009first,
  title={A First Course in Bayesian Statistical Methods},
  author={Hoff, P.D.},
  isbn={9780387924076},
  lccn={2009929120},
  series={Springer Texts in Statistics},
  url={https://books.google.es/books?id=V8jT2SimGR0C},
  year={2009},
  publisher={Springer New York}
}

@article{bien2011hierarchical,
  title={Hierarchical clustering with prototypes via minimax linkage},
  author={Bien, Jacob and Tibshirani, Robert},
  journal={Journal of the American Statistical Association},
  volume={106},
  number={495},
  pages={1075--1084},
  year={2011},
  publisher={Taylor \& Francis}
}


text:
@article{RN1224,
 author = {Zhang, Y. P. and Chodavarapu, V. P. and Kirk, A. G. and Andrews, M. P.},
 doi = {10.1016/j.snb.2012.09.100},
 issn = {0925-4005},
 journal = {Sensors and Actuators B-Chemical},
 pages = {692-697},
 title = {Structured color humidity indicator from reversible pitch tuning in self-assembled nanocrystalline cellulose films},
 type = {Journal Article},
 url = {<Go to ISI>://WOS:000319867500094},
 volume = {176},
 year = {2013}
}

repository: andrewgkirk/website

repo_name: andrewgkirk/website

gha_language: Jupyter Notebook


text:
SUMMARY = "Utility for parsing system events"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://eventdump.c;beginline=1;endline=34;md5=23b59be24a88ddc407b553035f3fd3e9"

PR = "r4"
PV = "1.0+git${SRCPV}"

SRCREV = "5db45a36a05a78ea44a4cb25312ed5ee3c2bd76d"

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI = "git://github.com/TI-ECS/eventdump.git;protocol=https;branch=master \
	file://0001-PATCH_Makefile_Play_nicer_with_bitbake-OpenEmbedded.patch"

S = "${WORKDIR}/git"

EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} DEST_DIR=${D} BIN_DIR=${bindir} CC="${CC}""

do_install() {
	oe_runmake install
}

repository: rcn-ee/meta-arago

repo_name: rcn-ee/meta-arago


text:
DESCRIPTION = "Simple program for writing a new framebuffer to stdout that contains the given input string"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=f17cf300a93d4fa3f9f0cd408949ade3"

DEPENDS = "freetype liberation-fonts draw2fb"

inherit pkgconfig

S = "${WORKDIR}/git"

SRC_URI = " \
	git://github.com/gmalysa/fbtext.git;protocol=https;branch=master \
"

SRCREV = "${AUTOREV}"

do_compile() {
	oe_runmake -C ${S} fbtext
	oe_runmake -C ${S} fbdump
}

do_install() {
	install -d ${D}${bindir}
	install -m 0755 ${S}/fbtext ${D}${bindir}/fbtext
	install -m 0755 ${S}/fbdump ${D}${bindir}/fbdump
}

FILES_${PN} = " \
	${bindir}/fbtext \
	${bindir}/fbdump \
"

repository: gmalysa/fbtext

repo_name: gmalysa/fbtext


text:
@InProceedings{gui16,
  supplementary = {Supplementary:gui16-supp.pdf},
  title = {Towards Faster Rates and Oracle Property for Low-Rank Matrix Estimation},
  author = {Huan Gui and Jiawei Han and Quanquan Gu},
  pages = {2300-2309},
  abstract = {We present a unified framework for low-rank matrix estimation with a nonconvex penalty. A proximal gradient homotopy algorithm is proposed to solve the proposed optimization problem. Theoretically, we first prove that the proposed estimator attains a faster statistical rate than the traditional low-rank matrix estimator with nuclear norm penalty. Moreover, we rigorously show that under a certain condition on the magnitude of the nonzero singular values, the proposed estimator enjoys oracle property (i.e., exactly recovers the true rank of the matrix), besides attaining a faster rate. Extensive numerical experiments on both synthetic and real world datasets corroborate our theoretical findings.},
}

repository: mreid/papersite

repo_name: mreid/papersite


text:
package ledger

type Chain struct {
	version string
	blocks  []Block
}

// Add will add the given block to the blockchain.
func (chain *Chain) Add(block Block) {
	chain.blocks = append(chain.blocks, block)
}

func (chain Chain) last() Block {
	return chain.blocks[len(chain.blocks)-1]
}

// NewChain creates a new blockchain with the first intial GenesisBlock
func NewChain() Chain {
	chain := Chain{}
	genesisBlock := GenesisBlock()
	chain.Add(genesisBlock)
	return chain
}

repository: lzcaisg/gledger

repo_name: lzcaisg/gledger


text:
require ${PN}.inc
SRC_URI += " \
    git://invent.kde.org/network/konqueror.git;protocol=https;branch=release/23.04 \
    file://0001-Fix-linking-with-QtPrintSupport.patch \
"
SRCREV = "fac551bcfbf8cc75c11f994b6f920f1273094461"


text:
DESCRIPTION = "Gesture recognition input method for X11"
LICENSE = "GPL"
SECTION = "x11"
PRIORITY = "optional"
MAINTAINER = "Phil Blundell <pb@handhelds.org>"
DEPENDS = "x11 xft xtst xpm"
PR = "r2"

SRC_URI = "http://xstroke.org/releases/xstroke-0.6.tar.gz \
	file://auto-disable.patch;patch=1;pnum=0"

inherit autotools pkgconfig

repository: BackupTheBerlios/openslug-svn

repo_name: BackupTheBerlios/openslug-svn


text:
package gates

type _Null struct{}

var Null _Null

func (_Null) IsString() bool   { return false }
func (_Null) IsInt() bool      { return false }
func (_Null) IsFloat() bool    { return false }
func (_Null) IsBool() bool     { return false }
func (_Null) IsFunction() bool { return false }

func (_Null) ToString() string                       { return "" }
func (_Null) ToInt() int64                           { return 0 }
func (_Null) ToFloat() float64                       { return 0 }
func (_Null) ToNumber() Number                       { return Int(0) }
func (_Null) ToBool() bool                           { return false }
func (_Null) ToFunction() Function                   { return _EmptyFunction }
func (_Null) ToNative(...ToNativeOption) interface{} { return nil }

func (_Null) Equals(other Value) bool {
	return other == Null
}

func (_Null) SameAs(other Value) bool {
	return other == Null
}

repository: kangzhenkang/gates

repo_name: kangzhenkang/gates


text:
@article{ctrl:Zhu:2009:CTB:1496909.1496922,
 author = {Zhu, Xiaoyun and Uysal, Mustafa and Wang, Zhikui and Singhal, Sharad and Merchant, Arif and Padala, Pradeep and Shin, Kang},
 title = {What does control theory bring to systems research?},
 journal = {SIGOPS Oper. Syst. Rev.},
 volume = {43},
 issue = {1},
 month = {January},
 year = {2009},
 issn = {0163-5980},
 pages = {62--69},
 numpages = {8},
 url = {http://doi.acm.org/10.1145/1496909.1496922},
 doi = {http://doi.acm.org/10.1145/1496909.1496922},
 acmid = {1496922},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {control theory, dynamics, model, stability, systems research},
}

@INPROCEEDINGS{ctrl:chen-ghwbhs:2010,
author={Yuan Chen and Gmach, D. and Hyser, C. and Wang, Z. and Bash, C. and Hoover, C. and Singhal, S.},
booktitle={Network Operations and Management Symposium (NOMS), 2010 IEEE}, title={Integrated management of application performance, power and cooling in data centers},
year={2010},
month=april,
volume={},
number={},
pages={615 -622},
keywords={application performance management;cooling infrastructure;data centers;dynamic workload migration;energy consumption reduction;integrated management;power infrastructure;computer centres;computer network management;cooling;},
doi={10.1109/NOMS.2010.5488433},
ISSN={1542-1201},}

@ARTICLE{ctrl:ariba-GL:2009,
author={Ariba, Y. and Gouaisbaut, F. and Labit, Y.},
journal={Network and Service Management, IEEE Transactions on}, title={Feedback control for router management and TCP/IP network stability},
year={2009},
month=december ,
volume={6},
number={4},
pages={255 -266},
keywords={AQM design;QoS;TCP/IP network stability;active queue management;communication networks;feedback control theory;modified fluid flow model;multiple time delay systems;network topology;quadratic separation framework;quality of service;router management;structured state feedback;telecommunication congestion control;transmission control protocol;computer network management;delays;quality of service;queueing theory;stability;state feedback;telecommunication congestion control;telecommunication network topology;time-varying systems;transport protocols;},
doi={10.1109/TNSM.2009.04.090405},
ISSN={1932-4537},}

@ARTICLE{ctrl:wang-cgswrzh:2009,
author={Zhikui Wang and Yuan Chen and Gmach, D. and Singhal, S. and Watson, B.J. and Rivera, W. and Xiaoyun Zhu and Hyser, C.D.},
journal={Network and Service Management, IEEE Transactions on}, title={AppRAISE: application-level performance management in virtualized server environments},
year={2009},
month=december ,
volume={6},
number={4},
pages={240 -254},
keywords={AppRAISE;CPU resources application;RUBiS benchmark application;Xen virtual machines;across multiple virtual machines;application level performance management;feedback reactive control;integrating feedforward prediction;performance management solution;time varying resource demands;traditional queuing model;virtual machine capacity;virtual machine resizing;virtualized server environments;feedback;feedforward;queueing theory;resource allocation;virtual machines;},
doi={10.1109/TNSM.2009.04.090404},
ISSN={1932-4537},}

@ARTICLE{ctrl:kjaer-kr:2009,
author={Kjaer, M.A. and Kihl, M. and Robertsson, A.},
journal={Network and Service Management, IEEE Transactions on}, title={Resource allocation and disturbance rejection in web servers using SLAs and virtualized servers},
year={2009},
month=december ,
volume={6},
number={4},
pages={226 -239},
keywords={IT enterprise;Web Server;discrete event simulation;disturbance rejection;feedforward system;offline estimation;online adaption;resource allocation;resource management;virtualized servers;discrete event simulation;feedforward;file servers;parameter estimation;resource allocation;telecommunication control;},
doi={10.1109/TNSM.2009.04.090403},
ISSN={1932-4537},}

@ARTICLE{ctrl:abdelwahed-bsk:2009,
author={Abdelwahed, S. and Jia Bai and Rong Su and Kandasamy, N.},
journal={Network and Service Management, IEEE Transactions on}, title={On the application of predictive control techniques for adaptive performance management of computing systems},
year={2009},
month=december ,
volume={6},
number={4},
pages={212 -225},
keywords={adaptive performance management;automatic control synthesis;computing system management;performance specification;predictive control techniques;real-time computing system;system modeling;adaptive control;control engineering computing;fault tolerant computing;predictive control;real-time systems;},
doi={10.1109/TNSM.2009.04.090402},
ISSN={1932-4537},}

@ARTICLE{ctrl:hellerstein-sw:2009,
author={Hellerstein, J. and Singhal, S. and Qian Wang},
journal={Network and Service Management, IEEE Transactions on}, title={Research challenges in control engineering of computing systems},
year={2009},
month=december ,
volume={6},
number={4},
pages={206 -211},
keywords={closed loop systems;control engineering computing;control theory;software systems;closed loop systems;control engineering;control theory;software engineering;},
doi={10.1109/TNSM.2009.04.090401},
ISSN={1932-4537},}


text:
package httptest

import (
	"encoding/json"
	"io"
	"log"
	"net/http"
	"reflect"
	"strconv"
	"testing"

	"github.com/qiniu/x/mockhttp"
)

// ---------------------------------------------------------------------------

type mockTestingT struct {
	NilTestingT
	messages []string
	ok       bool
}

func (p *mockTestingT) Fatal(v ...interface{}) {

	log.Println(v...)
	if len(v) > 0 {
		if msg, ok := v[0].(string); ok {
			p.messages = append(p.messages, msg)
		}
	}
	p.ok = false
}

// ---------------------------------------------------------------------------

type M map[string]interface{}

// Reply replies a http response.
func Reply(w http.ResponseWriter, code int, data interface{}) {

	msg, err := json.Marshal(data)
	if err != nil {
		Reply(w, 500, M{"error": err.Error()})
		return
	}

	h := w.Header()
	h.Set("Content-Length", strconv.Itoa(len(msg)))
	h.Set("Content-Type", "application/json")
	w.WriteHeader(code)
	w.Write(msg)
}

// ReplyWith replies a http response.
func ReplyWith(w http.ResponseWriter, code int, bodyType string, msg []byte) {

	h := w.Header()
	h.Set("Content-Length", strconv.Itoa(len(msg)))
	h.Set("Content-Type", bodyType)
	w.WriteHeader(code)
	w.Write(msg)
}

func init() {

	http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
		ReplyWith(w, 200, "application/text", []byte(req.URL.Path))
	})

	http.HandleFunc("/form", func(w http.ResponseWriter, req *http.Request) {
		req.ParseForm()
		Reply(w, 200, req.Form)
	})

	http.HandleFunc("/json", func(w http.ResponseWriter, req *http.Request) {
		h := w.Header()
		if ct, ok := req.Header["Content-Type"]; ok {
			h["Content-Type"] = ct
		}
		h.Set("Content-Length", strconv.FormatInt(req.ContentLength, 10))
		w.WriteHeader(200)
		io.Copy(w, req.Body)
	})

	mockhttp.ListenAndServe("example.com", nil)
}

func Test_ContextDemo(t *testing.T) {

	ctx := New(t)
	ctx.SetTransport(mockhttp.DefaultTransport)

	ctx.Request("GET", "http://example.com/json").
		WithBody("json", `{"a": 1, "b": ["b1", "b2"]}`).
		Ret(200).
		WithBody("json", `{"a": 1}`)

	ctx.Request("GET", "http://example.com/form?a=1&b=b1&b=b2").
		Ret(200).
		WithBody("json", `{"a": ["1"], "b": ["b1", "b2"]}`)
}

// ---------------------------------------------------------------------------

type caseContext struct {
	method, url  string
	auth         interface{}
	reqHeader    http.Header
	reqBody      string
	reqBodyType  string
	code         int
	respHeader   http.Header
	respBody     string
	respBodyType string
	messages     []string
	ok           bool
}

func TestContext(t1 *testing.T) {

	cases := []caseContext{
		{
			method:       "POST",
			url:          "http://example.com/hello",
			auth:         nil,
			reqHeader:    http.Header{},
			reqBody:      "",
			reqBodyType:  "",
			code:         200,
			respHeader:   http.Header{},
			respBody:     "/hello",
			respBodyType: "application/text",
			messages:     nil,
			ok:           true,
		},
	}

	for _, c := range cases {
		t := &mockTestingT{ok: true}
		ctx := New(t)
		ctx.SetTransport(mockhttp.DefaultTransport)
		req := ctx.Request(c.method, c.url).WithAuth(c.auth)
		for k, v := range c.reqHeader {
			req.WithHeader(k, v...)
		}
		req.WithBody(c.reqBodyType, c.reqBody)
		resp := req.Ret(c.code)
		for k, v := range c.respHeader {
			resp.WithHeader(k, v...)
		}
		resp.WithBody(c.respBodyType, c.respBody)
		if !reflect.DeepEqual(t.messages, c.messages) || t.ok != c.ok {
			t1.Fatal("TestContext failed:", c, *t)
		}
	}
}

// ---------------------------------------------------------------------------


text:
package email

import (
	"github.com/go-ee/utils/lg"
	"github.com/matcornic/hermes/v2"
	"io/ioutil"
	"os"
	"path/filepath"
)

const THEME_HTML_FILE = "html.tmpl"
const THEME_TEXT_FILE = "text.tmpl"

type Theme struct {
	name string
	html string
	text string
}

func (o *Theme) Name() string {
	return o.name
}

func (o *Theme) HTMLTemplate() string {
	return o.html
}

func (o *Theme) PlainTextTemplate() string {
	return o.text
}

type Themes struct {
	defaultTheme hermes.Theme
	themes       map[string]hermes.Theme
}

func (o *Themes) LoadTheme(theme string) (ret hermes.Theme) {
	ret = o.themes[theme]
	if ret == nil {
		lg.LOG.Warnf("can't load the the '%v', use the theme '%v'", theme, o.defaultTheme.Name())
		ret = o.defaultTheme
	}
	return ret
}

func LoadThemes(themesFolder string) (ret *Themes) {
	defaultTheme := &hermes.Default{}
	ret = &Themes{
		defaultTheme: defaultTheme,
		themes: map[string]hermes.Theme{
			"default": defaultTheme, "flat": &hermes.Flat{},
		},
	}

	var files []os.FileInfo
	var logErr error
	if files, logErr = ioutil.ReadDir(themesFolder); logErr != nil {
		lg.LOG.Infof("can't load external themes from '%v' because '%v'", themesFolder, logErr)
		return
	}

	for _, fileInfo := range files {
		var html, text []byte
		var loadErr error
		if fileInfo.IsDir() {
			themeFolder := filepath.Join(themesFolder, fileInfo.Name())
			if html, loadErr = ioutil.ReadFile(filepath.Join(themeFolder, THEME_HTML_FILE)); loadErr != nil {
				logErrorLoad(fileInfo, loadErr)
				continue
			}

			if text, loadErr = ioutil.ReadFile(filepath.Join(themeFolder, THEME_TEXT_FILE)); loadErr != nil {
				logErrorLoad(fileInfo, loadErr)
				continue
			}

			theme := &Theme{
				name: fileInfo.Name(),
				html: string(html),
				text: string(text),
			}
			lg.LOG.Infof("the hermes theme loaded '%v'", theme.Name())
			ret.themes[theme.Name()] = theme
		}
	}
	return
}

func logErrorLoad(fileInfo os.FileInfo, loadErr error) {
	lg.LOG.Infof("skip theme '%v' because '%v'", fileInfo.Name(), loadErr)
}

repository: go-ee/utils

repo_name: go-ee/utils


text:
@InProceedings{shin2018interpreting,
  	author = "Shin, Jamin, Madotto, Andrea, and Fung, Pascale",
  	title =  "Interpreting Word Embeddings with Eigenvector Analysis",
  	booktitle =	"Workshop on Interpretability and Robustness in Audio, Speech, and Language (IRASL)",
  	year = 	"2018",
  	publisher = "NeurIPS IRASL"
}
@manual{Dmitriy:2019,
      title  = "Principal Component Analysis and k-means Clustering to Visualize a High Dimensional Dataset",
      author = "Dmitriy Kavyazin",
      url    = "https://medium.com/@dmitriy.kavyazin/principal-component-analysis-and-k-means-clustering-to-visualize-a-high-dimensional-dataset-577b2a7a5fe2",
      year   = "2019"
    }

@misc{spectral_clustering,
    author    = "Wikipedia",
    title     = "Spectral clustering",
    url       = "https://en.wikipedia.org/wiki/Spectral_clustering",
    year    = "2020-11-24"
}

@misc{LDA,
    author    = "Sebastian Raschka",
    title     = "Linear Discriminant Analysis",
    url       = "https://sebastianraschka.com/Articles/2014_python_lda.html",
    year    = "2014"
}


text:
// +build !windows

package mount

import (
	"bazil.org/fuse"
	"bazil.org/fuse/fs"
	"errors"
	fst "github.com/Mrs4s/six-cli/models/fs"
	"github.com/Mrs4s/six-cli/six_cloud"
	"os"
)

func Mount(user *six_cloud.SixUser, mountPoint string) error {
	if !fst.PathExists(mountPoint) {
		if err := os.MkdirAll(mountPoint, 0644); nil != err {
			return errors.New("could not create mount directory")
		}
	}
	options := []fuse.MountOption{
		fuse.AllowOther(),
		fuse.AllowNonEmptyMount(),
		fuse.ReadOnly(),
		fuse.FSName("six-pan"),
	}
	c, err := fuse.Mount(mountPoint, options...)
	if err != nil {
		return err
	}
	defer c.Close()
	filesys := &SixFileSystem{user: user}
	if err := fs.Serve(c, filesys); err != nil {
		return err
	}
	Unmount(mountPoint)
	return nil
}

func Unmount(mountPoint string) {
	_ = fuse.Unmount(mountPoint)
}

repository: flylai/six-cli

repo_name: flylai/six-cli


text:
# Adapted from linux-imx.inc, copyright (C) 2015, 2015 Celerity Embedded Design Services, LLC.
# Released under the MIT license (see COPYING.MIT for the terms)

require recipes-kernel/linux/linux-imx.inc
require recipes-kernel/linux/linux-dtb.inc

SUMMARY = "Linux kernel for CelerityEDS boards"

SRC_URI = "git://github.com/CelerityEDS/linux-imx.git;protocol=http;branch=${SRCBRANCH} \
           file://defconfig"

SRCBRANCH = "CelerityCOM_iMX6_3.10.17"
SRCREV = "8e8b18cb9fc4885d95cc4c271e0dc863d22aa93b"
DEPENDS += "lzop-native bc-native"
COMPATIBLE_MACHINE = "(mx6)"
COMPATIBLE_MACHINE = "(celerity-imx6com)"

repository: CelerityEDS/meta-celerity

repo_name: CelerityEDS/meta-celerity


text:
package config

import (
	"github.com/NYTimes/gizmo/config"
	"github.com/Sirupsen/logrus"
)

// BoltDB  holds the configuration of storage
type BoltDB struct {
	BoltDBPath           string `envconfig:"BOLTDB_PATH" default:"data/khronos.db"`
	BoltDBTimeoutSeconds int    `envconfig:"BOLTDB_TIMEOUT_SECONDS" default:"1"`
}

// LoadBoltDBConfig loads boltdb env and jsonfile config
func (b *BoltDB) LoadBoltDBConfig(cfg *AppConfig) {
	if cfg.ConfigFilePath != "" {
		config.LoadJSONFile(cfg.ConfigFilePath, b)
	}

	config.LoadEnvConfig(b)

	logrus.Infof("Boltdb database path: %s", cfg.BoltDBPath)
	logrus.Infof("Boltdb timeout set to: %ds", cfg.BoltDBTimeoutSeconds)
}

repository: slok/khronos

repo_name: slok/khronos


text:
/*
    Copyright (C) 2020 Accurics, Inc.

	Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

		http://www.apache.org/licenses/LICENSE-2.0

	Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/

package utils

import (
	"regexp"
	"strings"
)

var (
	skipRulesPattern = regexp.MustCompile(`#ts:skip=\s*(([A-Za-z0-9]+\.?){5})(\s*,\s*([A-Za-z0-9]+\.?){5})*`)
	skipRulesPrefix  = "#ts:skip="
)

// GetSkipRules returns a list of rules to be skipped. The rules to be skipped
// can be set in terraform resource config with the following comma separated pattern:
// #ts:skip=AWS.S3Bucket.DS.High.1043, AWS.S3Bucket.DS.High.1044
func GetSkipRules(body string) []string {

	var skipRules []string

	// check if any rules comments are present in body
	if !skipRulesPattern.MatchString(body) {
		return skipRules
	}

	// get all skip rule comments
	comments := skipRulesPattern.FindAllString(body, -1)

	// extract rule ids from comments
	for _, c := range comments {
		c = strings.TrimPrefix(c, skipRulesPrefix)
		c = strings.ReplaceAll(c, ",", " ")
		skipRules = append(skipRules, strings.Fields(c)...)
	}
	return skipRules
}


text:
# Parse all .cpp sources of a given `target`, and for each comment like:
#  //! JS_PRELOAD_FILE <name>
# it will append a link flag like:
#  --preload-file <name>
# Only if building for Emscripten. It has no effects otherwise.
#
# 07/March/2022, Jose Luis Blanco Claraco
#
function(process_emscripten_embedded_files targetName_)
	if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Emscripten")
		return()
	endif()

	get_target_property(targetCWD ${targetName_} BINARY_DIR)

	get_target_property(MY_SOURCES ${targetName_} SOURCES)
	foreach(fil_ ${MY_SOURCES})
		#message(STATUS "Processing: ${fil_}")
		file(STRINGS "${fil_}" content_)
		string(REGEX MATCHALL "//! JS_PRELOAD_FILE.+\\|([-A-Za-z0-9_\\./]+)\\|" myMatches_ "${content_}")
		foreach(match_ ${myMatches_})
			message(STATUS "match_ 1: ${match_}")
			string(REGEX REPLACE "<(.+)>" "\\1" f_ "${match_}")
			message(STATUS "f: ${f_}")
			if (NOT f_)
				continue()
			endif()
			message(STATUS "[emscripten] Embedding file '${f_}' into '${targetName_}'")

			if(NOT COMMAND target_link_options)
				message("Warning: This feature requires target_link_options() [cmake >=3.13]")
				return()
			endif()

			set(absPath ${MRPT_SOURCE_DIR}/${f_})
			set(relativePath ${f_})

			# Create copies (symlinks dont work...) to access the files via relative paths:
			execute_process(COMMAND bash -c "mkdir -p \$(dirname ${relativePath})" WORKING_DIRECTORY ${targetCWD})
			execute_process(COMMAND bash -c "cp ${absPath} ${relativePath}" WORKING_DIRECTORY ${targetCWD})

			target_link_options(${targetName_} PRIVATE --preload-file ${relativePath})
		endforeach()
	endforeach()

	# Make the .data file accessible to the emscripten linker:
	execute_process(COMMAND bash -c "ln -s ${EXECUTABLE_OUTPUT_PATH}/${targetName_}.data ${targetCWD}/${targetName_}.data"  OUTPUT_QUIET ERROR_QUIET)

endfunction()

repository: MRPT/mrpt

repo_name: MRPT/mrpt

branch_name: refs/heads/develop


text:
SUMMARY = "NVIDIA VisionWorks target tools"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://usr/share/doc/libvisionworks-repo/copyright;md5=49db087d45a7fa00de462381f7bf9fd0"

SRC_URI = "http://developer.download.nvidia.com/devzone/devcenter/mobile/jetpack_l4t/006/linux-x64/libvisionworks-repo_${PV}_arm64_l4t-r24.deb"
SRC_URI[md5sum] = "4da187505f27799a2a1d9f27e44d440b"
SRC_URI[sha256sum] = "5f9bd4836a71d848e79be02a5e10a405209b66c8c2ee242357454a34ab3a358d"

S = "${WORKDIR}"
B = "${WORKDIR}/build"

CUDAPATH ?= "/usr/local/cuda-8.0"

DEPENDS = "dpkg-native cuda-cudart chrpath-native"

COMPATIBLE_MACHINE = "(tegra210)"
PACKAGE_ARCH = "${SOC_FAMILY_PKGARCH}"

do_compile() {
    dpkg-deb --extract ${S}/var/visionworks-repo/libvisionworks_${PV}_arm64.deb ${B}
    dpkg-deb --extract ${S}/var/visionworks-repo/libvisionworks-dev_${PV}_all.deb ${B}
    cd ${B}/usr
    if [ "${baselib}" != "lib" ]; then
        mv ./lib ./${baselib}
    fi
    chrpath -r "${CUDAPATH}/${baselib}" ./${baselib}/libvisionworks.so.1.5.3
}

do_install() {
    install -d ${D}${prefix}
    cp -R --preserve=mode,timestamps ${B}/usr/* ${D}${prefix}/
    rm -rf ${D}${datadir}
}

INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
INHIBIT_SYSROOT_STRIP = "1"

FILES_${PN}-dev += "${libdir}/pkgconfig"
RDEPENDS_${PN} = "libstdc++"


text:
@article{lekschas2018hipiler,
  author = {Fritz Lekschas and Benjamin Bach and Peter Kerpedjiev and Nils Gehlenborg and Hanspeter Pfister},
  title = {HiPiler: Visual Exploration Of Large Genome Interaction Matrices With Interactive Small Multiples},
  journal = {IEEE Transactions on Visualization and Computer Graphics},
  series = {InfoVis ’17},
  year = {2018},
  month = {1},
  day = {1},
  volume = {24},
  number = {1},
  pages = {522-531},
  doi = {10.1109/TVCG.2017.2745978},
}

repository: flekschas/hipiler

repo_name: flekschas/hipiler

gha_language: JavaScript


text:
SUMMARY = "ZToolkit (Ztk) is a cross-platform GUI toolkit"
HOMEPAGE = "https://www.zrythm.org/"
LICENSE = "AGPL-3.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=eb1e647870add0502f8f010b19de32af"

inherit meson gettext features_check

REQUIRED_DISTRO_FEATURES = "x11"

SRC_URI = " \
    git://git.zrythm.org/git/ztoolkit;protocol=https;branch=master \
    file://0001-Remove-tests-from-builds-they-cause-linker-errors.patch \
"
SRCREV = "be7370d0926c5d676a32b9742b6e33c879a25f3b"
PV = "0.1.1"
S = "${WORKDIR}/git"

DEPENDS = " \
    virtual/libx11 \
    cairo \
"

PACKAGECONFIG ??= "rsvg"
PACKAGECONFIG[rsvg] = "-Denable_rsvg=true,-Denable_rsvg=false,librsvg"

repository: schnitzeltony/meta-musicians

repo_name: schnitzeltony/meta-musicians


text:
package utils

// Divmod get divisisor and module
func Divmod(numerator, denominator int) (quotient, remainder int) {
	quotient = numerator / denominator // integer division, decimals are truncated
	remainder = numerator % denominator
	return quotient, remainder
}

// DivCeil get next to quotient
func DivCeil(numerator, denominator int) (quotient int) {
	quotient = numerator / denominator // integer division, decimals are truncated
	remainder := numerator % denominator
	if remainder > 0 {
		quotient++
	}
	return quotient
}

repository: highercomve/couchness

repo_name: highercomve/couchness


text:
@article{Srikrishnan2018-lx,
 archiveprefix = {arXiv},
 arxivid = {1811.08524},
 author = {Srikrishnan, Vivek and Keller, Klaus},
 eprint = {1811.08524},
 month = {November},
 primaryclass = {stat.AP},
 title = {Small increases in agent-based model complexity can result
in large increases in required calibration data},
 url = {http://arxiv.org/abs/1811.08524},
 year = {2018}
}

repository: katerina-k/academic-kickstart

repo_name: katerina-k/academic-kickstart


text:
@article{hamlington_dissipation-scale_2011,
 abstract = {The statistics of intense energy dissipation events in wall-bounded shear ﬂows are studied using highly resolved direct numerical simulations of turbulent channel ﬂow at three diﬀerent friction Reynolds numbers. Distributions of the energy dissipation rate and local dissipation scales are computed at various distances from the channel walls, with an emphasis on the behavior of the statistics in the near-wall region. The dependence of characteristic mean and local dissipation scales on wall distance is also examined over the full channel height. Systematic variations in these statistics are found close to the walls due to the anisotropy generated by mean shear and coherent vortical structures. Results near the channel centerline are consistent with those found in homogeneous isotropic turbulence.},
 author = {Hamlington, P E and Krasnov, D and Boeck, T and Schumacher, J},
 doi = {10.1088/1742-6596/318/4/042019},
 file = {Hamlington et al. - 2011 - Dissipation-scale fluctuations in the inner region.pdf:/Users/peterh/Zotero/storage/VKTR6XIN/Hamlington et al. - 2011 - Dissipation-scale fluctuations in the inner region.pdf:application/pdf},
 issn = {1742-6596},
 journal = {Journal of Physics: Conference Series},
 language = {en},
 month = {December},
 number = {4},
 pages = {042019},
 title = {Dissipation-scale fluctuations in the inner region of turbulent channel flow},
 url = {https://iopscience.iop.org/article/10.1088/1742-6596/318/4/042019},
 urldate = {2020-06-27},
 volume = {318},
 year = {2011}
}

repository: kilojoules/website

repo_name: kilojoules/website


text:
package utils

/*
Copyright © 2019 Graham Plata <graham.plata@gmail.com>
*/

import (
	"fmt"
	"strconv"
)

// IncrementString ...
func IncrementString(str string) string {
	i, err := strconv.Atoi(str)
	if err != nil {
		fmt.Println("Unable to Increment string", err)
		return ""
	}
	i = i + 1
	str = strconv.FormatInt(int64(i), 10)
	return str
}

// DecrementString ...
func DecrementString(str string) string {
	i, err := strconv.Atoi(str)
	if err != nil {
		fmt.Println("Unable to Decrement string", err)
		return ""
	}
	i = i - 1
	str = strconv.FormatInt(int64(i), 10)
	return str
}

repository: grahamplata/sixers

repo_name: grahamplata/sixers


text:
@Article{DESeq,
  url =		 {http://genomebiology.com/2010/11/10/R106},
  author =	 {Simon Anders and Wolfgang Huber},
  Title =	 {{D}ifferential expression analysis for sequence
                  count data},
  Journal =	 {Genome Biology},
  Year =	 2010,
  Volume =	 11,
  Pages =	 {R106},
}
@Article{QoRTs,
  url =		 {http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4506620/},
  author =	 {Stephen W Hartley and James C Mullikin},
  Title =	 {QoRTs: a comprehensive toolset for quality control and data processing of RNA-Seq experiments.},
  Journal =	 {BMC bioinformatics},
  Year =	 2015,
  Volume =	 16,
  Number =       1,
  Pages =	 {224},
}
@Article{ratPineal,
  url =		 {http://dx.plos.org/10.1371/journal.pone.0137548},
  author =	 {Stephen W Hartley and Steven L Coon and Luis E Savastano and James C Mullikin and Cong Fu and David C Klein and NISC Comparative Sequencing Program},
  Title =	 {Neurotranscriptomics: The Effects of Neonatal Stimulus Deprivation on the Rat Pineal Transcriptome.},
  Journal =	 {PloS ONE},
  Year =	 2015,
  Volume =	 10,
  Number =       9,
}
@Article{DESeq2,
  url =		 {http://www.genomebiology.com/content/15/12/550},
  author =	 {Michael I Love, Wolfgang Huber, Simon Anders},
  Title =	 {Moderated estimation of fold change and dispersion for RNA-seq data with DESeq2},
  Journal =	 {Genome Biology},
  Year =	 2014,
  Volume =	 15,
  Pages =	 {550},
}
@Article{CQN,
  url =		 {http://dx.doi.org/10.1093/biostatistics/kxr054},
  author =	 {KD Hansen, RA Irizarry, and Z Wu},
  Title =	 {Removing technical variability in RNA-seq data using conditional quantile normalization},
  Journal =	 {Biostatistics},
  Year =	 2012,
  Volume =	 13,
  Number =       2,
  Pages =	 {204-216},
  DOI =          {10.1093/biostatistics/kxr054}
}

@Article{RSeQC,
  url =		 {http://bioinformatics.oxfordjournals.org/content/28/16/2184},
  author =	 {Liguo Wang, Shengqin Wang, and Wei Li},
  Title =	 {RSeQC: quality control of RNA-seq experiments},
  Journal =	 {Bioinformatics},
  Year =	 2012,
  Volume =	 28,
  Number =       16,
  Pages =	 {2184-2185},
}

@Article{RNASeQC,
  url =		 {http://bioinformatics.oxfordjournals.org/content/28/11/1530},
  author =	 {David S. DeLuca, Joshua Z. Levin, Andrey Sivachenko, Timothy Fennell, Marc-Danie Nazaire, Chris Williams, Michael Reich, Wendy Winckler and Gad Getz},
  Title =	 {RNA-SeQC: RNA-seq metrics for quality control and process optimization},
  Journal =	 {Bioinformatics},
  Year =	 2012,
  Volume =	 28,
  Number =       11,
  Pages =	 {1530-1532},
}

@article{DEXSeq,
  author =	 {Simon Anders and Alejandro Reyes and Wolfgang Huber},
  title =	 {Detecting differential usage of exons from {RNA-seq}
                  data},
  year =	 2012,
  journal =	 {Genome Research},
  Volume =	 22,
  Pages =	 "2008",
  doi =		 {10.1101/gr.133744.111},
}

@article{edgeR,
  author =	 {Robinson, Mark D. and Smyth, Gordon K.},
  title =	 {Moderated statistical tests for assessing
                  differences in tag abundance},
  journal =	 {Bioinformatics},
  volume =	 23,
  pages =	 {2881},
  doi =		 {10.1093/bioinformatics/btm453},
  year =	 2007,
  URL =          {http://bioinformatics.oxfordjournals.org/cgi/content/abstract/23/21/2881},
  eprint =       {http://bioinformatics.oxfordjournals.org/cgi/reprint/23/21/2881.pdf}
}

@article{edgeRsoftware,
  author =	 {Robinson MD, McCarthy DJ and Smyth GK},
  title =	 {edgeR: a Bioconductor package for differential expression analysis of digital gene expression data},
  journal =	 {Bioinformatics},
  volume =	 26,
  pages =	 {139-140},
  year =	 2010
}

@article{edgeRGLM,
  author = {McCarthy, Davis J. and Chen, Yunshun and Smyth, Gordon K.},
  year = {2012},
  title = {Differential expression analysis of multifactor {RNA-Seq} experiments with respect to biological variation},
  journal = {Nucleic Acids Research},
  volume = {40},
  pages = {4288-4297}
}

@article{CuffLinksFragBias,
  author = {Roberts A, Trapnell C, Donaghey J, Rinn JL, Pachter L.},
  year = {2011},
  title = {Improving RNA-Seq expression estimates by correcting for fragment bias},
  journal = {Genome Biology},
  volume = {12},
  number = {3},
  pages = {R22},
  DOI = {10.1186/gb-2011-12-3-r22},
}
@article{CuffLinks,
  author = {Trapnell C, Williams BA, Pertea G, Mortazavi A, Kwan G, van Baren MJ, Salzberg SL, Wold BJ, Pachter L.},
  year = {2010},
  title = {Transcript assembly and quantification by RNA-Seq reveals unannotated transcripts and isoform switching during cell differentiation.},
  journal = {Nature Biotechnology},
  volume = {28},
  number = {5},
  pages = {511-515},
  DOI = {10.1038/nbt.1621},
}

@article{TopHat2,
AUTHOR = {Kim, Daehwan and Pertea, Geo and Trapnell, Cole and Pimentel, Harold and Kelley, Ryan and Salzberg, Steven},
TITLE = {TopHat2: accurate alignment of transcriptomes in the presence of insertions, deletions and gene fusions},
JOURNAL = {Genome Biology},
VOLUME = {14},
YEAR = {2013},
NUMBER = {4},
PAGES = {R36},
URL = {http://genomebiology.com/2013/14/4/R36},
DOI = {10.1186/gb-2013-14-4-r36},
}

@article{GSNAP,
author = {Wu, Thomas D. and Nacu, Serban},
title = {Fast and {SNP}-tolerant detection of complex variants and splicing in short reads},
volume = {26},
number = {7},
pages = {873-881},
year = {2010},
doi = {10.1093/bioinformatics/btq057},
URL = {http://bioinformatics.oxfordjournals.org/content/26/7/873.abstract},
eprint = {http://bioinformatics.oxfordjournals.org/content/26/7/873.full.pdf+html},
journal = {Bioinformatics}
}

@article{STAR,
author = {Dobin, Alexander and Davis, Carrie A. and Schlesinger, Felix and Drenkow, Jorg and Zaleski, Chris and Jha, Sonali and Batut, Philippe and Chaisson, Mark and Gingeras, Thomas R.},
title = {{STAR}: ultrafast universal {RNA-seq} aligner},
volume = {29},
number = {1},
pages = {15-21},
year = {2013},
doi = {10.1093/bioinformatics/bts635},
URL = {http://bioinformatics.oxfordjournals.org/content/29/1/15.abstract},
eprint = {http://bioinformatics.oxfordjournals.org/content/29/1/15.full.pdf+html},
journal = {Bioinformatics}
}

repository: pythseq/QoRTs

repo_name: pythseq/QoRTs


text:
@article{dahlhaus1997fitting,
  title={Fitting time series models to nonstationary processes},
  author={Dahlhaus, Rainer and others},
  journal={The annals of Statistics},
  volume={25},
  number={1},
  pages={1--37},
  year={1997},
  publisher={Institute of Mathematical Statistics}
}

@article{dahlhaus1998optimal,
  title={On the optimal segment length for parameter estimates for locally stationary time series},
  author={Dahlhaus, Rainer and Giraitis, Liudas},
  journal={Journal of Time Series Analysis},
  volume={19},
  number={6},
  pages={629--655},
  year={1998},
  publisher={Wiley Online Library}
}

@book{brockwell2002introduction,
  title={Introduction to time series and forecasting},
  author={Brockwell, Peter J and Davis, Richard A and Calder, Matthew V},
  volume={2},
  year={2002},
  publisher={Springer}
}

@article{ljung1978measure,
  title={On a measure of lack of fit in time series models},
  author={Ljung, Greta M and Box, George EP},
  journal={Biometrika},
  volume={65},
  number={2},
  pages={297--303},
  year={1978},
  publisher={Oxford University Press}
}

@book{palma2007long,
  title={Long-memory time series: theory and methods},
  author={Palma, Wilfredo},
  volume={662},
  year={2007},
  publisher={John Wiley \& Sons}
}

@article{palma2013estimation,
  title={Estimation and forecasting of locally stationary processes},
  author={Palma, Wilfredo and Olea, Ricardo and Ferreira, Guillermo},
  journal={Journal of Forecasting},
  volume={32},
  number={1},
  pages={86--96},
  year={2013},
  publisher={Wiley Online Library}
}

@article{palma2010efficient,
  title={An efficient estimator for locally stationary Gaussian long-memory processes},
  author={Palma, Wilfredo and Olea, Ricardo and others},
  journal={The Annals of Statistics},
  volume={38},
  number={5},
  pages={2958--2997},
  year={2010},
  publisher={Institute of Mathematical Statistics}
}

repository: pachadotdev/LSTS

repo_name: pachadotdev/LSTS


text:
package music

import (
	"fmt"
	"time"

	"github.com/glebtv/custom_barista/utils"
	"barista.run/bar"
	"barista.run/colors"
	"barista.run/modules/media"
	"barista.run/outputs"
	"barista.run/pango"
)

func truncate(in string, l int) string {
	if len([]rune(in)) <= l {
		return in
	}
	return string([]rune(in)[:l-1]) + "⋯"
}

func hms(d time.Duration) (h int, m int, s int) {
	h = int(d.Hours())
	m = int(d.Minutes()) % 60
	s = int(d.Seconds()) % 60
	return
}

func formatMediaTime(d time.Duration) string {
	h, m, s := hms(d)
	if h > 0 {
		return fmt.Sprintf("%d:%02d:%02d", h, m, s)
	}
	return fmt.Sprintf("%d:%02d", m, s)
}

func mediaFormatFunc(m media.Info) bar.Output {
	if m.PlaybackStatus == media.Stopped || m.PlaybackStatus == media.Disconnected {
		return nil
	}
	artist := truncate(m.Artist, 20)
	title := truncate(m.Title, 40-len(artist))
	if len(title) < 20 {
		artist = truncate(m.Artist, 40-len(title))
	}
	iconAndPosition := pango.Icon("fa-music").Color(colors.Hex("#f70"))
	if m.PlaybackStatus == media.Playing {
		iconAndPosition.Append(
			utils.Spacer, pango.Textf("%s/%s",
				formatMediaTime(m.Position()),
				formatMediaTime(m.Length)),
		)
	}
	return outputs.Pango(iconAndPosition, utils.Spacer, title, " - ", artist)
}

func Get(player string) bar.Module {
	// You need to know your dbus\mrpis player name
	// find your player name via playerctl -l
	// https://github.com/acrisci/playerctl
	// for deadbeef use this plugin:
	// https://aur.archlinux.org/packages/deadbeef-mpris2-plugin/
	return media.New(player).Output(mediaFormatFunc)
}


text:
package playwright

import (
	"fmt"
	"log"
	"reflect"
)

type channel struct {
	eventEmitter
	guid       string
	connection *connection
	object     interface{}
}

func (c *channel) Send(method string, options ...interface{}) (interface{}, error) {
	return c.innerSend(method, false, options...)
}

func (c *channel) SendReturnAsDict(method string, options ...interface{}) (interface{}, error) {
	return c.innerSend(method, true, options...)
}

func (c *channel) innerSend(method string, returnAsDict bool, options ...interface{}) (interface{}, error) {
	params := transformOptions(options...)
	result, err := c.connection.SendMessageToServer(c.guid, method, params)
	if err != nil {
		return nil, fmt.Errorf("could not send message to server: %w", err)
	}
	if result == nil {
		return nil, nil
	}
	if returnAsDict {
		return result, nil
	}
	if reflect.TypeOf(result).Kind() == reflect.Map {
		mapV := result.(map[string]interface{})
		if len(mapV) == 0 {
			return nil, nil
		}
		for key := range mapV {
			return mapV[key], nil
		}
	}
	return result, nil
}

func (c *channel) SendNoReply(method string, options ...interface{}) {
	params := transformOptions(options...)
	_, err := c.connection.SendMessageToServer(c.guid, method, params)
	if err != nil {
		log.Printf("could not send message to server from noreply: %v", err)
	}
}

func newChannel(connection *connection, guid string) *channel {
	channel := &channel{
		connection: connection,
		guid:       guid,
	}
	channel.initEventEmitter()
	return channel
}


text:
@Manual{R,
  title = {R: A Language and Environment for Statistical Computing},
  author = {{R Core Team}},
  organization = {R Foundation for Statistical Computing},
  address = {Vienna, Austria},
  year = {2018},
  note = {{ISBN} 3-900051-07-0},
  url = {http://www.R-project.org/},
}

@article{ihaka:1996,
  Author = {Ihaka, Ross and Gentleman, Robert},
	Journal = {Journal of Computational and Graphical Statistics},
	Number = 3,
	Pages = {299--314},
	Title = {R: A Language for Data Analysis and Graphics},
	Volume = 5,
	Year = 1996}

@ARTICLE {gt_pp_mc,
    author  = "Dianne Cook and Andreas Buja and Eun-Kyung Lee and Hadley Wickham",
    title   = "Grand Tours, Projection Pursuit Guided Tours and Manual Controls",
    year = "2007"
}

@ARTICLE {gt_pp,
    author  = "Dianne Cook and Andreas Buja and Javier Cabrera and Catherine Hurley",
    title   = "Grand Tour and Projection Pursuit",
    journal = "Journal of Computational and Graphical Statistics",
    year    = "1995",
    volume  = "4",
    number  = "4",
    pages   = "155--172",
}

@ARTICLE{tourr,
    title = {tourr: An R Package for Exploring Multivariate Data
        with Projections},
    author = {Hadley Wickham and Dianne Cook and Heike Hofmann and Andreas Buja},
    journal = {Journal of Statistical Software},
    year = {2011},
    volume = {40},
    number = {2},
    pages = {1--18}
  }

@ARTICLE{tourrGui,
    title = {tourrGui: A gWidgets GUI for the Tour to Explore
        High-Dimensional Data Using Low-Dimensional Projections},
    author = {Bei Huang and Dianne Cook and Hadley Wickham},
    journal = {Journal of Statistical Software},
    year = {2012},
    volume = {49},
    number = {6},
    pages = {1--12}
  }

@Article{RGtk2,
    title = {{RGtk2}: A Graphical User Interface Toolkit for {R}},
    author = {Michael Lawrence and Duncan {Temple Lang}},
    journal = {Journal of Statistical Software},
    year = {2010},
    volume = {37},
    number = {8},
    pages = {1--52},
    url = {http://www.jstatsoft.org/v37/i08/},
}

@Manual{shiny,
    title = {shiny: Web Application Framework for R},
    author = {Winston Chang and Joe Cheng and JJ Allaire and Yihui Xie and Jonathan McPherson},
    year = {2017},
    note = {R package version 1.0.5},
    url = {https://CRAN.R-project.org/package=shiny},
  }

@article{D3,
  title = {D3: Data-Driven Documents},
  author = {Bostock, Michael and Ogievetsky, Vadim and Heer, Jeffrey},
  journal = {IEEE Transactions on Visualization and Computer Graphics},
  year = {2011},
 volume = {17},
 number = {12},
 pages = {2301--2309},
 url = {http://vis.stanford.edu/papers/d3}
}

@Article{RGtk2,
    title = {{RGtk2}: A Graphical User Interface Toolkit for {R}},
    author = {Michael Lawrence and Duncan {Temple Lang}},
    journal = {Journal of Statistical Software},
    year = {2010},
    volume = {37},
    number = {8},
    pages = {1--52},
    url = {http://www.jstatsoft.org/v37/i08/},
}


text:
// Copyright (c) 2016 ECS Team, Inc. - All Rights Reserved
// https://github.com/ECSTeam/cloudfoundry-top-plugin
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package appDetailView

import "github.com/ecsteam/cloudfoundry-top-plugin/ui/uiCommon/views/helpView"

const HelpText = HelpOverviewText +
	helpView.HelpHeaderText +
	HelpColumnsText +
	HelpLocalViewKeybindings +
	helpView.HelpChildLevelDataViewKeybindings +
	helpView.HelpCommonDataViewKeybindings

const HelpOverviewText = `
**App Detail View**

App detail view shows details of the selected application.

**Request Info Section**
Request Info section shows HTTP(S) request rates for the last 1/10/60
seconds. The average response time in milliseconds is also displayed
for the same 1/10/60 second intervals.

NOTE: The HTTP(S) counters are based on traffic through the gorouter.
Applications that talk directly container-to-container will not be
reflected in the rate and response time values.

**Crash Info Section**
Crash Info section shows how many application containers have crashed
in the last 10 minutes, 1 hour, and 24 hours.  It also shows the last
time a container crashed in the previous 24 hours.
`

const HelpColumnsText = `
**Container Columns:**

  IDX - Application container index.
  STATE - Current container state:
      DOWN, STARTING, RUNNING, CRASHED, TERM, UNKNOWN.
  STATE_DUR - Duration of time container has been in current state.
  CPU%% - CPU percent consumed by container.
  MEM_USED - Memory used by the container.
  MEM_FREE - Memory free in the container.
  DISK_USED - Disk used by container.
  DISK_FREE - Disk free in the container.
  LOG_OUT - Total number of log stdout events.
  LOG_ERR - Total number of log stderr events.
  CELL_IP - IP address of the cell running the container.
  STRT_DUR - Start duration. Amount of time from container creation to
      healthy container. This will be less then the overall time spent
      in STARTING state.
  CCR - Create counter. Number of times the container has been created.
  STATE_TIME - Time when the container entered current state.
  CNTR_START_MSG - Last container start-up message.
  CNTR_START_MSG_TM - Time when last container start-up message occured.
`

const HelpLocalViewKeybindings = `
**Display: **
Press 'd' to show app detail view menu.

**Clipboard menu: **
Press 'c' to open the clipboard menu.  This will copy to clipboard a
command you can paste in terminal window later.
`

repository: scottgai/cloudfoundry-top-plugin

repo_name: scottgai/cloudfoundry-top-plugin


text:
@inproceedings{mor2016value,
 author = {Mor, Yishay and Kalz, Marco and Castano-Munoz, Jonatan},
 booktitle = {European Conference on Technology Enhanced Learning},
 organization = {Springer International Publishing},
 pages = {618--621},
 title = {A Value Model for MOOCs},
 year = {2016}
}

repository: mkalz/mkalz-academic

repo_name: mkalz/mkalz-academic


text:
// Copyright (c) 2016 - 2021 ipgrep contributors
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

package ipgrep_test

import (
	"bytes"
	"io/ioutil"
	"strings"
	"testing"

	"github.com/joneskoo/ipgrep"
)

func TestIpgrep(t *testing.T) {
	cases := []struct {
		name    string
		input   string
		pattern string
		want    string
		err     bool
	}{
		{
			name:    "match specific IPv4 with CIDR",
			pattern: "127.0.0.2/24",
			input:   "127.0.0.1\n",
			want:    "127.0.0.1\n",
		},
		{
			name:    "match specific IPv4 with all IPv4 CIDR",
			pattern: "0.0.0.0/0",
			input:   "127.0.0.1\n",
			want:    "127.0.0.1\n",
		},
		{
			name:    "match comma separated IPv4 with all IPv4 CIDR",
			pattern: "0.0.0.0/0",
			input:   "127.0.0.1,127.0.0.2\n",
			want:    "127.0.0.1,127.0.0.2\n",
		},
		{
			name:    "match tab separated IPv4 with all IPv4 CIDR",
			pattern: "0.0.0.0/0",
			input:   "127.0.0.1\t127.0.0.2\n",
			want:    "127.0.0.1\t127.0.0.2\n",
		},
		{
			name:    "match quoted IPv4 with all IPv4 CIDR",
			pattern: "0.0.0.0/0",
			input:   "\"127.0.0.1\"\n",
			want:    "\"127.0.0.1\"\n",
		},
		{
			name:    "match single-quoted IPv4 with all IPv4 CIDR",
			pattern: "0.0.0.0/0",
			input:   "'127.0.0.1'\n",
			want:    "'127.0.0.1'\n",
		},
		{
			name:    "no match specific IPv4 with specific",
			pattern: "127.0.0.2",
			input:   "127.0.0.1\n",
			want:    "",
		},

		{
			name:    "no match IPv4 with IPv6 CIDR",
			pattern: "::/0",
			input:   "127.0.0.1\n",
			want:    "",
		},

		{
			name:    "match all IPv4 CIDR with specific IP",
			pattern: "127.0.0.1",
			input:   "0.0.0.0/0\n",
			want:    "0.0.0.0/0\n",
		},
		{
			name:    "match IPv4 CIDR with specific IP",
			pattern: "127.0.0.1",
			input:   "127.0.0.2/24\n",
			want:    "127.0.0.2/24\n",
		},

		{
			name:    "no match IPv4 with specific IPv4",
			pattern: "1.2.3.5",
			input:   "1.2.3.4\n",
			want:    "",
		},
		{
			name:    "no match IPv4 CIDR with specific IPv4",
			pattern: "1.2.2.4",
			input:   "1.2.3.4/24\n",
			want:    "",
		},
		{
			name:    "no match IPv4 m CIDR with specific IPv4",
			pattern: "1.2.2.4",
			input:   "1.2.3.4m24\n",
			want:    "",
		},
		{
			name:    "no match IPv4 m netmask with specific IPv4",
			pattern: "1.2.2.4",
			input:   "1.2.3.4m255.255.255.0\n",
			want:    "",
		},
		{
			name:    "match IPv4 m netmask with specific IPv4",
			pattern: "1.2.3.4",
			input:   "1.2.3.4m255.255.255.0\n",
			want:    "1.2.3.4m255.255.255.0\n",
		},
		{
			name:    "match IPv4 m netmask with IPv4 in prefix",
			pattern: "1.2.3.4",
			input:   "1.2.3.0m255.255.255.0\n",
			want:    "1.2.3.0m255.255.255.0\n",
		},
		{
			name:    "match IPv4 slash netmask with IPv4 in prefix",
			pattern: "1.2.3.4",
			input:   "1.2.3.0/255.255.255.0\n",
			want:    "1.2.3.0/255.255.255.0\n",
		},
		{
			name:    "match IPv6 with IPv6",
			pattern: "2001:db8::1",
			input:   "2001:db8::1\n",
			want:    "2001:db8::1\n",
		},
		{
			name:    "match IPv6 CIDR with IPv6 CIDR",
			pattern: "2001:db8::2",
			input:   "2001:db8::1/64\n",
			want:    "2001:db8::1/64\n",
		},

		{
			name:    "no match IPv4 with specific IPv4",
			pattern: "1.2.3.4",
			input:   "1.2.3.5\n",
			want:    "",
		},
		{
			name:    "no match IPv4 CIDR with specific IPv4",
			pattern: "1.2.3.4",
			input:   "1.2.2.4/24\n",
			want:    "",
		},
		{
			name:    "no match IPv4 m CIDR with specific IPv4",
			pattern: "1.2.2.4",
			input:   "1.2.3.4m24\n",
			want:    "",
		},
		{
			name:    "no match IPv4 m netmask with specific IPv4",
			pattern: "1.2.2.4",
			input:   "1.2.3.4m255.255.255.0\n",
			want:    "",
		},
		{
			name:    "no match IPv6 with IPv6",
			pattern: "2001:db8::2",
			input:   "2001:db8::1\n",
			want:    "",
		},
		{
			name:    "no match IPv6 CIDR with IPv6",
			pattern: "2001:db9::1",
			input:   "2001:db8::1/64\n",
			want:    "",
		},
	}
	for _, c := range cases {
		t.Run(c.name, func(t *testing.T) {
			r := strings.NewReader(c.input)
			buf := &bytes.Buffer{}
			err := ipgrep.Grep(r, buf, c.pattern)
			if (err != nil) != c.err {
				t.Errorf("wanted error=%v, got %v", c.err, err)
			}
			got := buf.String()
			if got != c.want {
				t.Errorf("wanted Grep(%q) to write %q, got %q", c.input, c.want, got)
			}
		})
	}
}

func BenchmarkGrepMMask(b *testing.B) {
	b.ReportAllocs()
	input, err := ioutil.ReadFile("README.md")
	if err != nil {
		b.Errorf("Failed to read README.md: %v", err)
	}
	for i := 0; i < b.N; i++ {
		br := bytes.NewReader(input)
		err := ipgrep.Grep(br, ioutil.Discard, "1.2.3.4m255.255.255.0")
		if err != nil {
			b.Errorf("Grep failed unexpectedly: %v", err)
		}
	}
}

func BenchmarkGrepCIDR(b *testing.B) {
	b.ReportAllocs()
	input, err := ioutil.ReadFile("README.md")
	if err != nil {
		b.Errorf("Failed to read README.md: %v", err)
	}
	for i := 0; i < b.N; i++ {
		br := bytes.NewReader(input)
		err := ipgrep.Grep(br, ioutil.Discard, "1.2.3.4/24")
		if err != nil {
			b.Errorf("Grep failed unexpectedly: %v", err)
		}
	}
}

func BenchmarkGrepIP(b *testing.B) {
	b.ReportAllocs()
	input, err := ioutil.ReadFile("README.md")
	if err != nil {
		b.Errorf("Failed to read README.md: %v", err)
	}
	for i := 0; i < b.N; i++ {
		br := bytes.NewReader(input)
		err := ipgrep.Grep(br, ioutil.Discard, "1.2.3.4")
		if err != nil {
			b.Errorf("Grep failed unexpectedly: %v", err)
		}
	}
}

repository: joneskoo/ipgrep

repo_name: joneskoo/ipgrep


text:
@article{cruz2015deteccion,
 author = {Cruz-Benito, Juan and García-Peñalvo, Francisco J and Borrás-Gené, Oriol and Therón Sánchez, Roberto and Fidalgo Blanco, Ángel},
 publisher = {Instituto Politécnico de Setúbal (Portugal). Escola Superior de Educação},
 title = {Detección de aprendizaje no formal e informal en Comunidades de Aprendizaje soportadas por Redes Sociales en el contexto de un MOOC Cooperativo},
 year = {2015}
}


text:
package operator

import (
	"github.com/venth/gorx"
)

func Error(err error) gorx.Observable {
	return CreateObservable(func(emissionObserver gorx.Observer, subscriptionState gorx.DisposableState) {
		if !subscriptionState.IsDisposed() {
			emissionObserver.OnError(err)
		}
	})
}

repository: venth/gorx

repo_name: venth/gorx


text:
@article{corso2013economic,
 author = {Corso, Phaedra S and Ingels, Justin B and Kogan, Steven M and Foster, E Michael and Chen, Yi-Fu and Brody, Gene H},
 journal = {Prevention science},
 number = {5},
 pages = {447--456},
 publisher = {Springer},
 title = {Economic analysis of a multi-site prevention program: assessment of program costs and characterizing site-level variability},
 volume = {14},
 year = {2013}
}