text:
DESCRIPTION = "An image that includes EGT with its demo applications"
LICENSE = "MIT"
PR = "r0"

IMAGE_FEATURES += "ssh-server-openssh package-management"

IMAGE_INSTALL += "\
	packagegroup-core-boot \
	packagegroup-core-full-cmdline \
	packagegroup-base-wifi \
	packagegroup-base-bluetooth \
	packagegroup-base-usbhost \
	packagegroup-base-usbgadget \
	openssh-sftp \
	openssh-sftp-server \
	kernel-modules \
	lrzsz \
	setserial \
	opkg \
	iperf3 \
	\
	nbench-byte \
	lmbench \
	\
	linux-firmware-ralink \
	linux-firmware-ath6k \
	mchp-wireless-firmware \
	\
	alsa-utils \
	mpg123 \
	i2c-tools \
	devmem2 \
	libgpiod-tools \
	dosfstools \
	libdrm-tests \
	mtd-utils \
	mtd-utils-ubifs \
	dtc \
	dtc-misc \
	iproute2 \
	iptables \
	bridge-utils \
	can-utils \
	python3-pyserial \
	python3-smbus \
	python3-ctypes \
	python3-pip \
	mpio \
	gdb \
	evtest \
	mxt-app \
	usbutils \
	wget \
	dpkg-start-stop \
	${CORE_IMAGE_BASE_INSTALL} \
	\
	cjson \
	lua \
	libplanes \
	\
	libicui18n \
	gstreamer1.0 \
	gstreamer1.0-plugins-bad-meta \
	gstreamer1.0-plugins-base-meta \
	gstreamer1.0-plugins-good-meta \
	gstreamer1.0-plugins-ugly-meta \
	gstreamer1.0-libav \
	libv4l \
	v4l-utils \
	fswebcam \
	ffmpeg \
	\
	liberation-fonts \
	mchp-egt-demo-init \
	hostapd \
	9bit \
	rng-tools \
	bluez5 \
	wireless-regdb-static \
	libdrm \
	net-tools \
	nftables \
	phytool \
	tcpdump \
	kea \
        ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'libegt egt-launcher egt-samples egt-samples-contribution egt-media egt-thermostat egt-benchmark', '', d)} \
	noto-fonts \
	lohit-fonts \
	rsync \
	linuxptp \
"

IMAGE_INSTALL:append:at91sam9m10g45 = " \
	tslib tslib-conf tslib-tests tslib-calibrate "

IMAGE_INSTALL:append:at91sam9rl = " \
	tslib tslib-conf tslib-tests tslib-calibrate "

IMAGE_INSTALL:append:at91sam9x5 = " \
	tslib tslib-conf tslib-tests tslib-calibrate "

IMAGE_INSTALL:append:at91sam9rl = " \
	tslib tslib-conf tslib-tests tslib-calibrate "

IMAGE_INSTALL:append:at91sam9x5 = " \
	tslib tslib-conf tslib-tests tslib-calibrate "

IMAGE_INSTALL:append:sam9x60 = " \
	hostapd \
	bonnie++ \
	libm2d "

# packages needed for greengrass with ECC608
IMAGE_INSTALL:append:sama5d2 = " cryptoauthlib python3-cryptoauthlib p11-kit"
IMAGE_INSTALL:append:sama7 = " cryptoauthlib python3-cryptoauthlib p11-kit"

IMAGE_INSTALL:append:sama5d4 = " \
	gstreamer1.0-plugins-hantro \
	g1-decoder \
	"

IMAGE_INSTALL:append:sama5d2-ptc-ek = " ptc-examples"
IMAGE_INSTALL:append:sama5d2-ptc-ek-sd = " ptc-examples"

IMAGE_INSTALL:append:sama5d27-wlsom1-ek-sd = " ptc-examples"

IMAGE_INSTALL:append:sama5d2 = " video-capture-at91 \
				libv4l v4l-utils media-ctl yavta \
				"

inherit core-image siteinfo

TOOLCHAIN_HOST_TASK += "nativesdk-swig"

# Required dependencies to build EGT with the SDK.
TOOLCHAIN_TARGET_TASK += " \
    lua-dev \
    lua-staticdev \
    libstdc++-dev \
    "
IMAGE_INSTALL:append:sama5d27-som1-ek-optee-sd = " optee-os optee-test optee-examples"

branch_name: refs/heads/kirkstone

gha_language: BitBake


text:
package controller

import (
	"fmt"
	"net/http"
	"os"
	"strings"
	"time"

	"github.com/gorilla/websocket"
	"github.com/sysu-go-online/service-end/model"
	"github.com/sysu-go-online/service-end/types"
)

// WebSocketTermHandler is a middle way handler to connect web app with docker service
func WebSocketTermHandler(w http.ResponseWriter, r *http.Request) {
	ws, err := websocket.Upgrade(w, r, nil, 1024, 1024)
	// Set TextMessage as default
	msgType := websocket.TextMessage
	clientMsg := make(chan RequestCommand)
	if err != nil {
		fmt.Println(err)
		return
	}
	defer ws.Close()

	// Open a goroutine to receive message from client connection
	go readFromClient(clientMsg, ws)

	// keep connection
	go func() {
		for {
			timer := time.NewTimer(time.Second * 2)
			<-timer.C
			err := ws.WriteControl(websocket.PingMessage, []byte("ping"), time.Time{})
			if err != nil {
				timer.Stop()
				return
			}
		}
	}()

	// Handle messages from the channel
	isFirst := true
	var sConn *websocket.Conn
	for msg := range clientMsg {
		conn := handlerClientTTYMsg(&isFirst, ws, sConn, msgType, &msg)
		sConn = conn
	}
	if sConn != nil {
		sConn.Close()
	}
}

// HandlerClientMsg handle message from client and send it to docker service
func handlerClientTTYMsg(isFirst *bool, ws *websocket.Conn, sConn *websocket.Conn, msgType int, connectContext *RequestCommand) (conn *websocket.Conn) {
	r := &TTYResponse{}
	var mapping *types.PortMapping
	mapping = nil
	if *isFirst {
		// check token
		ok, username := GetUserNameFromToken(connectContext.JWT)
		connectContext.username = username
		if !ok {
			fmt.Fprintln(os.Stderr, "Can not get user token information")
			r.Type = "error"
			r.Msg = "Invalid token"
			ws.WriteJSON(r)
			ws.Close()
			conn = nil
			return
		}

		// Get project information
		session := MysqlEngine.NewSession()
		u := model.User{Username: username}
		ok, err := u.GetWithUsername(session)
		if !ok {
			fmt.Fprintln(os.Stderr, "Can not get user information")
			r.Type = "error"
			r.Msg = "Invalid user information"
			ws.WriteJSON(r)
			ws.Close()
			conn = nil
			return
		}
		if err != nil {
			fmt.Fprintln(os.Stderr, err)
			r.Type = "error"
			r.Msg = err.Error()
			ws.WriteJSON(r)
			ws.Close()
			conn = nil
			return
		}
		p := model.Project{Name: connectContext.Project, UserID: u.ID}
		has, err := p.GetWithUserIDAndName(session)
		if !has {
			fmt.Fprintln(os.Stderr, "Can not get project information")
			r.Type = "error"
			r.Msg = "Can not get project information"
			ws.WriteJSON(r)
			ws.Close()
			conn = nil
			return
		}
		if err != nil {
			fmt.Fprintln(os.Stderr, err)
			r.Type = "error"
			r.Msg = err.Error()
			ws.WriteJSON(r)
			ws.Close()
			conn = nil
			return
		}
		connectContext.projectType = p.Language

		// Check if the command is system command
		command := strings.Split(connectContext.Command, " ")
		if len(command) <= 0 {
			fmt.Fprintln(os.Stderr, "Can not parse command")
			r.Type = "error"
			r.Msg = "invalid command"
			ws.WriteJSON(r)
			ws.Close()
			conn = nil
			return
		}
		if command[0] == "go-online" {
			mapping = &types.PortMapping{}
			// parse command
			mapping, err = ParseSystemCommand(command)
			if err != nil {
				fmt.Fprintln(os.Stderr, err)
				r.Type = "error"
				r.Msg = err.Error()
				ws.WriteJSON(r)
				ws.Close()
				conn = nil
				return
			}
			connectContext.Command = mapping.Command
		}

		tmp, err := initDockerConnection("tty")
		sConn = tmp
		if err != nil {
			fmt.Println("Can not connect to the docker service")
			r.Type = "error"
			r.Msg = "Server error"
			ws.WriteJSON(r)
			ws.Close()
		}
		// Listen message from docker service and send to client connection
		go sendTTYMsgToClient(ws, sConn, mapping)
	}

	if sConn == nil {
		fmt.Fprintf(os.Stderr, "Invalid command.")
		ws.WriteMessage(msgType, []byte("Invalid Command"))
		ws.Close()
		conn = nil
		return
	}

	// Send message to docker service
	handleTTYMessage(msgType, sConn, *isFirst, connectContext, mapping)
	*isFirst = false
	conn = sConn
	return
}

// SendMsgToClient send message to client
func sendTTYMsgToClient(cConn *websocket.Conn, sConn *websocket.Conn, mapping *types.PortMapping) {
	type dockerMsg struct {
		Msg  string `json:"msg"`
		ID   string `json:"id"`
		Type string `json:"type"`
	}
	for {
		msg := &dockerMsg{}
		err := sConn.ReadJSON(msg)
		r := &TTYResponse{}
		if err != nil {
			fmt.Println(err)
			// Server closed connection
			cConn.Close()
			return
		}
		// register for the first time
		if mapping != nil {
			err := RegisterPortAndDomainInfo(mapping, msg.ID)
			if err != nil {
				fmt.Println(err)
				r.Type = "error"
				r.Msg = err.Error()
				cConn.WriteJSON(r)
			}
			DOMAINNAME := os.Getenv("DOMAIN_NAME")
			if len(DOMAINNAME) != 0 {
				DOMAINNAME = "." + DOMAINNAME
			} else {
				DOMAINNAME = ".localhost"
			}
			r.Type = "dname"
			r.Msg = mapping.DomainName + DOMAINNAME
			cConn.WriteJSON(r)
			mapping = nil
		}
		r.Type = "tty"
		r.Msg = msg.Msg
		cConn.WriteJSON(r)
	}
}

// HandleMessage decide different operation according to the given json message
func handleTTYMessage(mType int, conn *websocket.Conn, isFirst bool, connectContext *RequestCommand, mapping *types.PortMapping) error {
	var workSpace *Command
	var err error
	if isFirst {
		projectName := connectContext.Project
		username := connectContext.username
		pwd := getPwd(projectName, username, connectContext.projectType)
		env := getEnv(projectName, username, connectContext.projectType)
		workSpace = &Command{
			Command:     connectContext.Command,
			PWD:         pwd,
			ENV:         env,
			UserName:    username,
			ProjectName: projectName,
			Type:        "tty",
		}
		if mapping != nil {
			workSpace.Ports = []int{mapping.Port}
		}
		fmt.Println(workSpace.ENV)
	}

	// Send message
	if isFirst {
		err = conn.WriteJSON(*workSpace)
	} else {
		err = conn.WriteJSON(connectContext)
	}
	if err != nil {
		return err
	}
	return nil
}

// RegisterPortAndDomainInfo register port
func RegisterPortAndDomainInfo(mapping *types.PortMapping, containerName string) error {
	CONSULADDRESS := os.Getenv("CONSUL_ADDRESS")
	if len(CONSULADDRESS) == 0 {
		CONSULADDRESS = "localhost"
	}
	CONSULPORT := os.Getenv("CONSUL_PORT")
	if len(CONSULPORT) == 0 {
		CONSULPORT = "8500"
	}
	if CONSULPORT[0] != ':' {
		CONSULPORT = ":" + CONSULPORT
	}

	url := "http://" + CONSULADDRESS + CONSULPORT + "/v1/kv/upstreams/"
	err := model.AddDomainName(mapping.DomainName, DomainNameRedisClient)
	if err != nil {
		return err
	}
	DOMAINNAME := os.Getenv("DOMAIN_NAME")
	if len(DOMAINNAME) != 0 {
		DOMAINNAME = "." + DOMAINNAME
	}
	req := model.RegisterConsulParam{
		Key:   mapping.DomainName,
		Value: fmt.Sprintf("%s:%d", containerName[0:12], mapping.Port),
	}
	return req.RegisterToConsul(url)
}

repository: sysu-go-online/service-end

license_type: permissive

repo_name: sysu-go-online/service-end

branch_name: refs/heads/master

extension: go


text:
package main

import (
	"fmt"
	"time"

	jsoniter "github.com/json-iterator/go"

	"github.com/ynqa/jsoniterx"
)

type Example struct {
	Time time.Time `json:"time" format:"2006-01-02 15:04:05" location:"Asia/Tokyo"`
}

func main() {
	json := jsoniter.ConfigCompatibleWithStandardLibrary
	json.RegisterExtension(jsoniterx.TimePlugin())

	var e Example
	str := `{"time": "2019-01-01 12:00:00"}`
	if err := json.Unmarshal([]byte(str), &e); err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(e.Time)
}

