text:
/*
 * Copyright 2018 InfAI (CC SES)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package controller

import (
	"bytes"
	"encoding/json"
	"errors"
	influx "github.com/influxdata/influxdb1-client/v2"
	"log"
	"reflect"
	"text/template"
)

func parseTemplate(tmplName string, tmplString string, values interface{}) (result string, err error) {
	tmpl, err := template.New(tmplName).Parse(tmplString)
	if err != nil {
		return result, err
	}
	var buffer bytes.Buffer
	err = tmpl.Execute(&buffer, values)
	result = buffer.String()
	return
}

//duration in influxdb format https://docs.influxdata.com/influxdb/v1.5/query_language/spec/#durations
func (this *Controller) GetResourceHistory(id string, kind string, duration string) (result interface{}, err error) {
	templString := `SELECT * FROM "{{.Kind}}" WHERE time > now() - {{.Duration}} AND  "{{.Kind}}" = '{{.Id}}'`
	query, err := parseTemplate("getResourceHistory", templString, map[string]string{"Id": id, "Kind": kind, "Duration": duration})
	if err != nil {
		return result, err
	}
	q := influx.NewQuery(query, this.config.InfluxdbDb, "s")
	resp, err := this.influx.Query(q)
	if err != nil {
		log.Println("ERROR:", err, query)
		return result, err
	}
	err = resp.Error()
	if err != nil {
		log.Println("ERROR:", err, query)
	}
	return resp.Results, err
}

//duration in influxdb format https://docs.influxdata.com/influxdb/v1.5/query_language/spec/#durations
func (this *Controller) GetResourcesHistory(ids []string, kind string, duration string) (result interface{}, err error) {
	if len(ids) == 0 {
		return []interface{}{map[string]interface{}{"Series": []interface{}{}}}, nil
	}
	templString := `SELECT * FROM "{{.Kind}}" WHERE time > now() - {{.Duration}} AND ({{range $index, $element := .Id}} {{if $index}} OR {{end}} "{{$.Kind}}" = '{{$element}}' {{end}})  GROUP BY "{{.Kind}}"`
	query, err := parseTemplate("getResourcesHistory", templString, map[string]interface{}{"Id": ids, "Kind": kind, "Duration": duration})
	if err != nil {
		return result, err
	}
	q := influx.NewQuery(query, this.config.InfluxdbDb, "s")
	resp, err := this.influx.Query(q)
	if err != nil {
		log.Println("ERROR:", err, query)
		return result, err
	}
	err = resp.Error()
	if err != nil {
		log.Println("ERROR:", err, query)
	}
	return resp.Results, err
}

type HistoryResult struct {
	Series []HistorySeries `json:"Series"`
}

type HistorySeries struct {
	Name    string            `json:"name"`
	Tags    map[string]string `json:"tags"`
	Columns []string          `json:"columns"`
	Values  [][]interface{}   `json:"values"`
}

func (this *Controller) GetResourcesLogstart(ids []string, kind string) (result map[string]float64, err error) {
	result = map[string]float64{}
	templString := `SELECT FIRST(*) FROM "{{.Kind}}" WHERE {{range $index, $element := .Id}} {{if $index}} OR {{end}} "{{$.Kind}}" = '{{$element}}' {{end}} GROUP BY "{{.Kind}}"`
	query, err := parseTemplate("getResourcesHistory", templString, map[string]interface{}{"Id": ids, "Kind": kind})
	if err != nil {
		return result, err
	}
	q := influx.NewQuery(query, this.config.InfluxdbDb, "s")
	resp, err := this.influx.Query(q)
	if err != nil {
		return result, err
	}
	err = resp.Error()
	if err != nil {
		return result, err
	}
	b, _ := json.Marshal(resp.Results)
	temp := []HistoryResult{}
	json.Unmarshal(b, &temp)
	if len(temp) == 0 {
		err = errors.New("error while interpreting database result (series)")
		return
	}
	for _, series := range temp[0].Series {
		if len(series.Values) == 0 || len(series.Values[0]) == 0 {
			err = errors.New("error while interpreting database result (series.Values)")
			return
		}
		var ok bool
		result[series.Tags[kind]], ok = series.Values[0][0].(float64)
		if !ok {
			err = errors.New("error while interpreting database result (cast)" + reflect.TypeOf(series.Values[0][0]).String())
			return
		}
	}
	return
}

func (this *Controller) GetResourcesLogEdge(ids []string, kind string, duration string) (result map[string]interface{}, err error) {
	if len(ids) == 0 {
		return map[string]interface{}{}, nil
	}
	result = map[string]interface{}{}
	templString := `SELECT LAST(*) FROM "{{.Kind}}" WHERE time < now() - {{.Duration}} AND ({{range $index, $element := .Id}} {{if $index}} OR {{end}} "{{$.Kind}}" = '{{$element}}' {{end}})  GROUP BY "{{.Kind}}"`
	query, err := parseTemplate("getResourcesHistory", templString, map[string]interface{}{"Id": ids, "Kind": kind, "Duration": duration})
	if err != nil {
		return result, err
	}
	q := influx.NewQuery(query, this.config.InfluxdbDb, "s")
	resp, err := this.influx.Query(q)
	if err != nil {
		return result, err
	}
	err = resp.Error()
	if err != nil {
		return result, err
	}
	b, _ := json.Marshal(resp.Results)
	temp := []HistoryResult{}
	json.Unmarshal(b, &temp)
	if len(temp) == 0 {
		err = errors.New("error while interpreting database result (series)")
		return
	}
	for _, series := range temp[0].Series {
		if len(series.Values) == 0 {
			err = errors.New("error while interpreting database result (series.Values)")
			return
		}
		result[series.Tags[kind]] = series.Values[0]
	}
	return
}

//duration in influxdb format https://docs.influxdata.com/influxdb/v1.5/query_language/spec/#durations
func (this *Controller) GetResourceKindHistory(kind string, duration string) (result interface{}, err error) {
	templString := `SELECT * FROM "{{.Kind}}" WHERE time > now() - {{.Duration}} GROUP BY "{{.Kind}}"`
	query, err := parseTemplate("getResourceKindHistory", templString, map[string]string{"Kind": kind, "Duration": duration})
	if err != nil {
		return result, err
	}
	q := influx.NewQuery(query, this.config.InfluxdbDb, "s")
	resp, err := this.influx.Query(q)
	if err != nil {
		return result, err
	}
	err = resp.Error()
	return resp.Results, err
}

repository: SENERGY-Platform/connection-log

repo_name: SENERGY-Platform/connection-log


text:
SUMMARY = "Linux kernel-specific tests"
HOMEPAGE = "https://kernel.org"
SECTION = "tests"
LICENSE = "GPL-2.0-only & GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c"

inherit ptest

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

S = "${WORKDIR}"

DEPENDS = "virtual/kernel libcap"
RDEPENDS:${PN}-ptest += "bash libcap kmod dmidecode python3-pymongo os-release"

ALLOW_EMPTY:${PN} = "1"

SRC_URI += "\
    file://run-ptest \
    file://required_kernel_modules.arm \
    file://required_kernel_modules.x64 \
    file://ptest-format.sh \
    file://test_kernel_mcopy.sh \
    file://test_kernel_mcopy_functionality.c \
    file://test_kernel_mcopy_freed_memory.c \
    file://test_kernel_cache_info.sh \
    file://test_kernel_cap_support.sh \
    file://test_kernel_modules.sh \
    file://test_kernel_security.sh \
    file://test_kernel_serial_devices.sh \
    file://test_exe_cap_support.c \
    file://test_proc_cap_support.c \
    file://cap_support_exe_to_test.c \
    file://test_kernel_ll_route.sh \
    file://test_kernel_hrtimers.sh \
    file://test_user_stack_size.sh \
    file://test_pthread_stack_size.c \
    file://test_kernel_swap_disabled.sh \
    file://test_i915_firmware.sh \
    file://kernel_dmesg_diff.py \
    file://test_kernel_dmesg_diff.sh \
"

LDFLAGS += "-lcap -lpthread"

do_compile_ptest:append() {
    cd ${WORKDIR}
    ${CC} ${CFLAGS} -o test_kernel_mcopy_functionality test_kernel_mcopy_functionality.c ${LDFLAGS}
    ${CC} ${CFLAGS} -o test_kernel_mcopy_freed_memory test_kernel_mcopy_freed_memory.c ${LDFLAGS}
    ${CC} ${CFLAGS} -o test_exe_cap_support test_exe_cap_support.c ${LDFLAGS}
    ${CC} ${CFLAGS} -o cap_support_exe_to_test cap_support_exe_to_test.c ${LDFLAGS}
    ${CC} ${CFLAGS} -o test_proc_cap_support test_proc_cap_support.c ${LDFLAGS}
    ${CC} ${CFLAGS} -o test_pthread_stack_size test_pthread_stack_size.c ${LDFLAGS}
}

do_install_ptest:append() {
    cp ${WORKDIR}/run-ptest ${D}${PTEST_PATH}
    cp ${WORKDIR}/ptest-format.sh ${D}${PTEST_PATH}
    cp ${WORKDIR}/test_kernel_mcopy.sh ${D}${PTEST_PATH}
    cp ${WORKDIR}/test_kernel_mcopy_functionality ${D}${PTEST_PATH}
    cp ${WORKDIR}/test_kernel_mcopy_freed_memory ${D}${PTEST_PATH}
    cp ${WORKDIR}/test_kernel_cache_info.sh ${D}${PTEST_PATH}
    cp ${WORKDIR}/test_kernel_cap_support.sh ${D}${PTEST_PATH}
    cp ${WORKDIR}/test_kernel_modules.sh ${D}${PTEST_PATH}
    cp ${WORKDIR}/test_kernel_security.sh ${D}${PTEST_PATH}
    cp ${WORKDIR}/test_kernel_serial_devices.sh ${D}${PTEST_PATH}
    cp ${WORKDIR}/test_exe_cap_support ${D}${PTEST_PATH}
    cp ${WORKDIR}/cap_support_exe_to_test ${D}${PTEST_PATH}
    cp ${WORKDIR}/test_proc_cap_support ${D}${PTEST_PATH}
    cp ${WORKDIR}/test_kernel_ll_route.sh ${D}${PTEST_PATH}
    cp ${WORKDIR}/test_kernel_hrtimers.sh ${D}${PTEST_PATH}
    cp ${WORKDIR}/test_user_stack_size.sh ${D}${PTEST_PATH}
    cp ${WORKDIR}/test_pthread_stack_size ${D}${PTEST_PATH}
    cp ${WORKDIR}/test_kernel_swap_disabled.sh ${D}${PTEST_PATH}
    cp ${WORKDIR}/test_i915_firmware.sh ${D}${PTEST_PATH}
    cp ${WORKDIR}/kernel_dmesg_diff.py ${D}${PTEST_PATH}
    cp ${WORKDIR}/test_kernel_dmesg_diff.sh ${D}${PTEST_PATH}
}

do_install_ptest:append:x64() {
    cp ${WORKDIR}/required_kernel_modules.x64 ${D}${PTEST_PATH}/required_kernel_modules
}

do_install_ptest:append:xilinx-zynqhf() {
    cp ${WORKDIR}/required_kernel_modules.arm ${D}${PTEST_PATH}/required_kernel_modules
}

PACKAGE_ARCH = "${MACHINE_ARCH}"

license: MIT

repository: ni/meta-nilrt

license_type: permissive

repo_name: ni/meta-nilrt

branch_name: refs/heads/nilrt/master/kirkstone

gha_license_id: MIT

gha_language: Shell

extension: bb


text:
# returns true if only a single one of its arguments is true
function(xor result)
    set(true_args_count 0)

    foreach(foo ${ARGN})
        if(foo)
            math(EXPR true_args_count "${true_args_count}+1")
        endif()
    endforeach()

    if(NOT (${true_args_count} EQUAL 1))
        set(${result} FALSE PARENT_SCOPE)
    else()
        set(${result} TRUE PARENT_SCOPE)
    endif()
endfunction()

function(at_most_one result)
    set(true_args_count 0)

    foreach(foo ${ARGN})
        if(foo)
            math(EXPR true_args_count "${true_args_count}+1")
        endif()
    endforeach()

    if(${true_args_count} GREATER 1)
        set(${result} FALSE PARENT_SCOPE)
    else()
        set(${result} TRUE PARENT_SCOPE)
    endif()
endfunction()

repository: eProsima/Fast-DDS

repo_name: eProsima/Fast-DDS

branch_name: refs/heads/master

extension: cmake


text:
@inproceedings{jaiswal2018capsulegan,
  title={Capsulegan: Generative adversarial capsule network},
  author={Jaiswal, Ayush and AbdAlmageed, Wael and Wu, Yue and Natarajan, Premkumar},
  booktitle={Proceedings of the European Conference on Computer Vision (ECCV)},
  year={2018}
}

url: https://raw.githubusercontent.com/Hugh-Shi/DL-NLP-Readings/924e4d189e5660c5b5d4854278f3df755ae2231d/Bibtex/CapsuleGAN - Generative Adversarial Capsule Network.bib

repository: Hugh-Shi/DL-NLP-Readings

repo_name: Hugh-Shi/DL-NLP-Readings

extension: bib


text:
package main

import (
	"flag"
	"log"
	"strconv"
	"time"

	"github.com/matscus/Hamster/Package/Clients/client"

	"github.com/matscus/Hamster/Guns/busM5/asserts"
	"github.com/matscus/Hamster/Guns/busM5/mqops"
	"github.com/matscus/Hamster/Guns/busM5/pool"
)

var (
	duration                                                  int
	runID, testName, testType, scenario, datapool, csv, dburl string
)

func main() {
	//defer profile.Start().Stop()
	//defer profile.Start(profile.MemProfile).Stop()
	// f, err := os.Create("trace.out")
	// if err != nil {
	// 	panic(err)
	// }
	// defer f.Close()

	// err = trace.Start(f)
	// if err != nil {
	// 	panic(err)
	// }
	// defer trace.Stop()
	flag.IntVar(&duration, "duration", 5, "duration test")
	flag.StringVar(&scenario, "scenario", "mqconfig.json", "set scenario")
	flag.StringVar(&datapool, "datapool", "db", "set datapool")
	flag.StringVar(&csv, "csv", "users.csv", "name csv file")
	flag.StringVar(&testName, "testName", "superPuperTest", "name test")
	flag.StringVar(&testType, "testType", "mq_stage_2", "type test")
	flag.Parse()
	go mqops.InitConfigs("./scenario/" + scenario)
	pgclient := client.PGClient{}.New()
	runID, err := pgclient.GetNewRunID()
	if err != nil {
		log.Println("Get New run id: ", err)
	}
	if runID == 0 {
		runID = 1
	}
	switch datapool {
	case "db":
		go pool.InitPoolChFromDB()
	case "csv":
		go pool.InitPoolChFromCSV("./pool/" + csv)
	}
	time.Sleep(5 * time.Second)
	err = pgclient.SetStartTest(strconv.FormatInt(runID, 10), testName, testType)
	if err != nil {
		log.Println("error set start test", err)
	}
	lops := len(mqops.MQConf.Data.Operation)
	lmqops := len(mqops.MQOps)
	for i := 0; i < lops; i++ {
		opername := mqops.MQConf.Data.Operation[i].Data.Name
		for i := 0; i < lmqops; i++ {
			if opername == mqops.MQOps[i].Name {
				var action mqops.Action
				action = mqops.MQOps[i]
				action.InitMQOps()
				go action.RunConsumer()
				go action.RunProduser()
				break
			}
		}
	}
	time.Sleep(convertDuration(duration) * time.Minute)
	pgclient.SetStopTest(strconv.FormatInt(runID, 10))
	res := asserts.CheckTestResult()
	if !res {
		log.Println("Test fail")
	} else {
		log.Println("Test pass")
	}
}
func convertDuration(i int) (d time.Duration) {
	return time.Duration(i) * time.Nanosecond
}

repository: Dobrynin-K/Hamster

repo_name: Dobrynin-K/Hamster

extension: go


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

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

gha_language: Makefile


text:
@InProceedings{rigollet11a,
  title = {Neyman-Pearson classification under a strict constraint},
  author = {Philippe Rigollet and Xin Tong},
  pages = {595--614},
  abstract = {Motivated by problems of anomaly detection, this paper implements the Neyman-Pearson paradigm to deal with asymmetric errors in binary classification with a convex loss. Given a finite collection of classifiers, we combine them and obtain a new classifier  that satisfies simultaneously the two following properties with high probability: (i), its probability of type~I error is below a pre-specified level and (ii), it has probability of type ~II error close to the minimum possible. The proposed classifier is obtained by minimizing an empirical objective subject to an empirical constraint. The novelty of the method is that the classifier output by this problem is shown to satisfy the original constraint on type~I error. This strict enforcement of the constraint has interesting consequences on the control of the type~II error and we develop new techniques to handle this situation.  Finally, connections with chance constrained optimization are evident and are investigated.},
  pdf = {http://jmlr.org/proceedings/papers/v19/rigollet11a/rigollet11a.pdf},
}

repository: mreid/papersite

repo_name: mreid/papersite

gha_language: TeX


text:
package main

func addNegabinary(a []int, b []int) []int {
	i := len(a) - 1
	j := len(b) - 1
	res := make([]int, 0)
	carry := 0
	for i >= 0 || j >= 0 || carry != 0 {
		if i >= 0 && a[i] == 1 {
			carry += 1
		}
		if j >= 0 && b[j] == 1 {
			carry += 1
		}
		res = append(res, carry&1)
		//if the current digit is 2 then, it equals to add -1 to the next digit
		carry = -(carry >> 1)
		i--
		j--
	}
	reverse(res)
	for len(res) > 1 && res[0] == 0 {
		//there might be leading zero in this situation
		//e.g. [1,0,1] + [1,1,1,1] = [0,0,0,0]
		res = res[1:]
	}
	return res
}

func reverse(arr []int) []int {
	i := 0
	j := len(arr) - 1
	for i < j {
		arr[i], arr[j] = arr[j], arr[i]
		i++
		j--
	}
	return arr
}

url: https://raw.githubusercontent.com/pradeeprajagopal/LeetCode-Solutions-in-Go/d08240cb0acb964d6f03df4faa99ff3d950a3af2/Problems/1073. Adding Two Negabinary Numbers/1073. Adding Two Negabinary Numbers.go

filename: 1073. Adding Two Negabinary Numbers.go


text:
DESCRIPTION = "Image for ${MACHINE} (${PRODUCT}) "
HOMEPAGE = "http://www.avocent.com"
MAINTAINER = "jiff.shen@avocent.com"
PR = "r1"

COMPATIBLE_MACHINE="dsi5200"

RDEPENDS = "${IPKG_INSTALL}"

export IPKG_INSTALL = "\
	task-bootstrap \
	task-caesar-base-depends \
	task-caesar-base \
	task-caesar-settings \
	task-caesar-apps \
	task-caesar-lib-extra \
	task-caesar-connectivity \
	"

IMAGE_LINGUAS = ""
IMAGE_ROOTFS_SIZE_ext2.gz ?= "71680"

inherit image_ipk
require latest-image.inc

IMAGE_BASENAME="${PRODUCT}"

clean_files() {
	(cd ${IMAGE_ROOTFS}; rm -rf $(find . -name ".debug"); )
}

rootfs_postproc () {
	echo "${PRODUCT}, build ${PV}-${DATETIME}" > ${IMAGE_ROOTFS}${sysconfdir}/motd
}

ROOTFS_POSTPROCESS_COMMAND = "rootfs_postproc;"
IMAGE_PREPROCESS_COMMAND =+ "clean_files;"

do_latest () {
	oenote ln -sf ${IMAGE_NAME}.rootfs.${IMAGE_FSTYPES} ${DEPLOY_DIR_IMAGE}/${LATEST_IMAGE}
	ln -sf ${IMAGE_NAME}.rootfs.${IMAGE_FSTYPES} ${DEPLOY_DIR_IMAGE}/${LATEST_IMAGE}
}

do_latest[nostamp] = 1

addtask latest after do_rootfs before do_build


text:
---
---
@string{tog = {ACM Transactions on Graphics}}
@string{corl = {The Conference on Robot Learning}}
@string{iros = {International Conference on Intelligent Robots and Systems}}
@string{icra = {International Conference on Robotics and Automation}}
@string{neurips = {Conference on Neural Information Processing Systems}}
@string{icml = {International Conference on Machine Learning}}
@string{iccv = {The International Conference on Computer Vision}}
@string{eccv = {The European Conference on Computer Vision}}
@string{cvpr = {The Conference on Computer Vision and Pattern Recognition}}
@string{wacv = {Winter Conference On Applications of Computer Vision}}

@inproceedings{yang2023freenerf,
   abbr={CVPR},
   bibtex_show={true},
   title={FreeNeRF: Improving Few-shot Neural Rendering with Free Frequency Regularization},
   author={Jiawei Yang and Marco Pavone and Yue Wang},
   year={2023},
   booktitle=cvpr,
   pdf={https://arxiv.org/abs/2303.07418},
   selected={true},
   code={https://github.com/Jiawei-Yang/FreeNeRF},
   website={https://jiawei-yang.github.io/FreeNeRF/},
}

@inproceedings{tian2023geomae,
   abbr={CVPR},
   bibtex_show={true},
   title={GeoMAE: Masked Geometric Target Prediction for Self-supervised Point Cloud Pre-Training},
   author={Xiaoyu Tian and Haoxi Ran and Yue Wang and Hang Zhao},
   year={2023},
   booktitle=cvpr,
   pdf={https://arxiv.org/abs/2305.08808},
   selected={true},
}

@inproceedings{gu2023vip3d,
   abbr={CVPR},
   bibtex_show={true},
   title={Vip3d: End-to-End Visual Trajectory Prediction via 3D Agent Queries},
   author={Junru Gu and Chenxu Hu and Tianyuan Zhang and Xuanyao Chen and Yilun Wang and Yue Wang and Hang Zhao},
   year={2023},
   booktitle=cvpr,
   pdf={https://arxiv.org/abs/2208.01582},
   selected={false},
   code={https://github.com/Tsinghua-MARS-Lab/ViP3D},
   website={https://tsinghua-mars-lab.github.io/ViP3D/},
}

@inproceedings{xiong2023nmp,
   abbr={CVPR},
   bibtex_show={true},
   title={Neural Map Prior for Autonomous Driving},
   author={Xuan Xiong and Yicheng Liu and Tianyuan Yuan and Yue Wang and Yilun Wang and Hang Zhao},
   year={2023},
   booktitle=cvpr,
   pdf={https://arxiv.org/abs/2304.08481},
   selected={false},
   website={https://tsinghua-mars-lab.github.io/neural_map_prior/},
}

@inproceedings{liu2023vectormapnet,
   abbr={ICML},
   bibtex_show={true},
   title={VectorMapNet: End-to-End Vectorized HD Map Learning},
   author={Yicheng Liu and Tianyuan Yuan and Yue Wang and Yilun Wang and Hang Zhao},
   year={2023},
   booktitle=icml,
   pdf={https://arxiv.org/abs/2206.08920},
   selected={false},
   code={https://github.com/Mrmoore98/VectorMapNet_code},
   website={https://tsinghua-mars-lab.github.io/vectormapnet/},
}

@inproceedings{huang2022selfsup,
   abbr={CORL},
   bibtex_show={true},
   title={Representation Learning for Object Detection from Unlabeled Point Cloud Sequences},
   author={Xiangru Huang and Yue Wang and Vitor Campagnolo Guizilini and Rares Andrei Ambrus and Adrien Gaidon and Justin Solomon},
   year={2022},
   booktitle=corl,
   pdf={https://openreview.net/forum?id=nuAGobCwb8V},
   selected={false},

}

@inproceedings{li2022scene,
   abbr={CORL},
   bibtex_show={true},
   title={Self-Supervised Collaborative Scene Completion: Towards Task-Agnostic Multi-Robot Perception},
   author={Yiming Li and Juexiao Zhang and Dekun Ma and Yue Wang and Chen Feng},
   year={2022},
   booktitle=corl,
   pdf={https://openreview.net/forum?id=hW0tcXOJas2},
     selected={false},

}

@inproceedings{li2022hdmapnet,
   abbr={ICRA},
   bibtex_show={true},
   title={HDMapNet: An Online HD Map Construction and Evaluation Framework},
   author={Qi Li* and Yue Wang* and Yilun Wang and Hang Zhao},
   year={2022},
   booktitle=icra,
   pdf={https://arxiv.org/abs/2107.06307},
   selected={false},
   code={https://github.com/Tsinghua-MARS-Lab/HDMapNet},
}

@inproceedings{
   obj-dgcnn,
   abbr={NeurIPS},
   bibtex_show={true},
   title={Object DGCNN: 3D Object Detection using Dynamic Graphs},
   author={Wang, Yue and Solomon, Justin M.},
   booktitle=neurips,
   year={2021},
   pdf={https://arxiv.org/abs/2110.06923},
     selected={false},
   code={https://github.com/WangYueFt/detr3d},
}

@inproceedings{
   detr3d,
   abbr={CORL},
   bibtex_show={true},
   title={DETR3D: 3D Object Detection from Multi-view Images via 3D-to-2D Queries},
   author={Wang, Yue and Guizilini, Vitor and Zhang, Tianyuan and Wang, Yilun and Zhao, Hang and and Solomon, Justin M.},
   booktitle=corl,
   year={2021},
   pdf={https://arxiv.org/abs/2110.06922},
   selected={true},
   code={https://github.com/WangYueFt/detr3d},
}

@inproceedings{
  hua2021feature,
     abbr={ICCV},
   bibtex_show={true},
  title={On Feature Decorrelation in Self-Supervised Learning},
  author={Hua, Tianyu and Wang, Wenxiao and Xue, Zihui and Wang, Yue and Ren, Sucheng and Zhao, Hang},
  booktitle=iccv,
  year={2021},
  pdf={https://arxiv.org/abs/2105.00470},
  code={https://github.com/PatrickHua/FeatureDecorrelationSSL},
}

@inproceedings{fu21iros,
  abbr = {IROS},
  bibtex_show={true},
  title = {A Multi-Hypothesis Approach to Pose Ambiguity in Object-Based SLAM},
  author = {Fu, Jiahui and Huang, Qiangqiang and Doherty, Kevin and Wang, Yue and Leonard, John J.},
  booktitle = iros,
  year = {2021},
  organization = {IEEE},
  pdf = {https://arxiv.org/abs/2108.01225}
}

@InProceedings{Liu_2021_ICCV,
    abbr = {ICCV workshop},
    bibtex_show={true},
    author    = {Liu, Sihan and Wang, Yue},
    title     = {Few-Shot Learning With Online Self-Distillation},
    booktitle = {Visual Inductive Priors for Data-Efficient Deep Learning Workshop at The International Conference on Computer Vision},
    month     = {October},
    year      = {2021},
    pages     = {1067-1070},
    pdf = {https://openaccess.thecvf.com/content/ICCV2021W/VIPriors/papers/Liu_Few-Shot_Learning_With_Online_Self-Distillation_ICCVW_2021_paper.pdf}
}

@article{
   yin2021,
   abbr={AJ},
   bibtex_show={true},
   title={Active Optical Control with Machine Learning: A Proof of Concept for the Vera C. Rubin Observatory},
   author={Yin, Jun E. and Eisenstein, Daniel J. and Finkbeiner, Douglas P. and Stubbs, Christopher W. and Wang, Yue},
   journal={The Astronomical Journal},
   year={2021},
   pdf={https://ui.adsabs.harvard.edu/abs/2021AJ....161..216Y/abstract},
}

@inproceedings{tian2020rethink,
  abbr={ECCV},
  bibtex_show={true},
  title={Rethinking few-shot image classification: a good embedding is all you need?},
  author={Tian*, Yonglong and Wang*, Yue and Krishnan, Dilip and Tenenbaum, Joshua B and Isola, Phillip},
  booktitle=eccv,
  year={2020},
  pdf={https://arxiv.org/abs/2003.11539},
  selected={true},
  code={https://github.com/WangYueFt/rfs},
}

@inproceedings{wang2020pillar,
  abbr={ECCV},
  bibtex_show={true},
  title={Pillar-based Object Detection for Autonomous Driving},
  author={Wang, Yue and Fathi, Alireza and Kundu, Abhijit and Ross, David and Pantofaru, Caroline and Funkhouser, Thomas and Solomon, Justin},
  booktitle=eccv,
  year={2020},
  pdf={https://arxiv.org/abs/2007.10323},
  selected={false},
  code={https://github.com/WangYueFt/pillar-od},

}

@inproceedings{wang2020pad,
  abbr={ECCV workshop},
  bibtex_show={true},
  title={Multi-Frame to Single-Frame: Knowledge Distillation for 3D Object Detection},
  author={Wang, Yue and Fathi, Alireza and Wu, Jiajun and Funkhouser, Thomas and Solomon, Justin},
  booktitle={The Workshop on Perception for Autonomous Driving at The European Conference on Computer Vision},
  year={2020},
  pdf={https://arxiv.org/abs/2009.11859}
}

@inproceedings{sun2020,
  abbr={WACV},
  bibtex_show={true},
  title={Pointgrow: Autoregressively Learned Point Cloud Generation with Self-attention},
  author={Yongbin Sun and Yue Wang and Ziwei Liu and Joshua E. Siegel and Sanjay E. Sarma},
  booktitle=wacv,
  year={2020},
  pdf={https://arxiv.org/abs/1810.05591},
  code={https://github.com/syb7573330/PointGrow},
}

@inproceedings{Wang2019PRNet,
  abbr={NeurIPS},
  bibtex_show={true},
  title={PRNet: Self-Supervised Learning for Partial-to-Partial Registration},
  author={Yue Wang and Justin M. Solomon},
  booktitle=neurips,
  year={2019},
  pdf={https://arxiv.org/abs/1910.12240},
  selected={true},
  code={https://github.com/WangYueFt/prnet},

}

@inproceedings{Wang2019DeepCP,
  abbr={ICCV},
  bibtex_show={true},
  title={Deep Closest Point: Learning Representations for Point Cloud Registration},
  author={Yue Wang and Justin M. Solomon},
  booktitle=iccv,
  year={2019},
  pdf={https://arxiv.org/abs/1905.03304},
  selected={true},
  code={https://github.com/WangYueFt/dcp},
}

@article{Wang2018DynamicGC,
  abbr={TOG},
  bibtex_show={true},
  title={Dynamic Graph CNN for Learning on Point Clouds},
  author={Yue Wang and Yongbin Sun and Ziwei Liu and Sanjay E. Sarma and Michael M. Bronstein and Justin M. Solomon},
  journal=tog,
  year={2019},
  volume={38},
  issue={5},
  page={146},
  url={https://arxiv.org/abs/1801.07829},
  pdf={https://arxiv.org/abs/1801.07829},
  selected={true},
  code={https://github.com/WangYueFt/dgcnn},
}

@article{Sun2018Im2AvatarC3,
  abbr={ArXiv},
  bibtex_show={true},
  title={Im2Avatar: Colorful 3D Reconstruction from a Single Image},
  author={Yongbin Sun and Ziwei Liu and Yue Wang and Sanjay E. Sarma},
  journal={ArXiv},
  year={2018},
  volume={abs/1804.06375},
  pdf={https://arxiv.org/abs/1804.06375},
  code={https://github.com/syb7573330/im2avatar},
}

gha_language: JavaScript


text:
package main

import "os"
import "fmt"
import "os/signal"

var methods *ServiceMethodList
var templates *TemplateCache
var context *ServerContext

func main() {
	config := getConfig()
	context = NewServerContext(config)
	methods = NewServiceMethodList()
	templates = NewTemplateCache()

	if err := templates.Load(config.WebRoot); err != nil {
		fmt.Fprintf(os.Stderr, "[e] %v\n", err)
		os.Exit(1)
	}

	if err := BindApi(methods); err != nil {
		fmt.Fprintf(os.Stderr, "[e] %v\n", err)
		os.Exit(1)
	}

	go Run(config)

loop:
	for {
		select {
		case sig := <-signal.Incoming:
			if unix, ok := sig.(signal.UnixSignal); ok {
				switch unix {
				case signal.SIGINT, signal.SIGTERM, signal.SIGKILL:
					break loop
				}
			}
		}
	}
	os.Exit(0)
}

func getConfig() (cfg *Config) {
	var err os.Error
	var cfgfile string

	if len(os.Args) > 1 {
		cfgfile = os.Args[1]
	} else {
		usage()
		os.Exit(0)
	}

	cfg = NewConfig()
	if err = cfg.Load(cfgfile); err != nil {
		fmt.Fprintf(os.Stdout, "[i] Saving template configuration at: %s\n", cfgfile)
		fmt.Fprint(os.Stdout, "[i] Modify it in a text editor and restart this program.\n")

		if err = cfg.Save(cfgfile); err != nil {
			fmt.Fprintf(os.Stderr, "[e] %v\n", err)
			os.Exit(1)
		}

		os.Exit(0)
	}
	if len(cfg.ListenAddr) == 0 {
		fmt.Fprint(os.Stderr, "[e] No listen address has been specified in the configuration file.\n")
		os.Exit(1)
	}

	if cfg.Secure && (len(cfg.ServerCert) == 0 || len(cfg.ServerKey) == 0) {
		fmt.Fprint(os.Stderr, "[e] When running as a secure server, you must specify valid "+
			"servercert and serverkey values. These should point to files containing the "+
			"respective certificate and key.\n")
		os.Exit(1)
	}

	if len(cfg.CookieSalt) == 0 {
		fmt.Fprint(os.Stderr, "[e] It is highly recommended to set a valid cookiesalt value in "+
			"the configuration file. This salt is used to (de/en)crypt cookies. It should be an "+
			"arbitrary length, random string of characters.\n")
		os.Exit(1)
	}
	return
}

func usage() {
	fmt.Fprintf(os.Stdout, `usage: %s <configfile>

   configfile: Full path to a valid configuration profile. If the file does not
               yet exist, the server will create a default template for you in
               the specified location.
`,
		os.Args[0])
}

repository: welterde/mudkip

repo_name: welterde/mudkip


text:
@proceedings{ws-2019-multilingualism,
    title = "Proceedings of the Second Workshop on Multilingualism at the Intersection of Knowledge Bases and Machine Translation",
    editor = "Arcan, Mihael  and
      Turchi, Marco  and
      Du, Jinhua  and
      Shterionov, Dimitar  and
      Torregrosa, Daniel",
    month = aug,
    year = "2019",
    address = "Dublin, Ireland",
    publisher = "European Association for Machine Translation",
    url = "https://www.aclweb.org/anthology/W19-7100",
}
@inproceedings{chakravarthi-etal-2019-wordnet,
    title = "{W}ord{N}et Gloss Translation for Under-resourced Languages using Multilingual Neural Machine Translation",
    author = "Chakravarthi, Bharathi Raja  and
      Arcan, Mihael  and
      McCrae, John P.",
    booktitle = "Proceedings of the Second Workshop on Multilingualism at the Intersection of Knowledge Bases and Machine Translation",
    month = aug,
    year = "2019",
    address = "Dublin, Ireland",
    publisher = "European Association for Machine Translation",
    url = "https://www.aclweb.org/anthology/W19-7101",
    pages = "1--7",
}
@inproceedings{soto-etal-2019-leveraging,
    title = "Leveraging {SNOMED} {CT} terms and relations for machine translation of clinical texts from Basque to {S}panish",
    author = "Soto, Xabier  and
      Perez-De-Vi{\~n}aspre, Olatz  and
      Oronoz, Maite  and
      Labaka, Gorka",
    booktitle = "Proceedings of the Second Workshop on Multilingualism at the Intersection of Knowledge Bases and Machine Translation",
    month = aug,
    year = "2019",
    address = "Dublin, Ireland",
    publisher = "European Association for Machine Translation",
    url = "https://www.aclweb.org/anthology/W19-7102",
    pages = "8--18",
}

repository: emorynlp/nlprankings

repo_name: emorynlp/nlprankings

gha_license_id: NOASSERTION


text:
package kubermatic

import (
	"fmt"
	"strings"
	"time"

	"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
	"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
	"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
	"github.com/kubermatic/go-kubermatic/client/serviceaccounts"
	"github.com/kubermatic/go-kubermatic/models"
)

const (
	serviceAccountReady       = "Ready"
	serviceAccountUnavailable = "Unavailable"
)

func resourceServiceAccount() *schema.Resource {
	return &schema.Resource{
		Create: resourceServiceAccountCreate,
		Read:   resourceServiceAccountRead,
		Update: resourceServiceAccountUpdate,
		Delete: resourceServiceAccountDelete,
		Importer: &schema.ResourceImporter{
			State: schema.ImportStatePassthrough,
		},

		Schema: map[string]*schema.Schema{
			"project_id": {
				Type:        schema.TypeString,
				Required:    true,
				ForceNew:    true,
				Description: "Reference project identifier",
			},
			"name": {
				Type:         schema.TypeString,
				Required:     true,
				ValidateFunc: validation.NoZeroValues,
				Description:  "Service account's name",
			},
			"group": {
				Type:         schema.TypeString,
				Required:     true,
				ValidateFunc: validation.StringInSlice([]string{"editors", "viewers"}, false),
				Description:  "Service account's role in the project",
				DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
					if old == "" || new == "" {
						return false
					}
					l := len(old)
					if len(new) < l {
						l = len(new)
					}
					return old[:l] == new[:l]
				},
			},
		},
	}
}

func kubermaticServiceAccountMakeID(p, id string) string {
	return fmt.Sprint(p, ":", id)
}

func kubermaticServiceAccountParseID(id string) (string, string, error) {
	parts := strings.SplitN(id, ":", 2)
	if parts[0] == "" || parts[1] == "" {
		return "", "", fmt.Errorf("unexpected format of ID (%s), expected project_id:id", id)
	}
	return parts[0], parts[1], nil
}

func resourceServiceAccountCreate(d *schema.ResourceData, m interface{}) error {
	k := m.(*kubermaticProviderMeta)

	p := serviceaccounts.NewAddServiceAccountToProjectParams()
	p.SetProjectID(d.Get("project_id").(string))
	p.SetBody(&models.ServiceAccount{
		Name:  d.Get("name").(string),
		Group: d.Get("group").(string),
	})
	r, err := k.client.Serviceaccounts.AddServiceAccountToProject(p, k.auth)
	if err != nil {
		if e, ok := err.(*serviceaccounts.AddServiceAccountToProjectDefault); ok && errorMessage(e.Payload) != "" {
			return fmt.Errorf("unable to create service account: %s", errorMessage(e.Payload))
		}
		return fmt.Errorf("unable to create service account: %v", err)
	}
	d.SetId(kubermaticServiceAccountMakeID(d.Get("project_id").(string), r.Payload.ID))

	return resourceServiceAccountRead(d, m)
}

func resourceServiceAccountRead(d *schema.ResourceData, m interface{}) error {
	k := m.(*kubermaticProviderMeta)

	projectID, serviceAccountID, err := kubermaticServiceAccountParseID(d.Id())
	if err != nil {
		return err
	}

	all, err := kubermaticServiceAccountList(k, projectID)
	if err != nil {
		return err
	}

	var serviceAccount *models.ServiceAccount
	for _, item := range all {
		if item.ID == serviceAccountID {
			serviceAccount = item
			break
		}
	}
	if serviceAccount == nil {
		d.SetId("")
		return nil
	}

	d.Set("name", serviceAccount.Name)
	d.Set("group", serviceAccount.Group)

	return nil
}

func kubermaticServiceAccountList(k *kubermaticProviderMeta, projectID string) ([]*models.ServiceAccount, error) {
	listStateConf := &resource.StateChangeConf{
		Pending: []string{
			serviceAccountUnavailable,
		},
		Target: []string{
			serviceAccountReady,
		},
		Refresh: func() (interface{}, string, error) {
			p := serviceaccounts.NewListServiceAccountsParams()
			p.SetProjectID(projectID)
			s, err := k.client.Serviceaccounts.ListServiceAccounts(p, k.auth)
			if err != nil {
				// wait for the RBACs
				if _, ok := err.(*serviceaccounts.ListServiceAccountsForbidden); ok {
					return s, usersUnavailable, nil
				}
				return nil, serviceAccountUnavailable, fmt.Errorf("can not get service accounts: %v", err)
			}
			return s, serviceAccountReady, nil
		},
		Timeout: 20 * time.Second,
		Delay:   requestDelay,
	}

	s, err := listStateConf.WaitForState()
	if err != nil {
		k.log.Debugf("error while waiting for the service account %v", err)
		return nil, fmt.Errorf("error while waiting for the service account %v", err)
	}
	sa := s.(*serviceaccounts.ListServiceAccountsOK)

	return sa.Payload, nil
}

func resourceServiceAccountUpdate(d *schema.ResourceData, m interface{}) error {
	// TODO(furkhat): uncomment when fix to `assignment to entry in nil map` released.
	// k := m.(*kubermaticProviderMeta)

	// projectID, serviceAccountID, err := kubermaticServiceAccountParseID(d.Id())
	// if err != nil {
	// 	return err
	// }

	// p := serviceaccounts.NewUpdateServiceAccountParams()
	// p.SetProjectID(projectID)
	// p.SetServiceAccountID(serviceAccountID)
	// p.SetBody(&models.ServiceAccount{m
	// 	ID:    serviceAccountID,
	// 	Name:  d.Get("name").(string),
	// 	Group: d.Get("group").(string),
	// })
	// _, err = k.client.Serviceaccounts.UpdateServiceAccount(p, k.auth)
	// if err != nil {
	// 	if e, ok := err.(*serviceaccounts.UpdateServiceAccountDefault); ok && errorMessage(e.Payload) != "" {
	// 		return fmt.Errorf("unable to update service account: %s", errorMessage(e.Payload))
	// 	}
	// 	return fmt.Errorf("unable to update service account: %v", err)
	// }
	return resourceServiceAccountRead(d, m)
}

func resourceServiceAccountDelete(d *schema.ResourceData, m interface{}) error {
	k := m.(*kubermaticProviderMeta)

	projectID, serviceAccountID, err := kubermaticServiceAccountParseID(d.Id())
	if err != nil {
		return err
	}

	p := serviceaccounts.NewDeleteServiceAccountParams()
	p.SetProjectID(projectID)
	p.SetServiceAccountID(serviceAccountID)
	_, err = k.client.Serviceaccounts.DeleteServiceAccount(p, k.auth)
	if err != nil {
		if e, ok := err.(*serviceaccounts.DeleteServiceAccountDefault); ok && errorMessage(e.Payload) != "" {
			return fmt.Errorf("unable to delete service account: %s", errorMessage(e.Payload))
		}
		return fmt.Errorf("unable to delete service account: %v", err)
	}
	return nil
}


text:
SUMMARY = "Qt Widget Extension for Technical Applications"
SECTION = "libs"
HOMEPAGE = "http://qwt.sourceforge.net/index.html"

# LGPLv2.1 + some exceptions
LICENSE = "QWTv1.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=dac2743472b0462ff3cfb4af42051c88"

DEPENDS = "qtbase qtsvg qttools"

COMPATIBLE_HOST:toolchain-clang:riscv32 = "null"
COMPATIBLE_HOST:toolchain-clang:riscv64 = "null"

inherit qmake5

SRC_URI = " \
    ${SOURCEFORGE_MIRROR}/qwt/qwt-${PV}.tar.bz2;name=qwt \
    file://0001-Remove-rpath-from-binaries-they-point-to-buuild-area.patch \
"
SRC_URI[qwt.sha256sum] = "4076de63ec2b5e84379ddfebf27c7b29b8dc9074f3db7e2ca61d11a1d8adc041"

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

EXTRA_QMAKEVARS_PRE += " \
    QWT_CONFIG+=QwtPkgConfig \
    QWT_CONFIG+=QwtExamples \
"

do_configure:prepend() {
    sed -i \
        -e 's:/usr/local/qwt-$$QWT_VERSION:${prefix}:' \
        -e 's:^QWT_INSTALL_LIBS.*:QWT_INSTALL_LIBS = ${libdir}:' \
        ${S}/*.pri
    export QWT_INSTALL_LIBS=${libdir}
}

do_install:append() {
    # seems out of tree build confuses installation of examples
    # so install them manually
    install -d ${D}${bindir}/
    cp ${B}/examples/bin/* ${D}${bindir}/
}

PACKAGES:prepend = "${PN}-examples ${PN}-features ${PN}-plugins "
FILES:${PN}-examples = "${bindir}/*"
FILES:${PN}-features = "${prefix}/features"
FILES:${PN}-plugins = "${prefix}/plugins/designer/*.so"
FILES:${PN}-doc += "${prefix}/doc"

INSANE_SKIP:${PN}-plugins += "libdir"
INSANE_SKIP:${PN}-dbg += "libdir"

RPROVIDES:${PN}-dev = "libqwt-qt5-dev"


text:
SUMMARY = "Basler BCON Demo Software Package"
DESCRIPTION = "Software to install on local target to allow building in MitySOM-5CSX"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"

SRC_URI = "svn://svnsrv/svn/mityaltera/stereo_vision_carrier/trunk/sw;protocol=http;module=ARM;name=demo_app; \
	svn://svnsrv/svn/mityaltera/mityarm-5csx/tags/basler_vdk/sw/ARM;protocol=http;module=libfpga;name=libfpga; \
	svn://svnsrv/svn/camera/soc_camera/trunk/sw/ARM;protocol=http;module=bconadapter;name=bconadapter; "

SRCREV_FORMAT = "demo_app"
SRCREV_demo_app = "${AUTOREV}"
SRCREV_libfpga = "${AUTOREV}"
SRCREV_bconadapter = "${AUTOREV}"

# r1 - use latest demo_app SVN version number as part of PV
PR = "r1"

# ${PV} is pulled from the recipe filename, e.g. helloworld_2.7.bb -> ${PV} expands to "2.7".
# We use immediate evaluation to define a new var PVBASE holding the original value of ${PV}.
PVBASE := "${PV}"

# Then redefine PV to tack the svn rev onto the base version. This is evaluated at fetch time.
# Then the package will get rebuilt any time the relevant part of the source tree changes.
PV = "${PVBASE}.${SRCPV}"

do_install() {
	install -m 0755 -d ${D}/home
	install -m 0755 -d ${D}/home/root
	install -m 0755 -d ${D}/home/root/sw

	# demo application
	install -m 0755 -d ${D}/home/root/sw/demo_app
	install -m 0755 -d ${D}/home/root/sw/demo_app/src
	pushd ${WORKDIR}/ARM/demo_app/src
	find * -type f -exec install -m 0755 {} ${D}/home/root/sw/demo_app/src/{} \;
	cd ..
	find * -type f -exec install -m 0755 {} ${D}/home/root/sw/demo_app/{} \;
	popd

	# libfpga
	install -m 0755 -d ${D}/home/root/sw/libfpga
	install -m 0755 -d ${D}/home/root/sw/libfpga/altera_vip
	pushd ${WORKDIR}/libfpga/altera_vip
	find * -type f -exec install -m 0755 {} ${D}/home/root/sw/libfpga/altera_vip/{} \;
	cd ..
	find * -type f -exec install -m 0755 {} ${D}/home/root/sw/libfpga/{} \;
	popd

	# bconadapter
	install -m 0755 -d ${D}/home/root/sw/bconadapter
	pushd ${WORKDIR}/bconadapter
	find * -type f -exec install -m 0755 {} ${D}/home/root/sw/bconadapter/{} \;
	popd
}

FILES_${PN} = "/home \
	/home/root \
	/home/root/sw \
	/home/root/sw/demo_app \
	/home/root/sw/demo_app/src \
	/home/root/sw/demo_app/* \
	/home/root/sw/demo_app/src/* \
	/home/root/sw/libfpga \
	/home/root/sw/libfpga/altera_vip \
	/home/root/sw/libfpga/* \
	/home/root/sw/libfpga/altera_vip/* \
	/home/root/sw/libfpga/bconadapter \
	/home/root/sw/libfpga/bconadapter/* \
	"


text:
@article{branco2015survey,
 author = {Branco, Paula and Torgo, Luis and Ribeiro, Rita},
 journal = {arXiv preprint arXiv:1505.01658},
 title = {A survey of predictive modelling under imbalanced distributions},
 year = {2015}
}

@article{diez2015diversity,
 author = {D{\'\i}ez-Pastor, Jos{\'e} F and Rodr{\'\i}guez, Juan J and Garc{\'\i}a-Osorio, C{\'e}sar I and Kuncheva, Ludmila I},
 journal = {Information Sciences},
 pages = {98--117},
 publisher = {Elsevier},
 title = {Diversity techniques improve the performance of the best imbalance learning ensembles},
 volume = {325},
 year = {2015}
}

@inproceedings{li2011semi,
 acmid = {2283708},
 author = {Li, Shoushan and Wang, Zhongqing and Zhou, Guodong and Lee, Sophia Yat Mei},
 booktitle = {Proceedings of the Twenty-Second International Joint Conference on Artificial Intelligence - Volume Volume Three},
 doi = {10.5591/978-1-57735-516-8/IJCAI11-306},
 isbn = {978-1-57735-515-1},
 location = {Barcelona, Catalonia, Spain},
 numpages = {6},
 pages = {1826--1831},
 publisher = {AAAI Press},
 series = {IJCAI'11},
 title = {Semi-supervised Learning for Imbalanced Sentiment Classification},
 url = {http://dx.doi.org/10.5591/978-1-57735-516-8/IJCAI11-306},
 year = {2011}
}

@article{lopez2012analysis,
 author = {L{\'o}pez, Victoria and Fern{\'a}ndez, Alberto and Moreno-Torres, Jose G and Herrera, Francisco},
 journal = {Expert Systems with Applications},
 number = {7},
 pages = {6585--6608},
 publisher = {Elsevier},
 title = {Analysis of preprocessing vs. cost-sensitive learning for imbalanced classification. Open problems on intrinsic data characteristics},
 volume = {39},
 year = {2012}
}

@article{lopez2013insight,
 author = {L{\'o}pez, Victoria and Fern{\'a}ndez, Alberto and Garc{\'\i}a, Salvador and Palade, Vasile and Herrera, Francisco},
 journal = {Information Sciences},
 pages = {113--141},
 publisher = {Elsevier},
 title = {An insight into classification with imbalanced data: Empirical results and current trends on using data intrinsic characteristics},
 volume = {250},
 year = {2013}
}


text:
package inventory

import (
	"fmt"

	"github.com/micro-in-cn/tutorials/microservice-in-micro/part8/basic/common"
	proto "github.com/micro-in-cn/tutorials/microservice-in-micro/part8/inventory-srv/proto/inventory"
	"github.com/micro-in-cn/tutorials/microservice-in-micro/part8/plugins/db"
	"github.com/micro/go-micro/util/log"
)

// Sell 销存
func (s *service) Sell(bookId int64, userId int64) (id int64, err error) {
	// 获取数据库
	tx, err := db.GetDB().Begin()
	if err != nil {
		log.Logf("[Sell] 事务开启失败", err.Error())
		return
	}
	defer func() {
		if err != nil {
			tx.Rollback()
		}
	}()

	querySQL := `SELECT id, book_id, unit_price, stock, version FROM inventory WHERE book_id = ?`

	inv := &proto.Inv{}

	updateSQL := `UPDATE inventory SET stock = ?, version = ?  WHERE book_id = ? AND version = ?`

	// 销存方法，通过version字段避免脏写
	var deductInv func() error
	deductInv = func() (errIn error) {
		// 查询
		errIn = tx.QueryRow(querySQL, bookId).Scan(&inv.Id, &inv.BookId, &inv.UnitPrice, &inv.Stock, &inv.Version)
		if errIn != nil {
			log.Logf("[Sell] 查询数据失败，err：%s", errIn)
			return errIn
		}

		if inv.Stock < 1 {
			errIn = fmt.Errorf("[Sell] 库存不足")
			log.Logf(errIn.Error())
			return errIn
		}

		r, errIn := tx.Exec(updateSQL, inv.Stock-1, inv.Version+1, bookId, inv.Version)
		if errIn != nil {
			log.Logf("[Sell] 更新库存数据失败，err：%s", errIn)
			return
		}

		if affected, _ := r.RowsAffected(); affected == 0 {
			log.Logf("[Sell] 更新库存数据失败，版本号%d过期，即将重试", inv.Version)
			// 重试，直到没有库存
			deductInv()
		}

		return
	}

	// 开始销存
	err = deductInv()
	if err != nil {
		log.Logf("[Sell] 销存失败，err：%s", err)
		return
	}

	insertSQL := `INSERT inventory_history (book_id, user_id, state) VALUE (?, ?, ?) `
	r, err := tx.Exec(insertSQL, bookId, userId, common.InventoryHistoryStateNotOut)
	if err != nil {
		log.Logf("[Sell] 新增销存记录失败，err：%s", err)
		return
	}

	// 返回历史记录id，作为流水号使用
	id, _ = r.LastInsertId()

	// 忽略error
	tx.Commit()
	return
}

// Confirm 确认销存
func (s *service) Confirm(id int64, state int) (err error) {
	updateSQL := `UPDATE inventory_history SET state = ? WHERE id = ?;`

	// 获取数据库
	o := db.GetDB()

	// 更新
	_, err = o.Exec(updateSQL, state, id)
	if err != nil {
		log.Logf("[Confirm] 更新失败，err：%s", err)
		return
	}
	return
}

repository: micro-community/tutorials

repo_name: micro-community/tutorials

gha_language: Go


text:
@article{fu2018tunable,
  title     = {Tunable shape memory polyurethane networks cross-linked by 1, 3, 5, 7-tetrahydroxyadamantane},
  author    = {Fu, Shuqin and Zhu, Jiaping and Chen, Shaojun},
  journal   = {Macromolecular Research},
  volume    = {26},
  number    = {11},
  pages     = {1035--1041},
  year      = {2018},
  publisher = {Springer}
}


text:
SUMMARY = "Phosphor DBus Interfaces"
DESCRIPTION = "Generated bindings, using sdbus++, for the phosphor YAML"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
DEPENDS += " \
        ${PYTHON_PN}-sdbus++-native \
        sdbusplus \
        systemd \
        "
SRCREV = "4de8a3b03cbb375eae92184cce3bc69be85f07d4"
PV = "1.0+git${SRCPV}"
PR = "r1"

SRC_URI = "git://github.com/openbmc/phosphor-dbus-interfaces;branch=master;protocol=https"

S = "${WORKDIR}/git"

inherit pkgconfig meson
inherit obmc-phosphor-utils
inherit phosphor-dbus-yaml
inherit python3native

# Markdown files are installed into /usr/share/phosphor-dbus-interfaces so
# add them to the 'doc' subpackage.
FILES:${PN}-doc += "${datadir}/${BPN}"

# Process OBMC_ORG_YAML_SUBDIRS to create Meson config options.
# ex. xyz/openbmc_project -> -Ddata_xyz_openbmc_project=true
def pdi_meson_config(d):
    return ' '.join([
        '-Ddata_' + x.replace('/', '_') + '=true' \
                for x in listvar_to_list(d, 'OBMC_ORG_YAML_SUBDIRS')
        ])
pdi_meson_config[vardeps] = "OBMC_ORG_YAML_SUBDIRS"
EXTRA_OEMESON += "${@pdi_meson_config(d)}"
# Remove all schemas by default regardless of the meson_options.txt config
do_write_config:append() {
    for intf in $(grep "^option('data_" ${S}/meson_options.txt | sed "s,^.*\(data_[^']*\).*$,\1,"); do
        sed -i "/^\[built-in options\]\$/a$intf = false" ${WORKDIR}/meson.cross
    done
}
do_write_config[deptask] += "do_unpack"

repository: openbmc/openbmc

repo_name: openbmc/openbmc

gha_language: Python


text:
@article{Flint2019,
 author = {Kaehler, Claas and Cearns, Micah and Opel, Nils and Mehler, David and Emden, Daniel and Leenings, Ramona and Winter, Nils R. and Eickhoff, Simon B. and Kircher, Tilo and Krug, Axel and Nenadic, Igor and Arolt, Volker and Clark, Scott and Baune, Bernhard T. and Jiang, Xiaoyi and Dannlowski, Udo and Hahn, Tim},
 journal = {arXiv preprint arXiv:1912.06686},
 title = {Systematic Overestimation of Machine Learning Accuracies in Structural Neuroimaging Studies of Depression},
 year = {2019}
}

repository: NilsWinter/academic-kickstart

repo_name: NilsWinter/academic-kickstart


text:
DESCRIPTION = "UEFI EDK2 Firmware for Arm reference platforms"
HOMEPAGE = "https://github.com/tianocore/edk2"

LICENSE = "BSD-2-Clause-Patent"

# EDK2
LIC_FILES_CHKSUM = "file://edk2/License.txt;md5=2b415520383f7964e96700ae12b4570a"
# EDK2 Platforms
LIC_FILES_CHKSUM += "file://edk2/edk2-platforms/License.txt;md5=2b415520383f7964e96700ae12b4570a"

SRC_URI ?= "\
    git://github.com/tianocore/edk2.git;name=edk2;destsuffix=${S}/edk2;nobranch=1 \
    git://github.com/tianocore/edk2-platforms.git;name=edk2-platforms;destsuffix=${S}/edk2/edk2-platforms;nobranch=1 \
"
SRCREV_edk2           ?= "6ff7c838d09224dd4e4c9b5b93152d8db1b19740"
SRCREV_edk2-platforms ?= "ed4cc8059ec551032f0d8b8c172e9ec19214a638"
SRCREV_FORMAT         = "edk2_edk2-platforms"

require edk2-firmware.inc

repository: acrlinux/acrlinux-yocto

repo_name: acrlinux/acrlinux-yocto


text:
// Copyright 2018 JDCLOUD.COM
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// NOTE: This class is auto generated by the jdcloud code generator program.

package models

type ForwardRuleSpec struct {

    /* 协议: TCP 或者 UDP  */
    Protocol string `json:"protocol"`

    /* 高防 IP, serviceIps 为空时生效 (Optional) */
    ServiceIp *string `json:"serviceIp"`

    /* 高防 IP 列表, 不为空时忽略 serviceIp, 传多个时后台会在高防IP封禁后随机切换其他未封禁的IP (Optional) */
    ServiceIps []string `json:"serviceIps"`

    /* 端口号, 取值范围[1, 65535]  */
    Port int `json:"port"`

    /* 转发规则.
- wrr: 带权重的轮询
- rr:  不带权重的轮询
- sh:  源地址hash  */
    Algorithm string `json:"algorithm"`

    /* 回源类型: A 或者 CNAME  */
    OriginType string `json:"originType"`

    /*  (Optional) */
    OriginAddr []OriginAddrItem `json:"originAddr"`

    /* 备用的回源地址列表, 可以配置为一个域名或者多个 ip 地址 (Optional) */
    OnlineAddr []string `json:"onlineAddr"`

    /* 回源域名 (Optional) */
    OriginDomain *string `json:"originDomain"`

    /* 回源端口号, 取值范围[1, 65535]  */
    OriginPort int `json:"originPort"`
}

