text:
package proxy

import (
	"encoding/base64"
	"fmt"
	"net/http"
	"net/url"

	"github.com/gorilla/mux"
	"github.com/pomerium/csrf"

	"github.com/pomerium/pomerium/internal/cryptutil"
	"github.com/pomerium/pomerium/internal/httputil"
	"github.com/pomerium/pomerium/internal/middleware"
	"github.com/pomerium/pomerium/internal/sessions"
	"github.com/pomerium/pomerium/internal/urlutil"
)

// registerDashboardHandlers returns the proxy service's ServeMux
func (p *Proxy) registerDashboardHandlers(r *mux.Router) *mux.Router {
	h := r.PathPrefix(dashboardURL).Subrouter()
	h.Use(middleware.SetHeaders(httputil.HeadersContentSecurityPolicy))
	// 1. Retrieve the user session and add it to the request context
	h.Use(sessions.RetrieveSession(p.sessionStore))
	// 2. AuthN - Verify the user is authenticated. Set email, group, & id headers
	h.Use(p.AuthenticateSession)
	// 3. Enforce CSRF protections for any non-idempotent http method
	h.Use(csrf.Protect(
		p.cookieSecret,
		csrf.Secure(p.cookieOptions.Secure),
		csrf.CookieName(fmt.Sprintf("%s_csrf", p.cookieOptions.Name)),
		csrf.ErrorHandler(httputil.HandlerFunc(httputil.CSRFFailureHandler)),
	))
	// dashboard endpoints can be used by user's to view, or modify their session
	h.Path("/").Handler(httputil.HandlerFunc(p.UserDashboard)).Methods(http.MethodGet)
	h.Path("/sign_out").HandlerFunc(p.SignOut).Methods(http.MethodGet, http.MethodPost)
	// admin endpoints authorization is also delegated to authorizer service
	admin := h.PathPrefix("/admin").Subrouter()
	admin.Path("/impersonate").Handler(httputil.HandlerFunc(p.Impersonate)).Methods(http.MethodPost)

	// Authenticate service callback handlers and middleware
	// callback used to set route-scoped session and redirect back to destination
	// only accept signed requests (hmac) from other trusted pomerium services
	c := r.PathPrefix(dashboardURL + "/callback").Subrouter()
	c.Use(middleware.ValidateSignature(p.SharedKey))

	c.Path("/").
		Handler(httputil.HandlerFunc(p.ProgrammaticCallback)).
		Methods(http.MethodGet).
		Queries(urlutil.QueryIsProgrammatic, "true")

	c.Path("/").Handler(httputil.HandlerFunc(p.Callback)).Methods(http.MethodGet)
	// Programmatic API handlers and middleware
	a := r.PathPrefix(dashboardURL + "/api").Subrouter()
	// login api handler generates a user-navigable login url to authenticate
	a.Path("/v1/login").Handler(httputil.HandlerFunc(p.ProgrammaticLogin)).
		Queries(urlutil.QueryRedirectURI, "").
		Methods(http.MethodGet)

	return r
}

// RobotsTxt sets the User-Agent header in the response to be "Disallow"
func (p *Proxy) RobotsTxt(w http.ResponseWriter, _ *http.Request) {
	w.Header().Set("Content-Type", "text/plain; charset=utf-8")
	w.WriteHeader(http.StatusOK)
	fmt.Fprintf(w, "User-agent: *\nDisallow: /")
}

// SignOut redirects the request to the sign out url. It's the responsibility
// of the authenticate service to revoke the remote session and clear
// the local session state.
func (p *Proxy) SignOut(w http.ResponseWriter, r *http.Request) {
	redirectURL := &url.URL{Scheme: "https", Host: r.Host, Path: "/"}
	if uri, err := urlutil.ParseAndValidateURL(r.FormValue(urlutil.QueryRedirectURI)); err == nil && uri.String() != "" {
		redirectURL = uri
	}

	signoutURL := *p.authenticateSignoutURL
	q := signoutURL.Query()
	q.Set(urlutil.QueryRedirectURI, redirectURL.String())
	signoutURL.RawQuery = q.Encode()

	p.sessionStore.ClearSession(w, r)
	httputil.Redirect(w, r, urlutil.NewSignedURL(p.SharedKey, &signoutURL).String(), http.StatusFound)
}

// UserDashboard lets users investigate, and refresh their current session.
// It also contains certain administrative actions like user impersonation.
//
// Nota bene: This endpoint does authentication, not authorization.
func (p *Proxy) UserDashboard(w http.ResponseWriter, r *http.Request) error {
	jwt, err := sessions.FromContext(r.Context())
	if err != nil {
		return err
	}
	var s sessions.State
	if err := p.encoder.Unmarshal([]byte(jwt), &s); err != nil {
		return httputil.NewError(http.StatusBadRequest, err)
	}

	p.templates.ExecuteTemplate(w, "dashboard.html", map[string]interface{}{
		"Session":           s,
		"csrfField":         csrf.TemplateField(r),
		"ImpersonateAction": urlutil.QueryImpersonateAction,
		"ImpersonateEmail":  urlutil.QueryImpersonateEmail,
		"ImpersonateGroups": urlutil.QueryImpersonateGroups,
	})
	return nil
}

// Impersonate takes the result of a form and adds user impersonation details
// to the user's current user sessions state if the user is currently an
// administrative user. Requests are redirected back to the user dashboard.
func (p *Proxy) Impersonate(w http.ResponseWriter, r *http.Request) error {
	redirectURL := urlutil.GetAbsoluteURL(r)
	redirectURL.Path = dashboardURL // redirect back to the dashboard
	signinURL := *p.authenticateSigninURL
	q := signinURL.Query()
	q.Set(urlutil.QueryRedirectURI, redirectURL.String())
	q.Set(urlutil.QueryImpersonateAction, r.FormValue(urlutil.QueryImpersonateAction))
	q.Set(urlutil.QueryImpersonateEmail, r.FormValue(urlutil.QueryImpersonateEmail))
	q.Set(urlutil.QueryImpersonateGroups, r.FormValue(urlutil.QueryImpersonateGroups))
	signinURL.RawQuery = q.Encode()
	httputil.Redirect(w, r, urlutil.NewSignedURL(p.SharedKey, &signinURL).String(), http.StatusFound)
	return nil
}

// Callback handles the result of a successful call to the authenticate service
// and is responsible setting returned per-route session.
func (p *Proxy) Callback(w http.ResponseWriter, r *http.Request) error {
	redirectURLString := r.FormValue(urlutil.QueryRedirectURI)
	encryptedSession := r.FormValue(urlutil.QuerySessionEncrypted)

	if _, err := p.saveCallbackSession(w, r, encryptedSession); err != nil {
		return httputil.NewError(http.StatusBadRequest, err)
	}
	httputil.Redirect(w, r, redirectURLString, http.StatusFound)
	return nil
}

// saveCallbackSession takes an encrypted per-route session token, and decrypts
// it using the shared service key, then stores it the local session store.
func (p *Proxy) saveCallbackSession(w http.ResponseWriter, r *http.Request, enctoken string) ([]byte, error) {
	// 1. extract the base64 encoded and encrypted JWT from query params
	encryptedJWT, err := base64.URLEncoding.DecodeString(enctoken)
	if err != nil {
		return nil, fmt.Errorf("proxy: malfromed callback token: %w", err)
	}
	// 2. decrypt the JWT using the cipher using the _shared_ secret key
	rawJWT, err := cryptutil.Decrypt(p.sharedCipher, encryptedJWT, nil)
	if err != nil {
		return nil, fmt.Errorf("proxy: callback token decrypt error: %w", err)
	}
	// 3. Save the decrypted JWT to the session store directly as a string, without resigning
	if err = p.sessionStore.SaveSession(w, r, rawJWT); err != nil {
		return nil, fmt.Errorf("proxy: callback session save failure: %w", err)
	}
	return rawJWT, nil
}

// ProgrammaticLogin returns a signed url that can be used to login
// using the authenticate service.
func (p *Proxy) ProgrammaticLogin(w http.ResponseWriter, r *http.Request) error {
	redirectURI, err := urlutil.ParseAndValidateURL(r.FormValue(urlutil.QueryRedirectURI))
	if err != nil {
		return httputil.NewError(http.StatusBadRequest, err)
	}
	signinURL := *p.authenticateSigninURL
	callbackURI := urlutil.GetAbsoluteURL(r)
	callbackURI.Path = dashboardURL + "/callback/"
	q := signinURL.Query()
	q.Set(urlutil.QueryCallbackURI, callbackURI.String())
	q.Set(urlutil.QueryRedirectURI, redirectURI.String())
	q.Set(urlutil.QueryIsProgrammatic, "true")
	signinURL.RawQuery = q.Encode()
	response := urlutil.NewSignedURL(p.SharedKey, &signinURL).String()

	w.Header().Set("Content-Type", "text/plain; charset=utf-8")
	w.WriteHeader(http.StatusOK)
	w.Write([]byte(response))
	return nil
}

// ProgrammaticCallback handles a successful call to the authenticate service.
// In addition to returning the individual route session (JWT) it also returns
// the refresh token.
func (p *Proxy) ProgrammaticCallback(w http.ResponseWriter, r *http.Request) error {
	redirectURLString := r.FormValue(urlutil.QueryRedirectURI)
	encryptedSession := r.FormValue(urlutil.QuerySessionEncrypted)

	redirectURL, err := urlutil.ParseAndValidateURL(redirectURLString)
	if err != nil {
		return httputil.NewError(http.StatusBadRequest, err)
	}

	rawJWT, err := p.saveCallbackSession(w, r, encryptedSession)
	if err != nil {
		return httputil.NewError(http.StatusBadRequest, err)
	}

	q := redirectURL.Query()
	q.Set(urlutil.QueryPomeriumJWT, string(rawJWT))
	q.Set(urlutil.QueryRefreshToken, r.FormValue(urlutil.QueryRefreshToken))
	redirectURL.RawQuery = q.Encode()
	httputil.Redirect(w, r, redirectURL.String(), http.StatusFound)
	return nil
}

repository: desimone/pomerium

repo_name: desimone/pomerium


