text:
require omapfbplay.inc

DEPENDS += "ti-linuxutils"

require recipes-ti/includes/ti-paths.inc

PACKAGE_ARCH = "${MACHINE_ARCH}"

SDMA_CFLAGS = " -I${LINUXUTILS_INSTALL_DIR}/packages/ti/sdo/linuxutils/sdma/include/"
CMEM_CFLAGS = " -I${LINUXUTILS_INSTALL_DIR}/packages/ti/sdo/linuxutils/cmem/include/"
CFLAGS += " -I. -I${STAGING_KERNEL_DIR}/include ${SDMA_CFLAGS} ${CMEM_CFLAGS}"

export SDMA_LIBS = "-L${LINUXUTILS_INSTALL_DIR}/packages/ti/sdo/linuxutils/sdma/lib -l:sdma.a470MV"
export CMEM_LIBS = "-L${LINUXUTILS_INSTALL_DIR}/packages/ti/sdo/linuxutils/cmem/lib -l:cmem.a470MV"

OMAPFBPLAYOPTS = "V4L2=y OMAPFB=y NETSYNC=y CMEM=y SDMA=y"

repository: Angstrom-distribution/meta-ti

repo_name: Angstrom-distribution/meta-ti

gha_language: BlitzBasic


text:
package main

import (
	"encoding/json"
	"fmt"
	"html/template"
	"io/ioutil"
	"log"
	"net/http"
	"strings"

	"github.com/gorilla/mux"
)

func renderTemplate(w http.ResponseWriter, templateFile string, templateData interface{}) {
	t, err := template.ParseFiles(templateFile)
	if err != nil {
		log.Fatal("Error encountered while parsing the template: ", err)
	}
	t.Execute(w, templateData)
}

func BasicsHandler() http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		renderTemplate(w, "./templates/basics.html", nil)
	})
}

func LowercaseTextTransformHandler() http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		var s string

		reqBody, err := ioutil.ReadAll(r.Body)
		if err != nil {
			log.Print("Encountered error when attempting to read the request body: ", err)
		}

		reqBodyString := string(reqBody)

		err = json.Unmarshal([]byte(reqBodyString), &s)
		if err != nil {
			log.Print("Encountered error when attempting to unmarshal JSON: ", err)
		}

		textBytes, err := json.Marshal(strings.ToLower(s))
		if err != nil {
			log.Print("Encountered error when attempting ot marshal JSON: ", err)
		}
		fmt.Println("textBytes string: ", string(textBytes))
		w.Write(textBytes)

	})

}

func main() {

	r := mux.NewRouter()

	r.Handle("/", BasicsHandler()).Methods("GET")
	r.Handle("/lowercase-text", LowercaseTextTransformHandler())

	fs := http.FileServer(http.Dir("./static"))
	http.Handle("/", r)
	http.Handle("/static/", http.StripPrefix("/static", fs))
	http.ListenAndServe(":8080", nil)

}

license_type: permissive

branch_name: refs/heads/master

gha_license_id: NOASSERTION

extension: go


text:
package storages

import (
	"github.com/ArthurHlt/stufy/model"
	"os"
	"strings"
)

const (
	configFilename = "config.yml"
	incidentFolder = "content"
)

type Storage interface {
	Config() (model.Config, error)
	Incidents() (model.Incidents, error)
	CreateIncident(model.Incident) error
	UpdateIncident(model.Incident) error
	DeleteIncident(model.Incident) error
	Resync() error
}

func FindStorage(target string) Storage {
	if strings.HasSuffix(target, ".git") || strings.HasPrefix(target, "git://") {
		return NewGit(target)
	}
	if _, err := os.Stat(target); err == nil {
		return NewLocal(target)
	}
	return nil
}

license: MIT

repository: ArthurHlt/stufy

repo_name: ArthurHlt/stufy


text:
package main
import(
    "encoding/json"
    "encoding/base64"
    "errors"
    "fmt"
    "github.com/howeyc/gopass"
    "io/ioutil"
    "log"
    "os"
    "os/user"
    "path/filepath"
    "runtime"
)

var keyPath string
var usr *user.User
// === Data structure ===

type Record struct{
    Username          string `json:"username,omitempty"`
    EncryptedPassword string `json:"password"`
    Salt              string `json:"salt"`
    Url               string `json:"url,omitempty"`
}

type PWData struct {
    Records map[string]Record `json:"records"`
    Settings struct {

    } `json:"settings,omitempty"`
    KeySalt string `json:"keysalt"`
    KeyHash string `json:"keyhash"`
}

func loadPWData() (*PWData, error) {
    var pwd PWData
    out, err := ioutil.ReadFile(keyPath)
    if err != nil {
        return nil, err
    }
    if err := json.Unmarshal(out, &pwd); err != nil {
        return nil, err
    }
    return &pwd, nil
}

func savePWData(pwd *PWData) error {
    out, err := json.MarshalIndent(pwd, "", "    ")
    if err != nil {
        return err
    }
    if err := ioutil.WriteFile(keyPath + ".tmp", out, 0600); err != nil {
        return err
    }
    if err := os.Rename(keyPath + ".tmp", keyPath); err != nil {
        return err
    }
    return nil
}

func generatePasswordFile() {
    if _, err := os.Stat(keyPath); !os.IsNotExist(err) {
        fmt.Printf("File %s already exists. \nWrite YES (capital) if you want to overwrite it\n", keyPath)
        if !confirm("YES") {
            fmt.Println("Exiting file generation")
            return
        }
    }
    var pwd PWData
    pwd.Records = make(map[string]Record)
    fmt.Println("Enter encryption password")
    pass, err := gopass.GetPasswd()
    if err != nil {
        fmt.Println("failed to get password from input:", err)
        return
    }
    hash, salt := genValidationHashSalt(pass)
    pwd.KeySalt = base64.URLEncoding.EncodeToString(salt)
    pwd.KeyHash = base64.URLEncoding.EncodeToString(hash)
    if err := savePWData(&pwd); err != nil {
        fmt.Println("Failed to save password data:", err)
    }
}

func getDropboxPath() string{
    type DropboxInfo struct {
        Personal struct{
            Path string `json:"path"`
        } `json:"personal"`
    }
    var info DropboxInfo
    var infoFile string
    if runtime.GOOS == "windows" {
        infoFile = usr.HomeDir + "/AppData/Roaming/Dropbox/info.json"
    } else {
        infoFile = usr.HomeDir + "/.dropbox/info.json"
    }
    out, err := ioutil.ReadFile(infoFile)
    if err != nil {
        if os.IsNotExist(err) {
            return ""
        }
        log.Fatalln("failed to read dropbox kii file: ", err)
    }
    err = json.Unmarshal(out, &info)
    if err != nil {
        log.Fatalln("failed to unmarshal dropbox kii file: ", err)
    }
    return filepath.ToSlash(info.Personal.Path)
}

func setKeyFilePath() error {
    usr, err := user.Current()
    if err != nil {
        panic(err)
    }
    if keyPath != "" {
        if _, err := os.Stat(keyPath); os.IsNotExist(err) {
            return errors.New("Unable to find path")
        }
        return nil
    }
    dropboxPath := getDropboxPath()
    if dropboxPath != "" {
        if _, err = os.Stat(dropboxPath+"/kii.json"); !os.IsNotExist(err) {
            keyPath = dropboxPath+"/kii.json"
            return nil
        }
    }
    if _, err = os.Stat(usr.HomeDir+"/kii.json"); !os.IsNotExist(err) {
        keyPath = usr.HomeDir+"/kii.json"
        return nil
    }
    return errors.New("Unable to find file")
}

repository: cblach/kii

repo_name: cblach/kii


text:
include_directories(${CMAKE_CURRENT_LIST_DIR})

include(${CMAKE_CURRENT_LIST_DIR}/../Formats/xformats.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/../Controls/xlineedithex.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/../XHexView/xhexview.cmake)

set(XMEMORYMAPWIDGET_SOURCES
    ${XFORMATS_SOURCES}
    ${XLINEEDITHEX_SOURCES}
    ${XHEXVIEW_SOURCES}
    ${CMAKE_CURRENT_LIST_DIR}/dialogmemorymap.cpp
    ${CMAKE_CURRENT_LIST_DIR}/dialogmemorymap.ui
    ${CMAKE_CURRENT_LIST_DIR}/xmemorymapwidget.cpp
    ${CMAKE_CURRENT_LIST_DIR}/xmemorymapwidget.ui
)

