text:
# xfce4-panel OE build file

DESCRIPTION = "Xfce4 Panel"
DEPENDS = "virtual/libx11 startup-notification libxfcegui4 libxml2 exo libwnck"
SECTION = "x11"
PR = "r2"

inherit xfce46

EXTRA_OECONF += " --enable-startup-notification"

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

python populate_packages_prepend() {
	plugin_dir = bb.data.expand('${libdir}/xfce4/panel-plugins/', d)
	plugin_name = bb.data.expand('${PN}-plugin-%s', d)
	do_split_packages(d, plugin_dir, '^lib(.*).so$', plugin_name,
	                  '${PN} plugin for %s', extra_depends='', prepend=True,
	                  aux_files_pattern=['${datadir}/xfce4/panel-plugins/%s.desktop',
	                                     '${sysconfdir}/xdg/xfce/panel/%s-*',
	                                     '${datadir}/icons/hicolor/48x48/apps/*-%s.png',
	                                     '${bindir}/*%s*'])
}

PACKAGES_DYNAMIC = "${PN}-plugin-*"

SRC_URI[md5sum] = "88352816c84cbea57121b0c478976976"
SRC_URI[sha256sum] = "1d8ab1354c73935a5d12f0d7d226d26ae1b90fdd235460bdb57fd5651229bc8b"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD


text:
/*
Copyright (C) 2018 Expedia Group.

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 config

import (
	"net/url"
	"os"
	"github.com/HotelsDotCom/go-logger"
	"strings"
)

func ApiHost() *url.URL {

	hostEnv := getEnv("FLYTE_API", true)
	host, err := url.Parse(hostEnv)
	if err != nil {
		logger.Fatalf("FLYTE_API=%q is not valid URL: %v", hostEnv, err)
	}
	return host
}

func HipchatAuthTokens() []string {

	tokensEnv := getEnv("HIPCHAT_TOKENS", true)
	tokens := []string{}
	for _, t := range strings.Split(tokensEnv, ",") {
		tokens = append(tokens, strings.TrimSpace(t))
	}
	return tokens
}

func DefaultRoom() string {
	return getEnv("DEFAULT_JOIN_ROOM", false)
}

func BkpDir() string {
	return getEnv("BKP_DIR", false)
}

func getEnv(key string, required bool) string {

	v := os.Getenv(key)
	if required && v == "" {
		logger.Fatalf("env=%s not set", key)
	}
	return v
}

repository: HotelsDotCom/flyte-hipchat

license_type: permissive

repo_name: HotelsDotCom/flyte-hipchat

branch_name: refs/heads/master

gha_language: Go

extension: go


text:
SUMMARY  = "Appling JSON patches in Python 2.6+ and 3.x"
HOMEPAGE = "https://github.com/stefankoegl/python-json-patch"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=32b15c843b7a329130f4e266a281ebb3"

SRC_URI[md5sum] = "e86503f05fa192fa870d7004b8ce929a"
SRC_URI[sha256sum] = "cbb72f8bf35260628aea6b508a107245f757d1ec839a19c34349985e2c05645a"

inherit pypi setuptools

RDEPENDS:${PN} += "\
    ${PYTHON_PN}-json \
    ${PYTHON_PN}-jsonpointer \
    ${PYTHON_PN}-netclient \
    ${PYTHON_PN}-re \
    ${PYTHON_PN}-stringold \
"

SKIP_RECIPE[python-jsonpatch] ?= "${@bb.utils.contains('I_SWEAR_TO_MIGRATE_TO_PYTHON3', 'yes', '', 'python2 is out of support for long time, read https://www.python.org/doc/sunset-python-2/ https://python3statement.org/ and if you really have to temporarily use this, then set I_SWEAR_TO_MIGRATE_TO_PYTHON3 to "yes"', d)}"

branch_name: refs/heads/jansa/master

gha_license_id: MIT

gha_language: BitBake

extension: bb


text:
@article{2010,
  title={Treatment of Legal Sentences Including Itemization Written in Japanese, English and Vietnamese —Towards Translation into Logical Forms—},
  author={Makoto Nakamura and Yusuke Kimura and Minh Quang Nhat Pham and Le Minh Nguyen and Akira Shimazu},
  journal={Information and Media Technologies},
  volume={5},
  number={2},
  pages={930-949},
  year={2010},
  doi={10.11185/imt.5.930}
}

license: MIT

extension: bib


text:
@article{Pavlovskii-2018-Transformation,
    title = "Transformation of snow isotopic signature along groundwater recharge pathways in the Canadian Prairies",
    author = "Pavlovskii, Igor  and
      Hayashi, Masaki  and
      Lennon, Matthew R.",
    journal = "Journal of Hydrology, Volume 563",
    volume = "563",
    year = "2018",
    publisher = "Elsevier BV",
    url = "https://aclanthology.org/G18-97001",
    doi = "10.1016/j.jhydrol.2017.09.053",
    pages = "1147--1160",
    abstract = "Abstract Application of stable isotope methods to evaluate the contribution of different water sources to groundwater recharge relies on the knowledge about isotopic signatures of these sources. The data collected at study sites in the Canadian Prairies show that snowpack isotopic signatures exhibit a high spatial variability over a small scale (",
}

repository: gwf-uwaterloo/gwf-publications

repo_name: gwf-uwaterloo/gwf-publications

branch_name: refs/heads/main

gha_language: Python


text:
package dashing

import (
	"bytes"
	"encoding/json"
	"net/url"
)

type JobPublisher struct {
	client    *http.Client
	TargetURL *url.URL
	Job       Job
}

func NewJobPublisher(targetURL *url.URL, job Job) *JobPublisher {
	client := &http.Client{}
	jp := &JobPublisher{
		client:    client,
		TargetURL: targetURL,
		Job:       job,
	}

	return jp
}

func (j *JobPublisher) SendEvent(event Event) error {
	data := &bytes.Buffer{}

	enc := json.NewEncoder(data)
	enc.Encode(event.Body)

	resp, err := j.client.Post(j.TargetURL.String(), "application/json", data)
	if err != nil {
		return err
	}

	resp.Body.Close()
	return nil
}

func (j *JobPublisher) Start() {
	events := make(chan Event)

	go j.Job.Work(events)

	for {
		select {
		case e := <-events:
			j.SendEvent(e)
		}
	}
}

repository: patdowney/dashing-publisher

repo_name: patdowney/dashing-publisher


text:
package graph

import "math/rand"

// NamedVertices contains example named vertices
var NamedVertices = []string{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M"}

// DAG returns a weighted (random costs) directed acyclic graph.
func DAG() *Graph {
	g := New()

	rand.Seed(1)
	g.AddVertices(NamedVertices)
	g.AddEdge("A", "D", rand.Intn(20))
	g.AddEdge("B", "D", rand.Intn(20))
	g.AddEdge("C", "A", rand.Intn(20))
	g.AddEdge("C", "B", rand.Intn(20))
	g.AddEdges("D", []string{"H", "G"}, []int{rand.Intn(20), rand.Intn(20)})
	g.AddEdges("E", []string{"A", "D", "F"}, []int{rand.Intn(20), rand.Intn(20), rand.Intn(20)})
	g.AddEdges("F", []string{"K", "J"}, []int{rand.Intn(20), rand.Intn(20)})
	g.AddEdge("G", "I", rand.Intn(20))
	g.AddEdges("H", []string{"I", "J"}, []int{rand.Intn(20), rand.Intn(20)})
	g.AddEdge("I", "J", rand.Intn(20))
	g.AddEdges("J", []string{"L", "M"}, []int{rand.Intn(20), rand.Intn(20)})
	g.AddEdge("K", "J", rand.Intn(20))
	return g
}

// WithCycle returns a graph with a simple cycle
func WithCycle() *Graph {
	g := New()

	rand.Seed(1)
	g.AddVertices([]string{"A", "B", "C"})
	g.AddEdge("A", "B", rand.Intn(20))
	g.AddEdge("B", "C", rand.Intn(20))
	g.AddEdge("C", "A", rand.Intn(20))
	return g
}

// Directed returns a directed graph (with possible cycles)
func Directed(disconnected bool) *Graph {
	g := New()

	rand.Seed(1)
	g.AddVertices(NamedVertices)
	g.AddVertices(NamedVertices)
	g.AddEdges("A", []string{"B", "C"}, []int{rand.Intn(20), rand.Intn(20)})
	g.AddEdges("B", []string{"D"}, []int{rand.Intn(20)})
	g.AddEdges("C", []string{"E", "L"}, []int{rand.Intn(20), rand.Intn(20)})
	if !disconnected {
		g.AddEdges("D", []string{"F"}, []int{rand.Intn(20)})
		g.AddEdges("E", []string{"H"}, []int{rand.Intn(20)})
	} else {
		g.AddEdges("D", []string{}, []int{})
		g.AddEdges("E", []string{}, []int{})
	}
	g.AddEdges("F", []string{"G", "I"}, []int{rand.Intn(20), rand.Intn(20)})
	g.AddEdges("G", []string{}, []int{})
	g.AddEdges("H", []string{"F"}, []int{rand.Intn(20)})
	g.AddEdges("I", []string{"K", "G"}, []int{rand.Intn(20), rand.Intn(20)})
	g.AddEdges("J", []string{"F", "H"}, []int{rand.Intn(20), rand.Intn(20)})
	g.AddEdges("K", []string{"J"}, []int{rand.Intn(20)})
	if !disconnected {
		g.AddEdges("L", []string{"H"}, []int{rand.Intn(20)})
		g.AddEdges("M", []string{"B", "D", "G"}, []int{rand.Intn(20), rand.Intn(20), rand.Intn(20)})
	} else {
		g.AddEdges("L", []string{}, []int{})
		g.AddEdges("M", []string{"B", "D"}, []int{rand.Intn(20), rand.Intn(20)})
	}
	return g
}


text:
package util

import (
	sysValidator "github.com/go-playground/validator/v10"
	"reflect"
)

// ValidateFunc 校验是否是函数
func ValidateFunc(fun interface{}) {
	if reflect.TypeOf(fun).Kind() != reflect.Func {
		panic("fun must be a callable func")
	}
}

// ValidatePtr 校验是否是指针
func ValidatePtr(ptr interface{}) {
	if reflect.TypeOf(ptr).Kind() != reflect.Ptr {
		panic("fun must be a object ptr")
	}
}

type Validator interface {
	Validate(value interface{}) error
}

func NewFormValidator() Validator {
	return &validator{validate: sysValidator.New()}
}

type validator struct {
	validate *sysValidator.Validate
}

func (s *validator) Validate(value interface{}) error {
	return s.validate.Struct(value)
}

repository: muidea/magicCommon

repo_name: muidea/magicCommon


text:
/*
Copyright 2021 The Crossplane Authors.

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.
*/

// Code generated by ack-generate. DO NOT EDIT.

package globaltable

import (
	"github.com/aws/aws-sdk-go/aws/awserr"
	svcsdk "github.com/aws/aws-sdk-go/service/dynamodb"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

	svcapitypes "github.com/crossplane-contrib/provider-aws/apis/dynamodb/v1alpha1"
)

// NOTE(muvaf): We return pointers in case the function needs to start with an
// empty object, hence need to return a new pointer.

// GenerateDescribeGlobalTableInput returns input for read
// operation.
func GenerateDescribeGlobalTableInput(cr *svcapitypes.GlobalTable) *svcsdk.DescribeGlobalTableInput {
	res := &svcsdk.DescribeGlobalTableInput{}

	if cr.Status.AtProvider.GlobalTableName != nil {
		res.SetGlobalTableName(*cr.Status.AtProvider.GlobalTableName)
	}

	return res
}

// GenerateGlobalTable returns the current state in the form of *svcapitypes.GlobalTable.
func GenerateGlobalTable(resp *svcsdk.DescribeGlobalTableOutput) *svcapitypes.GlobalTable {
	cr := &svcapitypes.GlobalTable{}

	if resp.GlobalTableDescription.CreationDateTime != nil {
		cr.Status.AtProvider.CreationDateTime = &metav1.Time{*resp.GlobalTableDescription.CreationDateTime}
	} else {
		cr.Status.AtProvider.CreationDateTime = nil
	}
	if resp.GlobalTableDescription.GlobalTableArn != nil {
		cr.Status.AtProvider.GlobalTableARN = resp.GlobalTableDescription.GlobalTableArn
	} else {
		cr.Status.AtProvider.GlobalTableARN = nil
	}
	if resp.GlobalTableDescription.GlobalTableName != nil {
		cr.Status.AtProvider.GlobalTableName = resp.GlobalTableDescription.GlobalTableName
	} else {
		cr.Status.AtProvider.GlobalTableName = nil
	}
	if resp.GlobalTableDescription.GlobalTableStatus != nil {
		cr.Status.AtProvider.GlobalTableStatus = resp.GlobalTableDescription.GlobalTableStatus
	} else {
		cr.Status.AtProvider.GlobalTableStatus = nil
	}
	if resp.GlobalTableDescription.ReplicationGroup != nil {
		f4 := []*svcapitypes.Replica{}
		for _, f4iter := range resp.GlobalTableDescription.ReplicationGroup {
			f4elem := &svcapitypes.Replica{}
			if f4iter.RegionName != nil {
				f4elem.RegionName = f4iter.RegionName
			}
			f4 = append(f4, f4elem)
		}
		cr.Spec.ForProvider.ReplicationGroup = f4
	} else {
		cr.Spec.ForProvider.ReplicationGroup = nil
	}

	return cr
}