license: MIT

repository: ynqa/jsoniterx

repo_name: ynqa/jsoniterx


text:
package train

import (
    "encoding/xml"

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

/*
退票通知 APIResponse
taobao.train.agent.returnticket.confirm.vtwo

火车票代理商接口——退票通知回调
*/
type TaobaoTrainAgentReturnticketConfirmVtwoAPIResponse struct {
    model.CommonResponse
    TaobaoTrainAgentReturnticketConfirmVtwoResponse
}

type TaobaoTrainAgentReturnticketConfirmVtwoResponse struct {
    XMLName xml.Name `xml:"train_agent_returnticket_confirm_vtwo_response"`
	RequestId     string         `json:"request_id,omitempty" xml:"request_id,omitempty"`         // 平台颁发的每次请求访问的唯一标识

    // resultCode

    ResultCode   string `json:"result_code,omitempty" xml:"result_code,omitempty"`

    // success

    IsSuccess   bool `json:"is_success,omitempty" xml:"is_success,omitempty"`

    // resultMsg

    ResultMsg   string `json:"result_msg,omitempty" xml:"result_msg,omitempty"`

}

repository: phpyandong/opentaobao

repo_name: phpyandong/opentaobao

branch_name: refs/heads/main


text:
% Encoding: UTF-8

@article{novere_systems_2009,
  author    = {Novère, Nicolas Le and Hucka, Michael and Mi, Huaiyu and Moodie, Stuart and Schreiber, Falk and Sorokin, Anatoly and Demir, Emek and Wegner, Katja and Aladjem, Mirit I and Wimalaratne, Sarala M and Bergman, Frank T and Gauges, Ralph and Ghazal, Peter and Kawaji, Hideya and Li, Lu and Matsuoka, Yukiko and Villéger, Alice and Boyd, Sarah E and Calzone, Laurence and Courtot, Melanie and Dogrusoz, Ugur and Freeman, Tom C and Funahashi, Akira and Ghosh, Samik and Jouraku, Akiya and Kim, Sohyoung and Kolpakov, Fedor and Luna, Augustin and Sahle, Sven and Schmidt, Esther and Watterson, Steven and Wu, Guanming and Goryanin, Igor and Kell, Douglas B and Sander, Chris and Sauro, Herbert and Snoep, Jacky L and Kohn, Kurt and Kitano, Hiroaki},
  journal   = {Nature Biotechnology},
  title     = {The {Systems} {Biology} {Graphical} {Notation}},
  year      = {2009},
  issn      = {1087-0156, 1546-1696},
  month     = {aug},
  number    = {8},
  pages     = {735--741},
  volume    = {27},
  doi       = {10.1038/nbt.1558},
  language  = {en},
  publisher = {Springer Science and Business Media {LLC}},
  url       = {http://www.nature.com/articles/nbt.1558},
  urldate   = {2021-06-17},
}

@article{scholzel_characteristics_2021,
	title = {Characteristics of mathematical modeling languages that facilitate model reuse in systems biology: a software engineering perspective},
	volume = {7},
	issn = {2056-7189},
	shorttitle = {Characteristics of mathematical modeling languages that facilitate model reuse in systems biology},
	url = {http://www.nature.com/articles/s41540-021-00182-w},
	doi = {10.1038/s41540-021-00182-w},
	abstract = {Abstract
            Reuse of mathematical models becomes increasingly important in systems biology as research moves toward large, multi-scale models composed of heterogeneous subcomponents. Currently, many models are not easily reusable due to inflexible or confusing code, inappropriate languages, or insufficient documentation. Best practice suggestions rarely cover such low-level design aspects. This gap could be filled by software engineering, which addresses those same issues for software reuse. We show that languages can facilitate reusability by being modular, human-readable, hybrid (i.e., supporting multiple formalisms), open, declarative, and by supporting the graphical representation of models. Modelers should not only use such a language, but be aware of the features that make it desirable and know how to apply them effectively. For this reason, we compare existing suitable languages in detail and demonstrate their benefits for a modular model of the human cardiac conduction system written in Modelica.},
	language = {en},
	number = {1},
	urldate = {2021-06-17},
	journal = {npj Systems Biology and Applications},
	author = {Schölzel, Christopher and Blesius, Valeria and Ernst, Gernot and Dominik, Andreas},
	month = dec,
	year = {2021},
	pages = {27},
	file = {Full Text:/Users/tania/Zotero/storage/37WL5RL2/Schölzel et al. - 2021 - Characteristics of mathematical modeling languages.pdf:application/pdf},
}

@article{bachmann_division_2011,
  author    = {Bachmann, Julie and Raue, Andreas and Schilling, Marcel and Böhm, Martin E and Kreutz, Clemens and Kaschek, Daniel and Busch, Hauke and Gretz, Norbert and Lehmann, Wolf D and Timmer, Jens and Klingmüller, Ursula},
  journal   = {Molecular Systems Biology},
  title     = {Division of labor by dual feedback regulators controls {JAK2}/{STAT5} signaling over broad ligand range},
  year      = {2011},
  issn      = {1744-4292, 1744-4292},
  month     = {jan},
  number    = {1},
  pages     = {516},
  volume    = {7},
  doi       = {10.1038/msb.2011.50},
  file      = {Full Text:/Users/tania/Zotero/storage/79GMRUQX/Bachmann et al. - 2011 - Division of labor by dual feedback regulators cont.pdf:application/pdf},
  language  = {en},
  publisher = {{EMBO}},
  url       = {https://onlinelibrary.wiley.com/doi/10.1038/msb.2011.50},
  urldate   = {2021-06-17},
}

@article{toure_quick_2018,
  author    = {Touré, Vasundra and Le Novère, Nicolas and Waltemath, Dagmar and Wolkenhauer, Olaf},
  journal   = {{PLOS} Computational Biology},
  title     = {Quick tips for creating effective and impactful biological pathways using the {Systems} {Biology} {Graphical} {Notation}},
  year      = {2018},
  issn      = {1553-7358},
  month     = {feb},
  number    = {2},
  pages     = {e1005740},
  volume    = {14},
  doi       = {10.1371/journal.pcbi.1005740},
  editor    = {Ouellette, Francis},
  file      = {Full Text:/Users/tania/Zotero/storage/9YVURTSI/Touré et al. - 2018 - Quick tips for creating effective and impactful bi.pdf:application/pdf},
  language  = {en},
  publisher = {Public Library of Science ({PLoS})},
  url       = {https://dx.plos.org/10.1371/journal.pcbi.1005740},
  urldate   = {2021-06-19},
}

@article{rougny_systems_2019,
  author     = {Rougny, Adrien and Touré, Vasundra and Moodie, Stuart and Balaur, Irina and Czauderna, Tobias and Borlinghaus, Hanna and Dogrusoz, Ugur and Mazein, Alexander and Dräger, Andreas and Blinov, Michael L. and Villéger, Alice and Haw, Robin and Demir, Emek and Mi, Huaiyu and Sorokin, Anatoly and Schreiber, Falk and Luna, Augustin},
  journal    = {Journal of Integrative Bioinformatics},
  title      = {Systems {Biology} {Graphical} {Notation}: {Process} {Description} language {Level} 1 {Version} 2.0},
  year       = {2019},
  issn       = {1613-4516},
  month      = {jun},
  number     = {2},
  volume     = {16},
  abstract   = {Abstract
            The Systems Biology Graphical Notation (SBGN) is an international community effort that aims to standardise the visualisation of pathways and networks for readers with diverse scientific backgrounds as well as to support an efficient and accurate exchange of biological knowledge between disparate research communities, industry, and other players in systems biology. SBGN comprises the three languages Entity Relationship, Activity Flow, and Process Description (PD) to cover biological and biochemical systems at distinct levels of detail. PD is closest to metabolic and regulatory pathways found in biological literature and textbooks. Its well-defined semantics offer a superior precision in expressing biological knowledge. PD represents mechanistic and temporal dependencies of biological interactions and transformations as a graph. Its different types of nodes include entity pools (e.g. metabolites, proteins, genes and complexes) and processes (e.g. reactions, associations and influences). The edges describe relationships between the nodes (e.g. consumption, production, stimulation and inhibition). This document details Level 1 Version 2.0 of the PD specification, including several improvements, in particular: 1) the addition of the equivalence operator, subunit, and annotation glyphs, 2) modification to the usage of submaps, and 3) updates to clarify the use of various glyphs (i.e. multimer, empty set, and state variable).},
  doi        = {10.1515/jib-2019-0022},
  file       = {Full Text:/Users/tania/Zotero/storage/5AZ9DERF/Rougny et al. - 2019 - Systems Biology Graphical Notation Process Descri.pdf:application/pdf},
  publisher  = {Walter de Gruyter {GmbH}},
  shorttitle = {Systems {Biology} {Graphical} {Notation}},
  url        = {https://www.degruyter.com/document/doi/10.1515/jib-2019-0022/html},
  urldate    = {2021-06-19},
}

@article{sari_sbgnviz_2015,
  author     = {Sari, Mecit and Bahceci, Istemi and Dogrusoz, Ugur and Sumer, Selcuk Onur and Aksoy, Bülent Arman and Babur, Özgün and Demir, Emek},
  journal    = {PLOS ONE},
  title      = {{SBGNViz}: A Tool for Visualization and Complexity Management of {SBGN} Process Description Maps},
  year       = {2015},
  issn       = {1932-6203},
  month      = {jun},
  number     = {6},
  pages      = {e0128985},
  volume     = {10},
  doi        = {10.1371/journal.pone.0128985},
  editor     = {Provart, Nicholas James},
  file       = {Full Text:/Users/tania/Zotero/storage/5KLR8ID9/Sari et al. - 2015 - SBGNViz A Tool for Visualization and Complexity M.pdf:application/pdf},
  language   = {en},
  publisher  = {Public Library of Science ({PLoS})},
  shorttitle = {{SBGNViz}},
  url        = {https://dx.plos.org/10.1371/journal.pone.0128985},
  urldate    = {2021-06-19},
}

@article{balci_newt_2021,
  author     = {Balci, Hasan and Siper, Metin Can and Saleh, Nasim and Safarli, Ilkin and Roy, Ludovic and Kilicarslan, Merve and Ozaydin, Rumeysa and Mazein, Alexander and Auffray, Charles and Babur, Özgün and Demir, Emek and Dogrusoz, Ugur},
  journal    = {Bioinformatics},
  title      = {Newt: a comprehensive web-based tool for viewing, constructing and analyzing biological maps},
  year       = {2021},
  issn       = {1367-4803, 1460-2059},
  month      = {nov},
  number     = {10},
  pages      = {1475--1477},
  volume     = {37},
  abstract   = {Abstract

              Motivation
              Visualization of cellular processes and pathways is a key recurring requirement for effective biological data analysis. There is a considerable need for sophisticated web-based pathway viewers and editors operating with widely accepted standard formats, using the latest visualization techniques and libraries.

              Results
              We developed a web-based tool named Newt for viewing, constructing and analyzing biological maps in standard formats such as SBGN, SBML and SIF.

              Availability and implementation
              Newt’s source code is publicly available on GitHub and freely distributed under the GNU LGPL. Ample documentation on Newt can be found on http://newteditor.org and on YouTube.},
  doi        = {10.1093/bioinformatics/btaa850},
  editor     = {Jonathan, Wren},
  language   = {en},
  publisher  = {Oxford University Press ({OUP})},
  shorttitle = {Newt},
  url        = {https://academic.oup.com/bioinformatics/article/37/10/1475/5917629},
  urldate    = {2021-06-19},
}

@article{bergmann_systems_2020,
	title = {Systems biology graphical notation markup language ({SBGNML}) version 0.3},
	volume = {17},
	issn = {1613-4516},
	url = {https://www.degruyter.com/document/doi/10.1515/jib-2020-0016/html},
	doi = {10.1515/jib-2020-0016},
	abstract = {Abstract

              This document defines Version 0.3 Markup Language (ML) support for the Systems Biology Graphical Notation (SBGN), a set of three complementary visual languages developed for biochemists, modelers, and computer scientists. SBGN aims at representing networks of biochemical interactions in a standard, unambiguous way to foster efficient and accurate representation, visualization, storage, exchange, and reuse of information on all kinds of biological knowledge, from gene regulation, to metabolism, to cellular signaling. SBGN is defined neutrally to programming languages and software encoding; however, it is oriented primarily towards allowing models to be encoded using XML, the eXtensible Markup Language. The notable changes from the previous version include the addition of attributes for better specify metadata about maps, as well as support for multiple maps, sub-maps, colors, and annotations. These changes enable a more efficient exchange of data to other commonly used systems biology formats (e. g., BioPAX and SBML) and between tools supporting SBGN (e. g., CellDesigner, Newt, Krayon, SBGN-ED, STON, cd2sbgnml, and MINERVA). More details on SBGN and related software are available at
              http://sbgn.org
              . With this effort, we hope to increase the adoption of SBGN in bioinformatics tools, ultimately enabling more researchers to visualize biological knowledge in a precise and unambiguous manner.},
	language = {en},
	number = {2-3},
	urldate = {2021-06-19},
	journal = {Journal of Integrative Bioinformatics},
	author = {Bergmann, Frank T. and Czauderna, Tobias and Dogrusoz, Ugur and Rougny, Adrien and Dräger, Andreas and Touré, Vasundra and Mazein, Alexander and Blinov, Michael L. and Luna, Augustin},
	month = aug,
	year = {2020},
	pages = {20200016},
	file = {Full Text:/Users/tania/Zotero/storage/ZIBCHWYM/Bergmann et al. - 2020 - Systems biology graphical notation markup language.pdf:application/pdf},
}
@article{scharm_fully_2016,
  author    = {Martin Scharm and Dagmar Waltemath},
  journal   = {F1000Research},
  title     = {A fully featured {COMBINE} archive of a simulation study on syncytial mitotic cycles in Drosophila embryos},
  year      = {2016},
  month     = {sep},
  pages     = {2421},
  volume    = {5},
  doi       = {10.12688/f1000research.9379.1},
  publisher = {F1000 Research Ltd},
}

@article{novere_quantitative_2015,
  author    = {Nicolas Le Novère},
  journal   = {Nature Reviews Genetics},
  title     = {Quantitative and logic modelling of molecular and gene networks},
  year      = {2015},
  month     = {feb},
  number    = {3},
  pages     = {146--158},
  volume    = {16},
  doi       = {10.1038/nrg3885},
  publisher = {Springer Science and Business Media {LLC}},
}

@article{vogt_translation_2013,
  author    = {Torsten Vogt and Tobias Czauderna and Falk Schreiber},
  journal   = {{BMC} Systems Biology},
  title     = {Translation of {SBGN} maps: Process Description to Activity Flow},
  year      = {2013},
  number    = {1},
  pages     = {115},
  volume    = {7},
  doi       = {10.1186/1752-0509-7-115},
  publisher = {Springer Science and Business Media {LLC}},
}

@article{rohn_vanted_2012,
  author    = {Hendrik Rohn and Astrid Junker and Anja Hartmann and Eva Grafahrend-Belau and Hendrik Treutler and Matthias Klapperstück and Tobias Czauderna and Christian Klukas and Falk Schreiber},
  journal   = {{BMC} Systems Biology},
  title     = {{VANTED} v2: a framework for systems biology applications},
  year      = {2012},
  number    = {1},
  pages     = {139},
  volume    = {6},
  doi       = {10.1186/1752-0509-6-139},
  publisher = {Springer Science and Business Media {LLC}},
}

@article{junker_vanted_2006,
  author    = {Björn H. Junker and Christian Klukas and Falk Schreiber},
  journal   = {{BMC} Bioinformatics},
  year      = {2006},
  number    = {1},
  pages     = {109},
  volume    = {7},
  doi       = {10.1186/1471-2105-7-109},
  publisher = {Springer Science and Business Media {LLC}},
}

@article{czauderna_editing_2010,
  author    = {T. Czauderna and C. Klukas and F. Schreiber},
  journal   = {Bioinformatics},
  title     = {Editing, validating and translating of {SBGN} maps},
  year      = {2010},
  month     = {jul},
  number    = {18},
  pages     = {2340--2341},
  volume    = {26},
  doi       = {10.1093/bioinformatics/btq407},
  publisher = {Oxford University Press ({OUP})},
}

@article{rougny_qualitative_2016,
  author    = {Adrien Rougny and Christine Froidevaux and Laurence Calzone and Loic Paulevé},
  journal   = {{BMC} Systems Biology},
  title     = {Qualitative dynamics semantics for {SBGN} process description},
  year      = {2016},
  month     = {jun},
  number    = {1},
  volume    = {10},
  doi       = {10.1186/s12918-016-0285-0},
  publisher = {Springer Science and Business Media {LLC}},
}

@article{bergmann_systems_2020,
  author    = {Frank T. Bergmann and Tobias Czauderna and Ugur Dogrusoz and Adrien Rougny and Andreas Dräger and Vasundra Touré and Alexander Mazein and Michael L. Blinov and Augustin Luna},
  journal   = {Journal of Integrative Bioinformatics},
  title     = {Systems biology graphical notation markup language ({SBGNML}) version 0.3},
  year      = {2020},
  month     = {jun},
  number    = {2-3},
  volume    = {17},
  doi       = {10.1515/jib-2020-0016},
  publisher = {Walter de Gruyter {GmbH}},
}

@article{choi_tellurium_2018,
   author = {Choi, Kiri and Medley, J Kyle and Konig, Matthias and Stocking, Kaylene and Smith, Lucian and Gu, Stanley and Sauro, Herbert M},
   journal = {Biosystems},
   title = {Tellurium: An extensible python-based modeling environment for systems and synthetic biology},
   year = {2018},
   volume = {171},
   pages = {74-79},
   DOI = {10.1016/j.biosystems.2018.07.006},
   url = {https://www.ncbi.nlm.nih.gov/pubmed/30053414},
}

@article{choi_phrasedml_2016,
   author = {Choi, Kiri and Smith, Lucian P and Medley, J Kyle and Sauro, Herbert M},
   journal = {J Bioinform Comput Biol},
   title = {phraSED-ML: A paraphrased, human-readable adaptation of SED-ML},
   year = {2016},
   volume = {14},
   number = {6},
   pages = {1650035},
   DOI = {10.1142/S0219720016500359},
   url = {https://www.ncbi.nlm.nih.gov/pubmed/27774871},
}

@article{olivier_jwsonline_2004,
   author = {Olivier, Brett G and Snoep, Jacky L},
   journal = {Bioinformatics},
   title = {Web-based kinetic modelling using JWS Online},
   year = {2004},
   volume = {20},
   number = {13},
   pages = {2143-4},
   DOI = {10.1093/bioinformatics/bth200},
   url = {https://www.ncbi.nlm.nih.gov/pubmed/15072998},
}

@article{waltemath_sedml_2011,
   author = {Waltemath, Dagmar and Adams, Richard and Bergmann, Frank T and Hucka, Michael and Kolpakov, Fedor and Miller, Andrew K and Moraru, Ion I and Nickerson, David and Sahle, Sven and Snoep, Jacky L and Le Novere, Nicolas},
   journal = {BMC Syst Biol},
   title = {Reproducible computational biology experiments with SED-ML--the Simulation Experiment Description Markup Language},
   year = {2011},
   volume = {5},
   pages = {198},
   DOI = {10.1186/1752-0509-5-198},
   url = {https://www.ncbi.nlm.nih.gov/pubmed/22172142},
}

@article{iersel_software_2012,
   author = {van Iersel, Martijn P. and Villéger, Alice C. and Czauderna, Tobias and Boyd, Sarah E. and Bergmann, Frank T. and Luna, Augustin and Demir, Emek and Sorokin, Anatoly and Dogrusoz, Ugur and Matsuoka, Yukiko and Funahashi, Akira and Aladjem, Mirit I. and Mi, Huaiyu and Moodie, Stuart L. and Kitano, Hiroaki and Le Novère, Nicolas and Schreiber, Falk},
   title = "{Software support for SBGN maps: SBGN-ML and LibSBGN}",
   journal = {Bioinformatics},
   volume = {28},
   number = {15},
   pages = {2016-2021},
   year = {2012},
   month = {05},
   abstract = "{Motivation: LibSBGN is a software library for reading, writing and manipulating Systems Biology Graphical Notation (SBGN) maps stored using the recently developed SBGN-ML file format. The library (available in C++ and Java) makes it easy for developers to add SBGN support to their tools, whereas the file format facilitates the exchange of maps between compatible software applications. The library also supports validation of maps, which simplifies the task of ensuring compliance with the detailed SBGN specifications. With this effort we hope to increase the adoption of SBGN in bioinformatics tools, ultimately enabling more researchers to visualize biological knowledge in a precise and unambiguous manner.Availability and implementation: Milestone 2 was released in December 2011. Source code, example files and binaries are freely available under the terms of either the LGPL v2.1+ or Apache v2.0 open source licenses from http://libsbgn.sourceforge.net.Contact:sbgn-libsbgn@lists.sourceforge.net}",
   issn = {1367-4803},
   doi = {10.1093/bioinformatics/bts270},
   url = {https://doi.org/10.1093/bioinformatics/bts270},
   eprint = {https://academic.oup.com/bioinformatics/article-pdf/28/15/2016/646128/bts270.pdf},
}

@Comment{jabref-meta: databaseType:bibtex;}

gha_language: Component Pascal

extension: bib


text:
package spot

import (
	"reflect"
	"testing"
)

func TestBuildHardQuery(t *testing.T) {

	desc := "Passing in incorrect query param name returns error"
	expected := "HardSearch can only search for artist, track, or album. Found: song"
	params := map[string]string{
		"artist": "Billy Joel",
		"song":   "Big Shot",
	}
	url, err := BuildHardQuery(params, []string{"track"})
	if err.Error() != expected {
		fail(t, desc, expected, err.Error())
	}

	desc = "Normal search returns correct url"
	expected = "search?q=artist:mariah+carey+track:always+be+my+baby+&type=track"
	params = map[string]string{
		"artist": "Mariah Carey",
		"track":  "always be my baby",
	}
	url, _ = BuildHardQuery(params, []string{"track"})
	if url != expected {
		fail(t, desc, expected, url)
	}

	desc = "Normal search with mutltiple types returns correct url"
	expected = "search?q=artist:mariah+carey+track:always+be+my+baby+&type=track,album"
	params = map[string]string{
		"artist": "Mariah Carey",
		"track":  "always be my baby",
	}
	url, _ = BuildHardQuery(params, []string{"track", "album"})
	if url != expected {
		fail(t, desc, expected, url)
	}

	desc = "Passing in incorrect type returns error"
	expected = "HardSearch can only search by type artist, track, album, or playlist. Found: film"
	url, err = BuildHardQuery(params, []string{"film", "playlist"})
	if err.Error() != expected {
		fail(t, desc, expected, err.Error())
	}
}

func TestHardSearch(t *testing.T) {

	params := map[string]string{
		"artist": "Billy Joel",
		"track":  "Big Shot",
	}
	types := []string{"track"}

	desc := "Search for track returns SearchResult struct."
	expected := reflect.TypeOf(SearchResults{})
	results, err := HardSearch(params, types)
	if reflect.TypeOf(results) != expected {
		fail(t, desc, expected, err)
	}

	desc = "Search for track- SearchResults.TrackResults is TrackResults{}"
	expected = reflect.TypeOf(TrackResults{})
	if reflect.TypeOf(results.Tracks) != expected {
		fail(t, desc, expected, err)
	}

	//	err := godotenv.Load()
	//	if err != nil {
	//		log.Fatal("Error loading .env file")
	//	}
	//
	//	spotifyKey := os.Getenv("SPOTIFY_CLIENT_ID")
	//	spotifySecret := os.Getenv("SPOTIFY_CLIENT_SECRET")
}

repository: soolaimon/spot

repo_name: soolaimon/spot


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

package retention

import (
	"math"

	"github.com/cpmech/gosl/io"
	"github.com/cpmech/gosl/plt"
	"github.com/cpmech/gosl/utl"
)

// Plot plots retention model
//  args1 -- arguments for model computed by solving differential equation; e.g. "'b*-'"
//           if args1 == "", plot is skiped
//  args2 -- arguments for model computed by directly calling sl(pc), if available
//           if args2 == "", plot is skiped
func Plot(mdl Model, pc0, sl0, pcf float64, npts int, useLog bool, args1, args2, label string) (Pc, Sl, X []float64, err error) {

	// plot using Update
	Pc = utl.LinSpace(pc0, pcf, npts)
	Sl = make([]float64, npts)
	X = make([]float64, npts)
	X[0] = math.Log(1.0 + Pc[0])
	if args1 != "" {
		Sl[0] = sl0
		for i := 1; i < npts; i++ {
			Sl[i], err = Update(mdl, Pc[i-1], Sl[i-1], Pc[i]-Pc[i-1])
			if err != nil {
				return
			}
			if useLog {
				X[i] = math.Log(1.0 + Pc[i])
			} else {
				X[i] = Pc[i]
			}
		}
		plt.Plot(X, Sl, io.Sf("%s, label='%s', clip_on=0", args1, label))
	}

	// plot using Sl function
	if args2 != "" {
		if m, ok := mdl.(Nonrate); ok {
			Pc = utl.LinSpace(pc0, pcf, 101)
			Sl = make([]float64, 101)
			for i, pc := range Pc {
				Sl[i] = m.Sl(pc)
				if useLog {
					X[i] = math.Log(1.0 + pc)
				} else {
					X[i] = pc
				}
			}
			plt.Plot(X, Sl, io.Sf("%s, label='%s_direct', clip_on=0", args2, label))
		}
	}
	return
}

// PlotEnd ends plot and show figure, if show==true
func PlotEnd(show bool) {
	plt.AxisYrange(0, 1)
	plt.Cross("")
	plt.Gll("$p_c$", "$s_{\\ell}$", "")
	if show {
		plt.Show()
	}
}


text:
package router

import (
	"gen/controller"
	"github.com/gin-gonic/gin"
)

func RegisterRoutes(server *gin.Engine) {
	server.GET("/", controller.BaseController.Index)

	v1 := server.Group("/v1")
	articleCtrl := controller.ArticleController
	{
		v1.GET("/articles", articleCtrl.GetAll)        //所有文章
		v1.POST("/articles", articleCtrl.Create)       //添加文章
		v1.GET("/articles/:id", articleCtrl.GetById)   //文章详情
		v1.PUT("/articles/:id", articleCtrl.Update)    //修改文章
		v1.DELETE("/articles/:id", articleCtrl.Delete) //删除文章

		v1.GET("/articles/:id/comments", articleCtrl.AddComment)  //获取文章评论
		v1.POST("/articles/:id/comments", articleCtrl.AddComment) //给文章添加评论
	}
}

repository: wangbjun/gen

repo_name: wangbjun/gen

gha_language: Go


text:
// Code generated by protoc-gen-goten-go
// File: edgelq/iam/proto/v1alpha2/organization_change.proto
// DO NOT EDIT!!!

package organization

import (
	"fmt"
	"reflect"
	"sync"

	"google.golang.org/protobuf/encoding/protojson"
	"google.golang.org/protobuf/proto"
	preflect "google.golang.org/protobuf/reflect/protoreflect"
	"google.golang.org/protobuf/runtime/protoimpl"
)

// proto imports
import (
	field_mask "google.golang.org/genproto/protobuf/field_mask"
)

// Reference imports to suppress errors if they are not otherwise used.
var (
	_ = fmt.Errorf
	_ = reflect.Method{}
	_ = sync.Once{}

	_ = protojson.MarshalOptions{}
	_ = proto.MarshalOptions{}
	_ = preflect.Value{}
	_ = protoimpl.DescBuilder{}
)

// make sure we're using proto imports
var (
	_ = &field_mask.FieldMask{}
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// OrganizationChange is used by Watch notifications Responses to describe
// change of single Organization One of Added, Modified, Removed
type OrganizationChange struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields
	// Organization change
	//
	// Types that are valid to be assigned to ChangeType:
	//	*OrganizationChange_Added_
	//	*OrganizationChange_Modified_
	//	*OrganizationChange_Current_
	//	*OrganizationChange_Removed_
	ChangeType isOrganizationChange_ChangeType `protobuf_oneof:"change_type"`
}

func (m *OrganizationChange) Reset() {
	*m = OrganizationChange{}
	if protoimpl.UnsafeEnabled {
		mi := &edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes[0]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
		ms.StoreMessageInfo(mi)
	}
}

func (m *OrganizationChange) String() string {
	return protoimpl.X.MessageStringOf(m)
}

func (*OrganizationChange) ProtoMessage() {}

func (m *OrganizationChange) ProtoReflect() preflect.Message {
	mi := &edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes[0]
	if protoimpl.UnsafeEnabled && m != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(m)
}

func (*OrganizationChange) GotenMessage() {}

// Deprecated, Use OrganizationChange.ProtoReflect.Descriptor instead.
func (*OrganizationChange) Descriptor() ([]byte, []int) {
	return edgelq_iam_proto_v1alpha2_organization_change_proto_rawDescGZIP(), []int{0}
}

func (m *OrganizationChange) Unmarshal(b []byte) error {
	return proto.Unmarshal(b, m)
}

func (m *OrganizationChange) Marshal() ([]byte, error) {
	return proto.Marshal(m)
}

func (m *OrganizationChange) MarshalJSON() ([]byte, error) {
	return protojson.MarshalOptions{}.Marshal(m)
}

func (m *OrganizationChange) UnmarshalJSON(data []byte) error {
	return protojson.Unmarshal(data, m)
}

type isOrganizationChange_ChangeType interface {
	isOrganizationChange_ChangeType()
}

type OrganizationChange_Added_ struct {
	// Added is returned when watched document is added, either created or
	// enters Query view
	Added *OrganizationChange_Added `protobuf:"bytes,1,opt,name=added,proto3,oneof" firestore:"added"`
}
type OrganizationChange_Modified_ struct {
	// Modified is returned when watched document is modified
	Modified *OrganizationChange_Modified `protobuf:"bytes,2,opt,name=modified,proto3,oneof" firestore:"modified"`
}
type OrganizationChange_Current_ struct {
	// Current is returned in stateless watch when document enters query view or
	// is modified within.
	Current *OrganizationChange_Current `protobuf:"bytes,4,opt,name=current,proto3,oneof" firestore:"current"`
}
type OrganizationChange_Removed_ struct {
	// Removed is returned when Organization is deleted or leaves Query view
	Removed *OrganizationChange_Removed `protobuf:"bytes,3,opt,name=removed,proto3,oneof" firestore:"removed"`
}

func (*OrganizationChange_Added_) isOrganizationChange_ChangeType()    {}
func (*OrganizationChange_Modified_) isOrganizationChange_ChangeType() {}
func (*OrganizationChange_Current_) isOrganizationChange_ChangeType()  {}
func (*OrganizationChange_Removed_) isOrganizationChange_ChangeType()  {}
func (m *OrganizationChange) GetChangeType() isOrganizationChange_ChangeType {
	if m != nil {
		return m.ChangeType
	}
	return nil
}
func (m *OrganizationChange) GetAdded() *OrganizationChange_Added {
	if x, ok := m.GetChangeType().(*OrganizationChange_Added_); ok {
		return x.Added
	}
	return nil
}
func (m *OrganizationChange) GetModified() *OrganizationChange_Modified {
	if x, ok := m.GetChangeType().(*OrganizationChange_Modified_); ok {
		return x.Modified
	}
	return nil
}
func (m *OrganizationChange) GetCurrent() *OrganizationChange_Current {
	if x, ok := m.GetChangeType().(*OrganizationChange_Current_); ok {
		return x.Current
	}
	return nil
}
func (m *OrganizationChange) GetRemoved() *OrganizationChange_Removed {
	if x, ok := m.GetChangeType().(*OrganizationChange_Removed_); ok {
		return x.Removed
	}
	return nil
}
func (m *OrganizationChange) SetChangeType(ofv isOrganizationChange_ChangeType) {
	if m == nil {
		panic(fmt.Errorf("can't set %s on nil %s", "isOrganizationChange_ChangeType", "OrganizationChange"))
	}
	m.ChangeType = ofv
}
func (m *OrganizationChange) SetAdded(fv *OrganizationChange_Added) {
	m.SetChangeType(&OrganizationChange_Added_{Added: fv})
}
func (m *OrganizationChange) SetModified(fv *OrganizationChange_Modified) {
	m.SetChangeType(&OrganizationChange_Modified_{Modified: fv})
}
func (m *OrganizationChange) SetCurrent(fv *OrganizationChange_Current) {
	m.SetChangeType(&OrganizationChange_Current_{Current: fv})
}
func (m *OrganizationChange) SetRemoved(fv *OrganizationChange_Removed) {
	m.SetChangeType(&OrganizationChange_Removed_{Removed: fv})
}

// Organization has been added to query view
type OrganizationChange_Added struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields
	Organization  *Organization `protobuf:"bytes,1,opt,name=organization,proto3" json:"organization,omitempty" firestore:"organization"`
	// Integer describing index of added Organization in resulting query view.
	ViewIndex int32 `protobuf:"varint,2,opt,name=view_index,json=viewIndex,proto3" json:"view_index,omitempty" firestore:"viewIndex"`
}

func (m *OrganizationChange_Added) Reset() {
	*m = OrganizationChange_Added{}
	if protoimpl.UnsafeEnabled {
		mi := &edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes[1]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
		ms.StoreMessageInfo(mi)
	}
}

func (m *OrganizationChange_Added) String() string {
	return protoimpl.X.MessageStringOf(m)
}

func (*OrganizationChange_Added) ProtoMessage() {}

func (m *OrganizationChange_Added) ProtoReflect() preflect.Message {
	mi := &edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes[1]
	if protoimpl.UnsafeEnabled && m != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(m)
}

func (*OrganizationChange_Added) GotenMessage() {}

// Deprecated, Use OrganizationChange_Added.ProtoReflect.Descriptor instead.
func (*OrganizationChange_Added) Descriptor() ([]byte, []int) {
	return edgelq_iam_proto_v1alpha2_organization_change_proto_rawDescGZIP(), []int{0, 0}
}

func (m *OrganizationChange_Added) Unmarshal(b []byte) error {
	return proto.Unmarshal(b, m)
}

func (m *OrganizationChange_Added) Marshal() ([]byte, error) {
	return proto.Marshal(m)
}

func (m *OrganizationChange_Added) MarshalJSON() ([]byte, error) {
	return protojson.MarshalOptions{}.Marshal(m)
}

func (m *OrganizationChange_Added) UnmarshalJSON(data []byte) error {
	return protojson.Unmarshal(data, m)
}

func (m *OrganizationChange_Added) GetOrganization() *Organization {
	if m != nil {
		return m.Organization
	}
	return nil
}

func (m *OrganizationChange_Added) GetViewIndex() int32 {
	if m != nil {
		return m.ViewIndex
	}
	return int32(0)
}

func (m *OrganizationChange_Added) SetOrganization(fv *Organization) {
	if m == nil {
		panic(fmt.Errorf("can't set %s on nil %s", "Organization", "OrganizationChange_Added"))
	}
	m.Organization = fv
}

func (m *OrganizationChange_Added) SetViewIndex(fv int32) {
	if m == nil {
		panic(fmt.Errorf("can't set %s on nil %s", "ViewIndex", "OrganizationChange_Added"))
	}
	m.ViewIndex = fv
}

// Organization changed some of it's fields - contains either full document or
// masked change
type OrganizationChange_Modified struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields
	// Name of modified Organization
	Name *Name `protobuf:"bytes,1,opt,customtype=Name,name=name,proto3" json:"name,omitempty" firestore:"name"`
	// New version of Organization or masked difference, depending on
	// mask_changes instrumentation of issued [WatchOrganizationRequest] or
	// [WatchOrganizationsRequest]
	Organization *Organization `protobuf:"bytes,2,opt,name=organization,proto3" json:"organization,omitempty" firestore:"organization"`
	// Used when mask_changes is set, contains field paths of modified
	// properties.
	FieldMask *Organization_FieldMask `protobuf:"bytes,3,opt,customtype=Organization_FieldMask,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty" firestore:"fieldMask"`
	// Previous view index specifies previous position of modified Organization.
	// When modification doesn't affect sorted order, value will remain
	// identical to [view_index].
	PreviousViewIndex int32 `protobuf:"varint,4,opt,name=previous_view_index,json=previousViewIndex,proto3" json:"previous_view_index,omitempty" firestore:"previousViewIndex"`
	// Integer specifying Organization new index in resulting query view.
	ViewIndex int32 `protobuf:"varint,5,opt,name=view_index,json=viewIndex,proto3" json:"view_index,omitempty" firestore:"viewIndex"`
}

func (m *OrganizationChange_Modified) Reset() {
	*m = OrganizationChange_Modified{}
	if protoimpl.UnsafeEnabled {
		mi := &edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes[2]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
		ms.StoreMessageInfo(mi)
	}
}

func (m *OrganizationChange_Modified) String() string {
	return protoimpl.X.MessageStringOf(m)
}

func (*OrganizationChange_Modified) ProtoMessage() {}

func (m *OrganizationChange_Modified) ProtoReflect() preflect.Message {
	mi := &edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes[2]
	if protoimpl.UnsafeEnabled && m != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(m)
}

func (*OrganizationChange_Modified) GotenMessage() {}

// Deprecated, Use OrganizationChange_Modified.ProtoReflect.Descriptor instead.
func (*OrganizationChange_Modified) Descriptor() ([]byte, []int) {
	return edgelq_iam_proto_v1alpha2_organization_change_proto_rawDescGZIP(), []int{0, 1}
}

func (m *OrganizationChange_Modified) Unmarshal(b []byte) error {
	return proto.Unmarshal(b, m)
}

func (m *OrganizationChange_Modified) Marshal() ([]byte, error) {
	return proto.Marshal(m)
}

func (m *OrganizationChange_Modified) MarshalJSON() ([]byte, error) {
	return protojson.MarshalOptions{}.Marshal(m)
}

func (m *OrganizationChange_Modified) UnmarshalJSON(data []byte) error {
	return protojson.Unmarshal(data, m)
}

func (m *OrganizationChange_Modified) GetName() *Name {
	if m != nil {
		return m.Name
	}
	return nil
}

func (m *OrganizationChange_Modified) GetOrganization() *Organization {
	if m != nil {
		return m.Organization
	}
	return nil
}

func (m *OrganizationChange_Modified) GetFieldMask() *Organization_FieldMask {
	if m != nil {
		return m.FieldMask
	}
	return nil
}

func (m *OrganizationChange_Modified) GetPreviousViewIndex() int32 {
	if m != nil {
		return m.PreviousViewIndex
	}
	return int32(0)
}

func (m *OrganizationChange_Modified) GetViewIndex() int32 {
	if m != nil {
		return m.ViewIndex
	}
	return int32(0)
}

func (m *OrganizationChange_Modified) SetName(fv *Name) {
	if m == nil {
		panic(fmt.Errorf("can't set %s on nil %s", "Name", "OrganizationChange_Modified"))
	}
	m.Name = fv
}

func (m *OrganizationChange_Modified) SetOrganization(fv *Organization) {
	if m == nil {
		panic(fmt.Errorf("can't set %s on nil %s", "Organization", "OrganizationChange_Modified"))
	}
	m.Organization = fv
}

func (m *OrganizationChange_Modified) SetFieldMask(fv *Organization_FieldMask) {
	if m == nil {
		panic(fmt.Errorf("can't set %s on nil %s", "FieldMask", "OrganizationChange_Modified"))
	}
	m.FieldMask = fv
}

func (m *OrganizationChange_Modified) SetPreviousViewIndex(fv int32) {
	if m == nil {
		panic(fmt.Errorf("can't set %s on nil %s", "PreviousViewIndex", "OrganizationChange_Modified"))
	}
	m.PreviousViewIndex = fv
}

func (m *OrganizationChange_Modified) SetViewIndex(fv int32) {
	if m == nil {
		panic(fmt.Errorf("can't set %s on nil %s", "ViewIndex", "OrganizationChange_Modified"))
	}
	m.ViewIndex = fv
}

// Organization has been added or modified in a query view. Version used for
// stateless watching
type OrganizationChange_Current struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields
	Organization  *Organization `protobuf:"bytes,1,opt,name=organization,proto3" json:"organization,omitempty" firestore:"organization"`
}

func (m *OrganizationChange_Current) Reset() {
	*m = OrganizationChange_Current{}
	if protoimpl.UnsafeEnabled {
		mi := &edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes[3]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
		ms.StoreMessageInfo(mi)
	}
}

func (m *OrganizationChange_Current) String() string {
	return protoimpl.X.MessageStringOf(m)
}

func (*OrganizationChange_Current) ProtoMessage() {}

func (m *OrganizationChange_Current) ProtoReflect() preflect.Message {
	mi := &edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes[3]
	if protoimpl.UnsafeEnabled && m != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(m)
}

func (*OrganizationChange_Current) GotenMessage() {}

// Deprecated, Use OrganizationChange_Current.ProtoReflect.Descriptor instead.
func (*OrganizationChange_Current) Descriptor() ([]byte, []int) {
	return edgelq_iam_proto_v1alpha2_organization_change_proto_rawDescGZIP(), []int{0, 2}
}

func (m *OrganizationChange_Current) Unmarshal(b []byte) error {
	return proto.Unmarshal(b, m)
}

func (m *OrganizationChange_Current) Marshal() ([]byte, error) {
	return proto.Marshal(m)
}

func (m *OrganizationChange_Current) MarshalJSON() ([]byte, error) {
	return protojson.MarshalOptions{}.Marshal(m)
}

func (m *OrganizationChange_Current) UnmarshalJSON(data []byte) error {
	return protojson.Unmarshal(data, m)
}

func (m *OrganizationChange_Current) GetOrganization() *Organization {
	if m != nil {
		return m.Organization
	}
	return nil
}

func (m *OrganizationChange_Current) SetOrganization(fv *Organization) {
	if m == nil {
		panic(fmt.Errorf("can't set %s on nil %s", "Organization", "OrganizationChange_Current"))
	}
	m.Organization = fv
}

// Removed is returned when Organization is deleted or leaves Query view
type OrganizationChange_Removed struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields
	Name          *Name `protobuf:"bytes,1,opt,customtype=Name,name=name,proto3" json:"name,omitempty" firestore:"name"`
	// Integer specifying removed Organization index. Not populated in stateless
	// watch type.
	ViewIndex int32 `protobuf:"varint,2,opt,name=view_index,json=viewIndex,proto3" json:"view_index,omitempty" firestore:"viewIndex"`
}

func (m *OrganizationChange_Removed) Reset() {
	*m = OrganizationChange_Removed{}
	if protoimpl.UnsafeEnabled {
		mi := &edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes[4]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
		ms.StoreMessageInfo(mi)
	}
}

func (m *OrganizationChange_Removed) String() string {
	return protoimpl.X.MessageStringOf(m)
}

func (*OrganizationChange_Removed) ProtoMessage() {}

func (m *OrganizationChange_Removed) ProtoReflect() preflect.Message {
	mi := &edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes[4]
	if protoimpl.UnsafeEnabled && m != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(m))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(m)
}

func (*OrganizationChange_Removed) GotenMessage() {}

// Deprecated, Use OrganizationChange_Removed.ProtoReflect.Descriptor instead.
func (*OrganizationChange_Removed) Descriptor() ([]byte, []int) {
	return edgelq_iam_proto_v1alpha2_organization_change_proto_rawDescGZIP(), []int{0, 3}
}

func (m *OrganizationChange_Removed) Unmarshal(b []byte) error {
	return proto.Unmarshal(b, m)
}

func (m *OrganizationChange_Removed) Marshal() ([]byte, error) {
	return proto.Marshal(m)
}

func (m *OrganizationChange_Removed) MarshalJSON() ([]byte, error) {
	return protojson.MarshalOptions{}.Marshal(m)
}

func (m *OrganizationChange_Removed) UnmarshalJSON(data []byte) error {
	return protojson.Unmarshal(data, m)
}

func (m *OrganizationChange_Removed) GetName() *Name {
	if m != nil {
		return m.Name
	}
	return nil
}

func (m *OrganizationChange_Removed) GetViewIndex() int32 {
	if m != nil {
		return m.ViewIndex
	}
	return int32(0)
}

func (m *OrganizationChange_Removed) SetName(fv *Name) {
	if m == nil {
		panic(fmt.Errorf("can't set %s on nil %s", "Name", "OrganizationChange_Removed"))
	}
	m.Name = fv
}

func (m *OrganizationChange_Removed) SetViewIndex(fv int32) {
	if m == nil {
		panic(fmt.Errorf("can't set %s on nil %s", "ViewIndex", "OrganizationChange_Removed"))
	}
	m.ViewIndex = fv
}

var edgelq_iam_proto_v1alpha2_organization_change_proto preflect.FileDescriptor

var edgelq_iam_proto_v1alpha2_organization_change_proto_rawDesc = []byte{
	0x0a, 0x33, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x71, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x70, 0x72, 0x6f,
	0x74, 0x6f, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x6f, 0x72, 0x67, 0x61,
	0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e,
	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x6e, 0x74, 0x74, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76,
	0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
	0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f,
	0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
	0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70,
	0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x67, 0x6f, 0x74, 0x65, 0x6e, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
	0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x67, 0x6f, 0x74, 0x65, 0x6e, 0x2e, 0x70, 0x72,
	0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x74, 0x65, 0x6e, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e,
	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x64, 0x67, 0x65, 0x6c, 0x71, 0x2f, 0x69, 0x61,
	0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32,
	0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
	0x6f, 0x74, 0x6f, 0x22, 0x86, 0x07, 0x0a, 0x12, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
	0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x42, 0x0a, 0x05, 0x61, 0x64,
	0x64, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6e, 0x74, 0x74, 0x2e,
	0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4f, 0x72, 0x67,
	0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e,
	0x41, 0x64, 0x64, 0x65, 0x64, 0x48, 0x00, 0x52, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x12, 0x4b,
	0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
	0x32, 0x2d, 0x2e, 0x6e, 0x74, 0x74, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
	0x68, 0x61, 0x32, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
	0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x48,
	0x00, 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x48, 0x0a, 0x07, 0x63,
	0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e,
	0x74, 0x74, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e,
	0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e,
	0x67, 0x65, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x63, 0x75,
	0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64,
	0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x74, 0x74, 0x2e, 0x69, 0x61, 0x6d,
	0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69,
	0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x6d,
	0x6f, 0x76, 0x65, 0x64, 0x48, 0x00, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x1a,
	0x6a, 0x0a, 0x05, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12, 0x42, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61,
	0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e,
	0x2e, 0x6e, 0x74, 0x74, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
	0x32, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c,
	0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a,
	0x76, 0x69, 0x65, 0x77, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
	0x52, 0x09, 0x76, 0x69, 0x65, 0x77, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x98, 0x02, 0x0a, 0x08,
	0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xb2, 0xda, 0x21, 0x10, 0x0a, 0x0e, 0x0a, 0x0c,
	0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61,
	0x6d, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
	0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, 0x74, 0x74, 0x2e, 0x69,
	0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4f, 0x72, 0x67, 0x61,
	0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69,
	0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f,
	0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
	0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65,
	0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x14, 0xb2, 0xda, 0x21, 0x10, 0x32, 0x0e, 0x0a, 0x0c,
	0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x66, 0x69,
	0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x76, 0x69,
	0x6f, 0x75, 0x73, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04,
	0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x56, 0x69,
	0x65, 0x77, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x69, 0x65, 0x77, 0x5f,
	0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x76, 0x69, 0x65,
	0x77, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x4d, 0x0a, 0x07, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e,
	0x74, 0x12, 0x42, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
	0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, 0x74, 0x74, 0x2e, 0x69, 0x61,
	0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e,
	0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x52, 0x0a, 0x07, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64,
	0x12, 0x28, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14,
	0xb2, 0xda, 0x21, 0x10, 0x0a, 0x0e, 0x0a, 0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
	0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x69,
	0x65, 0x77, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
	0x76, 0x69, 0x65, 0x77, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x12, 0x9a, 0xd9, 0x21, 0x0e, 0x0a,
	0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a,
	0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x85, 0x01, 0xe8,
	0xde, 0x21, 0x00, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x74, 0x74, 0x2e, 0x69, 0x61, 0x6d,
	0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x17, 0x4f, 0x72,
	0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
	0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x00, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
	0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x77, 0x61, 0x6e, 0x2f, 0x65, 0x64, 0x67,
	0x65, 0x6c, 0x71, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
	0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e,
	0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
	0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}

var (
	edgelq_iam_proto_v1alpha2_organization_change_proto_rawDescOnce sync.Once
	edgelq_iam_proto_v1alpha2_organization_change_proto_rawDescData = edgelq_iam_proto_v1alpha2_organization_change_proto_rawDesc
)

func edgelq_iam_proto_v1alpha2_organization_change_proto_rawDescGZIP() []byte {
	edgelq_iam_proto_v1alpha2_organization_change_proto_rawDescOnce.Do(func() {
		edgelq_iam_proto_v1alpha2_organization_change_proto_rawDescData = protoimpl.X.CompressGZIP(edgelq_iam_proto_v1alpha2_organization_change_proto_rawDescData)
	})
	return edgelq_iam_proto_v1alpha2_organization_change_proto_rawDescData
}

var edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var edgelq_iam_proto_v1alpha2_organization_change_proto_goTypes = []interface{}{
	(*OrganizationChange)(nil),          // 0: ntt.iam.v1alpha2.OrganizationChange
	(*OrganizationChange_Added)(nil),    // 1: ntt.iam.v1alpha2.OrganizationChange.Added
	(*OrganizationChange_Modified)(nil), // 2: ntt.iam.v1alpha2.OrganizationChange.Modified
	(*OrganizationChange_Current)(nil),  // 3: ntt.iam.v1alpha2.OrganizationChange.Current
	(*OrganizationChange_Removed)(nil),  // 4: ntt.iam.v1alpha2.OrganizationChange.Removed
	(*Organization)(nil),                // 5: ntt.iam.v1alpha2.Organization
	(*Organization_FieldMask)(nil),      // 6: ntt.iam.v1alpha2.Organization_FieldMask
}
var edgelq_iam_proto_v1alpha2_organization_change_proto_depIdxs = []int32{
	1, // 0: ntt.iam.v1alpha2.OrganizationChange.added:type_name -> ntt.iam.v1alpha2.OrganizationChange.Added
	2, // 1: ntt.iam.v1alpha2.OrganizationChange.modified:type_name -> ntt.iam.v1alpha2.OrganizationChange.Modified
	3, // 2: ntt.iam.v1alpha2.OrganizationChange.current:type_name -> ntt.iam.v1alpha2.OrganizationChange.Current
	4, // 3: ntt.iam.v1alpha2.OrganizationChange.removed:type_name -> ntt.iam.v1alpha2.OrganizationChange.Removed
	5, // 4: ntt.iam.v1alpha2.OrganizationChange.Added.organization:type_name -> ntt.iam.v1alpha2.Organization
	5, // 5: ntt.iam.v1alpha2.OrganizationChange.Modified.organization:type_name -> ntt.iam.v1alpha2.Organization
	6, // 6: ntt.iam.v1alpha2.OrganizationChange.Modified.field_mask:type_name -> ntt.iam.v1alpha2.Organization_FieldMask
	5, // 7: ntt.iam.v1alpha2.OrganizationChange.Current.organization:type_name -> ntt.iam.v1alpha2.Organization
	8, // [8:8] is the sub-list for method output_type
	8, // [8:8] is the sub-list for method input_type
	8, // [8:8] is the sub-list for extension type_name
	8, // [8:8] is the sub-list for extension extendee
	0, // [0:8] is the sub-list for field type_name
}

func init() { edgelq_iam_proto_v1alpha2_organization_change_proto_init() }
func edgelq_iam_proto_v1alpha2_organization_change_proto_init() {
	if edgelq_iam_proto_v1alpha2_organization_change_proto != nil {
		return
	}
	if !protoimpl.UnsafeEnabled {

		edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*OrganizationChange); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*OrganizationChange_Added); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*OrganizationChange_Modified); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*OrganizationChange_Current); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*OrganizationChange_Removed); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
	}

	edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes[0].OneofWrappers = []interface{}{
		(*OrganizationChange_Added_)(nil),
		(*OrganizationChange_Modified_)(nil),
		(*OrganizationChange_Current_)(nil),
		(*OrganizationChange_Removed_)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: edgelq_iam_proto_v1alpha2_organization_change_proto_rawDesc,
			NumEnums:      0,
			NumMessages:   5,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           edgelq_iam_proto_v1alpha2_organization_change_proto_goTypes,
		DependencyIndexes: edgelq_iam_proto_v1alpha2_organization_change_proto_depIdxs,
		MessageInfos:      edgelq_iam_proto_v1alpha2_organization_change_proto_msgTypes,
	}.Build()
	edgelq_iam_proto_v1alpha2_organization_change_proto = out.File
	edgelq_iam_proto_v1alpha2_organization_change_proto_rawDesc = nil
	edgelq_iam_proto_v1alpha2_organization_change_proto_goTypes = nil
	edgelq_iam_proto_v1alpha2_organization_change_proto_depIdxs = nil
}

repository: cloudwan/edgelq-sdk

repo_name: cloudwan/edgelq-sdk


text:
package cmd

import (
	"github.com/spf13/cobra"
	"app/core"
	"app/oauth2"
	"fmt"
	"os"
	"github.com/sirupsen/logrus"
)

// add a new scope to an existing user
func addUserScope(username string, scope string) error {

	// start a new CQL session
	databaseUrl := os.Getenv("DATABASE_URL")
	ds, err := core.NewCQLDataStore(databaseUrl, "authorization", 1)
	if err != nil {
		return err
	}
	defer ds.Close()

	// get the user
	adapter := oauth2.NewDataStoreAdapter(ds, config.GetHasher())
	user, err := adapter.GetUser(nil, username)
	if err != nil {
		logrus.WithField("error", err).Info("Error getting user")
		return err
	}

	// add scope and update
	user.AppendScope(scope)
	return adapter.UpdateUser(user, "scopes")
}

// cli command for adding scopes to users
var cmdUserScopeAdd = &cobra.Command{
	Use:   "add <username> <scope>",
	Short: "Add a scope to an existing user",
	Args: cobra.ExactArgs(2),
	Run: func(cmd *cobra.Command, args []string) {

		if err := addUserScope(args[0], args[1]); err != nil {
			fmt.Errorf("failed to add scope %v", err)
			return
		}
		fmt.Println("added scope: " + args[1])
	},
}

func init() {
	userScopeCmd.AddCommand(cmdUserScopeAdd)
}

repository: AllanKerr/Express

repo_name: AllanKerr/Express


text:
SECTION = "devel"
def get_snapshot_date(d):
	import bb
	srcdate = bb.data.getVar('SRCDATE', d, 1)
	if not srcdate:
		return ""
	y = srcdate[0:4]
	m = srcdate[4:6]
	d = srcdate[6:8]
	return "%s-%s-%s" % (y, m, d)

DESCRIPTION = "Sparse is a semantic parser of source files: it's neither a \
compiler (although it could be used as a front-end for one) nor is it a \
preprocessor (although it contains as a part of it a preprocessing phase)."
PV = "0.0+${SRCDATE}"
LICENSE = "OSL"
SRC_URI = "http://www.codemonkey.org.uk/projects/git-snapshots/sparse/sparse-${@get_snapshot_date(d)}.tar.gz \
	   file://compile.patch \
	   file://vars.patch"
S = "${WORKDIR}/sparse-bk"

do_install () {
	install -d ${D}${bindir}
	install -m 0755 check ${D}${bindir}/sparse
}

SRC_URI[md5sum] = "6016c8271e4b8640d8cd97719b120e59"
SRC_URI[sha256sum] = "3dea88d313c565e84fea5638da30894fea4e63e8d618e2a86f6e231b3dec6182"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD

extension: bb


text:
@article{zotero-1855286-1414,
  title = {Patent {{Landscape}} Analysis: Sample from {{SPECFEM3D}}\_{{GLOBE}}},
  note = {\url{http://www.patanalyse.com/sample-analysis.html}}
}

repository: retorquere/bibtex-parser

path: /test/better-bibtex/export/Underscores break capital-preservation #300.bibtex

repo_name: retorquere/bibtex-parser

gha_license_id: MIT

gha_language: TeX

extension: bibtex


text:
package hmath

import(
	"github.com/illua1/StringsFactoryCollection"
//	"fmt"
)

var(
	SinStr = StrFactory.FuncBody(
		"Sin",
		StrFactory.MathZone,
	)
	CosStr = StrFactory.FuncBody(
		"Sin",
		StrFactory.MathZone,
	)
	TanStr = StrFactory.FuncBody(
		"Tan",
		StrFactory.MathZone,
	)
	CtgStr = StrFactory.FuncBody(
		"Ctg",
		StrFactory.MathZone,
	)
	AsinStr = StrFactory.FuncBody(
		"Asin",
		StrFactory.MathZone,
	)
	AcosStr = StrFactory.FuncBody(
		"Acos",
		StrFactory.MathZone,
	)
	AtanStr = StrFactory.FuncBody(
		"Atan",
		StrFactory.MathZone,
	)
	ActgStr = StrFactory.FuncBody(
		"Actg",
		StrFactory.MathZone,
	)
	//...
)

var (
	Prog = StrFactory.NewProgrammZone("hmath")
	Version = Prog.Part("this version")
	Context = Prog.Part("context")
)

var (
	HmathError = StrFactory.ErrorMsgMake(
		Prog,
		"error",
	)
	VersionError = StrFactory.ErrorMsgMake(
		Version,
		"can't make",
	)//	return 0, VersionError("Find system solution")
	ContextError = StrFactory.ErrorMsgMake(
		Prog,
		"context",
	)
)
/*
func init(){
	fmt.Println(
		VersionError("find system solution"),
	)
	fmt.Println(
		ContextError(" no have this value"),
	)
}
*/

var (
	ArrNilBodyError = StrFactory.ErrorString("nil body")
	ArrEmptyBodyError = StrFactory.ErrorString("empty body")
	ArrNilEllemetError = StrFactory.ErrorString("nil element")
)
var(
	MathFuncNilTest = func(a ...MathFunc)(error){
		if a == nil{
			return ArrNilBodyError // if call NilTest() <- empty
		}
		if len(a) == 0 {
			return ArrEmptyBodyError
		}
		for i:=range a{
			if a[i] == nil {
				return ArrNilEllemetError
			}
		}
		return nil
	}
	/*
	MathFuncValidalChack = func(lt StrFactory.LenTester, body ...MathFunc)(StrFactory.ErrorPrinter){
		if MathFuncNilTest(body...) {
			return StrFactory.ErrorPrinter(
				func(str string)(error){
					return StrFactory.ErrorString(
						str+StrFactory.ErrorZone("nil element"),
					)
				},
			)
		}
		if !lt(len(body)){
			return StrFactory.ErrorPrinter(
				func(str string)(error){
					return StrFactory.ErrorString(
						str+StrFactory.ErrorZone("Insufficient number of arguments"),
					)
				},
			)
		}
		return nil
	}
	*/
)


text:
SUMMARY = "LSB support to check gpu provider"

LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"

# need lsb_release
RDEPENDS_${PN} += "lsb"

PV="1.0"

do_install() {
	if [ "${TARGET_ARCH}" = "arm" ]; then
		mkdir -p ${D}${sysconfdir}/lsb-release.d
		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}
		printf "LIBGLES1=${PREFERRED_PROVIDER_virtual/libgles1}\n" > ${D}${sysconfdir}/lsb-release.d/graphics-${PV}
	fi
}

ALLOW_EMPTY_${PN} = "1"

gha_license_id: NOASSERTION

gha_language: C


text:
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR ARM)

set(CMAKE_C_COMPILER "arm-linux-gnueabihf-gcc")
set(CMAKE_CXX_COMPILER "arm-linux-gnueabihf-g++")

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

# compile flags
set(GNUEABIHF_FLAGS "-Wall -fPIC -mfpu=neon -mfloat-abi=hard -ffast-math -ftree-vectorize -std=gnu99" CACHE INTERNAL docstring)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GNUEABIHF_FLAGS}" CACHE STRING "C flags" FORCE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GNUEABIHF_FLAGS}" CACHE STRING "C++ flags" FORCE)

extension: cmake


text:
require clutter-box2d.inc

PV = "0.0+svnr${SRCREV}"
PR = "r4"

SRC_URI = "svn://svn.o-hand.com/repos/clutter/trunk;module=${PN};proto=http"

S = "${WORKDIR}/${PN}"


text:
---
---

@string{aps = {American Physical Society,}}

@article{hu2023theory,
  title={Theory of spatiotemporal deep analogs and their application to solar forecasting},
  author={Hu, Weiming and Cervone, Guido and Young, George},
  booktitle={Artificial Intelligence in Earth Science},
  pages={205--246},
  year={2023},
  publisher={Elsevier},
  website={https://www.sciencedirect.com/science/article/abs/pii/B9780323917377000050},
  bibtext_show={true}
}

@article{hu2023deep,
  title={Deep Learning Forecast Uncertainty for Precipitation over Western US},
  author={Hu, Weiming and Ghazvinian, Mohammadvaghef and Chapman, William E and Sengupta, Agniv and Ralph, Fred Martin and Delle Monache, Luca},
  journal={Monthly Weather Review},
  year={2023},
  website={https://doi.org/10.1175/MWR-D-22-0268.1},
  pdf={https://www.researchgate.net/profile/Weiming-Hu-3/publication/369097752_Deep_Learning_Forecast_Uncertainty_for_Precipitation_over_Western_US/links/641354a892cfd54f84064baf/Deep-Learning-Forecast-Uncertainty-for-Precipitation-over-Western-US.pdf},
  bibtext_show={true}
}

@article{hu2023machine,
  title={Machine Learning Weather Analogs for Near-Surface Variables},
  author={Hu, Weiming and Cervone, Guido and Young, George and Delle Monache, Luca},
  journal={Boundary-Layer Meteorology},
  pages={1--25},
  year={2023},
  publisher={Springer},
  website={https://link.springer.com/article/10.1007/s10546-022-00779-6},
  bibtext_show={true}
}

@article{hu2023scalable,
  title={A scalable solution for running ensemble simulations for photovoltaic energy},
  author={Hu, Weiming and Cervone, Guido and Turilli, Matteo and Merzky, Andre and Jha, Shantenu},
  journal={Recent Advancement in Geoinformatics and Data Science},
  volume={558},
  pages={97},
  year={2023},
  publisher={Geological Society of America},
  website={https://pubs.geoscienceworld.org/gsa/books/book/2377/chapter-abstract/135416311/A-scalable-solution-for-running-ensemble?redirectedFrom=fulltext},
  pdf={https://arxiv.org/pdf/2201.06962.pdf},
  bibtext_show={true}
}

@article{hu2022new,
  title={A new hourly dataset for photovoltaic energy production for the continental USA},
  author={Hu, Weiming and Cervone, Guido and Merzky, Andre and Turilli, Matteo and Jha, Shantenu},
  journal={Data in Brief},
  volume={40},
  pages={107824},
  year={2022},
  publisher={Elsevier},
  website={https://www.sciencedirect.com/science/article/pii/S2352340922000361},
  bibtext_show={true}
}

@article{calovi2022forecasting,
  title={Forecasting extreme weather events and associated impacts: case studies},
  author={Calovi, Martina and Hu, Weiming and Clemente, Laura and Cervone, Guido},
  journal={Extreme Weather Forecasting},
  pages={131},
  year={2022},
  publisher={Elsevier},
  website={https://www.google.com/books/edition/Extreme_Weather_Forecasting/5oZGEAAAQBAJ?hl=en&gbpv=1&dq=Forecasting+extreme+weather+events+and+associated+impacts:+case+studies&pg=PA131&printsec=frontcover},
  bibtext_show={true}
}

@inproceedings{hu2021parallel,
  title={Parallel analog ensemble-the power of weather analogs},
  author={Hu, Weiming and Cervone, G and Clemente-Harding, L and Calovi, M},
  booktitle={Proceedings of the 2020 Improving Scientific Software Conference},
  pages={1--14},
  year={2021},
  website={https://opensky.ucar.edu/islandora/object/technotes:585},
  bibtext_show={true}
}

@article{bodini2021assessing,
  title={Assessing boundary condition and parametric uncertainty in numerical-weather-prediction-modeled, long-term offshore wind speed through machine learning and analog ensemble},
  author={Bodini, Nicola and Hu, Weiming and Optis, Mike and Cervone, Guido and Alessandrini, Stefano},
  journal={Wind Energy Science},
  volume={6},
  number={6},
  pages={1363--1377},
  year={2021},
  publisher={Copernicus GmbH},
  website={https://wes.copernicus.org/articles/6/1363/2021/},
  bibtext_show={true}
}

@article{calovi2021nam,
  title={NAM-NMM Temperature Downscaling Using Personal Weather Stations to Study Urban Heat Hazards},
  author={Calovi, Martina and Hu, Weiming and Cervone, Guido and Delle Monache, Luca},
  journal={GeoHazards},
  volume={2},
  number={3},
  pages={257--276},
  year={2021},
  publisher={MDPI},
  website={https://www.mdpi.com/2624-795X/2/3/14},
  bibtext_show={true}
}

@article{yu2021using,
  title={Using Long Short-Term Memory (LSTM) and Internet of Things (IoT) for localized surface temperature forecasting in an urban environment},
  author={Yu, Manzhu and Xu, Fangcao and Hu, Weiming and Sun, Jian and Cervone, Guido},
  journal={IEEE Access},
  volume={9},
  pages={137406--137418},
  year={2021},
  publisher={IEEE},
  website={https://ieeexplore.ieee.org/abstract/document/9552907},
  bibtext_show={true}
}

@article{fanfarillo2021probabilistic,
  title={Probabilistic forecasting using deep generative models},
  author={Fanfarillo, Alessandro and Roozitalab, Behrooz and Hu, Weiming and Cervone, Guido},
  journal={GeoInformatica},
  volume={25},
  pages={127--147},
  year={2021},
  publisher={Springer},
  website={https://link.springer.com/article/10.1007/s10707-020-00425-8},
  bibtext_show={true}
}

@article{hu2019dynamically,
  title={Dynamically Optimized Unstructured Grid (DOUG) for Analog Ensemble of numerical weather predictions using evolutionary algorithms},
  author={Hu, Weiming and Cervone, Guido},
  journal={Computers \& Geosciences},
  volume={133},
  pages={104299},
  year={2019},
  publisher={Elsevier},
  website={https://www.sciencedirect.com/science/article/pii/S0098300418306678},
  bibtext_show={true}
}

@inproceedings{balasubramanian2018harnessing,
  title={Harnessing the power of many: Extensible toolkit for scalable ensemble applications},
  author={Balasubramanian, Vivek and Turilli, Matteo and Hu, Weiming and Lefebvre, Matthieu and Lei, Wenjie and Modrak, Ryan and Cervone, Guido and Tromp, Jeroen and Jha, Shantenu},
  booktitle={2018 IEEE international parallel and distributed processing symposium (IPDPS)},
  pages={536--545},
  year={2018},
  organization={IEEE},
  website={https://ieeexplore.ieee.org/abstract/document/8425207},
  bibtext_show={true}
}


text:
package entities

// Datetimes - https://wit.ai/docs/built-in-entities/20180601#wit_datetime_link
type Datetimes struct {
	Items []Datetime `json:"datetime"`
}

// Datetime - represents the datetime element
type Datetime struct {
	Confidence float64         `json:"confidence"`
	Values     []DatetimeValue `json:"values"`
	Value      *string         `json:"value,omitempty"`
	Grain      *string         `json:"grain,omitempty"`
	To         *DatetimeRange  `json:"to,omitempty"`
	From       *DatetimeRange  `json:"from,omitempty"`
	Type       string          `json:"type"`
}

// DatetimeValue - represents the value of datetime
type DatetimeValue struct {
	Value *string        `json:"value,omitempty"`
	Grain *string        `json:"grain,omitempty"`
	To    *DatetimeRange `json:"to,omitempty"`
	From  *DatetimeRange `json:"from,omitempty"`
	Type  string         `json:"type"`
}

// DatetimeRange - represents the range of datetime
type DatetimeRange struct {
	Value string `json:"value"`
	Grain string `json:"grain"`
}

repository: hellowearemito/wit-go

repo_name: hellowearemito/wit-go


text:
package types

import (
	"strconv"
)

var _ Value = (*IntegerValue)(nil)

// IntegerValue is a value of type Integer.
type IntegerValue struct {
	value

	// Value is the underlying primitive value.
	Value int64
}

// NewInteger creates a new value of type Integer.
func NewInteger(v int64) IntegerValue {
	return IntegerValue{
		value: value{
			typ: Integer,
		},
		Value: v,
	}
}

func (v IntegerValue) String() string {
	return strconv.FormatInt(v.Value, 10)
}

repository: tomarrell/lbadd

repo_name: tomarrell/lbadd


text:
package db

import (
	"database/sql"
	"fmt"

	_ "github.com/lib/pq"
)

func NewPostgresConnection(host string, port uint, dbname, user, pass string) (*sql.DB, error) {
	conn, err := sql.Open("postgres", fmt.Sprintf("host=%s port=%d user=%s password=%s dbname=%s sslmode=disable",
		host, port, user, pass, dbname))
	if err != nil {
		return nil, err
	}

	if err := conn.Ping(); err != nil {
		return nil, err
	}
	return conn, nil
}

repository: igor-karpukhin/user-api-test

repo_name: igor-karpukhin/user-api-test


text:
package p2p

import (
	"fmt"
	"sync"
)

// PeerStore holds active Peers, managing them in a concurrency safe
// manner and providing lookup via various functions
type PeerStore struct {
	mtx       sync.RWMutex
	peers     map[string]*Peer // hash -> peer
	connected map[string]int   // (ip|ip:port) -> count
	curSlice  []*Peer          // temporary slice that gets reset when changes are made
	incoming  int
	outgoing  int
}

// NewPeerStore initializes a new peer store
func NewPeerStore() *PeerStore {
	ps := new(PeerStore)
	ps.peers = make(map[string]*Peer)
	ps.connected = make(map[string]int)
	return ps
}

// Add a peer to be managed. Returns an error if a peer with that hash
// is already tracked
func (ps *PeerStore) Add(p *Peer) error {
	if p == nil {
		return fmt.Errorf("trying to add nil")
	}
	ps.mtx.Lock()
	defer ps.mtx.Unlock()

	if _, ok := ps.peers[p.Hash]; ok {
		return fmt.Errorf("peer already exists")
	}
	ps.curSlice = nil
	ps.peers[p.Hash] = p
	ps.connected[p.Endpoint.IP]++
	ps.connected[p.Endpoint.String()]++

	if p.IsIncoming {
		ps.incoming++
	} else {
		ps.outgoing++
	}
	return nil
}

// Remove a specific peer if it exists. This checks by pointer reference and not by hash.
// If you have two distinct peer instances (A and B) with the same hash and add A, removing B has no
// effect, even if they have the same values
func (ps *PeerStore) Remove(p *Peer) {
	if p == nil {
		return
	}
	ps.mtx.Lock()
	defer ps.mtx.Unlock()
	if old, ok := ps.peers[p.Hash]; ok && old == p { // pointer comparison
		ps.connected[p.Endpoint.IP]--
		if ps.connected[p.Endpoint.IP] == 0 {
			delete(ps.connected, p.Endpoint.IP)
		}
		ps.connected[p.Endpoint.String()]--
		if ps.connected[p.Endpoint.String()] == 0 {
			delete(ps.connected, p.Endpoint.String())
		}
		if old.IsIncoming {
			ps.incoming--
		} else {
			ps.outgoing--
		}
		ps.curSlice = nil
		delete(ps.peers, p.Hash)
	}
}

// Total amount of peers connected
func (ps *PeerStore) Total() int {
	ps.mtx.RLock()
	defer ps.mtx.RUnlock()
	return len(ps.peers)
}

// Outgoing is the amount of outgoing peers connected
func (ps *PeerStore) Outgoing() int {
	ps.mtx.RLock()
	defer ps.mtx.RUnlock()
	return ps.outgoing
}

// Incoming is the amount of incoming peers connected
func (ps *PeerStore) Incoming() int {
	ps.mtx.RLock()
	defer ps.mtx.RUnlock()
	return ps.incoming
}

// Get retrieves a Peer with a specific hash, nil if it doesn't exist
func (ps *PeerStore) Get(hash string) *Peer {
	ps.mtx.RLock()
	defer ps.mtx.RUnlock()
	return ps.peers[hash]
}

// Connections tests whether there is a peer connected from a specified ip address
func (ps *PeerStore) Connections(addr string) int {
	ps.mtx.RLock()
	defer ps.mtx.RUnlock()
	return ps.connected[addr]
}

// Connected returns if there is a peer from that specific endpoint
func (ps *PeerStore) Connected(ep Endpoint) bool {
	ps.mtx.RLock()
	defer ps.mtx.RUnlock()
	return ps.connected[ep.String()] > 0
}

// Count returns the amount of peers connected from a specified ip address
func (ps *PeerStore) Count(addr string) int {
	ps.mtx.RLock()
	defer ps.mtx.RUnlock()
	return ps.connected[addr]
}

// Slice returns a slice of the current peers that is considered concurrency
// safe for reading operations. The slice should not be modified. Peers are randomly
// ordered
func (ps *PeerStore) Slice() []*Peer {
	ps.mtx.RLock()
	if ps.curSlice != nil {
		defer ps.mtx.RUnlock()
		return append(ps.curSlice[:0:0], ps.curSlice...)
	}
	ps.mtx.RUnlock()

	ps.mtx.Lock()
	defer ps.mtx.Unlock()
	r := make([]*Peer, 0, len(ps.peers))
	for _, p := range ps.peers {
		r = append(r, p)
	}
	ps.curSlice = r
	return r
}


text:
HOMEPAGE = "https://github.com/mchehab/zbar"
SUMMARY = "A bar code library"
DESRIPTION = "ZBar is an open source software suite for reading bar codes \
from various sources, such as video streams, image files and raw \
intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128, \
Code 93, Code 39, Codabar, Interleaved 2 of 5, QR Code and SQ Code"
SECTION = "graphics"

LICENSE = "LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=5e9ee833a2118adc7d8b5ea38e5b1cef"

SRC_URI = "git://github.com/mchehab/zbar.git;branch=master;protocol=https \
    file://0001-qt-Create-subdir-in-Makefile.patch \
    file://0002-zbarcam-Create-subdir-in-Makefile.patch \
"
SRCREV = "89e7900d85dd54ef351a7ed582aec6a5a5d7fa37"

S = "${WORKDIR}/git"
PV = "0.23.1+git${SRCPV}"

DEPENDS += "xmlto-native"

PACKAGECONFIG ??= "\
    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
"

PACKAGECONFIG ??= "video"

inherit autotools pkgconfig gettext \
    ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)} \
    ${@bb.utils.contains('PACKAGECONFIG', 'gtk3', 'gobject-introspection',	'', d)} \
    ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'qmake5_paths', '', d)}

PACKAGECONFIG[x11] = "--with-x, --without-x, libxv"
PACKAGECONFIG[video] = "--enable-video, --disable-video, v4l-utils libv4l"
PACKAGECONFIG[jpeg] = "--with-jpeg, --without-jpeg, jpeg"
PACKAGECONFIG[python3] = "--with-python=auto, --without-python, python3"
PACKAGECONFIG[gtk3] = "--with-gtk=gtk3, --without-gtk, gtk+3"
PACKAGECONFIG[qt5] = "--with-qt5, --without-qt5, qtbase qtbase-native qtx11extras qtsvg, qtbase"
PACKAGECONFIG[imagemagick] = "--with-imagemagick, --without-imagemagick, imagemagick"

FILES:${PN} += "${bindir} \
    ${@bb.utils.contains('DEPENDS', 'python3-native', '${libdir}', '', d)} \
"

CPPFLAGS:append = "\
    ${@bb.utils.contains('PACKAGECONFIG', 'qt5', '\
    -I${STAGING_INCDIR}/QtX11Extras \
    -I${STAGING_INCDIR}/dbus-1.0 \
    -I${STAGING_LIBDIR}/dbus-1.0/include \
    ', '', d)} \
"

TARGET_CXXFLAGS:append = " -fPIC"

do_configure:prepend() {
    install -m 755 ${STAGING_DATADIR_NATIVE}/gettext/ABOUT-NLS ${S}/
}

repository: openembedded/meta-openembedded

repo_name: openembedded/meta-openembedded


text:
@Article{tabima2017whole,
  title = {Whole genome sequences of the raspberry and strawberry pathogens Phytophthora rubi and P. fragariae},
  author = {Javier F Tabima and Brent A Kronmiller and Caroline M Press and Brett M Tyler and Inga A Zasada and Niklaus J Gr{\"u}nwald},
  journal = {Molecular Plant-Microbe Interactions},
  volume = {30},
  number = {10},
  pages = {767--769},
  year = {2017},
  date = {2017-01-01},
}


text:
\begin{thebibliography}{}

@techreport{multipleheaps,
    title     = "Heapsort using Multiple Heaps",
    author    = "D. Levendeas and C. Zaroliagis",
    institution = "Department of Computer Engineering and Informatics and Computer Technology Institute, N. Kazantzaki Str, Patras University Campus",
    note      = "Available at \url{http://students.ceid.upatras.gr/~lebenteas/Heapsort-using-Multiple-Heaps-final.pdf}"
}

@misc{wikiheap,
    title     = "Heap Sort",
    url       = "https://en.wikipedia.org/wiki/Heapsort",
    note      = "Available at \url{https://en.wikipedia.org/wiki/Heapsort}"
}

@misc{goslice,
    title     = "Go Tour",
    note      = "Available at \url{https://tour.golang.org/moretypes/7}"
}

@book{clrsthirdedition,
    author    = "Thomas H. Cormen and Charles E. Leiserson and Ronald L. Rivest and Clifford Stein",
    title     = "Introduction To Algorithms Third Edition",
    year      = "2009",
    pages     = "155"
}

@misc{heapsort,
    title     = "Heap Sort - Data Structures and Algorithms",
    note      = "Available at \url{http://www.cems.uvm.edu/~rsnapp/teaching/cs124/notes/cs124notes_031914.pdf}"
}

\end{thebibliography}


text:
@inproceedings{pradubsuwun_partial_2004,
 abstract = {This paper proposes a partial order reduction algorithm for timed trace theoretic verification in order to detect both safety failures and timing failures of timed circuits efficiently. This algorithm is based on the framework of timed trace theoretic verification according to the original untimed trace theory. Consequently, its conformance checking supports hierarchical verification. Experimenting with the STARI circuits, the proposed approach shows its effectiveness.},
 author = {Pradubsuwun, Denduang and Yoneda, Tomohiro and Myers, Chris},
 booktitle = {Automated Technology for Verification and Analysis},
 date = {2004-11},
 doi = {10.1007/978-3-540-30476-0_28},
 editor = {Wang, Farn},
 isbn = {978-3-540-30476-0},
 keywords = {partial order reduction, output transition, trace theory, input transition, timing failure},
 langid = {english},
 location = {Berlin, Heidelberg},
 pages = {339--353},
 publisher = {Springer},
 series = {Lecture Notes in Computer Science},
 title = {Partial Order Reduction for Detecting Safety and Timing Failures of Timed Circuits}
}


text:
@INPROCEEDINGS{P9-123_adassxxvii,
   author = "{{Jenness}, T.}",
booktitle = "ADASS XXVII",
     year = 2018,
   editor = "TBD",
   volume = "TBD",
   series = "ASP Conf. Ser.",
    pages = "TBD",
publisher = "ASP",
  address = "San Francisco"
}
@INPROCEEDINGS{2014ASPC..485..277B,
   author = {{Boch}, T. and {Fernique}, P.},
    title = "{Aladin Lite: Embed your Sky in the Browser}",
booktitle = {Astronomical Data Analysis Software and Systems XXIII},
     year = 2014,
   series = {ASP Conf. Ser.},
   volume = 485,
   editor = {{Manset}, N. and {Forshay}, P.},
    month = may,
    pages = {277},
   adsurl = {http://adsabs.harvard.edu/abs/2014ASPC..485..277B},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
@ARTICLE{2017arXiv170208449A,
   author = {{Aihara}, H. and others},
    title = "{First Data Release of the Hyper Suprime-Cam Subaru Strategic Program}",
  journal = {ArXiv e-prints},
archivePrefix = "arXiv",
   eprint = {arXiv:1702.08449},
 primaryClass = "astro-ph.IM",
 keywords = {Astrophysics - Instrumentation and Methods for Astrophysics, Astrophysics - Earth and Planetary Astrophysics, Astrophysics - Astrophysics of Galaxies, Astrophysics - High Energy Astrophysical Phenomena, Astrophysics - Solar and Stellar Astrophysics},
     year = 2017,
    month = feb,
   adsurl = {http://adsabs.harvard.edu/abs/2017arXiv170208449A},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
@ARTICLE{2007MNRAS.381..865C,
   author = {{Calabretta}, M.~R. and {Roukema}, B.~F.},
    title = "{Mapping on the HEALPix grid}",
  journal = {\mnras},
 keywords = {methods: data analysis, methods: statistical, techniques: image processing, astronomical data bases: miscellaneous, cosmic microwave background, cosmology: observations},
     year = 2007,
    month = oct,
   volume = 381,
    pages = {865-872},
      doi = {10.1111/j.1365-2966.2007.12297.x},
   adsurl = {http://adsabs.harvard.edu/abs/2007MNRAS.381..865C},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
@ARTICLE{PER-GRA:2007,
  Author    = {P\'erez, Fernando and Granger, Brian E.},
  Title     = {{IP}ython: a System for Interactive Scientific Computing},
  Journal   = {Computing in Science and Engineering},
  Volume    = {9},
  Number    = {3},
  Pages     = {21--29},
  month     = may,
  year      = 2007,
  url       = "http://ipython.org",
  ISSN      = "1521-9615",
  doi       = {10.1109/MCSE.2007.53},
  publisher = {IEEE Computer Society},
}
@ARTICLE{2015A&A...578A.114F,
   author = {{Fernique}, P. and others},
    title = "{Hierarchical progressive surveys. Multi-resolution HEALPix data structures for astronomical images, catalogues, and 3-dimensional data cubes}",
  journal = {\aap},
archivePrefix = "arXiv",
   eprint = {arXiv:1505.02291},
 primaryClass = "astro-ph.IM",
 keywords = {surveys, atlases, astronomical databases: miscellaneous, catalogs, virtual observatory tools, methods: statistical},
     year = 2015,
    month = jun,
   volume = 578,
      eid = {A114},
    pages = {A114},
      doi = {10.1051/0004-6361/201526075},
   adsurl = {http://cdsads.u-strasbg.fr/abs/2015A%26A...578A.114F},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
@ARTICLE{2015arXiv151207914J,
   author = {{Juri{\'c}}, M. and others},
    title = "{The LSST Data Management System}",
  journal = {ArXiv e-prints},
archivePrefix = "arXiv",
   eprint = {arXiv:1512.07914},
 primaryClass = "astro-ph.IM",
 keywords = {Astrophysics - Instrumentation and Methods for Astrophysics},
     year = 2015,
    month = dec,
   adsurl = {http://adsabs.harvard.edu/abs/2015arXiv151207914J},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
@ARTICLE{2017PASP..129e8006B,
   author = {{Berriman}, G.~B. and {Good}, J.~C.},
    title = "{The Application of the Montage Image Mosaic Engine To The Visualization Of Astronomical Images}",
  journal = {\pasp},
archivePrefix = "arXiv",
   eprint = {arXiv:1702.02593},
 primaryClass = "astro-ph.IM",
     year = 2017,
    month = may,
   volume = 129,
   number = 5,
    pages = {058006},
      doi = {10.1088/1538-3873/aa5456},
   adsurl = {http://adsabs.harvard.edu/abs/2017PASP..129e8006B},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
@INPROCEEDINGS{2012ASPC..461..267G,
   author = {{Goodman}, A. and others},
    title = "{WorldWide Telescope in Research and Education}",
booktitle = {Astronomical Data Analysis Software and Systems XXI},
     year = 2012,
   series = {ASP Conf. Ser.},
   volume = 461,
archivePrefix = "arXiv",
   eprint = {arXiv:1201.1285},
 primaryClass = "astro-ph.IM",
   editor = {{Ballester}, P. and {Egret}, D. and {Lorente}, N.~P.~F.},
    month = sep,
    pages = {267},
   adsurl = {http://adsabs.harvard.edu/abs/2012ASPC..461..267G},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
@TECHREPORT{2017LSST.1.LDM-542,
  author = {{Dubois-Felsmann}, G. and others},
  title = {LSST Science Platform},
  institution = {Large Synoptic Survey Telescope},
  year = 2017,
  url = {http://ls.st/LDM-542},
  date = {2017-07-15}
}
@TECHREPORT{2017LSST.1.LEP-31,
  author = {{Emmons}, B. and others},
  title = {LSST EPO Design},
  institution = {Large Synoptic Survey Telescope},
  year = 2017,
  url = {http://ls.st/LEP-31},
  date = {2017-09-05}
}

gha_language: PostScript


text:
package main

import (
	"testing"
)

func TestFnEquals(t *testing.T) {
	fn := IMM

	if got := FnEquals(fn, IMM); got != true {
		t.Errorf("Expected: %t, got: %t", true, got)
	}
}

func TestLoopyRegister(t *testing.T) {

	l := CreateLoopyRegister()
	want := Word(0x000)
	if l.getAddress() != want {
		t.Errorf("Expected: %x, got: %x", want, l.getAddress())
	}
	// func (l *loopyRegister) getAddress() Word {
	// 	return Word(l.coarseX) | Word(l.coarseY)<<5 | Word(l.nametableX)<<10 | Word(l.nametableY)<<11 | Word(l.fineY)<<12
	// }
	l = CreateLoopyRegister()
	l.coarseX = byte(0x02)
	want = 0x0002
	if l.getAddress() != Word(0x0002) {
		t.Errorf("Expected: %x, got: %x", want, l.getAddress())
	}

	l = CreateLoopyRegister()
	l.coarseY = byte(0x01)
	want = 0x0020
	if l.getAddress() != Word(0x0020) {
		t.Errorf("Expected: %x, got: %x", want, l.getAddress())
	}

	l = CreateLoopyRegister()
	l.nametableX = byte(0x01)
	want = 0x0400
	if l.getAddress() != want {
		t.Errorf("Expected: %x, got: %x", want, l.getAddress())
	}

	l = CreateLoopyRegister()
	l.nametableY = byte(0x01)
	want = 0x0800
	if l.getAddress() != want {
		t.Errorf("Expected: %x, got: %x", want, l.getAddress())
	}

	l = CreateLoopyRegister()
	l.fineY = byte(0x01)
	want = 0x1000
	if l.getAddress() != want {
		t.Errorf("Expected: %x, got: %x", want, l.getAddress())
	}
}

func TestLoopyRegisterAddition(t *testing.T) {

	l := CreateLoopyRegister()
	l.increment()
	want := Word(0x001)
	if l.getAddress() != want && l.coarseX != byte(want) {
		t.Errorf("Expected: %x, got: %x", want, l.getAddress())
	}

	l = CreateLoopyRegister()
	l.add(0x0020)
	want = Word(0x0020)
	if l.getAddress() != want && l.coarseY != byte(0x01) {
		t.Errorf("Expected: %x, got: %x", want, l.getAddress())
	}

	l = CreateLoopyRegister()
	l.add(0x0400)
	want = 0x0400
	if l.getAddress() != want && l.nametableX != byte(0x01) {
		t.Errorf("Expected: %x, got: %x", want, l.getAddress())
	}

	l = CreateLoopyRegister()
	l.add(0x0800)
	want = 0x0800
	if l.getAddress() != want && l.nametableY != byte(0x01) {
		t.Errorf("Expected: %x, got: %x", want, l.getAddress())
	}

	l = CreateLoopyRegister()
	l.set(0x1000)
	want = 0x1000
	if l.getAddress() != want && l.fineY != byte(0x01) && l.coarseX != 0 && l.coarseY != 0 && l.nametableX != 0 && l.nametableY != 0 {
		t.Errorf("Expected: %x, got: %x", want, l.getAddress())
	}

	l = CreateLoopyRegister()
	l.coarseY = 0x01
	l.increment()
	want = 0x0021
	if l.getAddress() != want && l.coarseX != byte(0x01) {
		t.Errorf("Expected: %x, got: %x", want, l.getAddress())
	}

}

repository: Scoppio/GoNES

repo_name: Scoppio/GoNES


text:
package main

import (
	"math"
	"fmt"
)

const constantString = "this is const string"

func main() {

	fmt.Println(constantString)

	const n = 500000
	const e = 10e20

	fmt.Println(e / n )

	fmt.Println(int64(e/n))

	fmt.Print(math.Sqrt2)
}

repository: peterquiel/learngo

repo_name: peterquiel/learngo


text:
package http

import (
	"net/http"
	"time"
)

type Client struct {
	useragent string
	client    *http.Client
}

// A ClientOption is a functional option.
type ClientOption func(*clientOptions)

type clientOptions struct {
	clientTimeout time.Duration
	useragent     string
}

// WithClientTimeout sets the client timeout.
func WithClientTimeout(timeout time.Duration) ClientOption {
	return func(opts *clientOptions) { opts.clientTimeout = timeout }
}

// WithUserAgent sets the client user-agent.
func WithUserAgent(useragent string) ClientOption {
	return func(opts *clientOptions) { opts.useragent = useragent }
}

// NewClient returns a new http.Client with a default timeout.
func NewClient(options ...ClientOption) *Client {
	opts := clientOptions{clientTimeout: 10 * time.Second}

	for i := range options {
		options[i](&opts)
	}
	client := Client{client: &http.Client{Timeout: opts.clientTimeout}}

	if opts.useragent != "" {
		client.useragent = opts.useragent
	}
	return &client
}

func (c *Client) Do(req *http.Request) (*http.Response, error) {
	if c.useragent != "" {
		req.Header.Set("User-Agent", c.useragent)
	}
	return c.client.Do(req)
}

repository: thoas/picfit

repo_name: thoas/picfit