text:
package pipe

import (
	"io"
	"sync"
)

type pipe struct {
	wc   chan []byte
	rc   chan int
	done chan struct{}

	sync.Mutex

	once sync.Once
	werr error
	rerr error
}

func (p *pipe) read(data []byte) (n int, err error) {
	select {
	case <-p.done:
		return 0, p.readError()
	default:
	}

	select {
	case <-p.done:
		return 0, p.readError()
	case d := <-p.wc:
		n := copy(data, d)
		p.rc <- n
		return n, nil
	}
}

func (p *pipe) readError() error {
	if p.werr != nil {
		return p.werr
	}
	return io.ErrClosedPipe
}

func (p *pipe) write(data []byte) (n int, err error) {
	select {
	case <-p.done:
		return 0, p.writeError()
	default:
		p.Lock()
		defer p.Unlock()
	}

	for once := true; once || len(data) > 0; once = false {
		select {
		case p.wc <- data:
			nw := <-p.rc
			n += nw
			data = data[nw:]
		case <-p.done:
			return n, p.writeError()
		}
	}
	return
}

func (p *pipe) writeError() error {
	if p.rerr != nil {
		return p.rerr
	}
	return io.ErrClosedPipe
}

func (p *pipe) writeCloseWithError(err error) error {
	if err == nil {
		p.werr = io.EOF
	} else {
		p.werr = err
	}
	p.once.Do(func() { close(p.done) })
	return nil
}

func (p *pipe) readCloseWithError(err error) error {
	if err == nil {
		p.rerr = io.ErrClosedPipe
	} else {
		p.rerr = err
	}
	p.once.Do(func() { close(p.done) })
	return nil
}

type PipeWriter struct {
	p *pipe
}

func (w *PipeWriter) Write(data []byte) (n int, err error) {
	return w.p.write(data)
}

func (w *PipeWriter) Close() error {
	return w.p.writeCloseWithError(nil)
}

func (w *PipeWriter) CloseWithError(err error) error {
	return w.p.writeCloseWithError(err)
}

type PipeReader struct {
	p *pipe
}

func (r *PipeReader) Read(data []byte) (n int, err error) {
	return r.p.read(data)
}

func (r *PipeReader) Close() error {
	return r.p.readCloseWithError(nil)
}

func (r *PipeReader) CloseWithError(err error) error {
	return r.p.readCloseWithError(err)
}

func Pipe() (*PipeReader, *PipeWriter) {
	p := &pipe{
		wc:   make(chan []byte),
		rc:   make(chan int),
		done: make(chan struct{}),
	}

	return &PipeReader{p}, &PipeWriter{p}
}


text:
// Copyright (c) 2018 Iori Mizutani
//
// Use of this source code is governed by The MIT License
// that can be found in the LICENSE file.

package main

import (
	"encoding/binary"
	"encoding/json"
	"io"
	"io/ioutil"
	"log"
	"net"
	"net/http"
	"os"
	"os/signal"
	"path"
	"path/filepath"
	"runtime"
	"strconv"
	"strings"
	"sync/atomic"
	"syscall"
	"time"

	"github.com/fatih/structs"
	"github.com/gin-gonic/contrib/static"
	"github.com/gin-gonic/gin"
	"github.com/gin-gonic/gin/binding"
	"github.com/iomz/go-llrp"
	"github.com/iomz/go-llrp/binutil"
	"golang.org/x/net/websocket"
	"gopkg.in/alecthomas/kingpin.v2"
)

var (
	// Current Version
	version = "0.1.0"

	// app
	app                = kingpin.New("golemu", "A mock LLRP-based logical reader emulator for RFID Tags.")
	debug              = app.Flag("debug", "Enable debug mode.").Short('v').Default("false").Bool()
	initialMessageID   = app.Flag("initialMessageID", "The initial messageID to start from.").Default("1000").Int()
	initialKeepaliveID = app.Flag("initialKeepaliveID", "The initial keepaliveID to start from.").Default("80000").Int()
	ip                 = app.Flag("ip", "LLRP listening address.").Short('a').Default("0.0.0.0").IP()
	keepaliveInterval  = app.Flag("keepalive", "LLRP Keepalive interval.").Short('k').Default("0").Int()
	port               = app.Flag("port", "LLRP listening port.").Short('p').Default("5084").Int()
	pdu                = app.Flag("pdu", "The maximum size of LLRP PDU.").Short('m').Default("1500").Int()
	reportInterval     = app.Flag("reportInterval", "The interval of ROAccessReport in ms. Pseudo ROReport spec option.").Short('i').Default("10000").Int()

	// server mode
	server  = app.Command("server", "Run as an LLRP tag stream server.")
	webPort = server.Flag("webPort", "Port listening for web access.").Short('w').Default("3000").Int()
	file    = server.Flag("file", "The file containing Tag data.").Short('f').Default("tags.csv").String()

	// client mode
	client = app.Command("client", "Run as an LLRP client.")

	// simulator mode
	simulate      = app.Command("simulate", "Run in the simulator mode.")
	simulationDir = simulate.Arg("simulationDir", "The directory contains tags for each event cycle.").Required().String()

	// LLRPConn flag
	isLLRPConnAlive = false
	// Current messageID
	messageID = uint32(*initialMessageID)
	// Current KeepaliveID
	keepaliveID = *initialKeepaliveID
	// Current activeClients
	activeClients = make(map[WebsockConn]int) // map containing clients
	// Tag management channel
	tagManagerChannel = make(chan TagManager)
	// notify tag update channel
	notify = make(chan bool)
	// update TagReportDataStack when tag is updated
	tagUpdated = make(chan llrp.Tags)
)

// TagManager is a struct for tag management channel
type TagManager struct {
	Action ManagementAction
	Tags   llrp.Tags
}

// ManagementAction is a type for TagManager
type ManagementAction int

const (
	// RetrieveTags is a const for retrieving tags
	RetrieveTags ManagementAction = iota
	// AddTags is a const for adding tags
	AddTags
	// DeleteTags is a const for deleting tags
	DeleteTags
)

// WebsocketMessage to unmarshal JSON message from web clients
type WebsocketMessage struct {
	UpdateType string
	Tag        llrp.TagRecord
	Tags       []map[string]interface{}
}

// WebsockConn holds connection consists of the websocket and the client ip
type WebsockConn struct {
	websocket *websocket.Conn
	clientIP  string
}

// APIPostTag redirects the tag addition request
func APIPostTag(c *gin.Context) {
	var json []llrp.TagRecord
	c.BindWith(&json, binding.JSON)
	if res := ReqAddTag("add", json); res == "error" {
		c.String(http.StatusAlreadyReported, "The tag already exists!\n")
	} else {
		c.String(http.StatusAccepted, "Post requested!\n")
	}
}

// APIDeleteTag redirects the tag deletion request
func APIDeleteTag(c *gin.Context) {
	var json []llrp.TagRecord
	c.BindWith(&json, binding.JSON)
	if res := ReqDeleteTag("delete", json); res == "error" {
		c.String(http.StatusNoContent, "The tag doesn't exist!\n")
	} else {
		c.String(http.StatusAccepted, "Delete requested!\n")
	}
}

// Broadcast a message vi websocket
func Broadcast(clientMessage []byte) {
	for cs := range activeClients {
		if err := websocket.Message.Send(cs.websocket, string(clientMessage)); err != nil {
			// we could not send the message to a peer
			log.Printf("could not send message to %v", cs.clientIP)
			log.Print(err)
		}
	}
}

// ReqAddTag handles a tag addition request
func ReqAddTag(ut string, req []llrp.TagRecord) string {
	// TODO: success/fail notification per tag
	failed := false
	for _, t := range req {
		tag, err := llrp.NewTag(&llrp.TagRecord{
			PCBits: t.PCBits,
			EPC:    t.EPC,
		})
		if err != nil {
			log.Fatal(err)
		}

		add := TagManager{
			Action: AddTags,
			Tags:   []*llrp.Tag{tag},
		}
		tagManagerChannel <- add

		if add = <-tagManagerChannel; len(add.Tags) != 0 {
			m := WebsocketMessage{
				UpdateType: "add",
				Tag:        t,
				Tags:       []map[string]interface{}{}}
			clientMessage, err := json.Marshal(m)
			if err != nil {
				panic(err)
			}
			Broadcast(clientMessage)
		} else {
			failed = true
		}
	}

	if failed {
		log.Printf("failed %v %v", ut, req)
		return "error"
	}
	log.Printf("%v %v", ut, req)
	return ut
}

// ReqDeleteTag handles a tag deletion request
func ReqDeleteTag(ut string, req []llrp.TagRecord) string {
	// TODO: success/fail notification per tag
	failed := false
	for _, t := range req {
		tag, err := llrp.NewTag(&llrp.TagRecord{
			PCBits: t.PCBits,
			EPC:    t.EPC,
		})
		if err != nil {
			panic(err)
		}

		delete := TagManager{
			Action: DeleteTags,
			Tags:   []*llrp.Tag{tag},
		}
		tagManagerChannel <- delete

		if delete = <-tagManagerChannel; len(delete.Tags) != 0 {
			m := WebsocketMessage{
				UpdateType: "delete",
				Tag:        t,
				Tags:       []map[string]interface{}{}}
			clientMessage, err := json.Marshal(m)
			if err != nil {
				panic(err)
			}
			Broadcast(clientMessage)
		} else {
			failed = true
		}
	}
	if failed {
		log.Printf("failed %v %v", ut, req)
		return "error"
	}
	log.Printf("%v %v", ut, req)
	return ut
}

// ReqRetrieveTag handles a tag retrieval request
func ReqRetrieveTag() []map[string]interface{} {
	retrieve := TagManager{
		Action: RetrieveTags,
		Tags:   []*llrp.Tag{},
	}
	tagManagerChannel <- retrieve
	retrieve = <-tagManagerChannel
	var tagList []map[string]interface{}
	for _, tag := range retrieve.Tags {
		t := structs.Map(llrp.NewTagRecord(*tag))
		tagList = append(tagList, t)
	}
	log.Printf("retrieve: %v", tagList)
	return tagList
}

// SockServer to handle messaging between clients
func SockServer(ws *websocket.Conn) {
	var err error
	//var clientMessage string
	// use []byte if websocket binary type is blob or arraybuffer
	var clientMessage []byte

	// cleanup on server side
	defer func() {
		if err = ws.Close(); err != nil {
			log.Print(err)
		}
	}()

	client := ws.Request().RemoteAddr
	log.Printf("client connected: %v", client)
	clientSock := WebsockConn{ws, client}
	activeClients[clientSock] = 0
	log.Printf("number of clients connected: %v", len(activeClients))

	// for loop so the websocket stays open otherwise
	// it'll close after one Receieve and Send
	for {
		if err = websocket.Message.Receive(ws, &clientMessage); err != nil {
			// If we cannot Read then the connection is closed
			log.Printf("websocket Disconnected waiting %v", err.Error())
			// remove the ws client conn from our active clients
			delete(activeClients, clientSock)
			log.Printf("number of clients still connected ... %v", len(activeClients))
			return
		}

		//clientMessage = clientSock.clientIP + " Said: " + clientMessage

		// Parse the JSON
		m := WebsocketMessage{}
		if err = json.Unmarshal(clientMessage, &m); err != nil {
			log.Print(err)
		}

		// Handle the command
		// Compose result struct containing proper parameters
		// TODO: separate actions into functions
		switch m.UpdateType {
		case "add":
			m.UpdateType = ReqAddTag(m.UpdateType, []llrp.TagRecord{m.Tag})
		case "delete":
			m.UpdateType = ReqDeleteTag(m.UpdateType, []llrp.TagRecord{m.Tag})
		case "retrieve":
			tagList := ReqRetrieveTag()
			m = WebsocketMessage{
				UpdateType: "retrieval",
				Tag:        llrp.TagRecord{},
				Tags:       tagList}
			clientMessage, err = json.Marshal(m)
			if err != nil {
				panic(err)
			}
			Broadcast(clientMessage)
		default:
			log.Printf("unknown UpdateType: %v", m.UpdateType)
		}
	}
}