// GenerateCreateGlobalTableInput returns a create input.
func GenerateCreateGlobalTableInput(cr *svcapitypes.GlobalTable) *svcsdk.CreateGlobalTableInput {
	res := &svcsdk.CreateGlobalTableInput{}

	if cr.Spec.ForProvider.ReplicationGroup != nil {
		f0 := []*svcsdk.Replica{}
		for _, f0iter := range cr.Spec.ForProvider.ReplicationGroup {
			f0elem := &svcsdk.Replica{}
			if f0iter.RegionName != nil {
				f0elem.SetRegionName(*f0iter.RegionName)
			}
			f0 = append(f0, f0elem)
		}
		res.SetReplicationGroup(f0)
	}

	return res
}

// GenerateUpdateGlobalTableInput returns an update input.
func GenerateUpdateGlobalTableInput(cr *svcapitypes.GlobalTable) *svcsdk.UpdateGlobalTableInput {
	res := &svcsdk.UpdateGlobalTableInput{}

	if cr.Status.AtProvider.GlobalTableName != nil {
		res.SetGlobalTableName(*cr.Status.AtProvider.GlobalTableName)
	}

	return res
}

// IsNotFound returns whether the given error is of type NotFound or not.
func IsNotFound(err error) bool {
	awsErr, ok := err.(awserr.Error)
	return ok && awsErr.Code() == "GlobalTableNotFoundException"
}

repository: janwillies/stack-aws

repo_name: janwillies/stack-aws