repository: horsicq/XMemoryMapWidget

repo_name: horsicq/XMemoryMapWidget

extension: cmake


text:
HOMEPAGE = "http://fuse.sf.net"
DESCRIPTION = "With FUSE it is possible to implement a fully functional filesystem in a userspace program"
MAINTAINER = "Koen Kooi <koen@linuxtogo.org>"

LICENSE_${PN} = "LGPL"

DEPENDS = "fakeroot-native"
RRECOMMENDS_${PN} = "fuse-module"

SRC_URI="${SOURCEFORGE_MIRROR}/fuse/${P}.tar.gz"

inherit autotools pkgconfig
EXTRA_OECONF = " --disable-kernel-module"

fakeroot do_install() {
oe_runmake install DESTDIR=${D}
}

fakeroot do_stage() {
autotools_stage_all
}

extension: bb


text:
require qt5-git.inc
require ${PN}.inc

QT_MODULE_BRANCH = "release"
# v5.2.1 + 2 commits
SRCREV = "9a8319a39a06d6cf3163978301d650b8f3558c62"


text:
/*
* @project  dwlog
* @file     server.go
* @author   dungw3b
* @date     2019-08-20
*/
package dwlog

import (
	"os"
	"fmt"
	"net"
	"sync"
	"context"
	"strconv"
	"google.golang.org/grpc"
)

type Server struct {
	Listen string
	Port uint32
	FileCount uint32
	Data string

	mux sync.Mutex
	grpcServer *grpc.Server
}

func (s *Server) Log(ctx context.Context, m *MessageRequest) (*MessageResponse, error) {
	s.mux.Lock()
	defer s.mux.Unlock()

	line := s.CSVFormat(m)
	line = append(line, '\n')

	path := s.Data +"/"+ m.Name
	if _, err := os.Stat(path); os.IsNotExist(err) {
		os.Mkdir(path, 0755)
	}

	writer := &FileWriter {
		Name:  path +"/"+ m.Name +".log",
		MaxCount: int(s.FileCount),
	}
	_, err := writer.Write(line)
	if err != nil {
		fmt.Println("\033[31mWrite data into file error\033[0m", err.Error())
		return &MessageResponse{}, nil
	}

	return &MessageResponse{}, nil
}

func (s *Server) TextFormat(m *MessageRequest) []byte {
	text := "["+ m.Time +"]"+
		"["+ m.Host +"]"+
		"["+ LevelString(m.Level) +"]"+
		" "+ m.Message
	return []byte(text)
}

func (s *Server) CSVFormat(m *MessageRequest) []byte {
	var csv string
	csv = m.Time +","+ m.Host +","+ LevelString(m.Level) +","+ m.Message
	return []byte(csv)
}

func (s *Server) Run(exit chan bool) {
	var port string
	if len(s.Listen) == 0 {
		fmt.Println("service.listen is required")
		exit <- true
	}
	if s.Port == 0 {
		fmt.Println("service.port is required")
		exit <- true
	}
	if len(s.Data) == 0 {
		s.Data = "./"
	}
	port = strconv.Itoa(int(s.Port))
	listen, err := net.Listen("tcp", s.Listen +":"+ port)
	if err != nil {
		fmt.Println(err)
		exit <- true
	}

	s.grpcServer = grpc.NewServer()
	RegisterLogServiceServer(s.grpcServer, s)
	logConsole(INFO, "Service dwlog start on", s.Listen+":"+port)
	if err := s.grpcServer.Serve(listen); err != nil {
		fmt.Println(err)
		exit <- true
	}
}

func (s *Server) Close() {
	s.grpcServer.GracefulStop()
	logConsole(INFO, "Graceful stop service dwlog")
}


text:
SUMMARY = "Utilities for sensible alternative selection"
DESCRIPTION = "This package provides a number of small utilities which are used\n\
by programs to sensibly select and spawn an appropriate browser,\n\
editor, or pager.\n\
.\n\
The specific utilities included are: sensible-browser sensible-editor\n\
sensible-pager"

PR = "r0"

inherit debian-package

LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=19d43732fbe50ffbf510e2315e81d895"

inherit autotools

PACKAGE_ARCH = "all"

do_install_append() {
	install -d ${D}${libdir}/mime/packages
	install -m 0644 ${S}/debian/mime ${D}${libdir}/mime/packages/sensible-utils
}

FILES_${PN} += "${libdir}/mime"

repository: nghiaht-tsdv/meta-debian

repo_name: nghiaht-tsdv/meta-debian

branch_name: refs/heads/jethro

gha_language: BitBake


text:
package config

import (
	"log"
	"os"

	"github.com/joho/godotenv"
)

var (
	// MainDatabase Main database connection
	MainDatabase string
)

// StartEnvironment Start a new environment, using dot env file
func StartEnvironment() {
	err := godotenv.Load()
	if err != nil {
		log.Fatalf("Error starting environment\nDetailed error: %v", err)
	}

	MainDatabase = os.Getenv("MAIN_DB")
}


text:
package nn

import (
	"image"
	"image/color"
)

// Tensor is a 3D array of numbers.
//
// It is arranged as [height x width x depth], with the
// outer dimension being height.
type Tensor struct {
	Height int
	Width  int
	Depth  int

	Data []float32
}

// NewTensorRGB creates an RGB Tensor from an image.
func NewTensorRGB(img image.Image) *Tensor {
	b := img.Bounds()
	res := NewTensor(b.Dy(), b.Dx(), 3)
	var idx int
	for y := 0; y < res.Height; y++ {
		for x := 0; x < res.Width; x++ {
			red, green, blue, _ := img.At(x+b.Min.X, y+b.Min.Y).RGBA()
			for _, c := range []uint32{red, green, blue} {
				res.Data[idx] = float32(c) / 0xffff
				idx++
			}
		}
	}
	return res
}

// NewTensor creates a zero tensor.
func NewTensor(height, width, depth int) *Tensor {
	return &Tensor{
		Height: height,
		Width:  width,
		Depth:  depth,
		Data:   make([]float32, width*height*depth),
	}
}

// At gets a pointer to the given coordinate.
func (t *Tensor) At(y, x, z int) *float32 {
	return &t.Data[z+t.Depth*(x+y*t.Width)]
}

// Add adds a scalar to every entry.
func (t *Tensor) Add(s float32) *Tensor {
	res := NewTensor(t.Height, t.Width, t.Depth)
	for i, x := range t.Data {
		res.Data[i] = x + s
	}
	return res
}

// Pad creates a zero-padded version of the Tensor.
func (t *Tensor) Pad(top, right, bottom, left int) *Tensor {
	res := NewTensor(t.Height+top+bottom, t.Width+left+right, t.Depth)
	rowSize := t.Depth * t.Width
	for i := 0; i < t.Height; i++ {
		start := t.Depth * t.Width * i
		copy(res.Data[res.Depth*(left+(i+top)*res.Width):], t.Data[start:start+rowSize])
	}
	return res
}

// Unpad cuts out the edges of the Tensor, effectively
// inverting the operation done by Pad.
func (t *Tensor) Unpad(top, right, bottom, left int) *Tensor {
	res := NewTensor(t.Height-(top+bottom), t.Width-(left+right), t.Depth)
	rowSize := t.Depth * (t.Width - (left + right))
	for i := top; i < t.Height-bottom; i++ {
		start := t.Depth * (left + t.Width*i)
		copy(res.Data[res.Depth*res.Width*(i-top):], t.Data[start:start+rowSize])
	}
	return res
}

// RGB creates an RGB image out of the Tensor.
//
// If the tensor does not have three channels, this will
// panic().
func (t *Tensor) RGB() image.Image {
	if t.Depth != 3 {
		panic("expected exactly 3 output channels")
	}
	res := image.NewRGBA(image.Rect(0, 0, t.Width, t.Height))
	var idx int
	for y := 0; y < t.Height; y++ {
		for x := 0; x < t.Width; x++ {
			var colors [3]uint8
			for i := 0; i < 3; i++ {
				x := t.Data[idx+i]
				if x < 0 {
					x = 0
				} else if x > 1 {
					x = 1
				}
				colors[i] = uint8(x * 255.999)
			}
			idx += 3
			res.SetRGBA(x, y, color.RGBA{
				R: colors[0],
				G: colors[1],
				B: colors[2],
				A: 0xff,
			})
		}
	}
	return res
}

