text:
%% This BibTeX bibliography file was created using BibDesk.
%% http://bibdesk.sourceforge.net/

%% Created for Shota Gugushvili at 2018-04-14 12:59:47 +0200

%% Saved with string encoding Unicode (UTF-8)

@article{berger94,
	title = {Removing noise from music using local trigonometric bases and wavelet packets},
	author = {Berger, J. and Coifman, R. R. and Goldberg, M. J.},
	journal = {J. Audio Eng. Soc},
	volume = {42},
	number = {10},
	pages = {808--818},
	year = {1994}
}

@book {percival00,
	AUTHOR = {Percival, D. B. and Walden, A. T.},
	TITLE = {Wavelet methods for time series analysis},
	SERIES = {Cambridge Series in Statistical and Probabilistic Mathematics},
	VOLUME = {4},
	PUBLISHER = {Cambridge University Press, Cambridge},
	YEAR = {2000},
	PAGES = {xxvi+594},
	ISBN = {0-521-64068-7},
	MRCLASS = {62M10 (42C40 62G08)},
	MRNUMBER = {1770693},
	DOI = {10.1017/CBO9780511841040}
}

@article{johnstone05,
	Author = {Johnstone, I. M. and Silverman, B. W.},
	Doi = {10.1214/009053605000000345},
	Fjournal = {The Annals of Statistics},
	Journal = {Ann. Statist.},
	Number = {4},
	Pages = {1700--1752},
	Title = {Empirical {B}ayes selection of wavelet thresholds},
	Url = {https://doi.org/10.1214/009053605000000345},
	Volume = {33},
	Year = {2005}
}

@article{wolfe04,
	Author = {Wolfe, P. J. and Godsill, S. J. and Ng, W.-J.},
	Doi = {10.1111/j.1467-9868.2004.02052.x},
	Fjournal = {Journal of the Royal Statistical Society. Series B. Statistical Methodology},
	Issn = {1369-7412},
	Journal = {J. R. Stat. Soc. Ser. B Stat. Methodol.},
	Mrclass = {62C10 (62M10 62M40)},
	Mrnumber = {2088291},
	Number = {3},
	Pages = {575--589},
	Title = {Bayesian variable selection and regularization for time-frequency surface estimation},
	Url = {https://doi.org/10.1111/j.1467-9868.2004.02052.x},
	Volume = {66},
	Year = {2004},
	Bdsk-Url-1 = {https://doi.org/10.1111/j.1467-9868.2004.02052.x},
	Bdsk-Url-2 = {http://dx.doi.org/10.1111/j.1467-9868.2004.02052.x}
}

@inproceedings{godsill07,
	Author = {Godsill, S. J. and Cemgil, A. T. and F\'evotte, C. and Wolfe, P. J.},
	Booktitle = {15th {E}uropean {S}ignal {P}rocessing {C}onference ({EURASIP})},
	Pages = {345--349},
	Title = {Bayesian computational methods for sparse audio and music processing},
	Year = {2007}
}

repository: gugushvili/caruso

repo_name: gugushvili/caruso


text:
package api

import (
	"context"
	"fmt"

	batchv1 "k8s.io/api/batch/v1"
	apiv1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

func CreateJob() {
	fmt.Println("Creating Job . . .")
	clientset := CreateClientSet()
	jobClient := clientset.BatchV1().Jobs(apiv1.NamespaceDefault)
	job := &batchv1.Job{
		ObjectMeta: metav1.ObjectMeta{
			Name: "job-test",
		},
		Spec: batchv1.JobSpec{
			Template: apiv1.PodTemplateSpec{
				Spec: apiv1.PodSpec{
					Containers: []apiv1.Container{
						{
							Name:    "go-version",
							Image:   "golang:alpine",
							Command: []string{"go", "version"},
						},
					},
					RestartPolicy: apiv1.RestartPolicyNever,
				},
			},
			BackoffLimit: int32Ptr(2),
		},
	}
	result, err := jobClient.Create(context.TODO(), job, metav1.CreateOptions{})
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Printf("Created Job %q\n", result.GetObjectMeta().GetName())
}

repository: pkbhowmick/client-go

license_type: permissive

repo_name: pkbhowmick/client-go

branch_name: refs/heads/master

extension: go


text:
#
# cmake/_Headers.cmake is generated by `mulle-sde`. Edits will be lost.
#
if( MULLE_TRACE_INCLUDE)
   MESSAGE( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
endif()

set( INCLUDE_DIRS
nanosvg/src
nanovg/src
src
)

set( PRIVATE_HEADERS
src/import-private.h
src/include-private.h
)

set( PUBLIC_HEADERS
nanosvg/src/nanosvg.h
nanosvg/src/nanosvgrast.h
nanovg/src/fontstash.h
nanovg/src/nanovg_gl.h
nanovg/src/nanovg_gl_utils.h
nanovg/src/nanovg.h
nanovg/src/stb_image.h
nanovg/src/stb_truetype.h
src/CALayer.h
src/CGAffineTransform.h
src/CGBase.h
src/CGContext.h
src/CGGeometry+CString.h
src/CGGeometry.h
src/MulleBitmapImage.h
src/MulleBitmapLayer.h
src/MulleSVGImage.h
src/MulleSVGLayer.h
src/MulleScrollIndicatorView.h
src/UIApplication.h
src/UIButton.h
src/UIControl.h
src/UIEdgeInsets+CString.h
src/UIEdgeInsets.h
src/UIEvent.h
src/UIImage.h
src/UIScrollView.h
src/UIView+CGGeometry.h
src/UIView+UIEvent.h
src/UIView.h
src/UIWindow.h
src/import.h
src/include.h
src/nanovg+CString.h
src/sealie-bitmap.inc
src/tiger-svg.inc
src/turtle-bitmap.inc
src/version.h
src/viech-bitmap.inc
)

repository: adamnemecek/MulleGLExample

repo_name: adamnemecek/MulleGLExample

extension: cmake


text:
package client

import (
	"github.com/rpccloud/rpc/internal/base"
	"github.com/rpccloud/rpc/internal/rpc"
	"testing"
	"time"
)

func TestChannel_Use(t *testing.T) {
	t.Run("p.item != nil", func(t *testing.T) {
		assert := base.NewAssert(t)
		v := &Channel{sequence: 642, item: &SendItem{}}
		assert(v.Use(&SendItem{}, 32)).IsFalse()
	})

	t.Run("test ok", func(t *testing.T) {
		assert := base.NewAssert(t)
		v := &Channel{sequence: 642}
		item := NewSendItem(0)
		assert(v.Use(item, 32)).IsTrue()
		assert(v.sequence).Equal(uint64(674))
		assert(v.item).Equal(item)
		assert(item.sendStream.GetCallbackID()).Equal(uint64(674))
		nowNS := base.TimeNow().UnixNano()
		assert(nowNS-v.item.sendTimeNS < int64(time.Second)).IsTrue()
		assert(nowNS-v.item.sendTimeNS > -int64(time.Second)).IsTrue()
	})
}

func TestChannel_Free(t *testing.T) {
	t.Run("p.item == nil", func(t *testing.T) {
		assert := base.NewAssert(t)
		v := &Channel{sequence: 642, item: nil}
		assert(v.Free(rpc.NewStream())).IsFalse()
	})

	t.Run("test ok", func(t *testing.T) {
		assert := base.NewAssert(t)
		item := NewSendItem(0)
		v := &Channel{sequence: 642, item: item}
		stream := rpc.NewStream()
		assert(len(item.returnCH)).Equal(0)
		assert(v.Free(stream)).IsTrue()
		assert(v.item).IsNil()
		assert(len(item.returnCH)).Equal(1)
		assert(<-item.returnCH).Equal(stream)
	})
}

func TestChannel_CheckTime(t *testing.T) {
	t.Run("p.item == nil", func(t *testing.T) {
		assert := base.NewAssert(t)
		v := &Channel{sequence: 642, item: nil}
		assert(v.CheckTime(base.TimeNow().UnixNano())).IsFalse()
	})

	t.Run("CheckTime return false", func(t *testing.T) {
		assert := base.NewAssert(t)
		v := &Channel{sequence: 642, item: NewSendItem(int64(time.Second))}
		assert(v.CheckTime(base.TimeNow().UnixNano())).IsFalse()
	})

	t.Run("CheckTime return true", func(t *testing.T) {
		assert := base.NewAssert(t)
		item := NewSendItem(int64(time.Millisecond))
		v := &Channel{sequence: 642, item: item}

		time.Sleep(10 * time.Millisecond)
		assert(len(item.returnCH)).Equal(0)
		assert(v.CheckTime(base.TimeNow().UnixNano())).IsTrue()
		assert(v.item).IsNil()
		assert(len(item.returnCH)).Equal(1)
	})
}

repository: tslearn/rpc

repo_name: tslearn/rpc


text:
SUMMARY = "NVMe MI Daemon"
DESCRIPTION = "Implementation of NVMe MI daemon"

LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"

SRC_URI = "git://git@github.com/Intel-BMC/nvme-mi.git;protocol=ssh;branch=master"
SRCREV = "b6f50e04516962a4e94fe9340251999f154197c4"
S = "${WORKDIR}/git"
PV = "1.0+git${SRCPV}"

inherit meson systemd

SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.nvme-mi.service"
DEPENDS = "boost sdbusplus systemd phosphor-logging mctpwplus googletest nlohmann-json"

EXTRA_OEMESON = "-Dyocto_dep='enabled'"

repository: Intel-BMC/openbmc

repo_name: Intel-BMC/openbmc

gha_license_id: NOASSERTION

gha_language: Python

extension: bb


text:
@INPROCEEDINGS{Falkenthal2016_function_shipping,
author = {Michael Falkenthal and Uwe Breitenb\"{u}cher and Maximilian Christ and Christian Endres and Andreas W. Kempa-Liehr and Frank Leymann and Michael Zimmermann},
Title = {Towards Function and Data Shipping in Manufacturing Environments: How Cloud Technologies leverage the 4th Industrial Revolution},
booktitle = {Proceedings of the 10th Advanced Summer School on Service Oriented Computing},
Editors = {Johanna Barzen and Rania Khalaf and Frank Leymann and Bernhard Mitschang},
number = {RC25624},
series = {IBM Research Report},
year = 2016,
pages = {16-25},
publisher = {IBM Research Division},
address = {Almaden},
url = {http://domino.watson.ibm.com/library/CyberDig.nsf/1e4115aea78b6e7c85256b360066f0d4/ec7d5d883519dc7e85258035004dbd19}
}

@inproceedings{Falkenthal2016_OpenTOSCA,
 author = {Falkenthal, Michael and Breitenb\"{u}cher, Uwe and K{\'e}pes, K\'{a}lm\'{a}n and Leymann, Frank and Zimmermann, Michael and Christ, Maximilian and Neuffer, Julius and Braun, Nils and Kempa-Liehr, Andreas W.},
 title = {OpenTOSCA for the 4th Industrial Revolution: Automating the Provisioning of Analytics Tools Based on Apache Flink},
 booktitle = {Proceedings of the 6th International Conference on the Internet of Things},
 series = {IoT'16},
 year = {2016},
 location = {Stuttgart, Germany},
 pages = {179--180},
 doi = {10.1145/2991561.2998463},
 publisher = {ACM},
 address = {New York, NY, USA},
}

repository: kempa-liehr/DSVMs

repo_name: kempa-liehr/DSVMs

extension: bib


text:
SUMMARY = "Internationalised Domain Names in Applications"
HOMEPAGE = "https://github.com/kjd/idna"
LICENSE = "BSD-3-Clause & Python-2.0 & Unicode"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=239668a7c6066d9e0c5382e9c8c6c0e1"

SRC_URI[sha256sum] = "467fbad99067910785144ce333826c71fb0e63a425657295239737f7ecd125f3"

inherit pypi setuptools3

# Remove bundled egg-info
do_compile:prepend() {
    rm -rf ${S}/idna.egg-info
}

RDEPENDS:${PN}:class-target = "\
    ${PYTHON_PN}-codecs \
"

BBCLASSEXTEND = "native nativesdk"


text:
@article{name1,
    author = {李俊},
    title = {文章的标题},
    journal = {期刊名},
    volume = {卷20},
    number = {页码},
    year = {年份},
    abstract = {摘要, 这个主要是引用的时候自己参考的, 这一行不是必须的}
}

@article{lichangzhong2010jiyu,
    title={基于 {PGIS} 的社区警务管理系统研究和实践},
    author={李昌忠 and 周大良 and 王生 and 余兵},
    journal={现代测绘},
    number={5},
    pages={24--26},
    year={2010}
}

license: MIT

repository: duguying/report

repo_name: duguying/report

gha_language: TeX


text:
// +build integration

package backend

import (
	"context"
	"io"
	"sync"
	"sync/atomic"
	"testing"
	"time"

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

type LockerReaderWriter interface {
	Locker
	Reader
	Writer
}

var lockers = []struct {
	Name string
	New  func(t *testing.T) LockerReaderWriter
}{
	{
		Name: "ETCD",
		New: func(t *testing.T) LockerReaderWriter {
			etcd, err := NewETCDClient([]string{testETCDEndpoint}, 1*time.Second)
			require.NoError(t, err)
			return etcd
		},
	},
	{
		Name: "TestKV",
		New: func(t *testing.T) LockerReaderWriter {
			return NewTestKV()
		},
	},
}

func TestLockerLock(t *testing.T) {
	for _, target := range lockers {
		t.Run(target.Name, func(t *testing.T) {
			client := target.New(t)

			var counter int64

			ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)

			// Delete key in case it previously existed
			_ = client.Delete(ctx, "/testkey")

			// Start many goroutines that all try to acquire the same lock. One will
			// succeed, try read the value that doesn't exist, and create the value.
			// After this the lock is released and the other goroutines can proceed.
			// The value exists at this point so the goroutine can exit.
			var wg sync.WaitGroup
			for i := 0; i < 100; i++ {
				wg.Add(1)
				go func() {
					defer wg.Done()

					unlock, err := client.Lock(ctx, "/testlock")
					require.NoError(t, err)
					defer unlock()

					value, err := client.Get(ctx, "/testkey")
					if IsNotFound(err) {
						atomic.AddInt64(&counter, 1)
						err = client.Put(ctx, "/testkey", "value")
						require.NoError(t, err)
						return
					}
					require.NoError(t, err)

					assert.Equal(t, "value", value)
				}()
			}

			wg.Wait()

			assert.Equal(t, int64(1), counter)

			cancel()

			_, err := client.Lock(ctx, "/lockcancel")
			require.Error(t, err)

			if closer, ok := client.(io.Closer); ok {
				err := closer.Close()
				require.NoError(t, err)
			}
		})
	}
}

repository: fragments/fragments

repo_name: fragments/fragments


text:
package cephbroker

import (
	"encoding/json"
	"errors"
	"fmt"
	"os"
	"path"
	"path/filepath"
	"reflect"
	"sync"

	"code.cloudfoundry.org/goshims/ioutilshim"
	"code.cloudfoundry.org/lager"
	"code.cloudfoundry.org/voldriver"
	"github.com/pivotal-cf/brokerapi"
	"context"
	"code.cloudfoundry.org/voldriver/driverhttp"
)

const (
	PermissionVolumeMount = brokerapi.RequiredPermission("volume_mount")
	DefaultContainerPath  = "/var/vcap/data"
)

type staticState struct {
	ServiceName string `json:"ServiceName"`
	ServiceId   string `json:"ServiceId"`
	PlanName    string `json:"PlanName"`
	PlanId      string `json:"PlanId"`
	PlanDesc    string `json:"PlanDesc"`
}

type dynamicState struct {
	InstanceMap map[string]brokerapi.ProvisionDetails
	BindingMap  map[string]brokerapi.BindDetails
}

type lock interface {
	Lock()
	Unlock()
}

type broker struct {
	logger     lager.Logger
	controller Controller
	dataDir    string
	ioutil     ioutilshim.Ioutil
	mutex      lock

	static  staticState
	dynamic dynamicState
}

func New(
	logger lager.Logger, controller Controller,
	serviceName, serviceId, planName, planId, planDesc, dataDir string,
	ioutil ioutilshim.Ioutil,
) *broker {

	theBroker := broker{
		logger:     logger,
		controller: controller,
		dataDir:    dataDir,
		ioutil:     ioutil,
		mutex:      &sync.Mutex{},
		static: staticState{
			ServiceName: serviceName,
			ServiceId:   serviceId,
			PlanName:    planName,
			PlanId:      planId,
			PlanDesc:    planDesc,
		},
		dynamic: dynamicState{
			InstanceMap: map[string]brokerapi.ProvisionDetails{},
			BindingMap:  map[string]brokerapi.BindDetails{},
		},
	}

	theBroker.restoreDynamicState()

	return &theBroker
}

func (b *broker) Services(_ context.Context) []brokerapi.Service {
	logger := b.logger.Session("services")
	logger.Info("start")
	defer logger.Info("end")

	return []brokerapi.Service{{
		ID:            b.static.ServiceId,
		Name:          b.static.ServiceName,
		Description:   "CephFS service docs: https://code.cloudfoundry.org/cephfs-bosh-release/",
		Bindable:      true,
		PlanUpdatable: false,
		Tags:          []string{"ceph"},
		Requires:      []brokerapi.RequiredPermission{PermissionVolumeMount},

		Plans: []brokerapi.ServicePlan{{
			Name:        b.static.PlanName,
			ID:          b.static.PlanId,
			Description: b.static.PlanDesc,
			Free:        new(bool),
		}},
	}}
}

func (b *broker) Provision(context context.Context, instanceID string, details brokerapi.ProvisionDetails, asyncAllowed bool) (brokerapi.ProvisionedServiceSpec, error) {
	logger := b.logger.Session("provision")
	logger.Info("start")
	defer logger.Info("end")

	b.mutex.Lock()
	defer b.mutex.Unlock()

	defer b.serialize(b.dynamic)

	if b.instanceConflicts(details, instanceID) {
		logger.Error("instance-already-exists", brokerapi.ErrInstanceAlreadyExists)
		return brokerapi.ProvisionedServiceSpec{}, brokerapi.ErrInstanceAlreadyExists
	}

	errResp := b.controller.Create(driverhttp.NewHttpDriverEnv(logger,context), voldriver.CreateRequest{
		Name: instanceID,
		Opts: map[string]interface{}{"volume_id": instanceID},
	})

	if errResp.Err != "" {
		err := errors.New(errResp.Err)
		logger.Error("provisioner-create-failed", err)
		return brokerapi.ProvisionedServiceSpec{}, err
	}

	b.dynamic.InstanceMap[instanceID] = details

	return brokerapi.ProvisionedServiceSpec{}, nil
}

func (b *broker) Deprovision(context context.Context, instanceID string, details brokerapi.DeprovisionDetails, asyncAllowed bool) (brokerapi.DeprovisionServiceSpec, error) {
	logger := b.logger.Session("deprovision")
	logger.Info("start")
	defer logger.Info("end")

	b.mutex.Lock()
	defer b.mutex.Unlock()

	defer b.serialize(b.dynamic)

	if _, ok := b.dynamic.InstanceMap[instanceID]; !ok {
		return brokerapi.DeprovisionServiceSpec{}, brokerapi.ErrInstanceDoesNotExist
	}

	errResp := b.controller.Remove(driverhttp.NewHttpDriverEnv(logger, context), voldriver.RemoveRequest{
		Name: instanceID,
	})

	if errResp.Err != "" {
		err := errors.New(errResp.Err)
		logger.Error("provisioner-remove-failed", err)
		return brokerapi.DeprovisionServiceSpec{}, err
	}

	delete(b.dynamic.InstanceMap, instanceID)

	return brokerapi.DeprovisionServiceSpec{}, nil
}

func (b *broker) Bind(context context.Context, instanceID string, bindingID string, details brokerapi.BindDetails) (brokerapi.Binding, error) {
	logger := b.logger.Session("bind")
	logger.Info("start")
	defer logger.Info("end")

	b.mutex.Lock()
	defer b.mutex.Unlock()

	defer b.serialize(b.dynamic)

	if _, ok := b.dynamic.InstanceMap[instanceID]; !ok {
		return brokerapi.Binding{}, brokerapi.ErrInstanceDoesNotExist
	}

	if details.AppGUID == "" {
		return brokerapi.Binding{}, brokerapi.ErrAppGuidNotProvided
	}

	mode, err := evaluateMode(details.Parameters)
	if err != nil {
		return brokerapi.Binding{}, err
	}

	if b.bindingConflicts(bindingID, details) {
		return brokerapi.Binding{}, brokerapi.ErrBindingAlreadyExists
	}

	response := b.controller.Bind(driverhttp.NewHttpDriverEnv(logger, context), instanceID)

	if response.Err != "" {
		err := errors.New(response.Err)
		logger.Error("provisioner-remove-failed", err)
		return brokerapi.Binding{}, err
	}

	b.dynamic.BindingMap[bindingID] = details

	return brokerapi.Binding{
		Credentials: struct{}{}, // if nil, cloud controller chokes on response
		VolumeMounts: []brokerapi.VolumeMount{{
			ContainerDir: evaluateContainerPath(details.Parameters, instanceID),
			Mode:         mode,
			Driver:       "cephdriver",
			DeviceType:   "shared",
			Device:       response.SharedDevice,
		}},
	}, nil
}

func (b *broker) Unbind(_ context.Context, instanceID string, bindingID string, details brokerapi.UnbindDetails) error {
	logger := b.logger.Session("unbind")
	logger.Info("start")
	defer logger.Info("end")

	b.mutex.Lock()
	defer b.mutex.Unlock()

	defer b.serialize(b.dynamic)

	if _, ok := b.dynamic.InstanceMap[instanceID]; !ok {
		return brokerapi.ErrInstanceDoesNotExist
	}

	if _, ok := b.dynamic.BindingMap[bindingID]; !ok {
		return brokerapi.ErrBindingDoesNotExist
	}

	delete(b.dynamic.BindingMap, bindingID)

	return nil
}

func (b *broker) Update(_ context.Context, instanceID string, details brokerapi.UpdateDetails, asyncAllowed bool) (brokerapi.UpdateServiceSpec, error) {
	panic("not implemented")
}

func (b *broker) LastOperation(_ context.Context, instanceID string, operationData string) (brokerapi.LastOperation, error) {
	panic("not implemented")
}

func (b *broker) instanceConflicts(details brokerapi.ProvisionDetails, instanceID string) bool {
	if existing, ok := b.dynamic.InstanceMap[instanceID]; ok {
		if !reflect.DeepEqual(details, existing) {
			return true
		}
	}
	return false
}

func evaluateContainerPath(parameters map[string]interface{}, volId string) string {
	if containerPath, ok := parameters["mount"]; ok && containerPath != "" {
		return containerPath.(string)
	}

	return path.Join(DefaultContainerPath, volId)
}

func evaluateMode(parameters map[string]interface{}) (string, error) {
	if ro, ok := parameters["readonly"]; ok {
		switch ro := ro.(type) {
		case bool:
			return readOnlyToMode(ro), nil
		default:
			return "", brokerapi.ErrRawParamsInvalid
		}
	}
	return "rw", nil
}

func readOnlyToMode(ro bool) string {
	if ro {
		return "r"
	}
	return "rw"
}

func (b *broker) bindingConflicts(bindingID string, details brokerapi.BindDetails) bool {
	if existing, ok := b.dynamic.BindingMap[bindingID]; ok {
		if !reflect.DeepEqual(details, existing) {
			return true
		}
	}
	return false
}

func (b *broker) serialize(state interface{}) {
	logger := b.logger.Session("serialize-state")
	logger.Info("start")
	defer logger.Info("end")

	stateFile := filepath.Join(b.dataDir, fmt.Sprintf("%s-services.json", b.static.ServiceName))

	stateData, err := json.Marshal(state)
	if err != nil {
		b.logger.Error("failed-to-marshall-state", err)
		return
	}

	err = b.ioutil.WriteFile(stateFile, stateData, os.ModePerm)
	if err != nil {
		b.logger.Error(fmt.Sprintf("failed-to-write-state-file: %s", stateFile), err)
		return
	}

	logger.Info("state-saved", lager.Data{"state-file": stateFile})
}

func (b *broker) restoreDynamicState() {
	logger := b.logger.Session("restore-services")
	logger.Info("start")
	defer logger.Info("end")

	stateFile := filepath.Join(b.dataDir, fmt.Sprintf("%s-services.json", b.static.ServiceName))

	serviceData, err := b.ioutil.ReadFile(stateFile)
	if err != nil {
		b.logger.Error(fmt.Sprintf("failed-to-read-state-file: %s", stateFile), err)
		return
	}

	dynamicState := dynamicState{}
	err = json.Unmarshal(serviceData, &dynamicState)
	if err != nil {
		b.logger.Error(fmt.Sprintf("failed-to-unmarshall-state from state-file: %s", stateFile), err)
		return
	}
	logger.Info("state-restored", lager.Data{"state-file": stateFile})
	b.dynamic = dynamicState
}

repository: cloudfoundry-attic/cephbroker

repo_name: cloudfoundry-attic/cephbroker


text:
/*
 * Copyright 2018-2023, CS Systemes d'Information, http://csgroup.eu
 *
 * 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 tests

import (
	"fmt"

	"github.com/CS-SI/SafeScale/v22/lib/utils/data"
)

type StructWithoutPointers struct {
	Content string
	Rumba   int
}

func NewStructWithoutPointers() *StructWithoutPointers {
	return &StructWithoutPointers{}
}

func (m *StructWithoutPointers) IsNull() bool {
	return m == nil || (m.Content == "" && m.Rumba == 0)
}

func (m StructWithoutPointers) Clone() (data.Clonable, error) {
	return NewStructWithoutPointers().Replace(&m)
}

func (m *StructWithoutPointers) Replace(clonable data.Clonable) (data.Clonable, error) {
	p, ok := clonable.(*StructWithoutPointers)
	if !ok {
		return nil, fmt.Errorf("p is not a *StructWithoutPointers")
	}
	*m = *p
	return m, nil
}

type StructWithPointersAndDefectiveReplace struct {
	Content string
	Rumba   int
	List    []string
	Map     map[string]interface{}
}

func NewStructWithPointersAndDefectiveReplace() *StructWithPointersAndDefectiveReplace {
	return &StructWithPointersAndDefectiveReplace{}
}

func (m *StructWithPointersAndDefectiveReplace) IsNull() bool {
	return m == nil || (m.Content == "" && m.Rumba == 0 && len(m.List) == 0 && len(m.Map) == 0)
}

func (m StructWithPointersAndDefectiveReplace) Clone() (data.Clonable, error) {
	newM := &StructWithPointersAndDefectiveReplace{}
	return newM.Replace(&m)
}

func (m *StructWithPointersAndDefectiveReplace) Replace(clonable data.Clonable) (data.Clonable, error) {
	p, ok := clonable.(*StructWithPointersAndDefectiveReplace)
	if !ok {
		return nil, fmt.Errorf("p is not a *StructWithPointersAndDefectiveReplace")
	}
	*m = *p
	return m, nil
}

type StructWithPointersAndCorrectReplace struct {
	content string
	Rumba   int
	List    []string
	Map     map[string]interface{}
}

func NewStructWithPointersAndCorrectReplace() *StructWithPointersAndCorrectReplace {
	return &StructWithPointersAndCorrectReplace{}
}

func (m *StructWithPointersAndCorrectReplace) IsNull() bool {
	return m == nil || (m.content == "" && m.Rumba == 0 && len(m.List) == 0 && len(m.Map) == 0)
}

func (m StructWithPointersAndCorrectReplace) Clone() (data.Clonable, error) {
	return NewStructWithPointersAndCorrectReplace().Replace(&m)
}

func (m *StructWithPointersAndCorrectReplace) Replace(clonable data.Clonable) (data.Clonable, error) {
	src, ok := clonable.(*StructWithPointersAndCorrectReplace)
	if !ok {
		panic("clonable cannot be casted to '*StructWithPointersAndCorrectReplace'")
	}

	// This part copies non-pointers values
	*m = *src

	// This parts duplicates values from pointers
	m.List = make([]string, len(src.List))
	copy(m.List, src.List)

	m.Map = make(map[string]interface{}, len(src.Map))
	for k, v := range src.Map {
		m.Map[k] = v
	}

	return m, nil
}

repository: CS-SI/SafeScale

repo_name: CS-SI/SafeScale

gha_language: Go


text:
package context

import (
	"fmt"
	"os"

	"github.com/google/uuid"

	"github.com/free5gc/openapi/Nnrf_NFDiscovery"
	"github.com/free5gc/openapi/Nnrf_NFManagement"
	"github.com/free5gc/openapi/Nudm_SubscriberDataManagement"
	"github.com/free5gc/openapi/models"
	"github.com/free5gc/pfcp/pfcpType"
	"github.com/shynuu/ntn-qof/factory"
	"github.com/shynuu/ntn-qof/logger"
)

func init() {
	ntnContext.NfInstanceID = uuid.New().String()
}

var ntnContext NTNContext

type NTNContext struct {
	Name         string
	NfInstanceID string

	QoS         map[uint8]uint8
	Slice       []*factory.Slice
	Classifiers *factory.Classifiers
	SliceAware  bool

	URIScheme    models.UriScheme
	BindingIPv4  string
	RegisterIPv4 string
	SBIPort      int
	CPNodeID     pfcpType.NodeID

	UDMProfile models.NfProfile

	UPNodeIDs []pfcpType.NodeID
	Key       string
	PEM       string
	KeyLog    string

	NrfUri                         string
	QofUri                         string
	NFManagementClient             *Nnrf_NFManagement.APIClient
	NFDiscoveryClient              *Nnrf_NFDiscovery.APIClient
	SubscriberDataManagementClient *Nudm_SubscriberDataManagement.APIClient
}

func InitQofContext(config *factory.Config) {
	if config == nil {
		logger.CtxLog.Error("Config is nil")
		return
	}

	logger.CtxLog.Infof("ntnconfig Info: Version[%s] Description[%s]", config.Info.Version, config.Info.Description)
	configuration := config.Configuration
	if configuration.NtnName != "" {
		ntnContext.Name = configuration.NtnName
	}

	// ntnContext.QofUri = configuration.QofUri
	ntnContext.Slice = configuration.Slice
	ntnContext.QoS = configuration.QoS
	ntnContext.Classifiers = configuration.Classifiers
	ntnContext.SliceAware = configuration.SliceAware

	sbi := configuration.Sbi
	if sbi == nil {
		logger.CtxLog.Errorln("Configuration needs \"sbi\" value")
		return
	} else {
		ntnContext.URIScheme = models.UriScheme(sbi.Scheme)
		ntnContext.RegisterIPv4 = factory.QOF_DEFAULT_IPV4 // default localhost
		ntnContext.SBIPort = factory.QOF_DEFAULT_PORT_INT  // default port
		if sbi.RegisterIPv4 != "" {
			ntnContext.RegisterIPv4 = sbi.RegisterIPv4
		}
		if sbi.Port != 0 {
			ntnContext.SBIPort = sbi.Port
		}

		if tls := sbi.TLS; tls != nil {
			ntnContext.Key = tls.Key
			ntnContext.PEM = tls.PEM
		}

		ntnContext.BindingIPv4 = os.Getenv(sbi.BindingIPv4)
		if ntnContext.BindingIPv4 != "" {
			logger.CtxLog.Info("Parsing ServerIPv4 address from ENV Variable.")
		} else {
			ntnContext.BindingIPv4 = sbi.BindingIPv4
			if ntnContext.BindingIPv4 == "" {
				logger.CtxLog.Warn("Error parsing ServerIPv4 address as string. Using the 0.0.0.0 address as default.")
				ntnContext.BindingIPv4 = "0.0.0.0"
			}
		}
	}

	if configuration.NrfUri != "" {
		ntnContext.NrfUri = configuration.NrfUri
	} else {
		logger.CtxLog.Warn("NRF Uri is empty! Using localhost as NRF IPv4 address.")
		ntnContext.NrfUri = fmt.Sprintf("%s://%s:%d", ntnContext.URIScheme, "127.0.0.1", 29510)
	}

	// Set client and set url
	ManagementConfig := Nnrf_NFManagement.NewConfiguration()
	ManagementConfig.SetBasePath(NTN_Self().NrfUri)
	ntnContext.NFManagementClient = Nnrf_NFManagement.NewAPIClient(ManagementConfig)

	NFDiscovryConfig := Nnrf_NFDiscovery.NewConfiguration()
	NFDiscovryConfig.SetBasePath(NTN_Self().NrfUri)
	ntnContext.NFDiscoveryClient = Nnrf_NFDiscovery.NewAPIClient(NFDiscovryConfig)

}

func NTN_Self() *NTNContext {
	return &ntnContext
}

branch_name: refs/heads/main


text:
/*
 * API for interacting with GameStonks
 *
 * GameStonks API
 *
 * API version: 1.0.0
 * Generated by: OpenAPI Generator (https://openapi-generator.tech)
 */

package openapi

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

// DataApiService is a service that implents the logic for the DataApiServicer
// This service should implement the business logic for every endpoint for the DataApi API.
// Include any external packages or services that will be required by this service.
type DataApiService struct {
}

// NewDataApiService creates a default api service
func NewDataApiService() DataApiServicer {
	return &DataApiService{}
}

// GetMostVoted - Gets all stocks on the platform within a date range
func (s *DataApiService) GetMostVoted(ctx context.Context, voteFloor string, since string, until string) (ImplResponse, error) {
	// TODO - update GetMostVoted with the required logic for this service method.
	// Add api_data_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.

	//TODO: Uncomment the next line to return response Response(200, {}) or use other options such as http.Ok ...
	//return Response(200, nil),nil

	//TODO: Uncomment the next line to return response Response(404, {}) or use other options such as http.Ok ...
	//return Response(404, nil),nil

	return Response(http.StatusNotImplemented, nil), errors.New("GetMostVoted method not implemented")
}

// GetStockCommentMostUsedWordsAndFrequency - Get most used words in comments for a given stock
func (s *DataApiService) GetStockCommentMostUsedWordsAndFrequency(ctx context.Context, stockTicker string) (ImplResponse, error) {
	// TODO - update GetStockCommentMostUsedWordsAndFrequency with the required logic for this service method.
	// Add api_data_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.

	//TODO: Uncomment the next line to return response Response(200, {}) or use other options such as http.Ok ...
	//return Response(200, nil),nil

	//TODO: Uncomment the next line to return response Response(404, {}) or use other options such as http.Ok ...
	//return Response(404, nil),nil

	return Response(http.StatusNotImplemented, nil), errors.New("GetStockCommentMostUsedWordsAndFrequency method not implemented")
}

// GetStockCommentPerformance - Gets stock comments per day trend
func (s *DataApiService) GetStockCommentPerformance(ctx context.Context, stockTicker string, since string, until string) (ImplResponse, error) {
	// TODO - update GetStockCommentPerformance with the required logic for this service method.
	// Add api_data_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.

	//TODO: Uncomment the next line to return response Response(200, {}) or use other options such as http.Ok ...
	//return Response(200, nil),nil

	//TODO: Uncomment the next line to return response Response(404, {}) or use other options such as http.Ok ...
	//return Response(404, nil),nil

	return Response(http.StatusNotImplemented, nil), errors.New("GetStockCommentPerformance method not implemented")
}

// GetStockFinancialPerformance - Gets stock finance performance data
func (s *DataApiService) GetStockFinancialPerformance(ctx context.Context, stockTicker string) (ImplResponse, error) {
	// TODO - update GetStockFinancialPerformance with the required logic for this service method.
	// Add api_data_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.

	//TODO: Uncomment the next line to return response Response(200, {}) or use other options such as http.Ok ...
	//return Response(200, nil),nil

	//TODO: Uncomment the next line to return response Response(404, {}) or use other options such as http.Ok ...
	//return Response(404, nil),nil

	return Response(http.StatusNotImplemented, nil), errors.New("GetStockFinancialPerformance method not implemented")
}

// GetStockVotesPerDayPerformance - Gets votes per day trend from a stock
func (s *DataApiService) GetStockVotesPerDayPerformance(ctx context.Context, stockTicker string, since string, until string) (ImplResponse, error) {
	// TODO - update GetStockVotesPerDayPerformance with the required logic for this service method.
	// Add api_data_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.

	//TODO: Uncomment the next line to return response Response(200, {}) or use other options such as http.Ok ...
	//return Response(200, nil),nil

	//TODO: Uncomment the next line to return response Response(404, {}) or use other options such as http.Ok ...
	//return Response(404, nil),nil

	return Response(http.StatusNotImplemented, nil), errors.New("GetStockVotesPerDayPerformance method not implemented")
}

repository: adchungcsc/GameStonks

repo_name: adchungcsc/GameStonks


text:
DESCRIPTION = "RGB2YUV Aplication"
SECTION = "rgb2yuv"
DEPENDS = ""
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"

SRC_URI = "file://rgb2yuv_${PV}.tar.xz"

S = "${WORKDIR}/"

do_install_append(){
	install -d ${D}/rgb2yuv-doc/
	cp ${WORKDIR}/image.bgr /${D}/rgb2yuv-doc/
	cp ${WORKDIR}/output.yuv /${D}/rgb2yuv-doc/
	cp ${WORKDIR}/c_results.pdf /${D}/rgb2yuv-doc/
}

FILES_${PN} += "/rgb2yuv-doc"

inherit autotools

PARALLEL_MAKE = ""


text:
@article{iseme_role_2017,
 abstract = {© The Author 2017. An increased risk of cardiovascular disease (CVD) has long been recognized amongst people with autoimmune disease. It has been unclear whether this is due mainly to the ensuing treatment, particularly steroids, or whether some of this risk is due to the autoimmune process itself with subsequent inflammation. Indeed, a large body of evidence supports a role for chronic inflammation in atherogenesis, and autoantibodies have been identified as mediators in this complex inflammatory environment. Our aim is to carry out a systematic review of existing literature in order to formally establish the strength of the association between autoantibodies and atherosclerosis, amongst individuals without clinical autoimmune disease. An electronic search of five databases to June 2016 was performed by two independent reviewers. Inclusion criteria were analytical studies of adults, with at least two studies per autoantibody. Quality analysis was carried out using the Newcastle-Ottawa scale and the Cochrane Risk of Bias Quality Assessment Tool where appropriate. Where possible, studies were pooled using random effects models. Raised levels of anti-cardiolipin (odds ratio [OR] = 1.30; 95% CI: 1.15-1.49) and anti-oxidized low-density lipoprotein Immunoglobulin (Ig) G (OR = 1.25; 95% CI: 1.11-1.41), unspecified anti-cyclic citrullinated protein (OR = 3.09; 95% CI: 1.49-6.41) and anti-human heat shock protein 60 IgA (OR = 1.57; 95% CI: 1.15-2.16) were observed to increase the risk of cardiovascular outcomes. Alternatively, Anti-phosphorylcholine IgM (OR = 1.31; 95% CI: 1.14-1.50) conferred protection against CVD. Our results support an important role for autoantibodies in mediating cardiovascular events, independent of therapeutic treatments. Future research may focus on the presence of autoantibodies as markers of immune dysregulation and CVD risk.},
 author = {Iseme, R.A. and McEvoy, M. and Kelly, B. and Agnew, L. and Walker, F.R. and Handley, T. and Oldmeadow, C. and Attia, J. and Boyle, M.},
 doi = {10.1093/cvr/cvx112},
 issn = {1755-3245},
 journal = {Cardiovascular Research},
 keywords = {meta-analysis},
 month = {August},
 number = {10},
 pages = {1102--1112},
 title = {A role for autoantibodies in atherogenesis},
 volume = {113},
 year = {2017}
}

repository: ChrisOldmeadow/academic-kickstart

repo_name: ChrisOldmeadow/academic-kickstart


text:
DESCRIPTION="Upstream's U-boot configured for sunxi devices"

require recipes-bsp/u-boot/u-boot.inc

DEPENDS += " bc-native dtc-native swig-native python3-native "

LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"

COMPATIBLE_MACHINE = "(v3s)"

DEFAULT_PREFERENCE_v3s="1"

PV = "4.14.1"
PR = "r0"

SRCREV_pn-${PN} = "${AUTOREV}"

SRC_URI += "git://github.com/ninhnguyennhut/u-boot-4.14.x.git;protocol=https \
	    file://boot.cmd \
	   "

S = "${WORKDIR}/git"

UBOOT_ENV_SUFFIX = "scr"
UBOOT_ENV = "boot"

EXTRA_OEMAKE += ' HOSTLDSHARED="${BUILD_CC} -shared ${BUILD_LDFLAGS} ${BUILD_CFLAGS}" '

do_compile_append() {
    ${B}/tools/mkimage -C none -A arm -T script -d ${WORKDIR}/boot.cmd ${WORKDIR}/${UBOOT_ENV_BINARY}
}

branch_name: refs/heads/sumo

gha_license_id: MIT

gha_language: BitBake


text:
require wlan-ng-utils.inc

SRC_URI += "ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/linux-wlan-ng-${PV}.tar.bz2 \
        file://scripts-makefile-hostcc.patch \
	file://pcmciasrc.patch \
	file://hostldflags.patch"

S = "${WORKDIR}/linux-wlan-ng-${PV}"

PR = "r2"

SRC_URI[md5sum] = "5d86ca7bb4ed458743acd922ff09dae6"
SRC_URI[sha256sum] = "e4b6ab08eaff2766c3bf85ea8d63ab31ae774266b8351772117fcc94d1318ade"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD


text:
package ascpffo

import (
	"encoding/xml"

	"github.com/bububa/opentaobao/model"
)

// AliexpressAscpInventoryLogQueryAPIResponse AliExpress库存流水查询API API返回值
// aliexpress.ascp.inventory.log.query
//
// AliExpress库存流水查询API
type AliexpressAscpInventoryLogQueryAPIResponse struct {
	model.CommonResponse
	AliexpressAscpInventoryLogQueryAPIResponseModel
}

// AliexpressAscpInventoryLogQueryAPIResponseModel is AliExpress库存流水查询API 成功返回结果
type AliexpressAscpInventoryLogQueryAPIResponseModel struct {
	XMLName xml.Name `xml:"aliexpress_ascp_inventory_log_query_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 查询出参
	Result *PageQueryResult `json:"result,omitempty" xml:"result,omitempty"`
}

repository: bububa/opentaobao

repo_name: bububa/opentaobao


text:
@comment{
electronic{
  title        = {},
  year         = {},
  organization = {},
  url          = {},
}
}

@electronic{redlog,
  title        = {Redlog},
  year         = {2015},
  organization = {},
  url          = {http://www.redlog.eu/},
}

@electronic{coverity,
  title        = {Coverity},
  year         = {2015},
  organization = {Coverity, Inc.},
  url          = {http://www.coverity.com/},
}

@electronic{polyspace,
  title        = {Polyspace},
  year         = {2015},
  organization = {The MathWorks, Inc.},
  url          = {http://www.mathworks.com/products/polyspace/},
}

@electronic{cil,
  title        = {C {I}ntermediate {L}anguage},
  year         = {2015},
  organization = {},
  url          = {http://kerneis.github.io/cil/},
}

@electronic{cbmc,
  title        = {{CBMC}},
  year         = {2015},
  organization = {},
  url          = {http://www.cprover.org/cbmc/},
}

@electronic{cpachecker,
  title        = {{CPA}checker},
  year         = {2015},
  organization = {},
  url          = {http://cpachecker.sosy-lab.org/},
}


text:
package railing

import (
	"net/url"
	"testing"
)

func TestEncode(t *testing.T) {
	fixtures := []struct {
		in       Values
		expected string
	}{
		// 0
		{
			in:       Values{url.Values{}},
			expected: "",
		},
		// 1
		{
			in: Values{url.Values{
				"foo": []string{"1"},
				"bar": []string{"2"},
			}},
			expected: "bar=2&foo=1",
		},
		// 2
		{
			in: Values{url.Values{
				"array[]":   []string{"1", "2"},
				"foo":       []string{"1"},
				"bar[name]": []string{"name"},
				"bar[id]":   []string{"id"},
			}},
			// "array[]=1&array[]=2&bar[id]=id&bar[name]=name&foo=1"
			expected: "array%5B%5D=1&array%5B%5D=2&bar%5Bid%5D=id&bar%5Bname%5D=nam" +
				"e&foo=1",
		},
		// 3
		{
			in: Values{url.Values{
				"foo[][name]": []string{"a", "b"},
				"foo[][id]":   []string{"1", "2"},
			}},
			// "foo[][id]=1&foo[][name]=a&foo[][id]=2&foo[][name]=b"
			expected: "foo%5B%5D%5Bid%5D=1&foo%5B%5D%5Bname%5D=a&foo%5B%5D%5Bid%5D=" +
				"2&foo%5B%5D%5Bname%5D=b",
		},
		// 4
		{
			in: Values{url.Values{
				"array[][a][][a]": []string{"2", "1"},
				"array[][a][][z]": []string{"z", "a"},
			}},
			//  "[a][][a]=2&array[][a][][z]=z&array[][a][][a]=1&array[][a][][z]=a"
			expected: "array%5B%5D%5Ba%5D%5B%5D%5Ba%5D=2&array%5B%5D%5Ba%5D%5B%5D%5" +
				"Bz%5D=z&array%5B%5D%5Ba%5D%5B%5D%5Ba%5D=1&array%5B%5D%5Ba%5D%5B%5D%5" +
				"Bz%5D=a",
		},
		// 5
		{
			in: Values{url.Values{
				"a":                           []string{"val"},
				"array[]":                     []string{"a", "b"},
				"z[]":                         []string{"1", "2"},
				"a_b":                         []string{"val"},
				"foo[][id]":                   []string{"1", "2"},
				"obj1[id]":                    []string{"id"},
				"obj1[obj2][id]":              []string{"id"},
				"obj1[obj2][obj3][obj4][][b]": []string{"2", "2"},
				"obj1[obj2][obj3][objs][]":    []string{"1", "2"},
				"obj1[obj2][obj3][name][]":    []string{"name", "name"},
				"obj1[obj2][obj3][obj4][][a]": []string{"1", "1"},
			}},
			expected: "a=val&a_b=val&array%5B%5D=a&array%5B%5D=b&foo%5B%5D%5Bid%5D=" +
				"1&foo%5B%5D%5Bid%5D=2&obj1%5Bid%5D=id&obj1%5Bobj2%5D%5Bid%5D=id&obj1" +
				"%5Bobj2%5D%5Bobj3%5D%5Bname%5D%5B%5D=name&obj1%5Bobj2%5D%5Bobj3%5D%5" +
				"Bname%5D%5B%5D=name&obj1%5Bobj2%5D%5Bobj3%5D%5Bobj4%5D%5B%5D%5Ba%5D=" +
				"1&obj1%5Bobj2%5D%5Bobj3%5D%5Bobj4%5D%5B%5D%5Bb%5D=2&obj1%5Bobj2%5D%5" +
				"Bobj3%5D%5Bobj4%5D%5B%5D%5Ba%5D=1&obj1%5Bobj2%5D%5Bobj3%5D%5Bobj4%5D" +
				"%5B%5D%5Bb%5D=2&obj1%5Bobj2%5D%5Bobj3%5D%5Bobjs%5D%5B%5D=1&obj1%5Bob" +
				"j2%5D%5Bobj3%5D%5Bobjs%5D%5B%5D=2&z%5B%5D=1&z%5B%5D=2",
		},
	}
	for i, fixture := range fixtures {
		if out := fixture.in.Encode(); out != fixture.expected {
			t.Errorf("expected %s; got %s (i=%d)", fixture.expected, out, i)
		}
	}
}

repository: rjeczalik/railing

repo_name: rjeczalik/railing


text:
inherit gpe pkgconfig
LICENSE = "GPL"

PR = "r2"

DEPENDS = "virtual/libx11 xcursor-transparent-theme xrdb"
SECTION = "gpe"
RDEPENDS = "xrdb"

DESCRIPTION = "Touchscreen detection utility"

SRC_URI = "${GPE_MIRROR}/${PN}-${PV}.tar.gz \
           file://access.patch;patch=1;pnum=0 \
	   file://extra-device-check.patch;patch=1 \
	   file://correct-theme-name.patch;patch=1"

export CVSBUILD="no"


text:
package main

import (
	"bufio"
	"fmt"
	"log"
	"os"
	"sort"
	"strconv"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)

	// First input, sock quantity.
	scanner.Scan()
	n, err := strconv.Atoi(scanner.Text())
	if err != nil {
		log.Fatal("ERROR: Input socks quantity is not valid.")
	}
	if n < 1 || n > 100 {
		log.Fatal("ERROR: Socks quantity must be between 1 - 100.")
	}

	// Second input, colour of socks.
	scanner.Scan()
	colours := scanner.Text()

	coloursSlice := strings.Split(colours, " ")
	if len(coloursSlice) != n {
		log.Fatalf("ERROR: Quantity of colours is unequal to the quantity of the socks.\n"+
			"Colour quantity: %d.\nSocks quantity: %d.",
			len(coloursSlice), n)
	}

	ar := make([]int, n)
	for idx, colour := range coloursSlice {

		ar[idx], err = strconv.Atoi(colour)

		if err != nil {
			log.Fatalf("%v is not an integer.", colour)
		}
		if ar[idx] < 1 || ar[idx] > 100 {
			log.Fatal("Colour number must be between 1 - 100.")
		}
	}

	// TODO: refactor the code so n is actually useful in sockMerchant()
	result := sockMerchant(n, ar)

	fmt.Println(result)
}

// SockMerchant takes:
//
// - n  : the number of socks.
//
// - ar : the colours of the socks. Represented with numbers.
//
// Returns an int representing the number of matching pairs of socks that are available.
func sockMerchant(n int, ar []int) int {
	var result int

	// 1. Sort the slice
	// 2. Do a loop
	// 3. Check if the value of i index is the same as the i+1 index
	// 4. If yes, result += 1
	// 5. If no, continue loop.

	sort.Ints(ar)

	for i := 0; i < n-1; i++ {
		if ar[i] == ar[i+1] {
			result += 1
			i++
		}
	}

	return result
}

repository: Vaerrwenn/Kulina-test

repo_name: Vaerrwenn/Kulina-test


text:
DESCRIPTION = "PhysicsFS is a library to provide abstract access to various archives"
HOMEAPAGE = "http://icculus.org/physfs"
LICENSE = "Zlib"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5d94e3eaaa10b00ca803ba35a3e87cde"
DEPENDS = "readline zlib"

inherit cmake

SRC_URI = "http://icculus.org/${PN}/downloads/${PN}-${PV}.tar.bz2"
SRC_URI[md5sum] = "c2c727a8a8deb623b521b52d0080f613"
SRC_URI[sha256sum] = "ca862097c0fb451f2cacd286194d071289342c107b6fe69079c079883ff66b69"

repository: ExorEmbedded/exor-workspace

repo_name: ExorEmbedded/exor-workspace


text:
SUMMARY = "raw image decoder"
LICENSE = "LGPLv2.1 | CDDL-1.0"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=49dc9ed77b52e7fb5a619e055be195f3"

SRC_URI = "git://github.com/LibRaw/LibRaw.git;branch=0.19-stable"
SRCREV = "beeb572687270d49c16734c9ca620982151dbeff"
S = "${WORKDIR}/git"
PV = "0.19.5"

inherit autotools pkgconfig

DEPENDS = "jpeg jasper lcms"


text:
DESCRIPTION = "rtiled for azbox"

SRCDATE = "20120222"
PV = "${SRCDATE}"
PR = "r0"

SRC_URI = "http://openee.sifteam.eu/azbox/rtiled-${MACHINE}-${SRCDATE}.zip"

FILES_${PN} = "/usr/"

S = "${WORKDIR}/RtiLED"

do_compile() {
}

do_install() {
	install -d ${D}/usr/lib/enigma2/python/Plugins/Extensions/RtiLED
	cp -rp ${S}/* ${D}/usr/lib/enigma2/python/Plugins/Extensions/RtiLED
}

repository: edwarekuo/openembedded

repo_name: edwarekuo/openembedded


text:
//
// Last.Backend LLC CONFIDENTIAL
// __________________
//
// [2014] - [2018] Last.Backend LLC
// All Rights Reserved.
//
// NOTICE:  All information contained herein is, and remains
// the property of Last.Backend LLC and its suppliers,
// if any.  The intellectual and technical concepts contained
// herein are proprietary to Last.Backend LLC
// and its suppliers and may be covered by Russian Federation and Foreign Patents,
// patents in process, and are protected by trade secret or copyright law.
// Dissemination of this information or reproduction of this material
// is strictly forbidden unless prior written permission is obtained
// from Last.Backend LLC.
//

package resource

import (
	"fmt"
	"regexp"
	"strconv"
	"strings"
)

const (
	// MB - MegaByte size
	MB = 1000 * 1000
	// MIB - MegaByte size
	MIB = 1024 * 1024
	// GB - GigaByte size
	GB = 1000 * 1000 * 1000
	// GIB - GibiByte size
	GIB = 1024 * 1024 * 1024
)

// parseResource - parse resource size string
// mb,mib,gb,gib,kb,kib,
func DecodeResource(res string) (int64, error) {

	var i = int64(1024)

	rq := regexp.MustCompile("([0-9]+)\\w*.*")
	rt := regexp.MustCompile("\\d*(\\w+)?.*")
	mq := rq.FindStringSubmatch(res)
	mt := rt.FindStringSubmatch(res)

	if len(mt) == 2 {
		switch strings.ToLower(mt[1]) {
		case "mb":
			i = MB
			break
		case "mib":
			i = MIB
			break
		case "gb":
			i = GB
			break
		case "gib":
			i = GIB
			break
		}
	}

	if len(mq) == 2 {

		q, err := strconv.ParseInt(mq[1], 10, 64)
		if err != nil {
			return i, err
		}
		i*=q
	}

	return i, nil
}

func EncodeResource(res int64) string {

	var r string

	if res < MB {
		return fmt.Sprintf("%d", res/1024)
	}

	if res > MB && res < GB {
		return fmt.Sprintf("%dMB", res/MB)
	}

	if res > GB  {
		return fmt.Sprintf("%dGB", res/GB)
	}

	return r
}

repository: NastyaKurova/lastbackend

repo_name: NastyaKurova/lastbackend


text:
@article{Deba16,
 abstract = {To investigate whether atlas-based anatomical information can improve a fully automated lymph node detection system for pelvic MR lymphography (MRL) images of patients with prostate cancer.Their data set contained MRL images of 240 prostate cancer patients who had an MRL as part of their clinical work-up between January 2008 and April 2010, with ferumoxtran-10 as contrast agent. Each MRL consisted of at least a 3D T1-weighted sequence, a 3D T2*-weighted sequence, and a FLASH-3D sequence. The reference standard was created by two expert readers, reading in consensus, who annotated and interactively segmented the lymph nodes in all MRL studies. A total of 5089 lymph nodes were annotated. A fully automated computer-aided detection (CAD) system was developed to find lymph nodes in the MRL studies. The system incorporates voxel features based on image intensities, the Hessian matrix, and spatial position. After feature calculation, a GentleBoost-classifier in combination with local maxima detection was used to identify lymph node candidates. Multiatlas based anatomical information was added to the CAD system to assess whether this could improve performance. Using histogram analysis and free-receiver operating characteristic analysis, this was compared to a strategy where relative position features were used to encode anatomical information.Adding atlas-based anatomical information to the CAD system reduced false positive detections both visually and quantitatively. Median likelihood values of false positives decreased significantly in all annotated anatomical structures. The sensitivity increased from 53% to 70% at 10 false positives per lymph node.Adding anatomical information through atlas registration significantly improves an automated lymph node detection system for MRL images.},
 author = {Debats, Oscar A. and Meijs, Midas and Litjens, Geert J. S. and Huisman, Henkjan J.},
 doi = {10.1118/1.4951726},
 file = {Deba16.pdf:pdf\\Deba16.pdf:PDF},
 institution = {Department of Radiology and Nuclear Medicine, Radboud University Medical Center, Nijmegen 6525 GA, The Netherlands.},
 journal = {Med Phys},
 language = {eng},
 medline-pst = {ppublish},
 month = {Jun},
 number = {6},
 optnote = {DIAG, RADIOLOGY, ProstateCancer},
 pages = {3132},
 pmid = {27277059},
 title = {Automated multistructure atlas-assisted detection of lymph nodes using pelvic MR lymphography in prostate cancer patients},
 volume = {43},
 year = {2016}
}


text:
SET(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory")

FIND_PATH(CPLEX_INCLUDE_DIR
  ilcplex/cplex.h
  PATHS "C:/ILOG/CPLEX/include"
  PATHS "/opt/ilog/cplex/include"
  HINTS ${CPLEX_ROOT_DIR}/include
)
FIND_LIBRARY(CPLEX_LIBRARY
  cplex
  PATHS "C:/ILOG/CPLEX/lib/msvc7/stat_mda"
  PATHS "/opt/ilog/cplex/bin"
  HINTS ${CPLEX_ROOT_DIR}/bin
  HINTS ${CPLEX_ROOT_DIR}/lib
)

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG CPLEX_LIBRARY CPLEX_INCLUDE_DIR)

FIND_PATH(CPLEX_BIN_DIR
  cplex.dll
  PATHS "C:/ILOG/CPLEX/bin/x86_win32"
  HINTS ${CPLEX_ROOT_DIR}/bin
)

IF(CPLEX_FOUND)
  SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR})
  SET(CPLEX_LIBRARIES ${CPLEX_LIBRARY})
  IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
    SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread")
  ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
ENDIF(CPLEX_FOUND)

MARK_AS_ADVANCED(CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_BIN_DIR)

IF(CPLEX_FOUND)
  SET(LEMON_HAVE_LP TRUE)
  SET(LEMON_HAVE_MIP TRUE)
  SET(LEMON_HAVE_CPLEX TRUE)
ENDIF(CPLEX_FOUND)

repository: ucr-ufluidics/lemon

repo_name: ucr-ufluidics/lemon


text:
@phdthesis{weerdenburg2009,
  author      = {"{M.J. van} Weerdenburg"},
  title       = {Efficient Rewriting Techniques},
  year        = {2009}
}

@inproceedings{weerdenburg2007,
  author     = {"{Muck van} Weerdenburg"},
  title      = {An Account of Implementing Applicative Term Rewriting},
  booktitle  = {Proceedings of the Sixth International Workshop on Reduction Strategies in Rewriting and Programming (WRS 2006)},
  series     = {Electronic Notes in Theoretical Computer Science},
  volume     = {174},
  issue      = {10},
  year       = {2007},
  pages      = {139--155},
  doi        = {http://www.sciencedirect.com/science/article/B75H1-4P1PR1K-8/1/5253768ebeae971aa59bbf60c7ba56d2}
}

@misc{vanderwulp2009,
  author     = {"{Jeroen van der} Wulp"},
  title      = {Notes for the design of a reusable higher-order conditional rewriting library},
  year       = {2009}
}

@inproceedings{DBLP:conf/rta/Raamsdonk01,
  author    = {Femke van Raamsdonk},
  title     = {On Termination of Higher-Order Rewriting},
  booktitle = {RTA},
  year      = {2001},
  pages     = {261-275},
  ee        = {http://dx.doi.org/10.1007/3-540-45127-7_20},
  crossref  = {DBLP:conf/rta/2001},
  bibsource = {DBLP, http://dblp.uni-trier.de}
}

@proceedings{DBLP:conf/rta/2001,
  editor    = {Aart Middeldorp},
  title     = {Rewriting Techniques and Applications, 12th International Conference,
               {RTA} 2001, Utrecht, The Netherlands, May 22-24, 2001, Proceedings},
  series    = {Lecture Notes in Computer Science},
  volume    = {2051},
  publisher = {Springer},
  year      = {2001},
  isbn      = {3-540-42117-3},
  timestamp = {Thu, 03 Jan 2002 12:08:01 +0100},
  biburl    = {http://dblp.uni-trier.de/rec/bib/conf/rta/2001},
  bibsource = {dblp computer science bibliography, http://dblp.org}
}


text:
@incollection{Elton2020,
  year = {2020},
  publisher = {Springer International Publishing},
  pages = {95-106},
  author = {Daniel C. Elton},
  title = {Self-explaining {AI} as an Alternative to Interpretable {AI}},
  booktitle = {Proceedings of the 13th Annual Conference on Artificial General Intelligence (AGI-2020)},
  arxiv = {https://arxiv.org/abs/2002.05149},
  url = {https://link.springer.com/chapter/10.1007/978-3-030-52152-3_10}
}

gha_language: HTML


text:
/*

 // DESENVOLVIDO POR ITALO CASTRO (EMIERIXIX) //

Facebook: https://www.facebook.com/italodzn
Github: https://www.github.com/Emierixix
Instagram: https://www.instagram.com/Emierixix

Se for usar não remova isso por favor ! e muito obrigado por usar.

 */
@media only screen and (max-width:360px){
	.painel{
		height: 400px;
		width: 300px;
	}
	input{
		width: 250px;
	}
	.btn{
		width: 250px;
	}
	.painel{
		margin-top: 100px;
	}
}

@media only screen and (max-width:320px) and (max-height: 580px){
	.painel{
		height: 400px;
		width: 250px;
	}
	input{
		width: 235px;
	}
	.btn{
		width: 235px;
	}
	.painel{
		margin-top: 100px;
	}
}

@media only screen and (max-height: 580px){
	.painel{
		margin-top: 100px;
	}
}

repository: Emierixix/Form-Login

repo_name: Emierixix/Form-Login

extension: css


text:
SUMMARY = "udisks provides dbus interfaces for disks and storage devices"
LICENSE = "GPL-2.0-or-later & LGPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=dd79f6dbbffdbc8e86b086a8f0c0ef43"

DEPENDS = " \
    glib-2.0-native \
    libxslt-native \
    acl \
    libatasmart \
    polkit \
    libgudev \
    glib-2.0 \
    dbus-glib \
    libblockdev \
"
DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"

RDEPENDS:${PN} = "acl"

SRC_URI = "git://github.com/storaged-project/udisks.git;branch=2.9.x-branch;protocol=https"
SRCREV = "001c486e6d099ed33e2de4f5c73c03e3ee180f81"
S = "${WORKDIR}/git"

CVE_PRODUCT = "udisks"

inherit autotools-brokensep systemd gtk-doc gobject-introspection gettext features_check

REQUIRED_DISTRO_FEATURES = "polkit"

EXTRA_OECONF = "--disable-man --disable-gtk-doc"

do_configure:prepend() {
    # | configure.ac:656: error: required file 'build-aux/config.rpath' not found
    mkdir -p ${S}/build-aux
    touch ${S}/build-aux/config.rpath
}

PACKAGECONFIG ?= ""

PACKAGECONFIG[lvm2] = "--enable-lvm2,--disable-lvm2,lvm2"
PACKAGECONFIG[btrfs] = "--enable-btrfs,--disable-btrfs,,btrfs-tools"
PACKAGECONFIG[lsm] = "--enable-lsm,--disable-lsm,libstoragemgmt"

FILES:${PN} += " \
    ${datadir}/dbus-1/ \
    ${datadir}/polkit-1 \
    ${datadir}/bash-completion \
    ${libdir}/polkit-1/extensions/*.so \
    ${nonarch_base_libdir}/udev/* \
    ${exec_prefix}${nonarch_base_libdir}/udisks2/* \
    ${systemd_system_unitdir} \
"

PACKAGES =+ "${PN}-libs"
FILES:${PN}-libs = "${libdir}/lib*${SOLIBS}"
FILES:${PN} += "${nonarch_libdir}/tmpfiles.d"

SYSTEMD_SERVICE:${PN} = "${BPN}.service"
SYSTEMD_AUTO_ENABLE = "disable"

repository: openembedded/meta-openembedded

repo_name: openembedded/meta-openembedded


text:
LICENSE = "GPL"

PNAME = "gtksourceview"

DEPENDS = "gtk+ libgnomeprint"

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

inherit gnome pkgconfig

# overrule SRC_URI from gnome.conf
SRC_URI = "${GNOME_MIRROR}/${PNAME}/${@gnome_verdir("${PV}")}/${PNAME}-${PV}.tar.bz2"

SRC_URI[md5sum] = "a56ea78c74fe93a604357d7c555af0e5"
SRC_URI[sha256sum] = "38c238ec57bf22023bbc50f70ecbaee8c06b817b9e11f1a3a0ae7faf95cc1f26"


text:
DESCRIPTION = "Host side USB console utilities."
SECTION = "base"
DEPENDS += "libusb1"
LICENSE = "GPLv2"
PRIORITY = "optional"

PR = "r0"

SRC_URI = "http://mirror.anl.gov/pub/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \
	  "
inherit autotools

repository: BlackPole/bp-openembedded

repo_name: BlackPole/bp-openembedded


text:
@unpublished{Crawford2019,
  author = "Crawford, T Daniel and Kumar, Ashutosh and Bazanté, Alexandre and
    Di Remigio, Roberto",
  title = "Reduced-Scaling Coupled Cluster Response Theory: Challenges and Opportunities",
  journal = "WIREs Comput Mol Sci",
  year = 2019,
  pubstate = inpress,
  howpublished = {\emph{In press}}
}

@unpublished{Spencer2018-tc,
  title         = "{The HANDE-QMC project: open-source stochastic quantum
                   chemistry from the ground state up}",
  author        = "Spencer, James S and Blunt, Nick S and Choi, Seonghoon and
                   Etrych, Jiri and Filip, Maria-Andreea and Foulkes, W Matthew
                   C and Franklin, Ruth S T and Handley, Will J and Malone,
                   Fionn D and Neufeld, Verena A and Di Remigio, Roberto and
                   Rogers, Tom W and Scott, Charles J C and Shepherd, James J
                   and Weston, Joseph and Vigor, William A and Zu, Ruqing and
                   Thom, Alex J W",
  month         =  nov,
  year          =  2018,
  url           = "http://arxiv.org/abs/1811.11679",
  archivePrefix = "arXiv",
  eprint        = "1811.11679",
  primaryClass  = "physics.comp-ph",
  arxivid       = "1811.11679",
  howpublished = {\emph{Submitted}}
}

@Unpublished{diagccmc,
  author = {Scott, Charles J. C. and Di Remigio, Roberto and Crawford, T. Daniel and Thom, Alex J. W.},
  title = {{Diagrammatic Coupled Cluster Monte Carlo}},
  year  =  2018,
  howpublished = {\emph{In preparation}}
}

@Unpublished{pcm_triples,
  author = {Di Remigio, Roberto and Crawford, T. Daniel and Simmonett, Andrew C. and Frediani, Luca},
  title = {{Coupled Cluster and Polarizable Continuum Model: Investigation of Perturbative Triples Corrections}},
  howpublished = {\emph{In preparation}}
}

@Unpublished{rt-unpublished,
  author = {Di Remigio, Roberto and Repisky, Michal and Frediani, Luca},
  title = "{A Polarizable Continuum Model for 4-component Relativistic Real-Time Time-Dependent Density Functional Theory}",
  howpublished = {\emph{In preparation}}
}

@Unpublished{fq-unpublished,
  author = {Di Remigio, Roberto and Giovannini, Tommaso and Ambrosetti, Matteo
    and Cappelli, Chiara and Frediani, Luca},
  title = "{A QM/MM Approach to Two-Photon Absorption in Solution Using the Fluctuating Charge Force Field}",
  howpublished = {\emph{In preparation}}
}

repository: robertodr/CV

repo_name: robertodr/CV


text:
SUMMARY = "Phosphor LED Group Management with MRW generated data"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
DEPENDS += "mrw-native mrw-perl-tools-native"
PROVIDES += "virtual/phosphor-led-manager-config-native"
PR = "r1"

inherit mrw-xml
inherit native

# Generate a YAML files based on MRW input
do_install:append() {
    USE_MRW="${@bb.utils.contains('DISTRO_FEATURES', 'obmc-mrw', 'yes', 'no', d)}"
    DEST=${D}${datadir}/phosphor-led-manager
    if [ "${USE_MRW}" = "yes" ]; then
        install -d ${DEST}/
        ${STAGING_BINDIR_NATIVE}/perl-native/perl \
        ${STAGING_BINDIR_NATIVE}/gen_led_groups.pl \
        -i ${mrw_datadir}/${MRW_XML} \
        -o ${DEST}/led.yaml
    fi
}

repository: openbmc/openbmc

repo_name: openbmc/openbmc


text:
// generated by stacks/gong/go/models/controller_file.go
package controllers

import (
	"net/http"
	"time"

	"github.com/fullstack-lang/gonggooglecharts/go/models"
	"github.com/fullstack-lang/gonggooglecharts/go/orm"

	"github.com/gin-gonic/gin"
)

// declaration in order to justify use of the models import
var __Task__dummysDeclaration__ models.Task
var __Task_time__dummyDeclaration time.Duration

// An TaskID parameter model.
//
// This is used for operations that want the ID of an order in the path
// swagger:parameters getTask updateTask deleteTask
type TaskID struct {
	// The ID of the order
	//
	// in: path
	// required: true
	ID int64
}

// TaskInput is a schema that can validate the user’s
// input to prevent us from getting invalid data
// swagger:parameters postTask updateTask
type TaskInput struct {
	// The Task to submit or modify
	// in: body
	Task *orm.TaskAPI
}

// GetTasks
//
// swagger:route GET /tasks tasks getTasks
//
// Get all tasks
//
// Responses:
//    default: genericError
//        200: taskDBsResponse
func GetTasks(c *gin.Context) {
	db := orm.BackRepo.BackRepoTask.GetDB()

	// source slice
	var taskDBs []orm.TaskDB
	query := db.Find(&taskDBs)
	if query.Error != nil {
		var returnError GenericError
		returnError.Body.Code = http.StatusBadRequest
		returnError.Body.Message = query.Error.Error()
		c.JSON(http.StatusBadRequest, returnError.Body)
		return
	}

	// slice that will be transmitted to the front
	taskAPIs := make([]orm.TaskAPI, 0)

	// for each task, update fields from the database nullable fields
	for idx := range taskDBs {
		taskDB := &taskDBs[idx]
		_ = taskDB
		var taskAPI orm.TaskAPI

		// insertion point for updating fields
		taskAPI.ID = taskDB.ID
		taskDB.CopyBasicFieldsToTask(&taskAPI.Task)
		taskAPI.TaskPointersEnconding = taskDB.TaskPointersEnconding
		taskAPIs = append(taskAPIs, taskAPI)
	}

	c.JSON(http.StatusOK, taskAPIs)
}

// PostTask
//
// swagger:route POST /tasks tasks postTask
//
// Creates a task
//     Consumes:
//     - application/json
//
//     Produces:
//     - application/json
//
//     Responses:
//       200: taskDBResponse
func PostTask(c *gin.Context) {
	db := orm.BackRepo.BackRepoTask.GetDB()

	// Validate input
	var input orm.TaskAPI

	err := c.ShouldBindJSON(&input)
	if err != nil {
		var returnError GenericError
		returnError.Body.Code = http.StatusBadRequest
		returnError.Body.Message = err.Error()
		c.JSON(http.StatusBadRequest, returnError.Body)
		return
	}

	// Create task
	taskDB := orm.TaskDB{}
	taskDB.TaskPointersEnconding = input.TaskPointersEnconding
	taskDB.CopyBasicFieldsFromTask(&input.Task)

	query := db.Create(&taskDB)
	if query.Error != nil {
		var returnError GenericError
		returnError.Body.Code = http.StatusBadRequest
		returnError.Body.Message = query.Error.Error()
		c.JSON(http.StatusBadRequest, returnError.Body)
		return
	}

	// a POST is equivalent to a back repo commit increase
	// (this will be improved with implementation of unit of work design pattern)
	orm.BackRepo.IncrementPushFromFrontNb()

	c.JSON(http.StatusOK, taskDB)
}

// GetTask
//
// swagger:route GET /tasks/{ID} tasks getTask
//
// Gets the details for a task.
//
// Responses:
//    default: genericError
//        200: taskDBResponse
func GetTask(c *gin.Context) {
	db := orm.BackRepo.BackRepoTask.GetDB()

	// Get taskDB in DB
	var taskDB orm.TaskDB
	if err := db.First(&taskDB, c.Param("id")).Error; err != nil {
		var returnError GenericError
		returnError.Body.Code = http.StatusBadRequest
		returnError.Body.Message = err.Error()
		c.JSON(http.StatusBadRequest, returnError.Body)
		return
	}

	var taskAPI orm.TaskAPI
	taskAPI.ID = taskDB.ID
	taskAPI.TaskPointersEnconding = taskDB.TaskPointersEnconding
	taskDB.CopyBasicFieldsToTask(&taskAPI.Task)

	c.JSON(http.StatusOK, taskAPI)
}

// UpdateTask
//
// swagger:route PATCH /tasks/{ID} tasks updateTask
//
// Update a task
//
// Responses:
//    default: genericError
//        200: taskDBResponse
func UpdateTask(c *gin.Context) {
	db := orm.BackRepo.BackRepoTask.GetDB()

	// Get model if exist
	var taskDB orm.TaskDB

	// fetch the task
	query := db.First(&taskDB, c.Param("id"))

	if query.Error != nil {
		var returnError GenericError
		returnError.Body.Code = http.StatusBadRequest
		returnError.Body.Message = query.Error.Error()
		c.JSON(http.StatusBadRequest, returnError.Body)
		return
	}

	// Validate input
	var input orm.TaskAPI
	if err := c.ShouldBindJSON(&input); err != nil {
		c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
		return
	}

	// update
	taskDB.CopyBasicFieldsFromTask(&input.Task)
	taskDB.TaskPointersEnconding = input.TaskPointersEnconding

	query = db.Model(&taskDB).Updates(taskDB)
	if query.Error != nil {
		var returnError GenericError
		returnError.Body.Code = http.StatusBadRequest
		returnError.Body.Message = query.Error.Error()
		c.JSON(http.StatusBadRequest, returnError.Body)
		return
	}

	// an UPDATE generates a back repo commit increase
	// (this will be improved with implementation of unit of work design pattern)
	orm.BackRepo.IncrementPushFromFrontNb()

	// return status OK with the marshalling of the the taskDB
	c.JSON(http.StatusOK, taskDB)
}

// DeleteTask
//
// swagger:route DELETE /tasks/{ID} tasks deleteTask
//
// Delete a task
//
// Responses:
//    default: genericError
func DeleteTask(c *gin.Context) {
	db := orm.BackRepo.BackRepoTask.GetDB()

	// Get model if exist
	var taskDB orm.TaskDB
	if err := db.First(&taskDB, c.Param("id")).Error; err != nil {
		var returnError GenericError
		returnError.Body.Code = http.StatusBadRequest
		returnError.Body.Message = err.Error()
		c.JSON(http.StatusBadRequest, returnError.Body)
		return
	}

	// with gorm.Model field, default delete is a soft delete. Unscoped() force delete
	db.Unscoped().Delete(&taskDB)

	// a DELETE generates a back repo commit increase
	// (this will be improved with implementation of unit of work design pattern)
	orm.BackRepo.IncrementPushFromFrontNb()

	c.JSON(http.StatusOK, gin.H{"data": true})
}

repository: fullstack-lang/gonggooglecharts

repo_name: fullstack-lang/gonggooglecharts


text:
DESCRIPTION = "Python Bindings for the Cairo canvas library"
SECTION = "devel/python"
HOMEPAGE = "http://cairographics.org/pycairo"
LICENSE = "LGPL MPL"
# cairo >= 1.8.0
DEPENDS = "cairo"
PR = "ml4"

SRC_URI = "http://cairographics.org/releases/pycairo-${PV}.tar.gz \
           file://fix-setup-py.patch"
S = "${WORKDIR}/pycairo-${PV}"

inherit distutils pkgconfig

do_configure_append() {
	sed -e 's:@prefix@:${prefix}:' -e 's:@includedir@:\$\{prefix\}/include:' -e 's:@VERSION@:${PV}:' pycairo.pc.in > pycairo.pc
}

do_install_append() {
	mv ${D}${datadir}/include/* ${D}${includedir}
	mv ${D}${datadir}/lib/* ${D}${libdir}
	install -d ${D}${includedir}/pycairo
	ln -sf ..//pycairo.h ${D}${includedir}/pycairo/
}

SRC_URI[md5sum] = "847f5377c32228a656819f5bd18eb6b4"
SRC_URI[sha256sum] = "a2272dafceb25ed9fedd0b10429dfec9c412b3b36eb6137f79c87e7d004036d4"


text:
SUMMARY = "BK-0010/0011/Terak 8510a emulator"
DESCRIPTION = "BK-0010/0011/Terak 8510a emulator"

LICENSE = "BK"
LIC_FILES_CHKSUM = "file://COPYING;md5=6ad70b1941b6bf33cc0bd21a2a7c958b"

inherit libretro

LIBRETRO_GIT_REPO = "github.com/libretro/bk-emulator.git"


text:
DESCRIPTION = "Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information."
HOMEPAGE = "http://maven.apache.org/"

LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"

# http://ftp.fau.de/apache/maven/maven-3/3.2.2/source/apache-maven-3.2.2-src.tar.gz
# http://www.apache.org/dist/maven/maven-3/3.2.2/source/apache-maven-3.2.2-src.tar.gz.md5
# dc3c7042348859fd2358ff31648da923

DEPENDS = "ant-native "

#inherit java-library java-native

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

SRC_URI = "http://ftp.fau.de/apache/maven/maven-3/3.2.2/source/apache-maven-${PV}-src.tar.gz \
	file://own-repo.patch"
SRC_URI[md5sum] = "dc3c7042348859fd2358ff31648da923"

S = "${WORKDIR}/apache-maven-${PV}"

do_removebinaries() {
    # do not remove bundled jar for maven-ant-tasks
    echo "No, Sir!"
}

do_compile() {
    	cd ${S}

    	export M2_HOME="${STAGING_LIBDIR_NATIVE}/${PN}-${PV}"
	export M2_REPO_LOCAL="${BASE_WORKDIR}/${PN}-${PV}"
	which ant
	which javac
	ant
}

repository: rdm-dev/meta-jens

repo_name: rdm-dev/meta-jens

branch_name: refs/heads/jethro-kiebitzsee


text:
package utils

// Money represents an amount of money with its currency type.
type Money struct {
	// CurrencyCode is the 3-letter currency code defined in ISO 4217.
	CurrencyCode string `json:"currency_code,omitempty"`

	// Units is the whole units of the amount.
	// For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
	Units int64 `json:"units,omitempty"`

	// Nanos is the number of nano (10^-9) units of the amount.
	// The value must be between -999,999,999 and +999,999,999 inclusive.
	// If `units` is positive, `nanos` must be positive or zero.
	// If `units` is zero, `nanos` can be positive, zero, or negative.
	// If `units` is negative, `nanos` must be negative or zero.
	// For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
	Nanos int32 `json:"nanos,omitempty"`
}

// NewMoneyFromFloat conerts a float with currency to a Money object.
func NewMoneyFromFloat(value float64, currency string) *Money {
	return &Money{
		CurrencyCode: currency,
		Units:        int64(value),
		Nanos:        int32((value - float64(int64(value))) * 1000000000),
	}
}

// ToFloat converts a Money object to a float.
func (m *Money) ToFloat() float64 {
	return float64(m.Units) + float64(m.Nanos)/1000000000
}


text:
package model

import (
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils"

	"strings"
)

// CreateResSceneRequestBody This is a auto create Body Object
type CreateResSceneRequestBody struct {

	// 场景类型： - customize，自定义推荐
	Category string `json:"category"`

	// 数据源id。
	DatasourceId string `json:"datasource_id"`

	DsConfig *DsConfig `json:"ds_config"`

	// 场景名称，1-64位的字母、数字、下划线、中划线组合。
	SceneName string `json:"scene_name"`

	SpecsConfig *SpecsConfig `json:"specs_config"`

	// 场景类型： - UI，基于用户推荐物品 - UU，基于用户推荐用户 - II，基于物品推荐物品 - IU，基于物品推荐用户
	Type string `json:"type"`

	// 服务类型： - rank，排序服务 - rec，推荐服务
	ServiceType string `json:"service_type"`
}

func (o CreateResSceneRequestBody) String() string {
	data, err := utils.Marshal(o)
	if err != nil {
		return "CreateResSceneRequestBody struct{}"
	}

	return strings.Join([]string{"CreateResSceneRequestBody", string(data)}, " ")
}


text:
# base recipe: meta-python/recipes-devtools/python/python3-webencodings_0.5.1.bb
# base branch: warrior
# base commit: 4fa2b14ee8067abc1f095cae49e32598e59e2e85

inherit setuptools3
require python-webencodings.inc

repository: miraclelinux/meta-debian-extended

repo_name: miraclelinux/meta-debian-extended

branch_name: refs/heads/warrior