text:
SUMMARY = "TES ITB for U-Boot (Arria 10)"
DESCRIPTION = "This recipe generates an U-Boot ITB image for the peripheral RBF."
SECTION = "bootloaders"
LICENSE = "CLOSED"
PR = "r0"

DEPENDS = "u-boot-tools-native dtc-native"

FILESEXTRAPATHS_prepend := "${TES_BIN}/u-boot:"

SRC_URI_append = " file://${MACHINE}/dreamchip_arria10som/dreamchip_arria10som_tes.core.rbf"
SRC_URI_append = " file://${MACHINE}/dreamchip_arria10som/dreamchip_arria10som_tes.periph.rbf"
SRC_URI_append = " file://${MACHINE}/dreamchip_arria10som/bootmmc_arria10som.scr"
SRC_URI_append = " file://${MACHINE}/dreamchip_arria10som/fit_spl_arria10som.its"
SRC_URI_append = " file://${MACHINE}/socdk/fit_spl_socdk.its"
SRC_URI_append = " file://${MACHINE}/socdk/socfpga_arria10_socdk_tes.rbf"
SRC_URI_append = " file://${MACHINE}/socdk/bootmmc.scr"

S = "${WORKDIR}"

do_compile () {
	echo PWD = $(pwd)
	mkimage -E -p 400 -f ${MACHINE}/socdk/fit_spl_socdk.its fit_spl_socdk.itb
	mkimage -E -p 400 -f ${MACHINE}/dreamchip_arria10som/fit_spl_arria10som.its fit_spl_arria10som.itb
	mkimage -T script -C none -n "bootmmc" -d ${S}/${MACHINE}/dreamchip_arria10som/bootmmc_arria10som.scr ${B}/bootmmc_arria10som.img
	mkimage -T script -C none -n "bootmmc" -d ${S}/${MACHINE}/socdk/bootmmc.scr ${B}/bootmmc_socdk.img
}
do_compile[depends] += " u-boot-mkimage-native:do_populate_sysroot"

do_install () {
	install -d ${D}/boot
	install -m 0755 ${S}/${MACHINE}/dreamchip_arria10som/boot*.scr ${D}/boot
	install -m 0755 ${B}/boot*.img ${D}/boot
}