repository: unixpickle/polish

repo_name: unixpickle/polish


text:
package main

import (
	"bytes"
	"encoding/gob"
	"encoding/json"
)

func createMap(max int) map[int64]float64 {
	m := make(map[int64]float64)
	for i := 0; i < max; i++ {
		m[int64(i)] = float64(i)
	}
	return m
}

func createSliceMap(max int) []map[int64]float64 {
	list := make([]map[int64]float64, max)
	for i := 0; i < max; i++ {
		list[i] = createMap(max)
	}
	return list
}
func encodeGob(v interface{}) []byte {
	var buf bytes.Buffer
	enc := gob.NewEncoder(&buf)
	err := enc.Encode(v)
	if err != nil {
		panic(err)
	}

	return buf.Bytes()
}

func decodeGob(b []byte, result interface{}) {
	buf := bytes.NewBuffer(b)
	enc := gob.NewDecoder(buf)

	err := enc.Decode(result)
	if err != nil {
		panic(err)
	}
}

func encodeJSON(v interface{}) []byte {
	byt, err := json.Marshal(v)
	if err != nil {
		panic(err)
	}

	return byt
}

func decodeJSON(b []byte, result interface{}) {
	err := json.Unmarshal(b, result)
	if err != nil {
		panic(err)
	}
}

gha_license_id: MIT

gha_language: Go


text:
# Python Dependency External Project
#
# Required symbols are:
#   VIAME_BUILD_PREFIX - where packages are built
#   VIAME_BUILD_INSTALL_PREFIX - directory install target
#   VIAME_PACKAGES_DIR - location of git submodule packages
#   VIAME_ARGS_COMMON -
##

# --------------------- ADD ANY BASIC PYTHON DEPS HERE -------------------------
# Basic dependencies are installed jointly in one local pip installation call

set( PYTHON_DEP_ENV_VARS )

if( VIAME_CREATE_PACKAGE )
  set( VIAME_PYTHON_BASIC_DEPS "numpy==1.19.3" )
else()
  set( VIAME_PYTHON_BASIC_DEPS "numpy" )
endif()

list( APPEND VIAME_PYTHON_BASIC_DEPS "kiwisolver==1.2.0" "matplotlib==3.1.1" )

if( VIAME_ENABLE_TENSORFLOW )
  list( APPEND VIAME_PYTHON_BASIC_DEPS "humanfriendly" )

  if( VIAME_ENABLE_CUDA )
    list( APPEND VIAME_PYTHON_BASIC_DEPS "tensorflow-gpu==1.14" )
  else()
    list( APPEND VIAME_PYTHON_BASIC_DEPS "tensorflow==1.14" )
  endif()
endif()

if( VIAME_ENABLE_PYTORCH-INTERNAL )
  list( APPEND VIAME_PYTHON_BASIC_DEPS "dataclasses" )
endif()

if( VIAME_ENABLE_PYTORCH-MMDET )
  list( APPEND VIAME_PYTHON_BASIC_DEPS "yapf" )
endif()

if( VIAME_ENABLE_CAMTRAWL OR VIAME_ENABLE_OPENCV )
  list( APPEND VIAME_PYTHON_BASIC_DEPS "tqdm" "scipy" )
endif()

if( ( WIN32 OR NOT VIAME_ENABLE_OPENCV ) AND
      ( VIAME_ENABLE_CAMTRAWL OR VIAME_ENABLE_OPENCV OR
        VIAME_ENABLE_PYTORCH-MMDET OR VIAME_ENABLE_PYTORCH-NETHARN ) )
  list( APPEND VIAME_PYTHON_BASIC_DEPS "opencv-python" )
endif()

if( VIAME_ENABLE_ITK_EXTRAS )
  list( APPEND VIAME_PYTHON_BASIC_DEPS "msgpack" )
endif()

if( VIAME_ENABLE_PYTORCH )
  list( APPEND VIAME_PYTHON_BASIC_DEPS "scikit-image==0.16.2" )
endif()

if( VIAME_ENABLE_PYTORCH-MMDET OR VIAME_ENABLE_PYTORCH-NETHARN )
  list( APPEND VIAME_PYTHON_BASIC_DEPS "scikit-build" )
endif()

if( VIAME_ENABLE_PYTORCH-NETHARN AND VIAME_ENABLE_GDAL )
  if( WIN32 )
    list( APPEND VIAME_PYTHON_BASIC_DEPS "gdal==2.2.3" )
  else()
    list( APPEND VIAME_PYTHON_BASIC_DEPS "gdal" )
  endif()
endif()

if( VIAME_ENABLE_CAMTRAWL OR VIAME_ENABLE_PYTORCH-NETHARN )
  list( APPEND VIAME_PYTHON_BASIC_DEPS "ubelt" "pygments" "bezier==2020.1.14" )
  list( APPEND VIAME_PYTHON_BASIC_DEPS "ndsampler==0.5.13" "kwcoco==0.1.13" )
endif()

if( VIAME_ENABLE_PYTORCH AND VIAME_ENABLE_PYTORCH-INTERNAL )
  list( APPEND VIAME_PYTHON_BASIC_DEPS "pyyaml" )
endif()

if( VIAME_ENABLE_PYTORCH AND VIAME_ENABLE_PYTORCH-MMDET AND NOT WIN32 )
  list( APPEND VIAME_PYTHON_BASIC_DEPS "pycocotools" )
endif()

if( VIAME_ENABLE_PYTHON-INTERNAL AND UNIX )
  list( APPEND VIAME_PYTHON_BASIC_DEPS "backports.lzma" "backports.weakref" )
endif()

# ---------------------- ADD ANY ADV PYTHON DEPS HERE --------------------------
# Advanced python dependencies are installed individually due to special reqs

set( VIAME_PYTHON_ADV_DEPS python-deps )
set( VIAME_PYTHON_ADV_DEP_CMDS "custom-install" )

