text:
DESCRIPTION = "Compile AT91 board device tree overlays and pack them in a FIT image"
LICENSE = "(GPL-2.0-or-later & MIT)"
LIC_FILES_CHKSUM = "file://COPYING;md5=775626b7bc958bdcc525161f725ece0f \
                    file://LICENSES/GPL-2.0;md5=e6a75371ba4d16749254a51215d13f97 \
                    file://LICENSES/MIT;md5=e8f57dd048e186199433be2c41bd3d6d"

inherit deploy

COMPATIBLE_MACHINE = '(sama5d3-xplained|sama5d3-xplained-sd|at91sam9x5ek|at91sam9x5ek-sd|sama5d4-xplained|sama5d4-xplained-sd|sama5d2-xplained|sama5d2-xplained-sd|sama5d2-xplained-emmc|sama5d2-ptc-ek|sama5d2-ptc-ek-sd|sama5d27-som1-ek|sama5d27-som1-ek-sd|sama5d2-icp-sd|sam9x60ek|sam9x60ek-sd|sama5d27-wlsom1-ek-sd|sama7g5ek|sam9x60-curiosity|sam9x60-curiosity-sd)'

SRC_URI = "git://github.com/linux4microchip/dt-overlay-mchp.git;protocol=https;branch=master"

PV = "1.0+git${SRCPV}"
SRCREV = "bdf2622b85398f650b564c327ea62ecee0fcebfd"

DEPENDS = "virtual/kernel u-boot-mkimage-native dtc-native"

S = "${WORKDIR}/git"
PACKAGE_ARCH = "${MACHINE_ARCH}"

# Ensure that the machine is properly set
AT91BOOTSTRAP_MACHINE ??= "${MACHINE}"

do_compile[depends] += "virtual/kernel:do_deploy virtual/kernel:do_shared_workdir"
do_compile[nostamp] = "1"

do_compile () {
    # Check to properly identify the board
    if [ -z "${AT91BOOTSTRAP_MACHINE}" ]; then
        bbnote "No AT91BOOTSTRAP_MACHINE set for ${MACHINE}"
        exit 1
    fi

    if [ -d "${AT91BOOTSTRAP_MACHINE}" ]; then
        bbnote "Compiling DTBOs"
        oe_runmake DTC=dtc KERNEL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${KERNEL_PATH} ${AT91BOOTSTRAP_MACHINE}_dtbos
    else
        bbnote "No DTBOs to compile"
    fi

    # Over-ride itb target in Makefile
    if [ -e "${AT91BOOTSTRAP_MACHINE}.its" ]; then
        bbnote "Creating the FIT image"
        DTC_OPTIONS="-Wno-unit_address_vs_reg -Wno-graph_child_address -Wno-pwms_property"
        mkimage -D "-i${DEPLOY_DIR_IMAGE} -p 1000 ${DTC_OPTIONS}" -f ${AT91BOOTSTRAP_MACHINE}.its ${AT91BOOTSTRAP_MACHINE}.itb
    else
        bbnote "No its file to create FIT images"
    fi
}

FILES:${PN} = "/boot/*.*"

addtask install after do_compile

do_install () {
    # Copy files to /boot
    if [ -e ${AT91BOOTSTRAP_MACHINE} ]; then
        install -d ${D}/boot
        install ${AT91BOOTSTRAP_MACHINE}/${AT91BOOTSTRAP_MACHINE}*.dtbo ${D}/boot
    fi;

    if [ -e ${AT91BOOTSTRAP_MACHINE}.itb ]; then
        install -d ${D}/boot
        install ${AT91BOOTSTRAP_MACHINE}.itb ${D}/boot/
        install ${AT91BOOTSTRAP_MACHINE}.its ${D}/boot/
    fi;
}

addtask deploy after do_install

do_deploy () {
    #bbnote "Copying ${fit_image_basename}.itb and source file to ${DEPLOYDIR}..."
    if [ -e ${AT91BOOTSTRAP_MACHINE}.itb ]; then
        install ${AT91BOOTSTRAP_MACHINE}.itb ${DEPLOYDIR}/
        install ${AT91BOOTSTRAP_MACHINE}.its ${DEPLOYDIR}/
    fi;
}

branch_name: refs/heads/kirkstone


text:
require wpewebkit.inc

DEFAULT_PREFERENCE = "-1"

SVNBRANCH = "trunk"
SVNREV ?= "251467"

# To enable this recipe set on local.conf
# PREFERRED_VERSION_wpewebkit = "1.trunk%"
# To select a different SVN version you can also set on local.conf
# SVNREV = "$numberofsvnrev"

PV = "1.trunk-${SVNREV}"

SRC_URI = " \
    svn://svn.webkit.org/repository/webkit;module=${SVNBRANCH};rev=${SVNREV};protocol=https \
"
S = "${WORKDIR}/${SVNBRANCH}"

DEPENDS += " libwpe"

license: MIT

repository: tactical-drone/meta-webkit

license_type: permissive

repo_name: tactical-drone/meta-webkit

branch_name: refs/heads/master

extension: bb


text:
@article{Menounos-2019-Heterogeneous,
    title = "Heterogeneous Changes in Western North American Glaciers Linked to Decadal Variability in Zonal Wind Strength",
    author = "Menounos, B.  and
      Hugonnet, R.  and
      Shean, D.  and
      Gardner, A.  and
      Howat, I.  and
      Berthier, E.  and
      Pelto, B.  and
      Tennant, C.  and
      Shea, J.  and
      Noh, Myoung‐Jong  and
      Brun, F.  and
      Dehecq, A.",
    journal = "Geophysical Research Letters, Volume 46, Issue 1",
    volume = "46",
    number = "1",
    year = "2019",
    publisher = "American Geophysical Union (AGU)",
    url = "https://aclanthology.org/G19-116001",
    doi = "10.1029/2018gl080942",
    pages = "200--209",
}

repository: gwf-uwaterloo/gwf-publications

repo_name: gwf-uwaterloo/gwf-publications

branch_name: refs/heads/main

gha_language: Python

extension: bib


text:
DESCRIPTION = "Library for playing audio prompts"
HOMEPAGE = "https://github.com/kolibre/libkolibre-narrator"
AUTHOR = "Kolibre"
LICENSE = "LGPLv2.1"
SECTION = "libs"

LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"

PR = "r0"

SRC_URI = "https://github.com/kolibre/${PN}/archive/${PN}-${PV}.tar.gz"
SRC_URI += "file://no_doxygen.patch;apply=yes;striplevel=1"
SRC_URI += "file://play_wait_from_file.patch;apply=yes;striplevel=1"

SRC_URI[md5sum] = "be697455ef15c90610230a6dab1982ff"
SRC_URI[sha256sum] = "b9cb02a8914f9d72d6e875cb6f93f105712e468ebd5c8f3d736507bb13153d8f"

DEPENDS = "autoconf-archive boost log4cxx libvorbis mpg123 portaudio-v19 soundtouch sqlite3"

EXTRA_OECONF = "--with-boost=${STAGING_LIBDIR}/.."

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

inherit autotools autotools-brokensep pkgconfig

do_install_append() {
    # install wait.ogg file to datadir
    install -d ${D}${datadir}/${PN}
    install -m 644 ${S}/utils/special/wait.ogg ${D}${datadir}/${PN}

    # install narrator-utils in staging area for use by other packages
    install -d ${STAGING_BINDIR_NATIVE}
    install -m 0755 ${D}${bindir}/narrator-utils ${STAGING_BINDIR_NATIVE}/

    # change paths to make script usable
    sed -i s,^prefix=.*,prefix=${STAGING_BINDIR}/../..${prefix}, ${STAGING_BINDIR_NATIVE}/narrator-utils
    sed -i s,^exec_prefix=.*,exec_prefix=${STAGING_BINDIR}/../..${exec_prefix}, ${STAGING_BINDIR_NATIVE}/narrator-utils
}

PROVIDES += "${PN}-utils"
PACKAGES += "${PN}-utils"

# We don't add any runtime dependencies to the utils package because we use it natively
#RDEPENDS_${PN}-utils += "espeak sox vorbis-tools"

FILES_${PN}-utils += "/usr/bin/narrator-utils \
        /usr/share/libkolibre/narrator/*.csv \
        /usr/share/libkolibre/narrator/*.db \
        /usr/lib/python*/* \
        "

repository: kolibre/meta-kolibre

repo_name: kolibre/meta-kolibre


text:
DESCRIPTION = "GNOME library for reading .desktop files"
SECTION = "x11/gnome"
LICENSE = "GPLv2 & LGPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
                    file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2"

PR = "r6"

inherit gnome pkgconfig

SRC_URI[archive.md5sum] = "5c80d628a240eb9d9ff78913b31f2f67"
SRC_URI[archive.sha256sum] = "55cbecf67efe1fa1e57ac966520a7c46d799c8ba3c652a1219f60cafccb3739d"

DEPENDS += "gconf libxrandr virtual/libx11 gtk+ glib-2.0 gnome-doc-utils startup-notification"

EXTRA_OECONF = "--disable-scrollkeeper --disable-desktop-docs"

do_configure_prepend () {
    cp ${STAGING_DATADIR_NATIVE}/gnome-common/data/omf.make ${S}
    sed -i -e s:^#!@PYTHON@:#!${bindir}/python: ${S}/gnome-about/gnome-about.in
}

PACKAGES =+ "libgnome-desktop"
FILES_libgnome-desktop = "${libdir}/lib*${SOLIBS} ${datadir}/libgnome-desktop/pnp.ids"
FILES_${PN} += "${datadir}/gnome-about"

# for gnome-about
RRECOMMENDS_${PN} += "python-pygtk python-pycairo"

repository: ExorEmbedded/exor-workspace

repo_name: ExorEmbedded/exor-workspace


text:
SUMMARY = "Light download accelerator - console version"
SECTION = "security"
LICENSE = "GPLv2+"

LIC_FILES_CHKSUM = "file://COPYING;beginline=1;endline=2;md5=1fbd81241fe252ec0f5658a521ab7dd8"

SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/universe/a/${PN}/${PN}_${PV}.orig.tar.gz"

SRC_URI[md5sum] = "77711d2e8e7129894cbbbeaaab5b0edd"
SRC_URI[sha256sum] = "02376767e7f9e6c4292333e69ad0f615f62be5df176a8daaee395f25b0ab1a83"

inherit autotools-brokensep

do_configure () {
    cd ${S}
    ./configure --prefix=${prefix} --debug=0 --strip=0 --i18n=0
}

do_compile () {
    cd ${S}
    make CC='${CC}' CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'
}

do_install () {
    cd ${B}
    install -d ${D}/${mandir}/man1
    install -d ${D}/${bindir}
    install -d ${D}/${sysconfdir}/axelrc
    install -m 644 man/axel.1 ${D}/${mandir}/man1
    install -m 644 axelrc.example ${D}/${sysconfdir}/axelrc
    install -m 644 axel ${D}/${bindir}
}

repository: akuster/meta-kali

repo_name: akuster/meta-kali


text:
package spatial

import (
	"reflect"
	"testing"

	"github.com/jakubDoka/goml/core"
	"github.com/jakubDoka/mlok/logic/memory/gen"
	"github.com/jakubDoka/mlok/mat"
)

func TestMinHahs(t *testing.T) {
	coll := []int{}
	h := NMinHash(4, 4, mat.V(10, 10))
	h.Insert(&mat.Point{}, mat.V(1, 1), 0, 0)
	h.Insert(&mat.Point{}, mat.V(40, 40), 1, 0)
	h.Insert(&mat.Point{}, mat.V(20, 20), 2, 0)
	testCases := []struct {
		desc string
		res  []int
		area mat.AABB
	}{
		{"corner", []int{0, 2}, mat.A(0, 0, 15, 15)},
		{"all", []int{0, 2, 1}, mat.A(-20, -20, 100, 100)},
		{"nothing", []int{0}, mat.A(-100, -100, -100, -100)},
	}
	for _, tC := range testCases {
		t.Run(tC.desc, func(t *testing.T) {
			coll = coll[:0]
			h.Query(tC.area, coll, 0, true)
			if !reflect.DeepEqual(tC.res, coll) {
				t.Error(coll, tC.res)
				return
			}
		})
	}
}

func BenchmarkHasherReinsert(b *testing.B) {
	h := NMinHash(4, 4, mat.V(10, 10))
	adr := mat.Point{}
	for i := 0; i < b.N; i++ {
		h.Insert(&adr, mat.ZV, 0, 0)
		h.Remove(adr, 0, 0)
	}
}

func BenchmarkHasherUpdate(b *testing.B) {
	h := NMinHash(4, 4, mat.V(10, 10))
	adr := mat.Point{}
	h.Insert(&adr, mat.ZV, 0, 0)
	for i := 0; i < b.N; i++ {
		h.Update(&adr, mat.ZV, 0, 0)
	}
}

func BenchmarkHasherQuery(b *testing.B) {
	h := NMinHash(4, 4, mat.V(10, 10))
	adr := mat.Point{}
	h.Insert(&adr, mat.ZV, 0, 0)
	var buff []int
	for i := 0; i < b.N; i++ {
		buff = h.Query(mat.ZA, buff[:0], 0, true)
	}
}

func BenchmarkHasherNoIter(b *testing.B) {
	for i := 0; i < b.N; i++ {
		for y := 0; y < 10; y++ {
			for x := 0; x < 10; x++ {
				prj(x, y, 100)
			}
		}
	}
}

func BenchmarkHahsMap(b *testing.B) {
	ln := 100
	mp := make(map[int]struct{}, ln)
	for i := 0; i < b.N; i++ {
		for i := 0; i < ln; i++ {
			mp[i] = struct{}{}
		}
		for i := 0; i < ln; i++ {
			delete(mp, i)
		}
	}
}

func BenchmarkVecInsert(b *testing.B) {
	ln := 100
	v := make(gen.IntSet, ln)
	for i := 0; i < b.N; i++ {
		for i := 0; i < ln; i++ {
			v.Insert(i)
		}
		for i := 0; i < ln; i++ {
			v = v[:0]
		}
	}
}

func Test(t *testing.T) {
	v := []int{0, 1, 2, 3, 4, 5}
	copy(v[2:], v[1:])
	core.TestEqual(t, v, []int{0, 0, 1, 2, 3, 4})
}

