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

package apis

import (
    "github.com/jdcloud-api/jdcloud-sdk-go/core"
)

type CreateNetworkInterfaceRequest struct {

    core.JDCloudRequest

    /* Region ID  */
    RegionId string `json:"regionId"`

    /* 子网ID  */
    SubnetId string `json:"subnetId"`

    /* 可用区，用户的默认可用区，该参数无效，不建议使用 (Optional) */
    Az *string `json:"az"`

    /* 网卡名称，只允许输入中文、数字、大小写字母、英文下划线“_”及中划线“-”，不允许为空且不超过32字符。 (Optional) */
    NetworkInterfaceName *string `json:"networkInterfaceName"`

    /* 网卡主IP，如果不指定，会自动从子网中分配 (Optional) */
    PrimaryIpAddress *string `json:"primaryIpAddress"`

    /* SecondaryIp列表 (Optional) */
    SecondaryIpAddresses []string `json:"secondaryIpAddresses"`

    /* 自动分配的SecondaryIp数量 (Optional) */
    SecondaryIpCount *int `json:"secondaryIpCount"`

    /* 要绑定的安全组ID列表，最多指定5个安全组 (Optional) */
    SecurityGroups []string `json:"securityGroups"`

    /* 源和目标IP地址校验，取值为0或者1,默认为1 (Optional) */
    SanityCheck *int `json:"sanityCheck"`

    /* 描述, 允许输入UTF-8编码下的全部字符，不超过256字符 (Optional) */
    Description *string `json:"description"`
}

/*
 * param regionId: Region ID (Required)
 * param subnetId: 子网ID (Required)
 *
 * @Deprecated, not compatible when mandatory parameters changed
 */
func NewCreateNetworkInterfaceRequest(
    regionId string,
    subnetId string,
) *CreateNetworkInterfaceRequest {

	return &CreateNetworkInterfaceRequest{
        JDCloudRequest: core.JDCloudRequest{
			URL:     "/regions/{regionId}/networkInterfaces/",
			Method:  "POST",
			Header:  nil,
			Version: "v1",
		},
        RegionId: regionId,
        SubnetId: subnetId,
	}
}

/*
 * param regionId: Region ID (Required)
 * param subnetId: 子网ID (Required)
 * param az: 可用区，用户的默认可用区，该参数无效，不建议使用 (Optional)
 * param networkInterfaceName: 网卡名称，只允许输入中文、数字、大小写字母、英文下划线“_”及中划线“-”，不允许为空且不超过32字符。 (Optional)
 * param primaryIpAddress: 网卡主IP，如果不指定，会自动从子网中分配 (Optional)
 * param secondaryIpAddresses: SecondaryIp列表 (Optional)
 * param secondaryIpCount: 自动分配的SecondaryIp数量 (Optional)
 * param securityGroups: 要绑定的安全组ID列表，最多指定5个安全组 (Optional)
 * param sanityCheck: 源和目标IP地址校验，取值为0或者1,默认为1 (Optional)
 * param description: 描述, 允许输入UTF-8编码下的全部字符，不超过256字符 (Optional)
 */
func NewCreateNetworkInterfaceRequestWithAllParams(
    regionId string,
    subnetId string,
    az *string,
    networkInterfaceName *string,
    primaryIpAddress *string,
    secondaryIpAddresses []string,
    secondaryIpCount *int,
    securityGroups []string,
    sanityCheck *int,
    description *string,
) *CreateNetworkInterfaceRequest {

    return &CreateNetworkInterfaceRequest{
        JDCloudRequest: core.JDCloudRequest{
            URL:     "/regions/{regionId}/networkInterfaces/",
            Method:  "POST",
            Header:  nil,
            Version: "v1",
        },
        RegionId: regionId,
        SubnetId: subnetId,
        Az: az,
        NetworkInterfaceName: networkInterfaceName,
        PrimaryIpAddress: primaryIpAddress,
        SecondaryIpAddresses: secondaryIpAddresses,
        SecondaryIpCount: secondaryIpCount,
        SecurityGroups: securityGroups,
        SanityCheck: sanityCheck,
        Description: description,
    }
}

/* This constructor has better compatible ability when API parameters changed */
func NewCreateNetworkInterfaceRequestWithoutParam() *CreateNetworkInterfaceRequest {

    return &CreateNetworkInterfaceRequest{
            JDCloudRequest: core.JDCloudRequest{
            URL:     "/regions/{regionId}/networkInterfaces/",
            Method:  "POST",
            Header:  nil,
            Version: "v1",
        },
    }
}

/* param regionId: Region ID(Required) */
func (r *CreateNetworkInterfaceRequest) SetRegionId(regionId string) {
    r.RegionId = regionId
}
/* param subnetId: 子网ID(Required) */
func (r *CreateNetworkInterfaceRequest) SetSubnetId(subnetId string) {
    r.SubnetId = subnetId
}
/* param az: 可用区，用户的默认可用区，该参数无效，不建议使用(Optional) */
func (r *CreateNetworkInterfaceRequest) SetAz(az string) {
    r.Az = &az
}
/* param networkInterfaceName: 网卡名称，只允许输入中文、数字、大小写字母、英文下划线“_”及中划线“-”，不允许为空且不超过32字符。(Optional) */
func (r *CreateNetworkInterfaceRequest) SetNetworkInterfaceName(networkInterfaceName string) {
    r.NetworkInterfaceName = &networkInterfaceName
}
/* param primaryIpAddress: 网卡主IP，如果不指定，会自动从子网中分配(Optional) */
func (r *CreateNetworkInterfaceRequest) SetPrimaryIpAddress(primaryIpAddress string) {
    r.PrimaryIpAddress = &primaryIpAddress
}
/* param secondaryIpAddresses: SecondaryIp列表(Optional) */
func (r *CreateNetworkInterfaceRequest) SetSecondaryIpAddresses(secondaryIpAddresses []string) {
    r.SecondaryIpAddresses = secondaryIpAddresses
}
/* param secondaryIpCount: 自动分配的SecondaryIp数量(Optional) */
func (r *CreateNetworkInterfaceRequest) SetSecondaryIpCount(secondaryIpCount int) {
    r.SecondaryIpCount = &secondaryIpCount
}
/* param securityGroups: 要绑定的安全组ID列表，最多指定5个安全组(Optional) */
func (r *CreateNetworkInterfaceRequest) SetSecurityGroups(securityGroups []string) {
    r.SecurityGroups = securityGroups
}
/* param sanityCheck: 源和目标IP地址校验，取值为0或者1,默认为1(Optional) */
func (r *CreateNetworkInterfaceRequest) SetSanityCheck(sanityCheck int) {
    r.SanityCheck = &sanityCheck
}
/* param description: 描述, 允许输入UTF-8编码下的全部字符，不超过256字符(Optional) */
func (r *CreateNetworkInterfaceRequest) SetDescription(description string) {
    r.Description = &description
}

// GetRegionId returns path parameter 'regionId' if exist,
// otherwise return empty string
func (r CreateNetworkInterfaceRequest) GetRegionId() string {
    return r.RegionId
}

type CreateNetworkInterfaceResponse struct {
    RequestID string `json:"requestId"`
    Error core.ErrorResponse `json:"error"`
    Result CreateNetworkInterfaceResult `json:"result"`
}

type CreateNetworkInterfaceResult struct {
    NetworkInterfaceId string `json:"networkInterfaceId"`
}

repository: jdcloud-api/jdcloud-sdk-go

repo_name: jdcloud-api/jdcloud-sdk-go


text:
@article{Marsh-2021-Performance,
    title = "Performance improvements to modern hydrological models via lookup table optimizations",
    author = "Marsh, Christopher B.  and
      Green, Kevin R.  and
      Wang, B.  and
      Spiteri, Raymond J.",
    journal = "Environmental Modelling {\&} Software, Volume 139",
    volume = "139",
    year = "2021",
    publisher = "Elsevier BV",
    url = "https://aclanthology.org/G21-19001",
    doi = "10.1016/j.envsoft.2021.105018",
    pages = "105018",
}

repository: gwf-uwaterloo/gwf-publications

license_type: permissive

repo_name: gwf-uwaterloo/gwf-publications

branch_name: refs/heads/main

gha_language: Python

extension: bib


text:
package main

import (
	. "github.com/conclave/pcduino/core"
)

func init() {
	Init()
	setup()
}

func main() {
	for {
		loop()
	}
}

var dataPin byte = 0
var clkPin byte = 1
var clkFlag int = 0

const mode = 0
const ON = 0xff
const OFF = 0x00

func setup() {
	println("LED bar test code!")
	println("Using I/O_0=DATA, I/O_1=CLK.")
	PinMode(dataPin, OUTPUT)
	PinMode(clkPin, OUTPUT)
	DigitalWrite(dataPin, LOW)
	DigitalWrite(clkPin, LOW)
	clkFlag = 0
}

func loop() {
	send16bitData(mode)
	sendLED(0x0155)
	latchData()
	Delay(2000)
	send16bitData(mode)
	sendLED(0x02AA)
	latchData()
	Delay(2000)
}

func send16bitData(data uint) {
	for i := 0; i < 16; i++ {
		if data&0x8000 != 0 {
			DigitalWrite(dataPin, HIGH)
		} else {
			DigitalWrite(dataPin, LOW)
		}
		if clkFlag == 1 {
			DigitalWrite(clkPin, LOW)
			clkFlag = 0
		} else {
			DigitalWrite(clkPin, HIGH)
			clkFlag = 1
		}
		data <<= 1
	}
}

func latchData() {
	latchFlag := 0
	DigitalWrite(dataPin, LOW)
	DelayMicroseconds(200)
	for i := 0; i < 8; i++ {
		if latchFlag == 1 {
			DigitalWrite(dataPin, LOW)
			latchFlag = 0
		} else {
			DigitalWrite(dataPin, HIGH)
			latchFlag = 1
		}
	}
	DelayMicroseconds(200)
}

func sendLED(state uint) {
	for i := 0; i < 12; i++ {
		if state&0x01 != 0 {
			send16bitData(ON)
		} else {
			send16bitData(OFF)
		}
		state >>= 1
	}
}

repository: conclave/pcduino

repo_name: conclave/pcduino

branch_name: refs/heads/master

extension: go


text:
@article{SHI2020,
title = "Long-term effects of PM2·5 on neurological disorders in the American Medicare population: a longitudinal cohort study",
journal = "The Lancet Planetary Health",
year = "2020",
issn = "2542-5196",
doi = "https://doi.org/10.1016/S2542-5196(20)30227-8",
url = "http://www.sciencedirect.com/science/article/pii/S2542519620302278",
author = "Liuhua Shi and Xiao Wu and Mahdieh {Danesh Yazdi} and Danielle Braun and Yara {Abu Awad} and Yaguang Wei and Pengfei Liu and Qian Di and Yun Wang and Joel Schwartz and Francesca Dominici and Marianthi-Anna Kioumourtzoglou and Antonella Zanobetti",
}

license: MIT


text:
@book
{
    MHJ,
    AUTHOR = {},
     TITLE = {},
 PUBLISHER = {},
      YEAR = {},
      URL = {}
}