repository: jdcloud-api/jdcloud-sdk-go

repo_name: jdcloud-api/jdcloud-sdk-go


text:
@inproceedings{shu_evaluation_2015,
 abstract = {An adaptive optical data center network architecture is, for the first time, proposed and simulated. Data center traffic loads are efficiently accommodated by FTP solution, supported by synthetic optical packet/circuit switching scheme and dynamic function-topology management.},
 author = {Shu, Y. and Peng, S. and Yan, Y. and Yan, S. and Hugues-salas, E. and Zervas, G. and Simeonidou, D.},
 booktitle = {2015 European Conference on Optical Communication (ECOC)},
 date = {2015-09},
 doi = {10.1109/ECOC.2015.7341871},
 eventtitle = {2015 European Conference on Optical Communication (ECOC)},
 file = {/Users/sy13201/Zotero/storage/PPFBW27C/Shu et al_2015_Evaluation of function-topology programmable (FTP) optical packet-circuit.pdf;/Users/sy13201/Zotero/storage/R7I7QFPC/Shu et al_2015_Evaluation of function-topology programmable (FTP) optical packet-circuit.pdf;/Users/sy13201/Zotero/storage/ZBXKNSLA/Shu et al. - 2015 - Evaluation of function-topology programmable (FTP).pdf;/Users/sy13201/Zotero/storage/2V5QRVSL/7341871.html;/Users/sy13201/Zotero/storage/GD8WDGMS/articleDetails.html;/Users/sy13201/Zotero/storage/MM7VTPZ6/articleDetails.html},
 keywords = {adaptive optical data center network architecture,computer centres,data center traffic loads,dynamic function-topology management,FTP solution,function-topology programmable,Network topology,Optical buffering,optical interconnections,Optical interconnections,optical packet switching,Optical packet switching,optical packet-circuit switched data centre interconnects,optical switches,Optical switches,packet switching,synthetic optical packet-circuit switching scheme,Topology},
 pages = {1--3},
 title = {Evaluation of Function-Topology Programmable (FTP) Optical Packet/Circuit Switched Data Centre Interconnects}
}


