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

package slider

import (
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
	"testing"
)

func TestLoopOptsFromURL(t *testing.T) {
	NoProductDownload = true
	var TestURI = "https://rammb-slider.cira.colostate.edu/?sat=himawari&sec=full_disk&x=11008&y=11008&z=0&angle=0&im=12&ts=1&st=0&et=0&speed=130&motion=loop&maps%5Bborders%5D=off&maps%5Bstates%5D=white&maps%5Bcities%5D=white&mops%5Bstates%5D=0.2&lat=0&p%5B0%5D=geocolor&opacity%5B0%5D=1&pause=20210408211114&slider=-1&hide_controls=0&mouse_draw=0&follow_feature=0&follow_hide=0&s=rammb-slider"
	got, err := LoopOptsFromURL(TestURI)
	require.NoError(t, err)
	assert.Equal(t, "himawari", got.Satellite.ID(), "Incorrect satellite")
	assert.Equal(t, "full-disk", got.Sector.ID(), "Incorrect sector")
	assert.Equal(t, "geocolor", got.Product.ID(), "Incorrect product")
	assert.Equal(t, ForwardLoop, got.Loop, "Incorrect loop style")
	assert.Equal(t, float64(0), got.Angle, "Incorrect angle")
	assert.Equal(t, 12, got.NumberOfImages, "Incorrect number of images")
	assert.Equal(t, 13, got.Speed, "Incorrect speed")
	assert.Equal(t, 0, got.ZoomLevel, "Incorrect zoom")
	assert.Zero(t, got.BeginTime, "Incorrect end time")
	assert.Zero(t, got.EndTime, "Incorrect end time")
}

repository: everdaniel/SLIDER-cli

repo_name: everdaniel/SLIDER-cli


text:
package currency

import (
	"errors"
	"net/http"
	"strconv"

	"github.com/factly/mande-server/model"
	"github.com/factly/x/errorx"
	"github.com/factly/x/loggerx"
	"github.com/factly/x/renderx"
	"github.com/go-chi/chi"
)

// delete - Delete currency by id
// @Summary Delete a currency
// @Description Delete currency by ID
// @Tags Currency
// @ID delete-currency-by-id
// @Consume  json
// @Param X-User header string true "User ID"
// @Param X-Organisation header string true "Organisation ID"
// @Param currency_id path string true "Currency ID"
// @Success 200
// @Failure 400 {array} string
// @Router /currencies/{currency_id} [delete]
func delete(w http.ResponseWriter, r *http.Request) {
	currencyID := chi.URLParam(r, "currency_id")
	id, err := strconv.Atoi(currencyID)
	if err != nil {
		loggerx.Error(err)
		errorx.Render(w, errorx.Parser(errorx.InvalidID()))
		return
	}

	result := &model.Currency{}
	result.ID = uint(id)

	// check record exists or not
	err = model.DB.First(&result).Error
	if err != nil {
		loggerx.Error(err)
		errorx.Render(w, errorx.Parser(errorx.RecordNotFound()))
		return
	}

	// check if currency is associated with payment
	var totAssociated int64
	model.DB.Model(&model.Payment{}).Where(&model.Payment{
		CurrencyID: uint(id),
	}).Count(&totAssociated)

	if totAssociated != 0 {
		loggerx.Error(errors.New("currency is associated with payment"))
		errorx.Render(w, errorx.Parser(errorx.CannotSaveChanges()))
		return
	}

	// check if currency is associated with product
	model.DB.Model(&model.Product{}).Where(&model.Product{
		CurrencyID: uint(id),
	}).Count(&totAssociated)

	if totAssociated != 0 {
		loggerx.Error(errors.New("currency is associated with product"))
		errorx.Render(w, errorx.Parser(errorx.CannotSaveChanges()))
		return
	}

	// check if currency is associated with dataset
	model.DB.Model(&model.Dataset{}).Where(&model.Dataset{
		CurrencyID: uint(id),
	}).Count(&totAssociated)

	if totAssociated != 0 {
		loggerx.Error(errors.New("currency is associated with dataset"))
		errorx.Render(w, errorx.Parser(errorx.CannotSaveChanges()))
		return
	}

	model.DB.Delete(&result)

	renderx.JSON(w, http.StatusOK, nil)
}

license: MIT

repository: factly/mande-server

license_type: permissive

repo_name: factly/mande-server

branch_name: refs/heads/develop

gha_license_id: MIT

gha_language: Go

extension: go


text:
add_library(Qt5::QGeoServiceProviderFactoryNokia MODULE IMPORTED)

_populate_Location_plugin_properties(QGeoServiceProviderFactoryNokia RELEASE "geoservices/qtgeoservices_nokia.dll")
_populate_Location_plugin_properties(QGeoServiceProviderFactoryNokia DEBUG "geoservices/qtgeoservices_nokiad.dll")

list(APPEND Qt5Location_PLUGINS Qt5::QGeoServiceProviderFactoryNokia)

repository: timi-liuliang/echo

repo_name: timi-liuliang/echo

branch_name: refs/heads/master

extension: cmake


text:
require xorg-lib-common.inc
DESCRIPTION = "X Damage extension library."
LICENSE = "BSD-X"
DEPENDS += " virtual/libx11 damageproto libxfixes fixesproto xextproto"
PE = "1"
PR = "${INC_PR}.0"

SRC_URI[archive.md5sum] = "4d0eece7a8372a7754db1de08c2be324"
SRC_URI[archive.sha256sum] = "5df90f0efa77e1d6f9e1768a2b0adfc896d09c7a3d8680ed0980511b3625c636"

XORG_PN = "libXdamage"

repository: trini/openembedded

repo_name: trini/openembedded

extension: bb


text:
// Copyright 2015 Alex Browne.  All rights reserved.
// Use of this source code is governed by the MIT
// license, which can be found in the LICENSE file.

package jobs

import ()

// configType holds different config variables
type configType struct {
	Db databaseConfig
}

// databaseConfig holds config variables specific to the database
type databaseConfig struct {
	Address  string
	Network  string
	Database int
	Password string
}

// Config is where all configuration variables are stored. You may modify Config
// directly in order to change config variables, and should only do so at the start
// of your program.
var Config = configType{
	Db: databaseConfig{
		// Address is the address of the redis database to connect to. Default is
		// "localhost:6379".
		Address: "localhost:6379",
		// Network is the type of network to use to connect to the redis database
		// Default is "tcp".
		Network: "tcp",
		// Database is the redis database number to use for storing all data. Default
		// is 0.
		Database: 0,
		// Password is a password to use for connecting to a redis database via the
		// AUTH command. If empty, Jobs will not attempt to authenticate. Default is
		// "" (an empty string).
		Password: "",
	},
}

repository: chenmingqiang/jobs

repo_name: chenmingqiang/jobs


text:
DESCRIPTION = "TI Texture streaming using bufferclass API demo (spinning video cube)"
LICENSE = "TI-BSD/GPLv2"
DEPENDS = "virtual/egl"
require recipes/egl/egl.inc

SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/apps_processors/OMAP35x_AM35x_Video_Texture_Streaming/1_0/exports/bc-cat-${PV}.tar.gz \
           file://bc-cat-0.1.0-BC_PIX_FMT_.patch;striplevel=0"

S = "${WORKDIR}/bc-cat-${PV}"

CFLAGS += " -DLINUX -I../include -I${STAGING_INCDIR}/services4/3rdparty/bufferclass_ti/ -I${STAGING_INCDIR}/include4"
LDFLAGS += "-lGLES_CM -lEGL"

do_configure() {
	cd test
	sed -i -e s:pixel_fmt:fourcc:g *.c
}

# build both fb and x11 version
do_compile() {
	cd test
	oe_runmake -e clean
	oe_runmake -e
	mv gles1_bc_mmap gles1_bc_mmap-fb
	mv gles1_bc_webcam gles1_bc_webcam-fb

	oe_runmake -e clean
	CFLAGS="${CFLAGS} -DX11" oe_runmake -e X11BUILD=1
 	mv gles1_bc_mmap gles1_bc_mmap-x11
	mv gles1_bc_webcam gles1_bc_webcam-x11

}

do_install() {
	install -d ${D}${bindir}
	install -m 0755 ${S}/test/gles1_bc_mmap-* ${D}${bindir}
	install -m 0755 ${S}/test/gles1_bc_webcam-* ${D}${bindir}
}

PACKAGES =+ "${PN}-fb ${PN}-x11"
FILES_${PN}-x11 = "${bindir}/*x11"
FILES_${PN}-fb = "${bindir}/*fb"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD


text:
@article{Sun-2022-Quantifying,
    title = "Quantifying the Human Influence on the Intensity of Extreme 1- and 5-Day Precipitation Amounts at Global, Continental, and Regional Scales",
    author = "Sun, Qiaohong  and
      Zwiers, Francis  and
      Zhang, Xuebin  and
      Yan, Jun",
    journal = "Journal of Climate, Volume 35, Issue 1",
    volume = "35",
    number = "1",
    year = "2022",
    publisher = "American Meteorological Society",
    url = "https://aclanthology.org/G22-1001",
    doi = "10.1175/jcli-d-21-0028.1",
    pages = "195--210",
}

repository: gwf-uwaterloo/gwf-publications

repo_name: gwf-uwaterloo/gwf-publications

branch_name: refs/heads/main

gha_language: Python

extension: bib


text:
#
# Recipe describing the compilation of
# LibArtNet library
#

DESCRIPTION = "LibArtNet"
SECTION = "libs"
DEPENDS = ""
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"

BB_STRICT_CHECKSUM = "0"
BBCLASSEXTENDS = "nativesdk"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"

SRCREV = "713efee8b0d9dfd19d5267fca0685810e093c2fa"
SRC_URI = "git://github.com/OpenLightingProject/libartnet.git;protocol=http"
S = "${WORKDIR}/git"
inherit autotools
EXTRA_OECONF = "ac_cv_func_malloc_0_nonnull=yes  ac_cv_func_realloc_0_nonnull=yes"

repository: ClementViel/meta-mecaoctet

repo_name: ClementViel/meta-mecaoctet