@book
{
    oppgave,
    AUTHOR = {Morten Hjort Jensen},
    TITLE = {Project 1},
    PUBLISHER = {Department of Physics, University of Oslo},
    YEAR = {2018},
    URL = {https://github.com/ManyBodyPhysics/FYS4480/blob/master/doc/Projects/2018/Project1/pdf/Project1.pdf}
}

@book
{
    shavittnbartless,
    AUTHOR = {Isaiah Shavitt, Rodney J Bartlett},
    TITLE = {Many-Body Methods in Chemistry and Physics},
    PUBLISHER = {Cambridge University Press},
    YEAR = {2009}
}

@book
{
    advanced,
    AUTHOR = {Morten Hjorth Jensen, Maria Paola Lombardo, Ubirajara van Kolck},
    TITLE = {Advanced Computational Nuclear Physics},
    PUBLISHER = {Springer},
    YEAR = {2009}
}
@book
{
    statelem,
    AUTHOR = {Trevor Hastie, Robert Tibshirani, Jerome Friedman},
     TITLE = {The Elements of Statistical Learning},
 PUBLISHER = {Springer},
      YEAR = {2017},
}

gha_license_id: MIT


text:
SUMMARY = "run tests in isolated forked subprocesses"
HOMEPAGE = "https://github.com/pytest-dev/pytest-forked"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=772fcdaca14b378878d05c7d857e6c3e"

SRC_URI[sha256sum] = "4dafd46a9a600f65d822b8f605133ecf5b3e1941ebb3588e943b4e3eb71a5a3f"

inherit pypi python_setuptools_build_meta

PEP517_BUILD_OPTS = "--skip-dependency-check"

DEPENDS += "python3-setuptools-scm-native"

RDEPENDS:${PN} += " \
    python3-py \
    python3-pytest \
"

repository: openembedded/meta-openembedded

repo_name: openembedded/meta-openembedded

gha_language: BitBake

extension: bb


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

%% Created for Nick Beaton at 2016-09-24 13:54:23 -0600

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

@article{greenwade93,
	Author = {George D. Greenwade},
	Date-Modified = {2016-08-11 21:04:25 +0000},
	Journal = {TUGBoat},
	Number = {3},
	Pages = {342--351},
	Title = {The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})},
	Url = {https://www.google.com},
	Volume = {14},
	Year = {1993},
	Bdsk-Url-1 = {https://www.google.com}}

@article{MR4,
AUTHOR = {Corliss, J. J.},
     TITLE = {Upper limits to the real roots of a real algebraic equation},
   JOURNAL = {Amer. Math. Monthly},
  FJOURNAL = {The American Mathematical Monthly},
    VOLUME = {46},
      YEAR = {1939},
     PAGES = {334--338},
      ISSN = {0002-9890},
   MRCLASS = {09.0X},
  MRNUMBER = {0000004},
MRREVIEWER = {O. Sz\'asz},
       DOI = {10.2307/2302887}}

repository: siddhartha-gadgil/DeptWeb

repo_name: siddhartha-gadgil/DeptWeb

gha_language: HTML


text:
package crypto

import (
	"encoding/hex"
	"encoding/json"
	"strings"
	"testing"

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

func TestPrivateKeyMarshaling(t *testing.T) {
	_, _, priv1 := GenerateTestKeyPair()
	priv2 := new(PrivateKey)
	priv3 := new(PrivateKey)
	priv4 := new(PrivateKey)

	js, err := json.Marshal(priv1)
	assert.NoError(t, err)
	require.Error(t, priv2.UnmarshalJSON([]byte("bad")))
	require.NoError(t, json.Unmarshal(js, priv2))

	bs, err := priv2.MarshalCBOR()
	assert.NoError(t, err)
	assert.NoError(t, priv3.UnmarshalCBOR(bs))

	txt, err := priv2.MarshalText()
	assert.NoError(t, err)
	assert.NoError(t, priv4.UnmarshalText(txt))

	require.True(t, priv1.EqualsTo(*priv4))
	require.NoError(t, priv1.SanityCheck())
}

func TestPrivateKeyFromBytes(t *testing.T) {
	_, err := PrivateKeyFromRawBytes(nil)
	assert.Error(t, err)
	_, _, priv1 := GenerateTestKeyPair()
	priv2, err := PrivateKeyFromRawBytes(priv1.RawBytes())
	assert.NoError(t, err)
	require.True(t, priv1.EqualsTo(priv2))

	inv, _ := hex.DecodeString(strings.Repeat("ff", PrivateKeySize))
	_, err = PrivateKeyFromRawBytes(inv)
	assert.Error(t, err)
}

func TestPrivateKeyFromString(t *testing.T) {
	_, _, priv1 := GenerateTestKeyPair()
	priv2, err := PrivateKeyFromString(priv1.String())
	assert.NoError(t, err)
	require.True(t, priv1.EqualsTo(priv2))

	_, err = PrivateKeyFromString("inv")
	assert.Error(t, err)
}

func TestMarshalingEmptyPrivateKey(t *testing.T) {
	pv1 := PrivateKey{}

	js, err := json.Marshal(pv1)
	assert.NoError(t, err)
	assert.Equal(t, js, []byte{0x22, 0x22}) // ""
	var pv2 PrivateKey
	err = json.Unmarshal(js, &pv2)
	assert.Error(t, err)

	bs, err := pv1.MarshalCBOR()
	assert.Error(t, err)
	var pv3 PrivateKey
	err = pv3.UnmarshalCBOR(bs)
	assert.Error(t, err)
}

func TestPrivateKeyFromSeed(t *testing.T) {
	priv, err := PrivateKeyFromSeed([]byte{0})
	assert.NoError(t, err)
	assert.NoError(t, priv.SanityCheck())
}

repository: FarhadGhE/zarb-go

repo_name: FarhadGhE/zarb-go


text:
package main

import (
	"go_starter_kit/config"
	"go_starter_kit/routes"
	"os"

	"github.com/gofiber/fiber/v2"
	"github.com/joho/godotenv"
)

func init() {
	// load .env file
	err := godotenv.Load()
	if err != nil {
		panic(err)
	}

	// database connect
	config.ConnectDB()
}

func main() {
	app := fiber.New()

	routes.SetupRoutes(app)

	err := app.Listen(":" + os.Getenv("PORT"))

	if err != nil {
		panic(err)
	}
}


text:
require ${BPN}.inc

PR = "${INC_PR}.0"

SRCNAME = "enlightenment"

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

SRC_URI = "\
    ${E_MIRROR}/${SRCNAME}-${SRCVER}.tar.gz \
    file://enlightenment_start.oe \
    file://applications.menu \
"

SRC_URI[md5sum] = "dd6ffbe1ee6a804dbd2a7b2645bf3b4d"
SRC_URI[sha256sum] = "66d250a865ffb97b12cabe8081ae041ce6924f55ffffaca6c65d468bb9f902f9"

repository: linkessence/Galileo

repo_name: linkessence/Galileo


text:
package cache

import (
	"context"
	"errors"
)

var ErrCacheMiss = errors.New("lets proxy: cache miss")

type Bytes interface {
	// Get returns a certificate data for the specified key.
	// If there's no such key, Get returns ErrCacheMiss.
	Get(ctx context.Context, key string) ([]byte, error)

	// Put stores the data in the cache under the specified key.
	// Underlying implementations may use any data storage format,
	// as long as the reverse operation, Get, results in the original data.
	Put(ctx context.Context, key string, data []byte) error

	// Delete removes a certificate data from the cache under the specified key.
	// If there's no such key in the cache, Delete returns nil.
	Delete(ctx context.Context, key string) error
}

type Value interface {
	// Get returns a certificate data for the specified key.
	// If there's no such key, Get returns ErrCacheMiss.
	Get(ctx context.Context, key string) (interface{}, error)

	// Put stores the data in the cache under the specified key.
	// Underlying implementations may use any data storage format,
	// as long as the reverse operation, Get, results in the original data.
	Put(ctx context.Context, key string, value interface{}) error

	// Delete removes a certificate data from the cache under the specified key.
	// If there's no such key in the cache, Delete returns nil.
	Delete(ctx context.Context, key string) error
}

gha_language: Go


text:
package webrtc

import (
	"encoding/json"
	"net/http"
	"sync"
	"time"

	"github.com/gorilla/websocket"
	"github.com/pkg/errors"

	"n.eko.moe/neko/internal/nanoid"
)

const (
	// Send pings to peer with this period. Must be less than pongWait.
	pingPeriod = 60 * time.Second
)

func (manager *WebRTCManager) Upgrade(w http.ResponseWriter, r *http.Request) error {
	manager.logger.
		Info().
		Msg("Attempting to upgrade ws")

	socket, err := manager.upgrader.Upgrade(w, r, nil)
	if err != nil {
		manager.logger.Error().Err(err).Msg("Failed to upgrade websocket!")
		return err
	}

	sessionID, ok := manager.authenticate(r)
	if ok != true {
		manager.logger.Warn().Msg("Authenticatetion failed")
		if err = socket.Close(); err != nil {
			return err
		}
		return nil
	}

	session := &session{
		id:     sessionID,
		socket: socket,
		mu:     sync.Mutex{},
	}

	manager.logger.
		Info().
		Str("ID", sessionID).
		Str("RemoteAddr", socket.RemoteAddr().String()).
		Msg("Created Session")

	manager.sessions[sessionID] = session

	defer func() {
		manager.destroy(session)
	}()

	if err = manager.onConnected(session); err != nil {
		manager.logger.Error().Err(err).Msg("onConnected failed!")
		return nil
	}

	manager.handleWS(session)

	return nil
}

func (manager *WebRTCManager) authenticate(r *http.Request) (sessionID string, ok bool) {

	passwords, ok := r.URL.Query()["password"]
	if !ok || len(passwords[0]) < 1 {
		return "", false
	}

	if passwords[0] != manager.password {
		manager.logger.Warn().Str("Password", passwords[0]).Msg("Wrong password: ")
		return "", false
	}

	id, err := nanoid.NewIDSize(32)
	if err != nil {
		return "", false
	}
	return id, true
}

func (manager *WebRTCManager) onConnected(session *session) error {
	if err := session.send(messageIdentityProvide{
		message: message{Event: "identity/provide"},
		ID:      session.id,
	}); err != nil {
		return err
	}
	return nil
}

func (manager *WebRTCManager) onMessage(session *session, raw []byte) error {
	message := message{}
	if err := json.Unmarshal(raw, &message); err != nil {
		return err
	}

	switch message.Event {
	case "sdp/provide":
		return errors.Wrap(manager.createPeer(session, raw), "sdp/provide failed")
	case "control/release":
		return errors.Wrap(manager.controlRelease(session), "control/release failed")
	case "control/request":
		return errors.Wrap(manager.controlRequest(session), "control/request failed")
	default:
		manager.logger.Warn().Msgf("Unknown client method %s", message.Event)
	}

	return nil
}

func (manager *WebRTCManager) handleWS(session *session) {
	bytes := make(chan []byte)
	cancel := make(chan struct{})
	ticker := time.NewTicker(pingPeriod)

	go func() {
		defer func() {
			ticker.Stop()
			manager.logger.Info().Str("RemoteAddr", session.socket.RemoteAddr().String()).Msg("Handle WS ending")
			manager.destroy(session)
		}()

		for {
			_, raw, err := session.socket.ReadMessage()
			if err != nil {
				if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway, websocket.CloseAbnormalClosure) {
					manager.logger.Warn().Err(err).Msg("ReadMessage error")
				}
				break
			}
			bytes <- raw
		}
	}()

	for {
		select {
		case raw := <-bytes:
			manager.logger.Info().
				Str("ID", session.id).
				Str("Message", string(raw)).
				Msg("Reading from Websocket")
			if err := manager.onMessage(session, raw); err != nil {
				manager.logger.Error().Err(err).Msg("onClientMessage has failed")
				return
			}
		case <-cancel:
			return
		case _ = <-ticker.C:
			if err := session.socket.WriteMessage(websocket.PingMessage, nil); err != nil {
				return
			}
		}
	}
}

func (manager *WebRTCManager) destroy(session *session) {
	if manager.controller == session.id {
		manager.controller = ""
		manager.clearKeys()
		for id, sess := range manager.sessions {
			if id != session.id {
				if err := sess.send(message{Event: "control/released"}); err != nil {
					manager.logger.Error().Err(err).Msg("session.send has failed")
				}
			}
		}
	}

	if err := session.destroy(); err != nil {
		manager.logger.Error().Err(err).Msg("session.destroy has failed")
	}

	delete(manager.sessions, session.id)
}

func (manager *WebRTCManager) controlRelease(session *session) error {
	if manager.controller == session.id {
		manager.controller = ""
		manager.clearKeys()

		if err := session.send(message{Event: "control/release"}); err != nil {
			return err
		}

		for id, sess := range manager.sessions {
			if id != session.id {
				if err := sess.send(message{Event: "control/released"}); err != nil {
					return err
				}
			}
		}
	}
	return nil
}

func (manager *WebRTCManager) controlRequest(session *session) error {
	if manager.controller == "" {
		manager.controller = session.id

		if err := session.send(message{Event: "control/give"}); err != nil {
			return err
		}

		for id, sess := range manager.sessions {
			if id != session.id {
				if err := sess.send(message{Event: "control/given"}); err != nil {
					return err
				}
			}
		}
	} else {
		if err := session.send(message{Event: "control/locked"}); err != nil {
			return err
		}

		controller, ok := manager.sessions[manager.controller]
		if ok {
			controller.send(message{Event: "control/requesting"})
		}
	}
	return nil
}


text:
package server

import (
	"net/http"

	"github.com/prometheus/client_golang/prometheus"
	"github.com/prometheus/client_golang/prometheus/promauto"
	"github.com/prometheus/client_golang/prometheus/promhttp"
)

var (
	metricQueries = promauto.NewGauge(prometheus.GaugeOpts{
		Name: "doqd_queries",
		Help: "Total queries",
	})
	metricValidQueries = promauto.NewGauge(prometheus.GaugeOpts{
		Name: "doqd_valid_queries",
		Help: "Total valid queries",
	})
	metricUpstreamErrors = promauto.NewGauge(prometheus.GaugeOpts{
		Name: "doqd_upstream_errors",
		Help: "Total upstream errors",
	})
)

// MetricsListen starts the metrics HTTP server
func MetricsListen(listenAddr string) error {
	http.Handle("/metrics", promhttp.Handler())
	return http.ListenAndServe(listenAddr, nil)
}

repository: natesales/doqd

repo_name: natesales/doqd


text:
@inproceedings{Ohsaki2017,
 abstract = {© 2017 SPIE. Hyperspectral imaging is used in various fields because it can obtain much more information than imaging by conventional RGB cameras. Hyperspectral imaging systems using active illumination, prisms, gratings, or narrowband filters have been proposed. Active illumination systems can obtain two-dimensional (2D) spectral images rapidly, and the device can be low-cost and small because of the use of LEDs. However, flicker can occur when different colors of LEDs are switched. The other methods do not have the flicker problem because they use passive imaging. However, these systems take a long time to acquire the 2D spectral images, or they tend to be high-cost or large. In our research, we propose a flickerless active LED illumination system for hyperspectral imaging. This system acquires images while switching the illumination. The switching illumination consists of many narrowband LEDs that have different spectrums. The spectral images of each LED are reconstructed from the acquired images. The switching illumination is designed to reduce the flicker based on human visual characteristics. We reduce the color changes of the switching illumination while maintaining its spectral differences. In the experiment, we obtain the optimal design of a flickerless illumination system for measuring oxygen saturation. To show the feasibility of our system, we clearly show the difference in saturation using the spectral images obtained by a prototype designed using the proposed method.},
 author = {Ohsaki, Makoto and Nagahara, Hajime and Ikeda, Tetsuo and Taniguchi, Rin-ichiro},
 booktitle = {Thirteenth International Conference on Quality Control by Artificial Vision 2017},
 doi = {10.1117/12.2266765},
 isbn = {9781510611214},
 issn = {1996756X},
 month = {mar},
 pages = {103380Z},
 publisher = {SPIE},
 title = {Hyperspectral imaging using flickerless active LED illumination},
 volume = {10338},
 year = {2017}
}

repository: conscienceli/islab-website

repo_name: conscienceli/islab-website


text:
package bolt

import (
	"testing"

	"github.com/golang/protobuf/proto"
	"github.com/octavore/naga/service"

	"github.com/ketchuphq/ketchup/proto/ketchup/models"
)

func TestUser(t *testing.T) {
	app := &Module{}
	stop := service.New(app).StartForTest()
	defer stop()
	a := &models.User{
		Email:          proto.String("a@example.com"),
		HashedPassword: proto.String("abcdef"),
	}
	b := &models.User{
		Email:          proto.String("b@example.com"),
		HashedPassword: proto.String("defghi"),
	}
	err := app.UpdateUser(a)
	if err != nil {
		t.Fatal(err)
	}
	err = app.UpdateUser(b)
	if err != nil {
		t.Fatal(err)
	}

	tests := []struct {
		email          string
		hashedPassword string
		valid          bool
	}{
		{"a@example.com", "abcdef", true},
		{"b@example.com", "defghi", true},
		{"c@example.com", "defghi", false},
	}
	for _, tt := range tests {
		user, err := app.GetUserByEmail(tt.email)
		if err != nil {
			t.Fatal(err)
		}
		if !tt.valid && user != nil {
			t.Error("unexpected user:", user)
		}
		if tt.valid && user.GetEmail() != tt.email {
			t.Errorf("unexpected email %s; wanted %s", user.GetEmail(), tt.email)
		}
		if tt.valid && user.GetHashedPassword() != tt.hashedPassword {
			t.Errorf("unexpected pwd %s; wanted %s", user.GetHashedPassword(), tt.hashedPassword)
		}
	}
}


text:
% 20472542
@Article{Junier_2010,
   Author="Junier, T.  and Zdobnov, E. M. ",
   Title="{{T}he {N}ewick {U}tilities: {H}igh-throughput {P}hylogenetic tree {P}rocessing in the {U}{N}{I}{X} {S}hell}",
   Journal="Bioinformatics",
   Year="2010",
   Month="May"
}


text:
// Copyright 2019-2020 Axetroy. All rights reserved. MIT license.
package message_test

import (
	"encoding/json"
	messageAdmin "github.com/axetroy/go-server/internal/app/admin_server/controller/message"
	"github.com/axetroy/go-server/internal/app/user_server/controller/message"
	"github.com/axetroy/go-server/internal/library/helper"
	"github.com/axetroy/go-server/internal/schema"
	"github.com/axetroy/go-server/internal/service/token"
	"github.com/axetroy/go-server/tester"
	"github.com/axetroy/mocker"
	"github.com/stretchr/testify/assert"
	"net/http"
	"testing"
)

func TestGetStatusRouter(t *testing.T) {
	var (
		testMessage schema.Message
	)

	adminInfo, _ := tester.LoginAdmin()
	userInfo, _ := tester.CreateUser()

	defer tester.DeleteUserByUserName(userInfo.Username)

	context := helper.Context{
		Uid: adminInfo.Id,
	}

	header := mocker.Header{
		"Authorization": token.Prefix + " " + userInfo.Token,
	}

	// 创建一篇个人消息
	{
		var (
			title   = "TestUpdate"
			content = "TestUpdate"
		)

		r := messageAdmin.Create(context, messageAdmin.CreateMessageParams{
			Uid:     userInfo.Id,
			Title:   title,
			Content: content,
		})

		assert.Equal(t, schema.StatusSuccess, r.Status)
		assert.Equal(t, "", r.Message)

		testMessage = schema.Message{}

		assert.Nil(t, r.Decode(&testMessage))

		defer message.DeleteMessageById(testMessage.Id)

		assert.Equal(t, title, testMessage.Title)
		assert.Equal(t, content, testMessage.Content)
	}

	// 获取未读消息
	{
		r := tester.HttpUser.Get("/v1/message/status", nil, &header)
		res := schema.Response{}

		assert.Equal(t, http.StatusOK, r.Code)
		assert.Nil(t, json.Unmarshal(r.Body.Bytes(), &res))

		n := schema.MessageStatus{}

		assert.Nil(t, res.Decode(&n))
		assert.Equal(t, n.Unread, int64(1))
	}

	// 用户标记为已读
	{
		r := tester.HttpUser.Put("/v1/message/"+testMessage.Id+"/read", nil, &header)
		res := schema.Response{}

		assert.Equal(t, http.StatusOK, r.Code)
		assert.Nil(t, json.Unmarshal(r.Body.Bytes(), &res))

		n := schema.Message{}

		assert.Nil(t, res.Decode(&n))
		assert.Equal(t, true, n.Read)
		assert.NotNil(t, n.ReadAt)
	}

	// 获取未读消息
	{
		r := tester.HttpUser.Get("/v1/message/status", nil, &header)
		res := schema.Response{}

		assert.Equal(t, http.StatusOK, r.Code)
		assert.Nil(t, json.Unmarshal(r.Body.Bytes(), &res))

		n := schema.MessageStatus{}

		assert.Nil(t, res.Decode(&n))
		assert.Equal(t, n.Unread, int64(0))
	}
}

repository: guangminglion/go-server

repo_name: guangminglion/go-server


text:
SUMMARY = "Extension for colcon to read package metadata from files."
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://setup.cfg;beginline=22;endline=22;md5=3d0bd1ac53c1dd582844ed15eee7f8e2"

SRC_URI[sha256sum] = "137c740ce10e29219c4d89c4f0dac8549e46bfb6e3bc2296fe2d051bdb971ec8"

inherit pypi setuptools3

RDEPENDS:${PN} += "\
    ${PYTHON_PN}-colcon-core \
    ${PYTHON_PN}-pyyaml \
"

BBCLASSEXTEND += "nativesdk"

repository: DasRoteSkelett/meta-ros

repo_name: DasRoteSkelett/meta-ros


text:
@article{mac2010,
  title={More than words: the introduction of internationalised domain names and the reform of generic top-level domains at ICANN},
  author={Mac S{\'\i}thigh, Daith{\'\i}},
  journal={International Journal of Law and Information Technology},
  volume={18},
  number={3},
  pages={274--300},
  year={2010},
  publisher={Oxford Univ Press}
}

@article{icann2013,
  title={Final Implementation Plan for IDN ccTLD Fast Track Process},
  author={ICANN},
  year={2013}
}

@article{gabrilovich2002,
  author                   = {Gabrilovich, Evgeniy. Gontmakher, Alex},
  title                    = {The Homograph Attack},
  journal                  = {Communications of the ACM},
  volume                   = {45},
  number                   = {2},
  pages                    = {128},
  year                     = {2002}
}

@article{krammer2006,
  title                    = {Phishing defense against IDN address spoofing attacks},
  author                   = {Krammer, Viktor},
  journal                  = {PST '06},
  number                   = {32},
  year                     = {2006}
}

@proceedings{maurer2012,
  title                    = {Sophisticated Phishers Make More Spelling Mistakes: Using URL Similarity against Phishing},
  booktitle                = {Cyberspace Safety and Security},
  series                   = {Lecture Notes in Computer Science},
  volume                   = {7672},
  publisher                = {Springer},
  year                     = {2012},
  author                   = {Maurer ME., Höfer L.},
  address                  = {Heidelberg, Berlin}
}

@inproceedings{hannay2009,
  title={Assessment of Internationalised Domain Name Homograph Attack Mitigation},
  author={Hannay, Peter and Bolan, Christopher},
  booktitle={Australian Information Security Management Conference},
  pages={13},
  year={2009}
}

@inproceedings{al2010,
  title={Multilingual web sites: Internationalized Domain Name homograph attacks},
  author={Al Helou, Johnny and Tilley, Scott},
  booktitle={Web Systems Evolution (WSE), 2010 12th IEEE International Symposium on},
  pages={89--92},
  year={2010},
  organization={IEEE}
}

repository: jsidrach/idn-homograph-attack

repo_name: jsidrach/idn-homograph-attack


text:
// Copyright (c) 2004-present Facebook All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package main

import (
	"context"
	stdlog "log"
	"net"
	"net/url"
	"os"
	"syscall"

	"github.com/facebookincubator/symphony/pkg/ctxgroup"
	"github.com/facebookincubator/symphony/pkg/ctxutil"
	"github.com/facebookincubator/symphony/pkg/log"
	"github.com/facebookincubator/symphony/pkg/server"
	"github.com/facebookincubator/symphony/pkg/telemetry"
	"go.uber.org/zap"
	"gopkg.in/alecthomas/kingpin.v2"

	_ "gocloud.dev/blob/s3blob"
)

type cliFlags struct {
	ListenAddress   *net.TCPAddr
	BlobURL         *url.URL
	LogConfig       log.Config
	TelemetryConfig telemetry.Config
}

func main() {
	var cf cliFlags
	kingpin.HelpFlag.Short('h')
	kingpin.Flag(
		"web.listen-address",
		"Address to listen on.",
	).
		Default(":http").
		TCPVar(&cf.ListenAddress)
	kingpin.Flag(
		"bucket-url",
		"Blob bucket url",
	).
		Envar("BUCKET_URL").
		Required().
		URLVar(&cf.BlobURL)
	log.AddFlagsVar(kingpin.CommandLine, &cf.LogConfig)
	telemetry.AddFlagsVar(kingpin.CommandLine, &cf.TelemetryConfig)
	kingpin.Parse()

	ctx := ctxutil.WithSignal(
		context.Background(),
		os.Interrupt,
		syscall.SIGTERM,
	)
	app, cleanup, err := newApplication(ctx, &cf)
	if err != nil {
		stdlog.Fatal(err)
	}
	defer cleanup()

	app.Info("starting application",
		zap.Stringer("address", cf.ListenAddress),
	)
	err = app.run(ctx)
	app.Info("terminating application", zap.Error(err))
}

type application struct {
	*zap.Logger
	server *server.Server
	addr   *net.TCPAddr
}

func (app *application) run(ctx context.Context) error {
	ctx, cancel := context.WithCancel(ctx)
	g := ctxgroup.WithContext(ctx)
	g.Go(func(context.Context) error {
		err := app.server.ListenAndServe(app.addr.String())
		app.Debug("server terminated", zap.Error(err))
		return err
	})
	g.Go(func(ctx context.Context) error {
		defer cancel()
		<-ctx.Done()
		return nil
	})
	<-ctx.Done()

	app.Warn("start application termination",
		zap.NamedError("reason", ctx.Err()),
	)
	defer app.Debug("end application termination")

	g.Go(func(context.Context) error {
		app.Debug("start server termination")
		err := app.server.Shutdown(context.Background())
		app.Debug("end server termination", zap.Error(err))
		return err
	})
	return g.Wait()
}

repository: kyaaqba/magma

repo_name: kyaaqba/magma

gha_license_id: NOASSERTION


text:
package oas

import (
	"encoding/json"

	"github.com/pkg/errors"
	"gopkg.in/yaml.v2"
)

// Contact represents information for the exposed API.
type Contact struct {
	// Name describes the identifying name of the contact person/organization.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`

	// URL describes the URL pointing to the contact information. MUST be in the
	// format of a URL.
	URL string `json:"url,omitempty" yaml:"url,omitempty"`

	// Email describes the email address of the contact person/organization.
	// MUST be in the format of an email address.
	Email string `json:"email,omitempty" yaml:"email,omitempty"`

	// Extensions describes additional data can be added to extend the
	// specification at certain points.
	Extensions Extensions `json:"-" yaml:"-"`
}

// Clone returns a new deep copied instance of the object.
func (r Contact) Clone() (*Contact, error) {
	rbytes, err := yaml.Marshal(r)
	if err != nil {
		return nil, errors.WithStack(err)
	}
	value := Contact{}
	if err := yaml.Unmarshal(rbytes, &value); err != nil {
		return nil, errors.WithStack(err)
	}
	return &value, nil
}

// MarshalJSON returns the JSON encoding.
func (r Contact) MarshalJSON() ([]byte, error) {
	obj, err := r.MarshalYAML()
	if err != nil {
		return nil, err
	}
	return json.Marshal(obj)
}

// UnmarshalJSON parses the JSON-encoded data and stores the result.
func (r *Contact) UnmarshalJSON(data []byte) error {
	return r.UnmarshalYAML(func(in interface{}) error {
		obj := make(map[string]interface{})
		if err := json.Unmarshal(data, &obj); err != nil {
			return errors.WithStack(err)
		}

		rbytes, err := yaml.Marshal(obj)
		if err != nil {
			return errors.WithStack(err)
		}

		if err := yaml.Unmarshal(rbytes, in); err != nil {
			return errors.WithStack(err)
		}
		return nil
	})
}

// MarshalYAML returns the YAML encoding.
func (r Contact) MarshalYAML() (interface{}, error) {
	obj := make(map[string]interface{})

	if r.Name != "" {
		obj["name"] = r.Name
	}

	if r.URL != "" {
		obj["url"] = r.URL
	}

	if r.Email != "" {
		obj["email"] = r.Email
	}

	for key, val := range r.Extensions {
		obj[key] = val
	}

	return obj, nil
}

// UnmarshalYAML parses the YAML-encoded data and stores the result.
func (r *Contact) UnmarshalYAML(unmarshal func(interface{}) error) error {
	obj := make(map[string]interface{})
	if err := unmarshal(&obj); err != nil {
		return errors.WithStack(err)
	}

	if value, ok := obj["name"]; ok {
		if value, ok := value.(string); ok {
			r.Name = value
		}
	}

	if value, ok := obj["url"]; ok {
		if value, ok := value.(string); ok {
			r.URL = value
		}
	}

	if value, ok := obj["email"]; ok {
		if value, ok := value.(string); ok {
			r.Email = value
		}
	}

	exts := Extensions{}
	if err := unmarshal(&exts); err != nil {
		return errors.WithStack(err)
	}

	if len(exts) > 0 {
		r.Extensions = exts
	}

	return nil
}

repository: trivigy/oas

repo_name: trivigy/oas


text:
inherit esw_examples features_check

REQUIRED_MACHINE_FEATURES = "gpiops"

ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/gpiops/examples/"

repository: Xilinx/meta-xilinx

repo_name: Xilinx/meta-xilinx

gha_language: C


text:
@article{greene2018cannabidiol,
 author = {Greene, Nicholas Z and Wiley, Jenny L and Yu, Zhihao and Clowers, Brian H and Craft, Rebecca M},
 doi = {10.1007/s00213-018-5036-z},
 journal = {Psychopharmacology},
 number = {11},
 pages = {3289--3302},
 publisher = {Springer Berlin Heidelberg},
 title = {Cannabidiol modulation of antinociceptive tolerance to $Δ$ 9-tetrahydrocannabinol},
 volume = {235},
 year = {2018}
}

repository: bhclowers/academic-clowers

repo_name: bhclowers/academic-clowers


text:
package tomtom

type tomTomResp struct {
	FlowSegmentData FlowSegmentData `json:"flowSegmentData"`
}

type FlowSegmentData struct {
	CurrentSpeed       float64     `json:"currentSpeed"`
	FreeFlowSpeed      float64     `json:"freeFlowSpeed"`
	CurrentTravelTime  float64     `json:"currentTravelTime"`
	FreeFlowTravelTime float64     `json:"freeFlowTravelTime"`
	Confidence         float64     `json:"confidence"`
	Coordinates        Coordinates `json:"coordinates"`
}

type Coordinates struct {
	Points []Coordinate `json:"coordinate"`
}

type Coordinate struct {
	Longitude float64 `json:"longitude"`
	Latitude  float64 `json:"latitude"`
}

/*
<flowSegmentData xmlns="http://lbs.tomtom.com/services" version="1.0.21-mascoma">
    <frc>FRC2</frc>
    <currentSpeed>41</currentSpeed>
    <freeFlowSpeed>70</freeFlowSpeed>
    <currentTravelTime>153</currentTravelTime>
    <freeFlowTravelTime>90</freeFlowTravelTime>
    <confidence>0.59</confidence>
    <coordinates>
        <coordinate>
            <latitude>52.40476</latitude>
            <longitude>4.844318</longitude>
        </coordinate>
        <coordinate>
            <latitude>52.411312</latitude>
            <longitude>4.8299975</longitude>
        </coordinate>
        <coordinate>
            <latitude>52.415073</latitude>
            <longitude>4.827327</longitude>
        </coordinate>
    </coordinates>
</flowSegmentData>
*/

repository: bobheadxi/road-rage

repo_name: bobheadxi/road-rage


text:
package ini2go

import (
	"testing"
)

/*
* @Author:hanyajun
* @Date:2019/7/27 23:13
* @Name:app
* @Function:
 */

func TestIni2Go(t *testing.T) {
	_ = Ini2Go("example/app.ini", "example", "app.go", "ini2go/", false, []string{})
}


text:
require gpe-mini-browser.inc

PR = "r1"

SRC_URI = "ftp://ftp.handhelds.org/projects/gpe/source/gpe-mini-browser-${PV}.tar.gz"
DEPENDS = "osb-nrcit sqlite libgpewidget"

S = "${WORKDIR}/gpe-mini-browser-${PV}"

inherit autotools

do_install() {
	#	install -d ${D}${docdir}/gpe
	#	install -m 0644 ${S}/gpe-mini-browser.html  ${D}${docdir}/gpe/
		install -d ${D}/usr/share/applications
		install -m 0644 ${S}/gpe-mini-browser.desktop ${D}/usr/share/applications/gpe-mini-browser.desktop
		install -d ${D}/usr/share/pixmaps
		install -m 0644 ${S}/gpe-mini-browser.png ${D}/usr/share/pixmaps/gpe-mini-browser.png
		autotools_do_install
}

pkg_postinst_${PN}-doc () {
        #!/bin/sh
	if [ "x$D" != "x" ]; then
        if [ -e /etc/gpe/gpe-help.conf ]; then
                echo gpe-mini-browser= /usr/share/doc/gpe/gpe-mini-browser.html >> /etc/gpe/gpe-help.conf
        else
                 echo [Help] >> /etc/gpe/gpe-help.conf
                 echo gpe-mini-browser= /usr/share/doc/gpe/gpe-mini-browser.html >> /etc/gpe/gpe-help.conf
        fi
        if [ -x /usr/bin/gpe-helpindex ]; then
                echo generating help-index
                gpe-helpindex
        else
                echo not generating index for gpe-mini-browser
        fi
	fi
}

pkg_postrm_${PN}-doc () {
        #!/bin/sh
        if [ -e /etc/gpe/gpe-help.conf ]; then
                sed '/^\<gpe-mini-browser\>/d' /etc/gpe/gpe-help.conf > /tmp/gpe-help.conf
                mv /tmp/gpe-help.conf /etc/gpe/gpe-help.conf
        fi
        if [ -x /usr/bin/gpe-helpindex ]; then
                echo generating help-index
                gpe-helpindex
        else
                echo not generating index for gpe-mini-browser
        fi
}

SRC_URI[md5sum] = "858f3e7219cde7b18e69293526020416"
SRC_URI[sha256sum] = "36d2487895d3579ae3e8693ebe789b5de454506fc572937dac2fb7ef512f105f"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD


text:
# The set of languages for which implicit dependencies are needed:
set(CMAKE_DEPENDS_LANGUAGES
  "C"
  )
# The set of files for implicit dependencies of each language:
set(CMAKE_DEPENDS_CHECK_C
  "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/cb_2/lib/conv.c" "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/bin/CMakeFiles/A_Game_of_Chance_2.dir/cb_2/lib/conv.c.o"
  "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/cb_2/lib/list.c" "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/bin/CMakeFiles/A_Game_of_Chance_2.dir/cb_2/lib/list.c.o"
  "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/cb_2/lib/malloc.c" "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/bin/CMakeFiles/A_Game_of_Chance_2.dir/cb_2/lib/malloc.c.o"
  "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/cb_2/lib/memcmp.c" "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/bin/CMakeFiles/A_Game_of_Chance_2.dir/cb_2/lib/memcmp.c.o"
  "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/cb_2/lib/memcpy.c" "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/bin/CMakeFiles/A_Game_of_Chance_2.dir/cb_2/lib/memcpy.c.o"
  "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/cb_2/lib/memset.c" "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/bin/CMakeFiles/A_Game_of_Chance_2.dir/cb_2/lib/memset.c.o"
  "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/cb_2/lib/recv_bytes.c" "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/bin/CMakeFiles/A_Game_of_Chance_2.dir/cb_2/lib/recv_bytes.c.o"
  "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/cb_2/lib/send_bytes.c" "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/bin/CMakeFiles/A_Game_of_Chance_2.dir/cb_2/lib/send_bytes.c.o"
  "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/cb_2/lib/string.c" "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/bin/CMakeFiles/A_Game_of_Chance_2.dir/cb_2/lib/string.c.o"
  "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/cb_2/lib/xxprintf.c" "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/bin/CMakeFiles/A_Game_of_Chance_2.dir/cb_2/lib/xxprintf.c.o"
  "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/cb_2/src/card.c" "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/bin/CMakeFiles/A_Game_of_Chance_2.dir/cb_2/src/card.c.o"
  "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/cb_2/src/player.c" "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/bin/CMakeFiles/A_Game_of_Chance_2.dir/cb_2/src/player.c.o"
  "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/cb_2/src/service.c" "/vagrant/driller/data/linux/processed-challenges/A_Game_of_Chance/bin/CMakeFiles/A_Game_of_Chance_2.dir/cb_2/src/service.c.o"
  )
set(CMAKE_C_COMPILER_ID "Clang")

# Preprocessor definitions for this target.
set(CMAKE_TARGET_DEFINITIONS
  "FORTIFY_SOURCE=0"
  "LINUX"
  "errno=__cgc_errno"
  )

# Targets to which this target links.
set(CMAKE_TARGET_LINKED_INFO_FILES
  "/vagrant/driller/data/linux/build/include/CMakeFiles/cgc.dir/DependInfo.cmake"
  "/vagrant/driller/data/linux/build/include/tiny-AES128-C/CMakeFiles/tiny-AES128-C.dir/DependInfo.cmake"
  )

# The include file search paths:
set(CMAKE_C_TARGET_INCLUDE_PATH
  "../include"
  "../processed-challenges/A_Game_of_Chance/cb_2/lib"
  "../processed-challenges/A_Game_of_Chance/cb_2/src"
  "../processed-challenges/A_Game_of_Chance/cb_2/include"
  "../include/tiny-AES128-C"
  )
set(CMAKE_CXX_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
set(CMAKE_Fortran_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
set(CMAKE_ASM_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})

repository: siddk/driller-lite

repo_name: siddk/driller-lite

extension: cmake


text:
@inproceedings{icassp91,
 address = {Toronto},
 author = {A. Ferrari and G. Alengrin},
 booktitle = {IEEE International Conference on Acoustics, Speech and
Signal Processing (ICASSP)},
 pages = {3457--3460},
 title = {Estimation of the frequencies of a complex sinusoidal
noisy signal using fourth order statistics},
 year = {1991}
}

repository: andferrari/academic-kickstart

repo_name: andferrari/academic-kickstart


text:
@article{LumiUncert,
      author         = "{ATLAS Collaboration}",
      title          = "{Luminosity determination in pp collisions at $\sqrt{s}$
                        = 8 TeV using the ATLAS detector at the LHC}",
      collaboration  = "ATLAS",
      journal        = "Eur. Phys. J.",
      volume         = "C76",
      year           = "2016",
      number         = "12",
      pages          = "653",
      doi            = "10.1140/epjc/s10052-016-4466-1",
      eprint         = "1608.03953",
      archivePrefix  = "arXiv",
      primaryClass   = "hep-ex",
      reportNumber   = "CERN-EP-2016-117",
      SLACcitation   = "%%CITATION = ARXIV:1608.03953;%%"
}

@article{Czakon:2013goa,
      author         = "Czakon, Michal and Fiedler, Paul and Mitov, Alexander",
      title          = "{Total Top-Quark Pair-Production Cross Section at Hadron
                        Colliders Through $O(\alpha^4_S)$}",
      journal        = "Phys. Rev. Lett.",
      volume         = "110",
      year           = "2013",
      pages          = "252004",
      doi            = "10.1103/PhysRevLett.110.252004",
      eprint         = "1303.6254",
      archivePrefix  = "arXiv",
      primaryClass   = "hep-ph",
      reportNumber   = "CERN-PH-TH-2013-056, TTK-13-08",
      SLACcitation   = "%%CITATION = ARXIV:1303.6254;%%"
}
@Booklet{ATLAS-CONF-2013-102,
    author         = "{ATLAS and CMS Collaborations}",
    title          = "{Combination of ATLAS and CMS results on the mass of the top-quark using up to \(4.9~\text{fb}^{-1}\) of \(\sqrt{s} = 7~\text{TeV}\) LHC data}",
    howpublished   = "{ATLAS-CONF-2013-102}",
    url            = "https://cds.cern.ch/record/1601811",
    year           = "2013",
}

@article{Kidonakis:2010ux,
      author         = "Kidonakis, Nikolaos",
      title          = "{Two-loop soft anomalous dimensions for single top quark
                        associated production with a W$^-$ or H$^-$}",
      journal        = "Phys. Rev. D",
      volume         = "82",
      year           = "2010",
      pages          = "054018",
      doi            = "10.1103/PhysRevD.82.054018",
      eprint         = "1005.4451",
      archivePrefix  = "arXiv",
      primaryClass   = "hep-ph",
      SLACcitation   = "%%CITATION = ARXIV:1005.4451;%%"
}
@Booklet{ATL-PHYS-PUB-2016-004,
    author         = "{ATLAS Collaboration}",
    title          = "{Simulation of top-quark production for the ATLAS experiment at \(\sqrt{s} = 13~\text{TeV}\)}",
    howpublished   = "{ATL-PHYS-PUB-2016-004}",
    url            = "https://cds.cern.ch/record/2120417",
    year           = "2016",
}
@Article{Frixione:2008yi,
     author    = "Frixione, Stefano and Laenen, Eric and Motylinski, Patrick
                  and Webber, Bryan R. and White, Chris D.",
     title     = "{Single-top hadroproduction in association with a W
                  boson}",
     journal   = "JHEP",
     volume    = "07",
     year      = "2008",
     pages     = "029",
     eprint    = "0805.3067",
     archivePrefix = "arXiv",
     primaryClass  =  "hep-ph",
     doi       = "10.1088/1126-6708/2008/07/029"
}

% PDF UNCERT

%PDF4LHC
@Article{Butterworth:2015oua,
      author         = "Butterworth, Jon and others",
      title          = "{PDF4LHC recommendations for LHC Run II}",
      journal        = "J. Phys. G",
      volume         = "43",
      year           = "2016",
      pages          = "023001",
      doi            = "10.1088/0954-3899/43/2/023001",
      eprint         = "1510.03865",
      archivePrefix  = "arXiv",
      primaryClass   = "hep-ph",
      reportNumber   = "OUTP-15-17P, SMU-HEP-15-12, TIF-UNIMI-2015-14,
                        LCTS-2015-27, CERN-PH-TH-2015-249",
      SLACcitation   = "%%CITATION = ARXIV:1510.03865;%%"
}
% MMHT
@article{Harland-Lang:2014zoa,
      author         = "Harland-Lang, L. A. and Martin, A. D. and Motylinski, P.
                        and Thorne, R. S.",
      title          = "{Parton distributions in the LHC era: MMHT 2014 PDFs}",
      journal        = "Eur. Phys. J. C",
      volume         = "75",
      year           = "2015",
      number         = "5",
      pages          = "204",
      doi            = "10.1140/epjc/s10052-015-3397-6",
      eprint         = "1412.3989",
      archivePrefix  = "arXiv",
      primaryClass   = "hep-ph",
      reportNumber   = "LCTS-2014-47, IPPP-14-97, DCPT-14-194",
      SLACcitation   = "%%CITATION = ARXIV:1412.3989;%%"
}
% CT10
@article{Lai:2010vv,
  title = {New parton distributions for collider physics},
  author = "Lai, Hung-Liang and Guzzi, Marco and Huston, Joey and Li, Zhao and Nadolsky, Pavel M. and Pumplin, Jon and Yuan, C.-P.",
  journal = {Phys. Rev. D},
  volume = {82},
  issue = {7},
  pages = {074024},
  numpages = {24},
  year = {2010},
  month = {Oct},
  publisher = {American Physical Society},
  doi = {10.1103/PhysRevD.82.074024},
%  url = {https://link.aps.org/doi/10.1103/PhysRevD.82.074024},
  eprint         = "1007.2241",
  archivePrefix  = "arXiv",
  primaryClass   = "hep-ph"
}

%NNPDF
@article{Ball:2014uwa,
      author         = "Ball, Richard D. and others",
      title          = "{Parton distributions for the LHC Run II}",
      collaboration  = "NNPDF",
      journal        = "JHEP",
      volume         = "04",
      year           = "2015",
      pages          = "040",
      doi            = "10.1007/JHEP04(2015)040",
      eprint         = "1410.8849",
      archivePrefix  = "arXiv",
      primaryClass   = "hep-ph",
      reportNumber   = "EDINBURGH-2014-15, IFUM-1034-FT, CERN-PH-TH-2013-253,
                        OUTP-14-11P, CAVENDISH-HEP-14-11",
      SLACcitation   = "%%CITATION = ARXIV:1410.8849;%%"
}

%CKKW
@article{Lonnblad:2012ix,
      author         = "Lönnblad, Leif and Prestel, Stefan",
      title          = "{Merging multi-leg NLO matrix elements with parton
                        showers}",
      journal        = "JHEP",
      volume         = "03",
      year           = "2013",
      pages          = "166",
      doi            = "10.1007/JHEP03(2013)166",
      eprint         = "1211.7278",
      archivePrefix  = "arXiv",
      primaryClass   = "hep-ph",
      reportNumber   = "MCNET-12-17, LU-TP-12-43",
      SLACcitation   = "%%CITATION = ARXIV:1211.7278;%%"
}

%ZHF
@Article{CMS-EWK-11-015,
    author         = "{CMS Collaboration}",
    title          = "{Measurement of the cross section and angular correlations for associated production of a \(Z\) boson with \(b\) hadrons in \(pp\) collisions at \(\sqrt{s} = 7\,\text{TeV}\)}",
    journal        = "JHEP",
    volume         = "12",
    year           = "2013",
    pages          = "039",
    doi            = "10.1007/JHEP12(2013)039",
    reportNumber   = "CERN-PH-EP-2013-153",
    eprint         = "1310.1349",
    archivePrefix  = "arXiv",
    primaryClass   = "hep-ex",
}

@Article{STDM-2012-15,
    author         = "{ATLAS Collaboration}",
    title          = "{Measurement of differential production cross-sections for a \(Z\) boson in association with \(b\)-jets in \(7\,\text{TeV}\) proton--proton collisions with the ATLAS detector}",
    journal        = "JHEP",
    volume         = "10",
    year           = "2014",
    pages          = "141",
    doi            = "10.1007/JHEP10(2014)141",
    reportNumber   = "CERN-PH-EP-2014-118",
    eprint         = "1407.3643",
    archivePrefix  = "arXiv",
    primaryClass   = "hep-ex",
}

gha_language: TeX


text:
require recipes-graphics/xorg-driver/xorg-driver-video.inc

DESCRIPTION = "X11 driver supporting cards based on the V1000 or the V2x00."

LIC_FILES_CHKSUM = "file://COPYING;md5=1f82ff47b53d054af9757517c438fabb"

SRC_URI = "git://anongit.freedesktop.org/xorg/driver/xf86-video-rendition;protocol=git;branch=master \
          "

# TODO : Split another package
#FILES_${PN} += "${libdir}/xorg/modules/v*0002d.uc"

S = "${WORKDIR}/git"
SRCREV = "3a3ee1c45e54a808947cc26ca11f0a5299571053"

repository: gitter-badger/meta-cocon

repo_name: gitter-badger/meta-cocon


text:
package main

import (
	"fmt"

	"github.com/go-gl/glfw/v3.2/glfw"
)

// currentReg holds the in-focus entity registry.
var currentReg *entityRegistry

// entityRegistry is an owner of entities. It does operations on these entities
// when events happen, depending on what entity interfaces the entity
// implements.
type entityRegistry struct {
	entities  []entity
	physicals []physicalEntity
	inputters []inputEntity
	snoopers  []snoopingEntity
	inFramers []inFrameEntity
}

// addEntity adds an entity to the registry.
func (er *entityRegistry) addEntity(e entity) {
	er.entities = append(er.entities, e)

	if physical, ok := e.(physicalEntity); ok {
		er.physicals = append(er.physicals, physical)
	}
	if inputter, ok := e.(inputEntity); ok {
		er.inputters = append(er.inputters, inputter)
	}
	if snooper, ok := e.(snoopingEntity); ok {
		er.snoopers = append(er.snoopers, snooper)
	}
	if inFramer, ok := e.(inFrameEntity); ok {
		er.inFramers = append(er.inFramers, inFramer)
	}
}

// draw draws every physical entity.
func (er *entityRegistry) draw() {
	for _, e := range er.physicals {
		e.draw()
	}
}

// tick runs the tick operations of every entity.
func (er *entityRegistry) tick() {
	for _, e := range er.entities {
		var newEnts []entity

		if pe, ok := e.(physicalEntity); ok {
			// Find out if the entity moved this tick
			oldLoc := pe.location()
			newEnts = pe.tick()
			newLoc := pe.location()
			if newLoc != oldLoc {
				er.moveEvent(pe, newLoc)
			}
		} else {
			newEnts = e.tick()
		}

		// Add any new entities to registry
		for _, newEnt := range newEnts {
			er.addEntity(newEnt)
		}

		// Delete the entity if necessary
		if e.deletable() {
			er.deleteEvent(e)
			er.del(e)
		}
	}

	// Test for collisions between entities
	for i := 0; i < len(er.physicals); i++ {
		for j := i + 1; j < len(er.physicals); j++ {
			er.interact(er.physicals[i], er.physicals[j])
		}
	}
}

// interact has the two given entities' collisions interact with each other.
func (er *entityRegistry) interact(pe1 physicalEntity, pe2 physicalEntity) {
	cols1 := pe1.collisions()
	cols2 := pe2.collisions()

	for _, c1 := range cols1 {
		for _, c2 := range cols2 {
			if collides(c1, c2) {
				if c1.uid() == coolGuyCol || c2.uid() == coolGuyCol {
					fmt.Println("So it's being interacted with")
				}
				pe1.collision(c1, c2)
				pe2.collision(c2, c1)
			}
		}
	}
}

// moveEvent notifies all snooping entities that the given entity has moved.
func (er *entityRegistry) moveEvent(e physicalEntity, loc vertex) {
	for _, se := range er.snoopers {
		se.entityMove(e, loc)
	}
}

// deleteEvent notifies all snooping entities that the given entity has been
// deleted.
func (er *entityRegistry) deleteEvent(e entity) {
	for _, se := range er.snoopers {
		se.entityDestruction(e)
	}
}

// joystickAxisEvent notifies all input entities that a joystick axis has
// changed.
func (er *entityRegistry) joystickAxisEvent(joystick glfw.Joystick, axes []float32) {
	for _, ie := range er.inputters {
		ie.joystickAxis(joystick, axes)
	}
}

// joystickButtonEvent notifies all input entities that a joystick button has
// changed.
func (er *entityRegistry) joystickButtonEvent(joystick glfw.Joystick, buttons []byte) {
	for _, ie := range er.inputters {
		ie.joystickButton(joystick, buttons)
	}
}

// del deletes the given entity from the entity registry.
func (er *entityRegistry) del(e entity) {
	for i := 0; i < len(er.entities); i++ {
		if er.entities[i].uid() == e.uid() {
			er.entities = append(er.entities[:i], er.entities[i+1:]...)
		}
	}

	for i := 0; i < len(er.physicals); i++ {
		if er.physicals[i].uid() == e.uid() {
			er.physicals = append(er.physicals[:i], er.physicals[i+1:]...)
		}
	}

	for i := 0; i < len(er.inputters); i++ {
		if er.inputters[i].uid() == e.uid() {
			er.inputters = append(er.inputters[:i], er.inputters[i+1:]...)
		}
	}

	for i := 0; i < len(er.snoopers); i++ {
		if er.snoopers[i].uid() == e.uid() {
			er.snoopers = append(er.snoopers[:i], er.snoopers[i+1:]...)
		}
	}
}

repository: velovix/vertex

repo_name: velovix/vertex


text:
@article{yu_efficient_2007,
	title = {Efficient index-based {KNN} join processing for high-dimensional data},
	volume = {49},
	issn = {09505849},
	url = {http://linkinghub.elsevier.com/retrieve/pii/S0950584906000772},
	doi = {10.1016/j.infsof.2006.05.006},
	language = {en},
	number = {4},
	urldate = {2015-09-04},
	journal = {Information and Software Technology},
	author = {Yu, Cui and Cui, Bin and Wang, Shuguang and Su, Jianwen},
	month = apr,
	year = {2007},
	pages = {332--344},
	file = {2007InSoft.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/FGU9EBF4/2007InSoft.pdf:application/pdf}
}

@inproceedings{song_solutions_2015,
	title = {Solutions for {Processing} {K} {Nearest} {Neighbor} {Joins} for {Massive} {Data} on {MapReduce}},
	url = {https://hal.inria.fr/hal-01097337/},
	urldate = {2015-09-04},
	booktitle = {23rd {Euromicro} {International} {Conference} on {Parallel}, {Distributed} and {Network}-based {Processing}},
	author = {Song, Ge and Rochas, Justine and Huet, Fabrice and Magoules, Frédéric},
	year = {2015},
	file = {bare_conf.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/W8XFTQWM/bare_conf.pdf:application/pdf}
}

@inproceedings{vernica_efficient_2010,
	title = {Efficient parallel set-similarity joins using {MapReduce}},
	url = {http://dl.acm.org/citation.cfm?id=1807222},
	urldate = {2015-09-04},
	booktitle = {Proceedings of the 2010 {ACM} {SIGMOD} {International} {Conference} on {Management} of data},
	publisher = {ACM},
	author = {Vernica, Rares and Carey, Michael J. and Li, Chen},
	year = {2010},
	pages = {495--506},
	file = {efficient parallel set similarity joins sigmod10-p495-vernica-long.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/28AB53AV/efficient parallel set similarity joins sigmod10-p495-vernica-long.pdf:application/pdf}
}

@inproceedings{kuan_fast_1997,
	Title = {Fast k nearest neighbour search for {R}-tree family},
	url = {http://ieeexplore.ieee.org/xpls/abs\_all.jsp?arnumber=652114},
	urldate = {2015-09-04},
	booktitle = {Information, {Communications} and {Signal} {Processing}, 1997. {ICICS}., {Proceedings} of 1997 {International} {Conference} on},
	publisher = {IEEE},
	author = {Kuan, Joseph and Lewis, Paul},
	year = {1997},
	pages = {924--928},
	file = {Fast k nearest neighbour search for R-tree family.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/G85GAQRV/Fast k nearest neighbour search for R-tree family.pdf:application/pdf}
}

@inproceedings{zhang_efficient_2012,
	title = {Efficient parallel {kNN} joins for large data in {MapReduce}},
	url = {http://dl.acm.org/citation.cfm?id=2247602},
	urldate = {2015-09-04},
	booktitle = {Proceedings of the 15th {International} {Conference} on {Extending} {Database} {Technology}},
	publisher = {ACM},
	author = {Zhang, Chi and Li, Feifei and Jestes, Jeffrey},
	year = {2012},
	pages = {38--49},
	file = {feifeiLi_KNN_MapReduce.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/N6HUHWPU/feifeiLi_KNN_MapReduce.pdf:application/pdf}
}

@article{yu_high-dimensional_2010,
	title = {High-dimensional {kNN} joins with incremental updates},
	volume = {14},
	issn = {1384-6175, 1573-7624},
	url = {http://link.springer.com/10.1007/s10707-009-0076-5},
	doi = {10.1007/s10707-009-0076-5},
	language = {en},
	number = {1},
	urldate = {2015-09-04},
	journal = {GeoInformatica},
	author = {Yu, Cui and Zhang, Rui and Huang, Yaochun and Xiong, Hui},
	month = jan,
	year = {2010},
	pages = {55--82},
	file = {GEO2009.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/ITKPMZXZ/GEO2009.pdf:application/pdf}
}

@article{jagadish_idistance:_2005,
	title = {{iDistance}: {An} adaptive {B}+-tree based indexing method for nearest neighbor search},
	volume = {30},
	shorttitle = {{iDistance}},
	url = {http://dl.acm.org/citation.cfm?id=1071612},
	number = {2},
	urldate = {2015-09-04},
	journal = {ACM Transactions on Database Systems (TODS)},
	author = {Jagadish, Hosagrahar V. and Ooi, Beng Chin and Tan, Kian-Lee and Yu, Cui and Zhang, Rui},
	year = {2005},
	pages = {364--397},
	file = {idistance-p364-jagadish.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/PUVVUS83/idistance-p364-jagadish.pdf:application/pdf}
}

@article{bohm_k-nearest_2004,
	title = {The k-nearest neighbour join: {Turbo} charging the {KDD} process},
	volume = {6},
	shorttitle = {The k-nearest neighbour join},
	url = {http://link.springer.com/article/10.1007/s10115-003-0122-9},
	number = {6},
	urldate = {2015-09-04},
	journal = {Knowledge and Information Systems},
	author = {Böhm, Christian and Krebs, Florian},
	year = {2004},
	pages = {728--749},
	file = {Kais_03.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/77E8U4RT/Kais_03.pdf:application/pdf}
}

@inproceedings{zhang_nearest_2013,
	title = {Nearest group queries},
	url = {http://dl.acm.org/citation.cfm?id=2484866},
	urldate = {2015-09-04},
	booktitle = {Proceedings of the 25th {International} {Conference} on {Scientific} and {Statistical} {Database} {Management}},
	publisher = {ACM},
	author = {Zhang, Dongxiang and Chan, Chee-Yong and Tan, Kian-Lee},
	year = {2013},
	pages = {7},
	file = {kng.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/QHQCGHPN/kng.pdf:application/pdf}
}

@inproceedings{haghani_lsh_2008,
	title = {{LSH} {At} {Large}-{Distributed} {KNN} {Search} in {High} {Dimensions}.},
	url = {http://www.researchgate.net/profile/Philippe_Cudre-Mauroux/publication/221035485_LSH_At_Large_-_Distributed_KNN_Search_in_High_Dimensions/links/00463525d09c9427c8000000.pdf},
	urldate = {2015-09-04},
	booktitle = {{WebDB}},
	author = {Haghani, Parisa and Michel, Sebastian and Cudré-Mauroux, Philippe and Aberer, Karl},
	year = {2008},
	file = {LSH At Large Distributed KNN Search in HIgh dimensions.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/XC9F5N4K/LSH At Large Distributed KNN Search in HIgh dimensions.pdf:application/pdf}
}

@inproceedings{kiefer_pairwise_2010,
	title = {Pairwise element computation with {MapReduce}},
	url = {http://dl.acm.org/citation.cfm?id=1851595},
	urldate = {2015-09-04},
	booktitle = {Proceedings of the 19th {ACM} {International} {Symposium} on {High} {Performance} {Distributed} {Computing}},
	publisher = {ACM},
	author = {Kiefer, Tim and Volk, Peter Benjamin and Lehner, Wolfgang},
	year = {2010},
	pages = {826--833},
	file = {mapreduce_pairwise_distance_kvl10.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/B2BKFCTE/mapreduce_pairwise_distance_kvl10.pdf:application/pdf}
}

@article{lu_efficient_2012,
	title = {Efficient processing of k nearest neighbor joins using mapreduce},
	volume = {5},
	url = {http://dl.acm.org/citation.cfm?id=2336674},
	number = {10},
	urldate = {2015-09-04},
	journal = {Proceedings of the VLDB Endowment},
	author = {Lu, Wei and Shen, Yanyan and Chen, Su and Ooi, Beng Chin},
	year = {2012},
	pages = {1016--1027},
	file = {Lu et al. - 2012 - Efficient processing of k nearest neighbor joins u.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/KCAARQZX/Lu et al. - 2012 - Efficient processing of k nearest neighbor joins u.pdf:application/pdf}
}

@inproceedings{stupar_rankreduceprocessing_2010,
	title = {{RankReduceprocessing} k-nearest neighbor queries on top of {MapReduce}},
	url = {http://www.csd.uoc.gr/~hy562/local\_copy/BigData/Finding\_Similar\_Items/rankreduce2010.pdf},
	urldate = {2015-09-04},
	booktitle = {Proceedings of the 8th {Workshop} on {Large}-{Scale} {Distributed} {Systems} for {Information} {Retrieval}},
	author = {Stupar, Aleksandar and Michel, Sebastian and Schenkel, Ralf},
	year = {2010},
	pages = {13--18},
	file = {rankreduce2010.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/32USWDN5/rankreduce2010.pdf:application/pdf}
}

@inproceedings{xia_gorder:_2004,
	title = {Gorder: an efficient method for {KNN} join processing},
	shorttitle = {Gorder},
	url = {http://dl.acm.org/citation.cfm?id=1316755},
	urldate = {2015-09-04},
	booktitle = {Proceedings of the {Thirtieth} international conference on {Very} large data bases-{Volume} 30},
	publisher = {VLDB Endowment},
	author = {Xia, Chenyi and Lu, Hongjun and Ooi, Beng Chin and Hu, Jing},
	year = {2004},
	pages = {756--767},
	file = {RS20P2.PDF:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/N88FRI8T/RS20P2.PDF:application/pdf}
}

@article{metwally_v-smart-join:_2012,
	title = {V-smart-join: {A} scalable mapreduce framework for all-pair similarity joins of multisets and vectors},
	volume = {5},
	shorttitle = {V-smart-join},
	url = {http://dl.acm.org/citation.cfm?id=2212353},
	number = {8},
	urldate = {2015-09-04},
	journal = {Proceedings of the VLDB Endowment},
	author = {Metwally, Ahmed and Faloutsos, Christos},
	year = {2012},
	pages = {704--715},
	file = {vsmart join.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/WDA8ITIQ/vsmart join.pdf:application/pdf}
}

@inproceedings{akdogan_voronoi-based_2010,
	title = {Voronoi-{Based} {Geospatial} {Query} {Processing} with {MapReduce}},
	isbn = {978-1-4244-9405-7},
	url = {http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=5708428},
	doi = {10.1109/CloudCom.2010.92},
	urldate = {2015-09-04},
	publisher = {IEEE},
	author = {Akdogan, Afsin and Demiryurek, Ugur and Banaei-Kashani, Farnoush and Shahabi, Cyrus},
	month = nov,
	year = {2010},
	pages = {9--16},
	file = {vornoi based geosparial query IEEE_Cloud_Computing_2010.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/NW845865/vornoi based geosparial query IEEE_Cloud_Computing_2010.pdf:application/pdf}
}

@article{har-peled_approximate_2012,
	title = {Approximate {Nearest} {Neighbor}: {Towards} {Removing} the {Curse} of {Dimensionality}.},
	volume = {8},
	shorttitle = {Approximate {Nearest} {Neighbor}},
	url = {http://crowdsourcing-class.org/readings/downloads/twitter/approximate-nearest-neighbors.pdf},
	number = {1},
	urldate = {2015-09-04},
	journal = {Theory of computing},
	author = {Har-Peled, Sariel and Indyk, Piotr and Motwani, Rajeev},
	year = {2012},
	pages = {321--350},
	file = {approximate-nearest-neighbors.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/NQ4CU7RN/approximate-nearest-neighbors.pdf:application/pdf}
}

@article{elseberg_comparison_2012,
	title = {Comparison of nearest-neighbor-search strategies and implementations for efficient shape registration},
	volume = {3},
	url = {http://www.researchgate.net/profile/Andreas_Nuchter/publication/233792571_Comparison_on_nearest-neigbour-search_strategies_and_implementations_for_efficient_shape_registration/links/0912f50b8bb8590953000000.pdf},
	number = {1},
	urldate = {2015-09-04},
	journal = {Journal of Software Engineering for Robotics},
	author = {Elseberg, Jan and Magnenat, Stéphane and Siegwart, Roland and Nüchter, Andreas},
	year = {2012},
	pages = {2--12},
	file = {comparison of nn for shape registration joser2012.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/WIX8FVI6/comparison of nn for shape registration joser2012.pdf:application/pdf}
}

@inproceedings{yao_k_2010,
	title = {K nearest neighbor queries and knn-joins in large relational databases (almost) for free},
	url = {http://ieeexplore.ieee.org/xpls/abs\_all.jsp?arnumber=5447837},
	urldate = {2015-09-05},
	booktitle = {Data engineering ({ICDE}), 2010 {IEEE} 26th international conference on},
	publisher = {IEEE},
	author = {Yao, Bin and Li, Feifei and Kumar, Piyush},
	year = {2010},
	pages = {4--15},
	file = {KNN Joins in Large Relational DB.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/FGPRUI7B/KNN Joins in Large Relational DB.pdf:application/pdf}
}

@misc{_hadoop_mr,
	title = {Hadoop {Mapreduce}},
	url = {http://hadoop.apache.org/}
}

@misc{_apache_spark,
	title = {Apache {Spark}},
	url = {http://spark.apache.org/}
}

@misc{_hadoop_mr_arch,
	title = {Hadoop {Mapreduce}},
	url = {http://escience.washington.edu/get-help-now/what-hadoop}
}

@incollection{beyer_when_1999,
	title = {When is “nearest neighbor” meaningful?},
	url = {http://link.springer.com/chapter/10.1007/3-540-49257-7\_15},
	urldate = {2015-09-06},
	booktitle = {Database {Theory}—{ICDT}’99},
	publisher = {Springer},
	author = {Beyer, Kevin and Goldstein, Jonathan and Ramakrishnan, Raghu and Shaft, Uri},
	year = {1999},
	pages = {217--235},
	file = {when is nn meaningful.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/KB2CQ2VC/when is nn meaningful.pdf:application/pdf}
}

@article{dean_mapreduce:_2008,
	title = {{MapReduce}: simplified data processing on large clusters},
	volume = {51},
	url = {http://dl.acm.org/citation.cfm?id=1327492},
	shorttitle = {{MapReduce}},
	pages = {107--113},
	number = {1},
	journaltitle = {Communications of the {ACM}},
	author = {Dean, Jeffrey and Ghemawat, Sanjay},
	urldate = {2015-09-18},
	date = {2008},
	file = {mapreduce-p107-dean.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/5GGC3C92/mapreduce-p107-dean.pdf:application/pdf}
}

@online{_spark_mLlib,
	title = {Apache Spark {MLlib}},
	url = {http://spark.apache.org/mllib/}
}

@online{_apache_mahout,
	title = {Apache Mahout},
	url = {http://mahout.apache.org/}
}

@inproceedings{bohm_epsilon_2001,
	title = {Epsilon grid order: an algorithm for the similarity join on massive high-dimensional data},
	volume = {30},
	url = {http://dl.acm.org/citation.cfm?id=375714},
	shorttitle = {Epsilon grid order},
	pages = {379--388},
	booktitle = {{ACM} {SIGMOD} Record},
	publisher = {{ACM}},
	author = {Böhm, Christian and Braunmüller, Bernhard and Krebs, Florian and Kriegel, Hans-Peter},
	urldate = {2015-09-19},
	date = {2001},
	file = {rtree_00914854.pdf:/Users/ramz.sivagurunathan/Library/Application Support/Zotero/Profiles/c6htiofk.default/zotero/storage/FZ8JTR7F/rtree_00914854.pdf:application/pdf}
}


text:
// Copyright © 2022 AMIS Technologies
//
// 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 paillier

import (
	"math/big"

	"github.com/getamis/alice/crypto/utils"
)

func NewPaillierOperationAndPaillierCommitment(config *CurveConfig, ssidInfo []byte, x *big.Int, y *big.Int, rho *big.Int, rhox *big.Int, rhoy *big.Int, n0 *big.Int, n1 *big.Int, X *big.Int, Y *big.Int, C *big.Int, D *big.Int, ped *PederssenOpenParameter) (*PaillierOperationAndCommitmentMessage, error) {
	n0Square := new(big.Int).Exp(n0, big2, nil)
	n1Square := new(big.Int).Exp(n1, big2, nil)
	fieldOrder := config.Curve.Params().N
	pedN := ped.GetN()
	peds := ped.GetS()
	pedt := ped.GetT()
	// Sample α in ± 2^{l+ε}, β in ±2^{l'+ε}.
	alpha, err := utils.RandomAbsoluteRangeInt(config.TwoExpLAddepsilon)
	if err != nil {
		return nil, err
	}
	beta, err := utils.RandomAbsoluteRangeInt(config.TwoExpLpaiAddepsilon)
	if err != nil {
		return nil, err
	}
	// Sample r in Z_{N0}^ast, rx in Z_{N1}^ast and ry in Z_{N1}^ast
	r, err := utils.RandomCoprimeInt(n0)
	if err != nil {
		return nil, err
	}
	rx, err := utils.RandomCoprimeInt(n1)
	if err != nil {
		return nil, err
	}
	ry, err := utils.RandomCoprimeInt(n1)
	if err != nil {
		return nil, err
	}
	// Sample γ in ± 2^{l+ε}·Nˆ and m in ±2^l ·Nˆ
	gamma, err := utils.RandomAbsoluteRangeInt(new(big.Int).Mul(config.TwoExpLAddepsilon, pedN))
	if err != nil {
		return nil, err
	}
	m, err := utils.RandomAbsoluteRangeInt(new(big.Int).Mul(config.TwoExpL, pedN))
	if err != nil {
		return nil, err
	}
	// δ in ± 2^{l+ε}·Nˆ and μ in ± 2^{l+ε}·Nˆ
	delta, err := utils.RandomAbsoluteRangeInt(new(big.Int).Mul(config.TwoExpLAddepsilon, pedN))
	if err != nil {
		return nil, err
	}
	mu, err := utils.RandomAbsoluteRangeInt(new(big.Int).Mul(config.TwoExpL, pedN))
	if err != nil {
		return nil, err
	}
	// A=C^α·((1+N_0)^β·r^N0) mod N0^2
	A := new(big.Int).Mul(new(big.Int).Exp(C, alpha, n0Square), new(big.Int).Exp(r, n0, n0Square))
	A.Mul(A, new(big.Int).Exp(new(big.Int).Add(big1, n0), beta, n0Square))
	A.Mod(A, n0Square)
	// B_x = (1+N_1)^α ·rx^{N_1} mod N_1^2
	Bx := new(big.Int).Exp(rx, n1, n1Square)
	Bx.Mul(Bx, new(big.Int).Exp(new(big.Int).Add(big1, n1), alpha, n1Square))
	Bx.Mod(Bx, n1Square)
	// B_y = (1+N_1)^α ·ry^{N_1} mod N_1^2
	By := new(big.Int).Mul(new(big.Int).Exp(new(big.Int).Add(big1, n1), beta, n1Square), new(big.Int).Exp(ry, n1, n1Square))
	By.Mod(By, n1Square)
	// E = s^α*t^γ mod Nˆ and S = s^x*t^m mod Nˆ
	E := new(big.Int).Mul(new(big.Int).Exp(peds, alpha, pedN), new(big.Int).Exp(pedt, gamma, pedN))
	E.Mod(E, pedN)
	S := new(big.Int).Mul(new(big.Int).Exp(peds, x, pedN), new(big.Int).Exp(pedt, m, pedN))
	S.Mod(S, pedN)
	// F = s^β*t^δ mod Nˆ and T = s^y*t^μ mod Nˆ
	F := new(big.Int).Mul(new(big.Int).Exp(peds, beta, pedN), new(big.Int).Exp(pedt, delta, pedN))
	F.Mod(F, pedN)
	T := new(big.Int).Mul(new(big.Int).Exp(peds, y, pedN), new(big.Int).Exp(pedt, mu, pedN))
	T.Mod(T, pedN)

	e, salt, err := GetE(fieldOrder, utils.GetAnyMsg(ssidInfo, new(big.Int).SetUint64(config.LAddEpsilon).Bytes(), new(big.Int).SetUint64(config.LpaiAddEpsilon).Bytes(), n0.Bytes(), n1.Bytes(), C.Bytes(), D.Bytes(), X.Bytes(), Y.Bytes(), S.Bytes(), T.Bytes(), A.Bytes(), Bx.Bytes(), By.Bytes(), E.Bytes(), F.Bytes())...)
	if err != nil {
		return nil, err
	}
	// z1 = α + ex, z2 =β+ey, z3 = γ + em, z4 =δ+eμ, w = r · ρ^e mod N_0, wx = rx · ρx^e and wy = ry · ρy^e mod N1.
	z1 := new(big.Int).Add(alpha, new(big.Int).Mul(e, x))
	z2 := new(big.Int).Add(beta, new(big.Int).Mul(e, y))
	z3 := new(big.Int).Add(gamma, new(big.Int).Mul(e, m))
	z4 := new(big.Int).Add(delta, new(big.Int).Mul(e, mu))
	w := new(big.Int).Mul(r, new(big.Int).Exp(rho, e, n0))
	w.Mod(w, n0)
	wx := new(big.Int).Mul(rx, new(big.Int).Exp(rhox, e, n1))
	wx.Mod(wx, n1)
	wy := new(big.Int).Mul(ry, new(big.Int).Exp(rhoy, e, n1))
	wy.Mod(wy, n1)

	return &PaillierOperationAndCommitmentMessage{
		Salt: salt,
		S:    S.Bytes(),
		T:    T.Bytes(),
		A:    A.Bytes(),
		Bx:   Bx.Bytes(),
		By:   By.Bytes(),
		E:    E.Bytes(),
		F:    F.Bytes(),
		Z1:   z1.String(),
		Z2:   z2.String(),
		Z3:   z3.String(),
		Z4:   z4.String(),
		W:    w.Bytes(),
		Wx:   wx.Bytes(),
		Wy:   wy.Bytes(),
	}, nil
}

func (msg *PaillierOperationAndCommitmentMessage) Verify(config *CurveConfig, ssidInfo []byte, n0, n1, C, D, X, Y *big.Int, ped *PederssenOpenParameter) error {
	n0Square := new(big.Int).Exp(n0, big2, nil)
	n1Square := new(big.Int).Exp(n1, big2, nil)
	fieldOrder := config.Curve.Params().N
	pedN := ped.GetN()
	peds := ped.GetS()
	pedt := ped.GetT()
	// check A in Z_{N0^2}^\ast, By, Bx in Z_{N1^2}^\ast, E,S,T,F in Z_{\hat{N}}^\ast, w in Z_{N0}^\ast, and wx, wy in Z_{N1}^\ast.
	S := new(big.Int).SetBytes(msg.S)
	err := utils.InRange(S, big0, pedN)
	if err != nil {
		return err
	}
	if !utils.IsRelativePrime(S, pedN) {
		return ErrVerifyFailure
	}
	T := new(big.Int).SetBytes(msg.T)
	err = utils.InRange(T, big0, pedN)
	if err != nil {
		return err
	}
	if !utils.IsRelativePrime(T, pedN) {
		return ErrVerifyFailure
	}
	A := new(big.Int).SetBytes(msg.A)
	err = utils.InRange(A, big0, n0Square)
	if err != nil {
		return err
	}
	if !utils.IsRelativePrime(A, n0Square) {
		return ErrVerifyFailure
	}
	By := new(big.Int).SetBytes(msg.By)
	err = utils.InRange(By, big0, n1Square)
	if err != nil {
		return err
	}
	if !utils.IsRelativePrime(By, n1Square) {
		return ErrVerifyFailure
	}
	E := new(big.Int).SetBytes(msg.E)
	err = utils.InRange(E, big0, pedN)
	if err != nil {
		return err
	}
	if !utils.IsRelativePrime(E, pedN) {
		return ErrVerifyFailure
	}
	F := new(big.Int).SetBytes(msg.F)
	err = utils.InRange(F, big0, pedN)
	if err != nil {
		return err
	}
	if !utils.IsRelativePrime(F, pedN) {
		return ErrVerifyFailure
	}
	z1, _ := new(big.Int).SetString(msg.Z1, 10)
	z2, _ := new(big.Int).SetString(msg.Z2, 10)
	z3, _ := new(big.Int).SetString(msg.Z3, 10)
	z4, _ := new(big.Int).SetString(msg.Z4, 10)
	W := new(big.Int).SetBytes(msg.W)
	err = utils.InRange(W, big0, n0)
	if err != nil {
		return err
	}
	if !utils.IsRelativePrime(W, n0) {
		return ErrVerifyFailure
	}
	Wy := new(big.Int).SetBytes(msg.Wy)
	err = utils.InRange(Wy, big0, n1)
	if err != nil {
		return err
	}
	if !utils.IsRelativePrime(Wy, n1) {
		return ErrVerifyFailure
	}
	Bx := new(big.Int).SetBytes(msg.Bx)
	err = utils.InRange(Bx, big0, n1Square)
	if err != nil {
		return err
	}
	if !utils.IsRelativePrime(Bx, n1Square) {
		return ErrVerifyFailure
	}
	Wx := new(big.Int).SetBytes(msg.Wx)
	err = utils.InRange(Wx, big0, n1)
	if err != nil {
		return err
	}
	if !utils.IsRelativePrime(Wx, n1) {
		return ErrVerifyFailure
	}

	seed, err := utils.HashProtos(msg.Salt, utils.GetAnyMsg(ssidInfo, new(big.Int).SetUint64(config.LAddEpsilon).Bytes(), new(big.Int).SetUint64(config.LpaiAddEpsilon).Bytes(), n0.Bytes(), n1.Bytes(), C.Bytes(), D.Bytes(), X.Bytes(), Y.Bytes(), S.Bytes(), T.Bytes(), A.Bytes(), Bx.Bytes(), By.Bytes(), E.Bytes(), F.Bytes())...)
	if err != nil {
		return err
	}
	e := utils.RandomAbsoluteRangeIntBySeed(msg.Salt, seed, fieldOrder)
	err = utils.InRange(e, new(big.Int).Neg(fieldOrder), new(big.Int).Add(big1, fieldOrder))
	if err != nil {
		return err
	}
	// Check z_1 in ±2^{l+ε}.
	absZ1 := new(big.Int).Abs(z1)
	if absZ1.Cmp(new(big.Int).Lsh(big2, uint(config.LAddEpsilon))) > 0 {
		return ErrVerifyFailure
	}
	// Check z_2 in ±2^{l′+ε}.
	absZ2 := new(big.Int).Abs(z2)
	if absZ2.Cmp(new(big.Int).Lsh(big2, uint(config.LpaiAddEpsilon))) > 0 {
		return ErrVerifyFailure
	}
	// Check C^{z1}(1+N_0)^{z2}w^{N_0} = A·D^e mod N_0^2.
	ADexpe := new(big.Int).Mul(A, new(big.Int).Exp(D, e, n0Square))
	ADexpe.Mod(ADexpe, n0Square)
	compare := new(big.Int).Exp(C, z1, n0Square)
	compare.Mul(compare, new(big.Int).Exp(new(big.Int).Add(big1, n0), z2, n0Square))
	compare.Mul(compare, new(big.Int).Exp(W, n0, n0Square))
	compare.Mod(compare, n0Square)
	if compare.Cmp(ADexpe) != 0 {
		return ErrVerifyFailure
	}
	// Check (1+N_1)^{z_1}wx^{N_1} = B_x·X^e mod N_1^2.
	BxXexpe := new(big.Int).Mul(Bx, new(big.Int).Exp(X, e, n1Square))
	BxXexpe.Mod(BxXexpe, n1Square)
	compare = new(big.Int).Exp(Wx, n1, n1Square)
	compare.Mul(compare, new(big.Int).Exp(new(big.Int).Add(big1, n1), z1, n1Square))
	compare.Mod(compare, n1Square)
	if compare.Cmp(BxXexpe) != 0 {
		return ErrVerifyFailure
	}
	// Check (1+N_1)^{z_2}wy^{N_1} = B_y·Y^e mod N_1^2.
	Byyexpe := new(big.Int).Mul(By, new(big.Int).Exp(Y, e, n1Square))
	Byyexpe.Mod(Byyexpe, n1Square)
	compare = new(big.Int).Exp(Wy, n1, n1Square)
	compare.Mul(compare, new(big.Int).Exp(new(big.Int).Add(big1, n1), z2, n1Square))
	compare.Mod(compare, n1Square)
	if compare.Cmp(Byyexpe) != 0 {
		return ErrVerifyFailure
	}
	// Check s^{z1}t^{z3} =E·S^e mod Nˆ
	sz1tz3 := new(big.Int).Mul(new(big.Int).Exp(peds, z1, pedN), new(big.Int).Exp(pedt, z3, pedN))
	sz1tz3.Mod(sz1tz3, pedN)
	ESexpe := new(big.Int).Mul(E, new(big.Int).Exp(S, e, pedN))
	ESexpe.Mod(ESexpe, pedN)
	if sz1tz3.Cmp(ESexpe) != 0 {
		return ErrVerifyFailure
	}
	// Check s^{z2}t^{z4} =F·T^e mod Nˆ
	sz2tz4 := new(big.Int).Mul(new(big.Int).Exp(peds, z2, pedN), new(big.Int).Exp(pedt, z4, pedN))
	sz2tz4.Mod(sz2tz4, pedN)
	FTexpe := new(big.Int).Mul(F, new(big.Int).Exp(T, e, pedN))
	FTexpe.Mod(FTexpe, pedN)
	if FTexpe.Cmp(sz2tz4) != 0 {
		return ErrVerifyFailure
	}
	return nil
}

repository: getamis/alice

repo_name: getamis/alice


text:
DESCRIPTION = "This module provides a framework for generating v3 UUIDs (Universally \
Unique Identifiers, also known as GUIDs (Globally Unique Identifiers). A \
UUID is 128 bits long, and is guaranteed to be different from all other \
UUIDs/GUIDs generated until 3400 CE."

SECTION = "libs"
LICENSE = "BSD-3-Clause"
PR = "r0"

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

LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"

SRC_URI = "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/Data-UUID-1.226.tar.gz"

SRC_URI[md5sum] = "13468e0fb65a0b5ce27b8628cb2f0109"
SRC_URI[sha256sum] = "093d57ffa0d411a94bafafae495697db26f5c9d0277198fe3f7cf2be22996453"

S = "${WORKDIR}/Data-UUID-${PV}"

inherit cpan

BBCLASSEXTEND = "native"

repository: rehsack/meta-cpan

repo_name: rehsack/meta-cpan


text:
package redhatbase

import (
	"bufio"
	"bytes"
	"os"
	"strings"

	"github.com/aquasecurity/fanal/analyzer"

	aos "github.com/aquasecurity/fanal/analyzer/os"
	"github.com/aquasecurity/fanal/types"
	"github.com/aquasecurity/fanal/utils"
	"golang.org/x/xerrors"
)

func init() {
	analyzer.RegisterAnalyzer(&centOSAnalyzer{})
}

var (
	requiredFiles = []string{"etc/centos-release"}
)

type centOSAnalyzer struct{}

func (a centOSAnalyzer) Analyze(content []byte) (analyzer.AnalyzeReturn, error) {
	scanner := bufio.NewScanner(bytes.NewBuffer(content))
	for scanner.Scan() {
		line := scanner.Text()
		result := redhatRe.FindStringSubmatch(strings.TrimSpace(line))
		if len(result) != 3 {
			return analyzer.AnalyzeReturn{}, xerrors.New("centos: invalid centos-release")
		}

		switch strings.ToLower(result[1]) {
		case "centos", "centos linux":
			return analyzer.AnalyzeReturn{
				OS: types.OS{Family: aos.CentOS, Name: result[2]},
			}, nil
		}
	}

	return analyzer.AnalyzeReturn{}, xerrors.Errorf("centos: %w", aos.AnalyzeOSError)
}

func (a centOSAnalyzer) Required(filePath string, _ os.FileInfo) bool {
	return utils.StringInSlice(filePath, requiredFiles)
}

func (a centOSAnalyzer) requiredFiles() []string {
	return []string{"etc/centos-release"}
}

func (a centOSAnalyzer) Name() string {
	return aos.CentOS
}

repository: bastianccm/fanal

repo_name: bastianccm/fanal


text:
@MISC{Bocoup2011,
  author = {Bocoup},
  title = {Newsweek Career Tree Visualization with {RaphaelJS} and {Burst}},
  url = {http://weblog.bocoup.com/newsweek-raphaeljs-career-tree-visualization-raphaeljs-burst/},
  year = {2011},
  note = {retrieved 27-SEPT-2012},
  abstract = {Career Tree is a vector based RaphaelJS/Burst visualization of your career - you can activate it by connecting with your LinkedIn account or by filling out a Career Tree form.}
}

repository: vis-au/treevisnet

repo_name: vis-au/treevisnet


text:
package model

type FileDescriptor struct {
	Name             string
	DescriptorByName map[string]*Descriptor
	Descriptors      []*Descriptor
	Pragma           *MetaInfo
	Fdmap            map[string][]string
}

func (self *FileDescriptor) MatchTag(tag string) bool {

	if !self.Pragma.ContainKey("OutputTag") {
		return true
	}

	return self.Pragma.ContainValue("OutputTag", tag)

}

// 取行类型的结构
func (self *FileDescriptor) RowDescriptor() *Descriptor {

	for _, d := range self.Descriptors {
		if d.Usage == DescriptorUsage_RowType {
			return d
		}
	}

	return nil
}

func (self *FileDescriptor) Add(def *Descriptor) bool {

	if _, ok := self.DescriptorByName[def.Name]; ok {

		return false
		//panic("duplicate buildin type")
	}

	// Descriptor会在每个表对应的FileDescriptor中和CombineFileDescriptor中同时存在
	// 这里忽略CombineFileDescriptor, 保持原有文件类型
	if def.File == nil {
		def.File = self
	}

	self.Descriptors = append(self.Descriptors, def)
	self.DescriptorByName[def.Name] = def

	return true
}

func NewFileDescriptor() *FileDescriptor {
	return &FileDescriptor{
		DescriptorByName: make(map[string]*Descriptor),
		Pragma:           NewMetaInfo(),
	}
}


text:
@article{wang2017experimental,
 author = {Wang, Xin-Sheng and Chen, Bin and Wang, Rui and Xin, Hui and Zhou, Zhi-Fu},
 journal = {International Journal of Heat and Mass Transfer},
 pages = {524--536},
 publisher = {Elsevier},
 title = {Experimental study on the relation between internal flow and flashing spray characteristics of R134a using straight tube nozzles},
 volume = {115},
 year = {2017}
}

repository: xinshengwang/academic-kickstart

repo_name: xinshengwang/academic-kickstart


text:
SUMMARY = "WIFI HAL for RDK CCSP components"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://../../LICENSE;md5=cc44d3d0bd3fb4f1a5b6f235c8c326c0"

PROVIDES = "hal-wifi"
RPROVIDES_${PN} = "hal-wifi"

inherit autotools coverity

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

SRC_URI = "${CMF_GITHUB_ROOT}/rdkb-turris-hal;protocol=${CMF_GIT_PROTOCOL};branch=${CMF_GITHUB_MASTER_BRANCH};name=wifihal"
SRCREV_wifihal = "${AUTOREV}"
SRCREV_FORMAT = "wifihal"

PV = "${RDK_RELEASE}+git${SRCPV}"
S = "${WORKDIR}/git/source/wifi/"

DEPENDS += "halinterface libnl libev hostapd wpa-supplicant"
CFLAGS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'extender', '-D_TURRIS_EXTENDER_', '', d)}"
CFLAGS_append = " -I=${includedir}/ccsp -I=${includedir}/libnl3"
LDFLAGS_append = " -lnl-nf-3 -lnl-route-3 -lnl-3 -lnl-xfrm-3 -lnl-genl-3 -lev -lwpa_client"

RDEPENDS_${PN}_dunfell += " wpa-supplicant"
RDEPENDS_${PN} += "wpa-supplicant"

repository: sugasinivelusamy/meta-turris

repo_name: sugasinivelusamy/meta-turris


text:
@article{caren_black_2023,
 abstract = {Can protest influence elections? We examine whether Black Lives Matters (BLM) protest during the summer of 2020 shaped the November presidential election. We hypothesize that BLM demonstrations are associated with increased voting for the Democratic candidate. We examine a secondary hypothesis that more contentious events (with arrests, injury, or violence) are likely to produce a negative impact. We use data collected from news media, official election returns, and survey data combined with demographic and political control measures to test our hypotheses. We find strong evidence that BLM protests were associated an increased likelihood of voting for the Democratic candidate, with this effect concentrated among the less contentious protest events. Our findings bolster and extend the emerging theoretical claims and evidence that protest plays a substantial role in shaping electoral behavior.},
 author = {Caren, Neal and Andrews, Kenneth T. and Nelson, Micah H.},
 doi = {10.1080/14742837.2023.2216652},
 file = {Caren et al. - 2023 - Black lives matter protests and the 2020 President.pdf:/Users/nealcaren/Zotero/storage/MC2YQIGL/Caren et al. - 2023 - Black lives matter protests and the 2020 President.pdf:application/pdf},
 issn = {1474-2837},
 journal = {Social Movement Studies},
 keywords = {2020 US election, black lives matter, Elections, movement consequences, protest},
 month = {May},
 note = {Publisher: Routledge
_eprint: https://doi.org/10.1080/14742837.2023.2216652},
 number = {0},
 pages = {1--18},
 title = {Black lives matter protests and the 2020 Presidential election},
 url = {https://doi.org/10.1080/14742837.2023.2216652},
 urldate = {2023-06-01},
 volume = {0},
 year = {2023}
}

repository: nealcaren/academic-kickstart

repo_name: nealcaren/academic-kickstart


text:
@misc{Luger2021,
  author       = {{Luger}, Rodrigo},
  title        = {showyourwork},
  year         = {2021},
  publisher    = {GitHub},
  journal      = {GitHub repository},
  howpublished = {\url{https://github.com/rodluger/showyourwork}},
  commit       = {main}
}

@article{Astropy2013,
  author  = {{Astropy Collaboration} and {Robitaille}, T.~P. and {Tollerud},
             E.~J. and {Greenfield}, P. and {Droettboom}, M. and {Bray}, E. and
             {Aldcroft}, T. and {Davis}, M. and {Ginsburg}, A. and
             {Price-Whelan}, A.~M. and {Kerzendorf}, W.~E. and {Conley}, A. and
             {Crighton}, N. and {Barbary}, K. and {Muna}, D. and {Ferguson}, H.
             and {Grollier}, F. and {Parikh}, M.~M. and {Nair}, P.~H. and
             {Unther}, H.~M. and {Deil}, C. and {Woillez}, J. and {Conseil}, S.
             and {Kramer}, R. and {Turner}, J.~E.~H. and {Singer}, L. and
             {Fox}, R. and {Weaver}, B.~A. and {Zabalza}, V. and {Edwards},
             Z.~I. and {Azalee Bostroem}, K. and {Burke}, D.~J. and {Casey},
             A.~R. and {Crawford}, S.~M. and {Dencheva}, N. and {Ely}, J. and
             {Jenness}, T. and {Labrie}, K. and {Lim}, P.~L. and
             {Pierfederici}, F. and {Pontzen}, A. and {Ptak}, A. and {Refsdal},
             B. and {Servillat}, M. and {Streicher}, O.},
  title   = {{Astropy: A community Python package for astronomy}},
  journal = {\aap},
  year    = 2013,
  month   = oct,
  volume  = 558,
  pages   = {A33},
  doi     = {10.1051/0004-6361/201322068},
  adsurl  = {http://adsabs.harvard.edu/abs/2013A%26A...558A..33A},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@article{Astropy2018,
  author  = {{Astropy Collaboration} and {Price-Whelan}, A.~M. and
             {Sip{\H o}cz}, B.~M. and {G{\"u}nther}, H.~M. and {Lim}, P.~L. and
             {Crawford}, S.~M. and {Conseil}, S. and {Shupe}, D.~L. and
             {Craig}, M.~W. and {Dencheva}, N. and {Ginsburg}, A. and
             {VanderPlas}, J.~T. and {Bradley}, L.~D. and
             {P{\'e}rez-Su{\'a}rez}, D. and {de Val-Borro}, M.
             and {Aldcroft}, T.~L. and {Cruz}, K.~L. and {Robitaille}, T.~P.
             and {Tollerud}, E.~J. and {Ardelean}, C. and {Babej}, T. and
             {Bach}, Y.~P. and {Bachetti}, M. and {Bakanov}, A.~V. and
             {Bamford}, S.~P. and {Barentsen}, G. and {Barmby}, P. and
             {Baumbach}, A. and {Berry}, K.~L.  and {Biscani}, F. and
             {Boquien}, M. and {Bostroem}, K.~A. and {Bouma}, L.~G. and
             {Brammer}, G.~B. and {Bray}, E.~M. and {Breytenbach}, H. and
             {Buddelmeijer}, H. and {Burke}, D.~J. and {Calderone}, G. and
             {Cano Rodr{\'{\i}}guez}, J.~L. and {Cara}, M. and {Cardoso},
             J.~V.~M. and {Cheedella}, S. and {Copin}, Y. and {Corrales}, L.
             and {Crichton}, D. and {D'Avella}, D. and {Deil}, C. and
             {Depagne}, {\'E}. and {Dietrich}, J.~P. and {Donath}, A. and
             {Droettboom}, M. and {Earl}, N. and {Erben}, T. and {Fabbro}, S.
             and {Ferreira}, L.~A. and {Finethy}, T. and {Fox}, R.~T. and
             {Garrison}, L.~H. and {Gibbons}, S.~L.~J. and {Goldstein}, D.~A.
             and {Gommers}, R. and {Greco}, J.~P. and {Greenfield}, P. and
             {Groener}, A.~M. and {Grollier}, F. and {Hagen}, A. and {Hirst},
             P. and {Homeier}, D. and {Horton}, A.~J. and {Hosseinzadeh}, G.
             and {Hu}, L. and {Hunkeler}, J.~S. and {Ivezi{\'c}}, {\v Z}. and
             {Jain}, A. and {Jenness}, T. and {Kanarek}, G. and {Kendrew}, S.
             and {Kern}, N.~S. and {Kerzendorf}, W.~E. and {Khvalko}, A. and
             {King}, J. and {Kirkby}, D. and {Kulkarni}, A.~M. and {Kumar}, A.
             and {Lee}, A.  and {Lenz}, D.  and {Littlefair}, S.~P. and {Ma},
             Z. and {Macleod}, D.~M. and {Mastropietro}, M. and {McCully}, C.
             and {Montagnac}, S. and {Morris}, B.~M. and {Mueller}, M. and
             {Mumford}, S.~J. and {Muna}, D. and {Murphy}, N.~A. and {Nelson},
             S. and {Nguyen}, G.~H. and {Ninan}, J.~P. and {N{\"o}the}, M. and
             {Ogaz}, S. and {Oh}, S. and {Parejko}, J.~K.  and {Parley}, N. and
             {Pascual}, S. and {Patil}, R. and {Patil}, A.~A.  and {Plunkett},
             A.~L. and {Prochaska}, J.~X. and {Rastogi}, T. and {Reddy Janga},
             V. and {Sabater}, J.  and {Sakurikar}, P. and {Seifert}, M. and
             {Sherbert}, L.~E. and {Sherwood-Taylor}, H. and {Shih}, A.~Y. and
             {Sick}, J. and {Silbiger}, M.~T. and {Singanamalla}, S. and
             {Singer}, L.~P. and {Sladen}, P.~H. and {Sooley}, K.~A. and
             {Sornarajah}, S. and {Streicher}, O. and {Teuben}, P. and
             {Thomas}, S.~W. and {Tremblay}, G.~R. and {Turner}, J.~E.~H. and
             {Terr{\'o}n}, V.  and {van Kerkwijk}, M.~H. and {de la Vega}, A.
             and {Watkins}, L.~L. and {Weaver}, B.~A. and {Whitmore}, J.~B. and
             {Woillez}, J.  and {Zabalza}, V. and {Astropy Contributors}},
  title   = {{The Astropy Project: Building an Open-science Project and Status
              of the v2.0 Core Package}},
  journal = {\aj},
  year    = 2018,
  month   = sep,
  volume  = 156,
  pages   = {123},
  doi     = {10.3847/1538-3881/aabc4f},
  adsurl  = {http://adsabs.harvard.edu/abs/2018AJ....156..123A},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@software{Bradbury2018,
  author  = {James Bradbury and Roy Frostig and Peter Hawkins and Matthew James Johnson and Chris Leary and Dougal Maclaurin and George Necula and Adam Paszke and Jake Vander{P}las and Skye Wanderman-{M}ilne and Qiao Zhang},
  title   = {{JAX}: composable transformations of {P}ython+{N}um{P}y programs},
  url     = {http://github.com/google/jax},
  version = {0.2.9},
  year    = {2018}
}

@article{Harris2020,
  title     = {Array programming with {NumPy}},
  author    = {Charles R. Harris and K. Jarrod Millman and St{'{e}}fan J.
                 van der Walt and Ralf Gommers and Pauli Virtanen and David
                 Cournapeau and Eric Wieser and Julian Taylor and Sebastian
                 Berg and Nathaniel J. Smith and Robert Kern and Matti Picus
                 and Stephan Hoyer and Marten H. van Kerkwijk and Matthew
                 Brett and Allan Haldane and Jaime Fern{'{a}}ndez del
                 R{'{\i}}o and Mark Wiebe and Pearu Peterson and Pierre
                 G{'{e}}rard-Marchant and Kevin Sheppard and Tyler Reddy and
                 Warren Weckesser and Hameer Abbasi and Christoph Gohlke and
                 Travis E. Oliphant},
  year      = {2020},
  month     = sep,
  journal   = {Nature},
  volume    = {585},
  number    = {7825},
  pages     = {357--362},
  doi       = {10.1038/s41586-020-2649-2},
  publisher = {Springer Science and Business Media {LLC}},
  url       = {https://doi.org/10.1038/s41586-020-2649-2}
}

@article{Hunter2007,
  author    = {Hunter, J. D.},
  title     = {Matplotlib: A 2D graphics environment},
  journal   = {Computing in Science \& Engineering},
  volume    = {9},
  number    = {3},
  pages     = {90--95},
  abstract  = {Matplotlib is a 2D graphics package used for Python for
  application development, interactive scripting, and publication-quality
  image generation across user interfaces and operating systems.},
  publisher = {IEEE COMPUTER SOC},
  doi       = {10.1109/MCSE.2007.55},
  year      = 2007
}

@article{Virtanen2020,
  author  = {Virtanen, Pauli and Gommers, Ralf and Oliphant, Travis E. and
            Haberland, Matt and Reddy, Tyler and Cournapeau, David and
            Burovski, Evgeni and Peterson, Pearu and Weckesser, Warren and
            Bright, Jonathan and {van der Walt}, St{\'e}fan J. and
            Brett, Matthew and Wilson, Joshua and Millman, K. Jarrod and
            Mayorov, Nikolay and Nelson, Andrew R. J. and Jones, Eric and
            Kern, Robert and Larson, Eric and Carey, C J and
            Polat, {\.I}lhan and Feng, Yu and Moore, Eric W. and
            {VanderPlas}, Jake and Laxalde, Denis and Perktold, Josef and
            Cimrman, Robert and Henriksen, Ian and Quintero, E. A. and
            Harris, Charles R. and Archibald, Anne M. and
            Ribeiro, Ant{\^o}nio H. and Pedregosa, Fabian and
            {van Mulbregt}, Paul and {SciPy 1.0 Contributors}},
  title   = {{{SciPy} 1.0: Fundamental Algorithms for Scientific
            Computing in Python}},
  journal = {Nature Methods},
  year    = {2020},
  volume  = {17},
  pages   = {261--272},
  adsurl  = {https://rdcu.be/b08Wh},
  doi     = {10.1038/s41592-019-0686-2}
}

@article{Katz19,
  author        = {{Katz}, D. and {Sartoretti}, P. and {Cropper}, M. and {Panuzzo}, P. and {Seabroke}, G.~M. and {Viala}, Y. and {Benson}, K. and {Blomme}, R. and {Jasniewicz}, G. and {Jean-Antoine}, A. and {Huckle}, H. and {Smith}, M. and {Baker}, S. and {Crifo}, F. and {Damerdji}, Y. and {David}, M. and {Dolding}, C. and {Fr{\'e}mat}, Y. and {Gosset}, E. and {Guerrier}, A. and {Guy}, L.~P. and {Haigron}, R. and {Jan{\ss}en}, K. and {Marchal}, O. and {Plum}, G. and {Soubiran}, C. and {Th{\'e}venin}, F. and {Ajaj}, M. and {Allende Prieto}, C. and {Babusiaux}, C. and {Boudreault}, S. and {Chemin}, L. and {Delle Luche}, C. and {Fabre}, C. and {Gueguen}, A. and {Hambly}, N.~C. and {Lasne}, Y. and {Meynadier}, F. and {Pailler}, F. and {Panem}, C. and {Royer}, F. and {Tauran}, G. and {Zurbach}, C. and {Zwitter}, T. and {Arenou}, F. and {Bossini}, D. and {Gerssen}, J. and {G{\'o}mez}, A. and {Lemaitre}, V. and {Leclerc}, N. and {Morel}, T. and {Munari}, U. and {Turon}, C. and {Vallenari}, A. and {{\v{Z}}erjal}, M.},
  title         = {{Gaia Data Release 2. Properties and validation of the radial velocities}},
  journal       = {\aap},
  keywords      = {techniques: spectroscopic, techniques: radial velocities, catalogs, surveys, Astrophysics - Instrumentation and Methods for Astrophysics},
  year          = 2019,
  month         = feb,
  volume        = {622},
  eid           = {A205},
  pages         = {A205},
  doi           = {10.1051/0004-6361/201833273},
  archiveprefix = {arXiv},
  eprint        = {1804.09372},
  primaryclass  = {astro-ph.IM},
  adsurl        = {https://ui.adsabs.harvard.edu/abs/2019A&A...622A.205K},
  adsnote       = {Provided by the SAO/NASA Astrophysics Data System}
}

repository: rodluger/paper

repo_name: rodluger/paper