text:
@inproceedings{jin2020Towards,
title={Towards Hierarchical Importance Attribution: Explaining Compositional Semantics for Neural Sequence Models},
author={Xisen Jin and Zhongyu Wei and Junyi Du and Xiangyang Xue and Xiang Ren},
booktitle={International Conference on Learning Representations},
year={2020},
url={https://openreview.net/forum?id=BkxRRkSKwr}
}

url: https://raw.githubusercontent.com/rbt-c/DL-NLP-Readings/82ca76e9184a3b00ac87129d99391477c85cfcd2/Bibtex/Towards Hierarchical Importance Attribution - Explaining Compositional Semantics for Neural Sequence Models.bib

repository: rbt-c/DL-NLP-Readings

repo_name: rbt-c/DL-NLP-Readings


text:
SECTION = "x11/utils"
DESCRIPTION = "gtk2 outliner written by Matthew Allum"
LICENSE = "GPLv2"
DEPENDS = "gtk+ libxml2"
PR = "r1"

SRC_URI = "http://handhelds.org/~mallum/downloadables/figment/figment-${PV}.tar.gz \
	file://dotdesktop-name-comment.patch;patch=1"
S = "${WORKDIR}/figment-${PV}"

inherit autotools


text:
package gosta

import (
	"github.com/elastic/go-elasticsearch/v7"
)

// Client type as an identifier for the Gosta instance
type Client struct {
	Es *elasticsearch.Client
}

// Config used by Gosta for a connection to ElasticSearch
type Config struct {
	Host string
	Port int
}

repository: wisn/gosta

repo_name: wisn/gosta


text:
/*-
 *
 * Hedera Mirror Node
 *
 * Copyright (C) 2019 - 2023 Hedera Hashgraph, LLC
 *
 * 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 construction

import (
	"testing"

	"github.com/hashgraph/hedera-mirror-node/hedera-mirror-rosetta/app/domain/types"
	"github.com/hashgraph/hedera-mirror-node/hedera-mirror-rosetta/app/interfaces"
	"github.com/hashgraph/hedera-mirror-node/hedera-mirror-rosetta/app/persistence/domain"
	"github.com/hashgraph/hedera-sdk-go/v2"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/suite"
)

func TestTokenDeleteTransactionConstructorSuite(t *testing.T) {
	suite.Run(t, new(tokenDeleteTransactionConstructorSuite))
}

type tokenDeleteTransactionConstructorSuite struct {
	suite.Suite
}

func (suite *tokenDeleteTransactionConstructorSuite) TestNewTransactionConstructor() {
	h := newTokenDeleteTransactionConstructor()
	assert.NotNil(suite.T(), h)
}

func (suite *tokenDeleteTransactionConstructorSuite) TestGetDefaultMaxTransactionFee() {
	h := newTokenDeleteTransactionConstructor()
	assert.Equal(suite.T(), types.HbarAmount{Value: 30_00000000}, h.GetDefaultMaxTransactionFee())
}

func (suite *tokenDeleteTransactionConstructorSuite) TestGetOperationType() {
	h := newTokenDeleteTransactionConstructor()
	assert.Equal(suite.T(), types.OperationTypeTokenDelete, h.GetOperationType())
}

func (suite *tokenDeleteTransactionConstructorSuite) TestGetSdkTransactionType() {
	h := newTokenDeleteTransactionConstructor()
	assert.Equal(suite.T(), "TokenDeleteTransaction", h.GetSdkTransactionType())
}

func (suite *tokenDeleteTransactionConstructorSuite) TestConstruct() {
	var tests = []struct {
		name             string
		token            domain.Token
		updateOperations updateOperationsFunc
		expectError      bool
	}{
		{name: "SuccessFT", token: dbTokenA},
		{name: "SuccessNFT", token: dbTokenC},
		{name: "EmptyOperations", token: dbTokenA, updateOperations: getEmptyOperations, expectError: true},
	}

	for _, tt := range tests {
		suite.T().Run(tt.name, func(t *testing.T) {
			// given
			operations := getTokenDeleteOperations(tt.token)
			h := newTokenDeleteTransactionConstructor()

			if tt.updateOperations != nil {
				operations = tt.updateOperations(operations)
			}

			// when
			tx, signers, err := h.Construct(defaultContext, operations)

			// then
			if tt.expectError {
				assert.NotNil(t, err)
				assert.Nil(t, signers)
				assert.Nil(t, tx)
			} else {
				assert.Nil(t, err)
				assert.ElementsMatch(t, []types.AccountId{accountIdA}, signers)
				assertTokenDeleteTransaction(t, operations[0], tx)
			}
		})
	}
}

func (suite *tokenDeleteTransactionConstructorSuite) TestParse() {
	defaultGetTransaction := func() interfaces.Transaction {
		return hedera.NewTokenDeleteTransaction().
			SetTokenID(tokenIdA).
			SetTransactionID(hedera.TransactionIDGenerate(sdkAccountIdA))
	}

	tests := []struct {
		name           string
		getTransaction func() interfaces.Transaction
		expectError    bool
	}{
		{name: "Success", getTransaction: defaultGetTransaction},
		{
			name: "InvalidTokenId",
			getTransaction: func() interfaces.Transaction {
				return hedera.NewTokenDeleteTransaction().
					SetTokenID(outOfRangeTokenId).
					SetTransactionID(hedera.TransactionIDGenerate(sdkAccountIdA))
			},
			expectError: true,
		},
		{
			name: "InvalidTransaction",
			getTransaction: func() interfaces.Transaction {
				return hedera.NewTransferTransaction()
			},
			expectError: true,
		},
		{
			name: "TokenIDNotSet",
			getTransaction: func() interfaces.Transaction {
				return hedera.NewTokenDeleteTransaction().SetTransactionID(hedera.TransactionIDGenerate(sdkAccountIdA))
			},
			expectError: true,
		},
		{
			name: "TransactionIDNotSet",
			getTransaction: func() interfaces.Transaction {
				return hedera.NewTokenDeleteTransaction().SetTokenID(tokenIdA)
			},
			expectError: true,
		},
	}

	for _, tt := range tests {
		suite.T().Run(tt.name, func(t *testing.T) {
			// given
			expectedOperations := getTokenDeleteOperations(getPartialDbToken(dbTokenA))

			h := newTokenDeleteTransactionConstructor()
			tx := tt.getTransaction()

			// when
			operations, signers, err := h.Parse(defaultContext, tx)

			// then
			if tt.expectError {
				assert.NotNil(t, err)
				assert.Nil(t, operations)
				assert.Nil(t, signers)
			} else {
				assert.Nil(t, err)
				assert.ElementsMatch(t, []types.AccountId{accountIdA}, signers)
				assert.ElementsMatch(t, expectedOperations, operations)
			}
		})
	}
}

func (suite *tokenDeleteTransactionConstructorSuite) TestPreprocess() {
	var tests = []struct {
		name             string
		updateOperations updateOperationsFunc
		expectError      bool
	}{
		{name: "Success"},
		{
			name:             "InvalidAmount",
			updateOperations: updateAmount(&types.HbarAmount{}),
			expectError:      true,
		},
		{
			name:             "InvalidAmountValue",
			updateOperations: updateAmountValue(10),
			expectError:      true,
		},
		{
			name:             "MultipleOperations",
			updateOperations: addOperation,
			expectError:      true,
		},
		{
			name:             "InvalidOperationType",
			updateOperations: updateOperationType(types.OperationTypeCryptoTransfer),
			expectError:      true,
		},
	}

	for _, tt := range tests {
		suite.T().Run(tt.name, func(t *testing.T) {
			// given
			operations := getTokenDeleteOperations(getPartialDbToken(dbTokenA))
			h := newTokenDeleteTransactionConstructor()

			if tt.updateOperations != nil {
				operations = tt.updateOperations(operations)
			}

			// when
			signers, err := h.Preprocess(defaultContext, operations)

			// then
			if tt.expectError {
				assert.NotNil(t, err)
				assert.Nil(t, signers)
			} else {
				assert.Nil(t, err)
				assert.ElementsMatch(t, []types.AccountId{accountIdA}, signers)
			}
		})
	}
}

func assertTokenDeleteTransaction(t *testing.T, operation types.Operation, actual interfaces.Transaction) {
	assert.False(t, actual.IsFrozen())
	assert.IsType(t, &hedera.TokenDeleteTransaction{}, actual)

	tx, _ := actual.(*hedera.TokenDeleteTransaction)
	token := tx.GetTokenID().String()
	assert.Equal(t, operation.Amount.GetSymbol(), token)
}

func getTokenDeleteOperations(token domain.Token) types.OperationSlice {
	return types.OperationSlice{
		{
			AccountId: accountIdA,
			Type:      types.OperationTypeTokenDelete,
			Amount:    types.NewTokenAmount(token, 0),
		},
	}
}

repository: steven-sheehy/hedera-mirror-node

repo_name: steven-sheehy/hedera-mirror-node

gha_language: Java


text:
inherit gpe

PR          = "r1"
LICENSE     = "GPL"
DESCRIPTION = "GPE file manager"
DEPENDS     = "libgpewidget gnome-vfs dbus-glib"
SECTION = "gpe"
RDEPENDS_${PN}    = "gpe-icons"
RRECOMMENDS_${PN} = "gnome-vfs-plugin-file"

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

SRC_URI[md5sum] = "2ddfe35b6bcf3269de704bfb44b568e1"
SRC_URI[sha256sum] = "434991a5c562ebb1e381e05dddc6c8916f5a8c851dc4d2a6b3781db1222a8f69"


text:
@article{young_when_2009,
	title = {When computers leave the classroom, so does boredom - {SMU}},
	url = {http://www.smu.edu/News/2009/jose-bowen-che-24july2009.aspx},
	abstract = {Excerpt: "College leaders usually brag about their tech-filled "smart" classrooms, but a dean at Southern Methodist University is proudly removing computers from lecture halls. Jose A. Bowen, dean of the Meadows School of the Arts, has challenged his colleagues to "teach naked"--by which he means, sans machines."},
	journaltitle = {The Chronicle of Higher Education},
	author = {Young, Jeffrey R.},
	urldate = {2011-04-13},
	date = {2009-07-20}
}

repository: pmean/build-website

repo_name: pmean/build-website


text:
@misc{www-h2o-webpage,
  title =	 {{H2O Documentation}},
  key =          {H2O},
  url =		 {https://h2o-release.s3.amazonaws.com/h2o/rel-turing/7/docs-website/h2o-docs/welcome.html},
  howpublished = {Web Page},

  year =	 2016,
  month =	 sep
}

@misc{www-h2oyoutubevideo,
  author =	 {{H2O.ai}},
  key =          {H2O, Oxdata},
  title =	 {{Oxdata H2O Explainer Video}},
  url =		 {https://www.youtube.com/watch?v=UGW3cT_cZLc},
  howpublished = {Web Page},

  year =	 2013,
  month =	 aug
}
@misc{www-h2o-requirements,

  title =	 {{Requirements of H2O}},
  url =		 {https://h2o-release.s3.amazonaws.com/h2o/rel-turing/7/docs-website/h2o-docs/welcome.html#requirements},
  howpublished = {Web Page},

  year =	 2016,
  month =	 sep
}
@misc{www-h2o-architecture,

  title =	 {{H2O Architecture}},
  Key =          {H2O},
  url =		 {https://h2o-release.s3.amazonaws.com/h2o/rel-turing/7/docs-website/h2o-docs/architecture.html},
  howpublished = {Web Page},

  year =	 2016,
  month =	 sep
}
@misc{www-h2o-capitalone,
  author =	 {{Brendan Herger}},
  title =	 {{Capital One on Machine Learning using H2O }},
  url =		 {https://www.youtube.com/watch?v=L6a8oITd2L8},
  howpublished = {Youtube Video},

  year =	 2016,
  month =	 jan
}

@misc{www-h2o-marketshare,
  author =	 {{Prateem Mandal}},
  title =	 {{MarketShare turns to H2O for Digital Marketing Analytics}},
  url =		 {https://www.youtube.com/watch?v=L6a8oITd2L8},
  howpublished = {Youtube Video},
  year =	 2016,
  month =	 jan
}
@misc{www-h2o-learn,

  title =	 {{Learn H2O}},
  url =		 {http://learn.h2o.ai},
  howpublished = {Web Page},
  year =	 2016,
  month =	 sep
}

@misc{www-h2o-why,

  title =	 {{Why H2O}},
  url =		 {http://www.h2o.ai/h2o/},
  howpublished = {Web Page},
  year =	 2016,
  month =	 sep
}
@misc{www-h2o-community,

  title =	 {{H2O Community}},
  url =		 {https://community.h2o.ai/index.html},
  howpublished = {Web Page},
  pages = {32}
}

@misc{www-h2o-meetups,

  title =	 {{H2O Meetups}},
  url =		 {http://www.h2o.ai/events/},
  howpublished = {Web Page}
}

@blog{www-h2o-steam,

  title =	 {{H2O.AI RELEASES STEAM}},
  url =		 {https://thomaswdinsmore.com/2016/10/12/h2o-ai-releases-steam/},
  howpublished = {Web Page},
  author  =      {Thomas W. Dinsmore},
  Year         = 2016,
  Month =        oct
}

@misc{www-h2o-steamgithub},

  title =	 {{Welcome to H2O Steam}},
  url =		 {https://github.com/h2oai/steam},
  howpublished  = {Web Page},
  key           = {H2O, steam, predictive analysis},
  Year          = 2017,
  Month         = feb
}

@misc{www-h2o-spark},

  title =	 {{Sparkling Water}},
  url =		 {https://github.com/h2oai/sparkling-water},
  howpublished  = {Web Page},
  key           = {H2O, sparkling water, spark},
  Year          = 2017,
  Month         = apr
}
@misc{www-h2o-deepwater},

  title =	 {{Deep Water}},
  url =		 {https://www.h2o.ai/deep-water/},
  howpublished  = {Web Page},
  key           = {H2O, deep water, GPU},
  Year          = 2017,
  Month         = apr
}

gha_language: TeX


text:
package config

import (
	"errors"
	"flag"
	"fmt"
	"io/ioutil"
	"os"
	"regexp"
	"strings"

	"github.com/pelletier/go-toml"
)

// A Set represents a set of defined configure flags. The zero value of a Set
// has no name and has ContinueOnError error handling.
type Set struct {
	*flag.FlagSet
}

// New returns a new config.Set with the given name and error handling
// policy. The three valid error handling policies are: ContinueOnError,
// ExitOnError, and PanicOnError.
func New(name string, errorHandling flag.ErrorHandling) *Set {
	return &Set{
		flag.NewFlagSet(name, errorHandling),
	}
}

// Parse takes a path to a TOML file and loads it. This must be called after
// all the config flags in the config.Set have been defined but before the flags
// are accessed by the program.
func (c *Set) Parse(path string) error {
	configBytes, err := ioutil.ReadFile(path)
	if err != nil {
		return err
	}

	tomlTree, err := toml.Load(string(configBytes))
	if err != nil {
		errorString := fmt.Sprintf("%s is not a valid TOML file. See https://github.com/mojombo/toml", path)
		return errors.New(errorString)
	}

	err = c.loadTomlTree(tomlTree, []string{})
	if err != nil {
		return err
	}

	return nil
}

// ParseString takes a string representation of a TOML file and loads it. This
// must be called after all the config flags in the config.Set have been defined
// but before the flags are accessed by the program.
func (c *Set) ParseString(str string) error {
	tomlTree, err := toml.Load(str)
	if err != nil {
		errorString := fmt.Sprintf("Not a valid TOML. See https://github.com/mojombo/toml")
		return errors.New(errorString)
	}

	err = c.loadTomlTree(tomlTree, []string{})
	if err != nil {
		return err
	}

	return nil
}

// ParseArguments parses flag definitions from the argument list, which should
// not include the command name. Must be called after all the config flags in
// the config.Set have been defined but before the flags are accessed by the
// program. The return value will be flag.ErrHelp if -help or -h were set but
// not defined.
func (c *Set) ParseArguments(arguments []string) error {
	return c.FlagSet.Parse(arguments)
}

// PrintCurrentValues prints lines in format
//    flagName=flagCurrentValue
// to the os.Stderr. Useful for showing current configuration to the user.
// The output format is subject to change.
func (c *Set) PrintCurrentValues() {
	c.VisitAll(func(f *flag.Flag) {
		fmt.Fprintf(os.Stderr, "%s=%v\n", f.Name, f.Value.String())
	})
}

// loadTomlTree recursively loads a TomlTree into this config.Set's config
// variables.
func (c *Set) loadTomlTree(tree *toml.TomlTree, path []string) error {
	for _, key := range tree.Keys() {
		fullPath := append(path, key)
		value := tree.Get(key)
		if subtree, isTree := value.(*toml.TomlTree); isTree {
			err := c.loadTomlTree(subtree, fullPath)
			if err != nil {
				return err
			}
		} else {
			fullPath := strings.Join(append(path, key), ".")
			err := c.Set(fullPath, fmt.Sprintf("%v", value))
			if err != nil {
				return buildLoadError(fullPath, err)
			}
		}
	}
	return nil
}

// buildLoadError takes an error from flag.FlagSet#Set and makes it a bit more
// readable, if it recognizes the format.
func buildLoadError(path string, err error) error {
	missingFlag := regexp.MustCompile(`^no such flag -([^\s]+)`)
	invalidSyntax := regexp.MustCompile(`^.+ parsing "(.+)": invalid syntax$`)
	errorString := err.Error()

	if missingFlag.MatchString(errorString) {
		errorString = missingFlag.ReplaceAllString(errorString, "$1 is not a valid config setting")
	} else if invalidSyntax.MatchString(errorString) {
		errorString = "The value for " + path + " is invalid"
	}

	return errors.New(errorString)
}

repository: go-kornel/go-toml-config

repo_name: go-kornel/go-toml-config


text:
@article{Rupasinghe-2019-Identification,
    title = "Identification of most spectrally distinguishable phenological stage of invasive Phramites australis in Lake Erie wetlands (Canada) for accurate mapping using multispectral satellite imagery",
    author = "Rupasinghe, Prabha Amali  and
      Chow-Fraser, Patricia",
    journal = "Wetlands Ecology and Management, Volume 27, Issue 4",
    volume = "27",
    number = "4",
    year = "2019",
    publisher = "Springer Science and Business Media LLC",
    url = "https://aclanthology.org/G19-152001",
    doi = "10.1007/s11273-019-09675-2",
    pages = "513--538",
    abstract = "",
}


text:
@inproceedings{guo-etal-2020-wiki,
    title = "{W}iki-40{B}: Multilingual Language Model Dataset",
    author = "Guo, Mandy  and
      Dai, Zihang  and
      Vrande{\v{c}}i{\'c}, Denny  and
      Al-Rfou, Rami",
    booktitle = "Proceedings of the 12th Language Resources and Evaluation Conference",
    month = may,
    year = "2020",
    address = "Marseille, France",
    publisher = "European Language Resources Association",
    url = "https://www.aclweb.org/anthology/2020.lrec-1.297",
    pages = "2440--2452",
    abstract = "We propose a new multilingual language model benchmark that is composed of 40+ languages spanning several scripts and linguistic families. With around 40 billion characters, we hope this new resource will accelerate the research of multilingual modeling. We train monolingual causal language models using a state-of-the-art model (Transformer-XL) establishing baselines for many languages. We also introduce the task of multilingual causal language modeling where we train our model on the combined text of 40+ languages from Wikipedia with different vocabulary sizes and evaluate on the languages individually. We released the cleaned-up text of 40+ Wikipedia language editions, the corresponding trained monolingual language models, and several multilingual language models with different fixed vocabulary sizes.",
    language = "English",
    ISBN = "979-10-95546-34-4",
}

repository: aboSamoor/rami

repo_name: aboSamoor/rami

gha_language: Jupyter Notebook


text:
package ecs

import "github.com/jiangshengwu/aliyun-sdk-for-go/util"

type RouteService interface {
	/**
	 * RouteTableId(required): RouteTableId
	 * DestinationCidrBlock(required): RouteEntry 的目的网段
	 * NextHopType: 下一跳的类型，可选值为 Instance | Tunnel，默认值为 Instance
	 * NextHopId: 路由条目的下一跳
	 * ClientToken(optional):
	 */
	CreateRouteEntry(param map[string]string) (CreateRouteEntryResponse, error)

	/**
	 * RouteTableId(required):
	 * DestinationCidrBlock(required):
	 * NextHopId(required):
	 */
	DeleteRouteEntry(params map[string]string) (DeleteRouteEntryResponse, error)

	/**
	 * VRouterId(required)
	 * RouteTableId
	 * PageNumber
	 * PageSize
	 */
	DescribeRouteTables(params map[string]string) (DescribeRouteTablesResponse, error)
}

type RouteOperator struct {
	Common *CommonParam
}

type CreateRouteEntryResponse struct {
	util.ErrorResponse
}

type DeleteRouteEntryResponse struct {
	util.ErrorResponse
}

type DescribeRouteTablesResponse struct {
	util.ErrorResponse
	util.PageResponse
	RouteTables RouteTableSetTypes `json:"RouteTables"`
}

type RouteTableSetTypes struct {
	RouteTableSetType []RouteTableSetType `json:"RouteTable"`
}

type RouteTableSetType struct {
	VRouterId      string             `json:"VRouterId"`
	RouteTableId   string             `json:"RouteTableId"`
	RouteEntrys    RouteEntrySetTypes `json:"RouteEntrys"`
	RouteTableType string             `json:"RouteTableType"`
	CreationTime   string             `json:"CreationTime"`
}

type RouteEntrySetTypes struct {
	RouteEntry []RouteEntrySetType `json:"RouteEntry"`
}

type RouteEntrySetType struct {
	RouteTableId         string `json:"RouteTableId"`
	DestinationCidrBlock string `json:"DestinationCidrBlock"`
	Type                 string `json:"Type"`
	NextHopId            string `json:"NextHopId"`
	Status               string `json:"Status"`
}

func (op *RouteOperator) CreateRouteEntry(params map[string]string) (CreateRouteEntryResponse, error) {
	var resp CreateRouteEntryResponse
	err := op.Common.Request(GetFuncName(1), params, &resp)
	return resp, err
}

func (op *RouteOperator) DeleteRouteEntry(params map[string]string) (DeleteRouteEntryResponse, error) {
	var resp DeleteRouteEntryResponse
	err := op.Common.Request(GetFuncName(1), params, &resp)
	return resp, err
}

func (op *RouteOperator) DescribeRouteTables(params map[string]string) (DescribeRouteTablesResponse, error) {
	var resp DescribeRouteTablesResponse
	err := op.Common.Request(GetFuncName(1), params, &resp)
	return resp, err
}