text:
@proceedings{ws-2015-events,
    title = "Proceedings of the The 3rd Workshop on {EVENTS}: Definition, Detection, Coreference, and Representation",
    editor = "Hovy, Eduard  and
      Mitamura, Teruko  and
      Palmer, Martha",
    month = jun,
    year = "2015",
    address = "Denver, Colorado",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W15-0800",
    doi = "10.3115/v1/W15-08",
}
@inproceedings{cybulska-vossen-2015-translating,
    title = "Translating Granularity of Event Slots into Features for Event Coreference Resolution.",
    author = "Cybulska, Agata  and
      Vossen, Piek",
    booktitle = "Proceedings of the The 3rd Workshop on {EVENTS}: Definition, Detection, Coreference, and Representation",
    month = jun,
    year = "2015",
    address = "Denver, Colorado",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W15-0801",
    doi = "10.3115/v1/W15-0801",
    pages = "1--10",
}
@inproceedings{fauceglia-etal-2015-word,
    title = "Word Sense Disambiguation via {P}rop{S}tore and {O}nto{N}otes for Event Mention Detection",
    author = "Fauceglia, Nicolas R.  and
      Lin, Yiu-Chang  and
      Ma, Xuezhe  and
      Hovy, Eduard",
    booktitle = "Proceedings of the The 3rd Workshop on {EVENTS}: Definition, Detection, Coreference, and Representation",
    month = jun,
    year = "2015",
    address = "Denver, Colorado",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W15-0802",
    doi = "10.3115/v1/W15-0802",
    pages = "11--15",
}
@inproceedings{feltracco-etal-2015-opposition,
    title = "Opposition Relations among Verb Frames",
    author = "Feltracco, Anna  and
      Jezek, Elisabetta  and
      Magnini, Bernardo",
    booktitle = "Proceedings of the The 3rd Workshop on {EVENTS}: Definition, Detection, Coreference, and Representation",
    month = jun,
    year = "2015",
    address = "Denver, Colorado",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W15-0803",
    doi = "10.3115/v1/W15-0803",
    pages = "16--24",
}
@inproceedings{hautli-janisz-etal-2015-encoding,
    title = "Encoding event structure in {U}rdu/{H}indi {V}erb{N}et",
    author = "Hautli-Janisz, Annette  and
      King, Tracy Holloway  and
      Ramchand, Gilian",
    booktitle = "Proceedings of the The 3rd Workshop on {EVENTS}: Definition, Detection, Coreference, and Representation",
    month = jun,
    year = "2015",
    address = "Denver, Colorado",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W15-0804",
    doi = "10.3115/v1/W15-0804",
    pages = "25--33",
}
@inproceedings{keane-etal-2015-using,
    title = "Using Topic Modeling and Similarity Thresholds to Detect Events",
    author = "Keane, Nathan  and
      Yee, Connie  and
      Zhou, Liang",
    booktitle = "Proceedings of the The 3rd Workshop on {EVENTS}: Definition, Detection, Coreference, and Representation",
    month = jun,
    year = "2015",
    address = "Denver, Colorado",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W15-0805",
    doi = "10.3115/v1/W15-0805",
    pages = "34--42",
}
@inproceedings{li-girju-2015-detecting,
    title = "Detecting Causally Embedded Structures Using an Evolutionary Algorithm",
    author = "Li, Chen  and
      Girju, Roxana",
    booktitle = "Proceedings of the The 3rd Workshop on {EVENTS}: Definition, Detection, Coreference, and Representation",
    month = jun,
    year = "2015",
    address = "Denver, Colorado",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W15-0806",
    doi = "10.3115/v1/W15-0806",
    pages = "43--52",
}
@inproceedings{liu-etal-2015-evaluation,
    title = "Evaluation Algorithms for Event Nugget Detection : A Pilot Study",
    author = "Liu, Zhengzhong  and
      Mitamura, Teruko  and
      Hovy, Eduard",
    booktitle = "Proceedings of the The 3rd Workshop on {EVENTS}: Definition, Detection, Coreference, and Representation",
    month = jun,
    year = "2015",
    address = "Denver, Colorado",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W15-0807",
    doi = "10.3115/v1/W15-0807",
    pages = "53--57",
}
@inproceedings{manrique-losada-zapata-jaramillo-2015-event,
    title = "Event analysis for information extraction from business-based technical documents",
    author = "Manrique Losada, Bell  and
      Zapata Jaramillo, Carlos Mario",
    booktitle = "Proceedings of the The 3rd Workshop on {EVENTS}: Definition, Detection, Coreference, and Representation",
    month = jun,
    year = "2015",
    address = "Denver, Colorado",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W15-0808",
    doi = "10.3115/v1/W15-0808",
    pages = "58--65",
}
@inproceedings{mitamura-etal-2015-event,
    title = "Event Nugget Annotation: Processes and Issues",
    author = "Mitamura, Teruko  and
      Yamakawa, Yukari  and
      Holm, Susan  and
      Song, Zhiyi  and
      Bies, Ann  and
      Kulick, Seth  and
      Strassel, Stephanie",
    booktitle = "Proceedings of the The 3rd Workshop on {EVENTS}: Definition, Detection, Coreference, and Representation",
    month = jun,
    year = "2015",
    address = "Denver, Colorado",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W15-0809",
    doi = "10.3115/v1/W15-0809",
    pages = "66--76",
}
@inproceedings{olshefski-2015-game,
    title = "Game-Changing Event Definition and Detection in an e{S}ports Corpus",
    author = "Olshefski, Emily",
    booktitle = "Proceedings of the The 3rd Workshop on {EVENTS}: Definition, Detection, Coreference, and Representation",
    month = jun,
    year = "2015",
    address = "Denver, Colorado",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W15-0810",
    doi = "10.3115/v1/W15-0810",
    pages = "77--81",
}
@inproceedings{sharma-etal-2015-identifying,
    title = "Identifying Various Kinds of Event Mentions in K-Parser Output",
    author = "Sharma, Arpit  and
      Vo, Nguyen  and
      Aditya, Somak  and
      Baral, Chitta",
    booktitle = "Proceedings of the The 3rd Workshop on {EVENTS}: Definition, Detection, Coreference, and Representation",
    month = jun,
    year = "2015",
    address = "Denver, Colorado",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W15-0811",
    doi = "10.3115/v1/W15-0811",
    pages = "82--88",
}
@inproceedings{song-etal-2015-light,
    title = "From Light to Rich {ERE}: Annotation of Entities, Relations, and Events",
    author = "Song, Zhiyi  and
      Bies, Ann  and
      Strassel, Stephanie  and
      Riese, Tom  and
      Mott, Justin  and
      Ellis, Joe  and
      Wright, Jonathan  and
      Kulick, Seth  and
      Ryant, Neville  and
      Ma, Xiaoyi",
    booktitle = "Proceedings of the The 3rd Workshop on {EVENTS}: Definition, Detection, Coreference, and Representation",
    month = jun,
    year = "2015",
    address = "Denver, Colorado",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W15-0812",
    doi = "10.3115/v1/W15-0812",
    pages = "89--98",
}
@inproceedings{takabatake-etal-2015-classification,
    title = "Classification and Acquisition of Contradictory Event Pairs using Crowdsourcing",
    author = "Takabatake, Yu  and
      Morita, Hajime  and
      Kawahara, Daisuke  and
      Kurohashi, Sadao  and
      Higashinaka, Ryuichiro  and
      Matsuo, Yoshihiro",
    booktitle = "Proceedings of the The 3rd Workshop on {EVENTS}: Definition, Detection, Coreference, and Representation",
    month = jun,
    year = "2015",
    address = "Denver, Colorado",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W15-0813",
    doi = "10.3115/v1/W15-0813",
    pages = "99--107",
}
@inproceedings{vossen-etal-2015-semantic,
    title = "Semantic Interoperability for Cross-lingual and cross-document Event Detection",
    author = "Vossen, Piek  and
      Laparra, Egoitz  and
      Rigau, German  and
      Aldabe, Itziar",
    booktitle = "Proceedings of the The 3rd Workshop on {EVENTS}: Definition, Detection, Coreference, and Representation",
    month = jun,
    year = "2015",
    address = "Denver, Colorado",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W15-0814",
    doi = "10.3115/v1/W15-0814",
    pages = "108--116",
}
@inproceedings{yee-etal-2015-modeling,
    title = "Modeling and Characterizing Social Media Topics Using the Gamma Distribution",
    author = "Yee, Connie  and
      Keane, Nathan  and
      Zhou, Liang",
    booktitle = "Proceedings of the The 3rd Workshop on {EVENTS}: Definition, Detection, Coreference, and Representation",
    month = jun,
    year = "2015",
    address = "Denver, Colorado",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W15-0815",
    doi = "10.3115/v1/W15-0815",
    pages = "117--122",
}

repository: emorynlp/nlprankings

repo_name: emorynlp/nlprankings

gha_license_id: NOASSERTION

gha_language: TeX


text:
package racer

import (
	"errors"
	"net/http"
	"time"
)

const tenS = 10 * time.Second

// Racer takes two urls and returns a url
func Racer(a, b string) (string, error) {
	return ConfigurableRacer(a, b, tenS)
}

// ConfigurableRacer compares urls and returns fasters one
func ConfigurableRacer(a, b string, timeout time.Duration) (string, error) {
	select {
	case <-Ping(a):
		return a, nil
	case <-Ping(b):
		return b, nil
	case <-time.After(timeout):
		return "", errors.New("time exceded 10s")
	}
}

// MeasureResponseTime returns response time of a request
func MeasureResponseTime(url string) time.Duration {
	start := time.Now()
	http.Get(url)
	return time.Since(start)
}

// Ping returns url after successful ping
func Ping(url string) <-chan bool {
	ch := make(chan bool)
	//defer close(ch)
	go func() {
		http.Get(url)
		ch <- true
	}()
	return ch
}


text:
DESCRIPTION = ""diff()" provides a basic set of services akin to the GNU "diff" utility. \
It is not anywhere near as feature complete as GNU "diff", but it is better \
integrated with Perl and available on all platforms. It is often faster \
than shelling out to a system's "diff" executable for small files, and \
generally slower on larger files."

SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
PR = "r0"

MAINTAINER=	"Poky <poky@yoctoproject.org>"
HOMEPAGE=	"https://metacpan.org/release/Text-Diff"

LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Artistic-1.0;md5=cda03bbdc3c1951996392b872397b798 \
file://${COMMON_LICENSE_DIR}/GPL-1.0-or-later;md5=30c0b8a5048cc2f4be5ff15ef0d8cf61"

SRC_URI = "https://cpan.metacpan.org/authors/id/N/NE/NEILB/Text-Diff-1.45.tar.gz"

SRC_URI[md5sum] = "edf57b6189f7651a6be454062a4e6d9c"
SRC_URI[sha256sum] = "e8baa07b1b3f53e00af3636898bbf73aec9a0ff38f94536ede1dbe96ef086f04"
RDEPENDS:${PN} += "algorithm-diff-perl"

S = "${WORKDIR}/Text-Diff-${PV}"

inherit cpan allarch

BBCLASSEXTEND = "native"

repository: rehsack/meta-cpan

repo_name: rehsack/meta-cpan

gha_language: BitBake


text:
@book{刘少奇1962论共产党员的修养,
  title={论共产党员的修养},
  author={刘少奇},
  volume={19},
  number={80},
  year={1962},
  publisher={北京: 人民出版社},
	pages={76--80},
	language={zh},
}

@article{黄蕴慧1982国际矿物学研究的动向,
  title={国际矿物学研究的动向},
  author={黄蕴慧},
  journal={世界地质科技发展动向. 北京: 地质出版社},
  volume={39},
  year={1982},
	language={zh},
}

@phdthesis{张筑生1983微分半动力系统的不变集,
  title={微分半动力系统的不变集},
  author={张筑生},
  year={1983},
  school={北京： 北京大学数学研究所},
	language={zh},
}

@book{中国科学院南京土壌研究所1977我国西沙群岛的土壤和鸟粪磷矿,
  title={我国西沙群岛的土壤和鸟粪磷矿},
  author={中国科学院南京土壌研究所},
  publisher={科学出版社},
  year={1977},
	language={zh},
}

@article{李四光1973地壳构造与地壳运动,
  title={地壳构造与地壳运动},
  author={李四光},
  journal={中国科学 A 辑},
  volume={4},
  pages={005},
  year={1973},
	language={zh},
}

@article{金显贺1993一种用于在线检测局部放电的数字滤波技术,
  title={一种用于在线检测局部放电的数字滤波技术},
  author={金显贺 and 王昌长},
  journal={清华大学学报: 自然科学版},
  volume={33},
  number={4},
  pages={62--67},
  year={1993},
	language={zh},
}

@book{辛希孟1994信息技术与信息服务国际研讨会论文集,
  title={信息技术与信息服务国际研讨会论文集},
  author={辛希孟},
  publisher={中国社会科学出版社},
  year={1994},
	language={zh},
}

@inproceedings{钟文发1996非线性规划在可燃毒物配置中的应用,
  title={非线性规划在可燃毒物配置中的应用},
  author={钟文发},
  booktitle={中国运筹学会第五届大会},
  year={1996},
	language={zh},
}

@misc{谢希德1998创造学习的新思路,
  title={创造学习的新思路},
  author={谢希德},
  journal={人民日报},
  volume={12},
  number={25},
  pages={10},
  year={1998},
	language={zh},
}

@phdthesis{19961996汉语拼音正词法基本规则,
  title={汉语拼音正词法基本规则 [S]},
  author={1996, GB/T16159},
  year={1996},
	language={zh},
}

@misc{姜锡洲1989一种温热外敷药的制备方法,
  title={一种温热外敷药的制备方法},
  author={姜锡洲},
  year={1989},
	language={zh},
}

@misc{王明亮1998关于中国学术期刊标准化数据库系统工程的进展,
  title={关于中国学术期刊标准化数据库系统工程的进展},
  author={王明亮},
  year={1998},
	language={zh},
}

@misc{万锦坤1996中国大学学报论文文摘,
  title={中国大学学报论文文摘 (1983-1993). 英文版},
  author={万锦坤},
  journal={北京: 中国大百科全书出版社},
  volume={7},
  year={1996},
	language={zh},
}


text:
package main

import (
	"net"
	"os"
	"syscall"
	"unsafe"
)

const IP6T_SO_ORIGINAL_DST = 80

// realServerAddress returns an intercepted connection's original destination.
func realServerAddress(conn *net.TCPConn) (net.TCPAddr, *os.File, error) {
	f, err := conn.File()
	if err != nil {
		return net.TCPAddr{}, f, err
	}

	fd := int(f.Fd())

	var addr syscall.RawSockaddrInet6
	size := uint32(unsafe.Sizeof(addr))
	err = getsockopt(int(fd), syscall.IPPROTO_IPV6, IP6T_SO_ORIGINAL_DST, unsafe.Pointer(&addr), &size)
	if err != nil {
		return net.TCPAddr{}, f, err
	}

	var ip net.IP

	ip = addr.Addr[:]

	p := (*[2]byte)(unsafe.Pointer(&addr.Port))
	p2 := int(p[0])<<8 + int(p[1])

	return net.TCPAddr{IP: ip, Port: p2}, f, nil
}