if( VIAME_ENABLE_ITK_EXTRAS )
  set( WX_VERSION "4.0.7" )

  list( APPEND VIAME_PYTHON_ADV_DEPS wxPython )

  if( UNIX )
    if( EXISTS "/etc/os-release" )
      ParseLinuxOSField( "ID" OS_ID )
    endif()

    execute_process( COMMAND lsb_release -cs
      OUTPUT_VARIABLE RELEASE_CODENAME
      OUTPUT_STRIP_TRAILING_WHITESPACE )

    if( "${OS_ID}" MATCHES "centos" )
      set( WXP_ARCHIVE https://extras.wxpython.org/wxPython4/extras/linux/gtk3/centos-7 )
      list( APPEND VIAME_PYTHON_ADV_DEP_CMDS "-U -f ${WXP_ARCHIVE} wxPython==${WX_VERSION}" )
    elseif( "${RELEASE_CODENAME}" MATCHES "xenial" )
      set( WXP_ARCHIVE https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 )
      list( APPEND VIAME_PYTHON_ADV_DEP_CMDS "-U -f ${WXP_ARCHIVE} wxPython==${WX_VERSION}" )
    else()
      list( APPEND VIAME_PYTHON_ADV_DEP_CMDS "wxPython==${WX_VERSION}" )
    endif()
  else()
    list( APPEND VIAME_PYTHON_ADV_DEP_CMDS "wxPython==${WX_VERSION}" )
  endif()
endif()

if( VIAME_ENABLE_PYTORCH AND NOT VIAME_ENABLE_PYTORCH-INTERNAL )
  list( APPEND VIAME_PYTHON_ADV_DEPS pytorch )

  set( ARGS_TORCH )

  set( PYTORCH_ARCHIVE https://download.pytorch.org/whl/torch_stable.html )
  set( PYTORCH_VERSION ${VIAME_PYTORCH_VERSION} )

  set( CUDA_VER_STR "" )
  set( TORCHVISION_STR "" )

  if( CUDA_VERSION VERSION_EQUAL "11.0" )
    set( CUDA_VER_STR "+cu110" )
  elseif( CUDA_VERSION VERSION_EQUAL "10.2" )
    set( CUDA_VER_STR "+cu102" )
  elseif( CUDA_VERSION VERSION_EQUAL "10.1" )
    set( CUDA_VER_STR "+cu101" )
  elseif( CUDA_VERSION VERSION_EQUAL "10.0" )
    set( CUDA_VER_STR "+cu100" )
  elseif( CUDA_VERSION VERSION_EQUAL "9.2" )
    set( CUDA_VER_STR "+cu92" )
  elseif( NOT VIAME_ENABLE_CUDA )
    set( CUDA_VER_STR "+cpu" )
  endif()

  if( NOT VIAME_ENABLE_PYTORCH-VIS-INTERNAL )
    if( PYTORCH_VERSION VERSION_EQUAL "1.7.1" )
      set( TORCHVISION_STR "torchvision==0.8.2${CUDA_VER_STR}" )
    elseif( PYTORCH_VERSION VERSION_EQUAL "1.6.0" )
      set( TORCHVISION_STR "torchvision==0.7.0${CUDA_VER_STR}" )
    elseif( PYTORCH_VERSION VERSION_EQUAL "1.4.0" )
      set( TORCHVISION_STR "torchvision==0.5.0${CUDA_VER_STR}" )
    endif()
  endif()

  # Default case
  set( ARGS_TORCH "==${PYTORCH_VERSION}${CUDA_VER_STR} ${TORCHVISION_STR} -f ${PYTORCH_ARCHIVE}" )

  # Special cases
  if( WIN32 AND VIAME_ENABLE_CUDA )
    if( CUDA_VERSION VERSION_EQUAL "10.1" )
      if( PYTHON_VERSION VERSION_EQUAL 3.6 AND PYTORCH_VERSION VERSION_EQUAL "1.4.0" )
        set( ARGS_TORCH "https://download.pytorch.org/whl/cu101/torch-1.4.0-cp36-cp36m-win_amd64.whl" )
      else()
        set( ARGS_TORCH "===${PYTORCH_VERSION}${CUDA_VER_STR} ${TORCHVISION_STR} -f ${PYTORCH_ARCHIVE}" )
      endif()
    elseif( CUDA_VERSION VERSION_EQUAL "10.2" AND PYTORCH_VERSION VERSION_EQUAL "1.7.1" )
      set( ARGS_TORCH "==${PYTORCH_VERSION} ${TORCHVISION_STR} -f ${PYTORCH_ARCHIVE}" )
    elseif( NOT ( CUDA_VERSION VERSION_EQUAL "11.0" OR CUDA_VERSION VERSION_EQUAL "10.2" OR
                  CUDA_VERSION VERSION_EQUAL "10.1" OR CUDA_VERSION VERSION_EQUAL "9.2" ) )
      message( FATAL_ERROR "With your current build settings you must either:\n"
        " (a) Turn on VIAME_ENABLE_PYTORCH-INTERNAL\n"
        " (b) Use a CUDA version with premade torch (e.g. 9.2, 10.0, 10.1, 11.0)\n"
        " (c) Disable VIAME_ENABLE_PYTORCH\n" )
    endif()
  elseif( VIAME_ENABLE_CUDA )
    if( PYTORCH_VERSION VERSION_GREATER "1.6.0" AND CUDA_VERSION VERSION_EQUAL "11.0" )
      set( ARGS_TORCH "===${PYTORCH_VERSION}${CUDA_VER_STR} ${TORCHVISION_STR} -f ${PYTORCH_ARCHIVE}" )
    elseif( PYTORCH_VERSION VERSION_GREATER "1.5.0" AND CUDA_VERSION VERSION_EQUAL "10.2" )
      set( ARGS_TORCH "===${PYTORCH_VERSION} ${TORCHVISION_STR} -f ${PYTORCH_ARCHIVE}" )
    elseif( PYTORCH_VERSION VERSION_EQUAL "1.4.0" AND CUDA_VERSION VERSION_EQUAL "10.1" )
      set( ARGS_TORCH "===${PYTORCH_VERSION} ${TORCHVISION_STR} -f ${PYTORCH_ARCHIVE}" )
    elseif( PYTORCH_VERSION VERSION_GREATER "1.4.0" AND CUDA_VERSION VERSION_EQUAL "10.1" )
      set( ARGS_TORCH "===${PYTORCH_VERSION}${CUDA_VER_STR} ${TORCHVISION_STR} -f ${PYTORCH_ARCHIVE}" )
    elseif( NOT ( CUDA_VERSION VERSION_EQUAL "11.0" OR CUDA_VERSION VERSION_EQUAL "10.2" OR
                  CUDA_VERSION VERSION_EQUAL "10.1" OR CUDA_VERSION VERSION_EQUAL "9.2" ) )
      message( FATAL_ERROR "With your current build settings you must either:\n"
        " (a) Turn on VIAME_ENABLE_PYTORCH-INTERNAL\n"
        " (b) Use a CUDA version with premade torch (e.g. 9.2, 10.0, 10.1, 11.0)\n"
        " (c) Disable VIAME_ENABLE_PYTORCH\n" )
    endif()
  endif()

  string( FIND "${ARGS_TORCH}" "https://" TMP_VAR )
  if( "${TMP_VAR}" EQUAL 0 )
    list( APPEND VIAME_PYTHON_ADV_DEP_CMDS "${ARGS_TORCH}" )
  else()
    list( APPEND VIAME_PYTHON_ADV_DEP_CMDS "torch${ARGS_TORCH}" )
  endif()
endif()

# ---------------------------- INSTALL ROUTINES --------------------------------

set( PYTHON_BASEPATH
  ${VIAME_BUILD_INSTALL_PREFIX}/lib/python${PYTHON_VERSION} )

if( WIN32 )
  set( CUSTOM_PYTHONPATH
    "${PYTHON_BASEPATH};${PYTHON_BASEPATH}/site-packages;${PYTHON_BASEPATH}/dist-packages" )
  set( CUSTOM_PATH
    "${VIAME_BUILD_INSTALL_PREFIX}/bin;$ENV{PATH}" )

  set( EXTRA_INCLUDE_DIRS "${VIAME_BUILD_INSTALL_PREFIX}/include;$ENV{INCLUDE}" )
  set( EXTRA_LIBRARY_DIRS "${VIAME_BUILD_INSTALL_PREFIX}/lib;$ENV{LIB}" )

  if( VIAME_ENABLE_PYTHON-INTERNAL )
    set( ENV{PYTHONPATH} "${CUSTOM_PYTHONPATH};$ENV{PYTHONPATH}" )
  endif()

  string( REPLACE ";" "----" CUSTOM_PYTHONPATH "${CUSTOM_PYTHONPATH}" )
  string( REPLACE ";" "----" CUSTOM_PATH "${CUSTOM_PATH}" )
  string( REPLACE ";" "----" EXTRA_INCLUDE_DIRS "${EXTRA_INCLUDE_DIRS}" )
  string( REPLACE ";" "----" EXTRA_LIBRARY_DIRS "${EXTRA_LIBRARY_DIRS}" )

  list( APPEND PYTHON_DEP_ENV_VARS "INCLUDE=${EXTRA_INCLUDE_DIRS}" )
  list( APPEND PYTHON_DEP_ENV_VARS "LIB=${EXTRA_LIBRARY_DIRS}" )
else()
  set( CUSTOM_PYTHONPATH
    ${PYTHON_BASEPATH}:${PYTHON_BASEPATH}/site-packages:${PYTHON_BASEPATH}/dist-packages )
  if( VIAME_ENABLE_CUDA )
    set( CUSTOM_PATH
      ${VIAME_BUILD_INSTALL_PREFIX}/bin:${CUDA_TOOLKIT_ROOT_DIR}/bin:$ENV{PATH} )
  else()
    set( CUSTOM_PATH ${VIAME_BUILD_INSTALL_PREFIX}/bin:$ENV{PATH} )
  endif()

  list( APPEND PYTHON_DEP_ENV_VARS "PATH=${CUSTOM_PATH}" )
  list( APPEND PYTHON_DEP_ENV_VARS "CPPFLAGS=-I${VIAME_BUILD_INSTALL_PREFIX}/include" )
  list( APPEND PYTHON_DEP_ENV_VARS "LDFLAGS=-L${VIAME_BUILD_INSTALL_PREFIX}/lib" )
  list( APPEND PYTHON_DEP_ENV_VARS "CC=${CMAKE_C_COMPILER}" )
  list( APPEND PYTHON_DEP_ENV_VARS "CXX=${CMAKE_CXX_COMPILER}" )
endif()

list( APPEND PYTHON_DEP_ENV_VARS "PYTHONPATH=${CUSTOM_PYTHONPATH}" )
list( APPEND PYTHON_DEP_ENV_VARS "PYTHONUSERBASE=${VIAME_BUILD_INSTALL_PREFIX}" )

set( VIAME_PYTHON_DEPS_DEPS fletch )

list( LENGTH VIAME_PYTHON_ADV_DEPS DEP_COUNT )
math( EXPR DEP_COUNT "${DEP_COUNT} - 1" )

foreach( ID RANGE ${DEP_COUNT} )

  list( GET VIAME_PYTHON_ADV_DEPS ${ID} DEP )

  set( VIAME_PROJECT_LIST ${VIAME_PROJECT_LIST} ${DEP} )

  if( "${DEP}" STREQUAL "python-deps" )
    set( PYTHON_LIB_DEPS ${VIAME_PYTHON_DEPS_DEPS} )
    set( CMD ${VIAME_PYTHON_BASIC_DEPS} )
  else()
    set( PYTHON_LIB_DEPS ${VIAME_PYTHON_DEPS_DEPS} python-deps )
    list( GET VIAME_PYTHON_ADV_DEP_CMDS ${ID} CMD )
  endif()

  set( PYTHON_DEP_PIP_CMD pip install --user ${CMD} )
  string( REPLACE " " ";" PYTHON_DEP_PIP_CMD "${PYTHON_DEP_PIP_CMD}" )

  set( PYTHON_DEP_BUILD
    ${CMAKE_COMMAND} -E env "${PYTHON_DEP_ENV_VARS}"
      ${PYTHON_EXECUTABLE} -m ${PYTHON_DEP_PIP_CMD}
    )

  if( "${DEP}" STREQUAL "pytorch" )
    set( PYTHON_DEP_INSTALL ${CMAKE_COMMAND}
      -DVIAME_PYTHON_BASE:PATH=${PYTHON_BASEPATH}
      -DVIAME_PATCH_DIR:PATH=${VIAME_SOURCE_DIR}/packages/patches
      -DVIAME_PYTORCH_VERSION:STRING=${VIAME_PYTORCH_VERSION}
      -P ${VIAME_SOURCE_DIR}/cmake/custom_pytorch_install.cmake )
  else()
    set( PYTHON_DEP_INSTALL "" )
  endif()

  ExternalProject_Add( ${DEP}
    DEPENDS ${PYTHON_LIB_DEPS}
    PREFIX ${VIAME_BUILD_PREFIX}
    SOURCE_DIR ${VIAME_CMAKE_DIR}
    USES_TERMINAL_BUILD 1
    CONFIGURE_COMMAND ""
    BUILD_COMMAND ${PYTHON_DEP_BUILD}
    INSTALL_COMMAND "${PYTHON_DEP_INSTALL}"
    INSTALL_DIR ${VIAME_BUILD_INSTALL_PREFIX}
    LIST_SEPARATOR "----"
    )
endforeach()

repository: AndrewYGHUB/VIAME

repo_name: AndrewYGHUB/VIAME


text:
@inproceedings{Harris.2013:What,
	Address = {Ithaca, NY},
	Author = {Jesse A. Harris},
	Booktitle = {The Proceedings of Semantics and Linguistic Theory 23},
	Editor = {Todd Snider},
	Keywords = {interjection, semantics, pragmatic halo},
	Pages = {19--39},
	Publisher = {Cornell University},
	Title = {Interjective `what'},
	Volume = {23},
	Year = {2013}}

extension: bib


text:
SUMMARY = "DE-Nano initialize synergy client"
DESCRIPTION = "Scripts to start synergy client"
AUTHOR = "Dalon Westergreen <dwesterg@gmail.com>"
SECTION = "DE10-Nano"

PR = "r0"

inherit systemd

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"

PACKAGE_ARCH = "${MACHINE_ARCH}"
PV = "1.0${PR}"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI = "file://de10-nano-synergy-init.service \
          "

do_install() {
	install -d ${D}${base_libdir}/systemd/system
	install -m 0644 ${WORKDIR}/*.service ${D}${base_libdir}/systemd/system
}

FILES_${PN} = "${base_libdir}/systemd/system/de10-nano-synergy-init.service \
               ${sysconfdir}/systemd/ \
              "

NATIVE_SYSTEMD_SUPPORT = "1"
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "de10-nano-synergy-init.service"

gha_language: C


text:
DESCRIPTION = "BOOTP and DHCP client for automatic IP configuration"
SECTION = "console/network"
PRIORITY = "optional"
LICENSE = "GPL"
DEPENDS = "popt virtual/libiconv"

PR = "r1"

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

SRC_URI = "http://ftp.de.debian.org/debian/pool/main/p/pump/pump_0.8.24.orig.tar.gz \
	   file://00_00_all_debian.patch \
	   file://00_all_retvals.patch \
	   file://10_all_gentoo.patch \
	   file://20_all_redefinition.patch \
	   file://30_all_Makefile.patch \
	   file://40_all_manpage.patch \
	  "
do_compile() {
        oe_runmake pump
}

do_install() {
	install -d ${D}${base_sbindir}
	install -m 0755 ${S}/pump ${D}${base_sbindir}/pump
}

SRC_URI[md5sum] = "866fc9f62b8161eb1514a6a06597edc9"
SRC_URI[sha256sum] = "cbb423942a4295a07a23b76a02d645b76b4ac0b58c3a30076ad42c2ab80c2dba"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD


text:
@incollection{valdez2016recommender,
  title={Recommender systems for health informatics: State-of-the-art and future perspectives},
  author={Valdez, Andr{\'e} Calero and Ziefle, Martina and Verbert, Katrien and Felfernig, Alexander and Holzinger, Andreas},
  booktitle={Machine Learning for Health Informatics},
  pages={391--414},
  year={2016},
  publisher={Springer}
}

@inproceedings{schafer2017towards,
  title={Towards health (aware) recommender systems},
  author={Sch{\"a}fer, Hanna and Hors-Fraile, Santiago and Karumur, Raghav Pavan and Calero Valdez, Andr{\'e} and Said, Alan and Torkamaan, Helma and Ulmer, Tom and Trattner, Christoph},
  booktitle={Proceedings of the 2017 international conference on digital health},
  pages={157--161},
  year={2017},
  organization={ACM}
}

@inproceedings{fernandez2009challenges,
  title={Challenges and opportunities of using recommender systems for personalized health education.},
  author={Fernandez-Luque, Luis and Karlsen, Randi and Vognild, Lars Kristian},
  booktitle={MIE},
  pages={903--907},
  year={2009}
}

@inproceedings{calero2016hci,
  title={HCI for recommender systems: the past, the present and the future},
  author={Calero Valdez, Andr{\'e} and Ziefle, Martina and Verbert, Katrien},
  booktitle={Proceedings of the 10th ACM Conference on Recommender Systems},
  pages={123--126},
  year={2016},
  organization={ACM}
}

repository: mida-project/reading-reports

repo_name: mida-project/reading-reports


text:
require etk_svn.bb
inherit native
DEPENDS = "evas-native ecore-native edje-native"

SRC_URI += "file://no-tests.patch"


text:
package tprotocol
type CommonBool struct{
Value bool
}
func (pOwn *CommonBool) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeBOOL(aBuffer[nOffset:], aSize-nOffset, pOwn.Value)
return nOffset
}
func (pOwn *CommonBool) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.Value, nTemp = deserializeBOOL(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type CommonN8 struct{
Value int8
}
func (pOwn *CommonN8) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeN8(aBuffer[nOffset:], aSize-nOffset, pOwn.Value)
return nOffset
}
func (pOwn *CommonN8) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.Value, nTemp = deserializeN8(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type CommonN16 struct{
Value int16
}
func (pOwn *CommonN16) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeN16(aBuffer[nOffset:], aSize-nOffset, pOwn.Value)
return nOffset
}
func (pOwn *CommonN16) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.Value, nTemp = deserializeN16(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type CommonN32 struct{
Value int32
}
func (pOwn *CommonN32) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, pOwn.Value)
return nOffset
}
func (pOwn *CommonN32) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.Value, nTemp = deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type CommonN64 struct{
Value int64
}
func (pOwn *CommonN64) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeN64(aBuffer[nOffset:], aSize-nOffset, pOwn.Value)
return nOffset
}
func (pOwn *CommonN64) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.Value, nTemp = deserializeN64(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type CommonU8 struct{
Value uint8
}
func (pOwn *CommonU8) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeU8(aBuffer[nOffset:], aSize-nOffset, pOwn.Value)
return nOffset
}
func (pOwn *CommonU8) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.Value, nTemp = deserializeU8(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type CommonU16 struct{
Value uint16
}
func (pOwn *CommonU16) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeU16(aBuffer[nOffset:], aSize-nOffset, pOwn.Value)
return nOffset
}
func (pOwn *CommonU16) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.Value, nTemp = deserializeU16(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type CommonU32 struct{
Value uint32
}
func (pOwn *CommonU32) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeU32(aBuffer[nOffset:], aSize-nOffset, pOwn.Value)
return nOffset
}
func (pOwn *CommonU32) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.Value, nTemp = deserializeU32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type CommonU64 struct{
Value uint64
}
func (pOwn *CommonU64) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeU64(aBuffer[nOffset:], aSize-nOffset, pOwn.Value)
return nOffset
}
func (pOwn *CommonU64) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.Value, nTemp = deserializeU64(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type CommonF32 struct{
Value float32
}
func (pOwn *CommonF32) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeF32(aBuffer[nOffset:], aSize-nOffset, pOwn.Value)
return nOffset
}
func (pOwn *CommonF32) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.Value, nTemp = deserializeF32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type CommonF64 struct{
Value float64
}
func (pOwn *CommonF64) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeF64(aBuffer[nOffset:], aSize-nOffset, pOwn.Value)
return nOffset
}
func (pOwn *CommonF64) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.Value, nTemp = deserializeF64(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type CommonStr struct{
Value string
}
func (pOwn *CommonStr) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeSTR(aBuffer[nOffset:], aSize-nOffset, pOwn.Value)
return nOffset
}
func (pOwn *CommonStr) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.Value, nTemp = deserializeSTR(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type Login struct{
UID string
}
func (pOwn *Login) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeSTR(aBuffer[nOffset:], aSize-nOffset, pOwn.UID)
return nOffset
}
func (pOwn *Login) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.UID, nTemp = deserializeSTR(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type LoginResp struct{
ResCode uint8
PlayerID uint64
Renamed bool
PlayerName string
Level int32
Exp uint64
QiYun int32
Age uint64
SelectFaction int32
HierarchyLv int32
}
func (pOwn *LoginResp) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeU8(aBuffer[nOffset:], aSize-nOffset, pOwn.ResCode)
nOffset += serializeU64(aBuffer[nOffset:], aSize-nOffset, pOwn.PlayerID)
nOffset += serializeBOOL(aBuffer[nOffset:], aSize-nOffset, pOwn.Renamed)
nOffset += serializeSTR(aBuffer[nOffset:], aSize-nOffset, pOwn.PlayerName)
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, pOwn.Level)
nOffset += serializeU64(aBuffer[nOffset:], aSize-nOffset, pOwn.Exp)
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, pOwn.QiYun)
nOffset += serializeU64(aBuffer[nOffset:], aSize-nOffset, pOwn.Age)
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, pOwn.SelectFaction)
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, pOwn.HierarchyLv)
return nOffset
}
func (pOwn *LoginResp) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.ResCode, nTemp = deserializeU8(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.PlayerID, nTemp = deserializeU64(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Renamed, nTemp = deserializeBOOL(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.PlayerName, nTemp = deserializeSTR(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Level, nTemp = deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Exp, nTemp = deserializeU64(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.QiYun, nTemp = deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Age, nTemp = deserializeU64(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.SelectFaction, nTemp = deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.HierarchyLv, nTemp = deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type ChangeName struct{
PlayerName string
}
func (pOwn *ChangeName) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeSTR(aBuffer[nOffset:], aSize-nOffset, pOwn.PlayerName)
return nOffset
}
func (pOwn *ChangeName) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.PlayerName, nTemp = deserializeSTR(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type SyncLevel struct{
Level int32
Exp uint64
QiYun int32
}
func (pOwn *SyncLevel) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, pOwn.Level)
nOffset += serializeU64(aBuffer[nOffset:], aSize-nOffset, pOwn.Exp)
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, pOwn.QiYun)
return nOffset
}
func (pOwn *SyncLevel) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.Level, nTemp = deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Exp, nTemp = deserializeU64(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.QiYun, nTemp = deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type SyncXiuLianInfo struct{
TotalLingQi int32
ItemID int32
GetTime int64
EndTime int64
}
func (pOwn *SyncXiuLianInfo) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, pOwn.TotalLingQi)
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, pOwn.ItemID)
nOffset += serializeN64(aBuffer[nOffset:], aSize-nOffset, pOwn.GetTime)
nOffset += serializeN64(aBuffer[nOffset:], aSize-nOffset, pOwn.EndTime)
return nOffset
}
func (pOwn *SyncXiuLianInfo) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.TotalLingQi, nTemp = deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.ItemID, nTemp = deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.GetTime, nTemp = deserializeN64(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.EndTime, nTemp = deserializeN64(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type HierarchyUp struct{
HierarchyID int32
}
func (pOwn *HierarchyUp) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, pOwn.HierarchyID)
return nOffset
}
func (pOwn *HierarchyUp) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.HierarchyID, nTemp = deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type SelectFaction struct{
FactionID int32
}
func (pOwn *SelectFaction) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, pOwn.FactionID)
return nOffset
}
func (pOwn *SelectFaction) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.FactionID, nTemp = deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type FightInfo struct{
RedPlayerID uint64
BluePlayerID uint64
RedPlayerName string
BluePlayerName string
Win int32
}
func (pOwn *FightInfo) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeU64(aBuffer[nOffset:], aSize-nOffset, pOwn.RedPlayerID)
nOffset += serializeU64(aBuffer[nOffset:], aSize-nOffset, pOwn.BluePlayerID)
nOffset += serializeSTR(aBuffer[nOffset:], aSize-nOffset, pOwn.RedPlayerName)
nOffset += serializeSTR(aBuffer[nOffset:], aSize-nOffset, pOwn.BluePlayerName)
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, pOwn.Win)
return nOffset
}
func (pOwn *FightInfo) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.RedPlayerID, nTemp = deserializeU64(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.BluePlayerID, nTemp = deserializeU64(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.RedPlayerName, nTemp = deserializeSTR(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.BluePlayerName, nTemp = deserializeSTR(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Win, nTemp = deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type OnlinePlayerInfo struct{
PlayerID uint64
PlayerName string
}
func (pOwn *OnlinePlayerInfo) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeU64(aBuffer[nOffset:], aSize-nOffset, pOwn.PlayerID)
nOffset += serializeSTR(aBuffer[nOffset:], aSize-nOffset, pOwn.PlayerName)
return nOffset
}
func (pOwn *OnlinePlayerInfo) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.PlayerID, nTemp = deserializeU64(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.PlayerName, nTemp = deserializeSTR(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type AllOnlinePlayerInfo struct{
mAllPlayer []*OnlinePlayerInfo
}
func (pOwn *AllOnlinePlayerInfo) GetAllPlayerCount() int32 { return int32(len(pOwn.mAllPlayer)) }
func (pOwn *AllOnlinePlayerInfo) GetAllPlayerAt(aIdx int32) *OnlinePlayerInfo { return pOwn.mAllPlayer[aIdx] }
func (pOwn *AllOnlinePlayerInfo) AppendAllPlayer(aData *OnlinePlayerInfo) {
 if pOwn.mAllPlayer == nil { pOwn.mAllPlayer = make([]*OnlinePlayerInfo, 0, 8) }
 pOwn.mAllPlayer = append(pOwn.mAllPlayer, aData)
 }
func (pOwn *AllOnlinePlayerInfo) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nAllPlayerCount := len(pOwn.mAllPlayer)
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, int32(nAllPlayerCount))
for i := 0; i < nAllPlayerCount; i++ { nOffset += pOwn.mAllPlayer[i].Serialize(aBuffer[nOffset:], aSize-nOffset) }
return nOffset
}
func (pOwn *AllOnlinePlayerInfo) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
nAllPlayerCount, nTemp := deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
for i := 0; i < int(nAllPlayerCount); i++ {
var obj OnlinePlayerInfo
nOffset += obj.Deserialize(aBuffer[nOffset:], aSize-nOffset)
if pOwn.mAllPlayer == nil { pOwn.mAllPlayer = make([]*OnlinePlayerInfo, 0, 8) }
pOwn.mAllPlayer = append(pOwn.mAllPlayer, &obj)
}
return nOffset
}
type T1 struct{
Value1 int32
Value2 float32
Value3 string
}
func (pOwn *T1) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, pOwn.Value1)
nOffset += serializeF32(aBuffer[nOffset:], aSize-nOffset, pOwn.Value2)
nOffset += serializeSTR(aBuffer[nOffset:], aSize-nOffset, pOwn.Value3)
return nOffset
}
func (pOwn *T1) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.Value1, nTemp = deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Value2, nTemp = deserializeF32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Value3, nTemp = deserializeSTR(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type T2 struct{
Value1 int32
Value2 float32
Value3 string
Value4 int32
}
func (pOwn *T2) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, pOwn.Value1)
nOffset += serializeF32(aBuffer[nOffset:], aSize-nOffset, pOwn.Value2)
nOffset += serializeSTR(aBuffer[nOffset:], aSize-nOffset, pOwn.Value3)
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, pOwn.Value4)
return nOffset
}
func (pOwn *T2) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.Value1, nTemp = deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Value2, nTemp = deserializeF32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Value3, nTemp = deserializeSTR(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Value4, nTemp = deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
return nOffset
}
type Test struct{
Value0 bool
Value1 int8
Value2 int16
Value3 int32
Value4 int64
Value5 uint8
Value6 uint16
Value7 uint32
Value8 uint64
Value9 float32
Value10 float64
Value11 string
Value12 T1
mValue13 []*T2
mValue14 []int32
mValue15 []string
}
func (pOwn *Test) GetValue13Count() int32 { return int32(len(pOwn.mValue13)) }
func (pOwn *Test) GetValue13At(aIdx int32) *T2 { return pOwn.mValue13[aIdx] }
func (pOwn *Test) AppendValue13(aData *T2) {
 if pOwn.mValue13 == nil { pOwn.mValue13 = make([]*T2, 0, 8) }
 pOwn.mValue13 = append(pOwn.mValue13, aData)
 }
func (pOwn *Test) GetValue14Count() int32 { return int32(len(pOwn.mValue14)) }
func (pOwn *Test) GetValue14At(aIdx int32) int32 { return pOwn.mValue14[aIdx] }
func (pOwn *Test) AppendValue14(aData int32) {
 if pOwn.mValue14 == nil { pOwn.mValue14 = make([]int32, 0, 8) }
 pOwn.mValue14 = append(pOwn.mValue14, aData)
 }
func (pOwn *Test) GetValue15Count() int32 { return int32(len(pOwn.mValue15)) }
func (pOwn *Test) GetValue15At(aIdx int32) string { return pOwn.mValue15[aIdx] }
func (pOwn *Test) AppendValue15(aData string) {
 if pOwn.mValue15 == nil { pOwn.mValue15 = make([]string, 0, 8) }
 pOwn.mValue15 = append(pOwn.mValue15, aData)
 }
func (pOwn *Test) Serialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
nOffset += serializeBOOL(aBuffer[nOffset:], aSize-nOffset, pOwn.Value0)
nOffset += serializeN8(aBuffer[nOffset:], aSize-nOffset, pOwn.Value1)
nOffset += serializeN16(aBuffer[nOffset:], aSize-nOffset, pOwn.Value2)
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, pOwn.Value3)
nOffset += serializeN64(aBuffer[nOffset:], aSize-nOffset, pOwn.Value4)
nOffset += serializeU8(aBuffer[nOffset:], aSize-nOffset, pOwn.Value5)
nOffset += serializeU16(aBuffer[nOffset:], aSize-nOffset, pOwn.Value6)
nOffset += serializeU32(aBuffer[nOffset:], aSize-nOffset, pOwn.Value7)
nOffset += serializeU64(aBuffer[nOffset:], aSize-nOffset, pOwn.Value8)
nOffset += serializeF32(aBuffer[nOffset:], aSize-nOffset, pOwn.Value9)
nOffset += serializeF64(aBuffer[nOffset:], aSize-nOffset, pOwn.Value10)
nOffset += serializeSTR(aBuffer[nOffset:], aSize-nOffset, pOwn.Value11)
nOffset += pOwn.Value12.Serialize(aBuffer[nOffset:], aSize-nOffset)
nValue13Count := len(pOwn.mValue13)
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, int32(nValue13Count))
for i := 0; i < nValue13Count; i++ { nOffset += pOwn.mValue13[i].Serialize(aBuffer[nOffset:], aSize-nOffset) }
nValue14Count := len(pOwn.mValue14)
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, int32(nValue14Count))
for i := 0; i < nValue14Count; i++ { nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, pOwn.mValue14[i]) }
nValue15Count := len(pOwn.mValue15)
nOffset += serializeN32(aBuffer[nOffset:], aSize-nOffset, int32(nValue15Count))
for i := 0; i < nValue15Count; i++ { nOffset += serializeSTR(aBuffer[nOffset:], aSize-nOffset, pOwn.mValue15[i]) }
return nOffset
}
func (pOwn *Test) Deserialize(aBuffer []byte, aSize uint32) uint32{
var nOffset uint32
var nTemp uint32
pOwn.Value0, nTemp = deserializeBOOL(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Value1, nTemp = deserializeN8(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Value2, nTemp = deserializeN16(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Value3, nTemp = deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Value4, nTemp = deserializeN64(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Value5, nTemp = deserializeU8(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Value6, nTemp = deserializeU16(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Value7, nTemp = deserializeU32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Value8, nTemp = deserializeU64(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Value9, nTemp = deserializeF32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Value10, nTemp = deserializeF64(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
pOwn.Value11, nTemp = deserializeSTR(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
nOffset += pOwn.Value12.Deserialize(aBuffer[nOffset:], aSize-nOffset)
nValue13Count, nTemp := deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
for i := 0; i < int(nValue13Count); i++ {
var obj T2
nOffset += obj.Deserialize(aBuffer[nOffset:], aSize-nOffset)
if pOwn.mValue13 == nil { pOwn.mValue13 = make([]*T2, 0, 8) }
pOwn.mValue13 = append(pOwn.mValue13, &obj)
}
nValue14Count, nTemp := deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
for i := 0; i < int(nValue14Count); i++ {
obj, nTemp := deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
if pOwn.mValue14 == nil { pOwn.mValue14 = make([]int32, 0, 8) }
pOwn.mValue14 = append(pOwn.mValue14, obj)
}
nValue15Count, nTemp := deserializeN32(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
for i := 0; i < int(nValue15Count); i++ {
obj, nTemp := deserializeSTR(aBuffer[nOffset:], aSize-nOffset)
nOffset += nTemp
if pOwn.mValue15 == nil { pOwn.mValue15 = make([]string, 0, 8) }
pOwn.mValue15 = append(pOwn.mValue15, obj)
}
return nOffset
}
const (
C2S_LOGIN = 1
S2C_LOGIN_RESP = 2
C2S_CHANGE_NAME = 3
S2C_CHANGE_NAME_RESP = 4
C2S_XIULIAN_INFO = 5
C2S_START_XIULIAN = 6
S2C_SYNC_XIULIAN_INFO = 7
C2S_GET_XIULIAN_EXP = 8
C2S_LEVEL_UP = 9
S2C_SYNC_LEVEL = 10
S2C_SYNC_AGE = 11
C2S_GET_SERVER_TIME = 12
S2C_SYNC_SERVER_TIME = 13
C2S_HIERARCHY_UP = 14
S2C_HIERARCHY_UP_RESP = 15
C2S_SELECTFACTION = 16
S2C_SELECTFACTION_RESP = 17
C2S_ATK_PLAYER = 18
S2C_ATK_PLAYER_RESP = 19
C2S_GET_ALL_ONLINE_PLAYER = 20
S2C_GET_ALL_ONLINE_PLAYER_RESP = 21
C2S_TEST = 22
S2C_TEST_RESP = 23
)


text:
package main

import (
	"net"
	"fmt"
)

func main() {
	bs := []byte("hello")

	conn, err := net.Dial("tcp", "localhost:9999")
	if err != nil {
		panic(err)
	}

	fmt.Println("1")
	_, err = conn.Write(bs)
	if err != nil {
		panic(err)
	}

	fmt.Println("2")
	buf := make([]byte, 5)
	_, err = conn.Read(buf)
	if err != nil {
		panic(err)
	}

	fmt.Println("return=>", string(buf))
	if err := conn.Close(); err != nil {
		panic(err)
	}
}

repository: langgo/ShowIM

repo_name: langgo/ShowIM


text:
# base recipe: meta-openembedded/meta-oe/recipes-support/daemonize/daemonize_git.bb
# base branch: warrior
# base commit: 7c25fa41fa40f74e36ff487c2ba0c857263093dd

SUMMARY = "A tool to run a command as a daemon"
HOMEPAGE = "http://software.clapper.org/daemonize/"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=3cf9084faa88bc8554a9139d8d7dd35f"

inherit debian-package
require recipes-debian/sources/daemonize.inc
DEBIAN_UNPACK_DIR = "${WORKDIR}/daemonize-release-${PV}"
DEBIAN_PATCH_TYPE = "nopatch"
DEBIAN_QUILT_PATCHES = ""

inherit autotools

SRC_URI += "file://fix-ldflags-for-gnuhash.patch"

EXTRA_AUTORECONF += "--exclude=autoheader"

repository: miraclelinux/meta-debian-extended

repo_name: miraclelinux/meta-debian-extended

branch_name: refs/heads/warrior


text:
package sql

import (
	"flag"
	"io/ioutil"
	"net/url"
	"testing"
	"time"

	"github.com/weaveworks/flux"
	"github.com/weaveworks/flux/db"
	"github.com/weaveworks/flux/history"
	"github.com/weaveworks/flux/service"
)

var (
	databaseSource = flag.String("database-source", "", `Database source name. The default is a temporary DB using ql`)
)

func mkDBFile(t *testing.T) string {
	f, err := ioutil.TempFile("", "fluxy-testdb")
	if err != nil {
		t.Fatal(err)
	}
	return f.Name()
}

func bailIfErr(t *testing.T, err error) {
	if err != nil {
		t.Fatal(err)
	}
}

func newSQL(t *testing.T) history.DB {
	if *databaseSource == "" {
		*databaseSource = "file://" + mkDBFile(t)
	}

	u, err := url.Parse(*databaseSource)
	if err != nil {
		t.Fatal(err)
	}

	if _, err = db.Migrate(*databaseSource, "../../db/migrations"); err != nil {
		t.Fatal(err)
	}

	db, err := NewSQL(db.DriverForScheme(u.Scheme), *databaseSource)
	if err != nil {
		t.Fatal(err)
	}
	return db
}

func TestHistoryLog(t *testing.T) {
	instance := service.InstanceID("instance")
	db := newSQL(t)
	defer db.Close()

	bailIfErr(t, db.LogEvent(instance, history.Event{
		ServiceIDs: []flux.ResourceID{flux.MustParseResourceID("namespace/service")},
		Type:       "test",
		Message:    "event 1",
	}))
	bailIfErr(t, db.LogEvent(instance, history.Event{
		ServiceIDs: []flux.ResourceID{flux.MustParseResourceID("namespace/other")},
		Type:       "test",
		Message:    "event 3",
	}))
	bailIfErr(t, db.LogEvent(instance, history.Event{
		ServiceIDs: []flux.ResourceID{flux.MustParseResourceID("namespace/service")},
		Type:       "test",
		Message:    "event 2",
	}))

	es, err := db.EventsForService(instance, flux.MustParseResourceID("namespace/service"), time.Now().UTC(), -1, time.Unix(0, 0))
	if err != nil {
		t.Fatal(err)
	}
	if len(es) != 2 {
		t.Fatalf("Expected 2 events, got %d\n", len(es))
	}
	checkInDescOrder(t, es)

	es, err = db.AllEvents(instance, time.Now().UTC(), -1, time.Unix(0, 0))
	if err != nil {
		t.Fatal(err)
	}
	if len(es) != 3 {
		t.Fatalf("Expected 3 events, got %#v\n", es)
	}
	checkInDescOrder(t, es)
}

func checkInDescOrder(t *testing.T, events []history.Event) {
	var last time.Time = time.Now()
	for _, event := range events {
		if event.StartedAt.After(last) {
			t.Fatalf("Events out of order: %+v > %s", event, last)
		}
		last = event.StartedAt
	}
}

repository: ContainerSolutions/flux

repo_name: ContainerSolutions/flux


text:
file(REMOVE_RECURSE
  "CMakeFiles/spl_assignment.dir/src/Agent.cpp.obj"
  "CMakeFiles/spl_assignment.dir/src/Graph.cpp.obj"
  "CMakeFiles/spl_assignment.dir/src/Session.cpp.obj"
  "CMakeFiles/spl_assignment.dir/src/Tree.cpp.obj"
  "CMakeFiles/spl_assignment.dir/src/main.cpp.obj"
  "libspl_assignment.dll.a"
  "spl_assignment.exe"
  "spl_assignment.exe.manifest"
  "spl_assignment.pdb"
)

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

repository: danielpiro/corona-simulator

repo_name: danielpiro/corona-simulator

branch_name: refs/heads/main


text:
package cmd

import (
	"log"
	"pomo/rofi"

	"github.com/spf13/cobra"
)

func rofiMode() error {
	choice, err := rofi.Dmenu("pomo> ", "No timer currently running.", "start", "stop", "pause", "list")
	if err != nil {
		return err
	}
	switch choice {
	case "start":
		// err = start()
	case "stop":
		// err = stop()
	case "pause":
	case "list":
		// err = list()
	}
	return err
}

func init() {
	rootCmd.AddCommand(dmenuCmd)
}

var (
	dmenuCmd = &cobra.Command{
		Use:   "dmenu",
		Short: "Run rofi in dmenu mode",
		Long:  `Run rofi in dmenu mode`,
		Run: func(cmd *cobra.Command, args []string) {
			if err := rofiMode(); err != nil {
				log.Fatal(err)
			}
		},
	}
)

repository: awalker/pomo

repo_name: awalker/pomo


text:
#include "tree_classifier.hpp"

TreeClassifier::TreeClassifier() :
    IClassifier(),
    _class( ObstacleClass::_tree ),
    _type( TreeType::_NONE )
{
}

TreeClassifier::TreeClassifier(const TreeClassifier& other) :
    IClassifier( other ),
    _class( other._class ),
    _type( other._type )
{
}

int TreeClassifier::get_class() const {
    return static_cast<int>(_class);
}

int TreeClassifier::get_type() const {
    return static_cast<int>(_type);
}

void TreeClassifier::set_type(int type) {
    _type = static_cast< TreeType >(type);
}

TreeClassifier& TreeClassifier::operator=(const TreeClassifier& other) {
    _class = other._class;
    _type = other._type;
    return *this;
}

extension: cpp


text:
DESCRIPTION = "Task to add multimedia related packages"
LICENSE = "MIT"
PR = "r13"

inherit packagegroup

PACKAGE_ARCH = "${MACHINE_ARCH}"

MULTIMEDIA = ""

MULTIMEDIA_append_omap3 = " \
    amsdk-av-files \
"

MULTIMEDIA_append_ti33x = " \
    amsdk-av-files \
"

MULTIMEDIA_append_ti43x = " \
    dual-camera-demo \
    image-gallery \
    amsdk-av-files \
"

MULTIMEDIA_append_omap-a15 = " \
    amsdk-av-files \
"

MULTIMEDIA_append_dra7xx = " \
    hevc-arm-decoder \
"

MULTIMEDIA_append_am37x-evm = " \
    av-examples \
"

MULTIMEDIA_append_omap5-evm = " \
    abefw \
    "

MULTIMEDIA_append_am3517-evm = " \
    av-examples \
"

ACCEL_FW = ""
ACCEL_FW_append_am57xx-evm = " \
    ${@base_contains('MACHINE_FEATURES', 'mmip', 'ipumm-fw', '', d)} \
    "

ACCEL_FW_append_omap5-evm = " \
    ${@base_contains('MACHINE_FEATURES', 'mmip', 'ipumm-fw', '', d)} \
    "

ACCEL_FW_append_dra7xx-evm = " \
    ${@base_contains('MACHINE_FEATURES', 'mmip', 'ipumm-fw', '', d)} \
    vis \
    "

RDEPENDS_${PN} = "\
    packagegroup-arago-gst \
    ${MULTIMEDIA} \
    ${ACCEL_FW} \
"

repository: varigit/meta-arago-var

repo_name: varigit/meta-arago-var