// Handles incoming requests.
func handleRequest(conn net.Conn, tags llrp.Tags) {
	// Make a buffer to hold incoming data.
	buf := make([]byte, *pdu)
	trds := tags.BuildTagReportDataStack(*pdu)

	for {
		// Read the incoming connection into the buffer.
		reqLen, err := conn.Read(buf)
		if err == io.EOF {
			// Close the connection when you're done with it.
			log.Println("the client is disconnected, closing LLRP connection")
			conn.Close()
			return
		} else if err != nil {
			log.Println("closing LLRP connection")
			log.Print(err)
			conn.Close()
			return
		}

		// Respond according to the LLRP packet header
		header := binary.BigEndian.Uint16(buf[:2])
		if header == llrp.SetReaderConfigHeader || header == llrp.KeepaliveAckHeader {
			if header == llrp.SetReaderConfigHeader {
				// SRC received, start ROAR
				log.Println(">>> SET_READER_CONFIG")
				conn.Write(llrp.SetReaderConfigResponse())
				log.Println("<<< SET_READER_CONFIG_RESPONSE")
			} else if header == llrp.KeepaliveAckHeader {
				// KA receieved, continue ROAR
				log.Println(">>> KEEP_ALIVE_ACK")
			}

			// Tick ROAR and Keepalive interval
			roarTicker := time.NewTicker(time.Duration(*reportInterval) * time.Millisecond)
			keepaliveTicker := &time.Ticker{}
			if *keepaliveInterval != 0 {
				keepaliveTicker = time.NewTicker(time.Duration(*keepaliveInterval) * time.Second)
			}
			go func() {
				for { // Infinite loop
					isLLRPConnAlive = true
					select {
					// ROAccessReport interval tick
					case <-roarTicker.C:
						log.Printf("<<< RO_ACCESS_REPORT (# reports: %v, # total tags: %v)", len(trds), trds.TotalTagCounts())
						for _, trd := range trds {
							roar := llrp.NewROAccessReport(trd.Data, messageID)
							err := roar.Send(conn)
							messageID++
							if err != nil {
								log.Print(err)
								isLLRPConnAlive = false
								break
							}
						}
					// Keepalive interval tick
					case <-keepaliveTicker.C:
						log.Println("<<< KEEP_ALIVE")
						conn.Write(llrp.Keepalive())
						isLLRPConnAlive = false
					// When the tag queue is updated
					case tags := <-tagUpdated:
						log.Println("### TagUpdated")
						trds = tags.BuildTagReportDataStack(*pdu)
					}
					if !isLLRPConnAlive {
						roarTicker.Stop()
						if *keepaliveInterval != 0 {
							keepaliveTicker.Stop()
						}
						break
					}
				}
			}()
		} else {
			// Unknown LLRP packet received, reset the connection
			log.Printf("unknown header: %v, reqlen: %v", header, reqLen)
			log.Printf("message: %v", buf)
			return
		}
	}
}

// server mode
func runServer() int {
	// Read virtual tags from a csv file
	log.Printf("loading virtual Tags from \"%v\"", *file)

	var tags llrp.Tags
	if _, err := os.Stat(*file); os.IsNotExist(err) {
		log.Printf("%v doesn't exist, couldn't load tags", *file)
	} else {
		err := binutil.Load(*file, &tags)
		if err != nil {
			log.Fatal(err)
		}
		log.Printf("%v tags loaded from %v", len(tags), *file)
	}

	// Listen for incoming connections.
	l, err := net.Listen("tcp", ip.String()+":"+strconv.Itoa(*port))
	if err != nil {
		panic(err)
	}

	// Close the listener when the application closes.
	defer l.Close()
	log.Printf("listening on %v:%v", ip, *port)

	// Channel for communicating virtual tag updates and signals
	signals := make(chan os.Signal)
	signal.Notify(signals, syscall.SIGINT, syscall.SIGTERM)

	// Handle websocket and static file hosting with gin
	go func() {
		r := gin.Default()
		r.Use(static.Serve("/", static.LocalFile(os.Getenv("GOPATH")+"/src/github.com/iomz/golemu/web", true)))
		r.GET("/ws", func(c *gin.Context) {
			handler := websocket.Handler(SockServer)
			handler.ServeHTTP(c.Writer, c.Request)
		})
		v1 := r.Group("api/v1")
		v1.POST("/tags", APIPostTag)
		v1.DELETE("/tags", APIDeleteTag)
		r.Run(":" + strconv.Itoa(*webPort))
	}()

	go func() {
		for {
			select {
			case cmd := <-tagManagerChannel:
				// Tag management
				res := []*llrp.Tag{}
				switch cmd.Action {
				case AddTags:
					for _, t := range cmd.Tags {
						if i := tags.GetIndexOf(t); i < 0 {
							tags = append(tags, t)
							res = append(res, t)
							// Write to file
							//writeTagsToCSV(*tags, *file)
							if isLLRPConnAlive {
								tagUpdated <- tags
							}
						}
					}
				case DeleteTags:
					for _, t := range cmd.Tags {
						if i := tags.GetIndexOf(t); i >= 0 {
							tags = append(tags[:i], tags[i+1:]...)
							res = append(res, t)
							// Write to file
							//writeTagsToCSV(tags, *file)
							if isLLRPConnAlive {
								tagUpdated <- tags
							}
						}
					}
				case RetrieveTags:
					res = tags
				}
				cmd.Tags = res
				tagManagerChannel <- cmd
			case signal := <-signals:
				// Handle SIGINT and SIGTERM.
				log.Fatalf("%v", signal)
			}
		}
	}()

	// Handle LLRP connection
	log.Println("starting LLRP connection...")
	for {
		// Accept an incoming connection.
		conn, err := l.Accept()
		if err != nil {
			log.Fatal(err)
		}
		log.Println("LLRP connection initiated")

		// Send back READER_EVENT_NOTIFICATION
		currentTime := uint64(time.Now().UTC().Nanosecond() / 1000)
		conn.Write(llrp.ReaderEventNotification(messageID, currentTime))
		log.Println("<<< READER_EVENT_NOTIFICATION")
		atomic.AddUint32(&messageID, 1)
		runtime.Gosched()
		time.Sleep(time.Millisecond)

		// Handle connections in a new goroutine.
		go handleRequest(conn, tags)
	}
}

// client mode
func runClient() int {
	// Establish a connection to the llrp client
	conn, err := net.Dial("tcp", ip.String()+":"+strconv.Itoa(*port))
	if err != nil {
		panic(err)
	}

	header := make([]byte, 2)
	length := make([]byte, 4)
	for {
		_, err = io.ReadFull(conn, header)
		if err != nil {
			log.Fatal(err)
		}
		//length := binary.BigEndian.Uint32(prefix)

		h := binary.BigEndian.Uint16(header)
		if h == llrp.ReaderEventNotificationHeader {
			_, err = io.ReadFull(conn, length)
			message := make([]byte, binary.BigEndian.Uint32(length)-6)
			_, err = io.ReadFull(conn, message)
			log.Println(">>> READER_EVENT_NOTIFICATION")
			conn.Write(llrp.SetReaderConfig(messageID))
		} else if h == llrp.KeepaliveHeader {
			_, err = io.ReadFull(conn, length)
			message := make([]byte, binary.BigEndian.Uint32(length)-6)
			_, err = io.ReadFull(conn, message)
			log.Println(">>> KEEP_ALIVE")
			conn.Write(llrp.KeepaliveAck())
		} else if h == llrp.SetReaderConfigResponseHeader {
			_, err = io.ReadFull(conn, length)
			message := make([]byte, binary.BigEndian.Uint32(length)-6)
			_, err = io.ReadFull(conn, message)
			log.Println(">>> SET_READER_CONFIG_RESPONSE")
		} else if h == llrp.ROAccessReportHeader {
			_, err = io.ReadFull(conn, length)
			l := binary.BigEndian.Uint32(length)
			message := make([]byte, l-6)
			_, err = io.ReadFull(conn, message)
			log.Println(">>> RO_ACCESS_REPORT")
			res := llrp.UnmarshalROAccessReportBody(message)
			log.Printf("%v events received", len(res))
		} else {
			log.Fatalf("Unknown header: %v", h)
		}
	}
}

func loadTagsForNextEventCycle(simulationFiles []string, eventCycle *int) (llrp.Tags, error) {
	tags := llrp.Tags{}
	if len(simulationFiles) <= *eventCycle {
		//log.Printf("Total iteration: %v, current event cycle: %v", len(simulationFiles), eventCycle)
		//return tags, fmt.Errorf("no more event cycle found in %s", *simulationDir)
		log.Printf("Resetting event cycle from %v to 0", *eventCycle)
		*eventCycle = 0
	}
	err := binutil.Load(simulationFiles[*eventCycle], &tags)
	if err != nil {
		return tags, err
	}
	return tags, nil
}

// simulator mode
func runSimulation() {
	// read simulation dir and prepare the file list
	dir, err := filepath.Abs(*simulationDir)
	if err != nil {
		log.Fatal(err)
	}
	files, err := ioutil.ReadDir(dir)
	if err != nil {
		log.Fatal(err)
	}
	simulationFiles := []string{}
	for _, f := range files {
		if strings.HasSuffix(f.Name(), ".gob") {
			simulationFiles = append(simulationFiles, path.Join(dir, f.Name()))
		}
	}
	if len(simulationFiles) == 0 {
		log.Fatalf("no event cycle file found in %s", *simulationDir)
	}

	// start listening for incoming connections.
	l, err := net.Listen("tcp", ip.String()+":"+strconv.Itoa(*port))
	if err != nil {
		panic(err)
	}
	defer l.Close()
	log.Printf("listening on %v:%v", ip, *port)

	// channel for communicating virtual tag updates and signals
	signals := make(chan os.Signal)
	signal.Notify(signals, syscall.SIGINT, syscall.SIGTERM)
	go func() {
		for {
			select {
			case signal := <-signals:
				log.Fatal(signal)
			}
		}
	}()

	// handle LLRP connection
	log.Println("waiting for LLRP connection...")
	conn, err := l.Accept()
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("initiated LLRP connection with %v", conn.RemoteAddr())

	// Send back READER_EVENT_NOTIFICATION
	currentTime := uint64(time.Now().UTC().Nanosecond() / 1000)
	conn.Write(llrp.ReaderEventNotification(messageID, currentTime))
	log.Println("<<< READER_EVENT_NOTIFICATION")
	messageID++

	// simulate event cycles from 0
	eventCycle := 0

	// initialize the first event cycle and roarTicker
	tags, err := loadTagsForNextEventCycle(simulationFiles, &eventCycle)
	if err != nil {
		log.Fatal(err)
	}
	eventCycle++
	trds := tags.BuildTagReportDataStack(*pdu)
	roarTicker := time.NewTicker(time.Duration(*reportInterval) * time.Millisecond)

	// prepare LLRP header storage
	header := make([]byte, 2)
	length := make([]byte, 4)
	receivedMessageID := make([]byte, 4)
	for {
		_, err = io.ReadFull(conn, header)
		if err != nil {
			log.Fatal(err)
		}
		_, err = io.ReadFull(conn, length)
		if err != nil {
			log.Fatal(err)
		}
		_, err = io.ReadFull(conn, receivedMessageID)
		if err != nil {
			log.Fatal(err)
		}
		var messageValue []byte
		if messageSize := binary.BigEndian.Uint32(length) - 10; messageSize != 0 {
			messageValue = make([]byte, binary.BigEndian.Uint32(length)-10)
			_, err = io.ReadFull(conn, messageValue)
			if err != nil {
				log.Fatal(err)
			}
		}

		h := binary.BigEndian.Uint16(header)
		switch h {
		case llrp.SetReaderConfigHeader:
			conn.Write(llrp.SetReaderConfigResponse())
			go func() {
				for {
					_, ok := <-roarTicker.C
					if !ok {
						log.Fatalln("roarTicker died")
					}
					log.Printf("<<< Simulated Event Cycle %v, %v tags, %v roars", eventCycle, len(tags), len(trds))
					for _, trd := range trds {
						roar := llrp.NewROAccessReport(trd.Data, messageID)
						err := roar.Send(conn)
						if err != nil {
							log.Fatal(err)
						}
						messageID++
					}
					// prepare for the next event cycle
					tags, err = loadTagsForNextEventCycle(simulationFiles, &eventCycle)
					eventCycle++
					if err != nil {
						log.Print(err)
						continue
					}
					trds = tags.BuildTagReportDataStack(*pdu)
				}
			}()
		default:
			// unknown LLRP packet received, reset the connection
			log.Printf(">>> header: %v", h)
		}
	}
}