repository: LiuJunlang/aliyun-sdk-for-go

repo_name: LiuJunlang/aliyun-sdk-for-go


text:
package s_node

import (
	"fmt"
	"github.com/buexplain/go-blog/dao"
	m_node "github.com/buexplain/go-blog/models/node"
	"strings"
	"xorm.io/builder"
)

func Destroy(ids []int) (int64, error) {
	var err error
	var in string
	var notIn string
	in, err = builder.ToBoundSQL(builder.In("ID", ids))
	if err != nil {
		return 0, err
	}
	notIn, err = builder.ToBoundSQL(builder.In("Pid", ids))
	if err != nil {
		return 0, err
	}
	delNodeSql := fmt.Sprintf("DELETE FROM Node WHERE %s AND ID NOT IN (SELECT Pid FROM Node WHERE %s)", in, notIn)

	in, err = builder.ToBoundSQL(builder.In("NodeID", ids))
	if err != nil {
		return 0, err
	}
	notIn, err = builder.ToBoundSQL(builder.In("ID", ids))
	if err != nil {
		return 0, err
	}
	delRoleNodeRelationSql := fmt.Sprintf("DELETE FROM RoleNodeRelation WHERE %s AND NodeID NOT IN ( SELECT ID FROM Node WHERE %s)", in, notIn)

	//开启事务
	session := dao.Dao.NewSession()
	defer session.Close()
	if err := session.Begin(); err != nil {
		return 0, err
	}
	//删除节点
	if result, err := session.Exec(delNodeSql); err != nil {
		if err := session.Rollback(); err != nil {
			return 0, err
		}
		return 0, err
	} else {
		//获取受影响的行数
		var affected int64
		if affected, err = result.RowsAffected(); err != nil {
			if err := session.Rollback(); err != nil {
				return 0, err
			}
			return 0, err
		}
		if affected > 0 {
			//删除角色节点表
			if _, err := session.Exec(delRoleNodeRelationSql); err != nil {
				if err := session.Rollback(); err != nil {
					return 0, err
				}
				return 0, err
			}
		}
		//提交事务
		if err := session.Commit(); err != nil {
			return 0, err
		}
		//返回删除结果
		return affected, nil
	}
}

func Store(mod *m_node.Node) (affected int64, err error) {
	if mod.IsMenu == 0 {
		mod.IsMenu = m_node.IsMenuNo
	} else {
		mod.IsMenu = m_node.IsMenuYes
	}
	mod.URL = strings.Trim(mod.URL, " ")
	if mod.ID == 0 {
		return dao.Dao.MustCols("Pid", "Methods").Insert(mod)
	}
	return dao.Dao.ID(mod.ID).MustCols("Pid", "Methods").Update(mod)
}

//根据url获取node
func GetByURL(path string, method string) *m_node.Node {
	result := new(m_node.Node)
	has, err := dao.Dao.Table("Node").
		Where(fmt.Sprintf("`%s`.`%s` LIKE ?", "Node", "Methods"), fmt.Sprintf("%s%s%s", "%", method, "%")).Where("URL=?", path).
		Get(result)
	if err != nil || !has {
		return nil
	}
	return result
}

repository: buexplain/go-blog

repo_name: buexplain/go-blog

gha_language: JavaScript


