text stringlengths 3.08k 10.4k |
|---|
// Copyright 2020 Google LLC. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... |
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
package storage
import (
"encoding/json"
"fmt"
"testing"
"time"
"github.com/stretchr/testify/require"
)
func TestRDBTUFFileJSONUnmarshalling(t *testing.T) {
created := time.Now().AddDate(-1, -1, -1)
updated := time.Now().AddDate(0, -5, 0)
deleted := time.Time{}
data := []byte("Hello world")
createdMarshal... |
// Copyright © 2017 <NAME> <<EMAIL>>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... |
/*
Package validate (go-validate) provides validations for struct fields based on a validation tag and offers additional validation functions.
*/
package validate
import (
"log"
"reflect"
"strings"
"sync"
)
// DefaultMap is the default validation map used to tell if a struct is valid.
var DefaultMap ... |
/*
Package mb (short for Metricbeat) contains the public interfaces that are used
to implement Modules and their associated MetricSets.
*/
package mb
import (
"fmt"
"time"
"github.com/elastic/beats/libbeat/common"
"github.com/elastic/beats/libbeat/processors"
)
const (
// ModuleData is the key us... |
// Copyright 2021 Chaos Mesh Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... |
// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the Lic... |
package streamcache
import (
"errors"
"fmt"
"io"
"os"
"sync"
)
// Pipes
//
// +-------+
// | | <- *pipeReader <- Read()
// Write() -> | *pipe | |
// | | <- *pipeReader <- Read()
// +-------+ | |
// | | |
// ... |
package proxy
import (
"fmt"
"net"
"strconv"
"time"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/pkg/healthcheck"
"github.com/coredns/coredns/plugin/pkg/parse"
"github.com/coredns/coredns/plugin/pkg/tls"
"github.com/caddyserver/caddy/caddyfile"
"github.com/miekg/dns"
)
type static... |
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
package kbuilder
import (
"fmt"
"reflect"
"strconv"
"strings"
"github.com/pkg/errors"
"github.com/vingarcia/ksql"
"github.com/vingarcia/ksql/internal/structs"
)
// Query is is the struct template for building SELECT queries.
type Query struct {
// Select expects either a struct using the `ksql` tags
// or a... |
package v1alpha1
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
const (
// Raw constant for DataType
Raw = "raw"
// Rate constant for DataType
Rate = "rate"
// Histogram constant for DataType
Histogram = "histogram"
)
var ... |
// Package worker provides general purpose worker mechanism that outputs stacktrace when given job panics.
package worker
import (
"context"
"errors"
"fmt"
"github.com/oklahomer/go-kasumi/logger"
"runtime"
"strings"
"time"
)
var (
// ErrEnqueueAfterWorkerShutdown is returned when job is given after worker con... |
package service
import (
"fmt"
"os"
"sort"
"strings"
"text/tabwriter"
"time"
applabels "github.com/openshift/odo/pkg/application/labels"
cmplabels "github.com/openshift/odo/pkg/component/labels"
"github.com/openshift/odo/pkg/log"
"github.com/openshift/odo/pkg/machineoutput"
svc "github.com/openshift/odo/pk... |
/*
(C) Copyright IBM Corp. 2021
SPDX-License-Identifier: Apache-2.0
*/
package main
import (
"errors"
"flag"
"fmt"
"os"
// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
// to ensure that exec-entrypoint and run can make use of them.
_ "k8s.io/client-go/plugin/pkg/client/auth"
"k8s... |
package avc
import (
"encoding/binary"
"errors"
"fmt"
"io"
"io/ioutil"
)
var ErrCannotParseAVCExtension = errors.New("Cannot parse SPS extensions")
var ErrLengthSize = errors.New("Can only handle 4byte NAL length size")
//AVCDecConfRec - AVCDecoderConfigurationRecord
type AVCDecConfRec struct {
AVCProfileIndic... |
package advanced
import (
"encoding/json"
"errors"
"fmt"
"gateway/core/request"
corevm "gateway/core/vm"
"gateway/model"
"io"
"sync/atomic"
"github.com/robertkrimen/otto"
)
// RequestPreparer is a function that will turn the json.RawMessage and the RemoteEndpoint model into an initialized
// request.
type R... |
package gokenall
import (
"archive/zip"
"bufio"
"bytes"
"encoding/csv"
"io"
"io/ioutil"
"net/http"
"regexp"
"time"
"github.com/pkg/errors"
"golang.org/x/text/encoding/japanese"
"golang.org/x/text/transform"
"golang.org/x/text/unicode/norm"
"golang.org/x/text/width"
)
const (
kenAllSiteURL = "https://w... |
// Code generated by smithy-go-codegen DO NOT EDIT.
package transcribe
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/transcribe/types"
smithy "github.com/awslabs/smithy-go"
"github.com/awslabs/smi... |
package re
import (
"fmt"
"regexp"
"strings"
"github.com/wader/bump/internal/filter"
)
// Name of filter
const Name = "re"
// Help text
var Help = `
re:/<regexp>/, re:/<regexp>/<template>/, /<regexp>/ or /<regexp>/<template>/
An alternative regex/template delimited can specified by changing the first
/ into so... |
package etc
import (
"fmt"
"io/ioutil"
"net/http"
"os"
"os/exec"
"path/filepath"
"reflect"
"runtime"
"strconv"
"strings"
"github.com/aymerick/raymond"
"github.com/mitchellh/go-homedir"
"github.com/nektro/go-util/arrays/stringsu"
"github.com/nektro/go-util/types"
"github.com/nektro/go-util/util"
"githu... |
package e2e
import (
"context"
"fmt"
"time"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/openservicemesh/osm/tests/framework"
. "github.com/openservicemesh/osm/tests/framework"
)
const grpcbinInsecurePort = 9000... |
package mqtt
import (
"context"
"fmt"
"math/rand"
"sync"
"time"
"github.com/256dpi/gomqtt/client"
"github.com/256dpi/gomqtt/packet"
"github.com/pkg/errors"
"github.com/rancher/octopus-simulator/pkg/critical"
"github.com/rancher/octopus-simulator/pkg/log"
)
func mockLivingRoomLight(address string, stop <-c... |
package runner
import (
"errors"
"fmt"
"os"
"strings"
"github.com/clusterize-io/tusk/marshal"
yaml "gopkg.in/yaml.v2"
)
// Option represents an abstract command line option.
type Option struct {
ValueWithList `yaml:",inline"`
Short string
Type string
Usage string
Private bool
Required bool
... |
// Copyright (c) 2016, 2018, 2021, Oracle and/or its affiliates. All rights reserved.
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose ei... |
package debug
import (
"context"
"crypto/x509"
"sync"
"time"
"github.com/sirupsen/logrus"
"github.com/spiffe/go-spiffe/v2/bundle/x509bundle"
"github.com/spiffe/go-spiffe/v2/spiffeid"
"github.com/spiffe/go-spiffe/v2/svid/x509svid"
debugv1 "github.com/spiffe/spire-api-sdk/proto/spire/api/server/debug/v1"
"git... |
// Copyright 2022 The sacloud/iaas-api-go Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
/*
Onix Config Manager - Host Pilot
Copyright (c) 2018-Present by www.gatblau.org
Licensed under the Apache License, Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0
Contributors to this project, hereby assign copyright in this code to the project,
to be licensed under the same terms as the rest of t... |
// Copyright 2020 SpotHero
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wri... |
package main
import (
"fmt"
"github.com/google/netstack/tcpip"
"github.com/google/netstack/tcpip/network/ipv4"
"github.com/google/netstack/tcpip/network/ipv6"
"github.com/google/netstack/tcpip/stack"
"github.com/google/netstack/tcpip/transport/tcp"
"github.com/google/netstack/waiter"
"github.com/songgao/water"... |
package signin
import (
"context"
"fmt"
"net/url"
"sync"
"fyne.io/fyne"
"fyne.io/fyne/layout"
"fyne.io/fyne/widget"
"github.com/jvatic/audible-downloader/audible"
"github.com/jvatic/audible-downloader/gui/components"
"github.com/jvatic/audible-downloader/gui/prompt"
log "github.com/sirupsen/logrus"
)
func... |
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2017-present Datadog, Inc.
// +build !serverless
package listeners
import (
"fmt"
"github.com/D... |
// Copyright 2016-2019 Granitic. All rights reserved.
// Use of this source code is governed by an Apache 2.0 license that can be found in the LICENSE file at the root of this project.
/*
Package rdbms provides the RdbmsAccess facility which gives application code access to an RDBMS (SQL database).
The RdbmsAccess fa... |
package apistructs
// EdgeAppListResponse 边缘应用列表响应体
type EdgeAppListResponse struct {
Total int `json:"total"`
List []EdgeAppInfo `json:"list"`
}
//EdgeAppInfo 边缘应用信息
type EdgeAppInfo struct {
ID uint64 `json:"id"`
OrgID int64 `json:"orgID"`
Name ... |
/*
Copyright © 2021 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writi... |
// Copyright (c) 2020 Cisco Systems, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
/... |
package ifttt
import (
"io/ioutil"
"net/http"
"regexp"
"strings"
"github.com/Jeffail/gabs"
)
var (
urlRegexpTrigger = regexp.MustCompile("^/ifttt/v1/triggers/([^/]+)$")
urlRegexpTriggerIdentity = regexp.MustCompile("^/ifttt/v1/triggers/([^/]+)/trigger_identity/([^/]+)$")
url... |
// Code generated by go-swagger; DO NOT EDIT.
package quality
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/... |
/*
The base package contains code shared by implementations of material components
for GopherJS.
*/
package base // import "github.com/vecty-components/material/base"
import (
"errors"
"syscall/js"
"github.com/hexops/vecty"
"github.com/vecty-components/material/gojs"
)
const MDC_VERSION = "4.0.0"
type stringPa... |
package dither
import (
"flag"
"fmt"
"image"
"image/color"
_ "image/jpeg"
"image/png"
"log"
"os"
"time"
)
type file struct {
name string
}
// Command line flags
var (
outputDir string
colorType string
treshold bool
multiplier float64
cmd flag.FlagSet
)
// Open reads the source image
func (... |
// Copyright 2019 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
//go:build !manifestcodegen
// +build !manifestcodegen
// Code generated by "menifestcodegen". DO NOT EDIT.
// To reproduce: go run github.com/9elements/converged-security-suite/v2/pkg/intel/metadata/manifest/common/manifestcodegen/cmd/manifestcodegen github.com/9elements/converged-security-suite/v2/pkg/intel/metadata... |
// infping.go Ping probes via 'fping'
// Copyright: 2016 <NAME>
// copyright: 2018 <NAME>
// License: MIT
package main
import (
"bufio"
"github.com/influxdata/influxdb/client/v2"
"github.com/pelletier/go-toml"
"log"
"os/exec"
"strconv"
"strings"
"time"
)
func slashSplitter(c rune) bool {
return c == '/'
}
... |
// +build linux
package serial
import (
"fmt"
"os"
"time"
"unsafe"
"golang.org/x/sys/unix"
)
var bauds = map[int]uint32{
50: unix.B50,
75: unix.B75,
110: unix.B110,
134: unix.B134,
150: unix.B150,
200: unix.B200,
300: unix.B300,
600: unix.B600,
1200: unix.B1200,
1... |
// Package iplist handles the P2P Plaintext Format described by
// https://en.wikipedia.org/wiki/PeerGuardian#P2P_plaintext_format.
package iplist
import (
"bufio"
"bytes"
"errors"
"fmt"
"io"
"net"
"sort"
)
// An abstraction of IP list implementations.
type Ranger interface {
// Return a Range containing the ... |
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
package controllers
import (
"context"
"fmt"
"github.com/k8ssandra/k8ssandra-operator/pkg/clientcache"
"path/filepath"
"testing"
"time"
"github.com/bombsimon/logrusr"
cassdcapi "github.com/k8ssandra/cass-operator/operator/pkg/apis/cassandra/v1beta1"
api "github.com/k8ssandra/k8ssandra-operator/api/v1alpha1"
... |
package testing
import (
"fmt"
"runtime"
"syscall"
goovn "github.com/ebay/go-ovn"
aggErrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/klog"
)
const (
LogicalSwitchType string = "Logical_Switch"
LogicalSwitchPortType string = "Logical_Switch_Port"
)
const (
OpAdd string = "Add"
OpDelete string =... |
/*
*
* k6 - a next-generation load testing tool
* Copyright (C) 2016 Load Impact
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your o... |
package session
import (
"encoding/gob"
"errors"
"github.com/insionng/macross"
"log"
"net/url"
)
var GlobalManager *Manager
var defaultOtions = Options{"memory", `{"cookieName":"MacrossSessionId","gcLifetime":3600}`}
//var defaultOtions = Options{"file", `{"cookieName":"MacrossSessionId","gcLifetime":3600,"pro... |
package vm
import (
"bytes"
lua "github.com/yuin/gopher-lua"
)
var setuplua = `
local json = require "go.json"
local Errors = require "kong.db.errors"
local Entity = require "kong.db.schema.entity"
local inspect = require "inspect"
local typedefs = require "kong.db.schema.typedefs"
local MetaSchema = require "kong... |
package postgresql
import (
"database/sql"
"time"
"github.com/disintegration/bebop/store"
)
type userStore struct {
db *sql.DB
}
// New creates a new user.
func (s *userStore) New(authService string, authID string, password string) (int64, error) {
var id int64
if authService == "email" {
err := s.db.Q... |
/*
Copyright © 2020 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... |
package bls12381
import (
"bytes"
"crypto/subtle"
"fmt"
"io"
bls "github.com/quantumexplorer/bls-signatures/go-bindings"
"github.com/quantumexplorer/tendermint/crypto"
"github.com/quantumexplorer/tendermint/crypto/tmhash"
tmjson "github.com/quantumexplorer/tendermint/libs/json"
)
//-------------------------... |
// Copyright 2020 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
package server
import (
"fmt"
"net"
"net/http"
_ "net/http/pprof"
"time"
context "golang.org/x/net/context"
"github.com/absolute8511/ZanRedisDB/common"
"github.com/absolute8511/ZanRedisDB/syncerpb"
"google.golang.org/grpc"
)
var (
proposeTimeout = time.Second * 4
)
var syncClusterNetStats common.WriteSta... |
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... |
package renderer
import (
"math"
"math/rand"
)
const computeReflectionAndRefractions bool = true
type RayTracer struct {
}
func (r RayTracer) Sample(x, y uint, camera Camera, scene Scene, options RenderingOptions, rnd *rand.Rand) Vector3 {
var aspectRatio = float64(options.Width) / float64(options.Height)
var a... |
// Copyright 2017 The LUCI Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... |
package sig64
import (
"bytes"
"encoding/hex"
"testing"
"github.com/mit-dci/lit/crypto/koblitz"
"github.com/mit-dci/lit/btcutil/chaincfg/chainhash"
"github.com/mit-dci/lit/btcutil/txscript"
"github.com/mit-dci/lit/wire"
)
var (
sig1big, _ = hex.DecodeString("304402206048246c95429555d265472d936b71e728f468a844... |
/*
* Copyright 2020 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writin... |
package bot
import (
"os"
"runtime"
"runtime/debug"
"sync"
"sync/atomic"
"time"
"github.com/jonas747/yagpdb/bot/eventsystem"
"github.com/mediocregopher/radix/v3"
"github.com/jonas747/dshardorchestrator/v2"
"github.com/jonas747/dshardorchestrator/v2/node"
"github.com/jonas747/dstate/v3"
"github.com/jonas7... |
package main
import (
"fmt"
"gopkg.in/fsnotify/fsnotify.v1"
"gopkg.in/yaml.v2"
"io/ioutil"
"log"
"math/rand"
"os"
"path"
"strconv"
"strings"
"time"
)
const (
Version = 1
PreError = "ERROR:"
PreWarn = "Warn:"
)
var (
projectFolder = "."
cfg *FileGirl
watcher *fsnotify.Watcher
taskMan *TaskMan
)... |
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
// Copyright ©2018 <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package custplotter
import (
"image/color"
"math"
"gonum.org/v1/plot"
"gonum.org/v1/plot/plotter"
"gonum.org/v1/plot/vg"
"gonum.org/v1/plot/vg/dra... |
// Copyright 2017 The Kubernetes Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or a... |
// Copyright 2020 CUE Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
package core
import (
"fmt"
"sync"
"time"
"github.com/emicklei/melrose/notify"
)
// Timeline is a chain of events that are placed in the future (playing).
type Timeline struct {
head *scheduledTimelineEvent // earliest
tail *scheduledTimelineEvent // latest
protection sync.RWMutex
isPlaying bool... |
package handle_command
import (
"context"
"errors"
"testing"
"github.com/AnilRedshift/captions_please_go/internal/api/common"
"github.com/AnilRedshift/captions_please_go/pkg/structured_error"
"github.com/AnilRedshift/captions_please_go/pkg/twitter"
"github.com/AnilRedshift/captions_please_go/pkg/vision"
visio... |
// Copyright ©2017 The go-hep 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 fit_test
import (
"bufio"
"image/color"
"math"
"math/rand"
"os"
"strconv"
"strings"
"testing"
"go-hep.org/x/hep/fit"
"go-hep.org/x/hep/... |
// TODO FIXME name me
package worker
import (
"container/list"
"errors"
"time"
blocks "github.com/ipfs/fs-repo-migrations/fs-repo-2-to-3/Godeps/_workspace/src/github.com/ipfs/go-ipfs/blocks"
exchange "github.com/ipfs/fs-repo-migrations/fs-repo-2-to-3/Godeps/_workspace/src/github.com/ipfs/go-ipfs/exchange"
waita... |
package handler
import (
"strconv"
"strings"
"github.com/sirupsen/logrus"
"github.com/stakater/Reloader/internal/pkg/callbacks"
"github.com/stakater/Reloader/internal/pkg/constants"
"github.com/stakater/Reloader/internal/pkg/util"
"github.com/stakater/Reloader/pkg/kube"
v1 "k8s.io/api/core/v1"
"k8s.io/client... |
package client
import (
"archive/tar"
"bytes"
"encoding/base64"
"encoding/json"
"errors"
"io"
"io/ioutil"
"net/http"
"os"
"path/filepath"
"strings"
"github.com/rknizzle/faas/internal/models"
)
const (
serverFile = `const express = require('express')
const app = express()
const bodyParser = require('body... |
// Copyright 2018 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... |
package team4TrainingEvoAgent
import (
"github.com/SOMAS2021/SOMAS2021/pkg/infra"
"github.com/SOMAS2021/SOMAS2021/pkg/messages"
"github.com/SOMAS2021/SOMAS2021/pkg/utils/globalTypes/food"
)
// ---------- RECEIVE MESSAGE ---------//
func (a *CustomAgentEvo) getMessage() {
receivedMsg := a.ReceiveMessage()
if re... |
// Package redis implements a registry in redis.
package redis
import (
"context"
"fmt"
"sort"
"strings"
"sync"
"time"
"github.com/cenkalti/backoff/v4"
"github.com/go-redis/redis/v8"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/durationpb"
"github.com/pomerium/pomerium/intern... |
package metering
import (
"encoding/json"
"fmt"
"github.com/open-horizon/anax/cli/cliutils"
"github.com/open-horizon/anax/i18n"
"github.com/open-horizon/anax/persistence"
)
type MeteringNotification struct {
Amount uint64 `json:"amount"` // The number of tokens granted by t... |
package sniproxy
import (
"errors"
"fmt"
"net/http"
"time"
)
var (
//DefaultAuthCheckerErr is returned when an unknown error occurs during authChecker run
DefaultAuthCheckerErr = errors.New("Unknown Error occurred in DefaultAuthChecker")
//DefaultAuthCheckerTokenMakerErr is returned when an error occurs during... |
package luabridge
import (
"context"
"fmt"
"log"
"net"
"net/url"
"sni/protos/sni"
"sni/snes"
"sni/util"
"sni/util/env"
"sync"
"time"
)
const driverName = "luabridge"
var (
bindHost string
bindPort string
bindHostPort string
)
var driver *Driver
const defaultAddressSpace = sni.AddressSpace_Snes... |
// Copyright ©2013 The Gonum 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 mat
import (
"math"
"math/cmplx"
"gonum.org/v1/gonum/floats"
)
// CMatrix is the basic matrix interface type for complex matrices.
type CMatri... |
// Copyright 2018 Owkin, inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"os"
"strings"
"time"
"github.com/acarl005/stripansi"
"github.com/direktiv/direktiv-apps/pkg/reusable"
pss "github.com/direktiv/go-powershell"
"github.com/direktiv/go-powershell/backend"
"github.com/google/uuid"
)
type Script struct {
Script r... |
package main
import (
"bytes"
"errors"
"log"
"net"
"sync"
"time"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"
"github.com/google/gopacket/pcap"
)
func main() {
// Get a list of all interfaces.
ifaces, err := net.Interfaces()
if err != nil {
panic(err)
}
var wg sync.WaitGroup
for... |
// Copyright 2022 <NAME>
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, so... |
// Copyright 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... |
package main
import (
"fmt"
"io"
"net/http"
"regexp"
"strings"
"golang.org/x/net/html"
)
// hnItem represents one link in the HN links list
type hnItem struct {
url,
desc,
domain,
guid,
comments string
}
// helper functions for processing the html:
// getAttr retrieves attribute key from n. Returns empt... |
package queue
import (
"errors"
"fmt"
"log"
"runtime"
"sync"
"sync/atomic"
"time"
)
var ErrCapecity=errors.New("capacity is full")
type Task interface{
Execute(routineNo int)
ToString() string
}
type delegateTask struct{
task Task
resultChannel chan error
}
type executingTasks struct{
taskMap map[string... |
package resource
import (
"cts2/model"
"errors"
"fmt"
"io/ioutil"
"strconv"
"time"
"github.com/gin-gonic/gin"
"github.com/jinzhu/gorm"
//"io"
"regexp"
// "strings"
//"gopkg.in/bluesuncorp/validator.v5"
)
type ProjResource struct {
DB gorm.DB
}
type ProjGetRequest struct {
ProjId int64 `json:"projId" b... |
package nan0
import (
"container/list"
"context"
"net"
"net/http"
"sync"
"time"
"github.com/yomiji/mdns"
"github.com/yomiji/slog"
)
// The NanoServer structure is a wrapper around a service which allows
// for the acceptance of connections which are wrapped automatically
// in Nan0 objects. This allows for t... |
package core
import (
_ "fmt"
b3 "github.com/liguoqinjim/behavior3go"
. "github.com/liguoqinjim/behavior3go/config"
)
type IBaseWrapper interface {
_execute(tick *Tick) b3.Status
_enter(tick *Tick)
_open(tick *Tick)
_tick(tick *Tick) b3.Status
_close(tick *Tick)
_exit(tick *Tick)
}
type IBaseNode interface ... |
/*
Copyright 2020 Adevinta
*/
package design
import (
. "goa.design/goa/v3/dsl"
)
var FindingResourceGroup = ResultType("resource_group", func() {
Attributes(func() {
Attribute("name", String, "Name of the resource group", func() {
Example("Network Resources")
})
Attribute("attributes", ArrayOf(String), "... |
// Package stream provides type-safe streams, functional helper tools and processing
// operations
package stream
import (
"fmt"
"github.com/mariomac/gostream/order"
)
// Stream is a sequence of elements supporting different processing and aggregation functionalities.
// To perform a computation, Stream operations... |
package alicloud
import (
"fmt"
"log"
"time"
util "github.com/alibabacloud-go/tea-utils/service"
"github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/ter... |
/*
Copyright 2020 Docker Compose CLI authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
package hooks_test
import (
"fmt"
"github.com/ihaiker/ngx/v2/config"
"github.com/ihaiker/ngx/v2/hooks"
"github.com/ihaiker/ngx/v2/query"
"github.com/stretchr/testify/suite"
"os"
"testing"
)
type testHookSuite struct {
suite.Suite
pretty bool
}
func (p testHookSuite) SetupTest() {
hooks.Defaults.RegHook(&ho... |
// Copyright 2016 <NAME>. All rights reserved.
// Use of this source code is governed by the MIT license
// that can be found in the LICENSE file.
// Wunderground filler.
package main
//go:generate ./version.sh
import (
"encoding/json"
"errors"
"flag"
"fmt"
"io/ioutil"
"net/http"
"time"
"github.com/ebarkie/... |
// Copyright 2020 The Embedded Go 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 usart
import (
"runtime"
"unsafe"
"github.com/embeddedgo/stm32/hal/dma"
)
// EnableRx enables the UART receiver. If rxbuf is not nil the ... |
// Copyright 2015 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
// Code generated by smithy-go-codegen DO NOT EDIT.
package ssm
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/ssm/types"
"github.com/awslabs/smithy-go/middleware"
smithyhttp "github.com/awslabs/sm... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.