func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *uint32) (err error) {
	_, _, e1 := syscall.Syscall6(syscall.SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
	if e1 != 0 {
		err = e1
	}
	return
}

repository: benjojo/six-onions

repo_name: benjojo/six-onions


text:
@Manual{R-vitae,
  title = {vitae: Curriculum Vitae for R Markdown},
  author = {Mitchell O'Hara-Wild and Rob Hyndman},
  year = {2021},
  note = {R package version 0.4.0},
  url = {https://CRAN.R-project.org/package=vitae},
}

repository: sydneyrilum/website

repo_name: sydneyrilum/website


text:
@misc{ros_site,
    title           = {{R}obot {O}perating {S}ystem},
    howpublished    = {\url{http://ros.org/}},
    author          = {Willow Garage}
}

@inproceedings{ros_paper,
    title           = {{ROS:} an open-source {R}obot {O}perating {S}ystem},
    author          = {Quigley, Morgan and Conley, Ken and Gerkey, Brian and Faust, Josh and Foote, Tully and Leibs, Jeremy and Wheeler, Rob and Ng, Andrew Y},
    booktitle       = {ICRA workshop on open source software},
    volume          = {3},
    year            = {2009}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

@misc{ros_wiki_installation,
    title           = {{ROS H}ydro installation instructions},
    howpublished    = {\url{http://wiki.ros.org/ROS/Installation}},
    author          = {Willow Garage}
}

@misc{ros_wiki_installation_ubuntu,
    title           = {Ubuntu install of {ROS H}ydro},
    howpublished    = {\url{http://wiki.ros.org/hydro/Installation/Ubuntu}},
    author          = {Willow Garage}
}

@misc{ros_wiki_services,
    title           = {Services},
    howpublished    = {\url{http://wiki.ros.org/Services/}},
    author          = {Willow Garage}
}

@misc{ros_wiki_getinvolved,
    title           = {Get Involved},
    howpublished    = {\url{http://wiki.ros.org/Get%20Involved/}},
    author          = {Willow Garage}
}

@misc{ros_wiki_clientlibraries,
    title           = {Client Libraries},
    howpublished    = {\url{http://wiki.ros.org/Client%20Libraries/}},
    author          = {Willow Garage}
}

@misc{ros_wiki_msg,
    title           = {{msg}},
    howpublished    = {\url{http://wiki.ros.org/msg/}},
    author          = {Willow Garage}
}

@misc{ros_wiki,
    title           = {{Documentation}},
    howpublished    = {\url{http://wiki.ros.org/}},
    author          = {Willow Garage}
}

@misc{ros_pr2,
    title           = {{PR2}},
    howpublished    = {\url{http://wiki.ros.org/Robots/PR2}},
    author          = {Willow Garage}
}

@misc{turtlebot,
    title           = {{TurtleBot}},
    howpublished    = {\url{http://turtlebot.com/}},
    author          = {TurtleBot}
}

@misc{jag,
    title           = {{Jaguar - All terrain unmanned ground vehicle}},
    howpublished    = {\url{http://wiki.ros.org/Robots/Jaguar}},
    author          = {Dr Robot Inc}
}

@inproceedings{correa2012mobile,
  title={Mobile robots navigation in indoor environments using kinect sensor},
  author={Correa, Diogo Santos Ortiz and Sciotti, Diego Fernando and Prado, Marcos Gomes and Sales, Daniel Oliva and Wolf, Denis Fernando and Os{\'o}rio, Fernando Santos},
  booktitle={Critical Embedded Systems (CBSEC), 2012 Second Brazilian Conference on},
  pages={36--41},
  year={2012},
  organization={IEEE}
}

@inproceedings{biswas2012depth,
  title={Depth camera based indoor mobile robot localization and navigation},
  author={Biswas, Joydeep and Veloso, Manuela},
  booktitle={Robotics and Automation (ICRA), 2012 IEEE International Conference on},
  pages={1697--1702},
  year={2012},
  organization={IEEE}
}

@article{cunha2011using,
  title={Using a depth camera for indoor robot localization and navigation},
  author={Cunha, Joao and Pedrosa, Eurico and Cruz, Cristovao and Neves, Ant{\'o}nio JR and Lau, Nuno},
  journal={DETI/IEETA-University of Aveiro, Portugal},
  year={2011}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

@misc{ros_wiki_roslaunch,
    title           = {{r}oslaunch},
    howpublished    = {\url{http://wiki.ros.org/roslaunch/}},
    author          = {Ken Conley}
}

@misc{ros_wiki_roslaunch_xml,
    title           = {{r}oslaunch/XML},
    howpublished    = {\url{http://wiki.ros.org/roslaunch/XML/}},
    author          = {Ken Conley}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

@misc{ros_wiki_depthimage_to_laserscan,
    title           = {{d}epthimage\_to\_laserscan},
    howpublished    = {\url{http://wiki.ros.org/depthimage_to_laserscan/}},
    author          = {Chad Rockey}
}

@misc{ros_wiki_openni2_camera,
    title           = {{o}penni2\_camera},
    howpublished    = {\url{http://wiki.ros.org/openni2_camera/}},
    author          = {Julius Kammerl and Michael Ferguson}
}

@misc{ros_wiki_openni2_launch,
    title           = {{o}penni2\_launch},
    howpublished    = {\url{http://wiki.ros.org/openni2_launch/}},
    author          = {Julius Kammerl and Michael}
}

@misc{ros_wiki_openni_launch,
    title           = {{o}penni\_launch},
    howpublished    = {\url{http://wiki.ros.org/openni_launch/}},
    author          = {Patrick Mihelich and Julius Kammerl and Jon Binney}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

@misc{ros_wiki_nodelet,
    title           = {{n}odelet},
    howpublished    = {\url{http://wiki.ros.org/nodelet/}},
    author          = {Tully Foote and Radu Bogdan Rusu and Esteve Fernandez}
}

@misc{ros_wiki_tf,
    title           = {{tf}},
    howpublished    = {\url{http://wiki.ros.org/tf/}},
    author          = {Tully Foote and Eitan Marder-Eppstein and Wim Meeussen}
}

@misc{ros_wiki_joy,
    title           = {{joy}},
    howpublished    = {\url{http://wiki.ros.org/joy/}},
    author          = {Morgan Quigley and Brian Gerkey and Kevin Watts and Blaise Gassend and Jonathan Bohren}
}

@misc{ros_wiki_octomap,
    title           = {{octomap\_mapping}},
    howpublished    = {\url{http://wiki.ros.org/octomap_mapping/}},
    author          = {Armin Hornung}
}

@misc{ros_wiki_octomap_server,
    title           = {{octomap\_server}},
    howpublished    = {\url{http://wiki.ros.org/octomap_server/}},
    author          = {Armin Hornung}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

@misc{ros_wiki_rviz,
    title           = {{r}viz},
    howpublished    = {\url{http://wiki.ros.org/rviz/}},
    author          = {Dave Hershberger and David Gossow and Josh Faust and William Woodall}
}

@misc{ros_wiki_rviz_datatypes,
    title           = {{r}viz/{D}isplay{T}ypes},
    howpublished    = {\url{http://wiki.ros.org/rviz/DisplayTypes/}},
    author          = {David Gossow}
}

@misc{ros_wiki_rviz_intmark,
    title           = {{I}nteractive Markers: Getting Started},
    howpublished    = {\url{http://wiki.ros.org/rviz/Tutorials/Interactive%20Markers%3A%20Getting%20Started}},
    author          = {David Gossow}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

@misc{ros_api_point_msg,
    title           = {{g}eometry\_msgs/{P}oint Message},
    howpublished    = {\url{http://docs.ros.org/api/geometry_msgs/html/msg/Point.html}},
    author          = {Willow Garage}
}

@misc{ros_api_duration_msg,
    title           = {{g}eometry\_msgs/{P}oint Message},
    howpublished    = {\url{http://docs.ros.org/api/rospy/html/rospy.rostime.Duration-class.html}},
    author          = {Willow Garage}
}

@misc{ros_api_twist_msg,
    title           = {{g}eometry\_msgs/{T}wist Message},
    howpublished    = {\url{http://docs.ros.org/api/geometry_msgs/html/msg/Twist.html}},
    author          = {Willow Garage}
}

@misc{ros_api_og_msg,
    title           = {{n}av\_msgs/{OccupancyGrid} Message},
    howpublished    = {\url{http://docs.ros.org/api/nav_msgs/html/msg/OccupancyGrid.html}},
    author          = {Willow Garage}
}

@misc{ros_api_posestamped,
    title           = {{geometry\_msgs/PoseStamped} Message},
    howpublished    = {\url{http://docs.ros.org/api/geometry_msgs/html/msg/PoseStamped.html}},
    author          = {Willow Garage}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

@misc{ros_wiki_nav,
    title           = {{n}avigation},
    howpublished    = {\url{http://wiki.ros.org/navigation/}},
    author          = {David V. Lu and Eitan Marder-Eppstein}
}

@misc{ros_wiki_nav_base,
    title           = {{move}\_base},
    howpublished    = {\url{http://wiki.ros.org/move_base}},
    author          = {David V. Lu and Eitan Marder-Eppstein}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

@conference{ccny_rgbd,
    title           = {Fast Visual Odometry and Mapping from {RGB-D} Data},
    booktitle       = {International Conference on Robotics and Automation (ICRA2013)},
    author          = {Dryanovski, Ivan and Valenti, Roberto G. and Xiao, Jizhong},
    year            = {2013}
}

@misc{ccny_rgbd_vo,
    title           = {{ccny\_rgbd/visual\_odometry}},
    howpublished    = {\url{http://wiki.ros.org/ccny_rgbd/visual_odometry/}},
    author          = {Ivan Dryanovski}
}

@article{erlang,
    author          = {Armstrong, Joe},
    title           = {Erlang},
    journal         = {Commun. ACM},
    issue_date      = {September 2010},
    volume          = {53},
    number          = {9},
    month           = sep,
    year            = {2010},
    issn            = {0001-0782},
    pages           = {68--75},
    numpages        = {8},
    url             = {http://doi.acm.org/10.1145/1810891.1810910},
    doi             = {10.1145/1810891.1810910},
    acmid           = {1810910},
    publisher       = {ACM},
    address         = {New York, NY, USA},
}

@misc{torobot_manual,
    title           = {Servo Controller Instructions},
    author          = {Torobot},
    howpublished    = {\url{http://www.torobot.com/down/usc_en.pdf}}
}

@misc{openni_site,
    title           = {Open-source {SDK} for {3D} sensors},
    author          = {OpenNI},
    howpublished    = {\url{http://www.openni.org/}}
}

@misc{pyserial,
    title           = {Welcome to py{S}erial’s documentation},
    author          = {Chris Liechti},
    howpublished    = {\url{http://pyserial.sourceforge.net/}}
}

@misc{unix_devices,
    title           = {{UNIX} Devices},
    author          = {Paul Silver},
    year            = {2002},
    howpublished    = {\url{http://www.physics.udel.edu/~bnikolic/teaching/phys660/RUTE/rute/node21.html}}
}

@misc{360_controller,
   author           = "Wikipedia",
   title            = "File:360 controller.svg --- {W}ikipedia{,} The Free Encyclopedia",
   year             = "2010",
   howpublished     = {\url{http://en.wikipedia.org/wiki/File:360_controller.svg}},
}

@misc{pickle,
   author           = "Python",
   title            = "pickle---{P}ython object serialization",
   howpublished     = {\url{http://docs.python.org/2/library/pickle.html}},
}

@misc{curses,
   author           = "Python",
   title            = "Curses Programming with {P}ython",
   howpublished     = {\url{http://docs.python.org/2/howto/curses.html}},
}

@misc{octomap,
   author           = "University of Freiburg",
   title            = "OctoMap",
   howpublished     = {\url{http://octomap.github.io/}},
}

@ARTICLE{hornung13auro,
  author = {Armin Hornung and Kai M. Wurm and Maren Bennewitz and Cyrill
  Stachniss and Wolfram Burgard},
  title = {{OctoMap}: An Efficient Probabilistic {3D} Mapping Framework Based
  on Octrees},
  journal = {Autonomous Robots},
  year = 2013,
  url = {http://octomap.github.com},
  doi = {10.1007/s10514-012-9321-0},
  note = {Software available at \url{http://octomap.github.com}}
}

@misc{usb_spec,
    author          = "{{USB I}mplementers Forum, Inc}",
    title           = "{USB FAQ}",
    howpublished    = {\url{http://www.usb.org/developers/usbfaq/#cab1}}
}

@misc{xtion_spec,
    author          = "{ASUS}",
    title           = "{Xtion PRO Live Specifications}",
    howpublished    = {\url{http://www.asus.com/Multimedia/Xtion_PRO_LIVE/#specifications}}
}

@misc{laserscanner,
    author          = "{RobotShop}",
    title           = "{Hokuyo URG-04LX-UG01 Scanning Laser Rangefinder}",
    howpublished    = {\url{http://www.robotshop.com/en/hokuyo-urg-04lx-ug01-scanning-laser-rangefinder.html}}
}

repository: Knifa/HexapodKit

repo_name: Knifa/HexapodKit


text:
inherit debian-package
require recipes-debian/sources/xorgproto.inc
DEBIAN_PATCH_TYPE="nopatch"

require xorg-proto-common.inc

SUMMARY = "XCalibrate: Touchscreen calibration headers"

DESCRIPTION = "This package provides the headers and specification documents defining \
the core protocol and (many) extensions for the X Window System"

LICENSE = "MIT-style"
LIC_FILES_CHKSUM = "file://COPYING-x11proto;md5=b9e051107d5628966739a0b2e9b32676"

BBCLASSEXTEND = "native nativesdk"

repository: meta-debian/meta-debian

repo_name: meta-debian/meta-debian

branch_name: refs/heads/warrior


text:
@inproceedings{DBLP:conf/cp/0001MM15,
  author    = {Saurabh Joshi and
               Ruben Martins and
               Vasco M. Manquinho},
  editor    = {Gilles Pesant},
  title     = {Generalized Totalizer Encoding for Pseudo-Boolean Constraints},
  booktitle = {Principles and Practice of Constraint Programming - 21st International
               Conference, {CP} 2015, Cork, Ireland, August 31 - September 4, 2015,
               Proceedings},
  series    = {Lecture Notes in Computer Science},
  volume    = {9255},
  pages     = {200--209},
  publisher = {Springer},
  year      = {2015},
  url       = {https://doi.org/10.1007/978-3-319-23219-5\_15},
  doi       = {10.1007/978-3-319-23219-5\_15},
  timestamp = {Tue, 14 May 2019 10:00:45 +0200},
  biburl    = {https://dblp.org/rec/conf/cp/0001MM15.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}


text:
package cmd

import (
	"fmt"
	"log"
	"malayo/api"
	"malayo/conf"
	postgres "malayo/database"
	"malayo/indexing"
	"malayo/json"
	"malayo/services"
	"net/http"
	"time"

	"github.com/spf13/cobra"
)

var index bool

// RootCommand is the main command for starting the server. It reads the command flags port and config
func RootCommand() *cobra.Command {
	rootCmd := cobra.Command{
		Use: "[options]",
		Run: run,
	}

	rootCmd.Flags().IntP("port", "p", 0, "--port [number] | -p [number]")
	rootCmd.PersistentFlags().StringP("config", "c", "config.yaml", "--config [path] | -c [path]")
	rootCmd.PersistentFlags().StringP("mediaPath", "m", "$HOME/Videos", "--mediaPath [path] | -m [path]")
	rootCmd.Flags().BoolVarP(&index, "index", "i", false, "--index=[true|false] | -i=[true|false]")

	return &rootCmd
}

func run(cmd *cobra.Command, _ []string) {
	config, err := conf.LoadConfig(cmd)
	if err != nil {
		log.Fatal("Failed to load config: " + err.Error())
	}

	logger, err := conf.ConfigureLogging(&config.LogConfig)
	if err != nil {
		log.Fatal("Failed to configure logging: " + err.Error())
	}

	logger.Infof("Starting with config: %+v", config)

	if index == true {
		err := indexing.IndexMediaLibrary(&config.Media)
		if err != nil {
			logger.Errorf("Unable to index library. Error: \n%s", err.Error())
		}
	}

	mediaService, err := createMediaService(config)
	if err != nil {
		panic(err)
	}

	startServer(config, mediaService)
}

func createMediaService(config *conf.Config) (services.MediaService, error) {
	mediaService := services.NewMediaService(config)
	switch config.Storage {
	case "json":
		mediaService.MovieRepository = json.NewMovieRepo(config.Media.Movies)
		mediaService.TvRepository = json.NewTvRepo(config.Media.Tv)
	case "postgres":
		db, err := postgres.NewDB(config.PostgresConfig)
		if err != nil {
			return nil, err
		}
		mediaService.MovieRepository = postgres.NewMovieRepo(db)
		//mediaService.TvRepository = postgres.NewTvRepo(config.Media.Tv)
	}
	return mediaService, nil
}

func startServer(config *conf.Config, service services.MediaService) {

	handler := api.NewRouter(config, service)

	srv := &http.Server{
		Addr:         fmt.Sprintf("%s:%d", "localhost", config.Port),
		Handler:      handler,
		ReadTimeout:  5 * time.Second,
		WriteTimeout: 10 * time.Second,
		IdleTimeout:  120 * time.Second,
	}

	log.Fatal(srv.ListenAndServe())
}

repository: josepmdc/malayo

repo_name: josepmdc/malayo


text:
DESCRIPTION = "Tvheadend is a TV streaming server and digital video recorder"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://LICENSE;md5=9eef91148a9b14ec7f9df333daebc746"
DEPENDS = "libdvbcsa"

inherit autotools
#lib_package pkgconfig

SRC_URI = "git://github.com/tvheadend/tvheadend.git "
SRCREV = "819627ecc7db69537134ff01e946992a9ff631ca"

S = "${WORKDIR}/git"

EXTRA_OECONF="--enable-dvbcsa"

FILES_${PN} += "${datadir}/${BPN}"

repository: rehsack/meta-stef

repo_name: rehsack/meta-stef


text:
SECTION = "devel/chicken"
DESCRIPTION = "Deprecated Spiffy extensions for dynamically generating pages"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://spiffy-dynamic-handlers.meta;md5=e36698abc455e10beddcda6e10f292f7"
DEPENDS_append_class-cross = " chicken-egg-spiffy-cross chicken-egg-intarweb-cross"
DEPENDS_append_class-crosssdk = " chicken-egg-spiffy-crosssdk chicken-egg-intarweb-crosssdk"
DEPENDS_append_class-nativesdk = " nativesdk-chicken-egg-spiffy nativesdk-chicken-egg-intarweb chicken-egg-spiffy-crosssdk chicken-egg-intarweb-crosssdk"
DEPENDS = " chicken-egg-spiffy chicken-egg-intarweb chicken-egg-spiffy-cross chicken-egg-intarweb-cross"
RDEPENDS_${PN} = " chicken-egg-spiffy chicken-egg-intarweb"

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

SRC_URI[md5sum] = "42397793b3e10756ba317a7fb5a5e031"
SRC_URI[sha256sum] = "e30650944cac31e4455607e7aa8bb34742cfa2f9a48cf41cfb170fd23e61d5ea"

S = "${WORKDIR}/spiffy-dynamic-handlers-${PV}"

inherit chicken_install

BBCLASSEXTEND = "cross crosssdk nativesdk"

repository: OSSystems/meta-chicken

repo_name: OSSystems/meta-chicken


text:
@article{tripathy_gaussian_2016,
 abstract = {Uncertainty quantification (UQ) tasks, such as model calibration, uncertainty propagation, and optimization under uncertainty, typically require several thousand evaluations of the underlying computer codes. To cope with the cost of simulations, one replaces the real response surface with a cheap surrogate based, e.g., on polynomial chaos expansions, neural networks, support vector machines, or Gaussian processes (GP). However, the number of simulations required to learn a generic multivariate response grows exponentially as the input dimension increases. This curse of dimensionality can only be addressed, if the response exhibits some special structure that can be discovered and exploited. A wide range of physical responses exhibit a special structure known as an active subspace (AS). An AS is a linear manifold of the stochastic space characterized by maximal response variation. The idea is that one should first identify this low dimensional manifold, project the high-dimensional input onto it, and then link the projection to the output. If the dimensionality of the AS is low enough, then learning the link function is a much easier problem than the original problem of learning a high-dimensional function. The classic approach to discovering the AS requires gradient information, a fact that severely limits its applicability. Furthermore, and partly because of its reliance to gradients, it is not able to handle noisy observations. The latter is an essential trait if one wants to be able to propagate uncertainty through stochastic simulators, e.g., through molecular dynamics codes. In this work, we develop a probabilistic version of AS which is gradient-free and robust to observational noise. Our approach relies on a novel Gaussian process regression with built-in dimensionality reduction. In particular, the AS is represented as an orthogonal projection matrix that serves as yet another covariance function hyper-parameter to be estimated from the data. To train the model, we design a two-step maximum likelihood optimization procedure that ensures the orthogonality of the projection matrix by exploiting recent results on the Stiefel manifold, i.e., the manifold of matrices with orthogonal columns. The additional benefit of our probabilistic formulation, is that it allows us to select the dimensionality of the AS via the Bayesian information criterion. We validate our approach by showing that it can discover the right AS in synthetic examples without gradient information using both noiseless and noisy observations. We demonstrate that our method is able to discover the same AS as the classical approach in a challenging one-hundred-dimensional problem involving an elliptic stochastic partial differential equation with random conductivity. Finally, we use our approach to study the effect of geometric and material uncertainties in the propagation of solitary waves in a one dimensional granular system.},
 author = {Tripathy, Rohit and Bilionis, Ilias and Gonzalez, Marcial},
 doi = {10.1016/j.jcp.2016.05.039},
 file = {ScienceDirect Full Text PDF:/Users/iliasbilionis/Zotero/storage/DZR3JIGD/Tripathy et al. - 2016 - Gaussian processes with built-in dimensionality re.pdf:application/pdf;ScienceDirect Snapshot:/Users/iliasbilionis/Zotero/storage/PM5B44QC/S002199911630184X.html:text/html},
 issn = {0021-9991},
 journal = {Journal of Computational Physics},
 keywords = {Uncertainty quantification, Dimensionality reduction, Gaussian process regression, Active subspace, Granular crystals, Stiefel manifold},
 month = {September},
 pages = {191--223},
 shorttitle = {Gaussian processes with built-in dimensionality reduction},
 title = {Gaussian processes with built-in dimensionality reduction: Applications to high-dimensional uncertainty propagation},
 url = {http://www.sciencedirect.com/science/article/pii/S002199911630184X},
 volume = {321},
 year = {2016}
}

repository: PredictiveScienceLab/www

repo_name: PredictiveScienceLab/www


text:
SUMMARY = "Tools for managing the Ocfs2 cluster file system"
DESCRIPTION = "Programs to manage the Ocfs2 cluster file system, including mkfs.ocfs2, \
tunefs.ocfs2 and fsck.ocfs2.\
Ocfs2 is a general purpose extent based shared disk cluster file \
system. It supports 64 bit inode numbers, and has automatically \
extending metadata groups which may also make it attractive for \
non-clustered use. Ocfs2 leverages some well tested kernel \
technologies, such as JBD - the same journaling subsystem in use by \
ext3."
HOMEPAGE = "http://oss.oracle.com/projects/ocfs2-tools/"
SECTION = "System Environment/Base"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"

SRC_URI = "git://oss.oracle.com/git/ocfs2-tools.git \
    file://0003-vendor-common-o2cb.ocf-add-new-conf-file.patch \
    file://cluster.conf.sample \
    file://o2cb.service \
    file://ocfs2.service \
"
SRCREV = "0b8be47d61dbdcd08d21c83f0b3993735b884ef9"
S = "${WORKDIR}/git"

inherit autotools-brokensep pkgconfig systemd

DEPENDS = "corosync openais cluster-glue pacemaker libxml2 linux-libc-headers e2fsprogs libaio"
RDEPENDS_${PN} = "bash coreutils net-tools module-init-tools e2fsprogs chkconfig glib-2.0"
ASNEEDED_pn-${PN} = ""
PARALLEL_MAKE = ""
INSANE_SKIP_${PN} = "unsafe-references-in-binaries"
CFLAGS_append += "-DGLIB_COMPILATION"
CPPFLAGS_append += "-DGLIB_COMPILATION"

EXTRA_OECONF = " \
    --enable-ocfs2console=no \
    --enable-dynamic-fsck=yes \
    --enable-dynamic-ctl=yes \
"

do_configure_prepend () {
        # fix here or EXTRA_OECONF
        sed -i -e '/^PYTHON_INCLUDES="-I/c\
PYTHON_INCLUDES="-I=/usr/include/python${PYTHON_BASEVERSION}"' \
                ${S}/pythondev.m4
        sed -i  -e 's:PYTHON_PREFIX/lib/python:PYTHON_PREFIX/${baselib}/python:' \
            -e 's:PYTHON_EXEC_PREFIX}/lib/python:PYTHON_EXEC_PREFIX}/${baselib}/python:' \
                ${S}/python.m4

        # fix the AIS_TRY_PATH which will search corosync|openais
        # AIS_TRY_PATH=":/usr/lib64/:/usr/lib:/usr/local/lib64:/usr/local/lib"
        sed -i -e '/^AIS_TRY_PATH=":\/usr\/lib64:/s;:;:=;g' ${S}/configure.in
}

do_compile_prepend() {
    for m in `find . -name "Makefile"` ; do
        sed -i -e "s@-I/usr/include@-I${STAGING_DIR_TARGET}/usr/include@g" $m
    done
}

SYSTEMD_SERVICE_${PN} = "o2cb.service ocfs2.service"

do_install() {
    install -d ${D}/etc/init.d
    install vendor/common/o2cb.init ${D}/etc/init.d/o2cb
    install vendor/common/ocfs2.init ${D}/etc/init.d/ocfs2
    install -d ${D}/etc/sysconfig
    install vendor/common/o2cb.sysconfig ${D}/etc/sysconfig/o2cb
    install -d ${D}/etc/udev/rules.d
    install vendor/common/51-ocfs2.rules ${D}/etc/udev/rules.d/51-ocfs2.rules
    install -d ${D}/${libdir}/ocf/resource.d/ocfs2
    install  -m 0755 vendor/common/o2cb.ocf ${D}/${libdir}/ocf/resource.d/ocfs2/o2cb
    oe_runmake DESTDIR="${D}" install
    chmod 644 ${D}/${libdir}/*.a
    install -dm 0755  ${D}/etc/ocfs2
    install -m 0644 ${WORKDIR}/cluster.conf.sample ${D}/etc/ocfs2/cluster.conf.sample
    rm -rf ${D}/${libdir}/ocf
    rm -rf ${D}/sbin/ocfs2_controld.pcmk
    rm -rf ${D}/sbin/ocfs2_controld.cman
    # fix up hardcoded paths
    sed -i -e 's,/usr/lib/,${libdir}/,' ${WORKDIR}/o2cb.service
    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
        install -d ${D}/${systemd_unitdir}/system
        install -m 644 ${WORKDIR}/o2cb.service ${D}/${systemd_unitdir}/system
        install -m 644 ${WORKDIR}/ocfs2.service ${D}/${systemd_unitdir}/system
        install -d ${D}/${libexecdir}
        install -m 755 vendor/common/o2cb.init ${D}/${libexecdir}/o2cb-helper
    fi
}

RDEPENDS_${PN} = "bash"

repository: jackiehjm/meta-cgl

repo_name: jackiehjm/meta-cgl


text:
import oneMovieTemplate from '../templates/oneMovieTemplate.hbs';
import getRefs from './getRef';

const refs = getRefs();

function movieMarkup(data) {
  const markup = oneMovieTemplate(data);

  refs.moviesList.insertAdjacentHTML('beforeend', markup);
}

function clearMarkup() {
  refs.moviesList.innerHTML = '';
}

export default { movieMarkup, clearMarkup };

extension: js


text:
package cd

import (
	"fmt"

	"github.com/codegangsta/cli"
	"github.com/kodykantor/dockerbox/utils"
)

// Chdir implements the Operationer interface.
// Unfortunately 'cd' is a built-in shell command. We would have to do magic (
// LD_PRELOAD, write our own shell) to intercept the 'cd' command. Instead, we
// are targeting the 'cc' command, because who uses 'cc' anymore, right? :)
type Chdir struct{}

// DoStuff will create a shell session inside the chosen container.
func (cd *Chdir) DoStuff(c *cli.Context) {
	if len(c.Args()) == 0 {
		utils.RunLinuxCmd(c)
		return
	}

	args := c.Args()
	containerName, err := utils.GetContainerName(args[0])
	if err != nil {
		fmt.Println("Error getting container name:", err)
		return
	}

	if containerName == "" {
		utils.RunLinuxCmd(c) // they ran 'cd /containers', which doesn't make sense to this program
		return
	}

	//TODO we only currently support 'cd <container name>', which will bring a
	// user into the '/' directory in a container. We should support 'cd <name>/path'
	// and open a shell in the path that they specify.
	cmd := []string{"sh"}
	utils.RunCmd(containerName, cmd, true)

}

repository: KodyKantor/dockerbox

repo_name: KodyKantor/dockerbox


text:
#
# Bitbake recipe for raspicam_0.1.2 module
# Recipe created by: M.Ozcelikors <mozcelikors@gmail.com>
#

DESCRIPTION = "raspicam"
SECTION = "multimedia"
#LICENSE = "CLOSED" is useful for testing purposes.
LICENSE = "BSD"

# This directory contains most common licenses in case no file named COPYING or LICENSE is provided: ${COMMON_LICENSE_DIR}
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb"

PR = "r0"

# If your build system does not have opencv recipe, then you can test still by commenting below line
# The following is required for this recipe to be cross-compiled.
DEPENDS = "opencv userland"
PROVIDES = "raspicam"

# For do_package
PACKAGES = "${PN} ${PN}-dev ${PN}-dbg"

FILES_${PN} += " \
	${libdir}/lib*so.* \
	${libdir}/cmake/*"

FILES_${PN}-dev += " ${libdir}/lib*so"

# Runtime dependencies of created packages
RDEPENDS_${PN}-dev = "glog-dev"
RDEPENDS_${PN}-dbg = ""

#Fetching from git repo, ${PV} is package version automatically extracted from filename
#SRC_URI = "git://github.com/6by9/raspicam-0.1.3.git;protocol=https;branch=master"
SRC_URI = "git://github.com/cedricve/raspicam.git;protocol=https;branch=master"

# SHA1-Hash when downloading from git
SRCREV = "59d92e6907859e59bd40645af6038e2122cd45ef"

# This should be correct for git-based fetching
S = "${WORKDIR}/git"

inherit pkgconfig cmake


text:
require linux.inc

DESCRIPTION = "Linux kernel for OMAP processors"
KERNEL_IMAGETYPE = "uImage"

COMPATIBLE_MACHINE = "omap5912osk|omap1710h3|omap2430sdp|omap2420h4|beagleboard|omap3evm|omap3-pandora|overo"

# This is missing the EHCI patch for beagle
DEFAULT_PREFERENCE = "-1"

SRCREV = "90e758af52ba803cba233fabee81176d99589f09"

#PV = "2.6.29+2.6.30-rc1+${PR}+gitr${SRCREV}"
PV = "2.6.29-${PR}+gitr${SRCREV}"
PR = "r0"

SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git;protocol=git \
	   file://defconfig"

SRC_URI_append = " \
           file://no-empty-flash-warnings.patch;patch=1 \
           file://no-cortex-deadlock.patch;patch=1 \
           file://read_die_ids.patch;patch=1 \
           file://fix-install.patch;patch=1 \
           file://DSS2.diff;patch=1 \
"

SRC_URI_append_beagleboard = " file://logo_linux_clut224.ppm \
			     "

SRC_URI_append_omap3evm = " \
	file://evm-mcspi-ts.diff;patch=1 \
"

S = "${WORKDIR}/git"

module_autoload_ohci-hcd_omap5912osk = "ohci-hcd"


text:
package controllers

import (
	"encoding/json"
	"fmt"
	"github.com/astaxie/beego"
	"github.com/astaxie/beego/logs"
	"github.com/yaoice/ice/models"
)

// Operations about app
type AppsController struct {
	beego.Controller
}

// @Title Create
// @Description create new app
// @Param   project     path    string  true        "The project you want to get"
// @Param   body        body    models.App  true    "The app content"
// @Success 200 {app} models.App.AppName
// @Failure 400 :body is empty
// @router / [post]
func (this *AppsController) Post() {
	var app models.App
	project := this.GetString(":project")
	json.Unmarshal(this.Ctx.Input.RequestBody, &app)
	result, err := models.CreateApp(project, &app)
	if err != nil {
		logs.Error("create app %s response err: %v", app.AppName, err)
		this.Ctx.Output.SetStatus(400)
		this.Data["json"] = err
	} else {
		this.Data["json"] = result
	}
	this.ServeJSON()
}

// @Title Get
// @Description get app by appname
// @Param   project     path    string  true        "The project you want to get"
// @Param   appName     path    string  true        "The appname you want to get"
// @Success 200 {app} models.App
// @Failure 400 :appName is empty
// @router /:appName [get]
func (this *AppsController) Get() {
	project := this.GetString(":project")
	appName := this.GetString(":appName")
	app, err := models.GetApp(project, appName)
	if err != nil {
		logs.Error("get app %s response err: %v", appName, err)
		this.Ctx.Output.SetStatus(400)
		this.Data["json"] = err
	} else {
		this.Data["json"] = app
	}
	this.ServeJSON()
}

// @Title GetAll
// @Description get all apps
// @Param   project     path    string  true        "The project you want to get"
// @Success 200 {app} models.App
// @Failure 400 :appName is empty
// @router / [get]
func (this *AppsController) GetAll() {
	project := this.GetString(":project")
	apps, err := models.GetAllApp(project)
	if err != nil {
		logs.Error("get all app response err: %v", err)
		this.Data["json"] = err
	} else {
		this.Data["json"] = apps
	}
	this.ServeJSON()
}

/*
// @Title Update
// @Description update app by appname
// @Param   project     path    string  true        "The project you want to get"
// @Param   appName     path    string  true        "The app you want to update"
// @Param   body        body    models.App   true        "The body"
// @Success 200 {app} models.App
// @Failure 400 :appName is empty
// @router /:appName [put]
func (this *AppsController) Put() {

}
*/

// @Title Delete
// @Description delete app by appname
// @Param   project     path    string  true        "The project you want to get"
// @Param   appName     path    string  true        "The app you want to delete"
// @Success 200 {app} models.App
// @Failure 400 :appName is empty
// @router /:appName [delete]
func (this *AppsController) Delete() {
	project := this.GetString(":project")
	appName := this.GetString(":appName")
	err := models.DeleteApp(project, appName)
	if err != nil {
		logs.Error("delete app %s response err: %v", appName, err)
		this.Ctx.Output.SetStatus(400)
		this.Data["json"] = err
	} else {
		s := fmt.Sprintf("delete app %s success!", appName)
		this.Data["json"] = s
	}
	this.ServeJSON()
}


text:
package statsd

import (
	"fmt"
	"io"
	"net"
	"time"
)

const (
	defaultReadTimeout = 10 * time.Millisecond
	defaultConnTimeout = 5 * time.Second
)

// SafeConn is an implementation of the io.WriteCloser that wraps a net.Conn type
// its purpose is to perform a guard as a part of each Write call to first check if
// the connection is still up by performing a small read. The use case of this is to
// protect against the case where a TCP connection comes disconnected and the Write
// continues to retry for up to 15 minutes before determining that the connection has
// been broken off.
// See also the WriteCloser option.
type SafeConn struct {
	netConn     net.Conn
	connTimeout time.Duration
	readTimeout time.Duration
}

func NewSafeConn(network, address string, connTimeout, readTimeout time.Duration) (*SafeConn, error) {
	newConn, err := dialTimeout(network, address, connTimeout)
	if err != nil {
		return nil, err
	}

	c := &SafeConn{
		netConn:     newConn,
		connTimeout: connTimeout,
		readTimeout: readTimeout,
	}

	return c, nil
}

func NewSafeConnWithDefaultTimeouts(network string, address string) (*SafeConn, error) {
	return NewSafeConn(network, address, defaultConnTimeout, defaultReadTimeout)
}

func (s *SafeConn) Write(p []byte) (n int, err error) {
	// check if connection is closed
	if s.connIsClosed() {
		return 0, fmt.Errorf("connection is closed")
	}

	return s.netConn.Write(p)
}

func (s *SafeConn) Close() error {
	return s.netConn.Close()
}

func (s *SafeConn) connIsClosed() bool {
	err := s.netConn.SetReadDeadline(time.Now().Add(s.readTimeout))
	if err != nil {
		return true
	}

	one := make([]byte, 1)
	_, err = s.netConn.Read(one)
	return err == io.EOF
}

repository: joeycumines/statsd

repo_name: joeycumines/statsd


text:
DESCRIPTION = "free software library that interfaces with selected Z-Wave PC controllers"
HOMEPAGE = "http://openzwave.com/"
LICENSE = "LGPLv3+"
LIC_FILES_CHKSUM = "file://license/license.txt;md5=584c7ddacb8739db77ddcc47bd9d3b52"

PR = "r0"

DEPENDS = "systemd"

SRC_URI = "git://github.com/OpenZWave/open-zwave.git;protocol=git;rev=d9444666c93d33a95d79bdd1b2a817e4763faef4 \
          file://main-makefile.diff \
          file://main-support-mk.diff \
          file://minozw-makefile.diff \
"

S = "${WORKDIR}/git"

inherit autotools-brokensep pkgconfig systemd

do_install() {
  oe_runmake \
      'DESTDIR=${D}' \
      'PREFIX=${prefix}' \
      'docdir=${docdir}/${PN}-${PV}' \
      install
}


text:
@Article{pmid10208641,
  Author="Collie-Duguid, E. S.  and Pritchard, S. C.  and Powrie, R. H.  and Sludden, J.  and Collier, D. A.  and Li, T.  and McLeod, H. L. ",
  Title="{{T}he frequency and distribution of thiopurine methyltransferase alleles in {C}aucasian and {A}sian populations}",
  Journal="Pharmacogenetics",
  Year="1999",
  Volume="9",
  Number="1",
  Pages="37--42",
  Month="Feb"
}

repository: larmcr/px

repo_name: larmcr/px


text:
DESCRIPTION = "Debug Sub-System (DebugSS) driver for Keystone and DRA7xx devices"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING.txt;md5=9d4316fe434ba450dca4da25348ca5a3"

# This package builds a kernel module, use kernel PR as base and append a local
MACHINE_KERNEL_PR:append = "d"
PR = "${MACHINE_KERNEL_PR}"
PV:append = "+git${SRCPV}"

S = "${WORKDIR}/git/debugss_module/debugss-mod"

inherit module

PLATFORM = ""
PLATFORM:dra7xx = "DRA7xx_PLATFORM"

EXTRA_OEMAKE = "'PLATFORM=${PLATFORM}' KVERSION=${KERNEL_VERSION} KERNEL_SRC=${STAGING_KERNEL_DIR}"

COMPATIBLE_MACHINE = "dra7xx"
PACKAGE_ARCH = "${MACHINE_ARCH}"

include dsptop.inc

repository: YoeDistro/meta-ti

repo_name: YoeDistro/meta-ti


text:
---
---
References
==========

@book{knolldetect,
  title={Radiation Detection and Measurement},
  author={Knoll, Glenn F},
  year={2010},
  chapter = {3},
  pages= {73-76},
  publisher={John Wiley \& Sons}
}

@article{sieminski2014international,
  title="International energy outlook",
  author="Sieminski, Adam",
  journal="Energy Information Administration (EIA)",
  pages = "2",
  volume="18",
  year="2014"
}

@article{nagatani2013emergency,
  title={Emergency response to the nuclear accident at the Fukushima Daiichi Nuclear Power Plants using mobile rescue robots},
  author={Nagatani, Keiji and Kiribayashi, Seiga and Okada, Yoshito and Otake, Kazuki and Yoshida, Kazuya and Tadokoro, Satoshi and Nishimura, Takeshi and Yoshida, Tomoaki and Koyanagi, Eiji and Fukushima, Mineo and others},
  journal={Journal of Field Robotics},
  volume={30},
  number={1},
  pages={44--63},
  year={2013},
  publisher={Wiley Online Library}
}

@article{wierstra2010recurrent,
  title={Recurrent policy gradients},
  author={Wierstra, Daan and F{\"o}rster, Alexander and Peters, Jan and Schmidhuber, J{\"u}rgen},
  journal={Logic Journal of the IGPL},
  volume={18},
  number={5},
  pages={620--634},
  year={2010},
  publisher={Oxford University Press}
}

@incollection{spaan2012partially,
  title={Partially observable Markov decision processes},
  author={Spaan, Matthijs TJ},
  booktitle={Reinforcement Learning},
  pages={387--414},
  year={2012},
  publisher={Springer}
}

@article{williams1992simple,
  title={Simple statistical gradient-following algorithms for connectionist reinforcement learning},
  author={Williams, Ronald J},
  journal={Machine Learning},
  volume={8},
  number={3-4},
  pages={229--256},
  year={1992},
  publisher={Springer}
}

@book{sutton2018rl,
  title={Reinforcement learning: An introduction},
  author={Sutton, Richard S and Barto, Andrew G},
  year={2018},
  publisher={MIT Press}
}

@inproceedings{henderson2018deep,
  title={Deep reinforcement learning that matters},
  author={Henderson, Peter and Islam, Riashat and Bachman, Philip and Pineau, Joelle and Precup, Doina and Meger, David},
  booktitle={Proceedings of the AAAI conference on artificial intelligence},
  volume={32},
  number={1},
  year={2018}
}

@article{schulman2015high,
  title={High-dimensional continuous control using generalized advantage estimation},
  author={Schulman, John and Moritz, Philipp and Levine, Sergey and Jordan, Michael and Abbeel, Pieter},
  journal={arXiv preprint arXiv:1506.02438},
  year={2015}
}

@article{schulman2017proximal,
  title={Proximal policy optimization algorithms},
  author={Schulman, John and Wolski, Filip and Dhariwal, Prafulla and Radford, Alec and Klimov, Oleg},
  journal={arXiv preprint arXiv:1707.06347},
  year={2017}
}

@article{andrychowicz2020matters,
  title={What matters in on-policy reinforcement learning? A large-scale empirical study},
  author={Andrychowicz, Marcin and Raichuk, Anton and Sta{\'n}czyk, Piotr and Orsini, Manu and Girgin, Sertan and Marinier, Raphael and Hussenot, L{\'e}onard and Geist, Matthieu and Pietquin, Olivier and Michalski, Marcin and others},
  journal={arXiv preprint arXiv:2006.05990},
  year={2020}
}

@misc{abeeldeeprl,
  title={Policy Gradients},
  author={Pieter Abeel},
  publisher={Deep RL Bootcamp},
  month={August},
  year={2017}
}


text:
package main

import (
	"crypto/tls"
	"encoding/json"
	"flag"
	"fmt"
	"net/http"
	"net/http/httputil"
	"net/url"
	"os"
	"path/filepath"
	"strings"

	"k8s.io/client-go/kubernetes"

	"github.com/kiali/kiali/graph/config/cytoscape"
	"github.com/kiali/kiali/log"
	"github.com/kiali/kiali/tools/cmd"
	"github.com/kiali/kiali/tools/generator"
)

var homeDir, _ = os.UserHomeDir()

// Generate flags
var (
	boxFlag          bool
	clusterFlag      string
	numAppsFlag      int
	numIngressesFlag int
	popStratFlag     generator.PopStratValue = generator.Sparse
)

// Proxy specific flags
var (
	certFileFlag     string
	dataDirFlag      string
	httpsFlag        bool
	keyFileFlag      string
	runGeneratorFlag bool
)

func init() {
	// Proxy specific flags
	flag.StringVar(&certFileFlag, "cert-file", filepath.Join(homeDir, ".minikube/ca.crt"), "path to cert file for https")
	flag.StringVar(&dataDirFlag, "data-dir", "", "path to dir where json graph data is.")
	flag.BoolVar(&httpsFlag, "https", false, "use https. Uses minikube certs by default")
	flag.StringVar(&keyFileFlag, "key-file", filepath.Join(homeDir, ".minikube/ca.key"), "path to key file for https")
	flag.BoolVar(&runGeneratorFlag, "run-generator", false, "If enabled, the proxy runs the generator to generate a new graph.")

	// Generate flags
	flag.BoolVar(&boxFlag, "box", false, "adds boxing to the graph")
	flag.StringVar(&clusterFlag, "cluster", "test", "nodes' cluster name")
	flag.IntVar(&numAppsFlag, "apps", 5, "number of apps to create")
	flag.IntVar(&numIngressesFlag, "ingresses", 1, "number of ingresses to create")
	flag.Var(&popStratFlag, "population-strategy", "whether the graph should have many or few connections")
}

func loadGraphFromFile(filename string) (*cytoscape.Config, error) {
	contents, err := os.ReadFile(filename)
	if err != nil {
		return nil, err
	}

	cyGraph := &cytoscape.Config{}
	err = json.Unmarshal(contents, cyGraph)
	if err != nil {
		return nil, err
	}

	return cyGraph, nil
}

type graphProxy struct {
	httpProxy *httputil.ReverseProxy
	generator *generator.Generator
	graph     *cytoscape.Config
}

func (p graphProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
	if req.URL.Path == "/api/namespaces/graph" {
		log.Debug("Serving mock graph data...")
		content, err := json.Marshal(p.graph)
		if err != nil {
			log.Errorf("Unable to marshal graph to JSON. Err: %s", err)
			rw.WriteHeader(500)
			return
		}

		_, err = rw.Write(content)
		if err != nil {
			log.Errorf("Unable to write content. Err: %s", err)
			rw.WriteHeader(500)
		}

		return
	}

	p.httpProxy.ServeHTTP(rw, req)
}

func exitWithUsage(msg string) {
	if !strings.HasSuffix(msg, "\n\n") {
		msg = msg + "\n"
	}
	fmt.Fprint(flag.CommandLine.Output(), msg)
	flag.Usage()
	os.Exit(1)
}

func extractPosArgFromArgs() (string, []string) {
	args := os.Args[1:]
	for i, arg := range args {
		if !strings.HasPrefix(arg, "-") && !strings.HasPrefix(arg, "--") {
			return arg, append(args[:i], args[i+1:]...)
		}
	}
	return "", args
}

func main() {
	cmd.ConfigureKialiLogger()

	flag.Usage = cmd.Usage("proxy", "<kiali-url>")
	if len(os.Args) < 2 {
		exitWithUsage("Error: Not enough arguments\n\n")
	}

	// The default flag.Parse() does not handle posargs interspersed with flags well
	// so extract out the url pos arg first before passing the args to Parse.
	urlArg, args := extractPosArgFromArgs()
	_ = flag.CommandLine.Parse(args)
	// Parse first in case '-help' is passed.
	if urlArg == "" {
		exitWithUsage("Error: 'kiali-url' is a required positional arg\n\n")
	}

	u, err := url.Parse(urlArg)
	if err != nil {
		log.Fatalf("unable to parse kiali url. Err: '%s'", err)
	}

	opts := generator.Options{
		NumberOfApps:    &numAppsFlag,
		NumberOfIngress: &numIngressesFlag,
		IncludeBoxing:   &boxFlag,
	}

	kubeCfg, err := cmd.GetKubeConfig()
	if err != nil {
		log.Warningf("Unable to construct kube config because error: '%s'. Some functionality such as namespace creation may not work.", err)
	}
	if kubeCfg != nil {
		opts.KubeClient = kubernetes.NewForConfigOrDie(kubeCfg)
	}

	gen, err := generator.New(opts)
	if err != nil {
		log.Fatal(err)
	}

	var graph *cytoscape.Config
	if dataDirFlag == "" {
		log.Info("Populating graph data...")
		g := gen.Generate()
		graph = &g
	} else {
		graph, err = loadGraphFromFile(dataDirFlag)
		if err != nil {
			log.Fatalf("Unable to load graph from file. Err: %s", err)
		}

		err = gen.EnsureNamespaces(*graph)
		if err != nil {
			log.Fatalf("Unable to ensure namespaces. Err: %s", err)
		}
	}

	proxy := graphProxy{
		httpProxy: httputil.NewSingleHostReverseProxy(u),
		generator: gen,
		graph:     graph,
	}

	serveMsgTmpl := "Ready to handle requests on: '%s://localhost:10201'."
	if httpsFlag {
		log.Infof(serveMsgTmpl, "https")
		customTransport := http.DefaultTransport.(*http.Transport)
		customTransport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
		proxy.httpProxy.Transport = customTransport
		log.Fatal(http.ListenAndServeTLS(":10201", certFileFlag, keyFileFlag, proxy))
	} else {
		log.Infof(serveMsgTmpl, "http")
		log.Fatal(http.ListenAndServe(":10201", proxy))
	}
}

repository: kiali/kiali

repo_name: kiali/kiali

gha_language: TypeScript


text:
#
# Base recipes: meta/recipes-extended/cups/cups.inc
#               meta/recipes-extended/cups/cups_1.7.1.bb
# Base branch: daisy
# Base commit: 9e4aad97c3b4395edeb9dc44bfad1092cdf30a47
#

SUMMARY = "An Internet printing system for Unix"
SECTION = "console/utils"

inherit debian-package autotools-brokensep binconfig

PR = "r0"
DEPENDS = "gnutls libpng libjpeg-turbo dbus dbus-glib zlib libusb1"

LICENSE = "GPLv2 & LGPLv2"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c5e50cb4b8f24b04636b719683a9102d"

PROVIDES = "cups14"

SRC_URI += "\
	file://0001-don-t-try-to-run-generated-binaries_debian.patch \
	file://cups_serverbin.patch \
"

PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
                   ${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"

PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam"

EXTRA_OECONF = " \
               --enable-gnutls \
               --enable-dbus \
               --enable-browsing \
               --disable-openssl \
               --disable-gssapi \
               --enable-debug \
               --disable-relro \
               --enable-libusb \
               --without-php \
               --without-perl \
               --without-python \
               --without-java \
               "

# Add more conf options according to Debian rules
EXTRA_OECONF += " \
	--with-docdir=/usr/share/cups/doc-root \
	--localedir=/usr/share/cups/locale \
	--enable-libpaper \
	--enable-ssl \
	--enable-threads \
	--enable-static \
	--with-dbusdir=/etc/dbus-1 \
	--disable-launchd \
	--with-cups-group=lp \
	--with-system-groups=lpadmin \
	--with-printcap=/var/run/cups/printcap \
	--with-log-file-perm=0640 \
	--with-local_protocols='dnssd' \
	--with-systemdsystemunitdir=/lib/systemd/system \
	"

do_configure() {
	gnu-configize
	libtoolize --force
	autoconf
	DSOFLAGS="${LDFLAGS}" SERVERBIN="${libdir}/cups" oe_runconf
}

do_compile () {
	sed -i s:STRIP:NOSTRIP: Makedefs
	sed -i s:serial:: backend/Makefile

	echo "all:"    >  man/Makefile
	echo "libs:" >> man/Makefile
	echo "install:" >> man/Makefile
	echo "install-data:" >> man/Makefile
	echo "install-exec:" >> man/Makefile
	echo "install-headers:" >> man/Makefile
	echo "install-libs:" >> man/Makefile

	oe_runmake "SSLLIBS=-lgnutls -L${STAGING_LIBDIR}" \
		   "LIBPNG=-lpng -lm -L${STAGING_LIBDIR}" \
		   "LIBJPEG=-ljpeg -L${STAGING_LIBDIR}" \
		   "LIBZ=-lz -L${STAGING_LIBDIR}" \
		   "-I."
}

fakeroot do_install () {
	oe_runmake "DSTROOT=${D}" install

	# Remove /var/run from package as cupsd will populate it on startup
	rm -fr ${D}/${localstatedir}/run
	rmdir ${D}/${libdir}/${BPN}/driver
}

# Correct locations, path according to Debian rules
do_install_append() {
	install -d ${D}${libdir}/cups/backend-available
	mv ${D}${libdir}/cups/backend/lpd ${D}${libdir}/cups/backend-available/
	mv ${D}${libdir}/cups/backend/socket ${D}${libdir}/cups/backend-available/
	mv ${D}${libdir}/cups/backend/usb ${D}${libdir}/cups/backend-available/
	mv ${D}${libdir}/cups/backend/snmp ${D}${libdir}/cups/backend-available/

	install -D -m 644 ${S}/debian/local/apparmor-profile ${D}${sysconfdir}/apparmor.d/usr.sbin.cupsd
	install -D -m 644 ${S}/debian/local/cups.ufw.profile ${D}${sysconfdir}/ufw/applications.d/cups
	install -D -m 644 ${S}/debian/local/apport-hook.py ${D}${datadir}/apport/package-hooks/source_cups.py

	# Manual install pam file
	install -D -m 644 ${S}/debian/cups-daemon.cups.pam ${D}${sysconfdir}/pam.d/cups
}

python do_package_append() {
    import subprocess
    # Change permissions back the way they were, they probably had a reason...
    workdir = d.getVar('WORKDIR', True)
    subprocess.call('chmod 0511 %s/install/cups/var/run/cups/certs' % workdir, shell=True)
}

# Re-arrange list of packages build from source
PACKAGES = "${PN} libcups2 ${PN}-dev ${PN}-staticdev ${PN}-dbg ${PN}-libimage \
	${PN}-bsd ${PN}-client ${PN}-common ${PN}-core-drivers ${PN}-daemon \
	${PN}-ppdc ${PN}-server-common libcupscgi1 libcupscgi-dev \
	libcupsimage2 libcupsimage2-dev libcupsmime1 libcupsmime-dev \
	libcupsppdc1 libcupsppdc-dev"

FILES_${PN} = " \
	${libdir}/cups/backend-available/lpd \
	${libdir}/cups/backend-available/snmp \
	${libdir}/cups/backend-available/socket \
	${libdir}/cups/backend-available/usb \
	${libdir}/cups/cgi-bin/*.cgi \
	${libdir}/cups/filter/rastert* \
	${libdir}/cups/monitor/* \
	${libdir}/cups/notifier/* \
	${libdir}/cups/daemon/* \
	${sysconfdir}/cups/snmp.conf \
	${sysconfdir}/cups/ppd \
	${sysconfdir}/cups/interfaces \
	${sbindir}/cupsfilter \
	${sysconfdir}/cups/cupsd.conf \
	${datadir}/applications \
	${datadir}/cups \
	"

FILES_${PN}-bsd = " \
	${bindir}/lpq \
	${bindir}/lpr \
	${bindir}/lprm \
	${sbindir}/lpc \
	"

# ippfind will not appear if avahi package not existed
FILES_${PN}-client = " \
	${bindir}/cancel \
	${bindir}/cupstestdsc \
	${bindir}/cupstestppd \
	${bindir}/ippfind \
	${bindir}/ipptool \
	${bindir}/lp \
	${bindir}/lpoptions \
	${bindir}/lppasswd \
	${bindir}/lpstat \
	${sbindir}/accept \
	${sbindir}/cupsaccept \
	${sbindir}/cupsaddsmb \
	${sbindir}/cupsctl \
	${sbindir}/cupsdisable \
	${sbindir}/cupsenable \
	${sbindir}/cupsreject \
	${sbindir}/lpadmin \
	${sbindir}/lpinfo \
	${sbindir}/lpmove \
	${sbindir}/reject \
	"

FILES_${PN}-common = " \
	${datadir}/cups/drv/sample.drv \
	${datadir}/cups/locale \
	${datadir}/cups/ppdc \
	${datadir}/doc/cups-common \
	${datadir}/lintian/overrides \
	"

FILES_${PN}-core-drivers = " \
	${libdir}/cups/filter/commandtops \
	${libdir}/cups/filter/gziptoany \
	${libdir}/cups/filter/pstops \
	"

#Missing cups-daemon file because it requires apparmor_parser command
#to create.
FILES_${PN}-daemon = " \
	${sysconfdir}/apparmor.d/usr.sbin.cupsd \
	${sysconfdir}/cups/cups-files.conf \
	${sysconfdir}/init.d/cups \
	${sysconfdir}/pam.d/cups \
	${sysconfdir}/ufw \
	${sysconfdir}/cups/ssl \
	${base_libdir}/systemd/system \
	${libdir}/cups/backend/http* \
	${libdir}/cups/backend/ipp* \
	${libdir}/cups/backend/https \
	${libdir}/cups/backend/https \
	${libdir}/cups/notifier/dbus \
	${libdir}/cups/notifier/mailto \
	${libdir}/cups/notifier/rss \
	${sbindir}/cupsd \
	${datadir}/apport \
	"

FILES_${PN}-ppdc = " \
	${bindir}/ppdc \
	${bindir}/ppdhtml \
	${bindir}/ppdi \
	${bindir}/ppdmerge \
	${bindir}/ppdpo \
	"

FILES_${PN}-server-common = " \
	${datadir}/cups/doc-root \
	${datadir}/cups/mime \
	${datadir}/cups/templates \
	${datadir}/cups/usb \
	"

FILES_libcups2 = " \
	${libdir}/libcups.so.* \
	"

FILES_${PN}-dev = " \
	${bindir}/cups-config \
	${includedir}/cups/adminutil.h \
	${includedir}/cups/array.h \
	${includedir}/cups/backend.h \
	${includedir}/cups/cups.h \
	${includedir}/cups/dir.h \
	${includedir}/cups/file.h \
	${includedir}/cups/http.h \
	${includedir}/cups/i18n.h \
	${includedir}/cups/ipp.h \
	${includedir}/cups/language.h \
	${includedir}/cups/ppd.h \
	${includedir}/cups/pwg.h \
	${includedir}/cups/sidechannel.h \
	${includedir}/cups/transcode.h \
	${includedir}/cups/versioning.h \
	${libdir}/libcups.so \
	"

FILES_${PN}-staticdev = " \
	${libdir}/libcups.a \
	${libdir}/libcupscgi.a \
	${libdir}/libcupsimage.a \
	${libdir}/libcupsmime.a \
	${libdir}/libcupsppdc.a \
	"

FILES_libcupscgi1 = " \
	${libdir}/libcupscgi.so.1 \
	"

FILES_libcupscgi-dev = " \
	${includedir}/cups/cgi.h \
	${includedir}/cups/help-index.h \
	${libdir}/libcupscgi.so \
	"

FILES_libcupsimage2 = " \
	${libdir}/libcupsimage.so.2 \
	"

FILES_libcupsimage2-dev = " \
	${includedir}/cups/raster.h \
	${libdir}/libcupsimage.so \
	"

FILES_libcupsmime1 = " \
	${libdir}/libcupsmime.so.1 \
	"

FILES_libcupsmime-dev = " \
	${includedir}/cups/mime.h \
	${libdir}/libcupsmime.so \
	"

FILES_libcupsppdc1 = " \
	${libdir}/libcupsppdc.so.1 \
	"
FILES_libcupsppdc-dev = " \
	${includedir}/cups/ppdc.h \
	${libdir}/libcupsppdc.so \
	"

FILES_${PN}-libimage = " \
	${libdir}/libcupsimage.so.* \
	"

DOTDEBUG-dbg = "${bindir}/.debug ${sbindir}/.debug ${libexecdir}/.debug ${libdir}/.debug \
            ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug ${libdir}/${BPN}/.debug \
            ${libdir}/matchbox-panel/.debug /usr/src/debug"

DEBUGFILEDIRECTORY-dbg = "/usr/lib/debug /usr/src/debug"

FILES_${PN}-dbg = "${@d.getVar(['DOTDEBUG-dbg', 'DEBUGFILEDIRECTORY-dbg'][d.getVar('PACKAGE_DEBUG_SPLIT_STYLE', True) == 'debug-file-directory'], True)}"

FILES_${PN}-dbg += " \
	${libdir}/cups/backend-available/.debug \
	${libdir}/cups/backend/.debug \
	${libdir}/cups/cgi-bin/.debug \
	${libdir}/cups/filter/.debug \
	${libdir}/cups/monitor/.debug \
	${libdir}/cups/notifier/.debug \
	${libdir}/cups/daemon/.debug \
	${localstatedir} \
	${sysconfdir}/rc* \
	${sysconfdir}/dbus-1 \
	"

#package the html for the webgui inside the main packages (~1MB uncompressed)
FILES_${PN} += "${datadir}/doc/cups/images \
                ${datadir}/doc/cups/*html \
                ${datadir}/doc/cups/*.css \
                ${datadir}/icons/ \
               "

# Correct name of Debian package
DEBIANNAME_${PN}-dev = "libcups2-dev"
DEBIANNAME_libcupscgi-dev = "libcupscgi1-dev"
DEBIANNAME_libcupsmime-dev = "libcupsmime1-dev"
DEBIANNAME_libcupsppdc-dev = "libcupsppdc1-dev"

CONFFILES_${PN} += "${sysconfdir}/cups/cupsd.conf"

SYSROOT_PREPROCESS_FUNCS += "cups_sysroot_preprocess"
cups_sysroot_preprocess () {
	sed -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/cups-config -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:' -e 's:cups_serverbin=.*:cups_serverbin=${libdir}/cups:'
}

PARALLEL_MAKE = ""

repository: nghiaht-tsdv/meta-debian

repo_name: nghiaht-tsdv/meta-debian

branch_name: refs/heads/jethro


text:
require dnsmasq.inc

PR = "r3"

SRC_URI[dnsmasq-2.55.md5sum] = "b093d7c6bc7f97ae6fd35d048529232a"
SRC_URI[dnsmasq-2.55.sha256sum] = "cf63ecf5977f00474cbda98376a9d8743500a82fd98e13f43d7037bce9f9f929"

repository: ExorEmbedded/exor-workspace

repo_name: ExorEmbedded/exor-workspace


text:
@article{cl-2012-linguistics,
    title = "Computational Linguistics, Volume 38, Issue 1 - March 2012",
    journal = "Computational Linguistics",
    volume = "38",
    number = "1",
    year = "2012",
}
@article{gravano-etal-2012-affirmative,
    title = "Affirmative Cue Words in Task-Oriented Dialogue",
    author = "Gravano, Agust{\'\i}n  and
      Hirschberg, Julia  and
      Be{\v{n}}u{\v{s}}, {\v{S}}tefan",
    journal = "Computational Linguistics",
    volume = "38",
    number = "1",
    year = "2012",
    url = "https://www.aclweb.org/anthology/J12-1001",
    doi = "10.1162/COLI_a_00083",
    pages = "1--39",
}
@article{clarke-2012-context,
    title = "A Context-Theoretic Framework for Compositionality in Distributional Semantics",
    author = "Clarke, Daoud",
    journal = "Computational Linguistics",
    volume = "38",
    number = "1",
    year = "2012",
    url = "https://www.aclweb.org/anthology/J12-1002",
    doi = "10.1162/COLI_a_00084",
    pages = "41--71",
}
@article{berant-etal-2012-learning,
    title = "Learning Entailment Relations by Global Graph Structure Optimization",
    author = "Berant, Jonathan  and
      Dagan, Ido  and
      Goldberger, Jacob",
    journal = "Computational Linguistics",
    volume = "38",
    number = "1",
    year = "2012",
    url = "https://www.aclweb.org/anthology/J12-1003",
    doi = "10.1162/COLI_a_00085",
    pages = "73--111",
}
@article{power-williams-2012-generating,
    title = "Generating Numerical Approximations",
    author = "Power, Richard  and
      Williams, Sandra",
    journal = "Computational Linguistics",
    volume = "38",
    number = "1",
    year = "2012",
    url = "https://www.aclweb.org/anthology/J12-1004",
    doi = "10.1162/COLI_a_00086",
    pages = "113--134",
}
@article{furstenau-lapata-2012-semi,
    title = "Semi-Supervised Semantic Role Labeling via Structural Alignment",
    author = {F{\"u}rstenau, Hagen  and
      Lapata, Mirella},
    journal = "Computational Linguistics",
    volume = "38",
    number = "1",
    year = "2012",
    url = "https://www.aclweb.org/anthology/J12-1005",
    doi = "10.1162/COLI_a_00087",
    pages = "135--171",
}
@article{krahmer-van-deemter-2012-computational,
    title = "Computational Generation of Referring Expressions: A Survey",
    author = "Krahmer, Emiel  and
      van Deemter, Kees",
    journal = "Computational Linguistics",
    volume = "38",
    number = "1",
    year = "2012",
    url = "https://www.aclweb.org/anthology/J12-1006",
    doi = "10.1162/COLI_a_00088",
    pages = "173--218",
}
@article{biemann-2012-book,
    title = "Book Review: Graph-Based Natural Language Processing and Information Retrieval by Rada Mihalcea and Dragomir Radev",
    author = "Biemann, Chris",
    journal = "Computational Linguistics",
    volume = "38",
    number = "1",
    year = "2012",
    url = "https://www.aclweb.org/anthology/J12-1007",
    doi = "10.1162/COLI_r_00089",
}
@article{nn-2012-publications,
    title = "Publications Received",
    journal = "Computational Linguistics",
    volume = "38",
    number = "1",
    year = "2012",
    url = "https://www.aclweb.org/anthology/J12-1008",
    doi = "10.1162/COLI_r_00094",
}

repository: emorynlp/nlprankings

repo_name: emorynlp/nlprankings


text:
package one

import "math"

func PathInZigZagTree(label int) []int {
	level := 1
	for ; 1<<uint(level) <= label; level++ {
	}
	ans := make([]int, level)
	total := label
	current := int(math.Pow(float64(2), float64(level)))
	for index := level - 1; index >= 0; index-- {
		ans[index] = total
		current >>= 1
		total = current - (total-current)>>1 - 1
	}
	return ans
}

repository: zywaited/leetcode

repo_name: zywaited/leetcode


text:
#
# font-util_1.3.0.bb
#
SUMMARY = "X.Org font package creation/installation utilities"

require xorg-font-common.inc

#Unicode is MIT
LICENSE = "BSD & MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=c0067273d90f6336008cb2504e14bd32 \
                    file://ucs2any.c;endline=28;md5=8357dc567fc628bd12696f15b2a33bcb \
                    file://bdftruncate.c;endline=26;md5=4f82ffc101a1b165eae9c6998abff937 \
                    file://map-ISO8859-1;beginline=9;endline=23;md5=1cecb984063248f29ffe5c46f5c04f34"

DEPENDS = "encodings util-macros"
DEPENDS_class-native = "util-macros-native"
RDEPENDS_${PN} = "mkfontdir mkfontscale encodings"
RDEPENDS_${PN}_class-native = "mkfontdir-native mkfontscale-native"

PR = "${INC_PR}.0"

do_configure_prepend() {
        sed -i "s#MAPFILES_PATH=\`pkg-config#MAPFILES_PATH=\`PKG_CONFIG_PATH=\"${STAGING_LIBDIR_NATIVE}/pkg-config\" pkg-config#g" ${S}/fontutil.m4.in
}

BBCLASSEXTEND = "native"

SRC_URI[md5sum] = "ddfc8a89d597651408369d940d03d06b"
SRC_URI[sha256sum] = "dfa9e55625a4e0250f32fabab1fd5c8ffcd2d1ff2720d6fcf0f74bc8a5929195"

#
# debian
#
inherit debian-package
DEBIAN_SECTION = "x11"
DPR = "0"
DPN = "xfonts-utils"

# There is no debian patch
DEBIAN_PATCH_TYPE = "nopatch"

S = "${DEBIAN_UNPACK_DIR}/font-util"

repository: takuya-t/meta-debian

repo_name: takuya-t/meta-debian

branch_name: refs/heads/daisy


text:
DESCRIPTION = "yEnc module for Python"
SECTION = "devel/python"
DEPENDS = "python"
PRIORITY = "optional"
LICENSE = "GPL"
SRCNAME = "yenc"
PR = "ml1"

SRC_URI = "http://www.golug.it/pub/yenc/${SRCNAME}-${PV}.tar.gz"
S = "${WORKDIR}/${SRCNAME}-${PV}"

inherit distutils

SRC_URI[md5sum] = "5bdcad71607e4bf7874c9d5fa203c7c7"

gha_language: C


text:
package cmd

import (
	"bytes"
	"errors"
	"text/template"

	"github.com/spf13/cobra"

	"github.com/Shopify/themekit/src/cmdutil"
)

var (
	errNoThemes     = errors.New("No available themes")
	availableThemes = template.Must(template.New("availableThemes").Parse(`Available theme versions:
  {{- range . }}
  [{{ .ID }}]{{if eq .Role "main"}}[live]{{ end }} {{ .Name }}
  {{- end }}`))
)

var getCmd = &cobra.Command{
	Use:   "get",
	Short: "Get a theme and config from shopify",
	Long: `Get will get a theme from shopify and create a config.yml for the theme
 that it accesses. To get a list of all themes that you can access, you can pass in
 a --list flag.

 For more documentation please see http://shopify.github.io/themekit/commands/#get
 `,
	RunE: func(cmd *cobra.Command, args []string) error {
		return cmdutil.ForDefaultClient(flags, args, getTheme)
	},
}

func getTheme(ctx *cmdutil.Ctx) error {
	if ctx.Flags.List {
		themes, err := ctx.Client.Themes()
		if err != nil {
			return err
		} else if len(themes) == 0 {
			return errNoThemes
		}

		var tpl bytes.Buffer
		availableThemes.Execute(&tpl, themes)
		ctx.Log.Println(tpl.String())
		return nil
	}

	if err := createConfig(ctx); err != nil {
		return err
	}

	return download(ctx)
}

repository: shopify-guru/themekit

repo_name: shopify-guru/themekit


text:
// Copyright 2017-2021 Digital Asset Exchange Limited. All rights reserved.
// Use of this source code is governed by BSD-3-Clause "New" or "Revised"
// License (BSD-3-Clause) that can be found in the LICENSE file.

package api

import (
	"context"

	"github.com/AtlantPlatform/atlant-go/contracts"
	"github.com/AtlantPlatform/atlant-go/fs"
	"github.com/AtlantPlatform/atlant-go/rs"
	"github.com/AtlantPlatform/atlant-go/state"
)

// APIContext structure to store API Context
type APIContext struct {
	context.Context
}

// NewContext creates object of API Context
func NewContext(ctx context.Context, r rs.PlanetaryRecordStore, mgr contracts.Manager, ethAddr, logDir string) APIContext {
	ctx = context.WithValue(ctx, "rs", r)
	ctx = context.WithValue(ctx, "eth_addr", ethAddr)
	ctx = context.WithValue(ctx, "contracts", mgr)
	ctx = context.WithValue(ctx, "log_dir", logDir)
	return APIContext{ctx}
}

// NodeID returns Node ID
func (c APIContext) NodeID() string {
	return c.Value("node_id").(string)
}

// SessionID returns Session ID
func (c APIContext) SessionID() string {
	return c.Value("session_id").(string)
}

// Version returns Version
func (c APIContext) Version() string {
	return c.Value("ver").(string)
}

// LogDir returns path for logs
func (c APIContext) LogDir() string {
	return c.Value("log_dir").(string)
}

// RecordStore returns PlanetaryRecordStore object
func (c APIContext) RecordStore() rs.PlanetaryRecordStore {
	return c.Value("rs").(rs.PlanetaryRecordStore)
}

// FileStore returns PlanetaryFileStore object
func (c APIContext) FileStore() fs.PlanetaryFileStore {
	return c.Value("fs").(fs.PlanetaryFileStore)
}

// StateStore returns IndexedStore object
func (c APIContext) StateStore() state.IndexedStore {
	return c.Value("ss").(state.IndexedStore)
}

// ContractsManager returns manager for contracts
func (c APIContext) ContractsManager() contracts.Manager {
	v := c.Value("contracts")
	if v == nil {
		return nil
	}
	return v.(contracts.Manager)
}

// ETHAddr returns address of ethereum wallet of this node
func (c APIContext) ETHAddr() string {
	v := c.Value("eth_addr")
	if v == nil {
		return ""
	}
	return v.(string)
}

// Env returns environment
func (c APIContext) Env() string {
	return c.Value("env").(string)
}

repository: AtlantPlatform/atlant-go

repo_name: AtlantPlatform/atlant-go


text:
DESCRIPTION = "GNU Classpath modified to work with SableVM"
HOMEPAGE = "http://sablevm.org"
LICENSE = "Classpath"
PRIORITY = "optional"
SECTION = "libs"

DEPENDS = "glib-2.0 gtk+ libart-lgpl pango libxtst virtual/javac-native zip-native"
RDEPENDS_${PN} = "${PN}-native (>= ${PV})"

SRC_URI = "http://sablevm.org/download/release/${PV}/${PN}-${PV}.tar.gz \
           file://disable-automake-checks.patch"

SRC_URI[md5sum] = "0aed850f5583199b3d1adb41ac2043ed"
SRC_URI[sha256sum] = "5235747132974dd99591f0986224a82205201ea959e5be62f128378d5dc31003"

inherit autotools

EXTRA_OECONF = "--with-compressed-classes=zip"

PACKAGES += " ${PN}-native"

FILES_${PN} = "${datadir}/${PN} \
               ${libdir}/sablevm"
FILES_${PN}-native = "${libdir}/${PN}"

do_install() {
	autotools_do_install
	mv ${D}${libdir}/security ${D}${libdir}/${PN}
}

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty


text:
SUMMARY = "Settings DBUS object"
DESCRIPTION = "Settings DBUS object"
HOMEPAGE = "http://github.com/openbmc/phosphor-settingsd"
PR = "r1"

inherit obmc-phosphor-license
inherit obmc-phosphor-systemd

RDEPENDS_${PN} += "python-dbus python-pygobject"

SRC_URI += "git://github.com/ken1029/phosphor-settingsd"

SRCREV = "b96543d35c01983f07b2d6b60e205ed1fc03109e"

S = "${WORKDIR}/git"

do_install() {
        install -d ${D}/${sbindir}
        install ${S}/settings_file.py ${D}/${sbindir}
        install ${S}/settings_manager.py ${D}/${sbindir}
}


text:
package amazon

import (
	"errors"
	"fmt"

	"github.com/aws/aws-sdk-go/aws/awserr"
)

var (
	ErrInstanceTerminated = errors.New("instance is terminated")
	ErrInstanceEmptyID    = errors.New("instance ID is empty")
	ErrNoInstances        = errors.New("no instances found")
)

// OrigErr returns (unboxes) the underlying reason for the error.
//
// If err was not boxed and/or is not a specialised error, the function
// is effectively a nop.
func OrigErr(err error) error {
	switch e := err.(type) {
	case *NotFoundError:
		return e.Err
	case awserr.Error:
		return e.OrigErr()
	default:
		return err
	}
}

// EqualErr returns true when both errors are equal or underlying error for
// both of them are equal.
func EqualErr(lhs, rhs error) bool {
	return OrigErr(lhs) == OrigErr(rhs)
}

// IsErrCode returns true if err is of awserr.Error type and its code
// is one of the given codes; otherwise it returns false.
//
// For the list of possible error codes see:
//
//   https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html
//
func IsErrCode(err error, codes ...string) bool {
	e, ok := err.(awserr.Error)
	if !ok {
		return false
	}
	for _, code := range codes {
		if e.Code() == code {
			return true
		}
	}
	return false
}

// NotFoundError is a special kind of error returned by the Client wrapper.
// This error may occur because the recently created resource has not
// propagated through the system.
//
// For more details see:
//
//   https://docs.aws.amazon.com/AWSEC2/latest/APIReference/query-api-troubleshooting.html#eventual-consistency
//
type NotFoundError struct {
	Resource string // resource type that was requested
	Err      error  // underlying reason that caused the error
}

// Error implements the builtin error interface.
func (err *NotFoundError) Error() string {
	return fmt.Sprintf("%s not found: %s", err.Resource, err.Err)
}

// IsNotFound returns true if the given error is of *NotFoundError type.
func IsNotFound(err error) bool {
	_, ok := err.(*NotFoundError)
	return ok
}

func newNotFoundError(res string, err error) error {
	return &NotFoundError{
		Resource: res,
		Err:      err,
	}
}

// awsError wraps the given awserr.Error with:
//
//   - *NotFoundError, if the given error has one of the *.NotFound error codes
//
// Otherwise or if the err was nil the function is a nop.
func awsError(err error) error {
	e, ok := err.(awserr.Error)
	if !ok || err == nil {
		return err
	}
	// Based on: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html
	//
	// Not all error codes are listed as we don't use all AWS API calls.
	switch e.Code() {
	case "InvalidAddress.NotFound":
		return newNotFoundError("Address", err)
	case "InvalidAMIID.NotFound":
		return newNotFoundError("Image", err)
	case "InvalidGroup.NotFound":
		return newNotFoundError("SecurityGroup", err)
	case "InvalidInstanceID.NotFound":
		return newNotFoundError("Instance", err)
	case "InvalidKeyPair.NotFound":
		return newNotFoundError("KeyPair", err)
	case "InvalidSecurityGroupID.NotFound":
		return newNotFoundError("SecurityGroup", err)
	case "InvalidSnapshot.NotFound":
		return newNotFoundError("Snapshot", err)
	case "InvalidSubnetID.NotFound":
		return newNotFoundError("Subnet", err)
	case "InvalidVolume.NotFound":
		return newNotFoundError("Volume", err)
	case "InvalidVpcEndpointId.NotFound":
		return newNotFoundError("VPCEndpoint", err)
	case "InvalidVpcID.NotFound":
		return newNotFoundError("VPC", err)
	case "InvalidZone.NotFound":
		return newNotFoundError("Zone", err)
	default:
		return err
	}
}

repository: f/koding

repo_name: f/koding

gha_language: CoffeeScript


text:
inherit esw_examples features_check

REQUIRED_MACHINE_FEATURES = "v-frmbuf-wr"

ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_frmbuf_wr/examples/"

repository: Xilinx/meta-xilinx

repo_name: Xilinx/meta-xilinx


text:
package main

import (
	"fmt"
	"github.com/indeedhat/ButtonPad/DesktopApp/gui"
)

func main() {
	fmt.Println("starting")
	app := gui.NewUiController(func(conf bool) {
		fmt.Println("confirm clicked")
	}, func(layer, macro int, typ byte, label string, payload []byte) {
		fmt.Println("layer clicked")
	})

	fmt.Println("App added")

	app.Start()
	fmt.Println("closing app")
}

repository: indeedhat/ButtonPad

repo_name: indeedhat/ButtonPad


text:
# Recipe for compiling beignet for Intel 550x

require beignet.inc

EXTRA_OECMAKE_append = " -DGEN_PCI_ID=0x1A85"

repository: intel/intel-iot-refkit

repo_name: intel/intel-iot-refkit


text:
# Copyright (C) 2018 Metrological
# Released under the MIT license (see COPYING.MIT for the terms)

SUMMARY = "Minimal boot requirements for WPE"
DESCRIPTION = "The minimal set of packages required to boot the system for WPE"
LICENSE = "MIT"

PACKAGE_ARCH = "${MACHINE_ARCH}"

inherit packagegroup

#
# Set by the machine configuration with packages essential for device bootup
#
MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""

# Distro can override the following VIRTUAL-RUNTIME providers:
VIRTUAL-RUNTIME_dev_manager ?= "udev"
VIRTUAL-RUNTIME_login_manager ?= "busybox"
VIRTUAL-RUNTIME_init_manager ?= "sysvinit"
VIRTUAL-RUNTIME_initscripts ?= "initscripts"
VIRTUAL-RUNTIME_keymaps ?= "keymaps"

SYSVINIT_SCRIPTS = "modutils-initscripts \
                    ${VIRTUAL-RUNTIME_initscripts} \
                   "

RDEPENDS_${PN} = "\
    base-files \
    base-passwd \
    ${VIRTUAL-RUNTIME_base-utils} \
    ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '${SYSVINIT_SCRIPTS}', '', d)} \
    ${@bb.utils.contains('MACHINE_FEATURES', 'keyboard', '${VIRTUAL-RUNTIME_keymaps}', '', d)} \
    netbase \
    ${VIRTUAL-RUNTIME_login_manager} \
    ${VIRTUAL-RUNTIME_init_manager} \
    ${VIRTUAL-RUNTIME_dev_manager} \
    ${VIRTUAL-RUNTIME_update-alternatives} \
    ${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}"

RRECOMMENDS_${PN} = "\
    ${MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS}"

repository: WebPlatformForEmbedded/meta-wpe

repo_name: WebPlatformForEmbedded/meta-wpe