text:
@book{bertsekas2008introduction,
    title = {Introduction To Probability},
    author = {Bertsekas, D.P. and Tsitsiklis, J.N.},
    isbn = {9781886529236},
    series = {Optimization and computation series},
    year = {2008},
    edition = {2},
    publisher = {Athena Scientific},
    url = {http://books.google.com.tr/books?id=yAy-PQAACAAJ,/bib/bertsekas/bertsekas2008introduction/15723_188652923XProbability2nd.pdf},
    keywords = {book.mathtext,ebook},
}

@misc{wiki:Matrix_multiplication,
   author = "{Wikipedia contributors}",
   title = "Matrix multiplication --- {W}ikipedia{,} The Free Encyclopedia",
   year = "2021",
   url = "https://en.wikipedia.org/wiki/Matrix_multiplication#Computational_complexity",
   note = "[Online; accessed 18-Apr-2021]"
 }


text:
@book{proell:mysql:2011,
 author = {Stefan Pröll and Eva Zangerle and Wolfgang Gassler},
 edition = {1st},
 publisher = {Galileo Computing},
 title = {MySQL - Das Handbuch für Administratoren},
 year = {2011}
}


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

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

license: Unlicense

extension: cmake


text:
package repo

// Interface the interface for querying the git repositories to be operated
type Interface interface {
	// List lists the repositories enabled for the git operator
	List() ([]Repository, error)
}

repository: gfppower/jx-git-operator

repo_name: gfppower/jx-git-operator


text:
package client

import (
	"bufio"
	"encoding/json"
	"github.com/nubunto/tcpchat/types"
	"io"
	"log"
	"net"
	"os"
	"time"
)

func Connect(ip, name string) {
	conn, err := net.Dial("tcp", ip)
	if err != nil {
		log.Fatal(err)
	}

	err = handshake(conn, name)
	if err != nil {
		log.Fatal(err)
	}
	intercept(os.Stdin, conn)
}

func handshake(conn net.Conn, name string) error {
	user := types.User{Name: name}

	jsonEncoder := json.NewEncoder(conn)
	jsonDecoder := json.NewDecoder(conn)

	var hsresult types.HandshakeResult
	if err := jsonEncoder.Encode(user); err != nil {
		return err
	}

	if err := jsonDecoder.Decode(&hsresult); err != nil {
		return err
	}

	if hsresult.Code == types.Ok {
		return nil
	}

	return hsresult
}

func intercept(reader io.Reader, conn net.Conn) {
	interfaceReader := bufio.NewReader(reader)
	go handleConn(conn)
	for {
		typed, err := interfaceReader.ReadString('\n')
		if err != nil {
			log.Println("[CLIENT ERROR]", err)
			continue
		}
		conn.Write([]byte(typed))
		time.Sleep(100 * time.Millisecond)
	}
}

func handleConn(conn net.Conn) {
	reader := bufio.NewReader(conn)
	defer conn.Close()
	for {
		message, err := reader.ReadString('\n')

		if err != nil {
			log.Println("[CLIENT ERROR]", err)
			break
		}

		log.Println(message)
		time.Sleep(100 * time.Millisecond)
	}
}

repository: nubunto/tcpchat

repo_name: nubunto/tcpchat


text:
DESCRIPTION = "Firmware Image generation"
SECTION = "bsp"
LICENSE = "CLOSED"

inherit externalsrc native
SRC_URI = "file://gen_mvs_img.sh "
SRC_URI += "file://mknorimg.sh "

S = "${THISDIR}/src"

do_install_append () {
	echo THISDIR = ${THISDIR}

	install -m 755 ${THISDIR}/files/gen_mvs_img.sh ${STAGING_BINDIR_NATIVE}
	install -m 755 ${THISDIR}/files/mknorimg.sh ${STAGING_BINDIR_NATIVE}

}

repository: xoware/meta-xonet-open

repo_name: xoware/meta-xonet-open


text:
@article{billingham_audit_2013,
	title = {An audit of sample sizes for pilot and feasibility trials being undertaken in the United Kingdom registered in the United Kingdom Clinical Research Network database},
	volume = {13},
	rights = {2013 Billingham et al.; licensee {BioMed} Central Ltd.},
	issn = {1471-2288},
	url = {http://www.biomedcentral.com/1471-2288/13/104/abstract},
	doi = {10.1186/1471-2288-13-104},
	abstract = {There is little published guidance as to the sample size required for a pilot or feasibility trial despite the fact that a sample size justification is a key element in the design of a trial. A sample size justification should give the minimum number of participants needed in order to meet the objectives of the trial. This paper seeks to describe the target sample sizes set for pilot and feasibility randomised controlled trials, currently running within the United Kingdom.
{PMID}: 23961782},
	pages = {104},
	number = {1},
	journaltitle = {{BMC} Medical Research Methodology},
	author = {Billingham, Sophie {AM} and Whitehead, Amy L. and Julious, Steven A.},
	urldate = {2014-05-07},
	date = {2013-08-20},
	langid = {english},
	pmid = {23961782}
}


text:
package hook_helpers

import (
	_ "github.com/snikch/goodman/hooks"
	_ "github.com/snikch/goodman/transaction"
)

repository: ansible-semaphore/semaphore

repo_name: ansible-semaphore/semaphore

branch_name: refs/heads/develop


text:
package ftp

const (
	StatusInitiating = 100
	StatusRestartMarker = 110
	StatusReadyMinute = 120
	StatusAlreadyOpen = 125
	StatusAboutToSend = 150

	StatusCommandOK = 200
	StatusCommandNotImplemented = 202
	StatusSystem = 211
	StatusDirectory = 212
	StatusFile = 213
	StatusHelp = 214
	StatusName = 215
	StatusReady = 220
	StatusClosing = 221
	StatusDataConnectionOpen = 225
	StatusClosingDataConnection = 226
	StatusPassiveMode = 227
	StatusLongPassiveMode = 228
	StatusExtendedPassiveMode = 229
	StatusLoggedIn = 230
	StatusLoggedOut = 231
	StatusLogoutAck = 232
	StatusRequestedFileActionOK = 250
	StatusPathCreated = 257

	StatusUserOK = 331
	StatusLoginNeedAccount = 332
	StatusRequestFilePending = 350

	StatusNotAvailable = 421
	StatusCanNotOpenDataConnection = 425
	StatusTransfertAborted = 426
	StatusInvalidCredentials = 430
	StatusHostUnavailable = 434
	StatusFileActionIgnored = 450
	StatusActionAborted = 451
	Status452 = 452

	StatusBadCommand = 500
	StatusBadArguments = 501
	StatusNotImplemented = 502
	StatusBadSequence = 503
	StatusNotImplementedParameter = 504
	StatusNotLoggedIn = 530
	StatusStorNeedAccount = 532
	StatusFileUnavailable = 550
	StatusPageTypeUnknown = 551
	StatusExceededStorage = 552
	StatusBadFileName = 553
)

var statusText = map[int]string{
	StatusCommandOK:		"Command okay",
	StatusCommandNotImplemented:	"Command not implemented, superfluous at this site",
	StatusSystem:			"System status, or system help reply",
	StatusDirectory:		"Directory status",
	StatusFile:			"File status",
	StatusHelp:			"Help message",
	StatusName:			"",
	StatusReady:			"Service ready for new user",
	StatusClosing:			"Service closing control connection",
	StatusDataConnectionOpen:	"Data connection open; no transfer in progress",
	StatusClosingDataConnection:	"Closing data connection. Requested file action successful",
	StatusPassiveMode:		"Entering Passive Mode",
	StatusLongPassiveMode:		"Entering Long Passive Mode",
	StatusExtendedPassiveMode:	"Entering Extended Passive Mode",
	StatusLoggedIn:			"User logged in, proceed",
	StatusLoggedOut:		"User logged out; service terminated",
	StatusLogoutAck:		"Logout command noted, will complete when transfer done",
	StatusRequestedFileActionOK:	"Requested file action okay, completed",
	StatusPathCreated:		"Path created",

	StatusUserOK:			"",
	StatusLoginNeedAccount:		"",
	StatusRequestFilePending:	"",

	StatusNotAvailable:		"",
	StatusCanNotOpenDataConnection:	"",
	StatusTransfertAborted:		"",
	StatusInvalidCredentials:	"",
	StatusHostUnavailable:		"",
	StatusFileActionIgnored:	"",
	StatusActionAborted:		"",
	Status452:			"",

	StatusBadCommand:		"",
	StatusBadArguments:		"",
	StatusNotImplemented:		"",
	StatusBadSequence:		"",
	StatusNotImplementedParameter:	"",
	StatusNotLoggedIn:		"",
	StatusStorNeedAccount:		"",
	StatusFileUnavailable:		"",
	StatusPageTypeUnknown:		"",
	StatusExceededStorage:		"",
	StatusBadFileName:		"",
}

license: ISC

repository: lugu/goftp

repo_name: lugu/goftp


text:
TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
  SUBPACKAGES_DIRS_CLASSIFICATIONS_OPTREQS
  Exodus      libraries/exodus        PT  REQUIRED
  Exodus_for  libraries/exodus_for    PT  OPTIONAL
  ExoIIv2for32 libraries/exoIIv2for32 PT  OPTIONAL
  Nemesis     libraries/nemesis       PT  OPTIONAL
  Ioss        libraries/ioss          PT  REQUIRED
  Chaco       libraries/chaco         PT  OPTIONAL
  Aprepro_lib libraries/aprepro_lib   PT  OPTIONAL
  Supes       libraries/supes         PT  OPTIONAL
  Suplib      libraries/suplib        PT  OPTIONAL
  SuplibC     libraries/suplib_c      PT  OPTIONAL
  SuplibCpp   libraries/suplib_cpp    PT  OPTIONAL
  SVDI        libraries/svdi          ST  OPTIONAL
  PLT         libraries/plt           ST  OPTIONAL
  Algebra     applications/algebra    PT  OPTIONAL
  Aprepro     applications/aprepro    PT  OPTIONAL
  Blot        applications/blot       ST  OPTIONAL
  Conjoin     applications/conjoin    PT  OPTIONAL
  Ejoin       applications/ejoin      PT  OPTIONAL
  Epu         applications/epu        PT  OPTIONAL
  Exo2mat     applications/exo2mat    ST  OPTIONAL
  Exodiff     applications/exodiff    PT  OPTIONAL
  Exomatlab   applications/exomatlab  ST  OPTIONAL
  Exotxt      applications/exotxt     PT  OPTIONAL
  Exo_format  applications/exo_format PT  OPTIONAL
  Ex1ex2v2    applications/ex1ex2v2   PT  OPTIONAL
  Fastq       applications/fastq      ST  OPTIONAL
  Gjoin       applications/gjoin      PT  OPTIONAL
  Gen3D       applications/gen3d      PT  OPTIONAL
  Genshell    applications/genshell   PT  OPTIONAL
  Grepos      applications/grepos     PT  OPTIONAL
  Grope       applications/grope      PT  OPTIONAL
  Mapvarlib   libraries/mapvarlib     PT  OPTIONAL
  Mapvar      applications/mapvar     PT  OPTIONAL
  Mapvar-kd   applications/mapvar-kd  PT  OPTIONAL
  Mat2exo     applications/mat2exo    ST  OPTIONAL
  Nemslice    applications/nem_slice  PT  OPTIONAL
  Nemspread   applications/nem_spread PT  OPTIONAL
  Numbers     applications/numbers    PT  OPTIONAL
  Slice	      applications/slice      ST  OPTIONAL
  Txtexo      applications/txtexo     PT  OPTIONAL
  Ex2ex1v2    applications/ex2ex1v2   PT  OPTIONAL
)

SET(LIB_OPTIONAL_DEP_TPLS MPI)


text:
@ARTICLE{DAG,
   author    = "A. Mishchenko and S. Chatterjee and R. Brayton",
   title     = "DAG-Aware AIG Rewriting: a fresh look at combinational logic synthesis",
   year      = 2006,
   pages     = "532 - 535",
   journal     = "Design Automation Conference, 2006 43rd ACM/IEEE",
}

@ARTICLE{GALOIS,
   author    = "D. Nguyen and A. Lenharth and K. Pingali",
   title     = "A lightweight infrastructure for graph analytics",
   year      = 2013,
   journal     = "Proceedings of ACM Symposium on Operating Systems Principles, SOSP 13",
      pages     = "456-471",
}

@ARTICLE{HEURISTIC,
   author    = "Z. Huang and L. Wang and Y. Nasikovskiy and A. Mishchenko",
   title     = "Fast Boolean Matching for Small Practical Functions",
   year      = 2013,
   journal   = "International Workshop on Logic and Synthesis, IWLS 13",

}


text:
require ${COREBASE}/meta/recipes-kernel/dtc/dtc.inc

LIC_FILES_CHKSUM = "file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
		    file://libfdt/libfdt.h;beginline=3;endline=52;md5=fb360963151f8ec2d6c06b055bcbb68c"

inherit debian-package
require recipes-debian/sources/device-tree-compiler.inc
FILESPATH_append = ":${COREBASE}/meta/recipes-kernel/dtc/dtc"

SRC_URI += "file://make_install.patch"

BBCLASSEXTEND = "native nativesdk"

repository: meta-debian/meta-debian

repo_name: meta-debian/meta-debian

branch_name: refs/heads/warrior


text:
DESCRIPTION = "NSS module for Multicast DNS name resolution"
HOMEPAGE = "http://0pointer.de/lennart/projects/nss-mdns/"
LICENSE = "GPL"
SECTION = "libs"
PRIORITY = "optional"

RRECOMMENDS_${PN} = "avahi-daemon zeroconf"
PR = "r1"

EXTRA_OECONF = "--libdir=/lib"
S = "${WORKDIR}/nss-mdns-${PV}"

SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz \
	   file://alignment-fix.patch;patch=1"

inherit autotools

pkg_postinst () {
	cat /etc/nsswitch.conf | grep "hosts:\s*files dns$" > /dev/null && {
		cat /etc/nsswitch.conf | sed 's/hosts:\s*files dns/& mdns/' > /tmp/nsswitch.conf
		mv /tmp/nsswitch.conf /etc/nsswitch.conf
	}
}

pkg_prerm () {
	cat /etc/nsswitch.conf | grep "hosts:\s*files dns mdns$" > /dev/null && {
		cat /etc/nsswitch.conf | sed 's/\(hosts:\s*files dns\) mdns/\1/' > /tmp/nsswitch.conf
		mv /tmp/nsswitch.conf /etc/nsswitch.conf
	}
}

repository: Terentyev/familiar-linux

repo_name: Terentyev/familiar-linux


text:
#
# This file is the power-advantage-tool recipe.
#

SUMMARY = "Power Advantage Tool"
SECTION = "PETALINUX/apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

inherit jupyter-examples python3-dir

SRC_URI = "git://gitenterprise.xilinx.com/PowerAdvantageTool/jupyter-pat.git;protocol=https;nobranch=1"

PV = "2.2.0+git${SRCPV}"
SRCREV = "caec49c66e436ff0c47239c168054f02ac641790"

S = "${WORKDIR}/git"

COMPATIBLE_MACHINE = "^$"
COMPATIBLE_MACHINE_vck-sc-zynqmp = "vck-sc-zynqmp"

RDEPENDS_${PN} = "packagegroup-petalinux-jupyter \
                  python3-ipywidgets \
                  python3-pydot \
                  "
do_install() {
    install -d ${D}/${JUPYTER_DIR}/power-advantage-tool
    install -d ${D}/${JUPYTER_DIR}/power-advantage-tool/img
    install -d ${D}${PYTHON_SITEPACKAGES_DIR}/poweradvantage

    install -m 0755 ${S}/*.ipynb ${D}/${JUPYTER_DIR}/power-advantage-tool
    install -m 0755 ${S}/img/* ${D}/${JUPYTER_DIR}/power-advantage-tool/img
    install -m 0755 ${S}/poweradvantage/* ${D}${PYTHON_SITEPACKAGES_DIR}/poweradvantage
}

FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}/poweradvantage/* ${JUPYTER_DIR}/*"

repository: sbahadirarslan/meta-petalinux

repo_name: sbahadirarslan/meta-petalinux


text:
// Copyright (C) 2019-2023 vdaas.org vald team <vald@vdaas.org>
//
// 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
//
//	https://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 grpc

import (
	"context"
	"fmt"

	"github.com/vdaas/vald/apis/grpc/v1/payload"
	"github.com/vdaas/vald/apis/grpc/v1/vald"
	"github.com/vdaas/vald/internal/errors"
	"github.com/vdaas/vald/internal/info"
	"github.com/vdaas/vald/internal/log"
	"github.com/vdaas/vald/internal/net/grpc"
	"github.com/vdaas/vald/internal/net/grpc/codes"
	"github.com/vdaas/vald/internal/net/grpc/errdetails"
	"github.com/vdaas/vald/internal/net/grpc/status"
	"github.com/vdaas/vald/internal/observability/trace"
	"github.com/vdaas/vald/internal/strings"
	"go.opentelemetry.io/otel/attribute"
)

func (s *server) Remove(ctx context.Context, req *payload.Remove_Request) (res *payload.Object_Location, err error) {
	_, span := trace.StartSpan(ctx, apiName+"/"+vald.RemoveRPCName)
	defer func() {
		if span != nil {
			span.End()
		}
	}()
	id := req.GetId()
	uuid := id.GetId()
	if len(uuid) == 0 {
		err = errors.ErrInvalidUUID(uuid)
		err = status.WrapWithInvalidArgument(fmt.Sprintf("Remove API invalid argument for uuid \"%s\" detected", uuid), err,
			&errdetails.RequestInfo{
				RequestId:   uuid,
				ServingData: errdetails.Serialize(req),
			},
			&errdetails.BadRequest{
				FieldViolations: []*errdetails.BadRequestFieldViolation{
					{
						Field:       "uuid",
						Description: err.Error(),
					},
				},
			},
			&errdetails.ResourceInfo{
				ResourceType: ngtResourceType + "/ngt.Remove",
				ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip),
			})
		if span != nil {
			span.RecordError(err)
			span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...)
			span.SetStatus(trace.StatusError, err.Error())
		}
		log.Warn(err)
		return nil, err
	}
	err = s.ngt.DeleteWithTime(uuid, req.GetConfig().GetTimestamp())
	if err != nil {
		var attrs []attribute.KeyValue
		if errors.Is(err, errors.ErrObjectIDNotFound(uuid)) {
			err = status.WrapWithNotFound(fmt.Sprintf("Remove API uuid %s not found", uuid), err,
				&errdetails.RequestInfo{
					RequestId:   uuid,
					ServingData: errdetails.Serialize(req),
				},
				&errdetails.ResourceInfo{
					ResourceType: ngtResourceType + "/ngt.Remove",
					ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip),
				})
			log.Warn(err)
			attrs = trace.StatusCodeNotFound(err.Error())
		} else if errors.Is(err, errors.ErrUUIDNotFound(0)) {
			err = status.WrapWithInvalidArgument(fmt.Sprintf("Remove API invalid argument for uuid \"%s\" detected", uuid), err,
				&errdetails.RequestInfo{
					RequestId:   uuid,
					ServingData: errdetails.Serialize(req),
				},
				&errdetails.BadRequest{
					FieldViolations: []*errdetails.BadRequestFieldViolation{
						{
							Field:       "uuid",
							Description: err.Error(),
						},
					},
				},
				&errdetails.ResourceInfo{
					ResourceType: ngtResourceType + "/ngt.Remove",
					ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip),
				})
			log.Warn(err)
			attrs = trace.StatusCodeInvalidArgument(err.Error())
		} else {
			err = status.WrapWithInternal("Remove API failed", err,
				&errdetails.RequestInfo{
					RequestId:   uuid,
					ServingData: errdetails.Serialize(req),
				},
				&errdetails.ResourceInfo{
					ResourceType: ngtResourceType + "/ngt.Remove",
					ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip),
				}, info.Get())
			log.Error(err)
			attrs = trace.StatusCodeInternal(err.Error())
		}
		if span != nil {
			span.RecordError(err)
			span.SetAttributes(attrs...)
			span.SetStatus(trace.StatusError, err.Error())
		}
		return nil, err
	}
	return s.newLocation(uuid), nil
}

func (s *server) StreamRemove(stream vald.Remove_StreamRemoveServer) (err error) {
	ctx, span := trace.StartSpan(stream.Context(), apiName+"/"+vald.StreamRemoveRPCName)
	defer func() {
		if span != nil {
			span.End()
		}
	}()
	err = grpc.BidirectionalStream(ctx, stream, s.streamConcurrency,
		func(ctx context.Context, req *payload.Remove_Request) (*payload.Object_StreamLocation, error) {
			ctx, sspan := trace.StartSpan(ctx, apiName+"/"+vald.StreamRemoveRPCName+"/id-"+req.GetId().GetId())
			defer func() {
				if sspan != nil {
					sspan.End()
				}
			}()
			res, err := s.Remove(ctx, req)
			if err != nil {
				st, msg, err := status.ParseError(err, codes.Internal, "failed to parse Remove gRPC error response")
				if sspan != nil {
					sspan.RecordError(err)
					sspan.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...)
					sspan.SetStatus(trace.StatusError, err.Error())
				}
				return &payload.Object_StreamLocation{
					Payload: &payload.Object_StreamLocation_Status{
						Status: st.Proto(),
					},
				}, err
			}
			return &payload.Object_StreamLocation{
				Payload: &payload.Object_StreamLocation_Location{
					Location: res,
				},
			}, nil
		})

	if err != nil {
		st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamRemove gRPC error response")
		if span != nil {
			span.RecordError(err)
			span.SetAttributes(trace.FromGRPCStatus(st.Code(), msg)...)
			span.SetStatus(trace.StatusError, err.Error())
		}
		return err
	}
	return nil
}

func (s *server) MultiRemove(ctx context.Context, reqs *payload.Remove_MultiRequest) (res *payload.Object_Locations, err error) {
	_, span := trace.StartSpan(ctx, apiName+"/"+vald.MultiRemoveRPCName)
	defer func() {
		if span != nil {
			span.End()
		}
	}()
	uuids := make([]string, 0, len(reqs.GetRequests()))
	for _, req := range reqs.GetRequests() {
		uuids = append(uuids, req.GetId().GetId())
	}
	err = s.ngt.DeleteMultiple(uuids...)
	if err != nil {
		var attrs []attribute.KeyValue
		if notFoundIDs := func() []string {
			aids := make([]string, 0, len(uuids))
			for _, id := range uuids {
				if errors.Is(err, errors.ErrObjectIDNotFound(id)) {
					aids = append(aids, id)
				}
			}
			return aids
		}(); len(notFoundIDs) != 0 {
			err = status.WrapWithNotFound(fmt.Sprintf("MultiRemove API uuids %v not found", notFoundIDs), err,
				&errdetails.RequestInfo{
					RequestId:   strings.Join(uuids, ", "),
					ServingData: errdetails.Serialize(reqs),
				},
				&errdetails.ResourceInfo{
					ResourceType: ngtResourceType + "/ngt.MultiRemove",
					ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip),
				})
			log.Warn(err)
			attrs = trace.StatusCodeNotFound(err.Error())
		} else if errors.Is(err, errors.ErrUUIDNotFound(0)) {
			err = status.WrapWithInvalidArgument(fmt.Sprintf("MultiRemove API invalid argument for uuids \"%v\" detected", uuids), err,
				&errdetails.RequestInfo{
					RequestId:   strings.Join(uuids, ", "),
					ServingData: errdetails.Serialize(reqs),
				},
				&errdetails.BadRequest{
					FieldViolations: []*errdetails.BadRequestFieldViolation{
						{
							Field:       "uuid",
							Description: err.Error(),
						},
					},
				},
				&errdetails.ResourceInfo{
					ResourceType: ngtResourceType + "/ngt.MultiRemove",
					ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip),
				})
			log.Warn(err)
			attrs = trace.StatusCodeInvalidArgument(err.Error())
		} else {
			err = status.WrapWithInternal("MultiRemove API failed", err,
				&errdetails.RequestInfo{
					RequestId:   strings.Join(uuids, ", "),
					ServingData: errdetails.Serialize(reqs),
				},
				&errdetails.ResourceInfo{
					ResourceType: ngtResourceType + "/ngt.MultiRemove",
					ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip),
				}, info.Get())
			log.Error(err)
			attrs = trace.StatusCodeInternal(err.Error())
		}
		if span != nil {
			span.RecordError(err)
			span.SetAttributes(attrs...)
			span.SetStatus(trace.StatusError, err.Error())
		}
		return nil, err
	}
	return s.newLocations(uuids...), nil
}

repository: vdaas/vald

repo_name: vdaas/vald


text:
require qt5.inc
require qt5-git.inc

HOMEPAGE = "http://www.qt.io"
LICENSE = "GFDL-1.3 & BSD-3-Clause & ( GPL-3.0-only & The-Qt-Company-GPL-Exception-1.0 | The-Qt-Company-Commercial ) & ( GPL-2.0-or-later | LGPL-3.0-only | The-Qt-Company-Commercial )"
LIC_FILES_CHKSUM = " \
    file://LICENSE.LGPLv21;md5=4bfd28363f541b10d9f024181b8df516 \
    file://LICENSE.LGPLv3;md5=e0459b45c5c4840b353141a8bbed91f0 \
    file://LICENSE.GPLv3;md5=88e2b9117e6be406b5ed6ee4ca99a705 \
    file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
"

DEPENDS += "qtbase"

SRCREV = "78ec450b81c403d3b4e6a2c178e300cef3637cca"


text:
// Package command defines the Command interface, and the Parser interface.
package command

// Command represents a command defined in the project.
//
// There is no requirement on the underlying implementation.
// Types implementing Command are supposed to be value types
// with all their fields being public.
type Command interface {
	// Command is a dummy method to mark the type as implementing the Command interface.
	Command()
}

// NOTE:
// See https://golang.org/src/go/ast/ast.go for examples of
// dummy interface methods in the standard library.

// Parser represents a command parser.
type Parser interface {
	// ParseCommand parses s and returns a Command.
	//
	// Errors
	//
	// common.ErrUnknownCommand:
	// Will be returned if s contains a command not recognized by this parser.
	//
	// common.ErrInvalidArgumentCount:
	// Will be returned if s contains a command recognized by this parser,
	// but the argument count is invalid.
	//
	// Other errors:
	// May be returned depending on the commands supported.
	//
	ParseCommand(s string) (Command, error)
}

repository: asukakenji/drawing-challenge

repo_name: asukakenji/drawing-challenge


text:
@misc{chao_2022_pas_srb,
title={Estimating and Projecting Prenatal Sex Discrimination around the World and on Subnational Level in Asia},
url={https://doi.org/10.6084/m9.figshare.20508330},
DOI={10.6084/m9.figshare.20508330},
publisher={figshare},
author={Chao, Fengqing},
year={2022},
month={Aug}
}

repository: pinwheelovefaye/academic-kickstart

repo_name: pinwheelovefaye/academic-kickstart


text:
#------------------------------------------------------
# Openmoko Image Recipe
#------------------------------------------------------

require openmoko-minimal-image.bb

IMAGE_INSTALL += "\
  task-openmoko-net \
  task-openmoko-ui \
  task-openmoko-base \
  task-openmoko-phone \
  task-openmoko-games \
  task-openmoko-pim \
  "

DEPENDS += "\
  task-openmoko \
  "

inherit image


text:
@InProceedings{parkhi12a,
  author       = "Parkhi, O. M. and Vedaldi, A. and Zisserman, A. and Jawahar, C.~V.",
  title        = "Cats and Dogs",
  booktitle    = "IEEE Conference on Computer Vision and Pattern Recognition",
  year         = "2012",
}

repository: tensorflow/datasets

repo_name: tensorflow/datasets


text:
@article{lin2016pet,
  title={PET CT identifies reactivation risk in cynomolgus macaques with latent M. tuberculosis},
  author={Lin, Philana Ling and Maiello, Pauline and Gideon, Hannah P and Coleman, M Teresa and Cadena, Anthony M and Rodgers, Mark A and Gregg, Robert and O’Malley, Melanie and Tomko, Jaime and Fillmore, Daniel and others},
  journal={PLoS pathogens},
  volume={12},
  number={7},
  pages={e1005739},
  year={2016},
  publisher={Public Library of Science}
}

repository: RobertGregg/Website

repo_name: RobertGregg/Website


text:
# Create a variable for various CMake directories
set(PROJECT_CMAKE_DIR ${PROJECT_SOURCE_DIR}/cmake)
set(CMAKE_CMAKE_DIR ${CMAKE_SOURCE_DIR}/cmake)
set(CODE_TEMPLATE_CMAKE_DIR ${CODE_TEMPLATE_DIR}/cmake)

# Define Third party related directories
if(CMAKE_BUILD_TYPE STREQUAL "")
  set(THIRD_PARTY_ROOT_DIR
    ${THIRD_PARTY_DIR}/${CMAKE_SYSTEM_PROCESSOR}/__default__)
else()
  set(THIRD_PARTY_ROOT_DIR
    ${THIRD_PARTY_DIR}/${CMAKE_SYSTEM_PROCESSOR}/${CMAKE_BUILD_TYPE})
endif()
set(THIRD_PARTY_FIND_DIR ${THIRD_PARTY_ROOT_DIR}${CMAKE_INSTALL_PREFIX})

# Define where to find third party libraries
set(CMAKE_FIND_ROOT_PATH ${THIRD_PARTY_ROOT_DIR})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM both)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY only)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE only)

repository: GatorQue/codetemplate

repo_name: GatorQue/codetemplate


text:
package main

import (
	"github.com/hashicorp/terraform/helper/schema"
	tf "github.com/hashicorp/terraform/terraform"
	"github.com/terraform-providers/__FULL_NAME__/__NAME__"

	"encoding/json"
	"fmt"
	"os"
	"path/filepath"
	"reflect"
	"time"
)

// ExportSchema should be called to export the structure
// of the provider.
func Export(p *schema.Provider) *ResourceProviderSchema {
	result := new(ResourceProviderSchema)

	result.Name = "__NAME__"
	result.Type = "provider"
	result.Version = "__REVISION__"
	result.Provider = schemaMap(p.Schema).Export()
	result.Resources = make(map[string]SchemaInfoWithTimeouts)
	result.DataSources = make(map[string]SchemaInfoWithTimeouts)

	for k, r := range p.ResourcesMap {
		result.Resources[k] = ExportResourceWithTimeouts(r)
	}
	for k, ds := range p.DataSourcesMap {
		result.DataSources[k] = ExportResourceWithTimeouts(ds)
	}

	return result
}

const (
	TimeoutCreate  = "create"
	TimeoutRead    = "read"
	TimeoutUpdate  = "update"
	TimeoutDelete  = "delete"
	TimeoutDefault = "default"
)

func timeoutKeys() []string {
	return []string{
		TimeoutCreate,
		TimeoutRead,
		TimeoutUpdate,
		TimeoutDelete,
		TimeoutDefault,
	}
}

func ExportResourceWithTimeouts(r *schema.Resource) SchemaInfoWithTimeouts {
	var timeouts []string
	t := r.Timeouts
	if t != nil {
		for _, key := range timeoutKeys() {
			var timeout *time.Duration
			switch key {
			case TimeoutCreate:
				timeout = t.Create
			case TimeoutUpdate:
				timeout = t.Update
			case TimeoutRead:
				timeout = t.Read
			case TimeoutDelete:
				timeout = t.Delete
			case TimeoutDefault:
				timeout = t.Default
			default:
				panic("Unsupported timeout key, update switch statement!")
			}
			if timeout != nil {
				timeouts = append(timeouts, key)
			}
		}
	}
	result := make(SchemaInfoWithTimeouts)
	for nk, nv := range ExportResource(r) {
		result[nk] = nv
	}
	if len(timeouts) > 0 {
		result["__timeouts__"] = timeouts
	}
	return result
}

func ExportResource(r *schema.Resource) SchemaInfo {
	return schemaMap(r.Schema).Export()
}

// schemaMap is a wrapper that adds nice functions on top of schemas.
type schemaMap map[string]*schema.Schema

// Export exports the format of this schema.
func (m schemaMap) Export() SchemaInfo {
	result := make(SchemaInfo)
	for k, v := range m {
		item := export(v)
		result[k] = item
	}
	return result
}

func export(v *schema.Schema) SchemaDefinition {
	item := SchemaDefinition{}

	item.Type = shortenType(fmt.Sprintf("%s", v.Type))
	item.Optional = v.Optional
	item.Required = v.Required
	item.Description = v.Description
	item.InputDefault = v.InputDefault
	item.Computed = v.Computed
	item.MaxItems = v.MaxItems
	item.MinItems = v.MinItems
	item.PromoteSingle = v.PromoteSingle
	item.ComputedWhen = v.ComputedWhen
	item.ConflictsWith = v.ConflictsWith
	item.Deprecated = v.Deprecated
	item.Removed = v.Removed

	if v.Elem != nil {
		item.Elem = exportValue(v.Elem, fmt.Sprintf("%T", v.Elem))
	}

	// TODO: Find better solution
	if defValue, err := v.DefaultValue(); err == nil && defValue != nil && !reflect.DeepEqual(defValue, v.Default) {
		item.Default = exportValue(defValue, fmt.Sprintf("%T", defValue))
	}
	return item
}

func shortenType(value string) string {
  if (len(value) > 4 && value[0:4] == "Type") {
    return value[4:]
  }
  return value
}

func exportValue(value interface{}, t string) *SchemaElement {
	s2, ok := value.(*schema.Schema)
	if ok {
		return &SchemaElement{Type: "SchemaElements", ElementsType: shortenType(fmt.Sprintf("%s", s2.Type))}
	}
	r2, ok := value.(*schema.Resource)
	if ok {
		return &SchemaElement{Type: "SchemaInfo", Info: ExportResource(r2)}
	}
	vt, ok := value.(schema.ValueType)
	if ok {
	  return &SchemaElement{Value: shortenType(fmt.Sprintf("%v", vt))}
	}
	// Unknown case
	return &SchemaElement{Type: t, Value: fmt.Sprintf("%v", value)}
}

func Generate(provider *schema.Provider, name string, outputPath string) {
	outputFilePath := filepath.Join(outputPath, fmt.Sprintf("%s.json", name))

	if err := DoGenerate(provider, name, outputFilePath); err != nil {
		fmt.Fprintln(os.Stderr, "Error: ", err.Error())
		os.Exit(255)
	}
}

func DoGenerate(provider *schema.Provider, providerName string, outputFilePath string) error {
	providerJson, err := json.MarshalIndent(Export(provider), "", "  ")

	if err != nil {
		return err
	}

	file, err := os.Create(outputFilePath)
	if err != nil {
		return err
	}

	defer file.Close()

	_, err = file.Write(providerJson)
	if err != nil {
		return err
	}

	return file.Sync()
}

type SchemaElement struct {
	// One of "schema.ValueType" or "SchemaElements" or "SchemaInfo"
	Type string `json:",omitempty"`
	// Set for simple types (from ValueType)
	Value string `json:",omitempty"`
	// Set if Type == "SchemaElements"
	ElementsType string `json:",omitempty"`
	// Set if Type == "SchemaInfo"
	Info SchemaInfo `json:",omitempty"`
}

type SchemaDefinition struct {
	Type          string `json:",omitempty"`
	Optional      bool   `json:",omitempty"`
	Required      bool   `json:",omitempty"`
	Description   string `json:",omitempty"`
	InputDefault  string `json:",omitempty"`
	Computed      bool   `json:",omitempty"`
	MaxItems      int    `json:",omitempty"`
	MinItems      int    `json:",omitempty"`
	PromoteSingle bool   `json:",omitempty"`

	ComputedWhen  []string `json:",omitempty"`
	ConflictsWith []string `json:",omitempty"`

	Deprecated string `json:",omitempty"`
	Removed    string `json:",omitempty"`

	Default *SchemaElement `json:",omitempty"`
	Elem    *SchemaElement `json:",omitempty"`
}

type SchemaInfo map[string]SchemaDefinition
type SchemaInfoWithTimeouts map[string]interface{}
//{
//	SchemaInfo `json:""`
//	Timeouts []string `json:"__timeouts__,omitempty"`
//}

// ResourceProviderSchema
type ResourceProviderSchema struct {
	Name        string                `json:"name"`
	Type        string                `json:"type"`
	Version     string                `json:"version"`
	Provider    SchemaInfo            `json:"provider"`
	Resources   map[string]SchemaInfoWithTimeouts `json:"resources"`
	DataSources map[string]SchemaInfoWithTimeouts `json:"data-sources"`
}

func main() {
	var provider tf.ResourceProvider
	provider = __NAME__.Provider()
	Generate(provider.(*schema.Provider), "__NAME__", "__OUT__")
}

repository: rjshep/intellij-hcl

repo_name: rjshep/intellij-hcl

gha_language: Kotlin


text:
DESCRIPTION = "nEo etk theme - a very fast, high contrast etk theme"
HOMEPAGE = "http://jmccloud.jm.funpic.de"
AUTHOR = "Jesus McCloud <bernd.pruenster@gmail.com"
RRECOMMENDS = "elementary-theme-neo e-wm-theme-illume-neo gtk-theme-neo libframeworkd-phonegui-efl-theme-neo gpe-theme-neo icon-theme-neo"
LICENSE = "unknown"

PV = "0.2-${EFL_SRCREV}+gitr${SRCREV}"
PR = "r2"

SRC_URI = "git://git.shr-project.org/repo/shr-themes.git;protocol=http;branch=master"

require etk-theme.inc

repository: demsey/openembedded

repo_name: demsey/openembedded


text:
package kdmp

import (
	"fmt"
	"os"
	"reflect"
	"strings"

	snapv1 "github.com/kubernetes-incubator/external-storage/snapshot/pkg/apis/crd/v1"
	snapshotVolume "github.com/kubernetes-incubator/external-storage/snapshot/pkg/volume"
	storkvolume "github.com/libopenstorage/stork/drivers/volume"
	storkapi "github.com/libopenstorage/stork/pkg/apis/stork/v1alpha1"
	"github.com/libopenstorage/stork/pkg/errors"
	"github.com/libopenstorage/stork/pkg/log"
	kdmpapi "github.com/portworx/kdmp/pkg/apis/kdmp/v1alpha1"
	"github.com/portworx/kdmp/pkg/drivers"
	"github.com/portworx/sched-ops/k8s/core"
	kdmpShedOps "github.com/portworx/sched-ops/k8s/kdmp"
	"github.com/portworx/sched-ops/k8s/storage"
	"github.com/sirupsen/logrus"
	v1 "k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/runtime"
	k8shelper "k8s.io/kubernetes/pkg/apis/core/v1/helper"
)

const (
	// driverName is the name of the kdmp driver implementation
	driverName    = "kdmp"
	proxyEndpoint = "proxy_endpoint"
	proxyPath     = "proxy_nfs_exportpath"
	// StorkAPIVersion current api version supported by stork
	StorkAPIVersion = "stork.libopenstorage.org/v1alpha1"
)

type kdmp struct {
	storkvolume.ClusterPairNotSupported
	storkvolume.MigrationNotSupported
	storkvolume.GroupSnapshotNotSupported
	storkvolume.ClusterDomainsNotSupported
	storkvolume.CloneNotSupported
	storkvolume.SnapshotRestoreNotSupported
}

func (k *kdmp) Init(_ interface{}) error {
	return nil
}

func (k *kdmp) String() string {
	return driverName
}

func (k *kdmp) Stop() error {
	return nil
}

func (k *kdmp) OwnsPVC(coreOps core.Ops, pvc *v1.PersistentVolumeClaim) bool {
	// Try to get info from the PV since storage class could be deleted
	pv, err := coreOps.GetPersistentVolume(pvc.Spec.VolumeName)
	if err != nil {
		log.PVCLog(pvc).Warnf("error getting pv %v for pvc %v: %v", pvc.Spec.VolumeName, pvc.Name, err)
		return false
	}
	// for px proxy volume use kdmp by default
	storageClassName := k8shelper.GetPersistentVolumeClaimClass(pvc)
	if storageClassName != "" {
		storageClass, err := storage.Instance().GetStorageClass(storageClassName)
		if err != nil {
			logrus.Warnf("Error getting storageclass %v for pvc %v: %v", storageClassName, pvc.Name, err)
		}
		if _, ok := storageClass.Parameters[proxyEndpoint]; ok {
			return true
		}
	}
	return k.OwnsPV(pv)
}

func (k *kdmp) OwnsPV(pv *v1.PersistentVolume) bool {

	// for csi volumes (with or without snapshot) use kdmp driver by default
	// except for px csi volumes
	if pv.Spec.CSI != nil {
		// in case of px csi volume fall back to default csi volume driver
		if pv.Spec.CSI.Driver == snapv1.PortworxCsiProvisionerName ||
			pv.Spec.CSI.Driver == snapv1.PortworxCsiDeprecatedProvisionerName {
			return false
		}
		log.PVLog(pv).Tracef("KDMP (csi) owns PV: %s", pv.Name)
		return true
	}

	return false
}

func (k *kdmp) StartBackup(backup *storkapi.ApplicationBackup,
	pvcs []v1.PersistentVolumeClaim,
) ([]*storkapi.ApplicationBackupVolumeInfo, error) {
	log.ApplicationBackupLog(backup).Debugf("started generic backup: %v", backup.Name)
	volumeInfos := make([]*storkapi.ApplicationBackupVolumeInfo, 0)
	for _, pvc := range pvcs {
		if pvc.DeletionTimestamp != nil {
			log.ApplicationBackupLog(backup).Warnf("Ignoring PVC %v which is being deleted", pvc.Name)
			continue
		}
		volumeInfo := &storkapi.ApplicationBackupVolumeInfo{}
		volumeInfo.PersistentVolumeClaim = pvc.Name
		volumeInfo.Namespace = pvc.Namespace
		volumeInfo.DriverName = driverName
		volume, err := core.Instance().GetVolumeForPersistentVolumeClaim(&pvc)
		if err != nil {
			return nil, fmt.Errorf("error getting volume for PVC: %v", err)
		}
		volumeInfo.Volume = volume

		// create kdmp cr
		dataExport := &kdmpapi.DataExport{}
		dataExport.Name = backup.Name + "-" + pvc.Namespace + "-" + pvc.Name
		dataExport.Namespace = pvc.Namespace
		// TODO: this needs to be generic, maybe read it from configmap
		dataExport.Spec.Type = kdmpapi.DataExportKopia
		dataExport.Spec.Destination = kdmpapi.DataExportObjectReference{
			Kind:       reflect.TypeOf(storkapi.BackupLocation{}).Name(),
			Name:       backup.Spec.BackupLocation,
			Namespace:  backup.Namespace,
			APIVersion: StorkAPIVersion,
		}
		dataExport.Spec.Source = kdmpapi.DataExportObjectReference{
			Kind:       pvc.Kind,
			Name:       pvc.Name,
			Namespace:  pvc.Namespace,
			APIVersion: pvc.APIVersion,
		}
		_, err = kdmpShedOps.Instance().CreateDataExport(dataExport)
		if err != nil {
			logrus.Errorf("failed to create DataExport CR: %v", err)
			return volumeInfos, err
		}
		logrus.Debugf("adding volume info: %v", volumeInfo)
		volumeInfos = append(volumeInfos, volumeInfo)
	}

	return volumeInfos, nil
}

func (k *kdmp) GetBackupStatus(backup *storkapi.ApplicationBackup) ([]*storkapi.ApplicationBackupVolumeInfo, error) {
	volumeInfos := make([]*storkapi.ApplicationBackupVolumeInfo, 0)
	for _, vInfo := range backup.Status.Volumes {
		if vInfo.DriverName != driverName {
			continue
		}
		crName := backup.Name + "-" + vInfo.Namespace + "-" + vInfo.PersistentVolumeClaim
		dataExport, err := kdmpShedOps.Instance().GetDataExport(crName, backup.Namespace)
		if err != nil {
			logrus.Errorf("failed to get DataExport CR: %v", err)
			return volumeInfos, err
		}
		if dataExport.Status.TransferID == "" {
			vInfo.Status = storkapi.ApplicationBackupStatusInitial
			vInfo.Reason = "Volume backup not started yet"
		} else {
			vInfo.Volume = strings.Split(dataExport.Status.TransferID, "/")[1]
			volumeBackup, err := kdmpShedOps.Instance().GetVolumeBackup(vInfo.Volume, backup.Namespace)
			if err != nil {
				logrus.Errorf("failed to get volumebackup CR: %s, err:%v", vInfo.Volume, err)
				return volumeInfos, err
			}
			vInfo.BackupID = volumeBackup.Status.SnapshotID
			if isBackupActive(dataExport.Status) {
				vInfo.Status = storkapi.ApplicationBackupStatusInProgress
				vInfo.Reason = "Volume backup in progress"
				// TODO: KDMP does not return size right now, we will need to fill up
				// size for volume once support is available
			} else if dataExport.Status.Status == kdmpapi.DataExportStatusFailed {
				vInfo.Status = storkapi.ApplicationBackupStatusFailed
				vInfo.Reason = fmt.Sprintf("Backup failed for volume: %v", dataExport.Status.Reason)
			} else if isBackupComplete(dataExport.Status) {
				vInfo.Status = storkapi.ApplicationBackupStatusSuccessful
				vInfo.Reason = "Backup successful for volume"
				// delete kdmp crs
				if err := kdmpShedOps.Instance().DeleteDataExport(crName, backup.Namespace); err != nil {
					logrus.Warnf("failed to delete data export CR: %v", err)
				}
				// TODO: KDMP will take care of removing this
				if err := kdmpShedOps.Instance().DeleteVolumeBackup(vInfo.Volume, backup.Namespace); err != nil {
					logrus.Warnf("failed to delete volume backup CR: %v", err)
				}
			}
		}
		volumeInfos = append(volumeInfos, vInfo)
	}
	return volumeInfos, nil
}
func isBackupActive(status kdmpapi.ExportStatus) bool {
	if status.Stage == kdmpapi.DataExportStageTransferInProgress ||
		status.Status == kdmpapi.DataExportStatusInProgress ||
		status.Status == kdmpapi.DataExportStatusPending ||
		status.Status == kdmpapi.DataExportStatusInitial {
		return true
	}
	return false
}
func isBackupComplete(status kdmpapi.ExportStatus) bool {
	if status.Stage == kdmpapi.DataExportStageFinal &&
		status.Status == kdmpapi.DataExportStatusSuccessful {
		return true
	}
	return false
}

func (k *kdmp) CancelBackup(backup *storkapi.ApplicationBackup) error {
	return fmt.Errorf("not supported")
}

func (k *kdmp) DeleteBackup(backup *storkapi.ApplicationBackup) error {
	for _, vInfo := range backup.Status.Volumes {
		if err := kdmpShedOps.Instance().DeleteDataExport(backup.Name+"-"+vInfo.Namespace+"-"+vInfo.PersistentVolumeClaim, backup.Namespace); err != nil {
			logrus.Errorf("failed to delete data export CR: %v", err)
			return err
		}
		if err := kdmpShedOps.Instance().DeleteVolumeBackup(vInfo.Volume, backup.Namespace); err != nil {
			logrus.Errorf("failed to delete volume backup CR: %v", err)
			return err
		}
	}
	return nil
}

func (k *kdmp) UpdateMigratedPersistentVolumeSpec(
	pv *v1.PersistentVolume,
) (*v1.PersistentVolume, error) {
	return pv, nil
}

func (k *kdmp) GetPreRestoreResources(
	*storkapi.ApplicationBackup,
	[]runtime.Unstructured,
) ([]runtime.Unstructured, error) {
	return nil, nil
}

func (k *kdmp) StartRestore(
	restore *storkapi.ApplicationRestore,
	volumeBackupInfos []*storkapi.ApplicationBackupVolumeInfo,
) ([]*storkapi.ApplicationRestoreVolumeInfo, error) {
	volumeInfos := make([]*storkapi.ApplicationRestoreVolumeInfo, 0)
	return volumeInfos, nil
}

func (k *kdmp) CancelRestore(*storkapi.ApplicationRestore) error {
	return nil
}

func (k *kdmp) GetRestoreStatus(restore *storkapi.ApplicationRestore) ([]*storkapi.ApplicationRestoreVolumeInfo, error) {
	volumeInfos := make([]*storkapi.ApplicationRestoreVolumeInfo, 0)
	return volumeInfos, nil
}

func (k *kdmp) InspectVolume(volumeID string) (*storkvolume.Info, error) {
	return nil, &errors.ErrNotSupported{}
}

func (k *kdmp) GetClusterID() (string, error) {
	return "", &errors.ErrNotSupported{}
}

func (k *kdmp) GetNodes() ([]*storkvolume.NodeInfo, error) {
	return nil, &errors.ErrNotSupported{}
}

func (k *kdmp) InspectNode(id string) (*storkvolume.NodeInfo, error) {
	return nil, &errors.ErrNotSupported{}
}

func (k *kdmp) GetPodVolumes(podSpec *v1.PodSpec, namespace string) ([]*storkvolume.Info, error) {
	return nil, &errors.ErrNotSupported{}
}

func (k *kdmp) GetSnapshotPlugin() snapshotVolume.Plugin {
	return nil
}

func (k *kdmp) GetSnapshotType(snap *snapv1.VolumeSnapshot) (string, error) {
	return "", &errors.ErrNotSupported{}
}

func (k *kdmp) GetVolumeClaimTemplates([]v1.PersistentVolumeClaim) (
	[]v1.PersistentVolumeClaim, error) {
	return nil, &errors.ErrNotSupported{}
}

func init() {
	a := &kdmp{}
	// set kdmp executor name
	if err := os.Setenv(drivers.KopiaExecutorImageKey, drivers.KopiaExecutorImage+":"+"latest"); err != nil {
		logrus.Debugf("Unable to set custom kdmp image")
	}
	err := a.Init(nil)
	if err != nil {
		logrus.Debugf("Error init'ing kdmp driver: %v", err)
	}
	if err := storkvolume.Register(driverName, a); err != nil {
		logrus.Panicf("Error registering kdmp volume driver: %v", err)
	}
}

repository: jainsmit/stork

repo_name: jainsmit/stork


text:
/*
 * Copyright © 2015-2018 Aeneas Rekkas <aeneas+oss@aeneas.io>
 *
 * 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.
 *
 * @author		Aeneas Rekkas <aeneas+oss@aeneas.io>
 * @Copyright 	2015-2018 Aeneas Rekkas <aeneas+oss@aeneas.io>
 * @license 	Apache-2.0
 *
 */

package client

import (
	"fmt"
	"net/http"

	keto "github.com/justpark/auth/keto/sdk/go/keto/swagger"
	"github.com/spf13/cobra"
)

type RoleHandler struct {
}

func (h *RoleHandler) newPolicyManager(cmd *cobra.Command) *keto.RoleApi {
	c := keto.NewRoleApiWithBasePath(getBasePath(cmd))

	if token, err := cmd.Flags().GetString("bearer-token"); err == nil && token != "" {
		c.Configuration.DefaultHeader["Authorization"] = "Bearer " + token
	}

	if term, _ := cmd.Flags().GetBool("fake-tls-termination"); term {
		c.Configuration.DefaultHeader["X-Forwarded-Proto"] = "https"
	}
	return c
}

func newRoleHandler() *RoleHandler {
	return &RoleHandler{}
}

func (h *RoleHandler) CreateRole(cmd *cobra.Command, args []string) {
	if len(args) != 1 {
		fmt.Print(cmd.UsageString())
		return
	}
	m := h.newPolicyManager(cmd)

	_, response, err := m.CreateRole(keto.Role{Id: args[0]})
	checkResponse(response, err, http.StatusCreated)
	fmt.Printf("Group %s created.\n", args[0])
}

func (h *RoleHandler) DeleteRole(cmd *cobra.Command, args []string) {
	if len(args) != 1 {
		fmt.Print(cmd.UsageString())
		return
	}

	m := h.newPolicyManager(cmd)
	response, err := m.DeleteRole(args[0])
	checkResponse(response, err, http.StatusNoContent)
	fmt.Printf("Group %s deleted.\n", args[0])
}

func (h *RoleHandler) RoleAddMembers(cmd *cobra.Command, args []string) {
	if len(args) < 2 {
		fmt.Print(cmd.UsageString())
		return
	}

	m := h.newPolicyManager(cmd)
	response, err := m.AddMembersToRole(args[0], keto.RoleMembers{Members: args[1:]})
	checkResponse(response, err, http.StatusNoContent)
	fmt.Printf("Members %v added to group %s.\n", args[1:], args[0])
}

func (h *RoleHandler) RoleRemoveMembers(cmd *cobra.Command, args []string) {
	if len(args) < 2 {
		fmt.Print(cmd.UsageString())
		return
	}

	m := h.newPolicyManager(cmd)
	response, err := m.RemoveMembersFromRole(args[0], keto.RoleMembers{Members: args[1:]})
	checkResponse(response, err, http.StatusNoContent)
	fmt.Printf("Members %v removed from group %s.\n", args[1:], args[0])
}

func (h *RoleHandler) FindRoles(cmd *cobra.Command, args []string) {
	if len(args) != 1 {
		fmt.Print(cmd.UsageString())
		return
	}

	m := h.newPolicyManager(cmd)
	groups, response, err := m.ListRoles(args[0], 500, 0)
	checkResponse(response, err, http.StatusOK)
	formatResponse(groups)
}

func (h *RoleHandler) ListRoles(cmd *cobra.Command, args []string) {
	if len(args) != 0 {
		fmt.Print(cmd.UsageString())
		return
	}

	m := h.newPolicyManager(cmd)
	groups, response, err := m.ListRoles("", 500, 0)
	checkResponse(response, err, http.StatusOK)
	formatResponse(groups)
}

func (h *RoleHandler) GetRole(cmd *cobra.Command, args []string) {
	if len(args) != 1 {
		fmt.Print(cmd.UsageString())
		return
	}

	m := h.newPolicyManager(cmd)
	groups, response, err := m.GetRole(args[0])
	checkResponse(response, err, http.StatusOK)
	formatResponse(groups)
}

repository: justpark/auth

repo_name: justpark/auth


text:
# base recipe: not base recipe
# base branch:

PR = "r0"
inherit debian-package

LICENSE = "GPLv1+ & Artistic-1.0"
LIC_FILES_CHKSUM = "file://README;beginline=50;md5=e3cf8a40071097069c8423fef7600df2"

# source format is 3.0 (quilt) but there is no debian patch
DEBIAN_QUILT_PATCHES = ""

DEPENDS = "perl"
inherit cpan

repository: nghiaht-tsdv/meta-debian

repo_name: nghiaht-tsdv/meta-debian

branch_name: refs/heads/jethro


text:
package utils

import (
	"os"
	"strings"
)

// FilePath replace ~ -> $HOME
func FilePath(path string) string {
	path = strings.Replace(path, "~", os.Getenv("HOME"), 1)
	return path
}

// FileExited check file exited
func FileExited(path string) bool {
	info, err := os.Stat(FilePath(path))
	if os.IsNotExist(err) {
		return false
	}
	return !info.IsDir()
}

// IsDirector IsDir
func IsDirector(path string) bool {
	info, err := os.Stat(path)
	if os.IsNotExist(err) {
		return false
	}
	return info.IsDir()
}

repository: arronliu/gortal

repo_name: arronliu/gortal


text:
# Copyright (C) 2010, O.S. Systems Software Ltda. All Rights Reserved
# Released under the MIT license

include freerdp.inc

PR = "${INC_PR}.1"
PV = "0.7.0+gitr${SRCPV}"
S = "${WORKDIR}/git"

SRCREV = "fe0c56a36522ff8f64f1ad111efe4cfd572e2e53"
SRC_URI = "git://freerdp.git.sourceforge.net/gitroot/freerdp/freerdp.git;protocol=git"

repository: libo/openembedded

repo_name: libo/openembedded


text:
SUMMARY = "Display dialog boxes from the command line and shell scripts"
SECTION = "x11/gnome"
LICENSE = "GPLv2+"

LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"

inherit distro_features_check gnomebase gettext

DEPENDS = "gtk+3"

REQUIRED_DISTRO_FEATURES = "x11"

SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \
    file://0001-build-don-t-generate-manual.patch \
"

SRC_URI[archive.md5sum] = "ba2b2a13248773b4ec0fd323d95e6d5a"
SRC_URI[archive.sha256sum] = "e786e733569c97372c3ef1776e71be7e7599ebe87e11e8ad67dcc2e63a82cd95"
GNOME_COMPRESS_TYPE="xz"

do_install_append() {
    # Remove gdialog compatibility helper - we don't want to pull in perl
    rm ${D}${bindir}/gdialog
}

repository: paolo-github/meta-openembedded

repo_name: paolo-github/meta-openembedded


text:
function(group_sources)
	# Enable the support for solution folders in MSVC
	set_property(GLOBAL PROPERTY USE_FOLDERS ON)

	# Put projects into solution folders in MSVC:
	set_target_properties(
		event_core_static
		event_extra_static
		expat
		fmt
		jsoncpp_static
		libdeflate
		lualib
		luaexpat
		mbedcrypto
		mbedtls
		mbedx509
		lsqlite
		sqlite3
		SQLiteCpp
		tolualib
		PROPERTIES FOLDER Libraries
	)

	# luaproxy not generated on anything else
	if(WIN32)
		set_target_properties(
			luaproxy
			PROPERTIES FOLDER Support
		)
	endif()

	if(${BUILD_TOOLS})
		set_target_properties(
			MCADefrag
			ProtoProxy
			PROPERTIES FOLDER Tools
		)
	endif()

	# Put all files into one project, separate by the folders:
	get_property(TARGET_SOURCE_FILES TARGET ${CMAKE_PROJECT_NAME} PROPERTY SOURCES)
	source_group(TREE "${PROJECT_SOURCE_DIR}/src" FILES ${TARGET_SOURCE_FILES})
endfunction()

repository: cuberite/cuberite

repo_name: cuberite/cuberite

gha_license_id: NOASSERTION


text:
package main

import (
	"github.com/mabetle/mlog"
	"github.com/mabetle/mcore/mvalid"
	"github.com/mabetle/mcore/mvalid/demo"
)

var (
	logger = mlog.GetLogger("main")
)

func DemoParse() {
	m := &demo.TagModel{}
	m.Id = "1"
	m.Age = 20
	m.Name = "demo"
	mvalid.PrintValidate(m)

	wrong := demo.TagModel{}
	mvalid.PrintValidate(wrong)
}

func main() {
	//logger.SetLevel("info", "mabetle")
	logger.SetLevel("debug", "mabetle")
	DemoParse()
}

repository: mabetle/mcore

repo_name: mabetle/mcore


text:
// Copyright 2021 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Package router provides utilities for accessing or controlling different routers.
package router