repository: jakubDoka/mlok

repo_name: jakubDoka/mlok

extension: go


text:
#
# A sample of image generator only using debootstrap
#
# NOTE: sudo is temporally used, so NOPASSWD required in sudoers
# TODO: Support multiarch packages and cross image generation
#

# packages in non local apt repositories (Debian mirrors)
DEB_RDEPENDS = "openssh-server"

# packages in the local apt repository provided by individual recipes
RDEPENDS = "hello foo"
do_rootfs[rdeptask] = "do_deploy_deb"

# TODO: If multiple repositories provide the same package,
# the highest version is selected even if the local repository
# includes the package that user intentionally customized.
INSTALL_PKGS = "${DEB_RDEPENDS} ${RDEPENDS}"

ROOTFS = "${WORKDIR}/rootfs"

ROOTFS_APT_REPO_DIR = "/apt"
ROOTFS_SOURCES_LIST = "/etc/apt/sources.list.d/local.list"

SUDO = "sudo -E http_proxy=${http_proxy}"
CHROOT = "${SUDO} chroot ${ROOTFS}"

# TODO: drop root privilege using fakeroot/fakechroot
do_rootfs[dirs] = "${WORKDIR}"
do_rootfs() {
	if [ -d ${ROOTFS} ]; then
		bbnote "Cleaning old rootfs directory"
		${SUDO} rm -r ${ROOTFS}
	fi
	bbnote "Running debootstrap"
	${SUDO} debootstrap ${DEBIAN_CODENAME} ${ROOTFS} ${DEBIAN_REPO}

	bbnote "Copying local apt repository to rootfs"
	${SUDO} cp -r ${APT_REPO_DIR} ${ROOTFS}/${ROOTFS_APT_REPO_DIR}
	# TODO: create Release file (now ignored by trusted=yes)
	bbnote "Registering local apt repository to apt in rootfs"
	${CHROOT} sh -c "echo \"deb [trusted=yes] file://${ROOTFS_APT_REPO_DIR} ${DEBIAN_CODENAME} main\" \
		> ${ROOTFS_SOURCES_LIST}"
	${CHROOT} apt update

	bbnote "Upgrading packages available in local apt repository"
	${CHROOT} apt full-upgrade -y

	bbnote "Installing required packages"
	${CHROOT} apt install -y ${INSTALL_PKGS}

	# TODO: Run postinst commands

	# deploy tarball
	mkdir -p ${DEPLOY_DIR}
	bbnote "Packing rootfs"
	cd ${ROOTFS}
	${SUDO} tar czf ${DEPLOY_DIR}/${PN}-${MACHINE}.tar.gz .

	# TODO: generate the final rootfs image (ext4, tarball, etc.)
}
addtask rootfs before do_build

repository: toshiba/meta-eid

repo_name: toshiba/meta-eid


text:
@inproceedings{LiYu10,
 address = {San Diego, CA, USA},
 author = {Ming Li and Shucheng Yu and Kui Ren and Wenjing Lou},
 booktitle = {Proc. of IEEE INFOCOM},
 day = {15-19},
 month = {March},
 title = {Group device pairing based secure sensor association and key management for body area networks},
 year = {2010}
}


text:
package sqs

import (
	"errors"
	"fmt"
	"time"
)

const twelveHoursInSeconds = 43200

// OptionFunc definition for configuring the component in a functional way.
type OptionFunc func(*Component) error

// MaxMessages option for setting the max number of messages fetched.
// Allowed values are between 1 and 10.
// If messages can be processed very quickly, maxing out this value is fine, otherwise having a high value is risky as it might trigger the visibility timeout.
// Having a value too small isn't recommended either, as it increases the number of SQS API requests, thus AWS costs.
func MaxMessages(maxMessages int64) OptionFunc {
	return func(c *Component) error {
		if maxMessages <= 0 || maxMessages > 10 {
			return errors.New("max messages should be between 1 and 10")
		}
		c.cfg.maxMessages = &maxMessages
		return nil
	}
}

// PollWaitSeconds sets the wait time for the long polling mechanism in seconds.
// Allowed values are between 0 and 20. 0 enables short polling.
func PollWaitSeconds(pollWaitSeconds int64) OptionFunc {
	return func(c *Component) error {
		if pollWaitSeconds < 0 || pollWaitSeconds > 20 {
			return errors.New("poll wait seconds should be between 0 and 20")
		}
		c.cfg.pollWaitSeconds = &pollWaitSeconds
		return nil
	}
}

// VisibilityTimeout sets the time a message is invisible after it has been requested.
// This is a built-in resiliency mechanism so that, should the consumer fail to acknowledge the message within such timeout,
// it will become visible again and thus available for retries.
// Allowed values are between 0 and 12 hours in seconds.
func VisibilityTimeout(visibilityTimeout int64) OptionFunc {
	return func(c *Component) error {
		if visibilityTimeout < 0 || visibilityTimeout > twelveHoursInSeconds {
			return fmt.Errorf("visibility timeout should be between 0 and %d seconds", twelveHoursInSeconds)
		}
		c.cfg.visibilityTimeout = &visibilityTimeout
		return nil
	}
}

// QueueStatsInterval sets the interval at which we retrieve AWS SQS stats.
func QueueStatsInterval(interval time.Duration) OptionFunc {
	return func(c *Component) error {
		if interval == 0 {
			return errors.New("sqsAPI stats interval should be a positive value")
		}
		c.stats.interval = interval
		return nil
	}
}

// Retries sets the error retries of the component.
func Retries(count uint) OptionFunc {
	return func(c *Component) error {
		c.retry.count = count
		return nil
	}
}

// RetryWait sets the wait period for the component retry.
func RetryWait(interval time.Duration) OptionFunc {
	return func(c *Component) error {
		if interval <= 0 {
			return errors.New("retry wait time should be a positive number")
		}
		c.retry.wait = interval
		return nil
	}
}

repository: aziule/patron

repo_name: aziule/patron

gha_language: Go


text:
#
# @file opw_kinematics_macros.cmae
# @brief Common OPW Kinematics CMake Macros
#
# @author Levi Armstrong
# @date February 17, 2021
# @version TODO
# @bug No known bugs
#
# @copyright Copyright (c) 2021, Southwest Research Institute
#
# @par License
# Software License Agreement (Apache License)
# @par
# 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
# @par
# 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.

macro(opw_variables)
  if (NOT DEFINED BUILD_SHARED_LIBS)
    set(BUILD_SHARED_LIBS ON)
  endif()

  if (NOT DEFINED OPW_ENABLE_CLANG_TIDY)
    set(OPW_ENABLE_CLANG_TIDY OFF)
  endif()

  if (NOT DEFINED OPW_ENABLE_CODE_COVERAGE)
    set(OPW_ENABLE_CODE_COVERAGE OFF)
  elseif(OPW_ENABLE_CODE_COVERAGE)
    set(OPW_ENABLE_TESTING ON)
  endif()

  if (NOT DEFINED OPW_ENABLE_TESTING)
    set(OPW_ENABLE_TESTING OFF)
  endif()

  if (NOT DEFINED OPW_ENABLE_RUN_TESTING)
    set(OPW_ENABLE_RUN_TESTING OFF)
  endif()

  if (OPW_ENABLE_TESTING_ALL)
    set(OPW_ENABLE_TESTING ON)
    set(OPW_ENABLE_CLANG_TIDY ON)
    set(OPW_ENABLE_CODE_COVERAGE ON)
  endif()

  set(OPW_COMPILE_DEFINITIONS "")
  set(OPW_COMPILE_OPTIONS_PUBLIC "")
  set(OPW_COMPILE_OPTIONS_PRIVATE "")
  if (NOT OPW_ENABLE_TESTING AND NOT OPW_ENABLE_TESTING_ALL)
    set(OPW_CLANG_TIDY_ARGS "-header-filter=.*"
      "-line-filter=[{'name':'ikfast.h','lines':[[9999999,9999999]]}, {'name':'abb_irb2400_manipulator_ikfast_solver.cpp','lines':[[9999999,9999999]]}, {'name':'.h'}, {'name':'.hpp'}, {'name':'.cpp'}]"
      "-checks=-*, \
      clang-analyzer-*, \
      bugprone-*, \
      cppcoreguidelines-avoid-goto, \
      cppcoreguidelines-c-copy-assignment-signature, \
      cppcoreguidelines-interfaces-global-init, \
      cppcoreguidelines-narrowing-conversions, \
      cppcoreguidelines-no-malloc, \
      cppcoreguidelines-slicing, \
      cppcoreguidelines-special-member-functions, \
      misc-*, \
      -misc-non-private-member-variables-in-classes, \
      modernize-*, \
      -modernize-use-trailing-return-type, \
      -modernize-use-nodiscard, \
      performance-*, \
      readability-avoid-const-params-in-decls, \
      readability-container-size-empty, \
      readability-delete-null-pointer, \
      readability-deleted-default, \
      readability-else-after-return, \
      readability-function-size, \
      readability-identifier-naming, \
      readability-inconsistent-declaration-parameter-name, \
      readability-misleading-indentation, \
      readability-misplaced-array-index, \
      readability-non-const-parameter, \
      readability-redundant-*, \
      readability-simplify-*, \
      readability-static-*, \
      readability-string-compare, \
      readability-uniqueptr-delete-release, \
      readability-rary-objects")
    if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
      set(OPW_COMPILE_OPTIONS_PRIVATE -Wall -Wextra -Wconversion -Wsign-conversion -Wno-sign-compare -Wnon-virtual-dtor)
      exec_program(uname ARGS -p OUTPUT_VARIABLE CMAKE_SYSTEM_NAME2)
      if ( NOT CMAKE_SYSTEM_NAME2 MATCHES "aarch64" AND NOT CMAKE_SYSTEM_NAME2 MATCHES "armv7l" AND NOT CMAKE_SYSTEM_NAME2 MATCHES "unknown" )
        set(OPW_COMPILE_OPTIONS_PUBLIC -mno-avx)
      endif()
    elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
      set(OPW_COMPILE_OPTIONS_PRIVATE -Wall -Wextra -Wconversion -Wsign-conversion)
      message(WARNING "Non-GNU compiler detected. If using AVX instructions, Eigen alignment issues may result.")
    elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
      set(OPW_COMPILE_DEFINITIONS "_USE_MATH_DEFINES=ON")
      message(WARNING "Non-GNU compiler detected. If using AVX instructions, Eigen alignment issues may result.")
    else()
      message(WARNING "${CMAKE_CXX_COMPILER_ID} Unsupported compiler detected.")
    endif()
  else()
    set(OPW_CLANG_TIDY_ARGS "-header-filter=.*"
      "-line-filter=[{'name':'ikfast.h','lines':[[9999999,9999999]]}, {'name':'abb_irb2400_manipulator_ikfast_solver.cpp','lines':[[9999999,9999999]]}, {'name':'.h'}, {'name':'.hpp'}, {'name':'.cpp'}]"
      "-checks=-*, \
      clang-analyzer-*, \
      bugprone-*, \
      cppcoreguidelines-avoid-goto, \
      cppcoreguidelines-c-copy-assignment-signature, \
      cppcoreguidelines-interfaces-global-init, \
      cppcoreguidelines-narrowing-conversions, \
      cppcoreguidelines-no-malloc, \
      cppcoreguidelines-slicing, \
      cppcoreguidelines-special-member-functions, \
      misc-*, \
      -misc-non-private-member-variables-in-classes, \
      modernize-*, \
      -modernize-use-trailing-return-type, \
      -modernize-use-nodiscard, \
      performance-*, \
      readability-avoid-const-params-in-decls, \
      readability-container-size-empty, \
      readability-delete-null-pointer, \
      readability-deleted-default, \
      readability-else-after-return, \
      readability-function-size, \
      readability-identifier-naming, \
      readability-inconsistent-declaration-parameter-name, \
      readability-misleading-indentation, \
      readability-misplaced-array-index, \
      readability-non-const-parameter, \
      readability-redundant-*, \
      readability-simplify-*, \
      readability-static-*, \
      readability-string-compare, \
      readability-uniqueptr-delete-release, \
      readability-rary-objects" "-warnings-as-errors=-*, \
      clang-analyzer-*, \
      bugprone-*, \
      cppcoreguidelines-avoid-goto, \
      cppcoreguidelines-c-copy-assignment-signature, \
      cppcoreguidelines-interfaces-global-init, \
      cppcoreguidelines-narrowing-conversions, \
      cppcoreguidelines-no-malloc, \
      cppcoreguidelines-slicing, \
      cppcoreguidelines-special-member-functions, \
      misc-*, \
      -misc-non-private-member-variables-in-classes, \
      modernize-*, \
      -modernize-use-trailing-return-type, \
      -modernize-use-nodiscard, \
      performance-*, \
      readability-avoid-const-params-in-decls, \
      readability-container-size-empty, \
      readability-delete-null-pointer, \
      readability-deleted-default, \
      readability-else-after-return, \
      readability-function-size, \
      readability-identifier-naming, \
      readability-inconsistent-declaration-parameter-name, \
      readability-misleading-indentation, \
      readability-misplaced-array-index, \
      readability-non-const-parameter, \
      readability-redundant-*, \
      readability-simplify-*, \
      readability-static-*, \
      readability-string-compare, \
      readability-uniqueptr-delete-release, \
      readability-rary-objects")
    if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
      set(OPW_COMPILE_OPTIONS_PRIVATE -Werror=all -Werror=extra -Werror=conversion -Werror=sign-conversion -Wno-sign-compare -Werror=non-virtual-dtor)
      exec_program(uname ARGS -p OUTPUT_VARIABLE CMAKE_SYSTEM_NAME2)
      if ( NOT CMAKE_SYSTEM_NAME2 MATCHES "aarch64" AND NOT CMAKE_SYSTEM_NAME2 MATCHES "armv7l" AND NOT CMAKE_SYSTEM_NAME2 MATCHES "unknown" )
        set(OPW_COMPILE_OPTIONS_PUBLIC -mno-avx)
      endif()
    elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
      set(OPW_COMPILE_OPTIONS_PRIVATE -Werror=all -Werror=extra -Werror=conversion -Werror=sign-conversion)
      message(WARNING "Non-GNU compiler detected. If using AVX instructions, Eigen alignment issues may result.")
    elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
      set(OPW_COMPILE_DEFINITIONS "_USE_MATH_DEFINES=ON")
      message(WARNING "Non-GNU compiler detected. If using AVX instructions, Eigen alignment issues may result.")
    else()
      message(WARNING "${CMAKE_CXX_COMPILER_ID} Unsupported compiler detected.")
    endif()
  endif()

  set(OPW_CXX_VERSION 11)