func main() {
	app.Version(version)
	parse := kingpin.MustParse(app.Parse(os.Args[1:]))

	if *debug {
		//loggo.ConfigureLoggers("TRACE")
		gin.SetMode(gin.DebugMode)
	} else {
		//loggo.ConfigureLoggers("INFO")
		gin.SetMode(gin.ReleaseMode)
	}

	switch parse {
	case server.FullCommand():
		os.Exit(runServer())
	case client.FullCommand():
		os.Exit(runClient())
	case simulate.FullCommand():
		runSimulation()
	}
}

license: MIT

repository: portalgun-io/golemu

license_type: permissive

repo_name: portalgun-io/golemu

branch_name: refs/heads/master

extension: go


text:
@article{foster2020a,
  author    = {Simon Foster and
               Kangfeng Ye and
               Ana Cavalcanti and
               Jim Woodcock},
  title     = {Automated Verification of Reactive and Concurrent Programs by Calculation},
  journal   = {CoRR},
  volume    = {abs/2007.13529},
  year      = {2020},
  url       = {https://arxiv.org/abs/2007.13529},
  archivePrefix = {arXiv},
  eprint    = {2007.13529},
  timestamp = {Wed, 29 Jul 2020 15:36:39 +0200},
  biburl    = {https://dblp.org/rec/journals/corr/abs-2007-13529.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}

repository: RandallYe/academic-kickstart

repo_name: RandallYe/academic-kickstart

gha_license_id: MIT

extension: bib


text:
package main

import (
	"bufio"
	"fmt"
	"log"
	"net/http"
	"os"

	"github.com/braintree/manners"
	"github.com/gorilla/mux"
	"github.com/laurentlp/sudoku-solver/api/bundles/sudoku_bundle"
	"github.com/laurentlp/sudoku-solver/api/errors"
)

func main() {

	// load error messages
	if err := errors.LoadErrors("./api/errors/error_templates.yaml"); err != nil {
		panic(fmt.Errorf("Failed to read the error message file: %s", err))
	}

	// Controllers declaration
	sudoku := &sudokubundle.SudokuController{}

	// Router declaration and prefix
	r := mux.NewRouter()
	s := r.PathPrefix("/api/v1/").Subrouter()

	// Routes handling
	s.HandleFunc("/sudoku", sudoku.Solve).Methods("POST")

	// Create new Gracefulserver and bind listin address and handlers
	go func(r http.Handler) {
		manners.ListenAndServe(":8080", r)

		log.Println("The api is shutting down...")

	}(r)

	fmt.Println("Api started on localhost:8080")

	reader := bufio.NewReader(os.Stdin)
	fmt.Println("Press enter to stop server...")
	reader.ReadString('\n')

	fmt.Print("Server stopping...")
	manners.Close()
}

repository: laurentlp/sudoku-solver

repo_name: laurentlp/sudoku-solver

gha_language: Go


text:
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
if(NOT TARGET luna)
  include("${CMAKE_CURRENT_BINARY_DIR}/luna-exports.cmake")
endif()

repository: laifuming/luna

repo_name: laifuming/luna

extension: in


text:
# The set of languages for which implicit dependencies are needed:
SET(CMAKE_DEPENDS_LANGUAGES
  "C"
  )
# The set of files for implicit dependencies of each language:
SET(CMAKE_DEPENDS_CHECK_C
  "/home/user/brotli/c/dec/bit_reader.c" "/home/user/brotli/bin/CMakeFiles/brotlidec-static.dir/c/dec/bit_reader.c.o"
  "/home/user/brotli/c/dec/decode.c" "/home/user/brotli/bin/CMakeFiles/brotlidec-static.dir/c/dec/decode.c.o"
  "/home/user/brotli/c/dec/huffman.c" "/home/user/brotli/bin/CMakeFiles/brotlidec-static.dir/c/dec/huffman.c.o"
  "/home/user/brotli/c/dec/state.c" "/home/user/brotli/bin/CMakeFiles/brotlidec-static.dir/c/dec/state.c.o"
  )
SET(CMAKE_C_COMPILER_ID "GNU")

# Preprocessor definitions for this target.
SET(CMAKE_TARGET_DEFINITIONS
  "OS_LINUX"
  )

# Targets to which this target links.
SET(CMAKE_TARGET_LINKED_INFO_FILES
  "/home/user/brotli/bin/CMakeFiles/brotlicommon-static.dir/DependInfo.cmake"
  )

# The include file search paths:
SET(CMAKE_C_TARGET_INCLUDE_PATH
  "../c/include"
  )
SET(CMAKE_CXX_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
SET(CMAKE_Fortran_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
SET(CMAKE_ASM_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})

extension: cmake


text:
const items = document.querySelector(".todo__items");
const options = document.querySelector(".todo__options");

const todo = {
  action(event) {
    const target = event.target;
    if (target.classList.contains("todo__action")) {
      const action = target.dataset.todoAction;
      const todoItem = target.closest(".todo__item");
      if (action === "deleted" && todoItem.dataset.todoState === "deleted") {
        todoItem.remove();
      } else {
        todoItem.dataset.todoState = action;
      }
      this.save();
    } else if (target.classList.contains("todo__add")) {
      this.add();
      this.save();
    }
  },
  add() {
    const inputText = document.querySelector(".todo__text");
    if (inputText.disabled || !inputText.value.length) {
      return;
    }
    items.insertAdjacentHTML("beforeend", this.create(inputText.value));
    inputText.value = "";
  },
  create(text) {
    return `

        ${text}

    `;
  },
  init() {
    const fromStorage = localStorage.getItem("todo");
    if (fromStorage) {
      items.innerHTML = fromStorage;
    }
    options.addEventListener("change", this.update);
    document.addEventListener("click", this.action.bind(this));
  },
  update() {
    const option = options.value;
    items.dataset.todoOption = option;
    document.querySelector(".todo__text").disabled = option !== "active";
  },
  save() {
    localStorage.setItem("todo", items.innerHTML);
  }
};

todo.init();

gha_language: CSS

extension: js


text:
// Copyright 2018 ETH Zurich
//
// 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 pathsource

import (
	"context"

	"github.com/scionproto/scion/go/lib/addr"
	"github.com/scionproto/scion/go/lib/common"
	"github.com/scionproto/scion/go/lib/overlay"
	"github.com/scionproto/scion/go/lib/pathmgr"
	"github.com/scionproto/scion/go/lib/sciond"
	"github.com/scionproto/scion/go/lib/spath"
)

const (
	ErrNoResolver = "no resolver set"
	ErrNoPath     = "path not found"
	ErrInitPath   = "raw forwarding path offsets could not be initialized"
	ErrBadOverlay = "unable to extract next hop from sciond path entry"
)

// PathSource is a source of paths and overlay addresses for snet.
type PathSource interface {
	Get(ctx context.Context, src, dst addr.IA) (*overlay.OverlayAddr, *spath.Path, error)
}

type pathSource struct {
	resolver pathmgr.Resolver
}

// NewPathSource initializes a source of paths and overlay addresses for snet,
// with information obtained from resolver. Passing in a nil resolver is
// allowed, but the source will always return an error when invoked.
func NewPathSource(resolver pathmgr.Resolver) PathSource {
	return &pathSource{resolver: resolver}
}

func (ps *pathSource) Get(ctx context.Context,
	src, dst addr.IA) (*overlay.OverlayAddr, *spath.Path, error) {

	if ps.resolver == nil {
		return nil, nil, common.NewBasicError(ErrNoResolver, nil)
	}
	paths := ps.resolver.Query(ctx, src, dst, sciond.PathReqFlags{})
	sciondPath := paths.GetAppPath("")
	if sciondPath == nil {
		return nil, nil, common.NewBasicError(ErrNoPath, nil)
	}
	path := &spath.Path{Raw: sciondPath.Entry.Path.FwdPath}
	if err := path.InitOffsets(); err != nil {
		return nil, nil, common.NewBasicError(ErrInitPath, nil)
	}
	overlayAddr, err := sciondPath.Entry.HostInfo.Overlay()
	if err != nil {
		return nil, nil, common.NewBasicError(ErrBadOverlay, nil)
	}
	return overlayAddr, path, nil
}

repository: xzhuah/scion

repo_name: xzhuah/scion

branch_name: refs/heads/scionlab


text:
# - Find machSuite-kernel
# This module determines where the cereal include files.
#
# For these components the following variables are set:
#
#  MACHSUITE_FOUND                    - TRUE if all components are found.
#  MACHSUITE_INCLUDE_DIRS             - Full paths to all includes dirs.
#
# Example Usages:
#  FIND_PACKAGE(machSuite)
#
#=============================================================================

message(STATUS "Searching for machsuite-kernel")

# The HINTS option should only be used for values computed from the system.
SET(_MACHSUITE_HINTS
  ${CMAKE_SOURCE_DIR}/../machSuite-kernel
  )

FIND_PATH(MACHSUITE_INCLUDE_DIRS
  NAMES aes.h
  HINTS ${_MACHSUITE_HINTS}
  )

if(NOT("${MACHSUITE_INCLUDE_DIRS}" MATCHES "MACHSUITE_INCLUDE_DIRS-NOTFOUND"))
    set(MACHSUITE_FOUND TRUE)
endif(NOT("${MACHSUITE_INCLUDE_DIRS}" MATCHES "MACHSUITE_INCLUDE_DIRS-NOTFOUND"))

message(STATUS "machSuite-kernel include = ${MACHSUITE_INCLUDE_DIRS}")


text:
---
---

@article{mathur2022rot,
  title = {Watch and Match: Supercharging Imitation with Regularized Optimal Transport},
  author = {Haldar, Siddhant and Mathur, Vaibhav and Yarats, Pinto and Denis, Lerrel},
  journal = {Conference on Robot Learning (CoRL) (accepted)},
  year = {2022},
  arxiv = {2206.15469},
  selected = {true},
  url = {https://rot-robot.github.io/},
  website = {https://rot-robot.github.io/},
  pdf={rot.pdf},
  preview = {rot.gif},
  abstract = {Imitation learning holds tremendous promise in learning policies efficiently for complex decision making problems. Current state-of-the-art algorithms often use inverse reinforcement learning (IRL), where given a set of expert demonstrations, an agent alternatively infers a reward function and the associated optimal policy. However, such IRL approaches often require substantial online interactions for complex control problems. In this work, we present Regularized Optimal Transport (ROT), a new imitation learning algorithm that builds on recent advances in optimal transport based trajectory-matching. Our key technical insight is that adaptively combining trajectory-matching rewards with behavior cloning can significantly accelerate imitation even with only a few demonstrations. Our experiments on 20 visual control tasks across the DeepMind Control Suite, the OpenAI Robotics Suite, and the Meta-World Benchmark demonstrate an average of 7.8× faster imitation to reach 90% of expert performance compared to prior state-of-the-art methods. On real-world robotic manipulation, with just one demonstration and an hour of online training, ROT achieves an average success rate of 90.1% across 14 tasks.},
}

@article{mathur2017social,
  title = {Assessing the Effects of Social Familiarity and Stance Similarity in Interaction Dynamics},
  author = {Dey, Kuntal and Shrivastava, Ritvik and Kaushik, Saroj and Mathur, Vaibhav},
  journal = {COMPLEX NETWORKS},
  year = {2017},
  selected = {true},
  preview = {/assets/img/publication_preview/rot.png},
  url = {https://link.springer.com/chapter/10.1007/978-3-319-72150-7_68},
  html = {https://link.springer.com/chapter/10.1007/978-3-319-72150-7_68},
  pdf={social.pdf},
  preview = {social.png},
  abstract = {Homophily, the phenomenon of similar people getting connected to and being socially familiar with each other, is well-known on online social networks. Detection of user stance towards given topics, on online social networks, specifically Twitter, has emerged as a mainstream research topic. The current work provides insights into the impact of topic-specific stance similarity and social familiarity on social interaction dynamics. This is a novel and yet fundamental problem in social networks research, that has so far remained unexplored in the literature. Specifically, we address two key aspects. One, we investigate whether the smoothness (politeness) level of conversations between user pairs, relate with overall stance similarity (spanning across topics). Two, we examine the impact on interaction smoothness (politeness) with respect to social familiarity and topical stance-similarity. We propose a novel approach based on word embedding, to compare across users and across topics. We analyze the relationship between topical stance similarity, social familiarity and interaction politeness of users, with respect to specific familiarities between user pairs as well as social communities.}
}


text:
DEFAULT_PREFERENCE = "-1"

require ipkg.inc

PR = "r4"

SRC_URI += "file://fix-bug1393.patch;patch=1"

repository: metalsky/SamyGO

repo_name: metalsky/SamyGO

extension: bb


text:
@article{melymcb-0174,
 author = {Kuz, V.A.},
 document_type = {Article},
 doi = {10.1021/la00036a059},
 journal = {Langmuir},
 note = {cited By 4},
 number = {12},
 pages = {3722-3723},
 source = {Scopus},
 title = {A Vapor Pressure Equation for Droplets},
 url = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-0027851185&doi=10.1021%2fla00036a059&partnerID=40&md5=4a2c93e13920bc23d2e5e60f2aacf270},
 volume = {9},
 year = {1993}
}


text:
SUMMARY = "thorough real-mode memory tester"
DESCRIPTION = "Memtest86+ scans your RAM for errors.\n\
.\n\
This tester runs independently of any OS - it is run at computer\n\
boot-up, so that it can test *all* of your memory.  You may want to\n\
look at `memtester', which allows to test your memory within Linux,\n\
but this one won't be able to test your whole RAM.\n\
.\n\
It can output a list of bad RAM regions usable by the BadRAM kernel\n\
patch, so that you can still use your old RAM with one or two bad bits.\n\
.\n\
Memtest86+ is based on memtest86 3.0, and adds support for recent\n\
hardware, as well as a number of general-purpose improvements,\n\
including many patches to memtest86 available from various sources.\n\
.\n\
Both memtest86 and memtest86+ are being worked on in parallel."
HOMEPAGE = "http://www.memtest.org/"

inherit debian-package
PV = "5.01"

LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://config.c;endline=9;md5=54ecc8028fdd7aabfcabdc42992d2cc2"

# Do-not-need-stub-32-header-to-compile_debian.patch:
#	Fix compile error on x86_64:
#	| fatal error: gnu/stubs-32.h: No such file or directory
#	This is causing the compiler to attempt a 32-bit compile: x86_64-deby-linux-gcc -m32
#	automatically including "gnu/stubs-32.h".
SRC_URI_x86-64 = "\
	${DEBIAN_SRC_URI} \
	file://Do-not-need-stub-32-header-to-compile_debian.patch"

DEBIAN_PATCH_TYPE = "nopatch"

inherit autotools-brokensep

DEPENDS += "cdrkit-native"

do_compile() {
	oe_runmake memtest.bin memtest CC="${CC} " LD="${LD} -z max-page-size=0x1000 --hash-style=gnu" AS="${AS} -32"
	./makeiso.sh
}

# Base on debian/rules
do_install() {
	install -D -m 0644 memtest.bin ${D}/boot/memtest86+.bin
	install -D -m 0644 memtest ${D}${libdir}/memtest86+/memtest86+.elf
	install -D -m 0644 mt*.iso ${D}${libdir}/memtest86+/memtest86+.iso
	install -D -m 0644 -s memtest_shared ${D}/boot/memtest86+_multiboot.bin
	install -D -m 0755 debian/grub ${D}${sysconfdir}/grub.d/20_memtest86+

	#install the lintian override
	install -d ${D}${datadir}/lintian/overrides
	install -m644 debian/lintian-overrides \
		${D}${datadir}/lintian/overrides/memtest86+
}
FILES_${PN} += "/boot ${datadir}/lintian/overrides"

# memtest86+.elf is ELF 32-bit LSB executable \
# add an INSANE_SKIP bypass check "arch" to avoid the QA error.
INSANE_SKIP_${PN} = "arch"

# Avoid WARNING: 'memtest86+_multiboot.bin' has relocations in .text [textrel].
# The fix us usually to compile as position independent code using the pic
# compiler option, but the test.c files can't compile with -fPIC:
#	|test.c:352:25: error: inconsistent operand constraints in an 'asm'
#	|                       asm __volatile__ (
#	|                        ^
INSANE_SKIP_${PN} += "textrel"

PARALLEL_MAKE = ""

repository: manut/meta-combo

repo_name: manut/meta-combo

branch_name: refs/heads/morty

gha_language: BitBake


text:
/**
 * @file    libsedml-version.h
 * @brief   Define libSEDML version numbers for access from client software.
 *
 */

#ifndef LIBSEDML_VERSION_H
#define LIBSEDML_VERSION_H

#include <sedml/common/extern.h>

/**
 * LIBSEDML_DOTTED_VERSION:
 *
 * A version string of the form "1.2.3".
 */
#define LIBSEDML_DOTTED_VERSION	"@LIBSEDML_DOTTED_VERSION@"

/**
 * LIBSEDML_VERSION:
 *
 * The version as an integer: version 1.2.3 becomes 10203.  Since the major
 * number comes first, the overall number will always increase when a new
 * libSEDML is released, making it easy to use less-than and greater-than
 * comparisons when testing versions numbers.
 */
#define LIBSEDML_VERSION		@LIBSEDML_VERSION_NUMERIC@

/**
 * LIBSEDML_VERSION_STRING:
 *
 * The numeric version as a string: version 1.2.3 becomes "10203".
 */
#define LIBSEDML_VERSION_STRING	"@LIBSEDML_VERSION_NUMERIC@"

LIBSEDML_CPP_NAMESPACE_BEGIN
BEGIN_C_DECLS

/**
 * Returns the version number of this copy of libSEDML as an integer.
 *
 * @return the libSEDML version as an integer; version 1.2.3 becomes 10203.
 */
LIBSEDML_EXTERN
int
getLibSEDMLVersion();

/**
 * Returns the version number of this copy of libSEDML as a string.
 *
 * @return the libSEDML version as a string; version 1.2.3 becomes
 * "1.2.3".
 *
 * @see getLibSEDMLVersionString()
 */
LIBSEDML_EXTERN
const char*
getLibSEDMLDottedVersion();

/**
 * Returns the version number of this copy of libSEDML as a string without
 * periods.
 *
 * @return the libSEDML version as a string: version 1.2.3 becomes "10203".
 *
 * @see getLibSEDMLDottedVersion()
 */
LIBSEDML_EXTERN
const char*
getLibSEDMLVersionString();

END_C_DECLS
LIBSEDML_CPP_NAMESPACE_END

#endif  /* LIBSEDML_VERSION_H */

repository: fbergmann/libSEDML

repo_name: fbergmann/libSEDML


text:
require file.inc

DEPENDS_virtclass-native += "zlib-native"

PR = "${INCPR}.0"

SRC_URI = "ftp://ftp.fi.debian.org/pub/gentoo/distfiles/file-${PV}.tar.gz"

SRC_URI_append_virtclass-native = " file://native-fix.diff"

do_configure_prepend() {
	sed -i -e 's,$(top_builddir)/src/file,file,' ${S}/magic/Makefile.am
}

SRC_URI[md5sum] = "9e3503116f4269a1be70220ee2234b0e"
SRC_URI[sha256sum] = "6f5644d56cc603138533158076a6cb41cd33c33d27e5310cb76cb6576151ca67"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD


text:
package commands

import (
	"fmt"
	"github.com/coschain/cobra"
	"github.com/coschain/contentos-go/config"
	"io/ioutil"
	"os/exec"
	"path/filepath"
	"strings"
)

var ClearCmd = func() *cobra.Command {
	cmd := &cobra.Command{
		Use:   "clear",
		Short: "Clear all tester data",
		Run:   clear,
	}
	return cmd
}

func clear(cmd *cobra.Command, args []string) {

	cfg := config.DefaultNodeConfig
	cfg.Name = ClientIdentifier

	dir, err := ioutil.ReadDir(cfg.DataDir)
	if err != nil {
		fmt.Println(err)
		return
	}

	for _, fi := range dir {
		if strings.HasPrefix(strings.ToLower(fi.Name()), TesterClientIdentifier) ||
			fi.Name() == ClientIdentifier { //匹配文件
			subDirName := filepath.Join(cfg.DataDir, fi.Name())

			fmt.Println("rm -rf ", subDirName)
			c := exec.Command("rm", "-rf", subDirName)
			err := c.Run()
			if err != nil {
				fmt.Println(err)
				return
			}
		}
	}

}

repository: coschain/contentos-go

repo_name: coschain/contentos-go


text:
@inproceedings{fu2016srie,
  title={A weighted variational model for simultaneous reflectance and illumination estimation},
  author={Fu, Xueyang and Zeng, Delu and Huang, Yue and Zhang, Xiao-Ping and Ding, Xinghao},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  pages={2782--2790},
  year={2016}
}
@article{celik2011cvc,
  title={Contextual and variational contrast enhancement},
  author={Celik, Turgay and Tjahjadi, Tardi},
  journal={IEEE Transactions on Image Processing},
  volume={20},
  number={12},
  pages={3431--3441},
  year={2011},
  publisher={IEEE}
}
@inproceedings{lee2012ldr,
  title={Contrast enhancement based on layered difference representation},
  author={Lee, Chulwoo and Lee, Chul and Kim, Chang-Su},
  booktitle={Image Processing (ICIP), 2012 19th IEEE International Conference on},
  pages={965--968},
  year={2012},
  organization={IEEE}
}
@article{arici2009wahe,
  title={A histogram modification framework and its application for image contrast enhancement},
  author={Arici, Tarik and Dikbas, Salih and Altunbasak, Yucel},
  journal={IEEE Transactions on image processing},
  volume={18},
  number={9},
  pages={1921--1935},
  year={2009},
  publisher={IEEE}
}
@article{fu2016mf,
  title={A fusion-based enhancing method for weakly illuminated images},
  author={Fu, Xueyang and Zeng, Delu and Huang, Yue and Liao, Yinghao and Ding, Xinghao and Paisley, John},
  journal={Signal Processing},
  volume={129},
  pages={82--96},
  year={2016},
  publisher={Elsevier}
}

repository: apprisi/OpenCE

repo_name: apprisi/OpenCE


text:
file(REMOVE_RECURSE
  "CMakeFiles/LLVMMCDisassembler.dir/EDDisassembler.cpp.o"
  "CMakeFiles/LLVMMCDisassembler.dir/EDOperand.cpp.o"
  "CMakeFiles/LLVMMCDisassembler.dir/EDInst.cpp.o"
  "CMakeFiles/LLVMMCDisassembler.dir/EDToken.cpp.o"
  "../../libLLVMMCDisassembler.pdb"
  "../../libLLVMMCDisassembler.a"
)

# Per-language clean rules from dependency scanning.
foreach(lang CXX)
  include(CMakeFiles/LLVMMCDisassembler.dir/cmake_clean_${lang}.cmake OPTIONAL)
endforeach()

repository: xcgxg/Trident

repo_name: xcgxg/Trident


text:
SECTION = "devel/chicken"
DESCRIPTION = "A very small and simple helper to create usage messages"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://usage.meta;md5=286b5f7c463236450d0a9b4a740fbe00"

SRC_URI = "http://code.call-cc.org/egg-tarballs/4/usage/usage-${PV}.tar.gz"

SRC_URI[md5sum] = "a3b9758815d67c1829dc80c457723134"
SRC_URI[sha256sum] = "0ca77d94b7836085e9a900c764d440a2e84d1be3dae8313da56f8ca667b139a4"

S = "${WORKDIR}/usage-${PV}"

inherit chicken_install

BBCLASSEXTEND = "cross crosssdk nativesdk"

repository: OSSystems/meta-chicken

repo_name: OSSystems/meta-chicken


text:
require gdb.inc
LICENSE = "GPLv2"

PR = "r4"

SRC_URI[md5sum] = "812de9e756d53c749ea5516d9ffa5905"
SRC_URI[sha256sum] = "c06bf9715436b3a28c189163aa5ca42b46af8286659827f033eaaf7d8b1fc342"


text:
%%% -*-BibTeX-*-
@inproceedings{Junae2008SVM,
   author    = {Junae Kim and Chunhua Shen and Lei Wang},
   title     = {Learning Cascaded Reduced-set {SVM}s Using Linear Programming},
   booktitle = {International Conference on Digital Image Computing - Techniques and Applications (DICTA'08)},
   year      = {2008},
   pages     = {619--626},
   volume    = {},
   address   = {Canberra, Australia},
   month     = {December},
   publisher = {IEEE Press},
   url       = {},
   pdf       = {},
   venue     = {DICTA},
}


text:
require cacao.inc

PR = "r1"

SRC_URI = "http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.bz2 \
	   file://vfp-compat.patch;patch=1 \
       file://cacao-disable-stackbase-check.patch;patch=1 \
     "


text:
@preprint{blanchard-2022-improductivite,
author = {Enka Blanchard and Zacharie Boubli},
title = {Recherche et dogmatisme : de l'improductivité du productivisme},
}

repository: koliaza/academic-kickstart

repo_name: koliaza/academic-kickstart


text:
@mastersthesis{bigelow2012thesis,
  title={Driving Genetics With Experimental Visualization},
  author={Bigelow, Alex},
  school={University of Utah},
  year={2012}
}

branch_name: refs/heads/main


text:
PR = "r1"

CROSSTOOL_PATCH_URL = "http://www.kegel.com/crosstool/crosstool-0.43/patches/binutils-2.16.1/"
SRC_URI = \
    "${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \
     ${CROSSTOOL_PATCH_URL}bfd-hash-tweak.patch;patch=1 \
     ${CROSSTOOL_PATCH_URL}binutils-2.15-psignal.patch;patch=1 \
     ${CROSSTOOL_PATCH_URL}binutils-skip-comments.patch;patch=1 \
     ${CROSSTOOL_PATCH_URL}callahan.patch;patch=1 \
     ${CROSSTOOL_PATCH_URL}cross-gprof.patch;patch=1 \
     ${CROSSTOOL_PATCH_URL}stabs-tweak.patch;patch=1 \
     file://binutils-2.16.91.0.6-objcopy-rename-errorcode.patch;patch=1"

require binutils.inc


text:
@inproceedings{MR1899773,
 author = {Martín, Francisco and Morales, Santiago},
 booktitle = {Proceedings of the Meeting of Andalusian Mathematicians,
Vol. II (Spanish) (Sevilla, 2000)},
 mrclass = {53A10},
 mrnumber = {1899773},
 pages = {649--653},
 publisher = {Univ. Sevilla Secr. Publ., Seville},
 series = {Colecc. Abierta},
 title = {Construction of a complete bounded minimal annulus in $\Bbb
R^3$},
 volume = {52},
 year = {2001}
}

repository: torralbofco/geometric-analysis-fork

repo_name: torralbofco/geometric-analysis-fork


text:
@article{si:reiter:hillygus:pa12,
 author = {Yajuan Si and Jerome P. Reiter and D. Sunshine Hillygus},
 date-added = {2015-01-06 21:07:44 +0000},
 date-modified = {2015-01-06 21:12:59 +0000},
 journal = {Political Analysis},
 title = {Semi-parametric selection models for potentially non-ignorable attrition in panel study with refreshment sample},
 year = {2014}
}

repository: yajuansi-sophie/academic-kickstart

repo_name: yajuansi-sophie/academic-kickstart


text:
// Copyright 2023 Google LLC
//
// 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 main

import (
	"context"
	"os"
	"testing"

	pb "github.com/GoogleCloudPlatform/microservices-demo/src/productcatalogservice/genproto"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"
)

var (
	mockProductCatalog *productCatalog
)

func TestMain(m *testing.M) {
	mockProductCatalog = &productCatalog{
		catalog: pb.ListProductsResponse{
			Products: []*pb.Product{},
		},
	}

	mockProductCatalog.catalog.Products = append(mockProductCatalog.catalog.Products, &pb.Product{
		Id:   "abc001",
		Name: "Product Alpha One",
	})
	mockProductCatalog.catalog.Products = append(mockProductCatalog.catalog.Products, &pb.Product{
		Id:   "abc002",
		Name: "Product Delta",
	})
	mockProductCatalog.catalog.Products = append(mockProductCatalog.catalog.Products, &pb.Product{
		Id:   "abc003",
		Name: "Product Alpha Two",
	})
	mockProductCatalog.catalog.Products = append(mockProductCatalog.catalog.Products, &pb.Product{
		Id:   "abc004",
		Name: "Product Gamma",
	})

	os.Exit(m.Run())
}

func TestGetProductExists(t *testing.T) {
	product, err := mockProductCatalog.GetProduct(context.Background(),
		&pb.GetProductRequest{Id: "abc003"},
	)
	if err != nil {
		t.Fatal(err)
	}
	if got, want := product.Name, "Product Alpha Two"; got != want {
		t.Errorf("got %s, want %s", got, want)
	}
}

func TestGetProductNotFound(t *testing.T) {
	_, err := mockProductCatalog.GetProduct(context.Background(),
		&pb.GetProductRequest{Id: "abc005"},
	)
	if got, want := status.Code(err), codes.NotFound; got != want {
		t.Errorf("got %s, want %s", got, want)
	}
}

func TestListProducts(t *testing.T) {
	products, err := mockProductCatalog.ListProducts(context.Background(),
		&pb.Empty{},
	)
	if err != nil {
		t.Fatal(err)
	}
	if got, want := len(products.Products), 4; got != want {
		t.Errorf("got %d, want %d", got, want)
	}
}

func TestSearchProducts(t *testing.T) {
	products, err := mockProductCatalog.SearchProducts(context.Background(),
		&pb.SearchProductsRequest{Query: "alpha"},
	)
	if err != nil {
		t.Fatal(err)
	}
	if got, want := len(products.Results), 2; got != want {
		t.Errorf("got %d, want %d", got, want)
	}
}

repository: GoogleCloudPlatform/microservices-demo

repo_name: GoogleCloudPlatform/microservices-demo

gha_language: Python


text:
DESCRIPTION = "GPE contacts manager"
SECTION = "gpe"
LICENSE = "GPL"
DEPENDS = "libcontactsdb libgpewidget libgpepimc libdisplaymigration libgpevtype dbus"
RDEPENDS_${PN} = "gpe-icons"
SRCREV = "9312"
PV = "0.47+svnr${SRCPV}"
PR = "r3"

inherit autotools gpe

SRC_URI = "${GPE_SVN}"
SRC_URI += "file://handle-import-categories.patch"

S = "${WORKDIR}/${PN}"

FILES_${PN} += " ${datadir}/gpe ${datadir}/gpe-contacts"

DEFAULT_PREFERENCE = "-1"


text:
require ${COREBASE}/meta/recipes-support/shared-mime-info/shared-mime-info.inc

inherit debian-package
require recipes-debian/sources/shared-mime-info.inc
FILESPATH_append = ":${COREBASE}/meta/recipes-support/shared-mime-info/shared-mime-info"

SRC_URI += "file://parallelmake.patch \
	    file://install-data-hook.patch"

repository: meta-debian/meta-debian

repo_name: meta-debian/meta-debian

branch_name: refs/heads/warrior


text:
@article{whegang_analysis_2010,
	title = {Analysis of an ordinal outcome in a multicentric randomized controlled trial: application to a 3- arm anti- malarial drug trial in Cameroon},
	volume = {10},
	issn = {1471-2288},
	url = {http://www.biomedcentral.com/1471-2288/10/58},
	doi = {10.1186/1471-2288-10-58},
	shorttitle = {Analysis of an ordinal outcome in a multicentric randomized controlled trial},
	abstract = {Abstract: "{BACKGROUND}: Malaria remains a burden in Sub-Saharan Countries. The strategy proposed by the World Health Organization ({WHO}) is to systematically compare the therapeutic efficacy of antimalarial drugs using as primary outcome for efficacy, a four-category ordered criterion. The objective of the present work was to analyze the treatment effects on this primary outcome taking into account both a center-effect and individual covariates. A three-arm, three-centre trial of Amodiaquine ({AQ}), sulfadoxine-pyrimethamine ({SP}) and their combination ({AQ} + {SP}), conducted by {OCEAC}-{IRD} in 2003, in 538 children with uncomplicated Plasmodium falciparum malaria, is used as an illustration. {METHODS}: Analyses were based on ordinal regression methods, assuming an underlying continuous latent variable, using either the proportional odds ({PO}) or the proportional hazards ({PH}) models. Different algorithms, corresponding to both frequentist- and bayesian-approaches, were implemented using the freely available softwares R and Winbugs, respectively. The performances of the different methods were evaluated on a simulated data set, and then they were applied on the trial data set. {RESULTS}: Good coverage probability and type-1 error for the treatment effect were achieved. When the methods were applied on the trial data set, results highlighted a significance decrease of {SP} efficacy when compared to {AQ} ({PO}, odds ratio [{OR}] 0.14, 95% confidence interval [{CI}] 0.04-0.57; hazard ratio [{HR}] 0.605, 95% {CI} 0.42-0.82), and an equal effectiveness between {AQ} + {SP} and {AQ} ({PO}, odds ratio [{OR}] 1.70, 95% confidence interval [{CI}] 0.25-11.44; hazard ratio [{HR}] 1.40, 95% {CI} 0.88-2.18). The body temperature was significantly related to the responses. The patient weights were marginally associated to the clinical response. {CONCLUSION}: The proposed analyses, based on usual statistical packages, appeared adapted to take into account the full information contained in the four categorical outcome in malaria trials, as defined by {WHO}, with the possibility of adjusting on individual and global covariates."},
	pages = {58},
	number = {1},
	journaltitle = {{BMC} Medical Research Methodology},
	author = {Whegang, Solange and Basco, Leonardo and Gwet, Henri and Thalabard, Jean-Christophe},
	urldate = {2010-10-25},
	date = {2010}
}

repository: pmean/build-website

repo_name: pmean/build-website


text:
DESCRIPTION = "Interactive console program which monitors and displays squid logs"
SECTION = "console/network"
PRIORITY = "optional"
LICENSE = "GPL"
DEPENDS = "ncurses"
RDEPENDS_${PN} = "squid"
PR = "r2"

S = "${WORKDIR}/squidview-${PV}"

SRC_URI = "http://www.rillion.net/squidview/squidview-${PV}.tar.gz"

inherit autotools

SRC_URI[md5sum] = "4809dcf89e504d4039ed01c9f61c68d5"
SRC_URI[sha256sum] = "3da4fccc40c7c8ad51dba5bc7ac29a3a53905d5f2de0761353214d7e359d4bfd"


text:
@string{sigopsosr = "SIGOPS Operating Systems Review"}

@article{birrell+lns:grapevine:1981,
 author = {Birrell, Andrew D. and Levin, Roy and Needham, Roger M. and Schroeder, Michael D.},
 title = {Grapevine: An exercise in distributed computing},
 journal = sigopsosr,
 volume = {15},
 number = {5},
 year = {1981},
 issn = {0163-5980},
 pages = {178--179},
 doi = {http://doi.acm.org/10.1145/1067627.806606},
 publisher = {ACM},
 address = {New York, NY, USA},
 note = {Available at \url{http://portal.acm.org/citation.cfm?id=1067627.806606}}
 }

@article{babaouglu:partition-aware-network-applications:os-review1998,
 author = { Babao\u{g}lu, \"{O}zalp and Davoli, Renzo and Montresor, Alberto and Segala, Roberto},
 title = {System support for partition-aware network applications},
 journal = sigopsosr,
 volume = {32},
 number = {1},
 year = {1998},
 issn = {0163-5980},
 pages = {41--56},
 doi = {http://doi.acm.org/10.1145/280559.280567},
 publisher = {ACM},
 address = {New York, NY, USA},
 }

@article{anderson+amv:dataseries:2009,
    author = {Eric Anderson and Martin Arlitt and Charles B. Morrey III and Alistair Veitch},
    title = "{DataSeries: An Efficient, Flexible Data Format for Structured Serial Data}",
    journal = {Operating Systems Review},
    volume = {43},
    number = {1},
    year = {2009},
    pages = {70--75},
}

@article{weatherspoon:gossiping-over-storage-systems-is-practical:os-review2007,
 author = {Weatherspoon, Hakim and Miranda, Hugo and Iwanicki, Konrad and Ghodsi, Ali and Busnel, Yann},
 title = {Gossiping over storage systems is practical},
 journal = sigopsosr,
 volume = {41},
 number = {5},
 year = {2007},
 issn = {0163-5980},
 pages = {75--81},
 doi = {http://doi.acm.org/10.1145/1317379.1317391},
 publisher = {ACM},
 address = {New York, NY, USA},
 abstract = {Gossip-based mechanisms are touted for their simplicity, limited resource usage, robustness to failures, and tunable system behavior. These qualities make gossiping an ideal mechanism for storage systems that are responsible for maintaining and updating data in a mist of failures and limited resources (e.g., intermittent network connectivity, limited bandwidth, constrained communication range, or limited battery power). We focus on persistent storage systems that, unlike mere caches, are responsible for both the durability and the consistency of data. Examples of such systems may be encountered in many different environments, in particular: wide-area networks (constrained by limited bandwidth), wireless sensor networks (characterized by limited resources), and mobile ad hoc networks (suffering from intermittent connectivity). In this paper, we demonstrate the qualities of gossiping in these three respective environments.}
}

repository: dataseries/Lintel

repo_name: dataseries/Lintel

gha_license_id: NOASSERTION

gha_language: Perl


text:
@inproceedings{Holz:2012:IUI:2207676.2207745,
 acmid = {2207745},
 address = {New York, NY, USA},
 author = {Holz, Christian and Grossman, Tovi and Fitzmaurice, George and Agur, Anne},
 booktitle = {Proceedings of the SIGCHI Conference on Human Factors in Computing Systems},
 doi = {10.1145/2207676.2207745},
 isbn = {978-1-4503-1015-4},
 keywords = {augmented humans, disappearing mobile devices, implantables, implanted devices, implanted interfaces, mobile devices, wearable computing, wireless power},
 location = {Austin, Texas, USA},
 numpages = {10},
 pages = {503--512},
 publisher = {ACM},
 series = {CHI '12},
 title = {Implanted User Interfaces},
 url = {http://doi.acm.org/10.1145/2207676.2207745},
 year = {2012}
}

repository: jmatejka/group-website

repo_name: jmatejka/group-website


text:
require qt4e-base-image.bb

IMAGE_INSTALL += "\
        qt4-embedded-demos qt4-embedded-examples qt-demo-init \
	qt4-embedded-assistant \
	qwt-e-examples \
"


text:
@inproceedings {type-your-key-here,
  author = "Tiago Massoni and Rohit Gheyi and Paulo Borba",
  booktitle = "3rd International Workshop on Critical Systems Development with UML, UML Conference",
  title = "A UML Class Diagram Analyzer",
  year = "2004",
  pages = "100-114"
}

repository: pauloborba/academic-kickstart

repo_name: pauloborba/academic-kickstart


text:
@article{barranco2012vector,
  title={Vector disparity sensor with vergence control for active vision systems},
  author={Barranco, Francisco and Diaz, Javier and Gibaldi, Agostino and Sabatini, Silvio P and Ros, Eduardo},
  journal={Sensors},
  volume={12},
  number={2},
  pages={1771--1799},
  year={2012},
  publisher={Molecular Diversity Preservation International}
}

repository: Nico-Cubero/starter-research-group

repo_name: Nico-Cubero/starter-research-group


text:
@Article{morey_peer_2016,
  title = {The {{Peer Reviewers Openness Initiative}}: Incentivizing Open Research Practices through Peer Review},
  volume = {3},
  rights = {. © 2016 The Authors. Published by the Royal Society under the terms of the Creative Commons Attribution License http://creativecommons.org/licenses/by/4.0/, which permits unrestricted use, provided the original author and source are credited.},
  issn = {2054-5703},
  doi = {10.1098/rsos.150547},
  shorttitle = {The {{Peer Reviewers9 Openness Initiative}}},
  timestamp = {2017-07-27T19:08:26Z},
  langid = {english},
  number = {1},
  journaltitle = {Royal Society Open Science},
  author = {Richard D. Morey and Christopher D. Chambers and Peter J. Etchells and Christine R. Harris and Rink Hoekstra and Dani{\"e}l Lakens and Stephan Lewandowsky and Candice Coker Morey and Daniel P. Newman and Felix D. Sch{\"o}nbrodt and Wolf Vanpaemel and Eric-Jan Wagenmakers and Rolf A. Zwaan},
  urldate = {2017-07-27},
  date = {2016-01-01},
  pages = {150547},
  note = {00000},
}
@Article{nosek_promoting_2015,
  title = {Promoting an Open Research Culture},
  volume = {348},
  rights = {Copyright © 2015, American Association for the Advancement of Science},
  issn = {0036-8075, 1095-9203},
  doi = {10.1126/science.aab2374},
  timestamp = {2017-07-27T19:04:33Z},
  langid = {english},
  number = {6242},
  journaltitle = {Science},
  author = {Brian A. Nosek and G. Alter and G. C. Banks and D. Borsboom and S. D. Bowman and S. J. Breckler and S. Buck and C. D. Chambers and G. Chin and G. Christensen and M. Contestabile and A. Dafoe and E. Eich and J. Freese and R. Glennerster and D. Goroff and D. P. Green and B. Hesse and M. Humphreys and J. Ishiyama and D. Karlan and A. Kraut and A. Lupia and P. Mabry and T. Madon and N. Malhotra and E. Mayo-Wilson and M. McNutt and E. Miguel and E. Levy Paluck and U. Simonsohn and C. Soderberg and B. A. Spellman and J. Turitto and G. VandenBos and S. Vazire and E. J. Wagenmakers and R. Wilson and T. Yarkoni},
  urldate = {2017-07-27},
  date = {2015-06-26},
  pages = {1422--1425},
  note = {00279},
  eprinttype = {pmid},
  eprint = {26113702},
}
@article{VuorreCuratingResearchAssets2018,
  title = {Curating {{Research Assets}}: {{A Tutorial}} on the {{Git Version Control System}}},
  volume = {1},
  copyright = {All rights reserved},
  issn = {2515-2459},
  shorttitle = {Curating {{Research Assets}}},
  language = {en},
  number = {2},
  journal = {Advances in Methods and Practices in Psychological Science},
  doi = {10.1177/2515245918754826},
  author = {Vuorre, Matti and Curley, James P.},
  month = jun,
  year = {2018},
  pages = {219-236}
}
@Article{Munafomanifestoreproduciblescience2017,
  langid = {english},
  title = {A Manifesto for Reproducible Science},
  volume = {1},
  rights = {© 2017 Macmillan Publishers Limited, part of Springer Nature. All rights reserved.},
  issn = {2397-3374},
  doi = {10.1038/s41562-016-0021},
  journaltitle = {Nature Human Behaviour},
  author = {Marcus R. Munaf{\a`o} and Brian A. Nosek and Dorothy V. M. Bishop and Katherine S. Button and Christopher D. Chambers and Nathalie Percie {du Sert} and Uri Simonsohn and Eric-Jan Wagenmakers and Jennifer J. Ware and John P. A. Ioannidis},
  urldate = {2017-05-29},
  date = {2017-01-10},
  pages = {0021},
  note = {00036},
}
@Article{gorgolewski_brain_2016,
  langid = {english},
  title = {The Brain Imaging Data Structure, a Format for Organizing and Describing Outputs of Neuroimaging Experiments},
  volume = {3},
  rights = {2016 Nature Publishing Group},
  issn = {2052-4463},
  doi = {10.1038/sdata.2016.44},
  journaltitle = {Scientific Data},
  author = {Krzysztof J. Gorgolewski and Tibor Auer and Vince D. Calhoun and R. Cameron Craddock and Samir Das and Eugene P. Duff and Guillaume Flandin and Satrajit S. Ghosh and Tristan Glatard and Yaroslav O. Halchenko and Daniel A. Handwerker and Michael Hanke and David Keator and Xiangrui Li and Zachary Michael and Camille Maumet and B. Nolan Nichols and Thomas E. Nichols and John Pellman and Jean-Baptiste Poline and Ariel Rokem and Gunnar Schaefer and Vanessa Sochat and William Triplett and Jessica A. Turner and Ga{\"e}l Varoquaux and Russell A. Poldrack},
  urldate = {2017-12-13},
  date = {2016-06-21},
  pages = {160044},
}
@Article{yee_why_2017,
  title = {Why {{You Should Become}} a {{UseR}}: {{A Brief Introduction}} to {{R}}},
  volume = {30},
  url = {https://www.psychologicalscience.org/observer/why-you-should-become-a-user-a-brief-introduction-to-r},
  shorttitle = {Why {{You Should Become}} a {{UseR}}},
  number = {3},
  journaltitle = {APS Observer},
  author = {Sara J. Weston Yee and {Debbie}},
  urldate = {2017-12-13},
  date = {2017-02-28},
}
@Software{RStudioTeamRStudioIntegratedDevelopment2016,
  location = {{Boston, MA}},
  title = {{{RStudio}}: {{Integrated Development Environment}} for {{R}}},
  url = {http://www.rstudio.com/},
  publisher = {{RStudio, Inc.}},
  author = {{RStudio Team}},
  date = {2016},
}
@Book{WickhamPackagesOrganizeTest2015,
  langid = {english},
  title = {R {{Packages}}: {{Organize}}, {{Test}}, {{Document}}, and {{Share Your Code}}},
  isbn = {978-1-4919-1054-2},
  url = {http://r-pkgs.had.co.nz/},
  shorttitle = {R {{Packages}}},
  pagetotal = {275},
  publisher = {{"O'Reilly Media, Inc."}},
  date = {2015-03-26},
  keywords = {Computers / Data Processing,Computers / Mathematical & Statistical Software,Computers / Programming Languages / General},
  author = {Hadley Wickham},
  eprinttype = {googlebooks},
}
@Article{LindsaySharingDataMaterials2017,
  title = {Sharing {{Data}} and {{Materials}} in {{Psychological Science}}},
  volume = {28},
  issn = {0956-7976},
  language = {en},
  number = {6},
  journal = {Psychological Science},
  doi = {10.1177/0956797617704015},
  author = {D. Stephen Lindsay},
  month = {jun},
  year = {2017},
  pages = {699-702},
}

@Article{HoutkoopDataSharingPsychology2018,
  title = {Data {{Sharing}} in {{Psychology}}: {{A Survey}} on {{Barriers}} and {{Preconditions}}},
  volume = {1},
  issn = {2515-2459},
  shorttitle = {Data {{Sharing}} in {{Psychology}}},
  language = {en},
  number = {1},
  journal = {Advances in Methods and Practices in Psychological Science},
  doi = {10.1177/2515245917751886},
  author = {Bobby Lee Houtkoop and Chris Chambers and Malcolm Macleod and Dorothy V. M. Bishop and Thomas E. Nichols and Eric-Jan Wagenmakers},
  month = {mar},
  year = {2018},
  pages = {70-85},
}
@Article{Wichertspooravailabilitypsychological2006,
  title = {The Poor Availability of Psychological Research Data for Reanalysis},
  volume = {61},
  copyright = {(c) 2016 APA, all rights reserved},
  issn = {1935-990X 0003-066X},
  language = {English},
  number = {7},
  journal = {American Psychologist},
  doi = {10.1037/0003-066X.61.7.726},
  author = {Jelte M. Wicherts and Denny Borsboom and Judith Kats and Dylan Molenaar},
  year = {2006},
  keywords = {Compliance,Data Collection,Data sharing,Experimentation,Professional Ethics,reproducibility,Scientific Communication},
  pages = {726-728},
}

@Article{VanpaemelAreWeWasting2015,
  title = {Are {{We Wasting}} a {{Good Crisis}}? {{The Availability}} of {{Psychological Research Data}} after the {{Storm}}},
  volume = {1},
  copyright = {Authors who publish with this journal agree to the following terms:    Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a  Creative Commons Attribution License  that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.  Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.  Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See  The Effect of Open Access ).  All third-party images reproduced on this journal are shared under Educational Fair Use. For more information on  Educational Fair Use , please see  this useful checklist prepared by Columbia University Libraries .   All copyright  of third-party content posted here for research purposes belongs to its original owners.  Unless otherwise stated all references to characters and comic art presented on this journal are \textcopyright, \textregistered{} or \texttrademark{} of their respective owners. No challenge to any owner's rights is intended or should be inferred.},
  issn = {2474-7394},
  shorttitle = {Are {{We Wasting}} a {{Good Crisis}}?},
  language = {eng},
  number = {1},
  journal = {Collabra: Psychology},
  doi = {10.1525/collabra.13},
  author = {Wolf Vanpaemel and Maarten Vermorgen and Leen Deriemaecker and Gert Storms},
  month = {oct},
  year = {2015},
  pages = {Art. 3},
}
@Article{HardwickeDataavailabilityreusability2018,
  title = {Data Availability, Reusability, and Analytic Reproducibility: Evaluating the Impact of a Mandatory Open Data Policy at the Journal {{Cognition}}},
  volume = {5},
  shorttitle = {Data Availability, Reusability, and Analytic Reproducibility},
  number = {8},
  journal = {Royal Society Open Science},
  doi = {10.1098/rsos.180448},
  author = {Tom E. Hardwicke and Maya B. Mathur and Kyle MacDonald and Gustav Nilsonne and George C. Banks and Mallory C. Kidwell and Alicia {Hofelich Mohr} and Elizabeth Clayton and Erica J. Yoon and Michael {Henry Tessler} and Richie L. Lenne and Sara Altman and Bria Long and Michael C. Frank},
  year = {2018},
  pages = {180448},
}
@Article{KleinPracticalGuideTransparency2018,
  title = {A {{Practical Guide}} for {{Transparency}} in {{Psychological Science}}},
  volume = {4},
  copyright = {Authors who publish with this journal agree to the following terms:    Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a  Creative Commons Attribution License  that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.  Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.  Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See  The Effect of Open Access ).  All third-party images reproduced on this journal are shared under Educational Fair Use. For more information on  Educational Fair Use , please see  this useful checklist prepared by Columbia University Libraries .   All copyright  of third-party content posted here for research purposes belongs to its original owners.  Unless otherwise stated all references to characters and comic art presented on this journal are \textcopyright, \textregistered{} or \texttrademark{} of their respective owners. No challenge to any owner's rights is intended or should be inferred.},
  issn = {2474-7394},
  language = {eng},
  number = {1},
  journal = {Collabra: Psychology},
  doi = {10.1525/collabra.158},
  author = {Olivier Klein and Tom E. Hardwicke and Frederik Aust and Johannes Breuer and Henrik Danielsson and Alicia Hofelich Mohr and Hans Ijzerman and Gustav Nilsonne and Wolf Vanpaemel and Michael C. Frank},
  month = {jun},
  year = {2018},
  pages = {20},
}
@Article{WilkinsonFAIRGuidingPrinciples2016,
  title = {The {{FAIR Guiding Principles}} for Scientific Data Management and Stewardship},
  volume = {3},
  copyright = {2016 Nature Publishing Group},
  issn = {2052-4463},
  language = {en},
  journal = {Scientific Data},
  doi = {10.1038/sdata.2016.18},
  author = {Mark D. Wilkinson and Michel Dumontier and IJsbrand Jan Aalbersberg and Gabrielle Appleton and Myles Axton and Arie Baak and Niklas Blomberg and Jan-Willem Boiten and Luiz Bonino {da Silva Santos} and Philip E. Bourne and Jildau Bouwman and Anthony J. Brookes and Tim Clark and Merc{\a`e} Crosas and Ingrid Dillo and Olivier Dumon and Scott Edmunds and Chris T. Evelo and Richard Finkers and Alejandra Gonzalez-Beltran and Alasdair J. G. Gray and Paul Groth and Carole Goble and Jeffrey S. Grethe and Jaap Heringa and Peter A. C. {'t Hoen} and Rob Hooft and Tobias Kuhn and Ruben Kok and Joost Kok and Scott J. Lusher and Maryann E. Martone and Albert Mons and Abel L. Packer and Bengt Persson and Philippe Rocca-Serra and Marco Roos and Rene {van Schaik} and Susanna-Assunta Sansone and Erik Schultes and Thierry Sengstag and Ted Slater and George Strawn and Morris A. Swertz and Mark Thompson and Johan {van der Lei} and Erik {van Mulligen} and Jan Velterop and Andra Waagmeester and Peter Wittenburg and Katherine Wolstencroft and Jun Zhao and Barend Mons},
  month = {mar},
  year = {2016},
  pages = {160018},
}
@Article{Rouderwhatwhyhow2016,
  title = {The What, Why, and How of Born-Open Data},
  volume = {48},
  issn = {1554-3528},
  language = {en},
  number = {3},
  journal = {Behavior Research Methods},
  doi = {10.3758/s13428-015-0630-z},
  author = {Jeffrey N. Rouder},
  month = {sep},
  year = {2016},
  keywords = {reproducibility},
  pages = {1062-1069},
}

@Article{MartoneDatasharingpsychology2018,
  title = {Data Sharing in Psychology},
  volume = {73},
  issn = {1935-990X(Electronic),0003-066X(Print)},
  number = {2},
  journal = {American Psychologist},
  doi = {10.1037/amp0000242},
  author = {Maryann E. Martone and Alexander Garcia-Castro and Gary R. VandenBos},
  year = {2018},
  keywords = {Attitudes,Best Practices,Costs and Cost Analysis,Data Sets,Data Sharing,Databases,Experimental Laboratories,Open Data,Psychology},
  pages = {111-125},
}

@Article{RouderMinimizingMistakesPsychological2019,
  title = {Minimizing {{Mistakes}} in {{Psychological Science}}},
  volume = {2},
  issn = {2515-2459},
  language = {en},
  number = {1},
  journal = {Advances in Methods and Practices in Psychological Science},
  doi = {10.1177/2515245918801915},
  author = {Jeffrey N. Rouder and Julia M. Haaf and Hope K. Snyder},
  month = {mar},
  year = {2019},
  pages = {3-11},
}
@Article{SilberzahnManyAnalystsOne2018,
  title = {Many {{Analysts}}, {{One Data Set}}: {{Making Transparent How Variations}} in {{Analytic Choices Affect Results}}},
  volume = {1},
  issn = {2515-2459},
  shorttitle = {Many {{Analysts}}, {{One Data Set}}},
  language = {en},
  number = {3},
  journal = {Advances in Methods and Practices in Psychological Science},
  doi = {10.1177/2515245917747646},
  author = {R. Silberzahn and E. L. Uhlmann and D. P. Martin and P. Anselmi and F. Aust and E. Awtrey and {\v S}. Bahn{\a'\i}k and F. Bai and C. Bannard and E. Bonnier and R. Carlsson and F. Cheung and G. Christensen and R. Clay and M. A. Craig and A. {Dalla Rosa} and L. Dam and M. H. Evans and I. {Flores Cervantes} and N. Fong and M. Gamez-Djokic and A. Glenz and S. Gordon-McKeon and T. J. Heaton and K. Hederos and M. Heene and A. J. {Hofelich Mohr} and F. H{\"o}gden and K. Hui and M. Johannesson and J. Kalodimos and E. Kaszubowski and D. M. Kennedy and R. Lei and T. A. Lindsay and S. Liverani and C. R. Madan and D. Molden and E. Molleman and R. D. Morey and L. B. Mulder and B. R. Nijstad and N. G. Pope and B. Pope and J. M. Prenoveau and F. Rink and E. Robusto and H. Roderique and A. Sandberg and E. Schl{\"u}ter and F. D. Sch{\"o}nbrodt and M. F. Sherman and S. A. Sommer and K. Sotak and S. Spain and C. Sp{\"o}rlein and T. Stafford and L. Stefanutti and S. Tauber and J. Ullrich and M. Vianello and E.-J. Wagenmakers and M. Witkowiak and S. Yoon and B. A. Nosek},
  month = {sep},
  year = {2018},
  pages = {337-356},
}

@article{de2015jspsych,
  title={jsPsych: A JavaScript library for creating behavioral experiments in a Web browser},
  author={De Leeuw, Joshua R},
  journal={Behavior research methods},
  volume={47},
  number={1},
  pages={1--12},
  year={2015},
  publisher={Springer}
}
@Article{blischakCreatingSharingReproducible2019,
  title = {Creating and Sharing Reproducible Research Code the Workflowr Way},
  author = {John D. Blischak and Peter Carbonetto and Matthew Stephens},
  year = {2019},
  month = {oct},
  volume = {8},
  pages = {1749},
  issn = {2046-1402},
  doi = {10.12688/f1000research.20843.1},
  abstract = {Making scientific analyses reproducible, well documented, and easily shareable is crucial to maximizing their impact and ensuring that others can build on them. However, accomplishing these goals is not easy, requiring careful attention to organization, workflow, and familiarity with tools that are not a regular part of every scientist's toolbox. We have developed an R package,
              workflowr
              , to help all scientists, regardless of background, overcome these challenges.
              Workflowr
              aims to instill a particular {"}workflow{"} \textemdash{} a sequence of steps to be repeated and integrated into research practice \textemdash{} that helps make projects more reproducible and accessible.This workflow integrates four key elements: (1) version control (via
              Git
              ); (2) literate programming (via R Markdown); (3) automatic checks and safeguards that improve code reproducibility; and (4) sharing code and results via a browsable website. These features exploit powerful existing tools, whose mastery would take considerable study. However, the
              workflowr
              interface is simple enough that novice users can quickly enjoy its many benefits. By simply following the
              workflowr
              ~{"}workflow{"}, R users can create projects whose results, figures, and development history are easily accessible on a static website \textemdash{} thereby conveniently shareable with collaborators by sending them a URL \textemdash{} and accompanied by source code and reproducibility safeguards. The
              workflowr
              R package is open source and available on CRAN, with full documentation and source code available at
              https://github.com/jdblischak/workflowr
              .},
  file = {/Users/vuorre/Zotero/storage/3YV49ZDE/Blischak et al. - 2019 - Creating and sharing reproducible research code th.pdf},
  journal = {F1000Research},
  language = {en},
}
@Article{marwickPackagingDataAnalytical2018,
  title = {Packaging Data Analytical Work Reproducibly Using {{R}} (and Friends)},
  author = {Ben Marwick and Carl Boettiger and Lincoln Mullen},
  year = {2018},
  month = {mar},
  issn = {2167-9843},
  doi = {10.7287/peerj.preprints.3192v2},
  abstract = {Computers are a central tool in the research process, enabling complex and large scale data analysis. As computer-based research has increased in complexity, so have the challenges of ensuring that this research is reproducible. To address this challenge, we review the concept of the research compendium as a solution for providing a standard and easily recognisable way for organising the digital materials of a research project to enable other researchers to inspect, reproduce, and extend the research. We investigate how the structure and tooling of software packages of the R programming language are being used to produce research compendia in a variety of disciplines. We also describe how software engineering tools and services are being used by researchers to streamline working with research compendia. Using real-world examples, we show how researchers can improve the reproducibility of their work using research compendia based on R packages and related tools.},
  file = {/Users/vuorre/Zotero/storage/Z2NMYVPP/Marwick et al. - 2018 - Packaging data analytical work reproducibly using .pdf},
  language = {en},
}

repository: CrumpLab/vertical

repo_name: CrumpLab/vertical

gha_language: TeX


text:
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

set(BUILD_TESTING 0)
set(COMPILE_EXAMPLES 0)
set(CMAKE_VERBOSE_MAKEGILE ON)

#Get project root
set(PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../../)
get_filename_component(PROJECT_ROOT ${PROJECT_ROOT} ABSOLUTE)

set(TARGET_ROOT ${PROJECT_ROOT}/rootfs)

set(CMAKE_C_COMPILER ${PROJECT_ROOT}/cross_compiler/bin/arm-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER  ${PROJECT_ROOT}/cross_compiler/bin/arm-linux-gnueabihf-g++)
set(PKG_CONFIG_EXECUTABLE ${PROJECT_ROOT}/tools/arm-linux-gnueabihf-pkg-config)

set(TARGET_ROOT ${PROJECT_ROOT}/rootfs)

set(CMAKE_SYSROOT ${TARGET_ROOT})
set(CMAKE_FIND_ROOT_PATH ${TARGET_ROOT})

set(BOOST_INCLUDEDIR ${TARGET_ROOT}/usr/include/boost/)
set(BOOST_LIBRARYDIR ${TARGET_ROOT}/usr/lib/arm-linux-gnueabihf/)

set(
  CMAKE_PREFIX_PATH
  ${CMAKE_PREFIX_PATH}
  ${TARGET_ROOT}/usr/local/lib/cmake
#  ${TARGET_ROOT}/opt/ros/kinetic
)

SET(FLAGS
  "-isystem ${TARGET_ROOT}/opt/ros/kinetic/include/ \
  -Wl,-rpath-link,${TARGET_ROOT}/usr/lib/arm-linux-gnueabihf/mesa \
  -Wl,-rpath-link,${TARGET_ROOT}/lib/arm-linux-gnueabihf/mesa-egl \
  -Wl,-rpath-link,${TARGET_ROOT}/opt/vc/lib \
  -Wl,-rpath-link,${TARGET_ROOT}/lib/arm-linux-gnueabihf \
  -Wl,-rpath-link,${TARGET_ROOT}/usr/lib/arm-linux-gnueabihf \
  -Wl,-rpath-link,${TARGET_ROOT}/usr/local/lib \
  -Wl,-rpath-link,${TARGET_ROOT}/opt/ros/kinetic/lib"
)

UNSET(CMAKE_C_FLAGS CACHE)
UNSET(CMAKE_CXX_FLAGS CACHE)

SET(CMAKE_CXX_FLAGS ${FLAGS} CACHE STRING "" FORCE)
SET(CMAKE_C_FLAGS ${FLAGS} CACHE STRING "" FORCE)

#cmake --help-module FindPythonLibs | tail -10
set(PYTHON_LIBRARY ${TARGET_ROOT}/usr/lib/python3.5/config-3.5m-arm-linux-gnueabihf/libpython3.5.so)
set(
  PYTHON_INCLUDE_DIRS
  ${TARGET_ROOT}/usr/include/arm-linux-gnueabihf/python3.5m/
  ${TARGET_ROOT}/usr/include/python3.5m/
)

include_directories(${TARGET_ROOT}/usr/include/python3.5m/)

set(PYTHON_MULTIARCH arm-linux-gnueabihf)


text:
@article{chen2018,
  title={Blockchain tokens and the potential democratization of entrepreneurship and innovation},
  author={Chen, Yan},
  journal={Business Horizons},
  volume={61},
  number={4},
  pages={567--575},
  year={2018},
  publisher={Elsevier}
}

@article{delmolino2015,
  title={A programmer’s guide to ethereum and serpent},
  author={Delmolino, Kevin and Arnett, Mitchell and Kosba, Ahmed and Miller, Andrew and Shi, Elaine},
  journal={URL: https://mc2-umd. github. io/ethereumlab/docs/serpent\_tutorial. pdf.(2015).(Accessed May 06, 2016)},
  year={2015}
}

@misc{golem, title={Golem: Computing Power, Shared}, url={https://golem.network/}, journal={Golem}, publisher={Golem Factory Gmb}}

@misc{sessa_2018, title={What is Status (SNT)? }, url={https://coincentral.com/status-beginner-guide/}, journal={CoinCentral}, author={Sessa, Johnny}, year={2018}, month={Nov}}

@misc{pan_2018, title={What is Binance Coin?}, url={https://www.tokendaily.co/blog/a-deep-dive-into-binance-coin}, journal={Token Daily}, author={Pan, Kevin}, year={2018}}

@misc{buchko_2018, title={What Is the Basic Attention Token (BAT)?}, url={https://coincentral.com/what-is-bat/}, journal={CoinCentral}, author={Buchko, Steven}, year={2018}, month={Nov}}

repository: BigBossAnwer/Ethereum-Tokens-Analysis

repo_name: BigBossAnwer/Ethereum-Tokens-Analysis


text:
@article{art_iop03,
 author = {Y. Cavallin and A. Ferrari},
 journal = {Journal of Optics A: Pure and Applied Optics},
 note = {see corrigendum in June p. 666},
 pages = {269--277},
 title = {Fringe visibility estimation in Michelson stellar
interferometry: asymptotic performances},
 volume = {6},
 year = {2004}
}

repository: andferrari/academic-kickstart

repo_name: andferrari/academic-kickstart


text:
# CMake generated Testfile for
# Source directory: D:/S/tudat/Tudat/Astrodynamics/Propagators
# Build directory: D:/S/debug/tudat/Tudat/Astrodynamics/Propagators
#
# This file includes the relevant testing commands required for
# testing this directory and lists subdirectories to be tested as well.
add_test(test_CentralBodyData "D:/S/tudat/Tudat/../bin/unit_tests/test_CentralBodyData")
add_test(test_CowellStateDerivative "D:/S/tudat/Tudat/../bin/unit_tests/test_CowellStateDerivative")
add_test(test_EnckeStateDerivative "D:/S/tudat/Tudat/../bin/unit_tests/test_EnckeStateDerivative")
add_test(test_GaussStateDerivative "D:/S/tudat/Tudat/../bin/unit_tests/test_GaussStateDerivative")
add_test(test_UnifiedStateModelStateDerivative "D:/S/tudat/Tudat/../bin/unit_tests/test_UnifiedStateModelStateDerivative")
add_test(test_SequentialVariationEquationIntegration "D:/S/tudat/Tudat/../bin/unit_tests/test_SequentialVariationEquationIntegration")
add_test(test_VariationalEquations "D:/S/tudat/Tudat/../bin/unit_tests/test_VariationalEquations")
add_test(test_MultiArcVariationalEquations "D:/S/tudat/Tudat/../bin/unit_tests/test_MultiArcVariationalEquations")
add_test(test_HybridArcVariationalEquations "D:/S/tudat/Tudat/../bin/unit_tests/test_HybridArcVariationalEquations")
add_test(test_DependentVariableOutput "D:/S/tudat/Tudat/../bin/unit_tests/test_DependentVariableOutput")
add_test(test_EnvironmentModelComputations "D:/S/tudat/Tudat/../bin/unit_tests/test_EnvironmentModelComputations")
add_test(test_BodyMassPropagation "D:/S/tudat/Tudat/../bin/unit_tests/test_BodyMassPropagation")
add_test(test_MultiTypeStatePropagation "D:/S/tudat/Tudat/../bin/unit_tests/test_MultiTypeStatePropagation")
add_test(test_StoppingConditions "D:/S/tudat/Tudat/../bin/unit_tests/test_StoppingConditions")
add_test(test_CustomStatePropagation "D:/S/tudat/Tudat/../bin/unit_tests/test_CustomStatePropagation")
add_test(test_MultiArcDynamics "D:/S/tudat/Tudat/../bin/unit_tests/test_MultiArcDynamics")
add_test(test_HybridArcDynamics "D:/S/tudat/Tudat/../bin/unit_tests/test_HybridArcDynamics")
add_test(test_PropagationTerminationReason "D:/S/tudat/Tudat/../bin/unit_tests/test_PropagationTerminationReason")
add_test(test_RotationalDynamicsPropagation "D:/S/tudat/Tudat/../bin/unit_tests/test_RotationalDynamicsPropagation")
add_test(test_CR3BPPropagation "D:/S/tudat/Tudat/../bin/unit_tests/test_CR3BPPropagation")
add_test(test_PropagationTerminationCheckOnFinalStep "D:/S/tudat/Tudat/../bin/unit_tests/test_PropagationTerminationCheckOnFinalStep")
add_test(test_GlobalFrameOrigin "D:/S/tudat/Tudat/../bin/unit_tests/test_GlobalFrameOrigin")
add_test(test_ForwardBackwardIntegration "D:/S/tudat/Tudat/../bin/unit_tests/test_ForwardBackwardIntegration")
add_test(test_ExactTermination "D:/S/tudat/Tudat/../bin/unit_tests/test_ExactTermination")
add_test(test_StateDerivativeRestrictedThreeBodyProblem "D:/S/tudat/Tudat/../bin/unit_tests/test_StateDerivativeRestrictedThreeBodyProblem")


text:
SUMMARY = "Resize the root filesystem of a newly flashed image."
DESCRIPTION = "Resize the root filesystem of a newly flashed image."
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"

SRC_URI = " \
            file://expand_rootfs \
"

RDEPENDS_${PN} = " parted e2fsprogs-resize2fs lsb util-linux"

S = "${WORKDIR}"

do_install_prepend_rock64 (){
	sed -i 's/mmcblk0/mmcblk1/g' ${S}/expand_rootfs
}

do_install () {
	install -d -m 755 ${D}${bindir}
        install -m 644 ${S}/expand_rootfs ${D}${bindir}

	chmod +x ${D}${bindir}/expand_rootfs
}

FILES_${PN} = "${bindir}"

pkg_postinst_ontarget_${PN}() {
	expand_rootfs
	rm -f /usr/bin/expand_rootfs
	reboot
}


text:
DESCRIPTION = "Mail::DKIM - Signs/verifies Internet mail with DKIM/DomainKey signatures"
SECTION = "libs"
LICENSE = "Artistic|GPLv1+"
DEPENDS = " \
	libcrypt-openssl-rsa-perl-native \
	libdigest-sha-native \
	libmailtools-perl-native \
	libnet-dns-perl-native \
	"
RDEPENDS_${PN} += " \
	libcrypt-openssl-rsa-perl \
	libdigest-sha \
	liberror-perl \
	libmailtools-perl \
	libnet-dns-perl \
	"
BBCLASSEXTEND = "native"
PR = "r1"

SRC_URI = "http://search.cpan.org/CPAN/authors/id/J/JA/JASLONG/Mail-DKIM-${PV}.tar.gz;name=mail-dkim-perl-${PV}"
SRC_URI[mail-dkim-perl-0.37.md5sum] = "f3e84ec6b5e42d4cbcc7c42ea2900649"
SRC_URI[mail-dkim-perl-0.37.sha256sum] = "287173596f2e4ad4a44385d7ebbf868114d52ce73bd8d931b8dcf5c5ce19ad0b"

S = "${WORKDIR}/Mail-DKIM-${PV}"

inherit cpan

PACKAGE_ARCH = "all"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty