text:
@article{he_run-based_2008,
	title = {A Run-Based Two-Scan Labeling Algorithm},
	volume = {17},
	issn = {1057-7149},
	doi = {10.1109/TIP.2008.919369},
	abstract = {We present an efficient run-based two-scan algorithm for labeling connected components in a binary image. Unlike conventional label-equivalence-based algorithms, which resolve label equivalences between provisional labels, our algorithm resolves label equivalences between provisional label sets. At any time, all provisional labels that are assigned to a connected component are combined in a set, and the smallest label is used as the representative label. The corresponding relation of a provisional label and its representative label is recorded in a table. Whenever different connected components are found to be connected, all provisional label sets concerned with these connected components are merged together, and the smallest provisional label is taken as the representative label. When the first scan is finished, all provisional labels that were assigned to each connected component in the given image will have a unique representative label. During the second scan, we need only to replace each provisional label by its representative label. Experimental results on various types of images demonstrate that our algorithm outperforms all conventional labeling algorithms.},
	pages = {749--756},
	number = {5},
	journaltitle = {{IEEE} Transactions on Image Processing},
	author = {He, Lifeng and Chao, Yuyan and Suzuki, Kenji},
	date = {2008-05},
	keywords = {Algorithms, Artificial Intelligence, binary image, connected component labeling, Connected components, Documentation, Image Enhancement, Image Interpretation, Computer-Assisted, image processing, Information Storage and Retrieval, label-equivalence-based algorithm, labeling algorithm, linear-time algorithm, pattern recognition, Pattern Recognition, Automated, representative label, Reproducibility of Results, run-based two-scan labeling algorithm, run-length encoding, Sensitivity and Specificity, User-Computer Interface},
	file = {IEEE Xplore Abstract Record:/home/anjohan/Zotero/storage/6QEAEBZN/4472694.html:text/html}
}

@book{brainerd_guide_2015,
	location = {London},
	title = {Guide to Fortran 2008 programming},
	isbn = {978-1-4471-6758-7},
	pagetotal = {408},
	publisher = {Springer},
	author = {Brainerd, Walter S.},
	date = {2015},
	langid = {english},
	file = {Brainerd - 2015 - Guide to Fortran 2008 programming.pdf:/home/anjohan/Zotero/storage/X2HCVS4F/Brainerd - 2015 - Guide to Fortran 2008 programming.pdf:application/pdf}
}

@article{hoshen_percolation_1976,
	title = {Percolation and cluster distribution. I. Cluster multiple labeling technique and critical concentration algorithm},
	volume = {14},
	url = {https://link.aps.org/doi/10.1103/PhysRevB.14.3438},
	doi = {10.1103/PhysRevB.14.3438},
	abstract = {A new approach for the determination of the critical percolation concentration, percolation probabilities, and cluster size distributions is presented for the site percolation problem. The novel "cluster multiple labeling technique" is described for both two- and three-dimensional crystal structures. Its distinctive feature is the assignment of alternate labels to sites belonging to the same cluster. These sites are members of a simulated finite random lattice. An algorithm useful for the determination of the critical percolation concentration of a finite lattice is also presented. This algorithm is especially useful when applied in conjunction with the cluster multiple labeling technique. The basic features of this technique are illustrated by applying it to a small planar square lattice. Numerical results are given for a triangular subcrystal containing up to 9 000 000 sites. These results compare favorably with the exact value of the infinite lattice critical percolation concentration.},
	pages = {3438--3445},
	number = {8},
	journaltitle = {Physical Review B},
	shortjournal = {Phys. Rev. B},
	author = {Hoshen, Joseph and Kopelman, Raoul},
	urldate = {2018-05-06},
	date = {1976-10-15},
	file = {APS Snapshot:/home/anjohan/Zotero/storage/SETRK5NS/PhysRevB.14.html:text/html;Full Text PDF:/home/anjohan/Zotero/storage/FHAXN7WB/Hoshen and Kopelman - 1976 - Percolation and cluster distribution. I. Cluster m.pdf:application/pdf}
}

@book{malthe-sorenssen_percolation_2015,
	title = {Percolation and Disordered Systems – A Numerical Approach},
	author = {Malthe-Sørenssen, Anders},
	date = {2015-04-30},
	langid = {english},
	file = {Malthe-Sorenssen - Percolation and Disordered Systems – A Numerical A.pdf:/home/anjohan/Zotero/storage/LRA28LI3/Malthe-Sorenssen - Percolation and Disordered Systems – A Numerical A.pdf:application/pdf}
}

@online{fricke_hoshen-kopelman_2004,
	title = {The Hoshen-Kopelman Algorithm},
	url = {https://www.ocf.berkeley.edu/~fricke/projects/hoshenkopelman/hoshenkopelman.html},
	author = {Fricke, Tobin},
	urldate = {2018-05-06},
	date = {2004-04-21},
	file = {The Hoshen-Kopelman Algorithm:/home/anjohan/Zotero/storage/BMYS3XIQ/hoshenkopelman.html:text/html}
}

@article{kantor_geometrical_1984,
	title = {Geometrical properties of single connected bonds in percolation clusters},
	volume = {17},
	issn = {0305-4470},
	url = {http://stacks.iop.org/0305-4470/17/i=15/a=005},
	doi = {10.1088/0305-4470/17/15/005},
	abstract = {Numerical simulation of the two-dimensional bond percolation at the percolation threshold on an L*L lattice shows that the radius of gyration of singly connected bonds ({SCB}) scales as L 1 . This result confirms an assumption used to derive a lower bound on the critical exponent of elasticity. A persistent anisotropy in the distribution of {SCB} is found and used to estimate the ratio between the bulk and shear moduli of a random percolating system. Local anisotropy in the direction of {SCB} disappears for large L.},
	pages = {L843},
	number = {15},
	journaltitle = {Journal of Physics A: Mathematical and General},
	shortjournal = {J. Phys. A: Math. Gen.},
	author = {Kantor, Yacov},
	urldate = {2018-05-15},
	date = {1984},
	langid = {english},
	file = {IOP Full Text PDF:/home/anjohan/Zotero/storage/3M37WSVS/Kantor - 1984 - Geometrical properties of single connected bonds i.pdf:application/pdf}
}

@incollection{dusek_gelation_1982,
	location = {Berlin, Heidelberg},
	title = {Gelation and critical phenomena},
	volume = {44},
	isbn = {978-3-540-11471-0},
	url = {http://link.springer.com/10.1007/3-540-11471-8_4},
	pages = {103--158},
	booktitle = {Polymer Networks},
	publisher = {Springer Berlin Heidelberg},
	author = {Stauffer, Dietrich and Coniglio, Antonio and Adam, Mireille},
	editor = {Dušek, Karel},
	urldate = {2018-05-15},
	date = {1982},
	langid = {english},
	doi = {10.1007/3-540-11471-8_4},
	file = {Stauffer et al. - 1982 - Gelation and critical phenomena.pdf:/home/anjohan/Zotero/storage/FCD88A9J/Stauffer et al. - 1982 - Gelation and critical phenomena.pdf:application/pdf}
}

@article{saberi_recent_2015,
	title = {Recent advances in percolation theory and its applications},
	volume = {578},
	issn = {03701573},
	url = {http://arxiv.org/abs/1504.02898},
	doi = {10.1016/j.physrep.2015.03.003},
	abstract = {Percolation is the simplest fundamental model in statistical mechanics that exhibits phase transitions signaled by the emergence of a giant connected component. Despite its very simple rules, percolation theory has successfully been applied to describe a large variety of natural, technological and social systems. Percolation models serve as important universality classes in critical phenomena characterized by a set of critical exponents which correspond to a rich fractal and scaling structure of their geometric features. In this review we will first outline the basic features of the ordinary model and take a glimpse at a number of selective variations and modifications of the original model. Directed percolation process will be also discussed as a prototype of systems displaying a nonequilibrium phase transition. After a short review on {SLE}, we will provide an overview on existence of the scaling limit and conformal invariance of the critical percolation. We will also establish a connection with the magnetic models. Recent applications of the percolation theory in natural and artificial landscapes are also reviewed.},
	pages = {1--32},
	journaltitle = {Physics Reports},
	author = {Saberi, Abbas Ali},
	urldate = {2018-05-15},
	date = {2015-05},
	eprinttype = {arxiv},
	eprint = {1504.02898},
	keywords = {Condensed Matter - Statistical Mechanics},
	file = {arXiv\:1504.02898 PDF:/home/anjohan/Zotero/storage/G5C6JCD8/Saberi - 2015 - Recent advances in percolation theory and its appl.pdf:application/pdf;arXiv.org Snapshot:/home/anjohan/Zotero/storage/AEKI3PFI/1504.html:text/html}
}

@article{coniglio_cluster_1982,
	title = {Cluster structure near the percolation threshold},
	volume = {15},
	issn = {0305-4470, 1361-6447},
	url = {http://stacks.iop.org/0305-4470/15/i=12/a=032?key=crossref.cb6432c859595b28dcaefaaa6ecb2c43},
	doi = {10.1088/0305-4470/15/12/032},
	abstract = {We derive exact relations that allow us to describe unambiguously and quantitatively the structure of clusters near the percolation threshold p c . In particular, we prove the relations p(dp,,/dp) = (Aa,) where p is the bond density, p , , is the pair connectedness function and (Az,) is the average number of cutting bonds between i and j . These bonds have the property such that if one is cut, i and j are no longer connected. From this relation it follows that the average number of cutting bonds between two points separated by a distance of the order of the connectedness length [, diverges as Ip-{pCI}-’. The remaining (multiply connected) bonds in the percolating backbone, which lump together in ‘blobs’,diverge with a dimensionality-dependent exponent. In the light of these results, the backbone of the infinite cluster near p c is better described by a ‘nodes, links and blobs’ picture, rather than the simplified Skal-Shklovskii-de Gennes ‘nodes and links’ model.},
	pages = {3829--3844},
	number = {12},
	journaltitle = {Journal of Physics A: Mathematical and General},
	author = {Coniglio, Antonio},
	urldate = {2018-05-15},
	date = {1982-12-01},
	langid = {english},
	file = {Coniglio - 1982 - Cluster structure near the percolation threshold.pdf:/home/anjohan/Zotero/storage/ECP3TNHK/Coniglio - 1982 - Cluster structure near the percolation threshold.pdf:application/pdf}
}


text:
@inproceedings{las03ftp,
 address = {Las Vegas},
 author = {von Laszewski, Gregor and Beulah Alunkal and Jarek Gawor and Ravi Madhuri and Pawel Plaszczak and Xian-He Sun},
 booktitle = {Proceedings of the International Conferenece on Parallel and Distributed Processing Techniques and Applications},
 day = {~23-26},
 editor = {H.R. Arabnia and Youngson Mun},
 month = {June},
 pages = {24-30},
 publisher = {CSREA Press},
 status = {final},
 title = {A File Transfer Component for Grids},
 url = {https://laszewski.github.io/papers/vonLaszewski-gridftp.pdf},
 volume = {1},
 year = {2003}
}

license: MIT

license_type: permissive

branch_name: refs/heads/main

extension: bib


text:
SUMMARY = "Hello world (cmake)"
DESCRIPTION = "Hello world (cmake)"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891"
SECTION = "examples"
PR = "r0"

SRC_URI = "file://hello-cmake.tar.bz2"
SRC_URI[md5sum] = "5937e4fccb6fd166f2f18153d622cf79"
SRC_URI[sha256sum] = "f8ce28b84696887bdbca7446e56a139efc78f98ef6115f0dae285bf1ecd51709"

S = "${WORKDIR}/hello-cmake"

inherit cmake

repository: s-vincent/meta-softwares-sv

repo_name: s-vincent/meta-softwares-sv

branch_name: refs/heads/master

extension: bb


text:
// This file does not need to be updated. Release versions are set at build time (see LDFLAGS in the Makefile)

package metal

var (
	// VERSION is reported in the API User-Agent
	VERSION = "devel"
)

repository: clrxbl/cloud-provider-equinix-metal

repo_name: clrxbl/cloud-provider-equinix-metal

gha_license_id: NOASSERTION

extension: go


text:
require dnsmasq.inc

SRC_URI += "\
    file://parallel-make.patch \
    file://lua.patch \
"

SRC_URI[dnsmasq-2.72.md5sum] = "cf82f81cf09ad3d47612985012240483"
SRC_URI[dnsmasq-2.72.sha256sum] = "635f1b47417d17cf32e45cfcfd0213ac39fd09918479a25373ba9b2ce4adc05d"

branch_name: refs/heads/fido

gha_license_id: MIT

gha_language: BitBake


text:
@article{2018HKW_a,
 copyright = {All rights reserved},
 doi = {10.1088/1361-6544/aa9528},
 issn = {0951-7715},
 journal = {Nonlinearity},
 language = {en},
 month = {January},
 number = {2},
 pages = {515--539},
 title = {A characterization of linearly repetitive cut and project sets},
 url = {https://doi.org/10.1088%2F1361-6544%2Faa9528},
 urldate = {2019-06-18},
 volume = {31},
 year = {2018}
}

repository: jjwalton/personalwebpage

repo_name: jjwalton/personalwebpage


text:
@phdthesis{garrido2020multivariate,
  title={A Multivariate approach to study the genetic determinants of phenotypic traits},
  author={Garrido Mart{\'\i}n, Diego and others},
  year={2020},
  school={Universitat Pompeu Fabra}
}

@article{gonzalez2019polymorphic,
  title={Polymorphic inversions underlie the shared genetic susceptibility to prevalent common diseases},
  author={Gonz{\'a}lez, Juan R},
  journal={bioRxiv},
  pages={859280},
  year={2019},
  publisher={Cold Spring Harbor Laboratory}
}

@article{ruiz2019scoreinvhap,
  title={scoreInvHap: Inversion genotyping for genome-wide association studies},
  author={Ruiz-Arenas, Carlos and Caceres, Alejandro and Lopez-Sanchez, Marcos and Tolosana, Ignacio and Perez-Jurado, Luis and Gonzalez, Juan R},
  journal={PLoS genetics},
  volume={15},
  number={7},
  year={2019},
  publisher={Public Library of Science}
}

@article{GonCalSam12,
author = {Gonzalez-Porta, M and Calvo, M and Sammeth, M and Guigo R},
title = {Estimation of alternative splicing variability in human populations},
journal = {Genome Research},
volume = {22},
number={3},
pages = {528-38},
year = {2012}
}

@article{PicMarPai10,
        Author = {Pickrell, J.K. and Marioni, J.C. and Pai, A.A. and Degner, J.F. and Engelhardt, B.E. and Nkadori, E. and Veyrieras, J.B. and Stephens, M. and Gilad, Y. and Pritchard, J.K.},
        Journal = {Nature},
        Pages = {768-772},
        Title = {{Understanding mechanisms underlying human gene expression variation with RNA sequencing}},
        Volume = {464},
        Year = {2010}}

@article{GEM,
        Abstract = {Because of ever-increasing throughput requirements of sequencing data, most existing short-read aligners have been designed to focus on speed at the expense of accuracy. The Genome Multitool (GEM) mapper can leverage string matching by filtration to search the alignment space more efficiently, simultaneously delivering precision (performing fully tunable exhaustive searches that return all existing matches, including gapped ones) and speed (being several times faster than comparable state-of-the-art tools).},
        Author = {Marco-Sola, Santiago and Sammeth, Michael and Guig{\'o}, Roderic and Ribeca, Paolo},
        Date-Added = {2013-02-28 23:19:19 +0000},
        Date-Modified = {2013-02-28 23:19:19 +0000},
        Doi = {10.1038/nmeth.2221},
        Journal = {Nat Methods},
        Journal-Full = {Nature methods},
        Mesh = {Algorithms; Base Sequence; Computational Biology; Genome; Genomics; Humans; Sequence Alignment; Sequence Analysis, DNA; Software},
        Month = {Dec},
        Number = {12},
        Pages = {1185-8},
        Pmid = {23103880},
        Pst = {ppublish},
        Title = {The GEM mapper: fast, accurate and versatile alignment by filtration},
        Volume = {9},
        Year = {2012},
        Bdsk-Url-1 = {http://dx.doi.org/10.1038/nmeth.2221}}

@article{Anderson06,
        Author = {Anderson, M.J.},
        Journal = {Biometrics},
        Pages = {245-253},
        Title = {{Distance-based tests for homogeneity of multivariate dispersion}},
        Volume = {62},
        Year = {2006}}

repository: isglobal-brge/rasp

repo_name: isglobal-brge/rasp

gha_language: R


text:
file(REMOVE_RECURSE
  "CMakeFiles/SetMatrixZeroes.dir/main.cpp.o"
  "SetMatrixZeroes.pdb"
  "SetMatrixZeroes"
)

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

extension: cmake


text:
DESCRIPTION = "User space daemon for extended IEEE 802.11 management"
HOMEPAGE = "http://hostap.epitest.fi"
SECTION = "kernel/userland"
PRIORITY = "optional"
LICENSE = "GPL"
DEPENDS = "openssl ${@base_contains("COMBINED_FEATURES", "pci", "madwifi-ng", "",d)}"
PR = "r1"

#we introduce MY_ARCH to get 'armv5te' as arch instead of the misleading 'arm' on armv5te builds
MY_ARCH := "${PACKAGE_ARCH}"
PACKAGE_ARCH = "${@base_contains('COMBINED_FEATURES', 'pci', '${MACHINE_ARCH}', '${MY_ARCH}', d)}"

SRC_URI = "http://hostap.epitest.fi/releases/hostapd-${PV}.tar.gz \
	file://makefile-cross.diff;patch=1 \
	file://defconfig \
	file://init"

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

export HAS_PCI = "${@base_contains('COMBINED_FEATURES', 'pci', 1, 0,d)}"

inherit update-rc.d
INITSCRIPT_NAME=hostapd

do_configure() {
	install -m 0644 ${WORKDIR}/defconfig ${S}/.config
	if [ "x$HAS_PCI" = "x1" ] ; then
		echo "CONFIG_DRIVER_MADWIFI=y" >> .config
		echo "CFLAGS += -I${STAGING_INCDIR}/madwifi-ng" >> .config
	fi
}

do_compile() {
	make
}

do_install() {
	install -d ${D}${sbindir} ${D}${sysconfdir}/init.d
	make TARGET_PREFIX=${D}${sbindir} install
	install -m 0644 hostapd.conf ${D}${sysconfdir}
	install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/hostapd
}


text:
package main

import (
	"net/http"
	"net/url"
	"testing"
)

// NopResponseWriter does nothing at all
type NopResponseWriter struct {}

func (w NopResponseWriter) Header() http.Header {
	return http.Header{}
}

func (w NopResponseWriter) Write(d []byte) (int, error) {
	return len(d), nil
}

func (w NopResponseWriter) WriteHeader(int) {
}

// TestGuestBookHandlerRace invokes guestBookHandler from multiple go routines
// in order to detect possible data races.
func TestGuestBookHandlerRace(t *testing.T) {
	f := func() {
		req := http.Request{
			Form: url.Values{},
		}
		req.Form.Set("author", "Heinz")
		req.Form.Set("message", "Hello")
		guestBookHandler(NopResponseWriter{}, &req)
	}

	// Invoke from two different go routines
	go f()
	go f()
}

gha_language: HTML


text:
package convert

import (
	"fmt"
	"strings"
)

type Board struct {
	squareMap [][]Square
}

func (b *Board) String() string {
	rows := []string{}

	for row := range b.squareMap {
		cols := []string{}
		for col := range b.squareMap[row] {
			cols = append(cols, fmt.Sprintf("%s", b.squareMap[row][col]))
		}
		rows = append(rows, strings.Join(cols, " "))
	}
	return strings.Join(rows, "\n")
}

func (b *Board) Width() int {
	return len(b.squareMap[0])
}

func (b *Board) Height() int {
	return len(b.squareMap)
}

func (b *Board) UncoveredMines() int {
	uncoveredMines := 0
	for row := range b.squareMap {
		for col := range b.squareMap[row] {
			if b.squareMap[row][col].isMine && b.squareMap[row][col].isUncovered {
				uncoveredMines++
			}
		}
	}
	return uncoveredMines
}

func (b *Board) CoveredNonMines() int {
	coveredNonMines := 0
	for row := range b.squareMap {
		for col := range b.squareMap[row] {
			if !b.squareMap[row][col].isMine && !b.squareMap[row][col].isUncovered {
				coveredNonMines++
			}
		}
	}
	return coveredNonMines
}

func (b *Board) GetSquare(x, y int) *Square {
	if y < 0 || x < 0 || y >= len(b.squareMap) || x >= len(b.squareMap[0]) {
		panic("illegal coordinates")
	}
	return &b.squareMap[y][x]
}

repository: SimonMonecke/go-mines

repo_name: SimonMonecke/go-mines


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

SUMMARY = "Common Qt features for webOS components"
AUTHOR = "Anupam Kaul <anulam.kaul@lge.com>"
SECTION = "webos/base"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = " \
    file://LICENSE;md5=89aea4e17d99a7cacdbeed46a0096b10 \
    file://oss-pkg-info.yaml;md5=35b2f0d27bf4833f2764dfe176fa1e9c \
"

DEPENDS = "qtbase"

WEBOS_VERSION = "1.0.0-50_e3cd3c25717605a153d10fcccbf35893a38ebb8b"
PR = "r8"

SRCREV = "334ce71ac8f8b574adc45686e191e19d3711852e"

inherit webos_qmake6
#inherit webos_enhanced_submissions
inherit webos_public_repo

SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE} \
           file://0001-Do-not-depend-on-QtInputSupport-for-generate_qmap.patch \
           "
S = "${WORKDIR}/git"

FILES:${PN}-dev += "${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs"

# An empty package is needed to satisfy package dependencies when building bdk.
ALLOW_EMPTY:${PN} = "1"

BBCLASSEXTEND = "native"

do_configure:class-native() {
    ${OE_QMAKE_QMAKE} ${OE_QMAKE_DEBUG_OUTPUT} -r ${S}/tools/generate_qmap
}

do_install:class-native() {
    oe_runmake install INSTALL_ROOT=${D}
}

repository: webOS-ports/meta-webos-ports

repo_name: webOS-ports/meta-webos-ports

branch_name: refs/heads/kirkstone


text:
package client

import (
	"strings"
)

func removeDefinitionRef(s string) string {
	return strings.TrimPrefix(s, "#/definitions/")
}

gha_language: Go


text:
package main

import (

	"log"

	"github.com/go-openapi/loads"
	"github.com/go-openapi/runtime/middleware"
	"github.com/ddipankargogoi/go-rest-api-samples/go-api-testing/pkg/swagger/server/restapi"

	"github.com/ddipankargogoi/go-rest-api-samples/go-api-testing/pkg/swagger/server/restapi/operations"
)

// func main() {
// 	http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
// 		fmt.Fprintf(w, "Hello, %q", html.EscapeString(r.URL.Path))
// 	})

// 	log.Println("Listening on localhost:8080")
// 	log.Fatal(http.ListenAndServe(":8080", nil))
// }

func main() {

	// Initialize Swagger
	swaggerSpec, err := loads.Analyzed(restapi.SwaggerJSON, "")
	if err != nil {
		log.Fatalln(err)
	}

	api := operations.NewHelloAPI(swaggerSpec)
	server := restapi.NewServer(api)

	defer func() {
		if err := server.Shutdown(); err != nil {
			// error handle
			log.Fatalln(err)
		}
	}()

	server.Port = 8080

	// Implement the CheckHealth handler
	// api.CheckHealthHandler = operations.CheckHealthHandlerFunc(
	// 	func(user operations.CheckHealthParams) middleware.Responder {
	// 		return operations.NewCheckHealthOK().WithPayload("OK")
	// 	})
	api.CheckHealthHandler = operations.CheckHealthHandlerFunc(Health)

	// Implement the GetHelloUser handler
	// api.GetHelloUserHandler = operations.GetHelloUserHandlerFunc(
	// 	func(user operations.GetHelloUserParams) middleware.Responder {
	// 		return operations.NewGetHelloUserOK().WithPayload("Hello " + user.User + "!")
	// 	})
	api.GetHelloUserHandler = operations.GetHelloUserHandlerFunc(GetHelloUser)

	// Start server which listening
	if err := server.Serve(); err != nil {
		log.Fatalln(err)
	}
}

//Health route returns OK
func Health(operations.CheckHealthParams) middleware.Responder {
	return operations.NewCheckHealthOK().WithPayload("OK")
}

//GetHelloUser returns Hello + your name
func GetHelloUser(user operations.GetHelloUserParams) middleware.Responder {
	return operations.NewGetHelloUserOK().WithPayload("Hello " + user.User + "!")
}

repository: ddipankargogoi/cloud-build-samples

repo_name: ddipankargogoi/cloud-build-samples


text:
SUMMARY = "libmypaint is a library for making brushstrokes"
LICENSE = "ISC"
LIC_FILES_CHKSUM = "file://COPYING;md5=9d13203ab4013e5a14dd62105f75d58b"

DEPENDS = " \
    glib-2.0-native \
    intltool-native \
    glib-2.0 \
    babl \
    json-c \
"

inherit autotools gobject-introspection gettext pkgconfig python3native

SRC_URI = "git://github.com/mypaint/libmypaint.git;protocol=https;branch=libmypaint-v1 \
           file://0001-make-build-compatible-w.-autoconf-2.7.patch \
          "
SRCREV = "2768251dacce3939136c839aeca413f4aa4241d0"
PV = "1.6.1"
S = "${WORKDIR}/git"

do_configure:append() {
    # autogen uses python2 so generate headers ourselves
    cd ${S}
    python3 generate.py mypaint-brush-settings-gen.h brushsettings-gen.h
}

repository: openembedded/meta-openembedded

repo_name: openembedded/meta-openembedded


text:
require wpa-supplicant-0.6.inc

PR = "${INC_PR}.1"

SRC_URI[md5sum] = "b51b2975f21006f85f7297f3fb1acde1"
SRC_URI[sha256sum] = "f70b18243e049bbda66254388b6e94d404e747d913b8496d6e93a9c56bbf4af2"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD


text:
SECTION = "devel/chicken"
DESCRIPTION = "Provides an easy to use case construct for regular expression matching"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://regex-case.meta;md5=e619ed2ca34b398ddd88e18ee8142f72"
DEPENDS_append_class-cross = " chicken-egg-regex-cross"
DEPENDS_append_class-crosssdk = " chicken-egg-regex-crosssdk"
DEPENDS_append_class-nativesdk = " nativesdk-chicken-egg-regex chicken-egg-regex-crosssdk"
DEPENDS = " chicken-egg-regex chicken-egg-regex-cross"
RDEPENDS_${PN} = " chicken-egg-regex"

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

SRC_URI[md5sum] = "16b02edb0583b82dce058f7247de4981"
SRC_URI[sha256sum] = "66434be5de9c3bb05a5f9ad38374756ad7b9790c58180530630cf8ac66cd843b"

S = "${WORKDIR}/regex-case-${PV}"

inherit chicken_install

BBCLASSEXTEND = "cross crosssdk nativesdk"

repository: OSSystems/meta-chicken

repo_name: OSSystems/meta-chicken


text:
@article{beber2019septin,
 abstract = {Septins are cytoskeletal filaments that assemble at the inner face of the plasma membrane. They are localized at constriction sites and impact membrane remodeling. We report in vitro tools to examine how yeast septins behave on curved and deformable membranes. Septins reshape the membranes of Giant Unilamellar Vesicles with the formation of periodic spikes, while flattening smaller vesicles. We show that membrane deformations are associated to preferential arrangement of septin filaments on specific curvatures. When binding to bilayers supported on custom-designed periodic wavy patterns displaying positive and negative micrometric radii of curvatures, septin filaments remain straight and perpendicular to the curvature of the convex parts, while bending negatively to follow concave geometries. Based on these results, we propose a theoretical model that describes the deformations and micrometric curvature sensitivity observed in vitro. The model captures the reorganizations of septin filaments throughout cytokinesis in vivo, providing mechanistic insights into cell division.},
 author = {Beber, Alexandre and Taveneau, Cyntia and Nania, Manuela and Tsai, Feng-Ching and Di Cicco, Aurelie and Bassereau, Patricia and Lévy, Daniel and Cabral, João T and Isambert, Hervé and Mangenot, Stéphanie and Aurélie, Bertin},
 doi = {10.1038/s41467-019-08344-5},
 featured = {false},
 issn = {2041-1723},
 journal = {Nature Communications},
 number = {1},
 pages = {420},
 title = {Membrane reshaping by micrometric curvature sensitive septin filaments},
 type = {Journal Article},
 url = {https://www.nature.com/articles/s41467-019-08344-5},
 volume = {10},
 year = {2019}
}

repository: FengChingTsai/academic-kickstart

repo_name: FengChingTsai/academic-kickstart


text:
@misc{menichinelli_fab_2016,
	title = {Fab {City} {Dashboard} v0.1},
	url = {https://zenodo.org/record/2631192},
	abstract = {What is the resilience of a city regarding its manufacturing, distribution and consumption of goods? What is the role of citizens in changing the existing networks with open, distributed and collaborative projects and making activities in the city? The Fab City Dashboard project aims at developing a visualisation tool for Fab Cities that show the relation between urban spaces and their networks of design, production and consumption by highlighting their supply chains, resilience and impact. Such a tool can help cities and citizens to understand how citizens design and produce in urban spaces within networks of suppliers, manufacturers, craftsmen, fab labs, makerspaces, hackerspaces, and so on. The Fab City Dashboard project was selected for the Visualizar’16 International Workshop, titled Ciudades abiertas, Open Cities - September 26th to October 5th. During ten days, eight multidisciplinary teams developed eight projects dealing with city data. The selected projects were presented during the Open Cities Summit, the international summit of open cities, which took place in Medialab-Prado on October 5th within the framework of the activities previous to the International Open Data Conference, \#IODC16. http://dashboard.fab.city/ - https://github.com/fablabbcn/fab-city-dashboard},
	urldate = {2019-04-06},
	publisher = {Zenodo},
	author = {Menichinelli, Massimo and Quintero, Mariana and Paris, Julien},
	month = oct,
	year = {2016},
	doi = {10.5281/zenodo.2631192}
}


text:
#
# This file was derived from the 'Hello World!' example recipe in the
# Yocto Project Development Manual.
#

DESCRIPTION = "Modbus lib for nodejs"
SECTION = "teko"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PR = "r0"

inherit npm

DEPENDS = "nodejs node-gyp-native libmodbus"

SRC_URI = "file://addon.cc \
file://binding.gyp \
file://mbobject.h \
file://mbobject.cc \
file://index.js"

S = "${WORKDIR}"

do_configure() {
    export LD="${CXX}"
    export GYP_DEFINES="sysroot=${STAGING_DIR_HOST}"
    node-gyp --arch ${TARGET_ARCH} configure
}

do_compile() {
    export LD="${CXX}"
    export GYP_DEFINES="sysroot=${STAGING_DIR_HOST}"
    node-gyp --arch ${TARGET_ARCH} build
}

do_install() {
    install -D -m 0755 ${S}/build/Release/modbus.node ${D}${libdir}/node_modules/modbus.node
}

FILES_${PN} += "${libdir}/node_modules/modbus.node"

# Prevents do_package failures with:
# debugsources.list: No such file or directory:
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"


text:
DESCRIPTION = "The Enlightenment Window Manager Version 17"
DEPENDS = "eet evas ecore edje efreet edbus eeze"
LICENSE = "MIT BSD"
SRCNAME = "e"
PV = "0.16.999.060+svnr${SRCPV}"
PR = "r18"
SRCREV = "${EFL_SRCREV}"

inherit e update-alternatives
S = "${WORKDIR}/${SRCNAME}"

SRC_URI = "\
  ${E_SVN}/trunk;module=${SRCNAME};proto=http \
  file://enlightenment_start.oe \
  file://applications.menu \
"

SRC_URI_append_shr = " \
  file://illume-disable-screensaver.patch \
  file://wizard-module-skipping.patch \
  file://illume-flaunch-fix.patch \
"

EXTRA_OECONF = "\
  --with-edje-cc=${STAGING_BINDIR_NATIVE}/edje_cc \
  --with-eet-eet=${STAGING_BINDIR_NATIVE}/eet \
  --x-includes=${STAGING_INCDIR}/X11 \
  --x-libraries=${STAGING_LIBDIR} \
  --enable-simple-x11 \
"

do_configure_prepend() {
	autopoint
}

do_install_append() {
    # customising - should rather make this simple upstream
    install -m 755 ${WORKDIR}/enlightenment_start.oe ${D}/${bindir}

    install -d ${D}/${datadir}/applications/
    install -m 644 ${S}/src/modules/fileman/module.desktop ${D}/${datadir}/applications/efm.desktop
    sed "s#Type=Link#Type=Application#g" -i ${D}/${datadir}/applications/efm.desktop
    echo "Exec=enlightenment_remote -efm-open-dir" >> ${D}/${datadir}/applications/efm.desktop
    echo "Terminal=false" >> ${D}/${datadir}/applications/efm.desktop
    echo "Categories=Application;" >> ${D}/${datadir}/applications/efm.desktop
    echo "StartupNotify=true" >> ${D}/${datadir}/applications/efm.desktop
    install -d ${D}/${datadir}/icons/
    install -m 644 ${S}/data/themes/images/icon_icon_theme.png ${D}/${datadir}/icons/e-module-fileman.png

    install -d ${D}/${sysconfdir}/xdg/menus
    install -m 644 ${WORKDIR}/applications.menu ${D}/${sysconfdir}/xdg/menus/
    for I in `find ${D}/${libdir}/enlightenment -name "*.a" -print`; do rm -f $I; done
    for I in `find ${D}/${libdir}/enlightenment -name "*.la" -print`; do rm -f $I; done
}

RDEPENDS_${PN} += "\
  shared-mime-info \
  mime-support \
  edje-utils \
  ${PN}-utils \
"

# Uclibc build don't have 'glibc-utils'
RDEPENDS_${PN}_append_libc-glibc = " glibc-utils "

# The systray module used to be external, but is part of e-wm now
RREPLACES_${PN} = "systray"

PACKAGES =+ "\
  ${PN}-config-default \
  ${PN}-config-illume \
  ${PN}-config-illume2 \
  ${PN}-config-minimalist \
  ${PN}-config-netbook \
  ${PN}-config-scaleable \
  ${PN}-config-standard \
  ${PN}-theme-default \
  ${PN}-theme-illume \
  ${PN}-background-dark-gradient \
  ${PN}-background-light-gradient \
  ${PN}-images \
  ${PN}-icons \
  ${PN}-other \
  ${PN}-input-methods \
  ${PN}-sysactions \
  ${PN}-utils \
  ${PN}-menu \
  efm-desktop-icon \
  illume-keyboard-default-alpha \
  illume-keyboard-default-numeric \
  illume-keyboard-default-terminal \
"

RRECOMMENDS_${PN} = "\
  ${PN}-config-default \
  ${PN}-images \
  ${PN}-icons \
  ${PN}-other \
  ${PN}-input-methods \
  ${PN}-sysactions \
"

PACKAGE_ARCH_${PN}-config-default = "all"
PACKAGE_ARCH_${PN}-config-illume = "all"
PACKAGE_ARCH_${PN}-config-illume2 = "all"
PACKAGE_ARCH_${PN}-config-minimalist = "all"
PACKAGE_ARCH_${PN}-config-netbook = "all"
PACKAGE_ARCH_${PN}-config-scaleable = "all"
PACKAGE_ARCH_${PN}-config-standard = "all"
PACKAGE_ARCH_${PN}-theme-default = "all"
PACKAGE_ARCH_${PN}-theme-illume = "all"
PACKAGE_ARCH_${PN}-background-dark-gradient = "all"
PACKAGE_ARCH_${PN}-background-light-gradient = "all"
PACKAGE_ARCH_${PN}-images = "all"
PACKAGE_ARCH_${PN}-icons = "all"
PACKAGE_ARCH_${PN}-other = "all"
PACKAGE_ARCH_${PN}-input-methods = "all"
PACKAGE_ARCH_${PN}-sysactions = "all"
PACKAGE_ARCH_${PN}-menu = "all"
PACKAGE_ARCH_efm-desktop-icon = "all"
PACKAGE_ARCH_illume-keyboard-default-alpha = "all"
PACKAGE_ARCH_illume-keyboard-default-numeric = "all"
PACKAGE_ARCH_illume-keyboard-default-terminal = "all"

FILES_${PN} = "\
  ${bindir}/* \
  ${libdir}/enlightenment/utils/* \
  ${libdir}/enlightenment/modules/*/*.* \
  ${libdir}/enlightenment/modules/*/*/* \
  ${libdir}/enlightenment/*plugins/*/*/* \
  ${libdir}/enlightenment/preload/e_precache.so \
  ${datadir}/enlightenment/data/icons \
  ${datadir}/enlightenment/data/input_methods \
  ${datadir}/enlightenment/data/config/profile.cfg \
  ${datadir}/enlightenment/AUTHORS \
  ${datadir}/enlightenment/COPYING \
  ${datadir}/xsessions/enlightenment.desktop \
  ${sysconfdir}/xdg \
"

FILES_${PN}-config-default = "${datadir}/enlightenment/data/config/default"
FILES_${PN}-config-illume = "${datadir}/enlightenment/data/config/illume"
FILES_${PN}-config-illume2 = "${datadir}/enlightenment/data/config/illume-home"
FILES_${PN}-config-minimalist = "${datadir}/enlightenment/data/config/minimalist"
FILES_${PN}-config-netbook = "${datadir}/enlightenment/data/config/netbook"
FILES_${PN}-config-scaleable = "${datadir}/enlightenment/data/config/scaleable"
FILES_${PN}-config-standard = "${datadir}/enlightenment/data/config/standard"
FILES_${PN}-theme-default = "${datadir}/enlightenment/data/themes/default.edj"
FILES_${PN}-theme-illume = "${datadir}/enlightenment/data/themes/illume.edj"
FILES_${PN}-theme-default = "${datadir}/enlightenment/data/themes/default.edj"
FILES_${PN}-background-dark-gradient = "${datadir}/enlightenment/data/backgrounds/Dark_Gradient.edj"
FILES_${PN}-background-light-gradient = "${datadir}/enlightenment/data/backgrounds/Light_Gradient.edj"
FILES_${PN}-images = "${datadir}/enlightenment/data/images"
FILES_${PN}-icons = "${datadir}/enlightenment/data/icons"
FILES_${PN}-other = "${datadir}/enlightenment/data/other"
FILES_${PN}-input-methods = "${datadir}/enlightenment/data/input_methods"
FILES_${PN}-sysactions = "${sysconfdir}/enlightenment/sysactions.conf"
FILES_${PN}-utils = "${libdir}/enlightenment/utils/*"
FILES_${PN}-menu = "${sysconfdir}/xdg/menus/applications.menu"

FILES_efm-desktop-icon = "\
  ${datadir}/applications/efm.desktop \
  ${datadir}/icons/e-module-fileman.png \
"

KEYBOARDS_DIR="${libdir}/enlightenment/modules/illume-keyboard/keyboards"
FILES_illume-keyboard-default-alpha = "\
  ${KEYBOARDS_DIR}/Default.kbd \
  ${KEYBOARDS_DIR}/alpha.png \
"
FILES_illume-keyboard-default-numeric = "\
  ${KEYBOARDS_DIR}/Numbers.kbd \
  ${KEYBOARDS_DIR}/numeric.png \
"
FILES_illume-keyboard-default-terminal = "\
  ${KEYBOARDS_DIR}/Terminal.kbd \
  ${KEYBOARDS_DIR}/qwerty.png \
"

RRECOMMENDS_${PN}-config-default = "${PN}-theme-default"
RRECOMMENDS_${PN}-config-illume = "\
  ${PN}-theme-illume \
  illume-keyboard-default-alpha \
  illume-keyboard-default-numeric \
  illume-keyboard-default-terminal \
"
RRECOMMENDS_${PN}-config-illume2 = "\
  ${PN}-theme-illume \
  illume-keyboard-default-alpha \
  illume-keyboard-default-numeric \
  illume-keyboard-default-terminal \
"

RRECOMMENDS_${PN}-config-minimalist = "\
  ${PN}-background-light-gradient \
  ${PN}-theme-default \
"
RRECOMMENDS_${PN}-config-netbook = "\
  ${PN}-background-dark-gradient \
  ${PN}-theme-default \
"
RRECOMMENDS_${PN}-config-scaleable = "${PN}-theme-default"
RRECOMMENDS_${PN}-config-standard = "${PN}-theme-default"

FILES_${PN}-dbg += "\
  ${libdir}/enlightenment/modules/*/*/.debug/ \
  ${libdir}/enlightenment/preload/.debug/ \
  ${libdir}/enlightenment/utils/.debug/ \
  ${libdir}/enlightenment/*plugins/*/*/.debug \
"

FILES_${PN}-doc += "\
  ${datadir}/enlightenment/doc \
"

CONFFILES_${PN}-menu = "${sysconfdir}/xdg/menus/applications.menu"
CONFFILES_${PN}-sysactions = "/etc/enlightenment/sysactions.conf"

ALTERNATIVE_PATH = "${bindir}/enlightenment_start.oe"
ALTERNATIVE_NAME = "x-window-manager"
ALTERNATIVE_LINK = "${bindir}/x-window-manager"
ALTERNATIVE_PRIORITY = "16"


text:
package models
import (
    "errors"
)
//
type ContentState int

const (
    REST_CONTENTSTATE ContentState = iota
    MOTION_CONTENTSTATE
    USE_CONTENTSTATE
)

func (i ContentState) String() string {
    return []string{"rest", "motion", "use"}[i]
}
func ParseContentState(v string) (any, error) {
    result := REST_CONTENTSTATE
    switch v {
        case "rest":
            result = REST_CONTENTSTATE
        case "motion":
            result = MOTION_CONTENTSTATE
        case "use":
            result = USE_CONTENTSTATE
        default:
            return 0, errors.New("Unknown ContentState value: " + v)
    }
    return &result, nil
}
func SerializeContentState(values []ContentState) []string {
    result := make([]string, len(values))
    for i, v := range values {
        result[i] = v.String()
    }
    return result
}

repository: microsoftgraph/msgraph-beta-sdk-go

repo_name: microsoftgraph/msgraph-beta-sdk-go


text:
DESCRIPTION = "Linknx is an automation platform providing high level functionalities to EIB/KNX installation. \
The rules engine allows execution of actions based on complex logical conditions and timers"
HOMEPAGE = "http://linknx.sourceforge.net/"
SECTION = "console/network"
PRIORITY = "optional"
LICENSE = "GPL"

DEPENDS = " pthsem "
DEPENDS_append_linux-uclibc = " argp-standalone"
DEPENDS_append_linux-uclibcgnueabi = " argp-standalone"

SRC_URI = "${SOURCEFORGE_MIRROR}/linknx/linknx-${PV}.tar.gz \
           file://configure-libcurl.patch;patch=1 "

inherit autotools

EXTRA_OECONF = " --with-pth=yes --without-pth-test --without-mysql --without-libcurl --without-log4cpp --without-lua"


text:
// package generateFib
package main

import (
	"errors"
	"fmt"
)

type Matrix struct {
	matrix [][]int
	row    int // 行
	column int // 列
}

func main() {
	// fmt.Println(fib(10))
	// fmt.Println(quickPow(2, 8))
	a := generateStandardMatrix()
	// b := generateStandardMatrix()
	// res, _ := MatrixMultiply(a, b)
	// res, _ = MatrixMultiply(res, res)
	// res.printMatrix()
	c := a.quickMatrixPow(4)
	c.printMatrix()
	// fmt.Println(c.matrix[0][0])

}

func (mt *Matrix) Init(row, column int) error {
	if row < 0 || column < 0 {
		return errors.New("Argument error")
	}
	mt.row = row
	mt.column = column
	for i := 0; i < mt.column; i++ {
		tmp := make([]int, mt.row)
		mt.matrix = append(mt.matrix, tmp)
	}
	return nil
}

func generateStandardMatrix() *Matrix {
	tmp := new(Matrix)
	tmp.row = 2
	tmp.column = 2
	tmp.matrix = [][]int{
		{1, 1},
		{1, 0},
	}
	return tmp
}

func MatrixMultiply(a, b *Matrix) (*Matrix, error) {
	if a.column != b.row {
		return nil, errors.New("Argument error")
	}
	tmp := new(Matrix)
	tmp.Init(a.row, b.column)
	for i := 0; i < a.row; i++ {
		for z := 0; z < b.column; z++ {
			res := 0
			for q := 0; q < a.column; q++ {
				res = res + a.matrix[i][q]*b.matrix[q][z]
			}
			// tmp.matrix[i] = append(tmp.matrix[i], res)
			tmp.matrix[i][z] = res
		}
	}
	return tmp, nil
}

func (mt *Matrix) printMatrix() {
	if mt.column != 0 || mt.row != 0 {
		for i := 0; i < mt.row; i++ {
			for subI := 0; subI < mt.column; subI++ {
				fmt.Printf("%d ", mt.matrix[i][subI])
			}
			fmt.Println()
		}
	}
	return
}

func (mt *Matrix) Unit() {
	if mt.column < 0 && mt.row < 0 {
		return
	}
	for i := 0; i < mt.row; i++ {
		for z := 0; z < mt.column; z++ {
			if z == i {
				mt.matrix[i][z] = 1
			}
		}
	}
}

func quickPow(a, b int) int {
	res := 1
	if b == 0 {
		return res
	}
	if b&1 == 1 {
		res *= a
		b--
	}
	b >>= 1
	res *= quickPow(a, b) * quickPow(a, b)

	return res
}

func (mt *Matrix) quickMatrixPow(step int) *Matrix {
	var res *Matrix = new(Matrix)
	c := mt
	res.Init(2, 2)
	res.Unit()
	if step == 0 {
		return res
	}
	if step&1 == 1 {
		res, _ = MatrixMultiply(res, mt)
	}
	step >>= 1
	tmp, _ := MatrixMultiply(c.quickMatrixPow(step), c.quickMatrixPow(step))
	res, _ = MatrixMultiply(res, tmp)
	return res
}

repository: import-yuefeng/algorithm

repo_name: import-yuefeng/algorithm


text:
package data

import (
	"log"
	"time"

	"github.com/go-redis/redis"
)

const counterKey = "url_counter_key"

type Storage interface {
	Set(key string, value string) error
	Get(key string) (string, error)
	Next() (int64, error)
}

type redisStorage struct {
	client *redis.Client
}

func NewRedisStorage(addr, password string, db int) *redisStorage {
	c := redis.NewClient(&redis.Options{
		Addr:     addr,
		Password: password,
		DB:       db,
	})

	err := c.Ping().Err()
	if err != nil {
		log.Fatalf("Could not reach redis instance: %s", err.Error())
	}

	return &redisStorage{
		client: c,
	}
}

func (rs redisStorage) Set(key string, value string) error {
	_, err := rs.client.Set(key, value, time.Hour*24).Result()
	return err
}

func (rs redisStorage) Get(key string) (string, error) {
	value, err := rs.client.Get(key).Result()
	return value, err
}

func (rs redisStorage) Next() (int64, error) {
	value, err := rs.client.Incr(counterKey).Result()
	return value, err
}

repository: valerio/shortener

repo_name: valerio/shortener


text:
# - Find Voyager
#
# VOYAGER_INCLUDE_DIRS  - List of Voyager includes.
# VOYAGER_LIBRARIES     - List of libraries when using Voyager.
# VOYAGER_FOUND         - True if Voyager found

# Look for the header of file.
find_path(VOYAGER_INCLUDE NAMES voyager/core/tcp_server.h
                          PATHS $ENV{VOYAGER_ROOT}/include /opt/local/include /usr/local/include /usr/include
                          DOC "Path in which the file voyager/core/tcp_server.h is located.")

# Look for the library.
find_library(VOYAGER_LIBRARY NAMES voyager
                             PATHS $ENV{VOYAGER_ROOT}/lib /usr/local/lib /usr/lib
                             DOC "Path to voyager library.")
# Look for the library.
find_library(VOYAGER_RPC_LIBRARY NAMES voyager_rpc
                             PATHS $ENV{VOYAGER_ROOT}/lib /usr/local/lib /usr/lib
                             DOC "Path to voyager_rpc library.")

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Voyager DEFAULT_MSG VOYAGER_INCLUDE VOYAGER_LIBRARY)

if(VOYAGER_FOUND)
  set(VOYAGER_INCLUDE_DIRS ${VOYAGER_INCLUDE})
  set(VOYAGER_LIBRARIES ${VOYAGER_LIBRARY} ${VOYAGER_RPC_LIBRARY})
  mark_as_advanced(VOYAGER_INCLUDE VOYAGER_LIBRARY)
  message(STATUS "Found Voyager (include: ${VOYAGER_INCLUDE_DIRS}, library: ${VOYAGER_LIBRARIES})")
endif()

repository: QiumingLu/skywalker

repo_name: QiumingLu/skywalker


text:
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
    message(STATUS "Setting build type to 'Release' as none was specified.")
    set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
    # Set the possible values of build type for cmake-gui
    set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
        "MinSizeRel" "RelWithDebInfo")
endif()

if(UNIX AND NOT CYGWIN)
    if(APPLE)
        set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
        set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
    else()
        set(CMAKE_SKIP_BUILD_RPATH FALSE)
        set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
        set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
        set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
    endif()
endif()

include(CheckCXXCompilerFlag)

# Related linking of fern lib to generated C++ code.
# set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-all-symbols")
# For executables, you can use:
# ADD_EXECUTABLE(NAME_OF_EXECUTABLE $ $)
# SET(LINK_FLAGS ${LINK_FLAGS} "-Wl,-whole-archive")
# TARGET_LINK_LIBRARIES(NAME_OF_EXECUTABLE ${PROJECT_NAME})

# TODO: Treat all warnings as errors and explicitly turn off warning that
#       we don't consider errors. Example(!):
# Clang:
# -Werror -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-exit-time-destructors -Wno-missing-braces -Wno-padded
# Visual Studio:
# /WX /Wall
# Gcc:
# -Werror -Wall -Wextra -Wpedantic -Wcast-align -Wcast-qual -Wconversion -Wctor-dtor-privacy -Wdisabled-optimization -Wdouble-promotion -Wfloat-equal -Wformat=2 -Winit-self -Winvalid-pch -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wtrampolines -Wundef -Wunsafe-loop-optimizations -Wvector-operation-performance -Wzero-as-null-pointer-constant

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR
        CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
    # Handle case where C++ compiler is gcc or clang.

    # TODO Figure this out:
    # https://gcc.gnu.org/wiki/Visibility

    # The code assumes integer overflow and underflow wraps. This is not
    # guaranteed by the standard. Gcc may assume overflow/underflow will not
    # happen and optimize the code accordingly. That's why we added
    # -fno-strict-overflow. It would be better if we don't assume
    # over/underflow wraps.
    # See http://www.airs.com/blog/archives/120
    # See out of range policy of add algorithm for signed integrals.
    #
    # Add as many warning options as possible/useful:
    # - https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
    # TODO Maybe add:
    # -Wconversion
    # -Wsign-conversion
    set(CMAKE_CXX_FLAGS
        "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wcast-qual -Wwrite-strings -Werror=strict-aliasing -fno-strict-overflow -ftemplate-backtrace-limit=0"
    )

    # This results in an error on mingw/gcc 4.8/windows. Some warning about
    # and unused parameters. Skip for now.
    # set(CMAKE_CXX_FLAGS_RELEASE
    #         "${CMAKE_CXX_FLAGS_RELEASE} -Werror"
    #     )

    # if(NOT MINGW)
    #     # This option triggers a warning on Windows, something in
    #     # boost.filesystem. Not fixing it now.
    #     set(CMAKE_CXX_FLAGS
    #         "${CMAKE_CXX_FLAGS} -Wzero-as-null-pointer-constant"
    #     )
    # endif()

    if(APPLE)
        set(CMAKE_CXX_FLAGS
            "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs"
        )
    endif()

    # TODO Revisit this option. Only needed for shared libraries.
    # Add the PIC compiler flag if needed.
    # See also CMake property POSITION_INDEPENDENT_CODE.
    if(UNIX AND NOT WIN32)
        if(CMAKE_SIZEOF_VOID_P MATCHES "8")
            CHECK_CXX_COMPILER_FLAG("-fPIC" WITH_FPIC)
            if(WITH_FPIC)
                add_definitions(-fPIC)
            endif()
        endif()
    endif()

elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
    # Handle case where C++ compiler is msvc.

    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_SCL_SECURE_NO_WARNINGS /wd4101")

endif()

if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
    # Handle case where C compiler is gcc and not clang.

    set(CMAKE_C_FLAGS
        "${CMAKE_C_FLAGS} -Wall -Wextra -Wpedantic -Wcast-qual -Wwrite-strings -Werror=strict-aliasing -fno-strict-overflow"
        # If you need this, add it to your project's CMakeLists.txt.
        # -Wno-unused-parameter"
    )

    set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -U_FORTIFY_SOURCE")

    # Make linker report any unresolved symbols.
    set(CMAKE_SHARED_LINKER_FLAGS
        "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
endif()

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
    # Handle case where C++ compiler is gcc and not clang.

    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -U_FORTIFY_SOURCE")

    # Make linker report any unresolved symbols.
    set(CMAKE_SHARED_LINKER_FLAGS
        "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")

elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
    # Handle case where C++ compiler is clang and not gcc.

    check_cxx_compiler_flag("-Wno-vla-extension"
        CXX_SUPPORTS_NO_VLA_EXTENSION)

    if (CXX_SUPPORTS_NO_VLA_EXTENSION)
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-vla-extension")
    endif ()
endif()

if(WIN32)
    set(CMAKE_DEBUG_POSTFIX "d")
endif()

repository: geoneric/devbase

repo_name: geoneric/devbase

gha_language: CMake


text:
SUMMARY = "Weston configuration file with systemd"
DESCRIPTION = "Weston configuration file installation with systemd"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 "

SRC_URI = " file://weston.ini \
            file://utilities-terminal.png \
            file://chromium-browser.png \
            file://wallpaper_1920x1080.png "

SRC_URI += " file://weston.service \
             file://weston.sh \
             file://weston_profile.sh "

FILES_${PN} = "\
    /tmp/xdg_runtime_dir \
    /usr/share/weston/weston.ini \
    /usr/share/weston/icon/utilities-terminal.png \
    /usr/share/weston/icon/chromium-browser.png \
    /usr/share/weston/wallpaper_linaro_1920x1080.png "

FILES_${PN} += "/lib/systemd/system/weston.service \
            /usr/sbin/weston.sh \
            /etc/systemd/system/multi-user.target.wants/display-manager.service \
            /etc/profile.d/"

WESTON_OUT_NAME ?= "HDMI1"
WESTON_OUT_MODE ?= "preferred"

do_install() {
  install -d ${D}/usr/share/weston
  install -d ${D}/usr/share/weston/icon
  sed -i -e "s/##WESTON_OUT_NAME##/${WESTON_OUT_NAME}/g" ${WORKDIR}/weston.ini
  sed -i -e "s/##WESTON_OUT_MODE##/${WESTON_OUT_MODE}/g" ${WORKDIR}/weston.ini
  install -m 0644 ${WORKDIR}/weston.ini ${D}/usr/share/weston/weston.ini
  install -m 0644 ${WORKDIR}/utilities-terminal.png ${D}/usr/share/weston/icon/utilities-terminal.png
  install -m 0644 ${WORKDIR}/chromium-browser.png ${D}/usr/share/weston/icon/chromium-browser.png
  install -m 0644 ${WORKDIR}/wallpaper_1920x1080.png ${D}/usr/share/weston/wallpaper_linaro_1920x1080.png

  install -d ${D}/lib/systemd/system/ ${D}/usr/sbin
  install -m 0644 ${WORKDIR}/weston.service ${D}/lib/systemd/system/
  install -m 0755  ${WORKDIR}/weston.sh ${D}/usr/sbin

  install -d ${D}/etc/systemd/system/ ${D}/etc/systemd/system/multi-user.target.wants/
  ln -s /lib/systemd/system/weston.service ${D}/etc/systemd/system/multi-user.target.wants/display-manager.service

  install -d ${D}/etc/profile.d
  install -m 0755 ${WORKDIR}/weston_profile.sh ${D}/etc/profile.d/
}

repository: psivasubramanian/meta-lhg

repo_name: psivasubramanian/meta-lhg


text:
@inproceedings{von2017teaching,
 author = {von Laszewski, Gergor and Fox, Geoffrey C.},
 booktitle = {https://laszewski.github.io/papers/vonLaszewski-i524-chameleon.pdf},
 comment = {TODO},
 number = {Chameleon Cloud User Meeting},
 title = {Teaching Big Data and Open Source Software on Chameleon Cloud},
 year = {2017}
}


text:
# SPDX-License-Identifier: MIT

SUMMARY = "Patched version of Python 3 distributed with the Barefoot SDE"
HOMEPAGE = "http://www.python.org"
LICENSE = "PSFv2"

DEPENDS = "bf-python-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl xz"
SRC_URI = "git://${MIONBASE}/bf-sde; \
           file://python-config.patch \
           file://000-cross-compile.patch \
           file://020-dont-compile-python-files.patch \
           file://030-fixup-include-dirs.patch \
           file://070-dont-clean-ipkg-install.patch \
           file://080-distutils-dont_adjust_files.patch \
           file://110-enable-zlib.patch \
           file://130-readline-setup.patch \
           file://150-fix-setupterm.patch \
           file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
           file://03-fix-tkinter-detection.patch \
           file://04-default-is-optimized.patch \
           file://avoid_warning_about_tkinter.patch \
           file://cgi_py.patch \
           file://host_include_contamination.patch \
           file://python-3.3-multilib.patch \
           file://shutil-follow-symlink-fix.patch \
           file://sysroot-include-headers.patch \
           file://unixccompiler.patch \
           file://avoid-ncursesw-include-path.patch \
           file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
           file://python3-setup.py-no-host-headers-libs.patch \
           file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
           file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
           file://setup.py-find-libraries-in-staging-dirs.patch \
           file://use_packed_importlib.patch \
           file://0001-Update-shebang-to-python3.patch \
           "
SRCREV="${AUTOREV}"

LIC_FILES_CHKSUM = "file://LICENSE;md5=a4f23ab61ee8baf13a46b19c5cb2226b"

S = "${WORKDIR}/git/bf-sde-${PV}/pkgsrc/bf-utils/third-party/${BPN}"

PKG_DIR = "${WORKDIR}/git/"

FILES_${PN} += "${libdir}/python3.4/*"
FILES_${PN}-staticdev += "${libdir}/python3.4/*/*.a"

INSANE_SKIP_${PN} += " file-rdeps"
INSANE_SKIP_${PN}-dev += "dev-elf"

inherit autotools multilib_header pkgconfig

CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \
                ac_cv_have_lchflags=no \
                ac_cv_have_long_long_format=yes \
                ac_cv_buggy_getaddrinfo=no \
                ac_cv_file__dev_ptmx=yes \
                ac_cv_file__dev_ptc=no \
"

EXTRA_OEMAKE = '\
	HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
 	BUILD_SYS="" \
    HOST_SYS="" \
    STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
    STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
    PYTHON=${PYTHON} \
	'

extract() {
    # Extract SDE
    tar xzf ${PKG_DIR}/bf-sde-${PV}.tgz --directory ${PKG_DIR}
    # Extract package
    mkdir -p ${PKG_DIR}/bf-sde-${PV}/pkgsrc/bf-utils
    tar xzf ${PKG_DIR}/bf-sde-${PV}/packages/bf-utils-${PV}.tgz --directory ${PKG_DIR}/bf-sde-${PV}/pkgsrc/bf-utils --strip-components 1
}

python do_unpack_append() {
    bb.build.exec_func("extract", d)
}

do_install_append() {
  	install -m 0755 python ${D}${bindir}/python3.4m
    # Remove libpython3.so, it clashes with the standard Python
    rm ${D}${libdir}/libpython3.so
}

repository: NetworkGradeLinux/meta-mion-sde

repo_name: NetworkGradeLinux/meta-mion-sde

branch_name: refs/heads/dunfell


text:
SUMMARY = "Vulkan GLSL RetroArch shader system"
DESCRIPTION = "RetroArch is still expected to run on GLES2 and GL2 systems. \
GL2 is mostly not relevant any longer, but GLES2 is certainly a very relevant \
platform still and having GLES2 compatibility makes GL2 very easy. \
We therefore want to avoid speccing out a design which deliberately \
ruins GLES2 compatibility."

HOMEPAGE = "https://www.retroarch.com/"
BUGTRACKER = "https://github.com/libretro/slang-shaders/issues"

LICENSE = "CLOSED"

S = "${WORKDIR}/git"
SRC_URI = "gitsm://github.com/libretro/slang-shaders.git;protocol=https"
SRCREV = "${AUTOREV}"

PV = "2020+git${SRCPV}"
PR = "r1"

inherit allarch retroarch-paths

do_configure[noexec] = "1"
do_compile[noexec] = "1"

FILES_${PN} += "${RETROARCH_SHADERS_DIR}"

do_install() {
  install -m 755 -d ${D}${RETROARCH_SHADERS_DIR}

  rm -f ${S}/Makefile \
    ${S}/README.md \
    ${S}/configure

  cp -rf --preserve=mode ${S}/* ${D}${RETROARCH_SHADERS_DIR}
}

repository: hansenlabs/meta-retro

repo_name: hansenlabs/meta-retro


text:
require gstreamer.inc

SRC_URI[archive.md5sum] = "c92d6bce4fc65fa9d5a3ad35cdd1a466"
SRC_URI[archive.sha256sum] = "e44a737c016ccab56d646718ecf24b9393babde2c417ac7dd5bd218e5c609ef9"

EXTRA_OECONF += "ac_cv_func_register_printf_function=no"

do_configure_prepend() {
	sed -i -e s:docs::g Makefile.am
}

repository: libo/openembedded

repo_name: libo/openembedded


text:
package braintree

import (
	"os"
)

const (
	testFakeValidNonce           = "fake-valid-nonce"
	testFakeValidVisaNonce       = "fake-valid-visa-nonce"
	testFakeValidMastercardNonce = "fake-valid-mastercard-nonce"
	testFakePayPalOneTimeNonce   = "fake-paypal-one-time-nonce"
	testFakePayPalFutureNonce    = "fake-paypal-future-nonce"
)

var testCreditCards = map[string]CreditCard{
	"visa":       CreditCard{Number: "4111111111111111"},
	"mastercard": CreditCard{Number: "5555555555554444"},
	"discover":   CreditCard{Number: "6011111111111117"},
}

var testPaypalAccounts = map[string]PaypalAccount{
	"example": PaypalAccount{Email: "test@example.com"},
	"test":    PaypalAccount{Email: "jane.doe@example.com", Token: os.Getenv("BRAINTREE_PAYPAL_ACCOUNT_TOKEN")},
}

var testGateway = New(
	Sandbox,
	os.Getenv("BRAINTREE_MERCH_ID"),
	os.Getenv("BRAINTREE_PUB_KEY"),
	os.Getenv("BRAINTREE_PRIV_KEY"),
)

var testMerchantAccountId = os.Getenv("BRAINTREE_MERCH_ACCT_ID")

repository: vially/braintree-go

repo_name: vially/braintree-go


text:
@article{minichMicrobialEffectsLivestock2018,
 abstract = {The majority of seafood is farmed, with most finfish coming from freshwater ponds. Ponds are often fertilized to promote microbial productivity as a natural feed source to fish. To understand if pond fertilization with livestock manure induces a probiotic or prebiotic effect, we communally reared tilapia (Oreochromis shiranus), and North African catfish (Clarias gariepinus), for 4 weeks under seven manure treatments including layer chicken, broiler chicken, guinea fowl, quail, pig, cow, vs. commercial feed to evaluate microbial community dynamics of the manure, pond water, and fish feces using 16S and 18S rRNA marker genes along with metagenome sequencing. Catfish growth, but not tilapia, was positively associated with plankton abundance (p = 0.0006, R2 = 0.4887) and greatest in ponds fertilized with quail manure (ANOVA, p $<$ 0.05). Manure was unique and influenced the 16S microbiome in pond water, tilapia gut, and catfish gut and 18S community in pond water and catfish guts (PERMANOVA, p = 0.001). On average, 18.5%, 18.6%, and 45.3% of manure bacteria sOTUs, (sub-operational taxonomic units), were present in the water column, catfish feces, and tilapia feces which comprised 3.7%, 12.8%, and 10.9% of the total microbial richness of the communities, respectively. Antibiotic resistance genes were highest in the manure and water samples followed by tilapia feces and lowest in catfish feces (p $<$ 0.0001). In this study, we demonstrate how the bacterial and eukaryotic microbial composition of fish ponds are influenced by specific livestock manure inputs and that the gut microbiome of tilapia is more sensitive and responsive than catfish to these changes. We conclude that animal manure used as fertilizer induces a primarily prebiotic effect on the pond ecosystem rather than a direct probiotic effect on fish.},
 author = {Minich, Jeremiah J. and Zhu, Qiyun and Xu, Zhenjiang Zech and Amir, Amnon and Ngochera, Maxon and Simwaka, Moses and Allen, Eric E. and Zidana, Hastings and Knight, Rob},
 copyright = {© 2018 The Authors.           MicrobiologyOpen published by John Wiley & Sons Ltd.},
 doi = {10.1002/mbo3.716},
 file = {/Users/zech/Zotero/storage/H8HS7BC2/2018_Minich_et_al_Microbial_effects_of_livestock_manure_fertilization_on_freshwater_aquaculture.pdf},
 issn = {2045-8827},
 journal = {MicrobiologyOpen},
 langid = {english},
 number = {0},
 pages = {e00716},
 title = {Microbial Effects of Livestock Manure Fertilization on Freshwater Aquaculture Ponds Rearing Tilapia (Oreochromis Shiranus) and North African Catfish (Clarias Gariepinus)},
 urldate = {2018-09-07},
 volume = {0},
 year = {2018}
}

repository: zxlab/lab-web

repo_name: zxlab/lab-web

gha_language: TeX


text:
require genext2fs.inc

PV_append = "${SRCDATE}"
PR = "r3"
FILESPATHPKG =. "genext2fs-1.3+cvs:"
SRC_URI = "cvs://anonymous:@genext2fs.cvs.sourceforge.net/cvsroot/genext2fs;module=genext2fs"
S = "${WORKDIR}/genext2fs"

inherit autotools


text:
package jsonb

import (
	"testing"

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

func TestEscapeString(t *testing.T) {
	str := `test		\"asdasjkd
	lkasd128378127#$%^&*()_)(*&^%$#@#~!@#$%`
	blr := NewWriter()
	escapeString(blr, str)
	assert.Equal(t, `test\t\t\\\"asdasjkd\n\tlkasd128378127#$%^&*()_)(*&^%$#@#~!@#$%`, blr.String(), "unexpected result")
}


text:
package main

import (
	"database/sql"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"

	"github.com/gorilla/mux"

	"github.com/ovh/cds/engine/api/context"
	"github.com/ovh/cds/engine/api/group"
	"github.com/ovh/cds/engine/api/user"
	"github.com/ovh/cds/engine/log"
	"github.com/ovh/cds/sdk"
)

func getGroupHandler(w http.ResponseWriter, r *http.Request, db *sql.DB, c *context.Context) {
	// Get group name in URL
	vars := mux.Vars(r)
	name := vars["permGroupName"]

	g, err := group.LoadGroup(db, name)
	if err != nil {
		log.Warning("getGroupHandler: Cannot load group from db: %s\n", err)
		WriteError(w, r, err)
		return
	}

	err = group.LoadUserGroup(db, g)
	if err != nil {
		log.Warning("getGroupHandler: Cannot load user group from db: %s\n", err)
		WriteError(w, r, err)
		return
	}

	WriteJSON(w, r, g, http.StatusOK)
}

func deleteGroupHandler(w http.ResponseWriter, r *http.Request, db *sql.DB, c *context.Context) {
	// Get group name in URL
	vars := mux.Vars(r)
	name := vars["permGroupName"]

	g, err := group.LoadGroup(db, name)
	if err != nil {
		log.Warning("deleteGroupHandler: Cannot load %s: %s\n", name, err)
		WriteError(w, r, err)
		return
	}

	tx, err := db.Begin()
	if err != nil {
		log.Warning("deleteGroupHandler> cannot start transaction: %s\n", err)
		WriteError(w, r, err)
		return
	}
	defer tx.Rollback()

	err = group.DeleteGroupAndDependencies(tx, g)
	if err != nil {
		log.Warning("deleteGroupHandler> cannot delete group: %s\n", err)
		WriteError(w, r, err)
		return
	}

	err = tx.Commit()
	if err != nil {
		log.Warning("deleteGroupHandler> cannot commit transaction: %s\n", err)
		WriteError(w, r, err)
		return
	}

	w.WriteHeader(http.StatusOK)
}

func updateGroupHandler(w http.ResponseWriter, r *http.Request, db *sql.DB, c *context.Context) {

	// Get group name in URL
	vars := mux.Vars(r)
	oldName := vars["permGroupName"]

	// Get body
	data, err := ioutil.ReadAll(r.Body)
	if err != nil {
		w.WriteHeader(http.StatusBadRequest)
		return
	}

	var updatedGroup sdk.Group
	err = json.Unmarshal(data, &updatedGroup)
	if err != nil {
		WriteError(w, r, err)
		return
	}

	if len(updatedGroup.Admins) == 0 {
		log.Warning("updateGroupHandler: Cannot Delete all admins for group %s\n", updatedGroup.Name)
		WriteError(w, r, sdk.ErrGroupNeedAdmin)
		return
	}

	g, err := group.LoadGroup(db, oldName)
	if err != nil {
		log.Warning("updateGroupHandler: Cannot load %s: %s\n", oldName, err)
		WriteError(w, r, err)
		return
	}

	updatedGroup.ID = g.ID
	tx, err := db.Begin()
	if err != nil {
		log.Warning("updateGroupHandler: Cannot start transaction: %s\n", err)
		WriteError(w, r, err)
		return
	}
	defer tx.Rollback()

	err = group.UpdateGroup(tx, &updatedGroup, oldName)
	if err != nil {
		log.Warning("updateGroupHandler: Cannot update group %s: %s\n", oldName, err)
		WriteError(w, r, err)
		return
	}

	err = group.DeleteGroupUserByGroup(tx, &updatedGroup)
	if err != nil {
		log.Warning("updateGroupHandler: Cannot delete users in group %s: %s\n", oldName, err)
		WriteError(w, r, err)
		return
	}

	for _, a := range updatedGroup.Admins {
		u, err := user.LoadUserWithoutAuth(tx, a.Username)
		if err != nil {
			log.Warning("updateGroupHandler: Cannot load user(admins) %s: %s\n", a.Username, err)
			WriteError(w, r, err)
			return
		}
		err = group.InsertUserInGroup(tx, updatedGroup.ID, u.ID, true)
		if err != nil {
			log.Warning("updateGroupHandler: Cannot insert admin %s in group %s: %s\n", a.Username, updatedGroup.Name, err)
			WriteError(w, r, err)
			return
		}
	}

	for _, a := range updatedGroup.Users {
		u, err := user.LoadUserWithoutAuth(tx, a.Username)
		if err != nil {
			log.Warning("updateGroupHandler: Cannot load user(members) %s: %s\n", a.Username, err)
			WriteError(w, r, err)
		}
		err = group.InsertUserInGroup(tx, updatedGroup.ID, u.ID, false)
		if err != nil {
			log.Warning("updateGroupHandler: Cannot insert member %s in group %s: %s\n", a.Username, updatedGroup.Name, err)
			WriteError(w, r, err)
		}
	}

	err = tx.Commit()
	if err != nil {
		log.Warning("updateGroupHandler: Cannot commit transaction: %s\n", err)
		WriteError(w, r, err)
	}

	w.WriteHeader(http.StatusOK)
}

func getGroups(w http.ResponseWriter, r *http.Request, db *sql.DB, c *context.Context) {
	var groups []sdk.Group
	var err error

	if c.User.Admin {
		groups, err = group.LoadGroups(db)
	} else {
		groups, err = group.LoadGroupByUser(db, c.User.ID)
	}
	if err != nil {
		log.Warning("GetGroups: Cannot load group from db: %s\n", err)
		WriteError(w, r, err)
		return
	}

	WriteJSON(w, r, groups, http.StatusOK)
}

func addGroupHandler(w http.ResponseWriter, r *http.Request, db *sql.DB, c *context.Context) {

	// Get body
	data, err := ioutil.ReadAll(r.Body)
	if err != nil {
		w.WriteHeader(http.StatusBadRequest)
		return
	}

	g, err := sdk.NewGroup("").FromJSON(data)
	if err != nil {
		w.WriteHeader(http.StatusBadRequest)
		return
	}

	tx, err := db.Begin()
	if err != nil {
		log.Warning("addGroupHandler> cannot begin tx: %s\n", err)
		w.WriteHeader(http.StatusInternalServerError)
		return
	}
	defer tx.Rollback()

	_, _, err = group.AddGroup(tx, g)
	if err != nil {
		log.Warning("addGroupHandler> cannot add group: %s\n", err)
		WriteError(w, r, err)
		return
	}

	// Add caller into group
	err = group.InsertUserInGroup(tx, g.ID, c.User.ID, false)
	if err != nil {
		log.Warning("addGroupHandler> cannot add user %s in group %s: %s\n", c.User.Username, g.Name, err)
		w.WriteHeader(http.StatusInternalServerError)
		return
	}
	// and set it admin
	err = group.SetUserGroupAdmin(tx, g.ID, c.User.ID)
	if err != nil {
		log.Warning("addGroupHandler> cannot set user group admin: %s\n", err)
		w.WriteHeader(http.StatusInternalServerError)
		return
	}

	err = tx.Commit()
	if err != nil {
		log.Warning("addGroupHandler> cannot commit tx: %s\n", err)
		w.WriteHeader(http.StatusInternalServerError)
		return
	}

	fmt.Printf("POST /group: Group %s added\n", g.Name)
	w.WriteHeader(http.StatusCreated)
}

func removeUserFromGroupHandler(w http.ResponseWriter, r *http.Request, db *sql.DB, c *context.Context) {

	// Get group name in URL
	vars := mux.Vars(r)
	name := vars["permGroupName"]
	userName := vars["user"]

	g, err := group.LoadGroup(db, name)
	if err != nil {
		log.Warning("removeUserFromGroupHandler: Cannot load %s: %s\n", name, err)
		WriteError(w, r, err)
		return
	}

	userID, err := user.FindUserIDByName(db, userName)
	if err != nil {
		log.Warning("removeUserFromGroupHandler: Unknown user %s: %s\n", userName, err)
		w.WriteHeader(http.StatusNotFound)
		return
	}

	userInGroup, err := group.CheckUserInGroup(db, g.ID, userID)
	if err != nil {
		log.Warning("removeUserFromGroupHandler: Cannot check if user %s is already in the group %s: %s\n", userName, g.Name, err)
		w.WriteHeader(http.StatusInternalServerError)
		return
	}

	if !userInGroup {
		log.Warning("removeUserFromGroupHandler> User %s is not in group %s\n", userName, name)
		w.WriteHeader(http.StatusBadRequest)
		return
	}

	err = group.DeleteUserFromGroup(db, g.ID, userID)
	if err != nil {
		log.Warning("removeUserFromGroupHandler: Cannot delete user %s from group %s:  %s\n", userName, g.Name, err)
		w.WriteHeader(http.StatusInternalServerError)
		return
	}

	log.Notice("User %s removed from group %s\n", userName, name)
	w.WriteHeader(http.StatusOK)
}

func addUserInGroup(w http.ResponseWriter, r *http.Request, db *sql.DB, c *context.Context) {

	// Get group name in URL
	vars := mux.Vars(r)
	name := vars["permGroupName"]

	// Get body
	data, err := ioutil.ReadAll(r.Body)
	if err != nil {
		w.WriteHeader(http.StatusBadRequest)
		return
	}

	var users []string
	err = json.Unmarshal(data, &users)
	if err != nil {
		WriteError(w, r, err)
		return
	}

	g, err := group.LoadGroup(db, name)
	if err != nil {
		log.Warning("AddUserInGroup: Cannot load %s: %s\n", name, err)
		WriteError(w, r, err)
		return
	}

	tx, err := db.Begin()
	if err != nil {
		WriteError(w, r, err)
		return
	}
	defer tx.Rollback()

	for _, u := range users {
		userID, err := user.FindUserIDByName(db, u)
		if err != nil {
			log.Warning("AddUserInGroup: Unknown user '%s': %s\n", u, err)
			WriteError(w, r, err)
			return
		}
		userInGroup, err := group.CheckUserInGroup(db, g.ID, userID)
		if err != nil {
			log.Warning("AddUserInGroup: Cannot check if user %s is already in the group %s: %s\n", u, g.Name, err)
			WriteError(w, r, err)
			return
		}
		if !userInGroup {
			group.InsertUserInGroup(db, g.ID, userID, false)
			if err != nil {
				log.Warning("AddUserInGroup: Cannot add user %s in group %s:  %s\n", u, g.Name, err)
				WriteError(w, r, err)
				return
			}
		}

	}

	err = tx.Commit()
	if err != nil {
		WriteError(w, r, err)
		return
	}

	w.WriteHeader(http.StatusOK)
}

func setUserGroupAdminHandler(w http.ResponseWriter, r *http.Request, db *sql.DB, c *context.Context) {
	// Get group name in URL
	vars := mux.Vars(r)
	name := vars["permGroupName"]
	userName := vars["user"]

	g, err := group.LoadGroup(db, name)
	if err != nil {
		log.Warning("setUserGroupAdminHandler: Cannot load %s: %s\n", name, err)
		WriteError(w, r, err)
		return
	}

	userID, err := user.FindUserIDByName(db, userName)
	if err != nil {
		log.Warning("setUserGroupAdminHandler: Unknown user %s: %s\n", userName, err)
		w.WriteHeader(http.StatusNotFound)
		return
	}

	err = group.SetUserGroupAdmin(db, g.ID, userID)
	if err != nil {
		log.Warning("setUserGroupAdminHandler: cannot set user group admin: %s\n", err)
		w.WriteHeader(http.StatusInternalServerError)
		return
	}

}

func removeUserGroupAdminHandler(w http.ResponseWriter, r *http.Request, db *sql.DB, c *context.Context) {
	// Get group name in URL
	vars := mux.Vars(r)
	name := vars["permGroupName"]
	userName := vars["user"]

	g, err := group.LoadGroup(db, name)
	if err != nil {
		log.Warning("removeUserGroupAdminHandler: Cannot load %s: %s\n", name, err)
		WriteError(w, r, err)
		return
	}

	userID, err := user.FindUserIDByName(db, userName)
	if err != nil {
		log.Warning("removeUserGroupAdminHandler: Unknown user %s: %s\n", userName, err)
		w.WriteHeader(http.StatusNotFound)
		return
	}

	err = group.RemoveUserGroupAdmin(db, g.ID, userID)
	if err != nil {
		log.Warning("removeUserGroupAdminHandler: cannot remove user group admin privilege: %s\n", err)
		w.WriteHeader(http.StatusInternalServerError)
		return
	}
}

repository: thomas-maurice/cds

repo_name: thomas-maurice/cds


text:
package main

import (
	"flag"
	"fmt"

	"github.com/nlopes/slack"
)

var token = flag.String("token", "", "bot token generated by slack")
var debug = flag.Bool("debug", false, "set to show debugging messages")

func main() {
	flag.Parse()

	if *token == "" {
		fmt.Println("Please set -token flag")
		flag.PrintDefaults()
		return
	}
	api := slack.New(*token)
	api.SetDebug(*debug)
	rtm := api.NewRTM()
	go rtm.ManageConnection()

Loop:
	for {
		select {
		case msg := <-rtm.IncomingEvents:
			switch ev := msg.Data.(type) {
			case *slack.MessageEvent:
				if len(ev.Text) > 0 && playgroundUrl.MatchString(ev.Text) {
					addrs := playgroundUrl.FindAllString(ev.Text, -1)
					for _, addr := range addrs {
						data, err := playground(addr)
						if err != nil {
							fmt.Println("Playground error:", err)
							continue
						}
						rtm.SendMessage(rtm.NewOutgoingMessage(data, ev.Channel))
					}
				}
			case *slack.InvalidAuthEvent:
				fmt.Printf("Invalid credentials")
				break Loop
			default:
				// Ignore other events..
			}
		}
	}

}


text:
file(REMOVE_RECURSE
  "libportaudio.dylib"
  "libportaudio.pdb"
)

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


text:
@article{HeYa2002,
   author    = {V.~Henson and U.~Yang},
   title     = {{BoomerAMG}: a Parallel Algebraic Multigrid Solver and Preconditioner},
   journal   = {Applied Numerical Mathematics},
   volume    = {41},
   pages     = {155--177},
   year      = {2002}
   }

@article{AsFa1996,
  author =      "S.~F.~Ashby and R.~D.~Falgout",
  title =       "A Parallel Multigrid Preconditioned Conjugate Gradient Algorithm for Groundwater Flow Simulations",
  journal =     "Nuclear Science and Engineering",
  month =       "September",
  volume =      "124",
  number =      "1",
  pages =       "145--159",
  note =        "UCRL-JC-122359",
  year =        "1996"
  }

@incollection{hypre_design_impl_2006,
  author =      "R.~D.~Falgout and J.~E.~Jones and U.~M.~Yang",
  title =       "The Design and Implementation of {\sl hypre}, a Library
                 of Parallel High Performance Preconditioners",
  booktitle =   "Numerical Solution of Partial Differential Equations
                 on Parallel Computers",
  series =      "Lecture Notes in Computational Science and Engineering",
  publisher =   "Springer-Verlag",
  editor =      "A.~M.~Bruaset and A.~Tveito",
  volume =      "51",
  note =        "UCRL-JRNL-205459",
  chapter =     "8",
  pages =       "267--294",
  year =        "2006"
  }

@article{LiSY2020,
  author =      "R.~Li and B.~Sjogreen and U.~M.~Yang",
  title =       "A New Class of AMG Interpolation Operators Based on Matrix-Matrix Operations",
  note =        "Submitted to SIAM Journal on Scientific Computing",
  year =        "2020"
  }

repository: vetter/ECP-ST-CAR-PUBLIC

repo_name: vetter/ECP-ST-CAR-PUBLIC


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

package library

import (
	"fmt"
	"reflect"
	"testing"

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

func TestLibrary_User_Sanitize(t *testing.T) {
	// setup types
	u := testUser()

	want := testUser()
	want.SetHash(constants.SecretMask)
	want.SetToken(constants.SecretMask)
	want.SetRefreshToken(constants.SecretMask)

	// run test
	got := u.Sanitize()

	if !reflect.DeepEqual(got, want) {
		t.Errorf("Sanitize is %v, want %v", got, want)
	}
}

func TestLibrary_User_Environment(t *testing.T) {
	// setup types
	want := map[string]string{
		"VELA_USER_ACTIVE":    "true",
		"VELA_USER_ADMIN":     "false",
		"VELA_USER_FAVORITES": "[\"github/octocat\"]",
		"VELA_USER_NAME":      "octocat",
	}

	// run test
	got := testUser().Environment()

	if !reflect.DeepEqual(got, want) {
		t.Errorf("Environment is %v, want %v", got, want)
	}
}

func TestLibrary_User_Getters(t *testing.T) {
	// setup tests
	tests := []struct {
		user *User
		want *User
	}{
		{
			user: testUser(),
			want: testUser(),
		},
		{
			user: new(User),
			want: new(User),
		},
	}

	// run tests
	for _, test := range tests {
		if test.user.GetID() != test.want.GetID() {
			t.Errorf("GetID is %v, want %v", test.user.GetID(), test.want.GetID())
		}

		if test.user.GetName() != test.want.GetName() {
			t.Errorf("GetName is %v, want %v", test.user.GetName(), test.want.GetName())
		}

		if test.user.GetRefreshToken() != test.want.GetRefreshToken() {
			t.Errorf("GetRefreshToken is %v, want %v", test.user.GetRefreshToken(), test.want.GetRefreshToken())
		}

		if test.user.GetToken() != test.want.GetToken() {
			t.Errorf("GetToken is %v, want %v", test.user.GetToken(), test.want.GetToken())
		}

		if test.user.GetHash() != test.want.GetHash() {
			t.Errorf("GetHash is %v, want %v", test.user.GetHash(), test.want.GetHash())
		}

		if !reflect.DeepEqual(test.user.GetFavorites(), test.want.GetFavorites()) {
			t.Errorf("GetFavorites is %v, want %v", test.user.GetFavorites(), test.want.GetFavorites())
		}

		if test.user.GetActive() != test.want.GetActive() {
			t.Errorf("GetActive is %v, want %v", test.user.GetActive(), test.want.GetActive())
		}

		if test.user.GetAdmin() != test.want.GetAdmin() {
			t.Errorf("GetAdmin is %v, want %v", test.user.GetAdmin(), test.want.GetAdmin())
		}
	}
}

func TestLibrary_User_Setters(t *testing.T) {
	// setup types
	var u *User

	// setup tests
	tests := []struct {
		user *User
		want *User
	}{
		{
			user: testUser(),
			want: testUser(),
		},
		{
			user: u,
			want: new(User),
		},
	}

	// run tests
	for _, test := range tests {
		test.user.SetID(test.want.GetID())
		test.user.SetName(test.want.GetName())
		test.user.SetRefreshToken(test.want.GetRefreshToken())
		test.user.SetToken(test.want.GetToken())
		test.user.SetHash(test.want.GetHash())
		test.user.SetFavorites(test.want.GetFavorites())
		test.user.SetActive(test.want.GetActive())
		test.user.SetAdmin(test.want.GetAdmin())

		if test.user.GetID() != test.want.GetID() {
			t.Errorf("SetID is %v, want %v", test.user.GetID(), test.want.GetID())
		}

		if test.user.GetName() != test.want.GetName() {
			t.Errorf("SetName is %v, want %v", test.user.GetName(), test.want.GetName())
		}

		if test.user.GetRefreshToken() != test.want.GetRefreshToken() {
			t.Errorf("SetRefreshToken is %v, want %v", test.user.GetRefreshToken(), test.want.GetRefreshToken())
		}

		if test.user.GetToken() != test.want.GetToken() {
			t.Errorf("SetToken is %v, want %v", test.user.GetToken(), test.want.GetToken())
		}

		if test.user.GetHash() != test.want.GetHash() {
			t.Errorf("SetHash is %v, want %v", test.user.GetHash(), test.want.GetHash())
		}

		if !reflect.DeepEqual(test.user.GetFavorites(), test.want.GetFavorites()) {
			t.Errorf("SetFavorites is %v, want %v", test.user.GetFavorites(), test.want.GetFavorites())
		}

		if test.user.GetActive() != test.want.GetActive() {
			t.Errorf("SetActive is %v, want %v", test.user.GetActive(), test.want.GetActive())
		}

		if test.user.GetAdmin() != test.want.GetAdmin() {
			t.Errorf("SetAdmin is %v, want %v", test.user.GetAdmin(), test.want.GetAdmin())
		}
	}
}

func TestLibrary_User_String(t *testing.T) {
	// setup types
	u := testUser()

	want := fmt.Sprintf(`{
  Active: %t,
  Admin: %t,
  Favorites: %s,
  ID: %d,
  Name: %s,
  Token: %s,
}`,
		u.GetActive(),
		u.GetAdmin(),
		u.GetFavorites(),
		u.GetID(),
		u.GetName(),
		u.GetToken(),
	)

	// run test
	got := u.String()

	if !reflect.DeepEqual(got, want) {
		t.Errorf("String is %v, want %v", got, want)
	}
}

// testUser is a test helper function to create a User
// type with all fields set to a fake value.
func testUser() *User {
	u := new(User)

	u.SetID(1)
	u.SetName("octocat")
	u.SetToken("superSecretToken")
	u.SetHash("MzM4N2MzMDAtNmY4Mi00OTA5LWFhZDAtNWIzMTlkNTJkODMy")
	u.SetFavorites([]string{"github/octocat"})
	u.SetActive(true)
	u.SetAdmin(false)

	return u
}

repository: JordanSussman/types

repo_name: JordanSussman/types


text:
DESCRIPTION = "PCFX emulator - Mednafen PCFX Port for libretro"

LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=6e233eda45c807aa29aeaa6d94bc48a2"

inherit libretro

LIBRETRO_CORE = "mednafen_pcfx"
LIBRETRO_GIT_REPO = "github.com/libretro/beetle-pcfx-libretro"


text:
package models

type (
	Error struct {
		Code    int    `json:"code"`
		Message string `json:"message"`
		Fields  string `json:"fields"`
	}
)

type ErrorCode int

const (
	/*
		instance
	*/
	ErrorInstanceRetrievalFailed   = 10
	ErrorInstanceRetrievalNotFound = 11

	ErrorInstanceCreateFailed                  = 20
	ErrorInstanceCreateDispatchProvisionFailed = 21
	ErrorInstanceCreateAlreadyExists           = 22
	ErrorInstanceCreateInvalidData             = 23

	ErrorInstanceDeleteFailed                    = 30
	ErrorInstanceDeleteDispatchDeprovisionFailed = 31
	ErrorInstanceDeleteNotFound                  = 32

	ErrorInstanceStatusRetrievalFailed   = 40
	ErrorInstanceStatusRetrievalNotFound = 41
	ErrorInstanceStatusInstanceFailed    = 42

	/*
		bind
	*/
	ErrorBindAppNotFound        = 100
	ErrorBindAppAlreadyBound    = 101
	ErrorBindAppFailed          = 102
	ErrorBindAppInstancePending = 103
	ErrorBindAppInstanceFailed  = 104

	ErrorUnbindAppNotFound = 110
	ErrorUnbindAppNotBound = 111
	ErrorUnbindAppFailed   = 112

	ErrorBindUnitAppNotBound  = 120
	ErrorBindUnitAlreadyBound = 121
	ErrorBindUnitFailed       = 122

	ErrorUnbindUnitAppNotBound = 130
	ErrorUnbindUnitNotBound    = 131
	ErrorUnbindUnitFailed      = 132
)

repository: pushaas/pushaas

repo_name: pushaas/pushaas


text:
SUMMARY = "PyUSB provides USB access on the Python language"
HOMEPAGE = "http://pyusb.sourceforge.net/"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e64a29fcd3c3dd356a24e235dfcb3905"

DEPENDS += "libusb1 ${PYTHON_PN}-setuptools-scm-native"

SRC_URI[sha256sum] = "7d449ad916ce58aff60b89aae0b65ac130f289c24d6a5b7b317742eccffafc38"

inherit pypi setuptools3

BBCLASSEXTEND = "native nativesdk"

repository: ni/meta-openembedded

repo_name: ni/meta-openembedded

branch_name: refs/heads/nilrt/master/hardknott


text:
@Article{pmid12492733,
  Author="Reuther, L. O.  and Sonne, J.  and Larsen, N.  and Dahlerup, J. F.  and Thomsen, O. O.  and Schmiegelow, K. ",
  Title="{{T}hiopurine methyltransferase genotype distribution in patients with {C}rohn's disease}",
  Journal="Aliment. Pharmacol. Ther.",
  Year="2003",
  Volume="17",
  Number="1",
  Pages="65--68",
  Month="Jan"
}

repository: larmcr/px

repo_name: larmcr/px


text:
import {URL} from 'url';

const selfLinkName = 'self';
const upLinkName = 'up';

/**
 * This helper can generate links and feeds based on Collection+JSON hypermedia media type
 *
 * @see http://amundsen.com/media-types/collection/
 */
export default class HypermediaUrl {
    constructor(server, baseUrl) {
        this.server = server;
        this.baseUrl = baseUrl;
    }

    /**
     * @private
     *
     * @param params
     * @returns {URL}
     */
    routeUrl(...params) {
        return new URL(this.server.router.render(...params), this.baseUrl);
    }

    createSelfLink(req) {
        const route = req.getRoute();
        return this.createLink(selfLinkName, route.name, req.params);
    }

    createUpLink(routeName, params) {
        return this.createLink(upLinkName, routeName, params);
    }

    createLink(linkName, routeName, params) {
        return {
            rel: linkName,
            href: this.routeUrl(routeName, params)
        };

    }

    createFeed(collection = [], routeName) {
        return collection.map(m => ({href: this.routeUrl(routeName, m)}));
    }
}

repository: NShahri/hypermedia-boilerplate

repo_name: NShahri/hypermedia-boilerplate

extension: js


text:
@article{kleisnerHowWhyPatterns2021,
  title = {How and Why Patterns of Sexual Dimorphism in Human Faces Vary across the World},
  author = {Kleisner, Karel and Ture{\v c}ek, Petr and Roberts, S. Craig and Havl{\'i}{\v c}ek, Jan and Valentova, Jaroslava Varella and Akoko, Robert Mbe and Leong{\'o}mez, Juan David and Apostol, Silviu and Varella, Marco A. C. and Saribay, S. Adil},
  year = {2021},
  month = mar,
  volume = {11},
  pages = {5978},
  publisher = {{Nature Publishing Group}},
  issn = {2045-2322},
  doi = {10.1038/s41598-021-85402-3},
  abstract = {Sexual selection, including mate choice and intrasexual competition, is responsible for the evolution of some of the most elaborated and sexually dimorphic traits in animals. Although there is sexual dimorphism in the shape of human faces, it is not clear whether this is similarly due to mate choice, or whether mate choice affects only part of the facial shape difference between men and women. Here we explore these questions by investigating patterns of both facial shape and facial preference across a diverse set of human populations. We find evidence that human populations vary substantially and unexpectedly in both the magnitude and direction of facial sexually dimorphic traits. In particular, European and South American populations display larger levels of facial sexual dimorphism than African populations. Neither cross-cultural differences in facial shape variation, sex differences in body height, nor differing preferences for facial femininity and masculinity across countries, explain the observed patterns of facial dimorphism. Altogether, the association between sexual shape dimorphism and attractiveness is moderate for women and weak (or absent) for men. Analysis that distinguishes between allometric and non-allometric components reveals that non-allometric facial dimorphism is preferred in women's faces but not in faces of men. This might be due to different regimes of ongoing sexual selection acting on men, such as stronger intersexual selection for body height and more intense intrasexual physical competition, compared with women.},
  copyright = {2021 The Author(s)},
  file = {G\:\\Mi unidad\\Zotero\\Scientific Reports\\Kleisner et al_2021_How and why patterns of sexual dimorphism in human faces vary across the world.pdf;D\:\\Zotero Library\\storage\\JXCWJ7GH\\s41598-021-85402-3.html},
  journal = {Scientific Reports},
  language = {en},
  number = {1}
}


text:
package host

import (
	"reflect"
	"testing"

	"github.com/docker/machine/commands/mcndirs"
	"github.com/docker/machine/libmachine/auth"
	"github.com/docker/machine/libmachine/engine"
	"github.com/docker/machine/libmachine/swarm"
)

func TestMigrateHostV0ToV1(t *testing.T) {
	mcndirs.BaseDir = "/tmp/migration"
	originalHost := &HostV0{
		HostOptions:    nil,
		SwarmDiscovery: "token://foobar",
		SwarmHost:      "1.2.3.4:2376",
		SwarmMaster:    true,
		CaCertPath:     "/tmp/migration/certs/ca.pem",
		PrivateKeyPath: "/tmp/migration/certs/ca-key.pem",
		ClientCertPath: "/tmp/migration/certs/cert.pem",
		ClientKeyPath:  "/tmp/migration/certs/key.pem",
		ServerCertPath: "/tmp/migration/certs/server.pem",
		ServerKeyPath:  "/tmp/migration/certs/server-key.pem",
	}
	hostOptions := &HostOptionsV1{
		SwarmOptions: &swarm.SwarmOptions{
			Master:    true,
			Discovery: "token://foobar",
			Host:      "1.2.3.4:2376",
		},
		AuthOptions: &AuthOptionsV1{
			CaCertPath:     "/tmp/migration/certs/ca.pem",
			PrivateKeyPath: "/tmp/migration/certs/ca-key.pem",
			ClientCertPath: "/tmp/migration/certs/cert.pem",
			ClientKeyPath:  "/tmp/migration/certs/key.pem",
			ServerCertPath: "/tmp/migration/certs/server.pem",
			ServerKeyPath:  "/tmp/migration/certs/server-key.pem",
		},
		EngineOptions: &engine.EngineOptions{
			InstallURL: "https://get.docker.com",
			TlsVerify:  true,
		},
	}

	expectedHost := &HostV1{
		HostOptions: hostOptions,
	}

	host := MigrateHostV0ToHostV1(originalHost)

	if !reflect.DeepEqual(host, expectedHost) {
		t.Logf("\n%+v\n%+v", host, expectedHost)
		t.Logf("\n%+v\n%+v", host.HostOptions, expectedHost.HostOptions)
		t.Fatal("Expected these structs to be equal, they were different")
	}
}

func TestMigrateHostMetadataV0ToV1(t *testing.T) {
	metadata := &HostMetadataV0{
		HostOptions: HostOptions{
			EngineOptions: nil,
			AuthOptions:   nil,
		},
		StorePath:      "/tmp/store",
		CaCertPath:     "/tmp/store/certs/ca.pem",
		ServerCertPath: "/tmp/store/certs/server.pem",
	}
	expectedAuthOptions := &auth.AuthOptions{
		StorePath:      "/tmp/store",
		CaCertPath:     "/tmp/store/certs/ca.pem",
		ServerCertPath: "/tmp/store/certs/server.pem",
	}

	expectedMetadata := &HostMetadata{
		HostOptions: HostOptions{
			EngineOptions: &engine.EngineOptions{},
			AuthOptions:   expectedAuthOptions,
		},
	}

	m := MigrateHostMetadataV0ToHostMetadataV1(metadata)

	if !reflect.DeepEqual(m, expectedMetadata) {
		t.Logf("\n%+v\n%+v", m, expectedMetadata)
		t.Fatal("Expected these structs to be equal, they were different")
	}
}

repository: skippbox/kmachine

repo_name: skippbox/kmachine

branch_name: refs/heads/kmachine


text:
DESCRIPTION = "Seed initial snap packages"
HOMEPAGE = "https://github.com/crossbario/meta-snappy"
BUGTRACKER = "https://github.com/crossbario/meta-snappy"

LICENSE = "MIT"

do_install() {
        install -d ${D}/var/lib/snapd/seed
        tar xf ${DL_DIR}/${PN}_${TARGET_ARCH}_${PV}.tar.gz -C ${D}
        chown -R root:root ${D}
}

do_fetch() {
        if [ ! -f 'snap-exe_${PV}' ]; then
                wget https://s3.eu-central-1.amazonaws.com/download.crossbario.com/crossbarfx/snap-exe -O snap-exe_${PV}
                chmod +x snap-exe_${PV}
        fi

        if [ "${TARGET_ARCH}" = "aarch64" ]; then
                ARCH=arm64
        elif [ "${TARGET_ARCH}" = "x86_64" ]; then
                ARCH=amd64
        else
                echo Unsupported TARGET ARCH ${TARGET_ARCH}
                exit 1
        fi

        if [ ! -f '${PN}_${TARGET_ARCH}_${PV}.tar.gz' ]; then
                ./snap-exe_${PV} known --remote model series=16 brand-id=generic model=generic-classic > ./classic.model
                ./snap-exe_${PV} prepare-image --classic --arch=$ARCH classic.model . --snap snapd --snap core20 --snap crossbarfx=edge
                tar -czvf ${PN}_${TARGET_ARCH}_${PV}.tar.gz var
        fi
}

do_cleanall() {
        rm -f ${DL_DIR}/snap-exe_${PV}
        rm -f ${DL_DIR}/${PN}_${TARGET_ARCH}_${PV}.tar.gz
}


text:
inherit uhd_images_downloader

LICENSE = "LGPLv3+"

FILES_${PN} = " \
    /lib/firmware/ni/cpld-x410-*.* \
    /lib/firmware/ni/cpld-zbx-*.* \
    "

UHD_IMAGES_TO_DOWNLOAD_ni-titanium ?= " \
    ${@ '' if d.getVar('EXTERNALSRC') else 'x4xx_x410_cpld_default'} \
    ${@ '' if d.getVar('EXTERNALSRC') else 'x4xx_zbx_cpld_default'} \
    "

MB_CPLD_SUBDIRECTORY ?= ""
ZBX_CPLD_SUBDIRECTORY ?= ""

do_install() {
    install -d "${D}/lib/firmware/ni"
    install -D "${S}/${MB_CPLD_SUBDIRECTORY}/usrp_x410_cpld_10m04.rpd" "${D}/lib/firmware/ni/cpld-x410-10m04.rpd"
    install -D "${S}/${MB_CPLD_SUBDIRECTORY}/usrp_x410_cpld_10m04.svf" "${D}/lib/firmware/ni/cpld-x410-10m04.svf"
    install -D "${S}/${MB_CPLD_SUBDIRECTORY}/usrp_x410_cpld_10m08.rpd" "${D}/lib/firmware/ni/cpld-x410-10m08.rpd"
    install -D "${S}/${MB_CPLD_SUBDIRECTORY}/usrp_x410_cpld_10m08.svf" "${D}/lib/firmware/ni/cpld-x410-10m08.svf"
    install -D "${S}/${ZBX_CPLD_SUBDIRECTORY}/usrp_zbx_cpld_10m04.rpd" "${D}/lib/firmware/ni/cpld-zbx-10m04.rpd"
    install -D "${S}/${ZBX_CPLD_SUBDIRECTORY}/usrp_zbx_cpld_10m04.svf" "${D}/lib/firmware/ni/cpld-zbx-10m04.svf"
    install -D "${S}/${ZBX_CPLD_SUBDIRECTORY}/usrp_zbx_cpld_xo3lf.svf" "${D}/lib/firmware/ni/cpld-zbx-xo3lf.svf"
}

repository: EttusResearch/meta-ettus

repo_name: EttusResearch/meta-ettus

branch_name: refs/heads/zeus

gha_language: Python


text:
@software{RadiiPolynomial.jl,
  author = {Olivier Hénot},
  title  = {RadiiPolynomial.jl},
  url    = {https://github.com/OlivierHnt/RadiiPolynomial.jl},
  year   = {2021},
  doi    = {10.5281/zenodo.5705258}
}

gha_language: Julia


text:
@article{WANG2022102345,
title = {Global-Local Attention Network with Multi-task Uncertainty Loss for Abnormal Lymph Node Detection in MR Images},
journal = {Medical Image Analysis},
pages = {102345},
year = {2022},
issn = {1361-8415},
doi = {https://doi.org/10.1016/j.media.2021.102345},
url = {https://www.sciencedirect.com/science/article/pii/S136184152100390X},
author = {Shuai Wang and Yingying Zhu and Sungwon Lee and Daniel C. Elton and Thomas C. Shen and Youbao Tang and Yifan Peng and Zhiyong Lu and Ronald M. Summers},
}


text:
@ARTICLE{matplotlib:2007,
       author = {{Hunter}, John D.},
        title = "{Matplotlib: A 2D Graphics Environment}",
      journal = {Computing in Science and Engineering},
     keywords = {Python, Scripting languages, Application development, Scientific
        programming},
         year = 2007,
        month = May,
       volume = {9},
        pages = {90-95},
          doi = {10.1109/MCSE.2007.55},
       adsurl = {https://ui.adsabs.harvard.edu/#abs/2007CSE.....9...90H},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

repository: griffin-h/makecite

repo_name: griffin-h/makecite


text:
include libxcb.inc
PR = "r2"

PACKAGES =+ "libxcb-xinerama"

SRC_URI[md5sum] = "7967d0d4347502bc9af5373767afc748"
SRC_URI[sha256sum] = "106b3747c3c49c2940973b18b487c604a5dffc8995fb02a4c46136d6ff267122"


text:
SUMMARY = "Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible)"
HOMEPAGE = "https://github.com/jstasiak/python-zeroconf"
LICENSE = "LGPLv2"
LIC_FILES_CHKSUM = "file://setup.py;md5=70397cd15372054e6dd97a6565a38dc0"

SRC_URI[md5sum] = "c168b246337a1b3cbbc1b80a5fc653b3"
SRC_URI[sha256sum] = "c2cbcd7c54fa078afba47ab0c2125f487fd8465d4d398a9a4a01122836202868"

inherit pypi setuptools3

repository: maxinbjohn/meta-homeassistant-backup

repo_name: maxinbjohn/meta-homeassistant-backup


text: @article{elstner_porezag_jungnickel_elsner_haugk_frauenheim_suhai_seifert_1998, title={Self-consistent-charge density-functional tight-binding method for simulations of complex materials properties}, volume={58}, DOI={10.1103/physrevb.58.7260}, number={11}, journal={P


text:
package nationbuilder

import (
	"net/url"
	"testing"
)

const testQueryParam = "testQueryParam"
const testQueryValue = "testQueryValue"
const testURL = "https://testslug.nationbuilder.com/api/v1/foo"

func TestSetQueryOptions(t *testing.T) {
	o := NewOptions()
	o.SetQueryOption(testQueryParam, testQueryValue)
	v := o.queryOpts.Get(testQueryParam)
	if v != testQueryValue {
		t.Errorf("Expected query param %s to be set with value %s but saw %s instead", testQueryParam, testQueryValue, v)
	}

	// contains nil queryOpts - should be initialised if nil
	o = &Options{}
	o.SetQueryOption(testQueryParam, testQueryValue)
	v = o.queryOpts.Get(testQueryParam)
	if v != testQueryValue {
		t.Errorf("Expected query param %s to be set with value %s but saw %s instead", testQueryParam, testQueryValue, v)
	}
}

func TestSetQuery(t *testing.T) {
	u, err := url.Parse(testURL)
	if err != nil {
		t.Fatal(err.Error())
	}

	o := NewOptions()
	o.SetQueryOption(testQueryParam, testQueryValue)
	o.setQuery(u)

	expectedURL := testURL + "?" + testQueryParam + "=" + testQueryValue
	if u.String() != expectedURL {
		t.Errorf("Expected SetQuery to make url %s but saw %s", expectedURL, u.String())
	}

	testToken := "testToken"
	testNonce := "testNonce"

	o = &Options{
		Limit:     100,
		PageToken: testToken,
		PageNonce: testNonce,
	}

	u, err = url.Parse(testURL)
	if err != nil {
		t.Fatal(err.Error())
	}

	o.setQuery(u)
	expectedURL = testURL + "?__nonce=" + testNonce + "&__token=" + testToken + "&limit=100"
	if u.String() != expectedURL {
		t.Errorf("Expected SetQuery to make url %s but saw %s", expectedURL, u.String())
	}

}

repository: wouafff/nationbuilder

repo_name: wouafff/nationbuilder


text:
package test

import (
	"testing"

	"github.com/gruntwork-io/terratest/modules/helm"
	rbacv1 "k8s.io/api/rbac/v1"
)

func TestRoleBinding(t *testing.T) {
	helmChartPath := "../charts/core"

	options := &helm.Options{
		SetValues: map[string]string{},
	}

	// Test ingress
	out := helm.RenderTemplate(t, options, helmChartPath, nvRel, []string{"templates/rolebinding.yaml"})
	outs := splitYaml(out)

	if len(outs) != 1 {
		t.Errorf("Resource count is wrong. count=%v\n", len(outs))
	}
}

func TestClusterRole(t *testing.T) {
	helmChartPath := "../charts/core"

	options := &helm.Options{
		SetValues: map[string]string{},
	}

	// Test ingress
	out := helm.RenderTemplate(t, options, helmChartPath, nvRel, []string{"templates/clusterrole.yaml"})
	outs := splitYaml(out)

	if len(outs) != 3 {
		t.Errorf("Resource count is wrong. count=%v\n", len(outs))
	}
}

func TestClusterRoleBinding(t *testing.T) {
	helmChartPath := "../charts/core"

	options := &helm.Options{
		SetValues: map[string]string{},
	}

	// Test ingress
	out := helm.RenderTemplate(t, options, helmChartPath, nvRel, []string{"templates/clusterrolebinding.yaml"})
	outs := splitYaml(out)

	if len(outs) != 4 {
		t.Errorf("Resource count is wrong. count=%v\n", len(outs))
	}
}

func TestRoleLeastPrivilege(t *testing.T) {
	helmChartPath := "../charts/core"

	options := &helm.Options{
		SetValues: map[string]string{
			"leastPrivilege": "true",
		},
	}

	// Test ingress
	out := helm.RenderTemplate(t, options, helmChartPath, nvRel, []string{"templates/role-least.yaml"})
	outs := splitYaml(out)

	if len(outs) != 1 {
		t.Errorf("Resource count is wrong. count=%v\n", len(outs))
	}

	for i, output := range outs {
		var r rbacv1.Role
		helm.UnmarshalK8SYaml(t, output, &r)

		switch i {
		case 0:
			if r.Name != "neuvector-binding-scanner" {
				t.Errorf("Incorrect role name. role=%+v\n", r.Name)
			}
		}
	}
}

func TestRoleBindingLeastPrivilege(t *testing.T) {
	helmChartPath := "../charts/core"

	options := &helm.Options{
		SetValues: map[string]string{
			"leastPrivilege": "true",
		},
	}

	// Test ingress
	out := helm.RenderTemplate(t, options, helmChartPath, nvRel, []string{"templates/rolebinding-least.yaml"})
	outs := splitYaml(out)

	if len(outs) != 1 {
		t.Errorf("Resource count is wrong. count=%v\n", len(outs))
	}
}

repository: neuvector/neuvector-helm

repo_name: neuvector/neuvector-helm


text:
/*
 * Created: 2020-01-02 15:34:11
 * Author : Win-Man
 * Email : gang.shen0423@gmail.com
 * -----
 * Last Modified:
 * Modified By:
 * -----
 * Description:
 */

package requests

import (
	"fmt"
	"io/ioutil"
	"net/http"
)

func HttpGet(url string) (body []byte,code  int) {
	response, err := http.Get(url)

	if err != nil {
		fmt.Printf("error:%v", err)
	}
	defer response.Body.Close()
	body, _ = ioutil.ReadAll(response.Body)
	code = response.StatusCode
	return
}

func httpPost(url string) (body []byte) {
	return
}

repository: Win-Man/tidb-healthy-check

repo_name: Win-Man/tidb-healthy-check


text:
DESCRIPTION = "eDMA library for use by PRU sw example applications"
HOMEPAGE = "https://gforge.ti.com/gf/project/pru_sw/"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://edma.c;beginline=1;endline=46;md5=f6bde95a8e2277050e36b257ca9214a6"

DEPENDS += "virtual/kernel"

RDEPENDS_${PN} += "ti-pru-sw-edma-driver"

PACKAGE_ARCH = "${MACHINE_ARCH}"

COMPATIBLE_MACHINE = "omapl138"

MACHINE_KERNEL_PR_append = "a"
PR = "${MACHINE_KERNEL_PR}"
PV_append = "+svn${SRCPV}"

SRC_URI = "svn://gforge.ti.com/svn/pru_sw/;module=trunk;protocol=https;user=anonymous;pswd=''"

SRCREV = "33"
S = "${WORKDIR}/trunk/peripheral_lib/edma_driver/interface"

do_compile () {
	oe_runmake KERNEL_DIR="${STAGING_KERNEL_DIR}" CCTOOL_PREFIX=${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}
}

do_install () {
	install -d ${D}/${libdir}
	install -m 0755 ${S}/../lib/libedmautils.a ${D}/${libdir}/
}

repository: varigit/meta-arago-var

repo_name: varigit/meta-arago-var


text:
package main

import (
	"flag"
	"fmt"
	"io/ioutil"
	"log"

	"github.com/prologic/go-gopher"
)

var (
	json = flag.Bool("json", false, "display gopher directory as JSON")
)

func main() {
	var uri string

	flag.Parse()

	if len(flag.Args()) == 1 {
		uri = flag.Arg(0)
	} else {
		uri = "gopher://gopher.floodgap.com/"
	}

	res, err := gopher.Get(uri)
	if err != nil {
		log.Fatal(err)
	}

	if res.Body != nil {
		contents, err := ioutil.ReadAll(res.Body)
		if err != nil {
			log.Fatal(err)
		}

		fmt.Print(string(contents))
	} else {
		var (
			bytes []byte
			err   error
		)

		if *json {
			bytes, err = res.Dir.ToJSON()
		} else {
			bytes, err = res.Dir.ToText()
		}
		if err != nil {
			log.Fatal(err)
		}

		fmt.Println(string(bytes))
	}
}

repository: stryan/go-gopher

repo_name: stryan/go-gopher