endmacro()

extension: cmake


text:
SUMMARY = "Civetweb embedded web server"
HOMEPAGE = "https://github.com/civetweb/civetweb"

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=50bd1d7f135b50d7e218996ba28d0d88"

SRCREV = "4b440a339979852d5a51fb11a822952712231c23"
PV = "1.12+git${SRCPV}"
SRC_URI = "git://github.com/civetweb/civetweb.git;branch=master;protocol=https \
           file://0001-Unittest-Link-librt-and-libm-using-l-option.patch \
           "

S = "${WORKDIR}/git"

# civetweb supports building with make or cmake (although cmake lacks few features)
inherit cmake

# Disable Lua and Duktape because they do not compile from CMake (as of v1.8, v1.9 and v1.10).
# Disable ASAN as it is included only in Debug build.
EXTRA_OECMAKE = " \
    -DBUILD_SHARED_LIBS=ON \
    -DCIVETWEB_ENABLE_DUKTAPE=OFF \
    -DCIVETWEB_ENABLE_LUA=OFF \
    -DCIVETWEB_ENABLE_ASAN=OFF \
    -DCIVETWEB_BUILD_TESTING=OFF \
"

# Building with ninja fails on missing third_party/lib/libcheck.a (which
# should come from external CMake project)
OECMAKE_GENERATOR = "Unix Makefiles"

PACKAGECONFIG ??= "caching ipv6 server ssl websockets"
PACKAGECONFIG[caching] = "-DCIVETWEB_DISABLE_CACHING=OFF,-DCIVETWEB_DISABLE_CACHING=ON,"
PACKAGECONFIG[cgi] = "-DCIVETWEB_DISABLE_CGI=OFF,-DCIVETWEB_DISABLE_CGI=ON,"
PACKAGECONFIG[cpp] = "-DCIVETWEB_ENABLE_CXX=ON,-DCIVETWEB_ENABLE_CXX=OFF,"
PACKAGECONFIG[debug] = "-DCIVETWEB_ENABLE_MEMORY_DEBUGGING=ON,-DCIVETWEB_ENABLE_MEMORY_DEBUGGING=OFF,"
PACKAGECONFIG[ipv6] = "-DCIVETWEB_ENABLE_IPV6=ON,-DCIVETWEB_ENABLE_IPV6=OFF,"
PACKAGECONFIG[server] = "-DCIVETWEB_ENABLE_SERVER_EXECUTABLE=ON -DCIVETWEB_INSTALL_EXECUTABLE=ON,-DCIVETWEB_ENABLE_SERVER_EXECUTABLE=OFF -DCIVETWEB_INSTALL_EXECUTABLE=OFF,"
PACKAGECONFIG[ssl] = "-DCIVETWEB_ENABLE_SSL=ON -DCIVETWEB_SSL_OPENSSL_API_1_1=OFF -DCIVETWEB_ENABLE_SSL_DYNAMIC_LOADING=OFF,-DCIVETWEB_ENABLE_SSL=OFF,openssl (=1.0.2%),"
PACKAGECONFIG[websockets] = "-DCIVETWEB_ENABLE_WEBSOCKETS=ON,-DCIVETWEB_ENABLE_WEBSOCKETS=OFF,"

BBCLASSEXTEND = "native"

repository: openembedded/meta-openembedded

repo_name: openembedded/meta-openembedded

gha_license_id: MIT

gha_language: BitBake


text:
package latency

import (
	"reflect"
	"testing"
	"time"
)

// ExampleLatencyTracking creates a histogram with 10 buckets and records an event that took 16ms (16000us).
func ExampleHistogram() {
	h := &Histogram{
		Buckets:    make([]int, 10),
		Resolution: time.Millisecond,
	}
	h.Record(16 * time.Millisecond)
}

func TestLatencyTrack(t *testing.T) {
	var tests = []struct {
		d time.Duration
		b int64
	}{
		{time.Duration(1 * time.Millisecond), 0},
		{time.Duration(2 * time.Millisecond), 1},
		{time.Duration(3 * time.Millisecond), 2},
		{time.Duration(4 * time.Millisecond), 2},
		{time.Duration(8 * time.Millisecond), 3},
		{time.Duration(16 * time.Millisecond), 4},
		{time.Duration(16 * time.Millisecond), 4},
		{time.Duration(16 * time.Millisecond), 4},
		{time.Duration(16 * time.Millisecond), 4},
		{time.Duration(16 * time.Millisecond), 4},
		{time.Duration(16 * time.Millisecond), 4},
		{time.Duration(16 * time.Millisecond), 4},
		{time.Duration(16 * time.Millisecond), 4},
		{time.Duration(16 * time.Millisecond), 4},
		{time.Duration(16 * time.Millisecond), 4},
		{time.Duration(100 * time.Millisecond), 7},
		{time.Duration(1 * time.Second), 10},
	}

	h := &Histogram{
		Buckets:    make([]int, 0),
		Resolution: time.Millisecond,
	}
	for _, x := range tests {
		h.Record(x.d)
	}
	want := []int{1, 1, 2, 1, 10, 0, 0, 1, 0, 0, 1}
	if !reflect.DeepEqual([]int(h.Buckets), want) {
		t.Fatalf("Bucket = %v, wanted %v", h.Buckets, want)
	}
}

repository: nictuku/latency

repo_name: nictuku/latency


text:
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7 FATAL_ERROR)

INCLUDE(FindPackageHandleStandardArgs)

FIND_LIBRARY(TH_LIBRARY TH)
FIND_PATH(TH_INCLUDE_DIR "TH.h" PATHS "${CMAKE_PREFIX_PATH}/include/TH")

SET(TH_LIBRARIES ${TH_LIBRARY})

FIND_PACKAGE_HANDLE_STANDARD_ARGS(
  TH
  REQUIRED_ARGS
    TH_INCLUDE_DIR
    TH_LIBRARY)

repository: GuodongXie/docmt-memnn

repo_name: GuodongXie/docmt-memnn


text:
package slack

type SlackError struct {
	ErrorType string
}

func NewSlackError(errorType string) SlackError {
	return SlackError{
		ErrorType: errorType,
	}
}

func (e SlackError) Error() string {
	return e.ErrorType
}

repository: recapco/slack

repo_name: recapco/slack


text:
package commands

import (
	"bytes"
	"fmt"
	pl "github.com/Mrs4s/power-liner"
	"github.com/Mrs4s/six-cli/models"
	"github.com/Mrs4s/six-cli/shell"
	"github.com/Mrs4s/six-cli/six_cloud"
	"github.com/jackpal/bencode-go"
	"strconv"
	"strings"
	"time"
)

func init() {
	alias["Preview"] = []string{"pw"}
}

func (CommandHandler) Preview(c *pl.Context) {
	if len(c.Nokeys) != 1 {
		fmt.Println("[H] 使用方法: pw <文件>")
		return
	}
	path := c.Nokeys[0]
	if !strings.HasPrefix(path, "/") {
		path = models.CombinePaths(shell.CurrentPath, path, "/")
	}
	file, err := shell.CurrentUser.GetFileByPath(path)
	if err != nil {
		fmt.Println("[!] 获取失败:", err)
		return
	}
	fmt.Println("[I] 文件名:", file.Name)
	fmt.Println("[I] 绝对路径:", file.Path)
	fmt.Println("[I] 文件大小:", file.Size, "("+models.ConvertSizeString(file.Size)+")")
	fmt.Println("[I] 文件夹:", file.IsDir)
	fmt.Println("[I] 创建时间:", time.Unix(file.CreateTime/1000, 0).In(time.FixedZone("CST", 8*3600)).Format("2006-01-02 15:04:05"))
	fmt.Println("[I] Mime:", file.Mime)
	if !file.IsDir {
		fmt.Println("[I] Hash:", file.ETag)
	}
	switch strings.ToLower(models.GetFileExtension(file.Name)) {
	case "txt", "ini", "inf":
		previewText(file)
	case "torrent":
		previewTorrent(file)
	}
}

func previewText(file *six_cloud.SixFile) {
	if file.Size < 1024*1024 {
		addr, err := file.GetDownloadAddress()
		if err == nil {
			text := shell.CurrentUser.Client.GetString(addr)
			if text != "" {
				fmt.Println()
				fmt.Println("[I] 预览: ")
				fmt.Println()
				lines := strings.Split(text, "\n")
				for i, line := range lines {
					fmt.Println("["+strconv.FormatInt(int64(i+1), 10)+"]:", line)
				}
			}
		}
	}
}

func previewTorrent(file *six_cloud.SixFile) {
	if file.Size < 1024*1024*5 {
		addr, err := file.GetDownloadAddress()
		if err == nil {
			b, err := shell.CurrentUser.Client.GetBytes(addr)
			if err == nil {
				fmt.Println()
				fmt.Println("[I] 预览: ")
				fmt.Println()
				dir, err := bencode.Decode(bytes.NewReader(b))
				if err != nil {
					fmt.Println("[!] 生成预览失败:", err)
					return
				}
				info, ok := dir.(map[string]interface{})["info"]
				if !ok {
					fmt.Println("[!] 生成预览失败: INFO字段不存在")
					return
				}
				fmt.Println("[T] Torrent名:", info.(map[string]interface{})["name"])
				if anno, ok := dir.(map[string]interface{})["announce"]; ok {
					fmt.Println("[T] Announce:", anno)
				}
				if commt, ok := dir.(map[string]interface{})["comment"]; ok {
					fmt.Println("[T] 评论:", commt)
				}
				if cb, ok := dir.(map[string]interface{})["created by"]; ok {
					fmt.Println("[T] 创建工具:", cb)
				}
				if sou, ok := info.(map[string]interface{})["source"]; ok {
					fmt.Println("[T] 来源:", sou)
				}
				if files, ok := info.(map[string]interface{})["files"]; ok {
					var size int64
					for _, sub := range files.([]interface{}) {
						if length, ok := sub.(map[string]interface{})["length"]; ok {
							size += length.(int64)
						}
					}
					fmt.Println("[T] 文件数量", len(files.([]interface{})), "个, 总大小", models.ConvertSizeString(size))
				} else if length, ok := info.(map[string]interface{})["length"]; ok {
					fmt.Println("[T] 文件数量 1 个, 总大小", models.ConvertSizeString(length.(int64)))
				}
			}
		}
	}
}

func (CommandHandler) PreviewCompleter(c *pl.Context) []string {
	return PathCompleter(c, true)
}

repository: flylai/six-cli

repo_name: flylai/six-cli


text:
@article{siegel2014colorectal,
  title="{Colorectal cancer statistics, 2014}",
  author={Siegel, Rebecca and DeSantis, Carol and Jemal, Ahmedin},
  journal={CA: a cancer journal for clinicians},
  volume={64},
  number={2},
  pages={104--117},
  year={2014},
  publisher={Wiley Online Library}
}

@article{centers2013vital,
  title={Vital signs: colorectal cancer screening test use--United States, 2012.},
  author="{Centers for Disease Control and Prevention}",
  journal={MMWR. Morbidity and mortality weekly report},
  volume={62},
  number={44},
  pages={881},
  year={2013}
}

@article{hsia2000importance,
  title="{The importance of health insurance as a determinant of cancer screening: evidence from the Women's Health Initiative}",
  author={Hsia, Judith and Kemper, Elizabeth and Kiefe, Catarina and Zapka, Jane and Sofaer, Shoshanna and Pettinger, Mary and Bowen, Deborah and Limacher, Marian and Lillington, Linda and Mason, Ellen and others},
  journal={Preventive medicine},
  volume={31},
  number={3},
  pages={261--270},
  year={2000},
  publisher={Elsevier}
}

@article{jones2010barriers,
  title="{Patient-reported barriers to colorectal cancer screening: a mixed-methods analysis}",
  author={Jones, Resa M and Devers, Kelly J and Kuzel, Anton J and Woolf, Steven H},
  journal={American journal of preventive medicine},
  volume={38},
  number={5},
  pages={508--516},
  year={2010},
  publisher={Elsevier}
}