inherit deploy
do_deploy() {
	install -m 0755 ${B}/*.img ${DEPLOYDIR}
	install -m 0755 ${B}/*.itb ${DEPLOYDIR}
	install -m 0755 ${S}/${MACHINE}/dreamchip_arria10som/dreamchip_arria10som_tes.core.rbf ${DEPLOYDIR}
}
addtask deploy after do_install before do_build

FILES_${PN} = " \
	boot/*.rbf \
	boot/boot*.scr \
	boot/boot*.img \
"

license: MIT

repository: c-thaler/meta-tes

license_type: permissive

repo_name: c-thaler/meta-tes

branch_name: refs/heads/master

extension: bb


text:
// A program that do nothing but sleep.
package main

import (
	"flag"
	"log"
	"time"
)

const TICK_SECS = 10000

var (
	tickSecs int64
	verbose  bool
)

func main() {
	flag.Parse()

	for _ = range time.Tick(time.Duration(tickSecs) * time.Second) {
		if verbose {
			log.Printf("tick!")
		}
	}
}

func init() {
	flag.Int64Var(&tickSecs, "tick", TICK_SECS, "tick seconds")
	flag.BoolVar(&verbose, "verbose", false, "verbose mode")
}

repository: bcho/noop

repo_name: bcho/noop

extension: go


text:
import $ from "jquery";
import {drawAnimation, angToRad} from "webgl/lib/util";
import Matrix4 from "webgl/lib/matrix/Matrix4";
import Slider from "webgl/lib/slider";
import {initShaders} from "webgl/lib/cuon-utils";
import VERT_SHADER from "../shader/TexturedQuad.vert!text";
import FRAG_SHADER from "../shader/TexturedQuad.frag!text";
var $canvas = $("#canvas");
var $tools = $("#tools");
var toolsWidth = $tools.width();
var toolsHeight = $tools.height();
var canvas = $canvas[0];
var width = $canvas.width();
var height = $canvas.height();
var gl = canvas.getContext("webgl");
var context = $tools[0].getContext("2d");
var angleSlider = new Slider(100, 50, -360, 360, 0, "angle");
var posXSlider = new Slider(100, 200, -1, 1, 0, "pos x");
var posYSlider = new Slider(100, 350, -1, 1, 0, "pos y");
var posZSlider = new Slider(100, 500, -1, 1, 0, "pos z");
angleSlider.captureMouse($tools);
posXSlider.captureMouse($tools);
posYSlider.captureMouse($tools);
posZSlider.captureMouse($tools);
initShaders(gl, VERT_SHADER, FRAG_SHADER);

var a_Position = gl.getAttribLocation(gl.program, "a_Position");
var a_TexCoord = gl.getAttribLocation(gl.program, "a_TexCoord");
var u_ModelMatrix = gl.getUniformLocation(gl.program, "u_ModelMatrix");
var u_Sampler = gl.getUniformLocation(gl.program, "u_Sampler");
var points = [
	//顶点坐标， 纹理坐标
	-0.5,  0.5, 0.0, 1.0,
	-0.5, -0.5, 0.0, 0.0,
	 0.5,  0.5, 1.0, 1.0,
	 0.5, -0.5, 1.0, 0.0,

	//  0.5, -0.5, 0.5, 0.0,
	 1.0, -0.5, 0.5, 0.0,
	 1.0,  0.5, 0.5, 1.0,
	 0.5,  0.5, 1.0, 1.0
];
var perPonitCount = 4;
var xformMatrix = new Matrix4();
var currenAngle = 0;
var image = new Image();
var imgLoad = false;

loadImg("../../resources/sky.jpg");
gl.clearColor(0.0, 0.0, 0.0, 1.0);
drawAnimation(()=>{
	animate();
	drawWebgl();
	draw2d();
});
function drawWebgl(){
	gl.clear(gl.COLOR_BUFFER_BIT);
	if(imgLoad)
	{
		draw();
	}
}
function draw(){
	translation();
	// initTextures();
	initLocation(gl, new Float32Array(points), {
		a_Position,
		a_TexCoord,
		u_ModelMatrix
	}, perPonitCount);
	gl.drawArrays(gl.TRIANGLE_STRIP, 0, points.length / perPonitCount);
}
function initLocation(gl, vertices, location, perPonitCount){
	var vertexBuffer = gl.createBuffer();
	var FSIZE = vertices.BYTES_PER_ELEMENT;
	gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);
	gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);
	gl.vertexAttribPointer(location.a_Position, 2, gl.FLOAT, false, FSIZE * perPonitCount, 0);
	gl.enableVertexAttribArray(location.a_Position);
	gl.vertexAttribPointer(location.a_TexCoord, 2, gl.FLOAT, false, FSIZE * perPonitCount, FSIZE * 2);
	gl.enableVertexAttribArray(location.a_TexCoord);
	gl.uniformMatrix4fv(location.u_ModelMatrix, false, xformMatrix.elements);

}

function loadImg(src){
	imgLoad = false;
	image.onload = function(){
		imgLoad = true;
		initTextures();
	};
	image.src = src;
}
window.loadImg = loadImg;
function initTextures(){
	var texTure = gl.createTexture();
	gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, 1);
	gl.activeTexture(gl.TEXTURE0);
	gl.bindTexture(gl.TEXTURE_2D, texTure);
	gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
	gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
	gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
	gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
	gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE, image);
	gl.uniform1i(u_Sampler, 0);
}

function translation(){
	xformMatrix.setRotate(currenAngle, 0, 0, 1);
	xformMatrix.translate(posXSlider.getValue(), posYSlider.getValue(), posZSlider.getValue());
}
function animate(){
	var now = Date.now();
	var elapsed = now - (animate.last ? animate.last : 0);
	animate.last = now;
	var newAngle = currenAngle + (angleSlider.getValue() * elapsed) / 1000.0;
	currenAngle = newAngle % 360;
}
function draw2d(){
	context.clearRect(0, 0, toolsWidth, toolsHeight);
	angleSlider.draw(context);
	posXSlider.draw(context);
	posYSlider.draw(context);
	posZSlider.draw(context);
}

repository: changelime/canvas

repo_name: changelime/canvas

extension: js


text:
@inproceedings{belloni2015EscapingLocal,
  title = {Escaping the Local Minima via Simulated Annealing: {{Optimization}} of Approximately Convex Functions},
  booktitle = {Proceedings of the 28th Conference on Learning Theory},
  author = {Belloni, Alexandre and Liang, Tengyuan and Narayanan, Hariharan and Rakhlin, Alexander},
  editor = {Gr{\"u}nwald, Peter and Hazan, Elad and Kale, Satyen},
  year = {2015},
  month = jul,
  volume = {40},
  pages = {240--265},
  publisher = {{PMLR}},
  address = {{Paris, France}},
  abstract = {We consider the problem of optimizing an approximately convex function over a bounded convex set in \textsuperscript{n} using only function evaluations. The problem is reduced to sampling from an log-concave distribution using the Hit-and-Run method, which is shown to have the same \textsuperscript{*} complexity as sampling from log-concave distributions. In addition to extend the analysis for log-concave distributions to approximate log-concave distributions, the implementation of the 1-dimensional sampler of the Hit-and-Run walk requires new methods and analysis. The algorithm then is based on simulated annealing which does not relies on first order conditions which makes it essentially immune to local minima. We then apply the method to different motivating problems. In the context of zeroth order stochastic convex optimization, the proposed method produces an {$\epsilon$}-minimizer after \textsuperscript{*}(n{$^7$}.5{$\epsilon^-$}2) noisy function evaluations by inducing a ({$\epsilon$}/n)-approximately log concave distribution. We also consider in detail the case when the ``amount of non-convexity'' decays towards the optimum of the function. Other applications of the method discussed in this work include private computation of empirical risk minimizers, two-stage stochastic programming, and approximate dynamic programming for online learning.},
  date-added = {2020-07-22 20:53:46 -0500},
  date-modified = {2020-07-22 20:53:46 -0500},
  file = {/Users/tliang/Zotero/storage/HQ8DB3SD/Belloni et al_2015_Escaping the local minima via simulated annealing.pdf},
  pdf = {http://proceedings.mlr.press/v40/Belloni15.pdf},
  series = {Proceedings of Machine Learning Research}
}

@article{cai2015LawLog,
  ids = {cai2015LawLog},
  title = {Law of Log Determinant of Sample Covariance Matrix and Optimal Estimation of Differential Entropy for High-Dimensional {{Gaussian}} Distributions},
  author = {Cai, T. Tony and Liang, Tengyuan and Zhou, Harrison H.},
  year = {2015},
  volume = {137},
  pages = {161--172},
  issn = {0047-259X},
  doi = {10.1016/j.jmva.2015.02.003},
  abstract = {Differential entropy and log determinant of the covariance matrix of a multivariate Gaussian distribution have many applications in coding, communications, signal processing and statistical inference. In this paper we consider in the high-dimensional setting optimal estimation of the differential entropy and the log-determinant of the covariance matrix. We first establish a central limit theorem for the log determinant of the sample covariance matrix in the high-dimensional setting where the dimension p(n) can grow with the sample size n. An estimator of the differential entropy and the log determinant is then considered. Optimal rate of convergence is obtained. It is shown that in the case p(n)/n\textrightarrow 0 the estimator is asymptotically sharp minimax. The ultra-high-dimensional setting where p(n)\textquestiondown n is also discussed.},
  bdsk-url-2 = {https://doi.org/10.1016/j.jmva.2015.02.003},
  date-added = {2020-07-22 21:21:30 -0500},
  date-modified = {2020-07-22 21:21:30 -0500},
  file = {/Users/tliang/Zotero/storage/CEQIRPAX/Cai et al_2015_Law of log determinant of sample covariance matrix and optimal estimation of.pdf},
  journal = {Journal of Multivariate Analysis},
  keywords = {Asymptotic optimality,Central limit theorem,Covariance matrix,Determinant,Differential entropy,Minimax lower bound,Sharp minimaxity}
}

@article{cai2016GeometricInference,
  ids = {cai2016GeometricInference},
  title = {Geometric Inference for General High-Dimensional Linear Inverse Problems},
  author = {Cai, T. Tony and Liang, Tengyuan and Rakhlin, Alexander},
  year = {2016},
  month = aug,
  volume = {44},
  pages = {1536--1563},
  publisher = {{The Institute of Mathematical Statistics}},
  doi = {10.1214/15-AOS1426},
  date-added = {2020-07-22 21:20:52 -0500},
  date-modified = {2020-07-22 21:20:52 -0500},
  file = {/Users/tliang/Zotero/storage/37ZGDJYK/Cai et al_2016_Geometric inference for general high-dimensional linear inverse problems.pdf},
  fjournal = {Annals of Statistics},
  journal = {The Annals of Statistics},
  number = {4}
}

@article{cai2017ComputationalStatistical,
  ids = {cai2017ComputationalStatistical},
  title = {Computational and Statistical Boundaries for Submatrix Localization in a Large Noisy Matrix},
  author = {Cai, T. Tony and Liang, Tengyuan and Rakhlin, Alexander},
  year = {2017},
  month = aug,
  volume = {45},
  pages = {1403--1430},
  publisher = {{The Institute of Mathematical Statistics}},
  doi = {10.1214/16-AOS1488},
  date-added = {2020-07-22 21:19:55 -0500},
  date-modified = {2020-07-22 21:19:55 -0500},
  file = {/Users/tliang/Zotero/storage/Z8UI2CYU/Cai et al_2017_Computational and statistical boundaries for submatrix localization in a large.pdf},
  fjournal = {Annals of Statistics},
  journal = {The Annals of Statistics},
  number = {4}
}

@article{cai2017DetectionStructural,
  ids = {cai2017DetectionStructural},
  title = {On Detection and Structural Reconstruction of Small-World Random Networks},
  author = {Cai, T. and Liang, T. and Rakhlin, A.},
  year = {2017},
  month = jul,
  volume = {4},
  pages = {165--176},
  issn = {2327-4697},
  doi = {10.1109/TNSE.2017.2703102},
  abstract = {In this paper, we study detection and fast reconstruction of the celebrated Watts-Strogatz (WS) small-world random graph model [29] which aims to describe real-world complex networks that exhibit both high clustering and short average length properties. The WS model with neighborhood size k and rewiring probability probability {$\beta$} can be viewed as a continuous interpolation between a deterministic ring lattice graph and the Erdos-Renyi random graph. We study the computational and statistical aspects of detection and recovery of the deterministic ring lattice structure (strong ties) in the presence of random connections (weak ties). The phase diagram in terms of (k, {$\beta$}) is shown to consist of several regions according to the difficulty of the problem. We propose distinct methods for these regions.},
  date-added = {2020-07-22 21:20:28 -0500},
  date-modified = {2020-07-22 21:20:28 -0500},
  file = {/Users/tliang/Zotero/storage/C2XDICXK/Cai et al_2017_On detection and structural reconstruction of small-world random networks.pdf},
  journal = {IEEE Transactions on Network Science and Engineering},
  keywords = {Complex networks,computational boundary,Computational modeling,continuous interpolation,detection,deterministic ring lattice graph,Erdos-Renyi random graph,fast reconstruction,graph theory,interpolation,Lattices,Mathematical model,random graphs,real-world complex networks,reconstruction,Small world networks,spectral analysis,Structural rings,Symmetric matrices,Testing,Watts-Strogatz small-world random graph model,WS model},
  number = {3}
}

@article{cai2020WeightedMessage,
  ids = {cai2020WeightedMessage},
  title = {Weighted Message Passing and Minimum Energy Flow for Heterogeneous Stochastic Block Models with Side Information},
  author = {Cai, T. Tony and Liang, Tengyuan and Rakhlin, Alexander},
  year = {2020},
  volume = {21},
  pages = {1--34},
  date-added = {2020-07-22 21:16:15 -0500},
  date-modified = {2020-07-22 21:16:15 -0500},
  file = {/Users/tliang/Zotero/storage/Y88CIPSX/Cai et al_2020_Weighted message passing and minimum energy flow for heterogeneous stochastic.pdf},
  journal = {Journal of Machine Learning Research},
  number = {11}
}

@article{dou2020TrainingNeural,
  ids = {dou2020TrainingNeural},
  title = {Training Neural Networks as Learning Data-Adaptive Kernels: {{Provable}} Representation and Approximation Benefits},
  author = {Dou, Xialiang and Liang, Tengyuan},
  year = {2020},
  volume = {0},
  pages = {1--14},
  publisher = {{Taylor \& Francis}},
  doi = {10.1080/01621459.2020.1745812},
  abstract = {AbstractConsider the problem: given the data pair (x,y) drawn from a population with f*(x)=E[y|x=x], specify a neural network model and run gradient flow on the weights over time until reaching any stationarity. How does ft, the function computed by the neural network at time t, relate to f*, in terms of approximation and representation? What are the provable benefits of the adaptive representation by neural networks compared to the prespecified fixed basis representation in the classical nonparametric literature? We answer the above questions via a dynamic reproducing kernel Hilbert space (RKHS) approach indexed by the training process of neural networks. First, we show that when reaching any local stationarity, gradient flow learns an adaptive RKHS representation and performs the global least-squares projection onto the adaptive RKHS, simultaneously. Second, we prove that as the RKHS is data-adaptive and task-specific, the residual for f* lies in a subspace that is potentially much smaller than the orthogonal complement of the RKHS. The result formalizes the representation and approximation benefits of neural networks. Finally, we show that the neural network function computed by gradient flow converges to the kernel ridgeless regression with an adaptive kernel, in the limit of vanishing regularization. The adaptive kernel viewpoint provides new angles of studying the approximation, representation, generalization, and optimization advantages of neural networks. Supplementary materials for this article are available online.},
  date-added = {2020-07-22 21:18:24 -0500},
  date-modified = {2020-07-22 21:18:24 -0500},
  eprint = {https://doi.org/10.1080/01621459.2020.1745812},
  file = {/Users/tliang/Zotero/storage/CECJIH3G/Dou_Liang_2020_Training neural networks as learning data-adaptive kernels.pdf},
  journal = {Journal of the American Statistical Association},
  number = {0}
}

@article{farrell2018DeepNeural,
  ids = {farrell2018DeepNeural,farrell2018DeepNeuralNetworksa},
  title = {Deep Neural Networks for Estimation and Inference},
  author = {Farrell, Max H and Liang, Tengyuan and Misra, Sanjog},
  year = {2018},
  month = sep,
  archivePrefix = {arXiv},
  date-added = {2020-07-24 09:11:35 -0500},
  date-modified = {2020-07-24 09:11:35 -0500},
  eprint = {1809.09953},
  eprinttype = {arxiv},
  file = {/Users/tliang/Zotero/storage/LJMVDZAH/Farrell et al_2018_Deep neural networks for estimation and inference.pdf},
  journal = {arXiv preprint arXiv:1809.09953, Econometrica, forthcoming},
  keywords = {Computer Science - Machine Learning,Economics - Econometrics,Mathematics - Statistics Theory,Statistics - Machine Learning}
}

@inproceedings{kale2017AdaptiveFeature,
  title = {Adaptive Feature Selection: {{Computationally}} Efficient Online Sparse Linear Regression under {{RIP}}},
  booktitle = {Proceedings of the 34th International Conference on Machine Learning},
  author = {Kale, Satyen and Karnin, Zohar and Liang, Tengyuan and P{\'a}l, D{\'a}vid},
  editor = {Precup, Doina and Teh, Yee Whye},
  year = {2017},
  month = aug,
  volume = {70},
  pages = {1780--1788},
  publisher = {{PMLR}},
  address = {{International Convention Centre, Sydney, Australia}},
  abstract = {Online sparse linear regression is an online problem where an algorithm repeatedly chooses a subset of coordinates to observe in an adversarially chosen feature vector, makes a real-valued prediction, receives the true label, and incurs the squared loss. The goal is to design an online learning algorithm with sublinear regret to the best sparse linear predictor in hindsight. Without any assumptions, this problem is known to be computationally intractable. In this paper, we make the assumption that data matrix satisfies restricted isometry property, and show that this assumption leads to computationally efficient algorithms with sublinear regret for two variants of the problem. In the first variant, the true label is generated according to a sparse linear model with additive Gaussian noise. In the second, the true label is chosen adversarially.},
  date-added = {2020-07-22 20:53:32 -0500},
  date-modified = {2020-07-22 20:53:32 -0500},
  file = {/Users/tliang/Zotero/storage/SQAJKQC6/Kale et al_2017_Adaptive feature selection.pdf},
  pdf = {http://proceedings.mlr.press/v70/kale17a/kale17a.pdf},
  series = {Proceedings of Machine Learning Research}
}

@inproceedings{liang2015LearningSquare,
  title = {Learning with Square Loss: {{Localization}} through Offset Rademacher Complexity},
  booktitle = {Proceedings of the 28th Conference on Learning Theory},
  author = {Liang, Tengyuan and Rakhlin, Alexander and Sridharan, Karthik},
  editor = {Gr{\"u}nwald, Peter and Hazan, Elad and Kale, Satyen},
  year = {2015},
  month = jul,
  volume = {40},
  pages = {1260--1285},
  publisher = {{PMLR}},
  address = {{Paris, France}},
  abstract = {We consider regression with square loss and general classes of functions without the boundedness assumption. We introduce a notion of offset Rademacher complexity that provides a transparent way to study localization both in expectation and in high probability. For any (possibly non-convex) class, the excess loss of a two-step estimator is shown to be upper bounded by this offset complexity through a novel geometric inequality. In the convex case, the estimator reduces to an empirical risk minimizer. The method recovers the results of 15 for the bounded case while also providing guarantees without the boundedness assumption.},
  date-added = {2020-07-22 20:53:40 -0500},
  date-modified = {2020-07-22 20:53:40 -0500},
  file = {/Users/tliang/Zotero/storage/NXEKPVND/Liang et al_2015_Learning with square loss.pdf},
  pdf = {http://proceedings.mlr.press/v40/Liang15.pdf},
  series = {Proceedings of Machine Learning Research}
}

@article{liang2018HowWell,
  ids = {liang2018HowWell,liang2018HowWellGenerative},
  title = {On How Well Generative Adversarial Networks Learn Densities: {{Nonparametric}} and Parametric Results},
  author = {Liang, Tengyuan},
  year = {2018},
  month = nov,
  archivePrefix = {arXiv},
  date-added = {2020-07-24 09:11:18 -0500},
  date-modified = {2020-07-24 09:11:18 -0500},
  eprint = {1811.03179},
  eprinttype = {arxiv},
  file = {/Users/tliang/Zotero/storage/KP5RM7IG/Liang_2018_On how well generative adversarial networks learn densities.pdf},
  journal = {arXiv preprint arXiv:1811.03179},
  keywords = {Computer Science - Machine Learning,Mathematics - Statistics Theory,Statistics - Machine Learning}
}

@article{liang2019EstimatingCertain,
  ids = {liang2019EstimatingCertain,liang2019EstimatingCertainIntegrala},
  title = {Estimating Certain Integral Probability Metric ({{IPM}}) Is as Hard as Estimating under the {{IPM}}},
  author = {Liang, Tengyuan},
  year = {2019},
  month = nov,
  archivePrefix = {arXiv},
  date-added = {2020-07-24 09:09:58 -0500},
  date-modified = {2020-07-24 09:09:58 -0500},
  eprint = {1911.00730},
  eprinttype = {arxiv},
  file = {/Users/tliang/Zotero/storage/FHRRQJCR/Liang_2019_Estimating certain integral probability metric (IPM) is as hard as estimating.pdf},
  journal = {arXiv preprint arXiv:1911.00730},
  keywords = {Mathematics - Statistics Theory,Statistics - Machine Learning}
}

@inproceedings{liang2019FisherraoMetric,
  ids = {liang2019FisherRaoMetric},
  title = {Fisher-Rao Metric, Geometry, and Complexity of Neural Networks},
  booktitle = {The 22nd International Conference on Artificial Intelligence and Statistics},
  author = {Liang, Tengyuan and Poggio, Tomaso and Rakhlin, Alexander and Stokes, James},
  editor = {Chaudhuri, Kamalika and Sugiyama, Masashi},
  year = {2019},
  month = apr,
  volume = {89},
  pages = {888--896},
  publisher = {{PMLR}},
  issn = {1938-7228},
  abstract = {We study the relationship between geometry and capacity measures for deep neural networks from an invariance viewpoint. We introduce a new notion of capacity \textemdash{} the Fisher-Rao norm \textemdash{} that possesses desirable invariance properties and is motivated by Information Geometry. We discover an analytical characterization of the new capacity measure, through which we establish norm-comparison inequalities and further show that the new measure serves as an umbrella for several existing norm-based complexity measures. We discuss upper bounds on the generalization error induced by the proposed measure. Extensive numerical experiments on CIFAR-10 support our theoretical findings. Our theoretical analysis rests on a key structural lemma about partial derivatives of multi-layer rectifier networks.},
  chapter = {Machine Learning},
  date-added = {2020-04-10 12:58:44 -0500},
  date-modified = {2020-07-22 20:59:43 -0500},
  file = {/Users/tliang/Zotero/storage/7NHSTYWQ/Liang et al_2019_Fisher-rao metric, geometry, and complexity of neural networks.pdf},
  pdf = {http://proceedings.mlr.press/v89/liang19a/liang19a.pdf},
  series = {Proceedings of Machine Learning Research}
}

@inproceedings{liang2019InteractionMatters,
  ids = {liang2019InteractionMatter,liang2019InteractionMattersa},
  title = {Interaction Matters: {{A}} Note on Non-Asymptotic Local Convergence of Generative Adversarial Networks},
  booktitle = {The 22nd International Conference on Artificial Intelligence and Statistics},
  author = {Liang, Tengyuan and Stokes, James},
  editor = {Chaudhuri, Kamalika and Sugiyama, Masashi},
  year = {2019},
  month = apr,
  volume = {89},
  pages = {907--915},
  publisher = {{PMLR}},
  issn = {1938-7228},
  abstract = {Motivated by the pursuit of a systematic computational and algorithmic understanding of Generative Adversarial Networks (GANs), we present a simple yet unified non-asymptotic local convergence theory for smooth two-player games, which subsumes several discrete-time gradient-based saddle point dynamics. The analysis reveals the surprising nature of the off-diagonal interaction term as both a blessing and a curse. On the one hand, this interaction term explains the origin of the slow-down effect in the convergence of Simultaneous Gradient Ascent (SGA) to stable Nash equilibria. On the other hand, for the unstable equilibria, exponential convergence can be proved thanks to the interaction term, for four modified dynamics proposed to stabilize GAN training: Optimistic Mirror Descent (OMD), Consensus Optimization (CO), Implicit Updates (IU) and Predictive Method (PM). The analysis uncovers the intimate connections among these stabilizing techniques, and provides detailed characterization on the choice of learning rate. As a by-product, we present a new analysis for OMD proposed in Daskalakis, Ilyas, Syrgkanis, and Zeng [2017] with improved rates.},
  chapter = {Machine Learning},
  date-added = {2020-07-22 20:53:17 -0500},
  date-modified = {2020-07-22 20:59:36 -0500},
  file = {/Users/tliang/Zotero/storage/7JN7WBZT/Liang_Stokes_2019_Interaction matters.pdf},
  pdf = {http://proceedings.mlr.press/v89/liang19b/liang19b.pdf},
  series = {Proceedings of Machine Learning Research}
}

@article{liang2019StatisticalInference,
  ids = {liang2019StatisticalInference},
  title = {Statistical Inference for the Population Landscape via Moment-Adjusted Stochastic Gradients},
  author = {Liang, Tengyuan and Su, Weijie J.},
  year = {2019},
  volume = {81},
  pages = {431--456},
  doi = {10.1111/rssb.12313},
  abstract = {Summary Modern statistical inference tasks often require iterative optimization methods to compute the solution. Convergence analysis from an optimization viewpoint informs us only how well the solution is approximated numerically but overlooks the sampling nature of the data. In contrast, recognizing the randomness in the data, statisticians are keen to provide uncertainty quantification, or confidence, for the solution obtained by using iterative optimization methods. The paper makes progress along this direction by introducing moment-adjusted stochastic gradient descent: a new stochastic optimization method for statistical inference. We establish non-asymptotic theory that characterizes the statistical distribution for certain iterative methods with optimization guarantees. On the statistical front, the theory allows for model misspecification, with very mild conditions on the data. For optimization, the theory is flexible for both convex and non-convex cases. Remarkably, the moment adjusting idea motivated from `error standardization' in statistics achieves a similar effect to acceleration in first-order optimization methods that are used to fit generalized linear models. We also demonstrate this acceleration effect in the non-convex setting through numerical experiments.},
  bdsk-url-2 = {https://doi.org/10.1111/rssb.12313},
  date-added = {2020-07-22 21:17:08 -0500},
  date-modified = {2020-07-22 21:17:08 -0500},
  eprint = {https://rss.onlinelibrary.wiley.com/doi/pdf/10.1111/rssb.12313},
  file = {/Users/tliang/Zotero/storage/WMQWR7DU/Liang_Su_2019_Statistical inference for the population landscape via moment-adjusted.pdf},
  journal = {Journal of the Royal Statistical Society: Series B (Statistical Methodology)},
  keywords = {Acceleration,Diffusion process,Discretized Langevin algorithm,Model misspecification,Non-asymptotic inference,Population landscape,Stochastic gradient methods},
  number = {2}
}

@article{liang2020JustInterpolate,
  ids = {liang2020JustInterpolate},
  title = {Just Interpolate: {{Kernel}} ``{{Ridgeless}}'' Regression Can Generalize},
  author = {Liang, Tengyuan and Rakhlin, Alexander},
  year = {2020},
  month = jun,
  volume = {48},
  pages = {1329--1347},
  publisher = {{The Institute of Mathematical Statistics}},
  doi = {10.1214/19-AOS1849},
  date-added = {2020-07-22 21:12:30 -0500},
  date-modified = {2020-07-22 21:12:30 -0500},
  file = {/Users/tliang/Zotero/storage/RIZSR7QD/Liang_Rakhlin_2020_Just interpolate.pdf},
  fjournal = {Annals of Statistics},
  journal = {The Annals of Statistics},
  number = {3},
  sici = {0090-5364(2020)48:3\textexclamdown 1329:JIKRRC\textquestiondown 2.0.CO;2-V}
}

@article{liang2020MehlerFormula,
  ids = {liang2020MehlerFormula,liang2020MehlerFormulaBranchingc},
  title = {Mehler's Formula, Branching Process, and Compositional Kernels of Deep Neural Networks},
  author = {Liang, Tengyuan and {Tran-Bach}, Hai},
  year = {2020},
  month = apr,
  archivePrefix = {arXiv},
  date-added = {2020-07-24 09:08:39 -0500},
  date-modified = {2020-07-24 09:08:39 -0500},
  eprint = {2004.04767},
  eprinttype = {arxiv},
  file = {/Users/tliang/Zotero/storage/Q33DAQF9/Liang_Tran-Bach_2020_Mehler's formula, branching process, and compositional kernels of deep neural.pdf},
  journal = {arXiv preprint arXiv:2004.04767},
  keywords = {Computer Science - Machine Learning,Mathematics - Statistics Theory,Statistics - Machine Learning}
}

@inproceedings{liang2020MultipleDescent,
  ids = {liang2020MultipleDescentMinimumNorma},
  title = {On the Multiple Descent of Minimum-Norm Interpolants and Restricted Lower Isometry of Kernels},
  booktitle = {Proceedings of Thirty Third Conference on Learning Theory},
  author = {Liang, Tengyuan and Rakhlin, Alexander and Zhai, Xiyu},
  editor = {Abernethy, Jacob and Agarwal, Shivani},
  year = {2020},
  month = jul,
  volume = {125},
  pages = {2683--2711},
  publisher = {{PMLR}},
  issn = {1938-7228},
  abstract = {We study the risk of minimum-norm interpolants of data in Reproducing Kernel Hilbert Spaces. Our upper bounds on the risk are of a multiple-descent shape for the various scalings of d = n\textsuperscript{{$\alpha$}}, {$\alpha\in$}(0,1), for the input dimension d and sample size n. Empirical evidence supports our finding that minimum-norm interpolants in RKHS can exhibit this unusual non-monotonicity in sample size; furthermore, locations of the peaks in our experiments match our theoretical predictions. Since gradient flow on appropriately initialized wide neural networks converges to a minimum-norm interpolant with respect to a certain kernel, our analysis also yields novel estimation and generalization guarantees for these over-parametrized models. At the heart of our analysis is a study of spectral properties of the random kernel matrix restricted to a filtration of eigen-spaces of the population covariance operator, and may be of independent interest.},
  chapter = {Machine Learning},
  file = {/Users/tliang/Zotero/storage/XC7NE2Y6/Liang et al_2020_On the multiple descent of minimum-norm interpolants and restricted lower.pdf},
  pdf = {http://proceedings.mlr.press/v125/liang20a/liang20a.pdf},
  series = {Proceedings of Machine Learning Research}
}

@article{liang2020PreciseHighdimensional,
  ids = {liang2020PreciseHighDimensionalAsymptotic,liang2020PreciseHighDimensionalAsymptotica},
  title = {A Precise High-Dimensional Asymptotic Theory for Boosting and Min-L1-Norm Interpolated Classifiers},
  author = {Liang, Tengyuan and Sur, Pragya},
  year = {2020},
  month = feb,
  archivePrefix = {arXiv},
  date-added = {2020-07-24 09:09:37 -0500},
  date-modified = {2020-07-24 09:09:37 -0500},
  eprint = {2002.01586},
  eprinttype = {arxiv},
  file = {/Users/tliang/Zotero/storage/WAWF6WEZ/Liang_Sur_2020_A precise high-dimensional asymptotic theory for boosting and min-l1-norm.pdf},
  journal = {arXiv preprint arXiv:2002.01586},
  keywords = {Computer Science - Information Theory,Computer Science - Machine Learning,Mathematics - Statistics Theory,Statistics - Machine Learning}
}

@inproceedings{tzen2018LocalOptimality,
  title = {Local Optimality and Generalization Guarantees for the Langevin Algorithm via Empirical Metastability},
  booktitle = {Proceedings of the 31st Conference on Learning Theory},
  author = {Tzen, Belinda and Liang, Tengyuan and Raginsky, Maxim},
  editor = {Bubeck, S{\'e}bastien and Perchet, Vianney and Rigollet, Philippe},
  year = {2018},
  month = jul,
  volume = {75},
  pages = {857--875},
  publisher = {{PMLR}},
  abstract = {We study the detailed path-wise behavior of the discrete-time Langevin algorithm for non-convex Empirical Risk Minimization (ERM) through the lens of metastability, adopting some techniques from Berglund and Gentz (2003). For a particular local optimum of the empirical risk, with an \emph{arbitrary initialization}, we show that, with high probability, at least one of the following two events will occur: (1) the Langevin trajectory ends up somewhere outside the {$\varepsilon$}-neighborhood of this particular optimum within a short \emph{recurrence time}; (2) it enters this {$\varepsilon$}-neighborhood by the recurrence time and stays there until a potentially exponentially long \emph{escape time}. We call this phenomenon \emph{empirical metastability}. This two-timescale characterization aligns nicely with the existing literature in the following two senses. First, the effective recurrence time (i.e., number of iterations multiplied by stepsize) is dimension-independent, and resembles the convergence time of continuous-time deterministic Gradient Descent (GD). However unlike GD, the Langevin algorithm does not require strong conditions on local initialization, and has the possibility of eventually visiting all optima. Second, the scaling of the escape time is consistent with the Eyring-Kramers law, which states that the Langevin scheme will eventually visit all local minima, but it will take an exponentially long time to transit among them. We apply this path-wise concentration result in the context of statistical learning to examine local notions of generalization and optimality.},
  date-added = {2020-07-22 20:53:24 -0500},
  date-modified = {2020-07-22 20:53:24 -0500},
  file = {/Users/tliang/Zotero/storage/P5UFPYZY/Tzen et al_2018_Local optimality and generalization guarantees for the langevin algorithm via.pdf},
  pdf = {http://proceedings.mlr.press/v75/tzen18a/tzen18a.pdf},
  series = {Proceedings of Machine Learning Research}
}

extension: bib


text:
@InProceedings{cheni14,
  supplementary = {Supplementary:cheni14-supp.pdf},
  title = {Stochastic Gradient Hamiltonian Monte Carlo},
  author = {Tianqi Chen and Emily Fox and Carlos Guestrin},
  pages = {1683-1691},
  abstract = {Hamiltonian Monte Carlo (HMC) sampling methods provide a mechanism for defining distant proposals with high acceptance probabilities in a Metropolis-Hastings framework, enabling more efficient exploration of the state space than standard random-walk proposals.  The popularity of such methods has grown significantly in recent years.  However, a limitation of HMC methods is the required gradient computation for simulation of the Hamiltonian dynamical system-such computation is infeasible in problems involving a large sample size or streaming data. Instead, we must rely on a noisy gradient estimate computed from a subset of the data.  In this paper, we explore the properties of such a stochastic gradient HMC approach. Surprisingly, the natural implementation of the stochastic approximation can be arbitrarily bad.  To address this problem we introduce a variant that uses second-order Langevin dynamics with a friction term that counteracts the effects of the noisy gradient, maintaining the desired target distribution as the invariant distribution.  Results on simulated data validate our theory.  We also provide an application of our methods to a classification task using neural networks and to online Bayesian matrix factorization.},
  section = {cycle-2},
}

repository: mreid/papersite

repo_name: mreid/papersite

gha_license_id: MIT

gha_language: TeX


text:
module.exports = {
    tpl:'{{each lst as value}}\

\

\

¥{{value.price}}
\

{{value.pn}}
\

\
        {{/each}}'
};

repository: HerbertKarajan/searchWeb

repo_name: HerbertKarajan/searchWeb


text:
// Code generated by smithy-go-codegen DO NOT EDIT.

package appmesh

import (
	"context"
	awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
	"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
	"github.com/aws/aws-sdk-go-v2/service/appmesh/types"
	"github.com/awslabs/smithy-go/middleware"
	smithyhttp "github.com/awslabs/smithy-go/transport/http"
)

// Creates a virtual node within a service mesh. A virtual node acts as a logical
// pointer to a particular task group, such as an Amazon ECS service or a
// Kubernetes deployment. When you create a virtual node, you can specify the
// service discovery information for your task group, and whether the proxy running
// in a task group will communicate with other proxies using Transport Layer
// Security (TLS). You define a listener for any inbound traffic that your virtual
// node expects. Any virtual service that your virtual node expects to communicate
// to is specified as a backend. The response metadata for your new virtual node
// contains the arn that is associated with the virtual node. Set this value
// (either the full ARN or the truncated resource name: for example,
// mesh/default/virtualNode/simpleapp) as the APPMESH_VIRTUAL_NODE_NAME environment
// variable for your task group's Envoy proxy container in your task definition or
// pod spec. This is then mapped to the node.id and node.cluster Envoy parameters.
// If you require your Envoy stats or tracing to use a different name, you can
// override the node.cluster value that is set by APPMESH_VIRTUAL_NODE_NAME with
// the APPMESH_VIRTUAL_NODE_CLUSTER environment variable. For more information
// about virtual nodes, see Virtual nodes
// (https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_nodes.html).
func (c *Client) CreateVirtualNode(ctx context.Context, params *CreateVirtualNodeInput, optFns ...func(*Options)) (*CreateVirtualNodeOutput, error) {
	if params == nil {
		params = &CreateVirtualNodeInput{}
	}

	result, metadata, err := c.invokeOperation(ctx, "CreateVirtualNode", params, optFns, addOperationCreateVirtualNodeMiddlewares)
	if err != nil {
		return nil, err
	}

	out := result.(*CreateVirtualNodeOutput)
	out.ResultMetadata = metadata
	return out, nil
}

//
type CreateVirtualNodeInput struct {

	// The name of the service mesh to create the virtual node in.
	//
	// This member is required.
	MeshName *string

	// The virtual node specification to apply.
	//
	// This member is required.
	Spec *types.VirtualNodeSpec

	// The name to use for the virtual node.
	//
	// This member is required.
	VirtualNodeName *string

	// Unique, case-sensitive identifier that you provide to ensure the idempotency of
	// the request. Up to 36 letters, numbers, hyphens, and underscores are allowed.
	ClientToken *string

	// The AWS IAM account ID of the service mesh owner. If the account ID is not your
	// own, then the account that you specify must share the mesh with your account
	// before you can create the resource in the service mesh. For more information
	// about mesh sharing, see Working with shared meshes
	// (https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html).
	MeshOwner *string

	// Optional metadata that you can apply to the virtual node to assist with
	// categorization and organization. Each tag consists of a key and an optional
	// value, both of which you define. Tag keys can have a maximum character length of
	// 128 characters, and tag values can have a maximum length of 256 characters.
	Tags []types.TagRef
}

//
type CreateVirtualNodeOutput struct {

	// The full description of your virtual node following the create call.
	//
	// This member is required.
	VirtualNode *types.VirtualNodeData

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

func addOperationCreateVirtualNodeMiddlewares(stack *middleware.Stack, options Options) (err error) {
	err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateVirtualNode{}, middleware.After)
	if err != nil {
		return err
	}
	err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateVirtualNode{}, middleware.After)
	if err != nil {
		return err
	}
	if err = addSetLoggerMiddleware(stack, options); err != nil {
		return err
	}
	if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
		return err
	}
	if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
		return err
	}
	if err = addResolveEndpointMiddleware(stack, options); err != nil {
		return err
	}
	if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
		return err
	}
	if err = addRetryMiddlewares(stack, options); err != nil {
		return err
	}
	if err = addHTTPSignerV4Middleware(stack, options); err != nil {
		return err
	}
	if err = awsmiddleware.AddAttemptClockSkewMiddleware(stack); err != nil {
		return err
	}
	if err = addClientUserAgent(stack); err != nil {
		return err
	}
	if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
		return err
	}
	if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
		return err
	}
	if err = addOpCreateVirtualNodeValidationMiddleware(stack); err != nil {
		return err
	}
	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
		return err
	}
	if err = addResponseErrorMiddleware(stack); err != nil {
		return err
	}
	if err = addRequestResponseLogging(stack, options); err != nil {
		return err
	}
	return nil
}

branch_name: refs/heads/main


text:
@INBOOK{Cardoso10IoSPlatSLAmodel,
pages = {3-17},
title = {IoS-Based Services, Platform Services, SLA and Models for the Internet	of Services},
publisher = {Springer Berlin Heidelberg},
year = {2011},
editor = {Cordeiro, Jos{\'e} and Ranchordas, AlpeshKumar and Shishkov, Boris},
author = {Cardoso, Jorge and Winkler, Matthias and Voigt, Konrad and Berthold,	Henrike},
volume = {50},
series = {Communications in Computer and Information Science},
abstract = {The Internet of Services (IoS) embraces new business and technological	models that can radically change the way day-to-day services are	provisioned and contracted. Within the IoS, services which were traditionally	not created based on an established science and operated without	a systematic approach, will be digitalized using proper methodologies,	standards, and tools. The digital specification of services will	enable their trading over the Internet using electronic marketplaces.	This paper provides four main contributions to the IoS research:	a definition and characterization for the concept of IoS-based service,	the role and importance of platform services for the IoS, the challenges	of managing SLA dependencies between IoS-based services in compositions,	and a model-based approach for service engineering that can be used	to design IoS-based services.},
booktitle = {Software and Data Technologies},
isbn = {978-3-642-20116-5},
owner = {Jorge Cardoso},
refid = {211},
timestamp = {2010.08.26},
url = {http://dx.doi.org/10.1007/978-3-642-20116-5_1},
webpdf = {/Papers/BC-2009-029-Springer-CCIS-Selec-Papers-ICSOFT09-IoS.pdf}}


text:
@INPROCEEDINGS{kharraz:2019:cryptojacking,
 AUTHOR = {Amin Kharraz and Zane Ma and Paul Murley and Charles Lever and Joshua Mason and Andrew Miller and Manos Antonakakis and Michael Bailey },
 TITLE = {{Outguard: Detecting In-Browser Covert Cryptocurrency Mining in the Wild}},
 BOOKTITLE = {28th Web Conference ({WWW} '19)},
 ADDRESS = {San Francisco, CA},
 MONTH = {May},
 DAY = {13--17},
 YEAR = {2019},
}

repository: zzma/website

repo_name: zzma/website

gha_language: SCSS


text:
@inproceedings{keane2002data,
  title={A data parallel approach for large-scale gaussian process modeling},
  author={Keane, A.J. and Choudhury, A. and Nair, P.B. and Choudhury, A.J.K.F. and Nair, PB},
  booktitle={in Proc. the Second SIAM International Conference on Data Mining},
  year={2002},
  organization={Citeseer}
}

@article{melkumyan2009sparse,
  title={A sparse covariance function for exact gaussian process inference in large datasets},
  author={Melkumyan, A. and Ramos, F.},
  journal={The 21st IJCAI},
  year={2009}
}

@book{rasmussen2006gaussian,
  title={Gaussian processes for machine learning},
  author={Rasmussen, C.E. and Williams, C.K.I.},
  volume={1},
  year={2006},
  publisher={MIT press Cambridge, MA}
}

@inproceedings{chandola2011implementing,
  title={Implementing a gaussian process learning algorithm in mixed parallel environment},
  author={Chandola, V. and Vatsavai, R.R.},
  booktitle={Proceedings of the second workshop on Scalable algorithms for large-scale systems},
  pages={3--6},
  year={2011},
  organization={ACM}
}

@article{aizerman1964theoretical,
  title={Theoretical foundations of the potential function method in pattern recognition learning},
  author={Aizerman, A. and Braverman, E.M. and Rozoner, LI},
  journal={Automation and remote control},
  volume={25},
  pages={821--837},
  year={1964}
}

@inproceedings{seeger2003fast,
  title={Fast forward selection to speed up sparse Gaussian process regression},
  author={Seeger, M. and Williams, C.K.I. and Lawrence, N.D.},
  booktitle={Workshop on AI and Statistics},
  volume={9},
  pages={2003},
  year={2003}
}

@article{lawrence2002fast,
  title={Fast sparse Gaussian process methods: The informative vector machine},
  author={Lawrence, N.D. and Seeger, M. and Herbrich, R.},
  journal={Advances in neural information processing systems},
  volume={15},
  pages={609--616},
  year={2002}
}

@article{balay2012petsc,
  title={PETSc Users Manual Revision 3.3},
  author={Balay, S. and Brown, J. and Buschelman, K. and Eijkhout, V. and Gropp, W. and Kaushik, D. and Knepley, M. and McInnes, L.C. and Smith, B. and Zhang, H.},
  year={2012}
}

@Misc{petsc-web-page,
  Author = "Satish Balay and Jed Brown and Kris Buschelman and William D. Gropp and Dinesh Kaushik and Matthew G. Knepley and Lois Curfman McInnes and Barry F. Smith and Hong Zhang",
  Title = "{PETSc} {W}eb page",
  Note = "http://www.mcs.anl.gov/petsc",
  Year = "2012"
}

@TechReport{petsc-user-ref,
  Author="Satish Balay and Jed Brown and and Kris Buschelman and Victor Eijkhout and William D.  Gropp and Dinesh Kaushik and Matthew G. Knepley and Lois Curfman McInnes and Barry F. Smith and Hong Zhang",
  Title = "{PETS}c Users Manual",
  Number = "ANL-95/11 - Revision 3.3",
  Institution = "Argonne National Laboratory",
  Year = "2012"
}

@InProceedings{petsc-efficient,
  Author = "Satish Balay and William D. Gropp and Lois Curfman McInnes and Barry F.  Smith",
  Title = "Efficient Management of Parallelism in Object Oriented Numerical Software Libraries",
  Booktitle = "Modern Software Tools in Scientific Computing",
  Editor = "E. Arge and A. M. Bruaset and H. P. Langtangen",
  Pages = "163--202",
  Publisher = "Birkh{\"{a}}user Press",
  Year = "1997"
}

@misc{hestenes1952methods,
  title={Methods of conjugate gradients for solving linear systems},
  author={Hestenes, M.R. and Stiefel, E.},
  year={1952},
  publisher={NBS}
}

@inproceedings{smola2001sparse,
  title={Sparse greedy Gaussian process regression},
  author={Smola, A.J. and Bartlett, P.},
  booktitle={Advances in Neural Information Processing Systems 13},
  year={2001},
  organization={Citeseer}
}

@article{williams2001using,
  title={Using the Nystrom method to speed up kernel machines},
  author={Williams, C.K.I. and Seeger, M.},
  journal={Advances in neural information processing systems},
  pages={682--688},
  year={2001},
  publisher={MIT; 1998}
}

repository: pjozog/sparse-gp-petsc

repo_name: pjozog/sparse-gp-petsc


text:
import React, { Component, PropTypes } from 'react';

class Text extends Component {
  render() {
    return (
      <text
        x={this.props.x}
        y={this.props.y}
        stroke={this.props.stroke}
      >
        {this.props.value}
      </text>
    );
  }
}

Text.propTypes = {
  x: PropTypes.number.isRequired,
  y: PropTypes.number.isRequired,
  value: PropTypes.string.isRequired,
  stroke: PropTypes.string,
};

export default Text;

repository: batazor/SVG-editor

repo_name: batazor/SVG-editor

gha_language: JavaScript


text:
@Manual{R-base,
  title = {R: A Language and Environment for Statistical Computing},
  author = {{R Core Team}},
  organization = {R Foundation for Statistical Computing},
  address = {Vienna, Austria},
  year = {2019},
  url = {https://www.R-project.org/},
}
@Manual{R-bookdown,
  title = {bookdown: Authoring Books and Technical Documents with R Markdown},
  author = {Yihui Xie},
  year = {2018},
  note = {R package version 0.9},
  url = {https://CRAN.R-project.org/package=bookdown},
}
@Manual{R-dplyr,
  title = {dplyr: A Grammar of Data Manipulation},
  author = {Hadley Wickham and Romain François and Lionel Henry and Kirill Müller},
  year = {2019},
  note = {R package version 0.8.0.1},
  url = {https://CRAN.R-project.org/package=dplyr},
}
@Manual{R-kableExtra,
  title = {kableExtra: Construct Complex Table with 'kable' and Pipe Syntax},
  author = {Hao Zhu},
  year = {2019},
  note = {R package version 1.1.0},
  url = {https://CRAN.R-project.org/package=kableExtra},
}
@Manual{R-knitr,
  title = {knitr: A General-Purpose Package for Dynamic Report Generation in R},
  author = {Yihui Xie},
  year = {2019},
  note = {R package version 1.22},
  url = {https://CRAN.R-project.org/package=knitr},
}
@Manual{R-pander,
  title = {pander: An R 'Pandoc' Writer},
  author = {Gergely Daróczi and Roman Tsegelskyi},
  year = {2018},
  note = {R package version 0.6.3},
  url = {https://CRAN.R-project.org/package=pander},
}
@Manual{R-reshape2,
  title = {reshape2: Flexibly Reshape Data: A Reboot of the Reshape Package},
  author = {Hadley Wickham},
  year = {2017},
  note = {R package version 1.4.3},
  url = {https://CRAN.R-project.org/package=reshape2},
}
@Manual{R-rmarkdown,
  title = {rmarkdown: Dynamic Documents for R},
  author = {JJ Allaire and Yihui Xie and Jonathan McPherson and Javier Luraschi and Kevin Ushey and Aron Atkins and Hadley Wickham and Joe Cheng and Winston Chang and Richard Iannone},
  year = {2019},
  note = {R package version 1.12},
  url = {https://CRAN.R-project.org/package=rmarkdown},
}
@Manual{R-stringr,
  title = {stringr: Simple, Consistent Wrappers for Common String Operations},
  author = {Hadley Wickham},
  year = {2019},
  note = {R package version 1.4.0},
  url = {https://CRAN.R-project.org/package=stringr},
}
@Manual{R-tidyr,
  title = {tidyr: Easily Tidy Data with 'spread()' and 'gather()' Functions},
  author = {Hadley Wickham and Lionel Henry},
  year = {2019},
  note = {R package version 0.8.3},
  url = {https://CRAN.R-project.org/package=tidyr},
}
@Manual{R-xtable,
  title = {xtable: Export Tables to LaTeX or HTML},
  author = {David B. Dahl and David Scott and Charles Roosen and Arni Magnusson and Jonathan Swinton},
  year = {2019},
  note = {R package version 1.8-4},
  url = {https://CRAN.R-project.org/package=xtable},
}

repository: ap-research/handbook

repo_name: ap-research/handbook


text:
DESCRIPTION = ""List::Util" contains a selection of subroutines that people have expressed \
would be nice to have in the perl core, but the usage would not really be \
high enough to warrant the use of a keyword, and the size so small such \
that being individual extensions would be wasteful."

SECTION = "libs"
LICENSE = "Artisticv1 | GPLv1+"
PR = "r0"

MAINTAINER=	"Poky <poky@yoctoproject.org>"
HOMEPAGE=	"https://metacpan.org/release/Scalar-List-Utils"

LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Artistic-1.0;md5=cda03bbdc3c1951996392b872397b798 \
file://${COMMON_LICENSE_DIR}/GPL-1.0;md5=e9e36a9de734199567a4d769498f743d"

SRC_URI = "https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Scalar-List-Utils-1.50.tar.gz"

SRC_URI[md5sum] = "136313884d1afa2fb6840695a1034b2c"
SRC_URI[sha256sum] = "06aab9c693380190e53be09be7daed20c5d6278f71956989c24cca7782013675"

S = "${WORKDIR}/Scalar-List-Utils-${PV}"

inherit cpan

BBCLASSEXTEND = "native"

repository: CELLINKAB/meta-cpan

repo_name: CELLINKAB/meta-cpan


text:
@article{https://doi.org/10.1002/eap.1507,
author = {Bishop-Taylor, Robbi and Tulbure, Mirela G. and Broich, Mark},
title = {Surface-water dynamics and land use influence landscape connectivity across a major dryland region},
journal = {Ecological Applications},
volume = {27},
number = {4},
pages = {1124-1137},
keywords = {Australia, flooding, graph theory, land use, Landsat, landscape connectivity, Murray-Darling Basin, protected areas, surface-water dynamics, wetlands},
doi = {https://doi.org/10.1002/eap.1507},
url = {https://esajournals.onlinelibrary.wiley.com/doi/abs/10.1002/eap.1507},
eprint = {https://esajournals.onlinelibrary.wiley.com/doi/pdf/10.1002/eap.1507},
abstract = {Abstract Landscape connectivity is important for the long-term persistence of species inhabiting dryland freshwater ecosystems, with spatiotemporal surface-water dynamics (e.g., flooding) maintaining connectivity by both creating temporary habitats and providing transient opportunities for dispersal. Improving our understanding of how landscape connectivity varies with respect to surface-water dynamics and land use is an important step to maintaining biodiversity in dynamic dryland environments. Using a newly available validated Landsat TM and ETM+ surface-water time series, we modelled landscape connectivity between dynamic surface-water habitats within Australia's 1 million km2 semiarid Murray Darling Basin across a 25-yr period (1987–2011). We identified key habitats that serve as well-connected “hubs,” or “stepping-stones” that allow long-distance movements through surface-water habitat networks. We compared distributions of these habitats for short- and long-distance dispersal species during dry, average, and wet seasons, and across land-use types. The distribution of stepping-stones and hubs varied both spatially and temporally, with temporal changes driven by drought and flooding dynamics. Conservation areas and natural environments contained higher than expected proportions of both stepping-stones and hubs throughout the time series; however, highly modified agricultural landscapes increased in importance during wet seasons. Irrigated landscapes contained particularly high proportions of well-connected hubs for long-distance dispersers, but remained relatively disconnected for less vagile organisms. The habitats identified by our study may serve as ideal high-priority targets for land-use specific management aimed at maintaining or improving dispersal between surface-water habitats, potentially providing benefits to biodiversity beyond the immediate site scale. Our results also highlight the importance of accounting for the influence of spatial and temporal surface-water dynamics when studying landscape connectivity within highly variable dryland environments.},
year = {2017}
}


text:
include_guard(GLOBAL)

include(cpfStringUtilities)

# This module contains functions that are used to retrieve cmake variables and cache-variables that
# are defined in .cmake files.

#---------------------------------------------------------------------------------------------
# Returns the names, types, values and descriptions of cache variables that are defined in a given file.
#
#
function( cpfGetCacheVariablesDefinedInFile variableNamesOut variableValuesOut variableTypesOut variableDescriptionsOut absFilePath )

	# get and store original chache state
	cpfReadCurrentCacheVariables( cacheVariablesBefore cacheValuesBefore cacheTypesBefore cacheDescriptionsBefore)

	# clear the cache so we can read all variables from the file
	cpfClearAllCacheVariables()

	# load cache variables from file
	include("${absFilePath}")
	cpfReadCurrentCacheVariables( cacheVariablesFile cacheValuesFile cacheTypesFile cacheDescriptionsFile)

	# clear the cache changes from the include
	cpfClearAllCacheVariables()

	# restore the cache from before the include
	set(index 0)
	foreach(variable ${cacheVariablesBefore})
		list(GET cacheValuesBefore ${index} value )
		list(GET cacheTypesBefore ${index} type )
		list(GET cacheDescriptionsBefore ${index} description )
		set( ${variable} "${value}" CACHE ${type} "${description}" FORCE )
		cpfIncrement(index)
	endforeach()

	set( ${variableNamesOut} "${cacheVariablesFile}" PARENT_SCOPE)
	set( ${variableValuesOut} "${cacheValuesFile}" PARENT_SCOPE)
	set( ${variableTypesOut} "${cacheTypesFile}" PARENT_SCOPE)
	set( ${variableDescriptionsOut} "${cacheDescriptionsFile}" PARENT_SCOPE)

endfunction()

#---------------------------------------------------------------------------------------------
# Returns the names, values, types and descriptions of the currently defined cache variabls.
# For variable values that are lists, the function escapes the separation ; with on \
function( cpfReadCurrentCacheVariables variableNamesOut variableValuesOut variableTypesOut variableDescriptionsOut )

	get_cmake_property( cacheVariables CACHE_VARIABLES)
	rotateCacheVariableWithAllValuesToTheFront(cacheVariables "${cacheVariables}") # We have to do this to make sure we later do net append empty elements to empty lists.
	set(cacheValues)
	set(cacheTypes)
	set(cacheDescriptions)

	foreach(variable ${cacheVariables})

		# values
		cpfGetCacheVariableValues( value type helpString ${variable})

		cpfListLength(valueLength "${value}")
		if( ${valueLength} GREATER 1)
			# for lists one escape level is needed to get a list of lists
			cpfJoinString( escapedList "${value}" "\\\\;")
			list(APPEND cacheValues "${escapedList}")
		else()
			list(APPEND cacheValues "${value}")
		endif()
		list(APPEND cacheTypes ${type})
		list(APPEND cacheDescriptions "${helpString}")

	endforeach()

	# assert that all lists are of the same length
	cpfListLength(namesLength "${cacheVariables}" )
	cpfListLength(valuesLength "${cacheValues}" )
	cpfListLength(typesLength "${cacheTypes}" )
	cpfListLength(descriptionsLength "${cacheDescriptions}" )
	if(NOT ( (${namesLength} EQUAL ${valuesLength}) AND (${namesLength} EQUAL ${typesLength}) AND(${namesLength} EQUAL ${descriptionsLength}) ))
		message("Length names: ${namesLength}")
		message("Length values: ${valuesLength}")
		message("Length types: ${typesLength}")
		message("Length descriptions: ${descriptionsLength}")
		message(FATAL_ERROR "Not all cache variables have all properties defined in function readCurrentCacheVariables().")
	endif()

	set( ${variableNamesOut} "${cacheVariables}" PARENT_SCOPE)
	set( ${variableValuesOut} "${cacheValues}" PARENT_SCOPE)
	set( ${variableTypesOut} "${cacheTypes}" PARENT_SCOPE)
	set( ${variableDescriptionsOut} "${cacheDescriptions}" PARENT_SCOPE)

endfunction()

#---------------------------------------------------------------------------------------------
# The function goes through the list of cache variables and finds the first that has a value,
# a type and a helpsting. It puts this variable at the top of the returned list.
function( rotateCacheVariableWithAllValuesToTheFront variablesOut variables)

	set(index 0)
	foreach(variable ${variables})
		cpfGetCacheVariableValues( value type helpstring ${variable})
		if(value AND type AND helpstring)
			# exchange variables
			list(REMOVE_AT variables ${index})
			list(INSERT variables 0 ${variable})
			set(${variablesOut} "${variables}" PARENT_SCOPE)
			return()
		endif()
		cpfIncrement(index)
	endforeach()
	message(FATAL_ERROR "There was no cache variable that has all values defined.")

endfunction()

#---------------------------------------------------------------------------------------------
function( cpfGetCacheVariableValues valueOut typeOut helpstringOut variable)

	set(${valueOut} ${${variable}} PARENT_SCOPE)
	get_property( type CACHE ${variable} PROPERTY TYPE )
	set(${typeOut} ${type} PARENT_SCOPE)
	get_property( helpString CACHE ${variable} PROPERTY HELPSTRING )
	set(${helpstringOut} ${helpString} PARENT_SCOPE)

endfunction()

#---------------------------------------------------------------------------------------------
# Removes all variables from the cache
#
function( cpfClearAllCacheVariables )
	get_cmake_property( cacheVariables CACHE_VARIABLES)
	foreach(variable ${cacheVariables})
		unset(${variable} CACHE)
	endforeach()
endfunction()

#---------------------------------------------------------------------------------------------
# Gets the names and values of all normal variables that are defined in the given file
function( cpfReadVariablesFromFile variablesOut valuesOut absFilePath )

	# Unset all variables so we can identify the ones that came from the include.
	cpfClearAllVariablesExcept("variablesOut;valuesOut;absFilePath")

	# Read the variables from the file.
	include("${absFilePath}")
	cpfReadCurrentVariables( variables values )

	set(${variablesOut} "${variables}" PARENT_SCOPE)
	set(${valuesOut} "${values}" PARENT_SCOPE)

endfunction()

#---------------------------------------------------------------------------------------------
# Unsets all variables in the current scope.
function( cpfClearAllVariablesExcept notClearedVariables )

	get_cmake_property(variableNames VARIABLES)
	foreach(variable ${variableNames})
		cpfContains(isException "${notClearedVariables}" "${variable}" )
		if(NOT isException)
			unset(${variable} PARENT_SCOPE)
		endif()
	endforeach()

endfunction()

#---------------------------------------------------------------------------------------------
# Returns the names, values, types and descriptions of the currently defined cache variabls.
# For variable values that are lists, the function escapes the separation ; with on \
function( cpfReadCurrentVariables variableNamesOut variableValuesOut )

	set(values)

	get_cmake_property(variableNames VARIABLES)
	foreach(variable ${variableNames})

		set(value ${${variable}})
		cpfListLength(valueLength "${value}")
		if( ${valueLength} GREATER 1)
			# for lists one escape level is needed to get a list of lists
			cpfJoinString( escapedList "${value}" "\\\\;")
			list(APPEND values "${escapedList}")
		else()
			list(APPEND values "${value}")
		endif()

	endforeach()

	set(${variableNamesOut} "${variableNames}" PARENT_SCOPE)
	set(${variableValuesOut} "${values}" PARENT_SCOPE)

endfunction()

repository: Knitschi/CPFCMake

repo_name: Knitschi/CPFCMake

extension: cmake


text:
// Auth Plugin
import fp from 'fastify-plugin'
import fastifyJwt from 'fastify-jwt'
import auth from './provider'
import User from '~/api/users/model'
import decorators from './decorators'
import sessionModel from '~/api/sessions/model'

import { router, jwt } from '~/config'

/**
 * Get router prefix
 * */
const {
    options: { prefix },
} = router

/**
 * Define Auth Plugin
 * @param {app} app instance
 * @param {options} options of app instance
 * @param {next} pass next function
 * */
const plugin = async (app, options, next) => {
    /**
	 * Register authentication dependencies
	 * */
    app.register(decorators)
    app.register(fastifyJwt, { secret: jwt.secret, ...jwt.options })
    /**
	 * Authentication route
	 * */
    app.route({
        url: `${prefix}/auth/:provider`,
        method: ['GET'],
        handler: async (
            { query: { accessToken }, params: { provider } },
            reply
        ) => {
            try {
                /**
				 * Authenticate user at selected provider and
				 * create a user if not exist or update existed user
				 * */
                const providerUser = await auth[provider](accessToken)
                const { _id, role } = await User.createFromService(
                    providerUser
                )
                /**
				 * Create jwt id and sign token
				 * */
                const jwtid = new app.mongoose.Types.ObjectId()
                const token = await app.jwt.sign({
                    _id,
                    role,
                    jwtid,
                })

                /**
				 * Create session and count sessions ststic
				 * */
                await sessionModel.createAndtruncateSessions({
                    jwtid,
                    author: _id,
                    maxSessionCount: jwt.maxSessionCount,
                })

                return {
                    token,
                    ...providerUser,
                }
            } catch (error) {
                reply.unauthorized(error.message)
            }
        },
        schema: {
            query: {
                type: 'object',
                properties: {
                    accessToken: {
                        type: 'string',
                    },
                },
                required: ['accessToken'],
            },
            params: {
                type: 'object',
                properties: {
                    provider: {
                        type: 'string',
                        enum: ['microsoft', 'google'],
                    },
                },
                required: ['provider'],
            },
        },
    })

    // Pass next
    next()
}

export default fp(plugin, {
    fastify: '3.x',
    name: 'auth',
})

repository: tguelcan/backend

repo_name: tguelcan/backend


text:
@misc{van2021insectchange,
 author = {Van Klink, Roel and Bowler, Diana E and Comay, Orr and Driessen, Michael M and Ernest, SK Morgan and Gentile, Alessandro and Gilbert, Francis and Gongalsky, Konstantin B and Owen, Jennifer and Pe'er, Guy and others},
 title = {InsectChange: a global database of temporal changes in insect and arachnid assemblages},
 year = {2021}
}

repository: weecology/website

repo_name: weecology/website


text:
/**
 * Created by Administrator on 2017/5/11 0011.
 */
export  default {
unit:[
    {name:"是" ,code:"1",desc:"医院列表单位"},
    {name:"否" ,code:"2",desc:"医院列表单位"}
],
    Drug:[
        {name:"上架" ,code:"1",desc:"药品列表"},
        {name:"下架" ,code:"2",desc:"药品列表"}
    ]
}

repository: Ilookgood/vueElment

repo_name: Ilookgood/vueElment


text:
package main

import (
	"database/sql"
	"fmt"

	"github.com/kjk/stackoverflow"
	"github.com/lib/pq"
)

func importCommentsIntoDB(r *stackoverflow.Reader, db *sql.DB) (int, error) {
	txn, err := db.Begin()
	if err != nil {
		return 0, err
	}

	defer func() {
		if txn != nil {
			txn.Rollback()
		}
	}()

	stmt, err := txn.Prepare(pq.CopyIn("comments",
		"id",
		"post_id",
		"score",
		"text",
		"creation_date",
		"user_id",
		"user_display_name",
	))
	if err != nil {
		err = fmt.Errorf("txt.Prepare() failed with %s", err)
		return 0, err
	}
	n := 0
	for r.Next() {
		c := &r.Comment
		_, err = stmt.Exec(
			c.ID,
			c.PostID,
			c.Score,
			c.Text,
			c.CreationDate,
			c.UserID,
			c.UserDisplayName,
		)
		if err != nil {
			LogVerbosef("c: %+v\n", c)
			err = fmt.Errorf("stmt.Exec() failed with %s", err)
			return 0, err
		}
		n++
	}
	if err = r.Err(); err != nil {
		return 0, err
	}
	_, err = stmt.Exec()
	if err != nil {
		err = fmt.Errorf("stmt.Exec() failed with %s", err)
		return 0, err
	}
	err = stmt.Close()
	if err != nil {
		err = fmt.Errorf("stmt.Close() failed with %s", err)
		return 0, err
	}
	err = txn.Commit()
	txn = nil
	if err != nil {
		err = fmt.Errorf("txn.Commit() failed with %s", err)
		return 0, err
	}
	return n, nil
}

func importComments(siteName string, db *sql.DB) (int, error) {
	reader, err := getStackOverflowReader(siteName, "Comments")
	if err != nil {
		return 0, err
	}
	defer reader.Close()

	r, err := stackoverflow.NewCommentsReader(reader)
	if err != nil {
		return 0, fmt.Errorf("stackoverflow.NewCommentsReader() failed with %s", err)
	}
	defer r.Close()
	return importCommentsIntoDB(r, db)
}

repository: kjk/dbworkbench

repo_name: kjk/dbworkbench


text:
#base recipe: /meta/recipes-extended/minicom/minicom_2.7.bb
# base branch: master
# base commit: 7e4cc9892dc72bfd360855940e715f8d43186053
#

SUMMARY = "Text-based modem control and terminal emulation program"
DESCRIPTION = " Minicom is a text-based modem control and terminal emulation \
		program for Unix-like operating systems"
HOMEPAGE = "https://alioth.debian.org/projects/minicom/"

PR = "r0"
inherit debian-package

DEPENDS = "ncurses"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "\
	file://COPYING;md5=420477abc567404debca0a2a1cb6b645 \
	file://src/minicom.h;beginline=1;endline=12;md5=a58838cb709f0db517f4e42730c49e81"

inherit autotools gettext pkgconfig

repository: nghiaht-tsdv/meta-debian

repo_name: nghiaht-tsdv/meta-debian

branch_name: refs/heads/jethro

gha_language: BitBake


text:
#
# Base recipe: meta/recipes-graphics/xorg-app/xeyes_1.1.1.bb
# Base branch: daisy
#

SUMMARY = "X11 eyes that follow the mouse cursor demo"
DESCRIPTION = "Xeyes is a small X11 application that shows a pair of eyes that move to \
follow the location of the mouse cursor around the screen."

require xorg-app-common.inc

PR = "${INC_PR}.0"

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=3ea51b365051ac32d1813a7dbaa4bfc6"

DPN = "x11-apps"

DEPENDS += "libxt libxext libxmu libxrender"

# Apply patch by quilt
DEBIAN_PATCH_TYPE = "quilt"

S = "${DEBIAN_UNPACK_DIR}/xeyes"