text:
@article{RN916,
 author = {Eisen, D. P. and Marshall, C. and Dean, M. M. and Sasadeusz, J. and Richards, M. and Buising, K. and Cheng, A. and Johnson, P. D. R. and Barr, I. G. and McBryde, E. S.},
 doi = {10.1016/j.humimm.2011.08.014},
 journal = {Human Immunology},
 number = {11},
 pages = {1091-1094},
 title = {No association between mannose-binding lectin deficiency and H1N1 2009 infection observed during the first season of this novel pandemic influenza virus},
 type = {Journal Article},
 url = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-80054116412&doi=10.1016%2fj.humimm.2011.08.014&partnerID=40&md5=6dcebbf38fe10129ba31cdcd4824d8cb
http://www.sciencedirect.com/science/article/pii/S0198885911005040},
 volume = {72},
 year = {2011}
}


text:
@incollection{maggiore2012designing,
  title={Designing Casanova: a language for games},
  author={Maggiore, Giuseppe and Span{\`o}, Alvise and Orsini, Renzo and Costantini, Giulia and Bugliesi, Michele and Abbadi, Mohamed},
  booktitle={Advances in Computer Games},
  pages={320--332},
  year={2012},
  publisher={Springer}
}

@incollection{maggiore2012writing,
  title={Writing real-time. net games in casanova},
  author={Maggiore, Giuseppe and Spronck, Pieter and Orsini, Renzo and Bugliesi, Michele and Steffinlongo, Enrico and Abbadi, Mohamed},
  booktitle={Entertainment Computing-ICEC 2012},
  pages={341--348},
  year={2012},
  publisher={Springer}
}

@inproceedings{maggiore2012formal,
  title={A formal specification for casanova, a language for computer games},
  author={Maggiore, Giuseppe and Span{\`o}, Alvise and Orsini, Renzo and Bugliesi, Michele and Abbadi, Mohamed and Steffinlongo, Enrico},
  booktitle={Proceedings of the 4th ACM SIGCHI symposium on Engineering interactive computing systems},
  pages={287--292},
  year={2012},
  organization={ACM}
}

@inproceedings{maggiore2012casanova,
  title={On Casanova and Databases or the Similarity Between Games and DBs.},
  author={Maggiore, Giuseppe and Orsini, Renzo and Bugliesi, Michele},
  booktitle={SEBD},
  pages={271--276},
  year={2012}
}

@article{abbadiresources,
  title={Resources, Entities, Actions. A generalized design pattern for RTS games and its language extension in Casanova},
  author={Abbadi, Mohamed and Di Giacomo, Francesco and Orsini, Renzo and Plaat, Aske and Spronck, Pieter and Maggiore, Giuseppe}
}

repository: vs-team/Presentations

path: /PHD poster 14-11-2014/sample.bib

repo_name: vs-team/Presentations


text:
// Code is generated by ucloud-model, DO NOT EDIT IT.

package ucloudstack

import (
	"github.com/ucloud/ucloud-sdk-go/ucloud/request"
	"github.com/ucloud/ucloud-sdk-go/ucloud/response"
)

// DeleteDiskRequest is request schema for DeleteDisk action
type DeleteDiskRequest struct {
	request.CommonBase

	// [公共参数] 地域
	// Region *string `required:"true"`

	// [公共参数] 可用区
	// Zone *string `required:"true"`

	// 被删除的硬盘ID
	DiskID *string `required:"true"`
}

// DeleteDiskResponse is response schema for DeleteDisk action
type DeleteDiskResponse struct {
	response.CommonBase

	// 返回信息描述。
	Message string
}

// NewDeleteDiskRequest will create request of DeleteDisk action.
func (c *UCloudStackClient) NewDeleteDiskRequest() *DeleteDiskRequest {
	req := &DeleteDiskRequest{}

	// setup request with client config
	c.Client.SetupRequest(req)

	// setup retryable with default retry policy (retry for non-create action and common error)
	req.SetRetryable(true)
	return req
}

// DeleteDisk - 删除UCloudStack硬盘
func (c *UCloudStackClient) DeleteDisk(req *DeleteDiskRequest) (*DeleteDiskResponse, error) {
	var err error
	var res DeleteDiskResponse

	reqCopier := *req

	err = c.Client.InvokeAction("DeleteDisk", &reqCopier, &res)
	if err != nil {
		return &res, err
	}

	return &res, nil
}


text:
SUMMARY = "The Homekit Accessory Server"
MAINTAINER = "Gardena GmbH"
LICENSE = "CLOSED"

SRC_URI = " \
    gitsm://ssh.dev.azure.com/v3/HQV-Gardena/SG-Gateway/sg-homekit-accessory-server;protocol=ssh;branch=main \
    file://accessory-server.service \
    file://keep.d/${BPN} \
"

PR = "r1"
PV = "0.19.1"
SRCREV = "345e11a1fc89c2dae8aff0d201759e464a241051"

S = "${WORKDIR}/git"

inherit cmake systemd

FILES:${PN} += " \
    ${base_libdir}/upgrade/keep.d \
    ${systemd_unitdir}/system/accessory-server.service \
"

DEPENDS = "mdns cjson mbedtls openssl curl util-linux gnutls nng systemd libevdev"
RDEPENDS:${PN} += "accessory-server-foss-dependencies"

EXTRA_OECMAKE += " \
  -DHAVE_MFI_HW_AUTH=${@oe.utils.conditional('HOMEKIT_HWAUTH','1','1','0',d)} \
  -DCMAKE_BUILD_TYPE=${@oe.utils.conditional('DEBUG_BUILD','1','Debug','RelWithDebInfo',d)} \
  -DHAP_LOG_LEVEL=${@oe.utils.conditional('DEBUG_BUILD','1','3','2',d)} \
"

do_install() {
    install -d ${D}${bindir}
    install -m 0755 ${WORKDIR}/build/main/gardena-accessory-server ${D}${bindir}/
    install -m 0755 ${WORKDIR}/build/tools/provision/gardena-provision ${D}${bindir}/

    install -d ${D}${includedir}/accessoryserver
    install -m 0644 ${S}/main/include/wifiapi_public.h ${D}${includedir}/accessoryserver/

    install -d ${D}${systemd_unitdir}/system
    install -m 0644 ${WORKDIR}/accessory-server.service ${D}${systemd_unitdir}/system/

    # Keep HomeKit data from being erased on update
    install -d ${D}${base_libdir}/upgrade/keep.d
    install -m 0644 ${WORKDIR}/keep.d/${PN} ${D}${base_libdir}/upgrade/keep.d
}

SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE:${PN} = "accessory-server.service"

branch_name: refs/heads/main


text:
#
# base recipe: http://git.yoctoproject.org/cgit/cgit.cgi/meta-cgl/tree/meta-cgl-common/recipes-perl/perl
# base commit: 51c601ee5a25ced6154b4b87f9c1b40838423e6f
#

SUMMARY = "Perl extensions for IPv6"
DESCRIPTION = "The Socket6 module supports getaddrinfo() and getnameinfo() to intend \
to enable protocol independent programming. If your environment \
supports IPv6, IPv6 related defines such as AF_INET6 are included."
HOMEPAGE = "https://metacpan.org/release/Socket6"

PR = "r0"

inherit debian-package

LICENSE = "BSD-3-Clause & ISC"
LIC_FILES_CHKSUM = " \
    file://README;beginline=31;md5=4193e9db290f6adba830af0ffbae842a \
    file://inet_ntop.c;endline=16;md5=d202009b255fffe6953a0d61c2d6fab0 \
"

inherit cpan

CFLAGS += "-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
BUILD_CFLAGS += "-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"

do_configure_prepend() {
	mkdir -p m4
	autoreconf -Wcross --verbose --install --force || oefatal "autoreconf execution failed."
	sed -i 's:\./configure\(.[^-]\):./configure --build=${BUILD_SYS} --host=${HOST_SYS} \\\\\
	        --target=${TARGET_SYS} --prefix=${prefix} --exec_prefix=${exec_prefix} \\\\\
	        --bindir=${bindir} --sbindir=${sbindir} --libexecdir=${libexecdir} \\\\\
	        --datadir=${datadir} --sysconfdir=${sysconfdir} \\\\\
	        --sharedstatedir=${sharedstatedir} --localstatedir=${localstatedir} \\\\\
	        --libdir=${libdir} --includedir=${includedir} --oldincludedir=${oldincludedir} \\\\\
	        --infodir=${infodir} --mandir=${mandir}\1:' ${S}/Makefile.PL
}

BBCLASSEXTEND = "native"

repository: nghiaht-tsdv/meta-debian

repo_name: nghiaht-tsdv/meta-debian

branch_name: refs/heads/jethro

gha_language: BitBake


text:
@inproceedings{masood2016many,
 author = {Masood, Atiya and Mei, Yi and Chen, Gang and Zhang, Mengjie},
 booktitle = {Proceedings of the IEEE Congress on Evolutionary Computation},
 doi = {10.1109/CEC.2016.7743797},
 month = {jun},
 organization = {IEEE},
 pages = {209--216},
 pdf = {papers/CEC16-MasoodMeiChenZhang.pdf},
 title = {Many-objective genetic programming for job-shop scheduling},
 year = {2016}
}


text:
package lib

import (
	"errors"
	"syscall"

	"code.cloudfoundry.org/silk/cni/config"
	"code.cloudfoundry.org/silk/cni/lib/fakes"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"github.com/vishvananda/netlink"
)

var _ = Describe("Bandwidth", func() {
	var (
		cfg                *config.Config
		fakeNetlinkAdapter *fakes.NetlinkAdapter
		bandwidth          Bandwidth
		fakeHostDevice     netlink.Link
		fakeIFBDevice      netlink.Link
	)

	BeforeEach(func() {
		fakeHostDevice = &netlink.Bridge{
			LinkAttrs: netlink.LinkAttrs{
				Index: 42,
				Name:  "my-fake-host-device",
			},
		}
		fakeIFBDevice = &netlink.Bridge{
			LinkAttrs: netlink.LinkAttrs{
				Index: 43,
				Name:  "my-fake-host-device",
			},
		}
		fakeNetlinkAdapter = &fakes.NetlinkAdapter{}
		fakeNetlinkAdapter.LinkByNameStub = func(name string) (netlink.Link, error) {
			if name == "host-device" {
				return fakeHostDevice, nil
			} else if name == "ifb-device" {
				return fakeIFBDevice, nil
			}
			return &netlink.Bridge{}, errors.New("invalid")
		}
		bandwidth = Bandwidth{
			NetlinkAdapter: fakeNetlinkAdapter,
		}
		fakeNetlinkAdapter.TickInUsecReturns(15.625)
		cfg = &config.Config{}
		cfg.Host.DeviceName = "host-device"
		cfg.IFB.DeviceName = "ifb-device"
	})

	Describe("InboundSetup", func() {
		It("creates a qdisc tbf", func() {
			Expect(bandwidth.InboundSetup(1400, 1400, cfg)).To(Succeed())

			Expect(fakeNetlinkAdapter.LinkByNameCallCount()).To(Equal(1))
			Expect(fakeNetlinkAdapter.LinkByNameArgsForCall(0)).To(Equal("host-device"))

			Expect(fakeNetlinkAdapter.QdiscAddCallCount()).To(Equal(1))
			Expect(fakeNetlinkAdapter.QdiscAddArgsForCall(0)).To(Equal(&netlink.Tbf{
				QdiscAttrs: netlink.QdiscAttrs{
					LinkIndex: fakeHostDevice.Attrs().Index,
					Handle:    netlink.MakeHandle(1, 0),
					Parent:    netlink.HANDLE_ROOT,
				},
				Rate:   uint64(175),
				Limit:  uint32(1404),
				Buffer: uint32(125000000),
			}))

		})

		Context("when getting the link for the host fails", func() {
			BeforeEach(func() {
				fakeNetlinkAdapter.LinkByNameReturns(nil, errors.New("banana"))
			})
			It("returns a sensible error", func() {
				err := bandwidth.InboundSetup(1400, 1400, cfg)

				Expect(err).To(HaveOccurred())
				Expect(err).To(MatchError("get host device: banana"))
			})
		})

		Context("when creating the qdisc fails", func() {
			BeforeEach(func() {
				fakeNetlinkAdapter.QdiscAddReturns(errors.New("banana"))
			})
			It("returns a sensible error", func() {
				err := bandwidth.InboundSetup(1400, 1400, cfg)

				Expect(err).To(HaveOccurred())
				Expect(err).To(MatchError("create qdisc: banana"))
			})
		})

		Context("when the burst is invalid", func() {
			BeforeEach(func() {
				bandwidth = Bandwidth{
					NetlinkAdapter: fakeNetlinkAdapter,
				}
			})
			It("returns a sensible error", func() {
				err := bandwidth.InboundSetup(1400, 0, cfg)

				Expect(err).To(HaveOccurred())
				Expect(err).To(MatchError("invalid burst: 0"))
			})
		})

		Context("when the rate is invalid", func() {
			BeforeEach(func() {
				bandwidth = Bandwidth{
					NetlinkAdapter: fakeNetlinkAdapter,
				}
			})
			It("returns a sensible error", func() {
				err := bandwidth.InboundSetup(0, 1400, cfg)

				Expect(err).To(HaveOccurred())
				Expect(err).To(MatchError("invalid rate: 0"))
			})
		})
	})

	Describe("OutboundSetup", func() {
		It("attaches the ifb device to the host interface then creates a qdisc tbf", func() {
			Expect(bandwidth.OutboundSetup(1400, 1400, cfg)).To(Succeed())

			Expect(fakeNetlinkAdapter.LinkByNameCallCount()).To(Equal(2))
			Expect(fakeNetlinkAdapter.LinkByNameArgsForCall(0)).To(Equal("ifb-device"))
			Expect(fakeNetlinkAdapter.LinkByNameArgsForCall(1)).To(Equal("host-device"))

			Expect(fakeNetlinkAdapter.QdiscAddCallCount()).To(Equal(2))
			Expect(fakeNetlinkAdapter.QdiscAddArgsForCall(0)).To(Equal(&netlink.Ingress{
				QdiscAttrs: netlink.QdiscAttrs{
					LinkIndex: fakeHostDevice.Attrs().Index,
					Handle:    netlink.MakeHandle(0xffff, 0),
					Parent:    netlink.HANDLE_INGRESS,
				},
			}))
			Expect(fakeNetlinkAdapter.QdiscAddArgsForCall(1)).To(Equal(&netlink.Tbf{
				QdiscAttrs: netlink.QdiscAttrs{
					LinkIndex: fakeIFBDevice.Attrs().Index,
					Handle:    netlink.MakeHandle(1, 0),
					Parent:    netlink.HANDLE_ROOT,
				},
				Rate:   uint64(175),
				Limit:  uint32(1404),
				Buffer: uint32(125000000),
			}))

			Expect(fakeNetlinkAdapter.FilterAddCallCount()).To(Equal(1))
			Expect(fakeNetlinkAdapter.FilterAddArgsForCall(0)).To(Equal(&netlink.U32{
				FilterAttrs: netlink.FilterAttrs{
					LinkIndex: fakeHostDevice.Attrs().Index,
					Handle:    0,
					Parent:    netlink.MakeHandle(0xffff, 0),
					Priority:  1,
					Protocol:  syscall.ETH_P_ALL,
				},
				ClassId:    netlink.MakeHandle(1, 1),
				RedirIndex: 43,
				Actions: []netlink.Action{
					&netlink.MirredAction{
						ActionAttrs:  netlink.ActionAttrs{},
						MirredAction: netlink.TCA_EGRESS_REDIR,
						Ifindex:      fakeIFBDevice.Attrs().Index,
					},
				},
			}))
		})

		Context("when getting the link for the ifb fails", func() {
			BeforeEach(func() {
				fakeNetlinkAdapter.LinkByNameStub = func(name string) (netlink.Link, error) {
					if name == "host-device" {
						return fakeHostDevice, nil
					} else if name == "ifb-device" {
						return &netlink.Bridge{}, errors.New("banana")
					}
					return &netlink.Bridge{}, errors.New("invalid")
				}
			})
			It("returns a sensible error", func() {
				err := bandwidth.OutboundSetup(1400, 1400, cfg)

				Expect(err).To(HaveOccurred())
				Expect(err).To(MatchError("get ifb device: banana"))
			})
		})

		Context("when getting the link for the host fails", func() {
			BeforeEach(func() {
				fakeNetlinkAdapter.LinkByNameStub = func(name string) (netlink.Link, error) {
					if name == "host-device" {
						return &netlink.Bridge{}, errors.New("banana")
					} else if name == "ifb-device" {
						return fakeIFBDevice, nil
					}
					return &netlink.Bridge{}, errors.New("invalid")
				}
			})
			It("returns a sensible error", func() {
				err := bandwidth.OutboundSetup(1400, 1400, cfg)

				Expect(err).To(HaveOccurred())
				Expect(err).To(MatchError("get host device: banana"))
			})
		})

		Context("when creating the ingress qdisc fails", func() {
			BeforeEach(func() {
				fakeNetlinkAdapter.QdiscAddStub = func(qdisc netlink.Qdisc) error {
					if _, ok := qdisc.(*netlink.Ingress); ok {
						return errors.New("banana")
					}
					return nil
				}
			})
			It("returns a sensible error", func() {
				err := bandwidth.OutboundSetup(1400, 1400, cfg)

				Expect(err).To(HaveOccurred())
				Expect(err).To(MatchError("create ingress qdisc: banana"))
			})
		})

		Context("when adding a filter to the host device fails", func() {
			BeforeEach(func() {
				fakeNetlinkAdapter.FilterAddReturns(errors.New("filter-fail"))
			})

			It("returns a sensible error", func() {
				err := bandwidth.OutboundSetup(1400, 1400, cfg)

				Expect(err).To(HaveOccurred())
				Expect(err).To(MatchError("add filter: filter-fail"))
			})
		})

		Context("when the burst is invalid", func() {
			It("returns a sensible error", func() {
				err := bandwidth.OutboundSetup(1400, 0, cfg)

				Expect(err).To(HaveOccurred())
				Expect(err).To(MatchError("create ifb qdisc: invalid burst: 0"))
			})
		})

		Context("when the rate is invalid", func() {
			It("returns a sensible error", func() {
				err := bandwidth.OutboundSetup(0, 1400, cfg)

				Expect(err).To(HaveOccurred())
				Expect(err).To(MatchError("create ifb qdisc: invalid rate: 0"))
			})
		})

		Context("when creating the tbf qdisc fails", func() {
			BeforeEach(func() {
				fakeNetlinkAdapter.QdiscAddStub = func(qdisc netlink.Qdisc) error {
					if _, ok := qdisc.(*netlink.Tbf); ok {
						return errors.New("banana")
					}
					return nil
				}
			})
			It("returns a sensible error", func() {
				err := bandwidth.OutboundSetup(1400, 1400, cfg)

				Expect(err).To(HaveOccurred())
				Expect(err).To(MatchError("create ifb qdisc: create qdisc: banana"))
			})
		})
	})
})

repository: anwarchk/silk

repo_name: anwarchk/silk


text:
@article{naylor2019validation,
 author = {Naylor, Cameron N and Reinecke, Tobias and Ridgeway, Mark E and Park, Melvin A and Clowers, Brian H},
 doi = {10.1007/s13361-019-02289-1},
 journal = {Journal of The American Society for Mass Spectrometry},
 number = {10},
 pages = {2152--2162},
 publisher = {Springer US New York},
 title = {Validation of Calibration Parameters for Trapped Ion Mobility Spectrometry},
 volume = {30},
 year = {2019}
}

repository: bhclowers/academic-clowers

repo_name: bhclowers/academic-clowers


text:
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
// import { axios } from 'axios';

export default class User extends React.Component {
    constructor(props) {
        super();
        this.state = {
            data: []
        }
    }

    componentWillMount() {
        let $this = this;

        axios.get('api/users').then(res => {
            $this.setState({
                data: res.data
            })
        }).catch(err => {
            console.log(err)
        })
    }

    render() {
        return (

Users Listing

                Thêm mới User

                            ID
                            Name
                            Email
                            Action

                        {this.state.data.map((user, index) => (

                                {index}
                                {user.name}
                                {user.email}

                                    Edit
                                    Delete

                        )
                        )}

        )
    }
}
if (document.getElementById('app')) {
    ReactDOM.render(<User />, document.getElementById('app'));
}

repository: chinhqn/laravel-reactjs

repo_name: chinhqn/laravel-reactjs

extension: js


text:
DESCRIPTION = "SPDX 2.0 document creation and storage"
HOMEPAGE = "https://github.com/DoSOCSv2/DoSOCSv2"
SECTION = "devel/python"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"

DEPENDS += "python-docopt-native"
DEPENDS += "python-native"

SRC_URI = "https://github.com/DoSOCSv2/DoSOCSv2/archive/v0.16.1.tar.gz \
           file://0001-setup.py-delete-the-depends-install.patch \
          "

SRC_URI[md5sum] = "ecb3f47eb9f7cdd01f520e7843ef09b1"
SRC_URI[sha256sum] = "868e4c1658bd54546f6f65be9770a80ac98793da3dcb71120a52237b07a1a656"

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

inherit distutils native

DEPENDS += "python-jinja2-native \
            python-native \
            python-psycopg2-native \
            python-docopt-native \
            python-sqlalchemy-native \
            file-native \
            fossology-nomos-native \
            python-markupsafe-native \
            python-magic-native "

python do_dosocs2_init(){
    import os
    import subprocess
    import bb
    import oe.utils
    import string

    bb.note("*********PATH = %s!" % os.getenv('PATH'))
    dosocs2_cmd = bb.utils.which(os.getenv('PATH'), "dosocs2")
    dosocs2_init_cmd = "%s dbinit --no-confirm" % (dosocs2_cmd)
    bb.note(dosocs2_init_cmd)
    try:
        complementary_pkgs = subprocess.check_output(dosocs2_init_cmd,
                                                     stderr=subprocess.STDOUT,
                                                     shell=True)
        return
    except subprocess.CalledProcessError as e:
        bb.fatal("Could not invoke dosocs2 dbinit Command "
                 "'%s' returned %d:\n%s" % (dosocs2_init_cmd, e.returncode, e.output))
}

addtask do_dosocs2_init after do_populate_sysroot

repository: toganlabs/meta-spdxscanner

repo_name: toganlabs/meta-spdxscanner


text:
package msauth_test

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

	"github.com/yaegashi/msgraph.go/msauth"
	"golang.org/x/oauth2"
)

const (
	tenantID       = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
	clientID       = "YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY"
	clientSecret   = "ZZZZZZZZZZZZZZZZZZZZZZZZ"
	username       = "user.name@your-domain.com"
	password       = "secure-password"
	tokenStorePath = "token_store.json"
)

var (
	daScopes = []string{"openid", "profile", "offline_access", "User.Read", "Files.Read"}
	ccScopes = []string{msauth.DefaultMSGraphScope}
)

func ExampleManager_DeviceAuthorizationGrant() {
	ctx := context.Background()
	m := msauth.NewManager()
	m.LoadFile(tokenStorePath)
	ts, err := m.DeviceAuthorizationGrant(ctx, tenantID, clientID, daScopes, nil)
	if err != nil {
		log.Fatal(err)
	}
	err = m.SaveFile(tokenStorePath)
	if err != nil {
		log.Fatal(err)
	}
	httpClient := oauth2.NewClient(ctx, ts)
	res, err := httpClient.Get("https://graph.microsoft.com/v1.0/me")
	if err != nil {
		log.Fatal(err)
	}
	defer res.Body.Close()
	b, err := ioutil.ReadAll(res.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%s\n", string(string(b)))
}

func ExampleManager_ClientCredentialsGrant() {
	ctx := context.Background()
	m := msauth.NewManager()
	ts, err := m.ClientCredentialsGrant(ctx, tenantID, clientID, clientSecret, ccScopes)
	if err != nil {
		log.Fatal(err)
	}
	httpClient := oauth2.NewClient(ctx, ts)
	res, err := httpClient.Get("https://graph.microsoft.com/v1.0/me")
	if err != nil {
		log.Fatal(err)
	}
	defer res.Body.Close()
	b, err := ioutil.ReadAll(res.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%s\n", string(string(b)))
}

func ExampleManager_ResourceOwnerPasswordGrant() {
	ctx := context.Background()
	m := msauth.NewManager()
	ts, err := m.ResourceOwnerPasswordGrant(ctx, tenantID, clientID, clientSecret, username, password, ccScopes)
	if err != nil {
		log.Fatal(err)
	}
	httpClient := oauth2.NewClient(ctx, ts)
	res, err := httpClient.Get("https://graph.microsoft.com/v1.0/me")
	if err != nil {
		log.Fatal(err)
	}
	defer res.Body.Close()
	b, err := ioutil.ReadAll(res.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%s\n", string(string(b)))
}


text:
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

//go:build !linux
// +build !linux

package cpuscraper // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/cpuscraper"

import (
	"github.com/shirou/gopsutil/v3/cpu"
	"go.opentelemetry.io/collector/pdata/pcommon"

	"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/internal/metadata"
	"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/ucal"
)

func (s *scraper) recordCPUTimeStateDataPoints(now pcommon.Timestamp, cpuTime cpu.TimesStat) {
	s.mb.RecordSystemCPUTimeDataPoint(now, cpuTime.User, cpuTime.CPU, metadata.AttributeStateUser)
	s.mb.RecordSystemCPUTimeDataPoint(now, cpuTime.System, cpuTime.CPU, metadata.AttributeStateSystem)
	s.mb.RecordSystemCPUTimeDataPoint(now, cpuTime.Idle, cpuTime.CPU, metadata.AttributeStateIdle)
	s.mb.RecordSystemCPUTimeDataPoint(now, cpuTime.Irq, cpuTime.CPU, metadata.AttributeStateInterrupt)
}

func (s *scraper) recordCPUUtilization(now pcommon.Timestamp, cpuUtilization ucal.CPUUtilization) {
	s.mb.RecordSystemCPUUtilizationDataPoint(now, cpuUtilization.User, cpuUtilization.CPU, metadata.AttributeStateUser)
	s.mb.RecordSystemCPUUtilizationDataPoint(now, cpuUtilization.System, cpuUtilization.CPU, metadata.AttributeStateSystem)
	s.mb.RecordSystemCPUUtilizationDataPoint(now, cpuUtilization.Idle, cpuUtilization.CPU, metadata.AttributeStateIdle)
	s.mb.RecordSystemCPUUtilizationDataPoint(now, cpuUtilization.Irq, cpuUtilization.CPU, metadata.AttributeStateInterrupt)
}


text:
package main

import (
	"bufio"
	"fmt"
	"log"
	"os"
)

func pow3(a int) int {
	ret := 1
	for i := 0; i < a; i++ {
		ret *= 3
	}
	return ret
}

func ugly(j int, n []int) bool {
	var (
		k  int
		s  int64
		c  = int64(n[0])
		cj = j
		p  = true
	)
	for k < len(n)-1 {
		ops := cj % 3
		cj /= 3
		if ops == 0 {
			c *= 10
		} else {
			if p {
				s += c
				if ops == 1 {
					p = false
				}
			} else {
				s -= c
				if ops == 2 {
					p = true
				}
			}
			c = 0
		}
		k++
		c += int64(n[k])
	}
	if p {
		s += c
	} else {
		s -= c
	}
	if s%2 == 0 || s%3 == 0 || s%5 == 0 || s%7 == 0 {
		return true
	}
	return false
}

func main() {
	data, err := os.Open(os.Args[1])
	if err != nil {
		log.Fatal(err)
	}
	defer data.Close()
	scanner := bufio.NewScanner(data)
	for scanner.Scan() {
		var (
			u int
			t []int
		)
		for _, i := range scanner.Text() {
			t = append(t, int(i-'0'))
		}
		p := pow3(len(t) - 1)
		for j := 0; j < p; j++ {
			if ugly(j, t) {
				u++
			}
		}
		fmt.Println(u)
	}
}

repository: rajlath/ce-challenges

repo_name: rajlath/ce-challenges


text:
SUMMARY = "original package"
SECTION = "applications"
LICENSE = "CLOSED"

#You should set your task source base path
FILESEXTRAPATHS_prepend := "${THISDIR}:"

SRC_PATH = "tasks"

SRC_URI = "file://${SRC_PATH}"

DEPENDS += " itron4posix"

#example
APP_BIN = "/usr/local/bin"
APP_LIB = "/usr/local/lib"

FILES_${PN} += "${APP_BIN}/*"
FILES_${PN} += "${APP_LIB}/*.so*"
FILES_${PN}-staticdev += "${APP_LIB}/*.a"

S = "${WORKDIR}/${SRC_PATH}"
TARGET_CC_ARCH += "${LDFLAGS}"


text:
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: bidirectionalstream.proto

package bidirectionalstream

import (
	context "context"
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	helloworld "golang-grpc/server/src/infrastructure/grpc/gproto/helloworld"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	math "math"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package

func init() { proto.RegisterFile("bidirectionalstream.proto", fileDescriptor_af3cb433a1aacd19) }

var fileDescriptor_af3cb433a1aacd19 = []byte{
	// 176 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x8e, 0xbd, 0xaa, 0xc2, 0x40,
	0x10, 0x46, 0x6f, 0x9a, 0x8b, 0xa4, 0x92, 0x08, 0xfe, 0xa4, 0xb4, 0xb2, 0x31, 0x2b, 0xfa, 0x06,
	0x01, 0xd1, 0xda, 0x58, 0x09, 0x16, 0x9b, 0xcd, 0xb8, 0x2e, 0xac, 0x99, 0x38, 0x33, 0x51, 0xf2,
	0xf6, 0xe2, 0xda, 0xa4, 0x48, 0xfb, 0x9d, 0xf3, 0xc1, 0x89, 0x17, 0xa5, 0xab, 0x1c, 0x81, 0x11,
	0x87, 0xb5, 0xf6, 0x2c, 0x04, 0xfa, 0x91, 0x35, 0x84, 0x82, 0xc9, 0x64, 0x00, 0xa5, 0xe3, 0x3b,
	0x78, 0x8f, 0x6f, 0x24, 0x5f, 0xfd, 0xb4, 0xed, 0x35, 0x9e, 0xe5, 0x7d, 0xb1, 0x08, 0xe2, 0x19,
	0x58, 0x92, 0x3c, 0x1e, 0x15, 0xba, 0x3b, 0x7e, 0x1f, 0xc9, 0x3c, 0xeb, 0x3d, 0xc3, 0x74, 0x82,
	0x67, 0x0b, 0x2c, 0xe9, 0x74, 0x80, 0x34, 0xbe, 0x5b, 0xfe, 0xad, 0xa2, 0x4d, 0x94, 0x1f, 0x2e,
	0x7b, 0x8b, 0x5e, 0xd7, 0x76, 0x6d, 0xa9, 0x31, 0x8a, 0x81, 0x5e, 0x40, 0x8a, 0xc9, 0x28, 0x57,
	0xdf, 0x48, 0xb3, 0x50, 0x6b, 0xa4, 0x25, 0x50, 0x01, 0xdb, 0xd0, 0xa4, 0x06, 0xca, 0xcb, 0xff,
	0x80, 0x76, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x7e, 0x03, 0x82, 0xf2, 0x00, 0x00, 0x00,
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// BidirectionalStreamTestClient is the client API for BidirectionalStreamTest service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type BidirectionalStreamTestClient interface {
	SayHello(ctx context.Context, opts ...grpc.CallOption) (BidirectionalStreamTest_SayHelloClient, error)
}

type bidirectionalStreamTestClient struct {
	cc *grpc.ClientConn
}

func NewBidirectionalStreamTestClient(cc *grpc.ClientConn) BidirectionalStreamTestClient {
	return &bidirectionalStreamTestClient{cc}
}

func (c *bidirectionalStreamTestClient) SayHello(ctx context.Context, opts ...grpc.CallOption) (BidirectionalStreamTest_SayHelloClient, error) {
	stream, err := c.cc.NewStream(ctx, &_BidirectionalStreamTest_serviceDesc.Streams[0], "/bidirectionalstream.BidirectionalStreamTest/SayHello", opts...)
	if err != nil {
		return nil, err
	}
	x := &bidirectionalStreamTestSayHelloClient{stream}
	return x, nil
}

type BidirectionalStreamTest_SayHelloClient interface {
	Send(*helloworld.HelloRequest) error
	Recv() (*helloworld.HelloReply, error)
	grpc.ClientStream
}

type bidirectionalStreamTestSayHelloClient struct {
	grpc.ClientStream
}

func (x *bidirectionalStreamTestSayHelloClient) Send(m *helloworld.HelloRequest) error {
	return x.ClientStream.SendMsg(m)
}

func (x *bidirectionalStreamTestSayHelloClient) Recv() (*helloworld.HelloReply, error) {
	m := new(helloworld.HelloReply)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

// BidirectionalStreamTestServer is the server API for BidirectionalStreamTest service.
type BidirectionalStreamTestServer interface {
	SayHello(BidirectionalStreamTest_SayHelloServer) error
}

// UnimplementedBidirectionalStreamTestServer can be embedded to have forward compatible implementations.
type UnimplementedBidirectionalStreamTestServer struct {
}

func (*UnimplementedBidirectionalStreamTestServer) SayHello(srv BidirectionalStreamTest_SayHelloServer) error {
	return status.Errorf(codes.Unimplemented, "method SayHello not implemented")
}

func RegisterBidirectionalStreamTestServer(s *grpc.Server, srv BidirectionalStreamTestServer) {
	s.RegisterService(&_BidirectionalStreamTest_serviceDesc, srv)
}

func _BidirectionalStreamTest_SayHello_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(BidirectionalStreamTestServer).SayHello(&bidirectionalStreamTestSayHelloServer{stream})
}

type BidirectionalStreamTest_SayHelloServer interface {
	Send(*helloworld.HelloReply) error
	Recv() (*helloworld.HelloRequest, error)
	grpc.ServerStream
}

type bidirectionalStreamTestSayHelloServer struct {
	grpc.ServerStream
}

func (x *bidirectionalStreamTestSayHelloServer) Send(m *helloworld.HelloReply) error {
	return x.ServerStream.SendMsg(m)
}

func (x *bidirectionalStreamTestSayHelloServer) Recv() (*helloworld.HelloRequest, error) {
	m := new(helloworld.HelloRequest)
	if err := x.ServerStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

var _BidirectionalStreamTest_serviceDesc = grpc.ServiceDesc{
	ServiceName: "bidirectionalstream.BidirectionalStreamTest",
	HandlerType: (*BidirectionalStreamTestServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SayHello",
			Handler:       _BidirectionalStreamTest_SayHello_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "bidirectionalstream.proto",
}

repository: daijinload/golang-grpc

repo_name: daijinload/golang-grpc


text:
@article{Zippel:2017,
 author = {S. Zippel and J. Thomson},
 bdsk-url-1 = {http://dx.doi.org/10.1002/2016JC012498},
 date-added = {2021-08-19 20:58:02 -0400},
 date-modified = {2021-08-19 20:58:02 -0400},
 doi = {10.1002/2016JC012498},
 journal = {J. Geophys. Res. Oceans},
 pages = {3311--3328},
 title = {Surface wave breaking over sheared currents: Observations from the Mouth of the Columbia River},
 volume = {122},
 year = {2017}
}

repository: zippelsf/academic-kickstart

repo_name: zippelsf/academic-kickstart


text:
package sorter

// BubbleSort is popular but inefficient sorting algorithm
// it swaps adjacent elements by repeatedly
func BubbleSort(arr []int) []int {
	for i := 0; i < len(arr)-1; i++ {
		for j := len(arr) - 1; j > i; j-- {
			if arr[j] < arr[j-1] {
				arr[j], arr[j-1] = arr[j-1], arr[j]
			}
		}
	}

	return arr
}

repository: mehmetalisavas/sorter

repo_name: mehmetalisavas/sorter


text:
SUMMARY = "Microchip Polarfire SoC Hart Software Services (HSS) Payload Generator"
DESCRIPTION = "HSS requires U-Boot to be packaged with header details applied with hss payload generator"

LICENSE = "MIT & BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=2dc9e752dd76827e3a4eebfd5b3c6226"

# Strict dependency
do_configure[depends] += "u-boot-mpfs:do_deploy mpfs-amp-examples:do_deploy"

DEPENDS += "elfutils-native libyaml-native"

PV = "1.0+git${SRCPV}"
BRANCH = "master"
SRCREV="58b03943834fe34991dc5fa924436b3620e07aa5"
SRC_URI = "git://github.com/polarfire-soc/hart-software-services.git;branch=${BRANCH} \
           file://${HSS_PAYLOAD}.yaml \
          "
S = "${WORKDIR}/git"

# NOTE: Only using the Payload generator from the HSS
do_configure:icicle-kit-es () {
	## taking U-Boot binary and package for HSS
	cp -f ${DEPLOY_DIR_IMAGE}/u-boot.bin ${WORKDIR}/git/
	cp -f ${WORKDIR}/${HSS_PAYLOAD}.yaml ${WORKDIR}/git/tools/hss-payload-generator/
}

# NOTE: Only using the Payload generator from the HSS
do_configure:icicle-kit-es-amp () {
	## taking U-Boot binary and package for HSS
	cp -f ${DEPLOY_DIR_IMAGE}/u-boot.bin ${WORKDIR}/git/
   cp -L ${DEPLOY_DIR_IMAGE}/amp-application.elf ${WORKDIR}/git/
	cp -f ${WORKDIR}/${HSS_PAYLOAD}.yaml ${WORKDIR}/git/tools/hss-payload-generator/
}

EXTRA_OEMAKE = "CC='${BUILD_CC}' CFLAGS='${BUILD_CFLAGS}' LDFLAGS='${BUILD_LDFLAGS}'"
do_compile () {
    ## Adding u-boot as a payload
    ## Using hss-payload-generator application
    oe_runmake -C ${S}/tools/hss-payload-generator
    ${S}/tools/hss-payload-generator/hss-payload-generator -c ${S}/tools/hss-payload-generator/${HSS_PAYLOAD}.yaml -v payload.bin
}

do_install() {
   :
}

do_deploy() {
   install -d ${DEPLOY_DIR_IMAGE}
   install -m 755 ${S}/payload.bin ${DEPLOY_DIR_IMAGE}/
}

addtask deploy after do_install

license: MIT,ISC

repository: rpcme/meta-polarfire-soc-yocto-bsp

detected_licenses: MIT ISC

repo_name: rpcme/meta-polarfire-soc-yocto-bsp


text:
package main

import (
	rl "github.com/gen2brain/raylib-go/raylib"
)

func main() {
	rl.InitWindow(800, 450, "raylib [core] example - 3d camera free")

	camera := rl.Camera3D{}
	camera.Position = rl.NewVector3(10.0, 10.0, 10.0)
	camera.Target = rl.NewVector3(0.0, 0.0, 0.0)
	camera.Up = rl.NewVector3(0.0, 1.0, 0.0)
	camera.Fovy = 45.0
	camera.Projection = rl.CameraPerspective

	cubePosition := rl.NewVector3(0.0, 0.0, 0.0)

	rl.SetTargetFPS(60)

	for !rl.WindowShouldClose() {
		rl.UpdateCamera(&camera, rl.CameraFree) // Update camera with free camera mode

		if rl.IsKeyDown(rl.KeyZ) {
			camera.Target = rl.NewVector3(0.0, 0.0, 0.0)
		}

		rl.BeginDrawing()

		rl.ClearBackground(rl.RayWhite)

		rl.BeginMode3D(camera)

		rl.DrawCube(cubePosition, 2.0, 2.0, 2.0, rl.Red)
		rl.DrawCubeWires(cubePosition, 2.0, 2.0, 2.0, rl.Maroon)

		rl.DrawGrid(10, 1.0)

		rl.EndMode3D()

		rl.DrawRectangle(10, 10, 320, 133, rl.Fade(rl.SkyBlue, 0.5))
		rl.DrawRectangleLines(10, 10, 320, 133, rl.Blue)

		rl.DrawText("Free camera default controls:", 20, 20, 10, rl.Black)
		rl.DrawText("- Mouse Wheel to Zoom in-out", 40, 40, 10, rl.DarkGray)
		rl.DrawText("- Mouse Wheel Pressed to Pan", 40, 60, 10, rl.DarkGray)
		rl.DrawText("- Alt + Mouse Wheel Pressed to Rotate", 40, 80, 10, rl.DarkGray)
		rl.DrawText("- Alt + Ctrl + Mouse Wheel Pressed for Smooth Zoom", 40, 100, 10, rl.DarkGray)
		rl.DrawText("- Z to zoom to (0, 0, 0)", 40, 120, 10, rl.DarkGray)

		rl.EndDrawing()
	}

	rl.CloseWindow()
}

license: Zlib

gha_license_id: Zlib

gha_language: C


text:
/*
Copyright 2018 FairwindsOps Inc.

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

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

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

package main

import (
	"flag"
	"net/http"
	"os"

	"github.com/prometheus/client_golang/prometheus/promhttp"
	"github.com/sirupsen/logrus"
	_ "k8s.io/client-go/plugin/pkg/client/auth"
	"k8s.io/klog"
	"sigs.k8s.io/controller-runtime/pkg/client/config"
	"sigs.k8s.io/controller-runtime/pkg/manager"
	"sigs.k8s.io/controller-runtime/pkg/manager/signals"

	"github.com/fairwindsops/rbac-manager/pkg/apis"
	"github.com/fairwindsops/rbac-manager/pkg/controller"
	"github.com/fairwindsops/rbac-manager/pkg/metrics"
	"github.com/fairwindsops/rbac-manager/pkg/watcher"
	"github.com/fairwindsops/rbac-manager/version"
)

var logLevel = flag.String("log-level", logrus.InfoLevel.String(), "Logrus log level")
var addr = flag.String("metrics-address", ":8042", "The address to serve prometheus metrics.")

func init() {
	klog.InitFlags(nil)
}

func main() {
	flag.Parse()

	parsedLevel, err := logrus.ParseLevel(*logLevel)
	if err != nil {
		// This should theoretically never happen
		logrus.Errorf("log-level flag has invalid value %s", *logLevel)
	} else {
		logrus.SetLevel(parsedLevel)
	}

	logrus.Info("----------------------------------")
	logrus.Infof("rbac-manager %v running", version.Version)
	logrus.Info("----------------------------------")

	// Get a config to talk to the apiserver
	logrus.Debug("Setting up client for manager")
	cfg, err := config.GetConfig()
	if err != nil {
		logrus.Error(err, ": unable to set up client config")
		os.Exit(1)
	}

	// Create a new Cmd to provide shared dependencies and start components
	logrus.Debug("Setting up manager")
	mgr, err := manager.New(cfg, manager.Options{})
	if err != nil {
		logrus.Error(err, ": unable to set up overall controller manager")
		os.Exit(1)
	}

	logrus.Info("Registering components")

	// Setup Scheme for all resources
	logrus.Debug("Setting up scheme")
	if err := apis.AddToScheme(mgr.GetScheme()); err != nil {
		logrus.Error(err, ": unable add APIs to scheme")
		os.Exit(1)
	}

	// Setup all Controllers
	logrus.Debug("Setting up controller")
	if err := controller.Add(mgr); err != nil {
		logrus.Error(err, ": unable to register controller to the manager")
		os.Exit(1)
	}

	// Watch Related Resources
	logrus.Info("Watching resources related to RBAC Definitions")
	watcher.WatchRelatedResources()

	// Start metrics endpoint
	go func() {
		metrics.RegisterMetrics()
		http.Handle("/metrics", promhttp.Handler())
		if err := http.ListenAndServe(*addr, nil); err != nil {
			logrus.Error(err, ": unable to serve the metrics endpoint")
			os.Exit(1)
		}
	}()

	// Start the Cmd
	logrus.Info("Watching RBAC Definitions")
	if err := mgr.Start(signals.SetupSignalHandler()); err != nil {
		logrus.Error(err, ": unable to run the manager")
		os.Exit(1)
	}
}

repository: oxyno-zeta/rbac-manager

repo_name: oxyno-zeta/rbac-manager


text:
package main

import (
	"github.com/kingname/cgantt/task"
	"github.com/kingname/cgantt/utils"
	"fmt"
	"os"
	"time"
	"encoding/json"
	"io/ioutil"
)

func ParseJson(jsonStr string) []*task.ConfigedTask{
	t := []*task.ConfigedTask{}
	err := json.Unmarshal([]byte(jsonStr), &t)
	if nil != err{
		panic(err)
	}
	return t
}

func ReadAgenda() []*task.ConfigedTask {
	_, err := os.Stat("Agenda.json")
	if nil == err{
		jsonStr, err := ioutil.ReadFile("Agenda.json")
		if nil != err{
			panic(err)
		}
		return ParseJson(string(jsonStr))
	}
	return nil
}

func main() {
	width := utils.GetCurrentTerminalWidth()
	if width <= 0 {
		width = 100
	}
	fmt.Println("当前终端窗口宽度：", width)
	line1 := task.Line{"-", 10, "", 0, "=", 10}
	line2 := task.Line{"-", 11, "", 0, "=", 9}
	line3 := task.Line{"-", 8, "", 0, "=", 12}
	line4 := task.Line{"-", 3, "", 0, "=", 17}
	line5 := task.Line{"-", 2, "", 0, "=", 18}
	line6 := task.Line{"-", 7, "", 0, "=", 13}
	line7 := task.Line{"-", 7, "", 0, "=", 13}
	task1 := task.Task{"task1", line1, time.Date(2018,1,6, 0, 0, 0,0, time.UTC), time.Date(2018,1,20, 0, 0, 0, 0, time.UTC)}
	task2 := task.Task{"task2", line2, time.Date(2018,1,12, 0, 0, 0,0, time.UTC), time.Date(2018,1,16, 0, 0, 0, 0, time.UTC)}
	task3 := task.Task{"task3", line3,time.Date(2018,1,13, 0, 0, 0,0, time.UTC), time.Date(2018,1,18, 0, 0, 0, 0, time.UTC)}
	task4 := task.Task{"taskasdfasdfasdfsafasdf", line4,time.Date(2018,1,6, 0, 0, 0,0, time.UTC), time.Date(2018,1,17, 0, 0, 0, 0, time.UTC)}
	task5 := task.Task{"task5", line5,time.Date(2018,1,7, 0, 0, 0,0, time.UTC), time.Date(2018,1,9, 0, 0, 0, 0, time.UTC)}
	task6 := task.Task{"task6", line6,time.Date(2018,1,17, 0, 0, 0,0, time.UTC), time.Date(2018,1,21, 0, 0, 0, 0, time.UTC)}
	task7 := task.Task{"task7", line7,time.Date(2018,1,20, 0, 0, 0,0, time.UTC), time.Date(2018,1,21, 0, 0, 0, 0, time.UTC)}
	var taskArray []task.Task
	taskArray = append(taskArray, task1)
	taskArray = append(taskArray, task2)
	taskArray = append(taskArray, task3)
	taskArray = append(taskArray, task4)
	taskArray = append(taskArray, task5)
	taskArray = append(taskArray, task6)
	taskArray = append(taskArray, task7)
	output := task.DrawTaskArray(taskArray)
	fmt.Println(task.DrawLine(task.Line{"*", 33, "", 0, "", 0}))
	for _, line := range output{
		fmt.Println(line)
	}
	fmt.Println(task.DrawLine(task.Line{"*", 33, "", 0, "", 0}))
}

repository: kingname/cgantt

repo_name: kingname/cgantt