@article{bibbins2016screening,
  title={Screening for colorectal cancer: US Preventive Services Task Force recommendation statement},
  author={Bibbins-Domingo, Kirsten and Grossman, David C and Curry, Susan J and Davidson, Karina W and Epling, John W and Garc{\'\i}a, Francisco AR and Gillman, Matthew W and Harper, Diane M and Kemper, Alex R and Krist, Alex H and others},
  journal={JAMA},
  volume={315},
  number={23},
  pages={2564--2575},
  year={2016},
  publisher={American Medical Association}
}

@article{hundt2009comparative,
  title="{Comparative evaluation of immunochemical fecal occult blood tests for colorectal adenoma detection}",
  author={Hundt, Sabrina and Haug, Ulrike and Brenner, Hermann},
  journal={Annals of Internal Medicine},
  volume={150},
  number={3},
  pages={162--169},
  year={2009},
  publisher={Am Coll Physicians}
}

@article{imperiale2014multitarget,
  title="{Multitarget stool DNA testing for colorectal-cancer screening}",
  author={Imperiale, Thomas F and Ransohoff, David F and Itzkowitz, Steven H and Levin, Theodore R and Lavin, Philip and Lidgard, Graham P and Ahlquist, David A and Berger, Barry M},
  journal={New England Journal of Medicine},
  volume={370},
  number={14},
  pages={1287--1297},
  year={2014},
  publisher={Mass Medical Soc}
}

@article{zeller2014potential,
  title="{Potential of fecal microbiota for early-stage detection of colorectal cancer}",
  author={Zeller, Georg and Tap, Julien and Voigt, Anita Y and Sunagawa, Shinichi and Kultima, Jens Roat and Costea, Paul I and Amiot, Aur{\'e}lien and B{\"o}hm, J{\"u}rgen and Brunetti, Francesco and Habermann, Nina and others},
  journal={Molecular systems biology},
  volume={10},
  number={11},
  pages={766},
  year={2014},
  publisher={EMBO Press}
}

@article{yu2015metagenomic,
  title={Metagenomic analysis of faecal microbiome as a tool towards targeted non-invasive biomarkers for colorectal cancer},
  author={Yu, Jun and Feng, Qiang and Wong, Sunny Hei and Zhang, Dongya and yi Liang, Qiao and Qin, Youwen and Tang, Longqing and Zhao, Hui and Stenvang, Jan and Li, Yanli and others},
  journal={Gut},
  pages={gutjnl--2015},
  year={2015},
  publisher={BMJ Publishing Group Ltd and British Society of Gastroenterology}
}

@article{zackular2014human,
  title="{The human gut microbiome as a screening tool for colorectal cancer}",
  author={Zackular, Joseph P and Rogers, Mary AM and Ruffin, Mack T and Schloss, Patrick D},
  journal={Cancer Prevention Research},
  volume={7},
  number={11},
  pages={1112--1121},
  year={2014},
  publisher={AACR}
}

@article{baxter2016microbiota,
  title="{Microbiota-based model improves the sensitivity for detecting colonic lesions}",
  author={Baxter, Nielson T and Ruffin, Mack T and Rogers, Mary AM and Schloss, Patrick D},
  journal={Genome Medicine},
  volume={8},
  number={37},
  pages={1--10},
  year={2016},
  publisher={BMC}
}

@article{miseq,
  title="{Development of a dual-index sequencing strategy and curation pipeline for analyzing amplicon sequence data on the MiSeq Illumina sequencing platform}",
  author={Kozich, James J and Westcott, Sarah L and Baxter, Nielson T and Highlander, Sarah K and Schloss, Patrick D},
  journal={Applied and environmental microbiology},
  volume={79},
  number={17},
  pages={5112--5120},
  year={2013},
  publisher={Am Soc Microbiol}
}

@article{mothur,
  title="{Introducing mothur: open-source, platform-independent, community-supported software for describing and comparing microbial communities}",
  author={Schloss, Patrick D and Westcott, Sarah L and Ryabin, Thomas and Hall, Justine R and Hartmann, Martin and Hollister, Emily B and Lesniewski, Ryan A and Oakley, Brian B and Parks, Donovan H and Robinson, Courtney J and others},
  journal={Applied and environmental microbiology},
  volume={75},
  number={23},
  pages={7537--7541},
  year={2009},
  publisher={Am Soc Microbiol}
}

@article{wang2007naive,
  title={Naive Bayesian classifier for rapid assignment of rRNA sequences into the new bacterial taxonomy},
  author={Wang, Qiong and Garrity, George M and Tiedje, James M and Cole, James R},
  journal={Applied and environmental microbiology},
  volume={73},
  number={16},
  pages={5261--5267},
  year={2007},
  publisher={Am Soc Microbiol}
}

@article{calle2011auc,
  title="{AUC-RF: A new strategy for genomic profiling with random forest}",
  author={Calle, M Luz and Urrea, Victor and Boulesteix, A-L and Malats, Nuria},
  journal={Human heredity},
  volume={72},
  number={2},
  pages={121--132},
  year={2011},
  publisher={Karger Publishers}
}

@article{delong1988comparing,
  title="{Comparing the areas under two or more correlated receiver operating characteristic curves: a nonparametric approach}",
  author={DeLong, Elizabeth R and DeLong, David M and Clarke-Pearson, Daniel L},
  journal={Biometrics},
  pages={837--845},
  year={1988},
  publisher={JSTOR}
}

@article{robin2011proc,
  title="{pROC: an open-source package for R and S+ to analyze and compare ROC curves}",
  author={Robin, Xavier and Turck, Natacha and Hainard, Alexandre and Tiberti, Natalia and Lisacek, Fr{\'e}d{\'e}rique and Sanchez, Jean-Charles and M{\"u}ller, Markus},
  journal={BMC bioinformatics},
  volume={12},
  number={1},
  pages={1},
  year={2011},
  publisher={BioMed Central}
}

@article{yue2005similarity,
  title={A similarity measure based on species proportions},
  author={Yue, Jack C and Clayton, Murray K},
  journal={Communications in Statistics-Theory and Methods},
  volume={34},
  number={11},
  pages={2123--2131},
  year={2005},
  publisher={Taylor \& Francis}
}

@article{warren2013co,
  title="{Co-occurrence of anaerobic bacteria in colorectal carcinomas}",
  author={Warren, Ren{\'e} L and Freeman, Douglas J and Pleasance, Stephen and Watson, Peter and Moore, Richard A and Cochrane, Kyla and Allen-Vercoe, Emma and Holt, Robert A},
  journal={Microbiome},
  volume={1},
  number={1},
  pages={16},
  year={2013},
  publisher={BioMed Central Ltd}
}

@article{salter2014reagent,
  title={Reagent and laboratory contamination can critically impact sequence-based microbiome analyses},
  author={Salter, Susannah J and Cox, Michael J and Turek, Elena M and Calus, Szymon T and Cookson, William O and Moffatt, Miriam F and Turner, Paul and Parkhill, Julian and Loman, Nicholas J and Walker, Alan W},
  journal={BMC biology},
  volume={12},
  number={1},
  pages={87},
  year={2014},
  publisher={BioMed Central Ltd}
}

@article{walker201516s,
  title={16S rRNA gene-based profiling of the human infant gut microbiota is strongly influenced by sample processing and PCR primer choice},
  author={Walker, Alan W and Martin, Jennifer C and Scott, Paul and Parkhill, Julian and Flint, Harry J and Scott, Karen P},
  journal={Microbiome},
  volume={3},
  number={1},
  pages={1},
  year={2015},
  publisher={BioMed Central}
}

@article{sinha2015collecting,
  title={Collecting Fecal Samples for Microbiome Analyses in Epidemiology Studies},
  author={Sinha, Rashmi and Chen, Jun and Amir, Amnon and Vogtmann, Emily and Inman, Kristin S and Flores-Munguia, Roberto and Sampson, Joshua N and Knight, Rob and Chia, Nicholas and others},
  journal={Cancer Epidemiology Biomarkers \& Prevention},
  pages={cebp--0951},
  year={2015},
  publisher={AACR}
}

extension: bibtex


text:
package signtransaction

import (
	"github.com/golang/protobuf/proto"
	"github.com/pkg/errors"

	transactionpb "github.com/kinecosystem/agora-api/genproto/transaction/v3"
)

// RequestBody contains the body of a sign transaction request.
type RequestBody struct {
	// EnvelopeXDR is a base64-encoded transaction envelope XDR
	EnvelopeXDR []byte `json:"envelope_xdr"`
	// InvoiceList is a base64-encoded protobuf InvoiceList
	InvoiceList []byte `json:"invoice_list,omitempty"`
}

func RequestBodyFromProto(req *transactionpb.SubmitTransactionRequest) (*RequestBody, error) {
	reqBody := &RequestBody{
		EnvelopeXDR: req.EnvelopeXdr,
	}

	if req.InvoiceList != nil {
		b, err := proto.Marshal(req.InvoiceList)
		if err != nil {
			return nil, errors.New("failed to marshal invoice list")
		}
		reqBody.InvoiceList = b
	}

	return reqBody, nil
}


text:
# - Try to find KmsRtpEndpointLib library

#=============================================================================
# Copyright 2015 Kurento
#
#=============================================================================

set(PACKAGE_VERSION "@PROJECT_VERSION@")
set(KmsRtpEndpointLib_VERSION ${PACKAGE_VERSION})

find_path(KmsRtpEndpointLib_INCLUDE_DIR
  NAMES
    @FIND_HEADERS@
  PATH_SUFFIXES
    src/gst-plugins
    @CUSTOM_PREFIX@
)

set (KMS_RTP_ENDPOINT_BINARY_DIR_PREFIX "build" CACHE PATH "Path prefix used to look for binary files")

if (TARGET kmsrtpendpointlib)

	set (KmsRtpEndpointLib_GENERATED_INCLUDE_DIR "${KMS_RTP_ENDPOINT_BINARY_DIR_PREFIX}/src/gst-plugins/")

else ()

	find_path(KmsRtpEndpointLib_GENERATED_INCLUDE_DIR
  NAMES
    rtpendpoint/kms-rtp-marshal.h
  PATH_SUFFIXES
  ${KMS_RTP_ENDPOINT_BINARY_DIR_PREFIX}/src/gst-plugins
    @CUSTOM_PREFIX@
)

endif ()

set(KmsRtpEndpointLib_INCLUDE_DIRS ${KmsRtpEndpointLib_INCLUDE_DIR} ${KmsRtpEndpointLib_GENERATED_INCLUDE_DIR}
	CACHE INTERNAL "Include directories for KmsRtpEndpointLib library"
)

if (TARGET kmsrtpendpointlib)
  #Just get the target for the library
  set (KmsRtpEndpointLib_LIBRARY kmsrtpendpointlib)
else()

	find_library (KmsRtpEndpointLib_LIBRARY
  NAMES
    kmsrtpendpointlib
  PATH_SUFFIXES
  ${KMS_RTP_ENDPOINT_BINARY_DIR_PREFIX}/src/gst-plugins/rtpendpoint
)

endif()

set (KmsRtpEndpointLib_LIBRARIES ${KmsRtpEndpointLib_LIBRARY}
	CACHE INTERNAL "Libraries for KmsRtpEndpointLib"
)

include (GenericFind)

set (REQUIRED_LIBS "@REQUIRED_LIBS@")
foreach (LIB ${REQUIRED_LIBS})
  string(FIND ${LIB} " " POS)

  if (${POS} GREATER 0)
    string (SUBSTRING ${LIB} 0 ${POS} LIB_NAME)
    string (SUBSTRING ${LIB} ${POS} -1 LIB_VERSION)
    string (STRIP ${LIB_NAME} LIB_NAME)
    string (STRIP ${LIB_VERSION} LIB_VERSION)
    generic_find (LIBNAME ${LIB_NAME} REQUIRED VERSION "${LIB_VERSION}")
  else ()
    generic_find (LIBNAME ${LIB_NAME} REQUIRED)
  endif ()
  list (APPEND REQUIRED_LIBRARIES ${${LIB_NAME}_LIBRARIES})
  list (APPEND REQUIRED_INCLUDE_DIRS ${${LIB_NAME}_INCLUDE_DIRS})

endforeach()

include (FindPackageHandleStandardArgs)

find_package_handle_standard_args(KmsRtpEndpointLib
  FOUND_VAR
  KmsRtpEndpointLib_FOUND
  REQUIRED_VARS
  KmsRtpEndpointLib_VERSION
  KmsRtpEndpointLib_INCLUDE_DIR
  KmsRtpEndpointLib_GENERATED_INCLUDE_DIR
  KmsRtpEndpointLib_INCLUDE_DIRS
  KmsRtpEndpointLib_LIBRARY
  KmsRtpEndpointLib_LIBRARIES
  VERSION_VAR
  KmsRtpEndpointLib_VERSION
)

mark_as_advanced(
	KmsRtpEndpointLib_FOUND
	KmsRtpEndpointLib_VERSION
	KmsRtpEndpointLib_INCLUDE_DIR
	KmsRtpEndpointLib_GENERATED_INCLUDE_DIR
	KmsRtpEndpointLib_INCLUDE_DIRS
	KmsRtpEndpointLib_LIBRARY
	KmsRtpEndpointLib_LIBRARIES
)

repository: Kurento/kms-elements

repo_name: Kurento/kms-elements

gha_language: C

extension: in


text:
package sns_test

import (
	"log"
	"net/url"
	"sync"
	"testing"

	"github.com/eikeon/sns"
)

var SNS sns.SNS

func init() {
	SNS = sns.NewSNS()
}

func TestPublish(t *testing.T) {
	options := url.Values{"TopicArn": []string{"arn:aws:sns:us-east-1:966103638140:ginger-test"}}
	if _, err := SNS.Publish("Hello World", options); err != nil {
		t.Error(err)
	}
}

func bench() {
	options := url.Values{"TopicArn": []string{"arn:aws:sns:us-east-1:966103638140:ginger-test"}}
	if _, err := SNS.Publish("Hello World", options); err != nil {
		log.Println(err)
	}
}

func BenchmarkPublish(b *testing.B) {
	for i := 0; i < b.N; i++ {
		bench()
	}
}

func BenchmarkPublishConcurrent(b *testing.B) {
	C := 16

	items := make(chan int, b.N)
	for i := 0; i < b.N; i++ {
		items <- i
	}
	close(items)

	var wg sync.WaitGroup
	wg.Add(C)
	for i := 0; i < C; i++ {
		go func() {
			for _ = range items {
				bench()
			}
			wg.Done()
		}()
	}
	wg.Wait()

}

repository: eikeon/sns

repo_name: eikeon/sns


text:
DESCRIPTION = "FLTK is a cross-platform C++ GUI toolkit"
HOMEPAGE = "http://www.fltk.org"
SECTION = "libs"
PRIORITY = "optional"
LICENSE = "LGPL"
DEPENDS = "zlib jpeg libpng libxext libxft"

SVNREL = "6671"
PV = "1.9.9+svnr${SVNREL}"

SRC_URI = "\
  http://ftp.easysw.com/pub/fltk/snapshots/fltk-2.0.x-r6671.tar.bz2 \
  file://fix-it-damnit.patch;patch=1 \
"
S = "${WORKDIR}/fltk-2.0.x-r6671"

inherit autotools_stage binconfig

EXTRA_OECONF = "\
  --enable-shared \
  --enable-xdbe \
  --enable-xft \
  --disable-gl \
  --x-includes=${STAGING_INCDIR} \
  --x-libraries=${STAGING_LIBDIR} \
"

do_configure() {
	gnu-configize
	oe_runconf
}

do_install () {
	sed -i "s|^STRIP.*=.*$|STRIP = ${STRIP}|" makeinclude
	sed -i "s|^bindir.*=.*$|bindir = ${D}${bindir}|" makeinclude
	oe_runmake install \
		prefix="${D}${prefix}" \
		bindir="${D}${bindir}" \
		libdir="${D}${libdir}" \
		includedir="${D}${includedir}" \
		datadir="${STAGING_DATADIR}"

	# add missing links
	ln -sf ./libfltk2.so.2.0 ${D}${libdir}/libfltk2.so.2
	ln -sf ./libfltk2_images.so.2.0 ${D}${libdir}/libfltk2_images.so.2
}

PACKAGES =+ "${PN}-fluid ${PN}-images"
FILES_${PN}-fluid = "${bindir}/fluid2"
FILES_${PN} = "${libdir}/lib*.so.*"
FILES_${PN}-images = "${libdir}/libfltk2_images*.so.*"
FILES_${PN}-dev += "${bindir}/fltk2-config"


text:
package service

import "github.com/xusenlin/go_blog/config"

func SetThemeColor(index int)  {

	config.Cfg.ThemeColor = config.Cfg.ThemeOption[index]
	//需要将配置写入app.json吗?
}


text:
package main

import "log"

func main() {
	crypto := NewWithDefaultConfig("76b8e2c3f7c84de0b83eace56d36ae93")

	enc, salt := crypto.Encrypt([]byte("test-ws"))
	log.Println("Encrypt:\t", enc)
	log.Println("Salt:\t", salt)

	dec := crypto.Decrypt(salt, enc)
	log.Println("Dec:\t", dec)

	log.Println("Compare:\t", crypto.CompareEncrypt(enc, salt, "test-ws"))
}

repository: AldiRvn/try-go-crypto

repo_name: AldiRvn/try-go-crypto


text:
package validation

// Required message format
const (
	MsgRequiredFormat = "%[1]s is required"
)

// Required is validation rule that checks value is not empty.
var Required = &requiredRule{
	rule:      newRule(MsgRequiredFormat),
	isEnabled: true,
}

type requiredRule struct {
	*rule
	isEnabled bool
}

// RequiredWhen rules requires when args is true.
func RequiredWhen(b bool) BuiltInFieldRule {
	return &requiredRule{
		rule:      newRule(MsgRequiredFormat),
		isEnabled: b,
	}
}

func (r *requiredRule) Apply(f FieldValue) error {
	if r.isEnabled && IsEmpty(f.Value()) {
		return r.newError(f, f.Label())
	}

	return nil
}

func (r *requiredRule) SetErrorFormat(f string) BuiltInFieldRule {
	r.rule.format = f
	return r
}

func (r *requiredRule) SetParamsMap(f MapParamsFunc) BuiltInFieldRule {
	r.rule.mapParams = f
	return r
}

repository: kamiaka/go-validation

repo_name: kamiaka/go-validation


text:
DESCRIPTION = "ARM Trusted Firmware Juno"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://license.rst;md5=33065335ea03d977d0569f270b39603e"
DEPENDS += "u-boot-juno zip-native"
SRCREV = "b762fc7481c66b64eb98b6ff694d569e66253973"

SRC_URI = "git://github.com/ARM-software/arm-trusted-firmware.git;protocol=https;name=atf;branch=master \
    http://releases.linaro.org/members/arm/platforms/17.04/juno-latest-oe-uboot.zip;name=junofip;subdir=juno-oe-uboot \
"
SRC_URI[junofip.md5sum] = "12fc772de457930fc60e42bdde97eb0a"
SRC_URI[junofip.sha256sum] = "be1a3f8b72a0dd98ba1bf9f4fd5415d3adca052c60b090c5dccc178588ec43bc"

S = "${WORKDIR}/git"

inherit deploy

require atf.inc

COMPATIBLE_MACHINE = "juno"

# ATF requires u-boot.bin file. Ensure it's deployed before we compile.
do_compile[depends] += "u-boot-juno:do_deploy"

# Building for Juno requires a special SCP firmware to be packed with FIP.
# You can refer to the documentation here:
# https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/user-guide.rst#building-a-fip-for-juno-and-fvp
# This must be obtained from the Arm deliverables as released by Linaro:
# https://community.arm.com/dev-platforms/b/documents/posts/linaro-release-notes-deprecated
do_compile() {
    oe_runmake \
      CROSS_COMPILE=${TARGET_PREFIX} \
      all \
      fip \
      PLAT=${COMPATIBLE_MACHINE} \
      SPD=none \
      SCP_BL2=${WORKDIR}/juno-oe-uboot/SOFTWARE/scp_bl2.bin \
      BL33=${DEPLOY_DIR_IMAGE}/u-boot.bin

    # Generate new FIP using our U-boot
    ./tools/fiptool/fiptool update \
      --nt-fw ${DEPLOY_DIR_IMAGE}/u-boot.bin \
      build/${COMPATIBLE_MACHINE}/release/fip.bin
}

# Ensure we deploy kernel/dtb before we create the recovery image.
do_deploy[depends] += "virtual/kernel:do_deploy"
do_deploy() {
    # Create new recovery image
    cp -a \
      build/${COMPATIBLE_MACHINE}/release/bl1.bin \
      build/${COMPATIBLE_MACHINE}/release/fip.bin \
      ${WORKDIR}/juno-oe-uboot/SOFTWARE/

    cp -aL ${DEPLOY_DIR_IMAGE}/Image \
    ${WORKDIR}/juno-oe-uboot/SOFTWARE/Image

    cp -aL ${DEPLOY_DIR_IMAGE}/Image-juno.dtb \
    ${WORKDIR}/juno-oe-uboot/SOFTWARE/juno.dtb

    cp -aL ${DEPLOY_DIR_IMAGE}/Image-juno-r1.dtb \
    ${WORKDIR}/juno-oe-uboot/SOFTWARE/juno-r1.dtb

    cp -aL ${DEPLOY_DIR_IMAGE}/Image-juno-r1.dtb \
    ${WORKDIR}/juno-oe-uboot/SOFTWARE/juno-r2.dtb

    [ -L ${DEPLOY_DIR_IMAGE}/Image-juno-r2.dtb ] && \
    cp -aL ${DEPLOY_DIR_IMAGE}/Image-juno-r2.dtb \
    ${WORKDIR}/juno-oe-uboot/SOFTWARE/juno-r2.dtb

    # Move the ramdisk up in NOR flash to give more space for a larger kernel.
    # This also means that we have less space for the ramdisk, however, on OE
    # systems, we use a stub ramdisk of 576 bytes, so we don't need much space.
    # This will probably break Android, which uses a 1.5MB ramdisk.
    sed -i -e 's/^NOR4ADDRESS:.*/NOR4ADDRESS: 0x02200000          ;Image Flash Address/g' \
      ${WORKDIR}/juno-oe-uboot/SITE1/*/images.txt

    cd ${WORKDIR}/juno-oe-uboot/
    zip -r ${WORKDIR}/juno-oe-uboot.zip .

    # Deploy recovery package
    install -D -p -m0644 ${WORKDIR}/juno-oe-uboot.zip ${DEPLOYDIR}/juno-oe-uboot.zip
}

addtask deploy before do_build after do_compile


text:
/**
 * 堆排序 错误
 */
package main

import (
	// "./binarytree"
	"fmt"
	"sort"
)

func HeapSort(data interface{}, args ...int) {
	if v, ok := data.(sort.Interface); ok {
		heapSort := func(start, end int) {
			fmt.Println("\nS", v)
			root := start
			for {
				child := root*2 + 1
				if child > end {
					break
				}
				if child+1 <= end && v.Less(child, child+1) {
					child++
				}
				if v.Less(root, child) {
					v.Swap(root, child)
				} else {
					break
				}
			}
			fmt.Println("E", v)
		}
		for start := 0; start < v.Len()-2; start++ {
			heapSort(start, v.Len()-1)
		}
		for end := v.Len() - 1; end > 0; end-- {
			v.Swap(0, end)
			heapSort(0, end-1)
		}
	}
}

// func main() {
// 	fmt.Println("Start Sort")
// 	root := binarytree.NewRootNode(1)
// 	root.AddLeftNode("adfsadf")
// 	root.AddRightNode(3)
// 	root.GetRightNode().AddRightNode(5)
// 	root.GetRightNode().AddLeftNode(4)

// 	binarytree.PreOrder(root)
// 	fmt.Println("Sort")
// 	binarytree.InOrder(root)
// 	fmt.Println("Sort")
// 	binarytree.PostOrder(root)
// 	// reflect.ValueOf(root).IsNil()
// 	fmt.Println("End Sort")
// }

repository: ckeyer/algorithms

repo_name: ckeyer/algorithms


text:
package envoy_access_log_server

import (
	"testing"

	v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
	envoy_data_accesslog_v3 "github.com/envoyproxy/go-control-plane/envoy/data/accesslog/v3"
	"github.com/golang/protobuf/ptypes/duration"
	"github.com/golang/protobuf/ptypes/timestamp"
	"github.com/golang/protobuf/ptypes/wrappers"
	"github.com/sirupsen/logrus"
	"github.com/stretchr/testify/assert"

	"github.com/seznam/slo-exporter/pkg/stringmap"
)

var (
	logger = &logrus.Logger{}
)

func Test_exportCommonPropertiesV3(t *testing.T) {
	tests := []struct {
		description    string
		input          envoy_data_accesslog_v3.AccessLogCommon
		expectedResult stringmap.StringMap
	}{
		{
			description: "Empty AccessLogCommon properties",
			input:       envoy_data_accesslog_v3.AccessLogCommon{},
			expectedResult: stringmap.StringMap{
				"sampleRate": "0",
			},
		},
		{
			description: "Non-empty AccessLogCommon properties",
			input: envoy_data_accesslog_v3.AccessLogCommon{
				SampleRate: 1,
				DownstreamDirectRemoteAddress: &v3.Address{Address: &v3.Address_SocketAddress{SocketAddress: &v3.SocketAddress{
					Address:       "127.0.0.1",
					PortSpecifier: &v3.SocketAddress_PortValue{44848},
				}}},
				DownstreamRemoteAddress: &v3.Address{Address: &v3.Address_SocketAddress{SocketAddress: &v3.SocketAddress{
					Address:       "127.0.0.1",
					PortSpecifier: &v3.SocketAddress_PortValue{46058},
				}}},
				DownstreamLocalAddress: &v3.Address{Address: &v3.Address_SocketAddress{SocketAddress: &v3.SocketAddress{
					Address:       "127.0.0.1",
					PortSpecifier: &v3.SocketAddress_PortValue{8080},
				}}},
				TlsProperties: &envoy_data_accesslog_v3.TLSProperties{
					TlsVersion:     4, // TLSv1_3
					TlsCipherSuite: &wrappers.UInt32Value{Value: 4865},
				},
				StartTime: &timestamp.Timestamp{
					Seconds: 1608647248,
					Nanos:   741408000,
				},
				TimeToLastRxByte: &duration.Duration{
					Nanos: 101859,
				},
				TimeToFirstUpstreamTxByte: &duration.Duration{
					Nanos: 490187312,
				},
				TimeToLastUpstreamTxByte: &duration.Duration{
					Nanos: 490187312,
				},
				TimeToFirstUpstreamRxByte: &duration.Duration{
					Nanos: 463920708,
				},
				TimeToLastUpstreamRxByte: &duration.Duration{
					Nanos: 490187312,
				},
				TimeToFirstDownstreamTxByte: &duration.Duration{
					Nanos: 490791797,
				},
				TimeToLastDownstreamTxByte: &duration.Duration{
					Nanos: 490791800,
				},
				UpstreamRemoteAddress: &v3.Address{Address: &v3.Address_SocketAddress{SocketAddress: &v3.SocketAddress{
					Address:       "77.75.75.172",
					PortSpecifier: &v3.SocketAddress_PortValue{443},
				}}},
				UpstreamLocalAddress: &v3.Address{Address: &v3.Address_SocketAddress{SocketAddress: &v3.SocketAddress{
					Address:       "10.0.116.130",
					PortSpecifier: &v3.SocketAddress_PortValue{48734},
				}}},
				UpstreamCluster: "service_seznam_cz",
				ResponseFlags: &envoy_data_accesslog_v3.ResponseFlags{
					ResponseFromCacheFilter: true,
				},
				Metadata:                       nil,
				UpstreamTransportFailureReason: "foo",
				RouteName:                      "foo",

				FilterStateObjects: nil,
			},
			expectedResult: stringmap.StringMap{
				"downstreamDirectRemoteAddress":  "127.0.0.1",
				"downstreamDirectRemotePort":     "44848",
				"downstreamLocalAddress":         "127.0.0.1",
				"downstreamLocalPort":            "8080",
				"downstreamRemoteAddress":        "127.0.0.1",
				"downstreamRemotePort":           "46058",
				"routeName":                      "foo",
				"sampleRate":                     "1",
				"startTime":                      "2020-12-22T14:27:28Z",
				"timeToFirstDownstreamTxByte":    "490791797ns",
				"timeToFirstUpstreamRxByte":      "463920708ns",
				"timeToFirstUpstreamTxByte":      "490187312ns",
				"timeToLastDownstreamTxByte":     "490791800ns",
				"timeToLastRxByte":               "101859ns",
				"timeToLastUpstreamRxByte":       "490187312ns",
				"timeToLastUpstreamTxByte":       "490187312ns",
				"upstreamCluster":                "service_seznam_cz",
				"upstreamLocalAddress":           "10.0.116.130",
				"upstreamLocalPort":              "48734",
				"upstreamRemoteAddress":          "77.75.75.172",
				"upstreamRemotePort":             "443",
				"upstreamTransportFailureReason": "foo",
			},
		},
	}
	for _, tt := range tests {
		f := func(*testing.T) {
			output := envoyV3AccessLogEntryCommonProperties(tt.input).StringMap(logger)
			for k, v := range tt.expectedResult {
				assert.Equal(t, v, output[k], "expected %s=%s", k, v)
			}
		}
		t.Run(tt.description, f)
	}
}

func Test_exportHTTPRequestPropertiesV3(t *testing.T) {
	tests := []struct {
		description    string
		input          envoy_data_accesslog_v3.HTTPRequestProperties
		expectedResult stringmap.StringMap
	}{
		{
			description: "Empty request properties",
			input:       envoy_data_accesslog_v3.HTTPRequestProperties{},
			expectedResult: stringmap.StringMap{
				"requestMethod":       "METHOD_UNSPECIFIED",
				"requestHeadersBytes": "0",
				"requestBodyBytes":    "0",
			},
		},
		{
			description: "Non-empty request properties",
			input: envoy_data_accesslog_v3.HTTPRequestProperties{
				RequestMethod:       1, // GET
				Scheme:              "https",
				Authority:           "www.seznam.cz",
				Path:                "/",
				UserAgent:           "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0",
				Referer:             "xxx",
				ForwardedFor:        "xxx",
				RequestId:           "f1d027b9-8b7f-448a-bbe2-1a3151801af1",
				OriginalPath:        "",
				RequestHeadersBytes: 932,
				RequestBodyBytes:    0,
				RequestHeaders:      map[string]string{"foo": "bar"},
			},
			expectedResult: stringmap.StringMap{
				"requestMethod":       "GET",
				"scheme":              "https",
				"authority":           "www.seznam.cz",
				"path":                "/",
				"userAgent":           "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0",
				"referer":             "xxx",
				"forwardedFor":        "xxx",
				"requestId":           "f1d027b9-8b7f-448a-bbe2-1a3151801af1",
				"requestHeadersBytes": "932",
				"requestBodyBytes":    "0",
				"http_foo":            "bar",
			},
		},
	}

	for _, test := range tests {
		f := func(*testing.T) {
			for k, v := range test.expectedResult {
				assert.Equal(t, v, envoyV3AccessLogEntryHttpRequestProperties(test.input).StringMap(logger)[k], "expected %s=%s", k, v)
			}
		}
		t.Run(test.description, f)
	}
}

func Test_exportHTTPResponsePropertiesV3(t *testing.T) {
	tests := []struct {
		description string
		input       envoy_data_accesslog_v3.HTTPResponseProperties
		result      stringmap.StringMap
	}{
		{
			description: "Empty response properties",
			input:       envoy_data_accesslog_v3.HTTPResponseProperties{},
			result: stringmap.StringMap{
				"responseCode":         "0",
				"responseHeadersBytes": "0",
				"responseBodyBytes":    "0",
				"responseCodeDetails":  "",
			}},
		{
			description: "Non-empty response properties",
			input: envoy_data_accesslog_v3.HTTPResponseProperties{
				ResponseCode:         &wrappers.UInt32Value{Value: 200},
				ResponseHeadersBytes: 166,
				ResponseBodyBytes:    74400,
				ResponseHeaders:      map[string]string{"slo-domain": "userportal", "slo-class": "critical"},
				ResponseTrailers:     map[string]string{"slo-availability-expectedResult": "success"},
				ResponseCodeDetails:  "via_upstream",
			},
			result: stringmap.StringMap{
				"responseCode":                                 "200",
				"responseHeadersBytes":                         "166",
				"responseBodyBytes":                            "74400",
				"sent_http_slo-class":                          "critical",
				"sent_http_slo-domain":                         "userportal",
				"sent_trailer_slo-availability-expectedResult": "success",
				"responseCodeDetails":                          "via_upstream",
			},
		},
	}

	for _, test := range tests {
		f := func(*testing.T) {
			assert.Equal(t, test.result, envoyV3AccessLogEntryHttpResponseProperties(test.input).StringMap(logger))
		}
		t.Run(test.description, f)
	}
}

// Make sure that all HTTP log entry properties are extracted. Just a minimal test case is present,
// full extent extraction of request, response and common properties are to be tested separately within:
// Test_exportHTTPResponsePropertiesV3
// Test_exportHTTPRequestPropertiesV3
// Test_exportCommonPropertiesV3
func Test_exportHttpLogEntryV3(t *testing.T) {
	tests := []struct {
		description    string
		expectedOutput stringmap.StringMap
		logEntry       *envoy_data_accesslog_v3.HTTPAccessLogEntry
	}{
		{
			description: "Minimal HTTP log entry",
			logEntry: &envoy_data_accesslog_v3.HTTPAccessLogEntry{
				CommonProperties: &envoy_data_accesslog_v3.AccessLogCommon{
					SampleRate: 1,
					UpstreamRemoteAddress: &v3.Address{Address: &v3.Address_SocketAddress{SocketAddress: &v3.SocketAddress{
						Address:       "77.75.75.172",
						PortSpecifier: &v3.SocketAddress_PortValue{443},
					}}},
				},
				ProtocolVersion: 2,
				Request: &envoy_data_accesslog_v3.HTTPRequestProperties{
					Scheme:    "http",
					Authority: "www.seznam.cz",
					Path:      "/",
				},
				Response: &envoy_data_accesslog_v3.HTTPResponseProperties{
					ResponseCode: &wrappers.UInt32Value{Value: 200},
				},
			},
			expectedOutput: stringmap.StringMap{
				"authority":             "www.seznam.cz",
				"path":                  "/",
				"protocolVersion":       "HTTP11",
				"responseCode":          "200",
				"sampleRate":            "1",
				"scheme":                "http",
				"upstreamRemoteAddress": "77.75.75.172",
				"upstreamRemotePort":    "443",
			},
		},
	}

	for _, test := range tests {
		f := func(*testing.T) {
			output := envoyV3HttpAccessLogEntry(*test.logEntry).StringMap(logger)
			for k, v := range test.expectedOutput {
				assert.Equal(t, v, output[k], "expected %s=%s", k, v)
			}
		}
		t.Run(test.description, f)
	}
}

func Test_exportTcpLogEntryV3(t *testing.T) {
	tests := []struct {
		description    string
		expectedOutput stringmap.StringMap
		logEntry       *envoy_data_accesslog_v3.TCPAccessLogEntry
	}{
		{
			description: "Full TCP log entry",
			logEntry: &envoy_data_accesslog_v3.TCPAccessLogEntry{
				CommonProperties: &envoy_data_accesslog_v3.AccessLogCommon{
					SampleRate: 1,
					UpstreamRemoteAddress: &v3.Address{Address: &v3.Address_SocketAddress{SocketAddress: &v3.SocketAddress{
						Address:       "77.75.75.172",
						PortSpecifier: &v3.SocketAddress_PortValue{443},
					}}},
				},
				ConnectionProperties: &envoy_data_accesslog_v3.ConnectionProperties{
					ReceivedBytes: uint64(100),
					SentBytes:     uint64(100),
				},
			},
			expectedOutput: stringmap.StringMap{
				"receivedBytes":         "100",
				"sampleRate":            "1",
				"sentBytes":             "100",
				"upstreamCluster":       "",
				"upstreamRemoteAddress": "77.75.75.172",
				"upstreamRemotePort":    "443",
			}},
	}

	for _, test := range tests {
		f := func(*testing.T) {
			for k, v := range test.expectedOutput {
				assert.Equal(t, v, envoyV3TcpAccessLogEntry(*test.logEntry).StringMap(logger)[k], "expected %s=%s", k, v)
			}
		}
		t.Run(test.description, f)
	}
}


text:
@article{raitsos_silk_2014,
 abstract = {Changes in phytoplankton dynamics inﬂuence marine biogeochemical cycles, climate processes, and food webs, with substantial social and economic consequences. Large-scale estimation of phytoplankton biomass was possible via ocean colour measurements from two remote sensing satellites – the Coastal Zone Colour Scanner (CZCS, 1979–1986) and the Sea-viewing Wide Field-of-view Sensor (SeaWiFS, 1998–2010). Due to the large gap between the two satellite eras and differences in sensor characteristics, comparison of the absolute values retrieved from the two instruments remains challenging. Using a unique in situ ocean colour dataset that spans more than half a century, the two satellite-derived chlorophyll-a (Chl-a) eras are linked to assess concurrent changes in phytoplankton variability and bloom timing over the Northeast Atlantic Ocean and North Sea. Results from this unique re-analysis reﬂect a clear increasing pattern of Chl-a, a merging of the two seasonal phytoplankton blooms producing a longer growing season and higher seasonal biomass, since the mid-1980s. The broader climate plays a key role in Chl-a variability as the ocean colour anomalies parallel the oscillations of the Northern Hemisphere Temperature (NHT) since 1948.},
 author = {Raitsos, Dionysios E. and Pradhan, Yaswant and Lavender, Samantha J. and Hoteit, Ibrahim and McQuatters-Gollop, Abigail and Reid, Phillip C. and Richardson, Anthony J.},
 doi = {10.1111/gcb.12457},
 file = {Raitsos et al. - 2014 - From silk to satellite half a century of ocean co.pdf:/Users/ric325/Zotero/storage/CFNHUFC5/Raitsos et al. - 2014 - From silk to satellite half a century of ocean co.pdf:application/pdf},
 issn = {13541013},
 journal = {Global Change Biology},
 language = {en},
 month = {July},
 number = {7},
 pages = {2117--2123},
 shorttitle = {From silk to satellite},
 title = {From silk to satellite: half a century of ocean colour anomalies in the Northeast Atlantic},
 url = {http://doi.wiley.com/10.1111/gcb.12457},
 urldate = {2019-10-24},
 volume = {20},
 year = {2014}
}


text:
@inproceedings{wang2019gad,
  title = {Automatic Human-like Mining and Constructing Reliable Genetic Association Database with Deep Reinforcement Learning},
  author = {Wang, Haohan  and  Liu, Xiang  and  Tao, Yifeng  and  Ye, Wenting  and  Jin, Qiao  and  Cohen, William W.  and  Xing, Eric P.},
  booktitle={Pacific Symposium on Biocomputing},
  year = {2019},
  volume = {24},
  pages = {112--123},
  organization = {World Scientific},
}


text:
package serial

import (
	"bufio"
	"fmt"
	"os"
	"path/filepath"
	"strconv"
	"strings"

	"github.com/yookoala/realpath"
)

func readLine(fn string) string {
	f, err := os.Open(fn)
	if err == nil {
		scan := bufio.NewScanner(f)
		if scan.Scan() {
			return strings.TrimSpace(scan.Text())
		}
	}
	return ""
}

func Discover() ([]DiscoverInfo, error) {

	var devs []string

	s1, _ := filepath.Glob("/dev/ttyS*")
	s2, _ := filepath.Glob("/dev/ttyUSB*")
	devs = append(devs, s1...)
	devs = append(devs, s2...)

	var infos []DiscoverInfo

	for _, d := range devs {
		info := DiscoverInfo{
			PortName: d,
		}
		name := filepath.Base(d)
		subsystem := ""
		devpath := fmt.Sprintf("/sys/class/tty/%s/device", name)
		if _, err := os.Lstat(devpath); err == nil {
			devpath, _ = realpath.Realpath(devpath)
			subsystem = filepath.Join(devpath, "subsystem")
			subsystem, _ = realpath.Realpath(subsystem)
			subsystem = filepath.Base(subsystem)
		}

		usbpath := ""
		switch subsystem {
		case "usb-serial":
			usbpath = filepath.Dir(filepath.Dir(devpath))
			info.Type = PortTypeUsb
		case "usb":
			usbpath = filepath.Dir(devpath)
			info.Type = PortTypeUsb
		case "pnp":
			info.Type = PortTypeIntegrated
		case "pci":
			// We recognize the subsystem but we don't have anything to do
		case "platform":
			// Not a real serial port, just exposed by the driver
			continue
		default:
			fmt.Println("unknown subsystem", subsystem)
		}

		switch info.Type {
		case PortTypeUsb:
			info.Description = readLine(filepath.Join(usbpath, "product"))
			idvendor, _ := strconv.Atoi(readLine(filepath.Join(usbpath, "idVendor")))
			info.UsbVendorId = idvendor
			idproduct, _ := strconv.Atoi(readLine(filepath.Join(usbpath, "idProduct")))
			info.UsbProductId = idproduct
			info.UsbSerialNo = readLine(filepath.Join(usbpath, "serial"))
		}

		infos = append(infos, info)
	}

	return infos, nil
}

repository: rasky/go-serial

repo_name: rasky/go-serial


text:
// Copyright 2014,2015,2016,2017,2018,2019,2020,2021 SeukWon Kang (kasworld@gmail.com)
// 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 boolmatrix bool matrix of maze wall, road
package boolmatrix

import (
	"bytes"
)

type BoolMatrix [][]bool

func New(w, h int) BoolMatrix {
	ma := make([][]bool, w)
	for x := range ma {
		ma[x] = make([]bool, h)
	}
	return ma
}

func (ma BoolMatrix) String() string {
	return ma.ToString('0', '1')
}

func (ma BoolMatrix) ToString(r1, r2 rune) string {
	var buf bytes.Buffer
	for _, v := range ma {
		for _, w := range v {
			if w {
				buf.WriteRune(r2)
			} else {
				buf.WriteRune(r1)
			}
		}
		buf.WriteString("\n")
	}
	return buf.String()
}

func (ma BoolMatrix) HLine(x1, x2, y int, v bool) {
	w := len(ma)
	h := len(ma[0])
	if y >= h {
		y = h - 1
	}
	if x1 >= w {
		x1 = w - 1
	}
	if x2 >= w {
		x2 = w - 1
	}
	for i := x1; i < x2; i++ {
		ma[i][y] = v
	}
}

func (ma BoolMatrix) VLine(x, y1, y2 int, v bool) {
	w := len(ma)
	h := len(ma[0])
	if y1 >= h {
		y1 = h - 1
	}
	if y2 >= h {
		y2 = h - 1
	}
	if x >= w {
		x = w - 1
	}
	for i := y1; i < y2; i++ {
		ma[x][i] = v
	}
}

repository: kasworld/goguelike

repo_name: kasworld/goguelike


text:
@incollection{Carbonell-Llisterri:1999-catalan,
  author    = {Carbonell, Joan F. and Llisterri, Joaquim},
  title     = {{Catalan}},
  booktitle = {Handbook of the International Phonetic Association},
  publisher = {Cambridge University Press},
  year      = {1999},
  address   = {Cambridge},
  pages     = {61--65}
}

@article{Fougeron-Smith:1993-illustration,
  author  = {C\'ecile Fougeron and Caroline Smith},
  title   = {Illustrations of the {IPA}: French},
  journal = {Journal of the International Phonetic Association},
  year    = {1993},
  volume  = {23},
  number  = {2},
  pages   = {73--76}
}

@incollection{Hayward-Hayward:1999-amharic,
  author    = {Hayward, Katrina and Hayward, Richard J.},
  title     = {{Amharic}},
  booktitle = {Handbook of the International Phonetic Association},
  publisher = {Cambridge University Press},
  year      = {1999},
  address   = {Cambridge},
  pages     = {45--50}
}

@book{IPA:1999-handbook,
  author    = {{International Phonetic Association}},
  title     = {Handbook of the {International Phonetic Association}},
  publisher = {Cambridge University Press},
  year      = {1999},
  address   = {Cambridge}
}

@article{Kirby:2011-illustration,
  author  = {Kirby, James P.},
  title   = {Illustrations of the {IPA}: Vietnamese},
  journal = {Journal of the International Phonetic Association},
  year    = {2011},
  volume  = {41},
  number  = {3},
  pages   = {381--392}
}

@book{Kunkel:2005-die-grammatik,
  title     = {Duden: die Grammatik : unentbehrlich f{\"u}r
                  richtiges Deutsch},
  author    = {Kunkel-Razum, K. and Dudenredaktion
                  (Bibliographisches Institut)},
  isbn      = {9783411040476},
  series    = {Der Duden in zw{\"o}lf B{\"a}nden : das Standardwerk
                  zur deutschen Sprache},
  url       = {https://books.google.com/books?id=460UAQAAIAAJ},
  year      = {2005},
  publisher = {Dudenverlag},
  address   = {Mannheim}
}

@incollection{Ladefoged:1999-american,
  author    = {Ladefoged, Peter},
  title     = {{American} {English}},
  booktitle = {Handbook of the International Phonetic Association},
  publisher = {Cambridge University Press},
  year      = {1999},
  address   = {Cambridge},
  pages     = {41--44}
}

@article{Martinez-Celdran-et-al:2003-illustration,
  author  = {Eugenio Mart\'inez-Celdr\'an and Ana Marie Fern\'andez-Planas and Josefina Carrera-Sabat\`e},
  title   = {Illustrations of the {IPA}: {Castillian Spanish}},
  journal = {Journal of the International Phonetic Association},
  year    = {2003},
  volume  = {33},
  number  = {2},
  pages   = {255--259}
}

@unpublished{McCollum-Chen:2018-illustration,
  author = {McCollum, Adam G. and Chen, Si},
  title  = {Illustrations of the {IPA}: Kazakh},
  note   = {Ms. Univerity of California, San Diego},
  year   = {2018}
}

@book{Norman:1988-chinese,
  author    = {Norman, Jerry},
  title     = {Chinese},
  publisher = {Cambridge University Press},
  year      = {1988},
  address   = {Cambridge}
}

@article{Rogers-dArcangeli:2004-illustration,
  author  = {Rogers, Derek and d'Arcangeli, Luciana},
  title   = {Illustrations of the {IPA}: Italian },
  journal = {Journal of the International Phonetic Association},
  year    = {2004},
  volume  = {34},
  number  = {1},
  pages   = {117--121}
}

@book{Suharno:1982-descriptive,
  author    = {Suharno, Ignatius},
  title     = {A Descriptive Study of Javanese},
  publisher = {Pacific Linguistics Press},
  year      = {1982},
  address   = {Canberra}
}

@misc{Wiki:2019-japanese-phonology,
  author = {{Wikipedia contributors}},
  title  = {Japanese Phonology --- {W}ikipedia{,} The Free Encyclopedia},
  year   = {2019},
  url    = {https://en.wikipedia.org/wiki/Japanese_phonology},
  note   = {[Online; accessed 12-Nov-2019]}
}

@misc{Wiki:2019-spanish-language,
  author = {{Wikipedia contributors}},
  title  = {{Spanish} Language in the {Americas} --- {W}ikipedia{,} The Free Encyclopedia},
  year   = {2019},
  url    = {https://en.wikipedia.org/wiki/Spanish_language_in_the_Americas},
  note   = {[Online; accessed 26-Mar-2019]}
}

@misc{Wiki:2019-tagalog-phonology,
  author = {{Wikipedia contributors}},
  title  = {Tagalog Phonology --- {W}ikipedia{,} The Free Encyclopedia},
  year   = {2019},
  url    = { https://en.wikipedia.org/wiki/Tagalog_phonology},
  note   = {[Online; accessed 26-Mar-2019]}
}

@article{Yanushevskaya-Buncic:2015-illustration,
  author  = {Irena Yanushevskaya and Daniel Bun\v{c}i\'c},
  title   = {Illustrations of the {IPA}: Russian},
  journal = {Journal of the International Phonetic Association},
  year    = {2015},
  volume  = {45},
  number  = {2},
  pages   = {221--228}
}

@incollection{Zee:1999-cantonese,
  author    = {Zee, Eric},
  title     = {{Chinese} ({Hong} {Kong} {Cantonese})},
  booktitle = {Handbook of the International Phonetic Association},
  publisher = {Cambridge University Press},
  year      = {1999},
  address   = {Cambridge},
  pages     = {58--60}
}

@article{Zimmer-Orgun:1992-illustration,
  author  = {Zimmer, Karl and Orgun, Orhan},
  title   = {Illustrations of the {IPA}: Turkish},
  journal = {Journal of the International Phonetic Association},
  year    = {1992},
  volume  = {22},
  number  = {1--2},
  pages   = {43--45}
}

gha_language: TeX


text:
@article{Wunder-2018-From,
    title = "From principles to practice in paying for nature{'}s services",
    author = "Wunder, S.  and
      Brouwer, R.  and
      Engel, S.  and
      Ezzine-de-Blas, D.  and
      Muradian, R.  and
      Pascual, U.  and
      Pinto, R.",
    journal = "Nature Sustainability, Volume 1, Issue 3",
    volume = "1",
    number = "3",
    year = "2018",
    publisher = "Springer Science and Business Media LLC",
    url = "https://aclanthology.org/G18-130001",
    doi = "10.1038/s41893-018-0036-x",
    pages = "145--150",
    abstract = "Payments for Environmental Services (PES) constitute an innovative economic intervention to counteract the global loss of biodiversity and ecosystem functions. In theory, some appealing features should enable PES to perform well in achieving conservation and welfare goals. In practice, outcomes depend on the interplay between context, design and implementation. Inspecting a new global dataset, we find that some PES design principles pre-identified in the social-science literature as desirable, such as spatial targeting and payment differentiation, are only partially being applied in practice. More importantly, the PES-defining principle of conditionality{---}monitoring compliance and sanctioning detected non-compliance{---}is seldom being implemented. Administrative ease, multiple non-environmental side objectives and social equity concerns may jointly help explain the reluctance to adopt more sophisticated, theoretically informed practices. However, by taking simplifying shortcuts in design and implementation, PES programmes may become less environmentally effective and efficient as economic incentives, thus underperforming their conservation potential.",
}

repository: gwf-uwaterloo/gwf-publications

repo_name: gwf-uwaterloo/gwf-publications


text:
SUMMARY = "BeeeOn Adapter Application - central application of an adapter"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e2c6cbed4654f882832b6d28c4454eca"
DEPENDS = "libpoco mosquitto"
PV = "1.7"

SRCREV = "cb88dc386fd54a9fad6edbc3c4fb6e293a34a2ee"
SRC_URI = "\
    git://github.com/BeeeOn/gateway-app.git \
    file://0001-ini-configure-for-production-use.patch \
"

S = "${WORKDIR}/git"

inherit cmake systemd

SYSTEMD_SERVICE_${PN} = "beeeon-adaapp.service"

EXTRA_OECMAKE = " \
    -DCMAKE_INSTALL_PREFIX=/ \
"

do_configure_prepend () {
    export FW_VERSION=${SRCREV}
}

do_install_append () {
    install -d ${D}${systemd_system_unitdir}
    install -m 0644 ${S}/adapter_files/*.service ${D}${systemd_system_unitdir}

    install -d ${D}${localstatedir}/lib/beeeon

    rmdir ${D}/tmp
}

CONFFILES_${PN} += "\
    ${sysconfdir}/beeeon/* \
"

repository: BeeeOn/meta-beeeon

repo_name: BeeeOn/meta-beeeon


text:
% -----------------------------------------------
@misc{ViennaData,
   title = {{ViennaData}},
   URL = {http://viennadata.sourceforge.net/}
}
% -----------------------------------------------
@misc{GrAL,
   title = {{GrAL - Grid Algorithms Library}},
   URL = {http://gral.berlios.de/}
}
% -----------------------------------------------
@misc{CGAL,
   title = {{CGAL - Computational Geometry Algorithms Library}},
   URL = {http://www.cgal.org/}
}
% -----------------------------------------------
@misc{DUNE,
   title = {{DUNE - Distributed and Unified Numerics Environment}},
   URL = {http://www.dune-project.org/}
}
% -----------------------------------------------
@misc{libmesh,
   title = {{libmesh}},
   URL = {http://libmesh.sourceforge.net/}
}
% -----------------------------------------------
@misc{trimesh,
   title = {{trimesh}},
   URL = {http://gfx.cs.princeton.edu/proj/trimesh2/}
}
% -----------------------------------------------
@misc{VCGlib,
   title = {{VCGlib}},
   URL = {http://vcg.sourceforge.net/}
}
% -----------------------------------------------
@misc{OpenMesh,
   title = {{OpenMesh}},
   URL = {http://www.openmesh.org/}
}
% -----------------------------------------------
@misc{trimesh2,
   title = {{trimesh2}},
   URL = {http://gfx.cs.princeton.edu/proj/trimesh2/}
}
% -----------------------------------------------
@misc{boost,
   title = {{Boost C++ Libraries}},
   URL = {http://www.boost.org/}
}
% -----------------------------------------------
@misc{openmp,
   title = {{OpenMP}},
   URL = {http://openmp.org}
}
% -----------------------------------------------
@misc{cmake,
   title = {{CMake}},
   URL = {http://www.cmake.org/}
}
% -----------------------------------------------
@misc{xcode,
   title = {{Xcode Developer Tools}},
   URL = {http://developer.apple.com/technologies/tools/xcode.html}
}
% -----------------------------------------------
@misc{fink,
   title = {{Fink}},
   URL = {http://www.finkproject.org/}
}
% -----------------------------------------------
@misc{darwinports,
   title = {{DarwinPorts}},
   URL = {http://darwinports.com/}
}
% -----------------------------------------------
@misc{macports,
   title = {{MacPorts}},
   URL = {http://www.macports.org/}
}
% -----------------------------------------------
@misc{arprec,
   title = {{ARPREC high-precision library}},
   URL = {http://crd.lbl.gov/~dhbailey/mpdist/}
}
% -----------------------------------------------
@misc{VTK,
   title = {{VTK - Visualization Toolkit}},
   URL = {http://www.vtk.org/}
}
% -----------------------------------------------
@misc{VTKfileformat,
   title = {{VTK File Formats}},
   URL = {http://www.vtk.org/VTK/img/file-formats.pdf}
}
% -----------------------------------------------
@misc{netgen,
   title = {{Netgen Mesh Generator}},
   URL = {http://sourceforge.net/projects/netgen-mesher/}
}
% -----------------------------------------------
@misc{neper,
   title = {{Neper Polycrystal Generation and Meshing}},
   URL = {http://neper.sourceforge.net/}
}
% -----------------------------------------------
@misc{paraview,
   title = {{Paraview - Open Source Scientific Visualization}},
   URL = {http://www.paraview.org/}
}
% -----------------------------------------------
@misc{opendx,
   title = {{OpenDX}},
   URL = {http://www.opendx.org/}
}
% -----------------------------------------------
@misc{tetgen,
   title = {{TetGen}},
   URL = {http://tetgen.berlios.de/}
}

@misc{comsol-fileformat,
   title = {{COMSOL mphtxt file format}},
   URL = {http://chemelab.ucsd.edu/CAPE/comsol/Comsol_Reference.pdf}
}

@book{Austern:GenericProgrammingSTL,
 author = {M. H. Austern},
 title = {Generic Programming and the STL: Using and Extending the C++ Standard Template Library},
 year = {1998},
 isbn = {0-201-30956-4},
 publisher = {Addison-Wesley Longman Publishing Co., Inc.},
 address = {Boston, MA, USA},
}
@Book{Alexandrescu:ModernCpp,
 author = {A. Alexandrescu},
 title = {{Modern C++ Design: Generic Programming and Design Patterns Applied}},
 year = {2001},
 isbn = {0-201-70431-5},
 publisher = {Addison-Wesley Longman Publishing Co., Inc.},
 address = {Boston, MA, USA},
}

@book{Vandevoorde:CppTemplates,
 author = {D. Vandevoorde and N. M. Josuttis},
 title = {{C++ Templates}},
 year = {2002},
 isbn = {0201734842},
 publisher = {Addison-Wesley Longman Publishing Co., Inc.},
 address = {Boston, MA, USA},
}

repository: viennagrid/viennagrid-dev

repo_name: viennagrid/viennagrid-dev


text:
@string{cacm = "Communications of the ACM"}

@article{lipton:reduction:cacm1975,
  author    = {Richard J. Lipton},
  title     = {Reduction: {A} Method of Proving Properties of Parallel Programs},
  journal   = cacm,
  volume    = {18},
  number    = {12},
  year      = {1975},
  pages     = {717--721},
  bibsource = {DBLP, http://dblp.uni-trier.de},
}

@article{lamport:time:cacm1978,
author = "Leslie Lamport",
title = "Time, clocks, and the ordering of events in a distributed system",
journal = cacm,
year = "1978",
month = "July",
volume = "21",
number = "7",
pages = "558--565",
}

@article{dupuy:nest:cacm1990,
author = "Alexander Dupuy and Jed Schwartz and Yechiam Yemini and David Bacon",
title = "{NEST}: {A} Network Simulation and Prototyping Testbed",
journal = cacm,
year = "1990",
month = "October",
volume = "33",
number = "10",
pages = "63--74",
}

@article{vogels:eventual-consistency:cacm2009,
 author = {Vogels, Werner},
 title = {Eventually consistent},
 journal = cacm,
 volume = {52},
 number = {1},
 year = {2009},
 issn = {0001-0782},
 pages = {40--44},
 doi = {http://doi.acm.org/10.1145/1435417.1435432},
 publisher = {ACM},
 address = {New York, NY, USA},
 }

@article{elerath:disk-drives-good-bad-ugly:cacm2009,
 author = {Elerath, Jon},
 title = {Hard-disk drives: the good, the bad, and the ugly},
 journal = cacm,
 volume = {52},
 number = {6},
 year = {2009},
 issn = {0001-0782},
 pages = {38--45},
 doi = {http://doi.acm.org/10.1145/1516046.1516059},
 publisher = {ACM},
 address = {New York, NY, USA},
 }

repository: dataseries/Lintel

repo_name: dataseries/Lintel

gha_license_id: NOASSERTION

gha_language: Perl


text:
package micro

import (
	"fmt"
)

type GiftKey struct {
	UserID string
	PostIDs []string
}

func (k GiftKey) String() string { return fmt.Sprint(k.UserID, k.PostIDs)  }

func (k GiftKey) Raw() interface{} { return k}

//type BoardKey struct {
//	ID    int64
//	isDev bool
//}
//
//func (k BoardKey) String() string { return fmt.Sprint(k.ID, k.isDev) }
//
//func (k BoardKey) Raw() interface{} { return k }


text:
DESCRIPTION = "Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms."
AUTHOR = "Benoît Jacob and Gaël Guennebaud and others"
HOMEPAGE = "http://eigen.tuxfamily.org/"
LICENSE = "MPL-2.0 & Apache-2.0 & BSD-3-Clause & GPL-3.0-only & LGPL-2.1-only & MINPACK"
LIC_FILES_CHKSUM = "file://COPYING.MPL2;md5=815ca599c9df247a0c7f619bab123dad \
                    file://COPYING.BSD;md5=2dd0510ee95e59ca28834b875bc96596 \
                    file://COPYING.GPL;md5=d32239bcb673463ab874e80d47fae504 \
                    file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \
                    file://COPYING.MINPACK;md5=71d91b0f75ce79a75d3108a72bef8116 \
"

SRC_URI = "git://gitlab.com/libeigen/eigen.git;protocol=http;branch=3.4 \
    file://0001-Default-eigen_packet_wrapper-constructor.patch \
"

SRCREV = "3147391d946bb4b6c68edd901f2add6ac1f31f8c"

S = "${WORKDIR}/git"

inherit cmake

FILES:${PN}-dev += "${datadir}/eigen3/cmake"

# ${PN} is empty so we need to tweak -dev and -dbg package dependencies
RDEPENDS:${PN}-dev = ""
RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"

BBCLASSEXTEND = "native nativesdk"


text:
@MISC{gaiasite,
	url    = "http://sci.esa.int/gaia/",
    author = "ESA Science \& Technology",
    title  = "Gaia",
    year   = 2018
}

@ARTICLE{2005ApJ...622..759G,
   author = {{G{\'o}rski}, K.~M. and {Hivon}, E. and {Banday}, A.~J. and {Wandelt}, B.~D. and {Hansen}, F.~K. and {Reinecke}, M. and {Bartelmann}, M.},
    title = "{HEALPix: A Framework for High-Resolution Discretization and Fast Analysis of Data Distributed on the Sphere}",
  journal = {\apj},
   eprint = {astro-ph/0409513},
 keywords = {Cosmology: Cosmic Microwave Background, Cosmology: Observations, Methods: Statistical},
     year = 2005,
    month = apr,
   volume = 622,
    pages = {759-771},
      doi = {10.1086/427976},
   adsurl = {http://adsabs.harvard.edu/abs/2005ApJ...622..759G},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@Article{ogorod,
author="Vityazev, V. V.
and Tsvetkov, A. S.",
title="Kinematics of stars in the northern and southern galactic hemispheres",
journal="Astronomy Letters",
year="2012",
month="Jul",
day="01",
volume="38",
number="7",
pages="411--427",
abstract="We use vector spherical harmonics for a kinematic analysis of the proper motions of stars from the Hipparcos, Tycho-2, and UCAC3 catalogues in the northern and southern Galactic hemispheres. We have found that the statistically reliable values of the Ogorodnikov-Milne model parameters M                                          32                  +                 and M                                          32                  −                 have different signs in different hemispheres. This is a consequence of the Galaxy's rotational retardation with distance from the principal Galactic plane. Based on various samples of stars from the above catalogues, we have obtained the following estimate for the magnitude of the vertical gradient of Galactic rotation velocity in the solar neighborhoods: (20.1 {\textpm} 2.9) < |∂V⊙/∂z| < (49.2 {\textpm} 0.8) km s−1 kpc−1. Another result that is revealed by our analysis of the parameters M                                          13                  −                 and M                                          13                  +                 in different Galactic hemispheres is that the vertical gradient of expansion velocity for the stellar system ∂V                                          R                /∂                                          z                 is positive in the northern hemisphere and negative in the southern one. This suggests that the expansion velocity V                                          R                 increases with distance fromthe Galactic plane. We show that both these gradients give rise to an apparent acceleration of the solar motion along the x and y axes of the rectangular Galactic coordinate system. Our analysis of the parameters M                                          21                  −                 and M                                          12                  +                 shows no significant differences in both hemispheres and has allowed us to determine the Oort parameters, to estimate the Galactic rotation velocity and period in the solar neighborhood, and to calculate the ratio of the epicyclic frequency to the angular velocity of Galactic rotation in the solar neighborhood. The derived diagonal elements of the velocity field deformation tensor suggest that the orientation of the rectangular Galactic coordinate system in space must be determined by taking into account not only the geometrical factors but also the dynamical ones. All these results agree well with these quantities estimated over the entire sphere by various authors.",
issn="1562-6873",
doi="10.1134/S1063773712060060",
url="https://doi.org/10.1134/S1063773712060060"
}

repository: movsesyanpv/gaiaread

repo_name: movsesyanpv/gaiaread


text:
@ARTICLE{Gordon1987,
  author = {Dan Gordon},
  title = {Efficient Embeddings of Binary Trees in {VLSI} Arrays},
  journal = {IEEE Transactions on Computers},
  year = {1987},
  volume = {C-36},
  pages = {1009--1018},
  number = {9},
  abstract = {We consider the problem of embedding a complete binary tree in squareor hexagonally-connected VLSI arrays Of processing elements (PE's). This problem can be solved in a radically different manner from current layout techniques which are aimed at laying out a given graph in the plane. The difference is due to the fact that a PE can be used both as a tree node and as a connecting element between distant nodes. New embedding schemes are presented in which (asymptotically) 100 percent of the PE's are utilized as tree nodes. This is a significant savings over known schemes, which achieve 50 percent utilization (the well-known H-tree) and 71 percent for some hexagonal schemes. These schemes also speed up signal propagation from the root to the leaves.},
  doi = {10.1109/TC.1987.5009532}
}

repository: vis-au/treevisnet

repo_name: vis-au/treevisnet


text:
package epgc

import (
	"database/sql"
	"log"
	"strconv"
	"strings"
	"time"

	"github.com/lib/pq"
)

func s2n(val string) sql.NullString {
	var s2n sql.NullString
	if val == "" {
		s2n.Valid = false
	} else {
		s2n.Valid = true
		s2n.String = val
	}
	return s2n
}

// func d2n(val time.Time) pq.NullTime {
// 	var d2n pq.NullTime
// 	if val.Format("02.01.2006") == "01.01.0001" {
// 		d2n.Valid = false
// 	} else {
// 		d2n.Valid = true
// 		d2n.Time = val
// 	}
// 	return d2n
// }

func sd2n(val string) pq.NullTime {
	var d2n pq.NullTime
	t, err := time.Parse("02.01.2006", val)
	if err != nil {
		return d2n
	}
	if t.Format("02.01.2006") == "01.01.0001" {
		d2n.Valid = false
	} else {
		d2n.Valid = true
		d2n.Time = t
	}
	log.Println(t.Format("02.01.2006"))
	return d2n
}

func i2n(val int64) sql.NullInt64 {
	var i2n sql.NullInt64
	if val == 0 {
		i2n.Valid = false
	} else {
		i2n.Valid = true
		i2n.Int64 = val
	}
	return i2n
}

// func b2n(val bool) sql.NullBool {
// 	var b2n sql.NullBool
// 	if val == false {
// 		b2n.Valid = false
// 	} else {
// 		b2n.Valid = true
// 		b2n.Bool = val
// 	}
// 	return b2n
// }

func n2s(val sql.NullString) string {
	return val.String
}

func n2as(val sql.NullString) []string {
	return strings.Split(val.String, ",")
}

func n2ads(val sql.NullString) []string {
	spl := strings.Split(val.String, ",")
	for i, s := range spl {
		spl[i] = s2sd(s)
	}
	return spl
}

func n2i(val sql.NullInt64) int64 {
	return val.Int64
}

func n2b(val sql.NullBool) bool {
	return val.Bool
}

// func n2d(val pq.NullTime) time.Time {
// 	return val.Time
// }

func n2sd(val pq.NullTime) string {
	var str string
	if val.Valid == true {
		str = val.Time.Format("02.01.2006")
	}
	return str
}

func n2emails(emails sql.NullString) []Email {
	var (
		e  string
		es []string
		ee []Email
	)
	e = n2s(emails)
	if e == "" {
		return ee
	}
	es = strings.Split(e, ",")
	for _, e = range es {
		var email Email
		email.Email = e
		ee = append(ee, email)
	}
	return ee
}

func n2phones(phones sql.NullString) []Phone {
	var (
		p  string
		ps []string
		pp []Phone
	)
	p = n2s(phones)
	if p == "" {
		return pp
	}
	ps = strings.Split(p, ",")
	for _, p = range ps {
		i, err := strconv.ParseInt(p, 10, 64)
		if err == nil {
			var phone Phone
			phone.Phone = i
			phone.Fax = false
			pp = append(pp, phone)
		}
	}
	return pp
}

func n2faxes(faxes sql.NullString) []Phone {
	var (
		f  string
		fs []string
		ff []Phone
	)
	f = n2s(faxes)
	if f == "" {
		return ff
	}
	fs = strings.Split(f, ",")
	for _, f = range fs {
		i, err := strconv.ParseInt(f, 10, 64)
		if err == nil {
			var fax Phone
			fax.Phone = i
			fax.Fax = true
			ff = append(ff, fax)
		}
	}
	return ff
}

// func n2practices(practices sql.NullString) []Practice {
// 	var (
// 		p  string
// 		ps []string
// 		pp []Practice
// 	)
// 	p = n2s(practices)
// 	if p == "" {
// 		return pp
// 	}
// 	ps = strings.Split(p, ",")
// 	for _, p = range ps {
// 		var practice Practice
// 		practice.DateOfPractice = p
// 		practice.DateStr = s2sd(p)
// 		pp = append(pp, practice)
// 	}
// 	return pp
// }

// func toInt(b bool) int {
// 	if b {
// 		return 1
// 	}
// 	return 0
// }

// func s2d(val string) time.Time {
// 	t, _ := time.Parse("2006-01-02", val)
// 	return t
// }

func s2sd(val string) string {
	var result string
	t, err := time.Parse("2006-01-02", val)
	if err != nil {
		return result
	}
	result = t.Format("02.01.2006")
	return result
}

// func d2s(val time.Time) string {
// 	str := val.Format("02.01.2006")
// 	return str
// }

func int64InSlice(a int64, list []int64) bool {
	for _, b := range list {
		if b == a {
			return true
		}
	}
	return false
}

func setStrMonth(d string) string {
	var result string
	t, err := time.Parse("02.01.2006", d)
	if err != nil {
		return result
	}
	str := t.Format("02.01.2006")
	spl := strings.Split(str, ".")
	month := map[string]string{"01": "января", "02": "февраля", "03": "марта", "04": "апреля", "05": "мая", "06": "июня", "07": "июля", "08": "августа", "09": "сентября", "10": "октября", "11": "ноября", "12": "декабря "}
	result = spl[0] + " " + month[spl[1]] + " " + spl[2] + " года"
	return result
}

repository: serbe/epgc

repo_name: serbe/epgc


text:
@InProceedings{zhou15b,
  title = {{Power-Law Graph Cuts}},
  author = {Zhou, Xiangyang and Zhang, Jiaxin and Kulis, Brian},
  pages = {1144-1152},
  abstract = {Algorithms based on spectral graph cut objectives such as normalized cuts, ratio cuts and ratio association have become popular in recent years because they are widely applicable and simple to implement via standard eigenvector computations. Despite strong performance for a number of clustering tasks, spectral graph cut algorithms still suffer from several limitations: first, they require the number of clusters to be known in advance, but this information is often unknown a priori; second, they tend to produce clusters with uniform sizes. In some cases, the true clusters exhibit a known size distribution; in image segmentation, for instance, human- segmented images tend to yield segment sizes that follow a power-law distribution. In this paper, we propose a general framework of power-law graph cut algorithms that produce clusters whose sizes are power-law distributed, and also does not fix the number of clusters upfront. To achieve our goals, we treat the Pitman-Yor exchangeable partition probability function (EPPF) as a regularizer to graph cut objectives. Because the result- ing objectives cannot be solved by relaxing via eigenvectors, we derive a simple iterative algorithm to locally optimize the objectives. Moreover, we show that our proposed algorithm can be viewed as performing MAP inference on a particular Pitman-Yor mixture model. Our experiments on various data sets show the effectiveness of our algorithms.},
}

repository: mreid/papersite

repo_name: mreid/papersite


text:
DESCRIPTION = "obex-data-server is a D-Bus service providing high-level OBEX client and server side functionality"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"

DEPENDS = "gtk+ bluez4 dbus-glib imagemagick openobex"
RCONFLICTS_${PN} = "bluez5"

PNBLACKLIST[obex-data-server] ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"

SRC_URI = "http://tadas.dailyda.com/software/obex-data-server-${PV}.tar.gz"
SRC_URI[md5sum] = "961ca5db6fe9c97024e133cc6203cc4d"
SRC_URI[sha256sum] = "b399465ddbd6d0217abedd9411d9d74a820effa0a6a142adc448268d3920094f"

inherit autotools-brokensep pkgconfig

FILES_${PN} += "${datadir}/dbus-1/"

repository: tactical-drone/meta-oe

repo_name: tactical-drone/meta-oe