text stringlengths 3.08k 10.4k |
|---|
package v1
import (
"fmt"
batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1"
v1beta1 "k8s.io/api/extensions/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
// CRDKind is the kind of K8s CRD.
CRDKind = "TrainingJob"
// CRDKindPlural is the plural of CRDKind.
CRDKindPlural = "trainingj... |
package ript_net
//Note: Will remove relative paths once we have figured out stable parts.
// Relative paths makes forking etc simpler.
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"github.com/labstack/gommon/log"
"github.com/lucas-clemente/quic-go"
"github.com/lucas-clemente/quic-go/http3"
"../common"... |
// Copyright 2012-2018 <NAME>. All rights reserved.
// Use of this source code is governed by a MIT-license.
// See http://olivere.mit-license.org/license.txt for details.
package elastic
import (
"context"
"encoding/json"
"fmt"
"net/http"
"net/url"
"strings"
"github.com/olivere/elastic/v7/uritemplates"
)
//... |
/*
MIT License
Copyright (c) 2022 Kubeshop
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, publish, distr... |
/*
Copyright (c) 2017 VMware, Inc. 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 law or agreed t... |
package decorator
import (
"context"
"fmt"
"os"
"sync"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/servicediscovery"
spartaAWS "github.com/mweagle/Sparta/aws"
"github.com/pkg/errors"
"github.com/rs/zerolog"
)
type discoveryInfo struct {
serviceID string
namespaceName string
ser... |
/*
* Copyright 2019 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 Licen... |
// Code generated by go-swagger; DO NOT EDIT.
package p_cloud_p_vm_instances
// 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"
... |
// 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... |
// Copyright 2016 The Cockroach Authors.
//
// Licensed as a CockroachDB Enterprise file under the Cockroach Community
// License (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// https://github.com/cockroachdb/cockroach/blob/master/li... |
/*
* Minio Cloud Storage, (C) 2018 Minio, 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 la... |
// Copyright © 2019 <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 wri... |
// Copyright (c) 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 config
import (
"encoding/json"
"fmt"
"reflect"
"strconv"
"strings"
"time"
"unsafe"
)
var intBitSize = int(unsafe.Sizeof(int(0)) * 8)
var durationT... |
package e2e
import (
"context"
"fmt"
"log"
"testing"
"time"
"github.com/pkg/errors"
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/wait"
nc "github.com/openshift/windows-machine-config-operator/pkg/controlle... |
//go:build go1.18
// +build go1.18
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the cod... |
/*
Copyright 2019 The Skaffold 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, sof... |
package client
import (
"gopkg.in/jcmturner/gokrb5.v7/iana/flags"
"gopkg.in/jcmturner/gokrb5.v7/iana/nametype"
"gopkg.in/jcmturner/gokrb5.v7/krberror"
"gopkg.in/jcmturner/gokrb5.v7/messages"
"gopkg.in/jcmturner/gokrb5.v7/types"
)
// TGSREQGenerateAndExchange generates the TGS_REQ and performs a TGS exc... |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package efs
import (
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Provides an Elastic File System (EFS) mount target.
/... |
package http
import (
"context"
"encoding/json"
"github.com/ansel1/merry"
"math"
"net/http"
"net/http/httptest"
"testing"
"github.com/go-graphite/carbonapi/cmd/carbonapi/config"
"github.com/go-graphite/carbonapi/expr/types"
zipperTypes "github.com/go-graphite/carbonapi/zipper/types"
pb "github.com/go-graph... |
// Copyright 2020 The Prometheus 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... |
//
// (C) Copyright 2018-2020 Intel Corporation.
//
// 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 la... |
// Package network manages the network services of the application dataplane. This
// means ensuring that containers can find and communicate with each other in accordance
// with the policy specification. It achieves this by manipulating IP addresses and
// hostnames within the containers, Open vSwitch on each runni... |
/*
* Copyright 2016 The Kythe Authors. 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 ap... |
package set_test
import (
"testing"
. "github.com/kansaslabs/x/set"
"github.com/stretchr/testify/require"
)
// Ensure the Set works as expected with string types
func TestStringSet(t *testing.T) {
// Can create and add to a set
set := New()
set.Add("foo")
require.True(t, set.Contains("foo"))
require.False(t,... |
package portforward
// based on https://github.com/justinbarrick/go-k8s-portforward
// licensed under the Apache License 2.0
import (
"context"
"fmt"
"io/ioutil"
"net"
"net/http"
"github.com/pkg/errors"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
"... |
// Copyright 2018 The LevelDB-Go and Pebble 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 sstable
import (
"bytes"
"encoding/binary"
"fmt"
"testing"
"github.com/cockroachdb/pebble/bloom"
"github.com/cockroachdb/pebb... |
package fscagentctrlr
import (
apiv1 "github.com/fsc-demo-wim/fsc-lib-go/pkg/apis/fsc.henderiw.be/v1"
log "github.com/sirupsen/logrus"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// DeviceCentricView function provides a view on the connectivity from the host to the rest of the network.
// The function also pro... |
// Code generated by entc, DO NOT EDIT.
package user
import (
"fmt"
)
const (
// Label holds the string label denoting the user type in the database.
Label = "user"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldUserName holds the string denoting the user_name field i... |
package tls
import (
"bytes"
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"io/ioutil"
"net/http"
"sort"
"strings"
"time"
"github.com/traefik/traefik/v2/pkg/log"
"golang.org/x/crypto/ocsp"
)
// CertificateData holds runtime data for runtime TLS certificate handling.
type CertificateData struct {
config *C... |
package events
import (
"fmt"
"time"
"gopkg.in/tomb.v2"
"github.com/moira-alert/moira"
"github.com/moira-alert/moira/database"
"github.com/moira-alert/moira/metrics/graphite"
"github.com/moira-alert/moira/notifier"
)
// FetchEventsWorker checks for new events and new notifications based on it
type FetchEvent... |
package gcp
import (
"context"
"strconv"
"sync"
"time"
"cloud.google.com/go/pubsub"
"github.com/benthosdev/benthos/v4/internal/bundle"
"github.com/benthosdev/benthos/v4/internal/component"
"github.com/benthosdev/benthos/v4/internal/component/input"
"github.com/benthosdev/benthos/v4/internal/component/input/... |
// Copyright 2020 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
// Copyright 2016 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 fileutils
import (
"context"
"fmt"
"os"
"regexp"
"strconv"
"time"
"github.com/datainq/filab"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
const (
DefaultQueueSize = 10000
DefaultAutoReloaderInterval = 11 * time.Minute
MaxDaysInPast = 30
)
//// FindLastForDate searches in a ... |
// Copyright 2016-2018 Authors of Cilium
//
// 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 ag... |
package dwd
import (
"encoding/csv"
"encoding/json"
"errors"
"fmt"
"io"
"math"
"net/http"
"net/http/cookiejar"
"os"
"strconv"
"time"
)
var (
stations []Station
)
type Station struct {
Pk string
Name string
X float64
Y float64
Altitude int
Priori... |
/*
Package demand "Every package should have a package comment, a block comment preceding the package clause.
For multi-file packages, the package comment only needs to be present in one file, and any
one will do. The package comment should introduce the package and provide information
relevant to the package as a whol... |
// Copyright 2021 <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 to in writing... |
package http
import (
"context"
"crypto/tls"
"database/sql"
"fmt"
"log"
"net/http"
"os"
"os/signal"
"syscall"
"time"
"github.com/javiercbk/minesweeper/auth"
"github.com/javiercbk/minesweeper/game"
"github.com/javiercbk/minesweeper/http/response"
"github.com/javiercbk/minesweeper/http/security"
"github.... |
// +build windows
package windowsupdatetable
import (
"context"
"encoding/json"
"strconv"
"strings"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/kolide/launcher/pkg/dataflatten"
"github.com/kolide/launcher/pkg/osquery/tables/dataflattentable"
"github.com/kolide/launcher/pkg/osqu... |
// package pivagent implements a SSH agent backed by a PIV smartcard
package pivagent
import (
"bytes"
"crypto"
"crypto/rand"
"encoding/json"
"fmt"
"log"
"github.com/erincandescent/cardkit/piv"
"github.com/erincandescent/cardkit/protocol"
"github.com/erincandescent/ssh-emissary/emissary"
"github.com/foxcpp/... |
package main
import (
"context"
"crypto/rand"
"embed"
"encoding/hex"
"fmt"
"os"
"path/filepath"
)
//go:embed target
var targetFiles embed.FS
const (
appname = "xunlei"
unitFile = "/etc/systemd/system/" + appname + ".service"
synoAuthenticatePath = "/usr/syno/synoman/webman/modules/... |
// Copyright IBM Corp. 2017, 2021 All Rights Reserved.
// Licensed under the Mozilla Public License v2.0
package ibm
import (
"fmt"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/IBM/go-sdk-core/v5/core"
"github.com/IBM/platform-services-go-sdk/iamidentityv1"
"github.com/IBM/platform-... |
package main
import (
"context"
"encoding/json"
"fmt"
"net/http"
"time"
"github.com/google/uuid"
)
const (
requestIDHeader = "X-Request-ID"
tokenHeader = "X-Deploy-Token"
contentTypeHeader = "Content-Type"
)
var (
errBadRequest = fmt.Errorf("Bad request") // 400
errUnauthorized =... |
package main
import (
"bufio"
"flag"
"fmt"
"log"
"math"
"os"
"regexp"
"strconv"
"strings"
)
const (
done = -1
rounds = 10000
)
// Particle blah blah
type Particle struct {
i int
pos []int
vel []int
acc []int
destroyed bool
}
func (p Particle) String() string {
return fmt... |
package routing
import (
"errors"
"gongo/entities"
"log"
"net/http"
"github.com/gin-gonic/gin"
)
var (
ERR_PRODUCE_PAYLOAD interface{} = ""
ENTITITY_IDENTIFIER string = "code"
PRODUCE_NOT_FOUND string = "Err: Produce not found."
PRODUCE_ADD_ERR string = "Err: could not add all produce."
PRODUCE_DELETE_E... |
package muse
import (
"fmt"
"github.com/gijit/gi/pkg/ast"
"github.com/gijit/gi/pkg/compiler/analysis"
"github.com/gijit/gi/pkg/token"
"github.com/gijit/gi/pkg/types"
"github.com/neelance/astrewrite"
"golang.org/x/tools/go/types/typeutil"
)
var sizes64 = &types.StdSizes{WordSize: 8, MaxAlign: 8}
var reservedK... |
package main
import (
"fmt"
"net"
"os"
"os/user"
"strconv"
"github.com/Songmu/prompter"
"github.com/k0kubun/pp"
goipmsg "github.com/masanorih/go-ipmsg"
)
var commands = []string{"help", "quit", "join", "list", "send", "read"}
func main() {
ipmsg := setup()
input := make(chan string)
next := make(chan st... |
package onpar
import (
"fmt"
"reflect"
"runtime"
"testing"
)
// Stores the state of the specs and groups
type Onpar struct {
current *level
callCount int
}
// Creates a new Onpar test suite
func New() *Onpar {
return NewWithCallCount(1)
}
func NewWithCallCount(count int) *Onpar {
return &Onpar{
current:... |
package containeranalysis
import (
"context"
"errors"
containeranalysisapi "cloud.google.com/go/containeranalysis/apiv1"
grafeasv1 "cloud.google.com/go/grafeas/apiv1"
"github.com/docker/distribution/reference"
"google.golang.org/api/iterator"
grafeas "google.golang.org/genproto/googleapis/grafeas/v1"
"githu... |
// Copyright (c) 2013-2016 by <NAME>. All Rights Reserved.
// Use of this source code is governed by a MIT-style license that can
// be found in the LICENSE file.
package mop
import (
`github.com/nsf/termbox-go`
`regexp`
`strings`
)
// Markup implements some minimalistic text formatting conventions that
// get tr... |
package bitflyergo
import (
"encoding/json"
"io"
"io/ioutil"
"log"
"net/http"
"net/http/httputil"
"strconv"
"strings"
"time"
)
// Export const
const (
HealthNormal = "NORMAL" // health: NORMAL
HealthBusy = "BUSY" // health: BUSY
HealthVeryBusy = "VERY_BUSY" // h... |
package auth
import (
"crypto/x509"
"crypto/x509/pkix"
"fmt"
"github.com/ARGOeu/argo-api-authn/utils"
LOGGER "github.com/sirupsen/logrus"
"io/ioutil"
"math/big"
"net/http"
"sync"
"time"
)
// CRLCheckRevokedCert checks whether or not a certificate has been revoked
func CRLCheckRevokedCert(cert *x509.Certific... |
// Copyright 2021 CloudWeGo 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... |
// +build integration
/*
Copyright 2016 The Kubernetes Authors 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 ... |
/* Apache v2 license
* Copyright (C) <2019> Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
package postgresql
import (
"database/sql"
"fmt"
"net/url"
"strconv"
"strings"
"github.com/intel/rsp-sw-toolkit-im-suite-go-odata/parser"
"github.com/lib/pq"
"github.com/pkg/errors"
)
// ErrInvalidInp... |
package rtc
import (
"fmt"
"testing"
)
func TestCSG(t *testing.T) {
s1 := Sphere()
s2 := Cube()
c := CSG(CSGUnion, s1, s2)
if got, want := c.Operation, CSGUnion; got != want {
t.Errorf("c.Operation = %v, want %v", got, want)
}
if got, want := c.Left, s1; got != want {
t.Errorf("c.Left = %v, want %v", go... |
// 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.
// Based on the LUDecomposition class from Jama 1.0.3.
package mat64
import (
"math"
)
type LUFactors struct {
LU *Dense
Pivot []int
Sign int
}
/... |
/*
* Copyright (C) 2018 Red Hat, Inc.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache Licens... |
// Package read implements a read state with an event handler API.
package read
import (
"sync"
"github.com/diamondburned/arikawa/api"
"github.com/diamondburned/arikawa/discord"
"github.com/diamondburned/arikawa/gateway"
"github.com/diamondburned/arikawa/handler"
"github.com/diamondburned/arikawa/state"
"githu... |
/*
Copyright 2016 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, sof... |
package conf
import (
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"strconv"
"strings"
"github.com/golang/protobuf/proto"
"gopkg.in/gcfg.v1"
pb "github.com/linuxerwang/goplz/conf/proto"
)
const (
goplzPidFile = ".goplzpid"
goplzRcFile = ".goplzrc"
plzCfgFile = ".plzconfig"
)
type initializer func(c... |
// Copyright 2016 Amazon.com, Inc. or its affiliates. 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. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" fil... |
// Copyright 2015 Google Inc. 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... |
package main
import (
"flag"
"fmt"
"os"
"os/signal"
"runtime"
"syscall"
"time"
"github.com/signalwire/signalwire-golang/signalwire"
)
// App environment settings
var (
// required
ProjectID = os.Getenv("ProjectID")
TokenID = os.Getenv("TokenID")
DefaultContext = os.Getenv("DefaultContext")
F... |
// DynamoDB utility
package dynamodb
import (
"fmt"
"reflect"
"strconv"
SDK "github.com/aws/aws-sdk-go/service/dynamodb"
)
const (
KeyTypeHash = "HASH"
KeyTypeRange = "RANGE"
)
type Any interface{}
// Create new AttributeValue from the type of value
func createAttributeValue(v Any) *SDK.AttributeValue {
s... |
/*
Package rpc implements bridge to Sirius full node API interface.
We recommend using local IPC for fast and the most efficient inter-process communication between the API server
and an Photon/Sirius node. Any remote RPC connection will work, but the performance may be significantly degraded
by extra networking overh... |
package terminal
import (
"bufio"
"bytes"
"context"
"fmt"
"io"
"os"
"strings"
"text/tabwriter"
"github.com/bgentry/speakeasy"
"github.com/containerd/console"
"github.com/fatih/color"
"github.com/mattn/go-isatty"
sshterm "golang.org/x/crypto/ssh/terminal"
)
// basicUI
type basicUI struct {
ctx contex... |
package log
import (
"bufio"
"encoding/json"
"errors"
"fmt"
"net"
"net/http"
"os"
"strconv"
"sync"
"time"
"github.com/mgutz/ansi"
)
// Namespace is the service namespace used for logging
var Namespace = "service-namespace"
// HumanReadable, if true, outputs log events in a human readable format
var Human... |
/*
Copyright 2020 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, ... |
// 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... |
package generator
import (
"bytes"
"fmt"
"io"
"path/filepath"
"strings"
"github.com/ZacxDev/protoc-gen-struct-transformer/options"
"github.com/ZacxDev/protoc-gen-struct-transformer/source"
"github.com/golang/protobuf/proto"
descriptor "google.golang.org/protobuf/types/descriptorpb"
plugin "google.golang.org... |
// Copyright 2017-2019 <NAME> (<EMAIL>) and other Dragonboat 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 req... |
package e2e
import (
"bufio"
"context"
"fmt"
"os"
"strings"
. "github.com/onsi/gomega"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kuber... |
// Copyright 2018 The NuxUI 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 nux
import (
"fmt"
"math"
"time"
"nuxui.org/nuxui/log"
)
//--------------- Readonly Event --------------------------------
type Event interf... |
package game
import (
"bytes"
"fmt"
"github.com/Fjolnir-Dvorak/fcHelper/cmd/game/structures"
"github.com/Fjolnir-Dvorak/fcHelper/util"
"github.com/beevik/etree"
"github.com/spf13/cobra"
"gopkg.in/src-d/go-git.v4"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strings"
"text/template"
"github.com/Fjolnir-Dvor... |
package analytics
import (
"bytes"
"crypto/md5"
"encoding/hex"
"errors"
"io/ioutil"
"net"
"net/http"
"os"
"sort"
"strings"
"time"
"github.com/appscode/go/analytics"
"github.com/appscode/kutil/meta"
"github.com/ghodss/yaml"
core "k8s.io/api/core/v1"
kerr "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8... |
/*
Copyright (c) 2020, btnmasher
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that
the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
... |
package tests
import (
"bytes"
"flag"
"fmt"
"log"
"strconv"
"strings"
"testing"
"time"
"golang.org/x/net/context"
"../ai"
"../cli"
"../ptn"
"../tak"
)
var debug = flag.Int("debug", 0, "debug level")
var dumpPerf = flag.Bool("debug-perf", false, "debug perf")
type moveSpec struct {
number int
colo... |
package aws
import (
"finala/collector"
"finala/collector/config"
"finala/expression"
"fmt"
"time"
awsClient "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/cloudwatch"
"github.com/aws/aws-sdk-go/service/lambda"
log "github.com/sirupsen/logrus"
)
// LambdaClientDescreptor is an interface ... |
package plugin
import (
"context"
"crypto/tls"
"crypto/x509"
"database/sql"
"encoding/json"
"fmt"
"strconv"
"time"
"github.com/ClickHouse/clickhouse-go"
"github.com/grafana/clickhouse-datasource/pkg/converters"
"github.com/grafana/clickhouse-datasource/pkg/macros"
"github.com/grafana/grafana-plugin-sdk-go... |
// +build e2e
/*
Copyright 2020 The Knative 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 i... |
package egoscale
// NetworkOffering corresponds to the Compute Offerings
type NetworkOffering struct {
Availability string `json:"availability,omitempty" doc:"availability of the network offering"`
ConserveMode bool `json:"conservemode,omitempty" doc:"true if network o... |
// Copyright 2018 ETH Zurich
// Copyright 2019 ETH Zurich, Anapaya Systems
//
// 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 ... |
// Copyright 2019, Square, Inc.
package cmd
import (
"fmt"
"github.com/square/spincycle/v2/proto"
"github.com/square/spincycle/v2/spinc/app"
"github.com/square/spincycle/v2/spinc/config"
)
type Help struct {
ctx app.Context
helpType string
}
func NewHelp(ctx app.Context) *Help {
return &Help{
ctx: ct... |
// Broker peering simulation (part 2)
// Prototypes the request-reply flow
//
// Author: amyangfei <<EMAIL>>
// Requires: http://github.com/alecthomas/gozmq
package main
import (
"fmt"
zmq "github.com/alecthomas/gozmq"
"math/rand"
"os"
"time"
)
const NBR_WORKERS = 3
const NBR_CLIENTS = 10
const WORKER_READY = "... |
// Copyright (c) 2018 Cisco and/or its affiliates.
//
// 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 applicabl... |
package rule
import (
"database/sql"
"errors"
"fmt"
"time"
"github.com/target/goalert/assignment"
"github.com/target/goalert/util/timeutil"
"github.com/target/goalert/validation/validate"
)
type Rule struct {
ID string `json:"id"`
ScheduleID string `json:"schedule_id"`
WeekdayFilter
Start time... |
package extensions
import (
"testing"
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/acceptance/tools"
"github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/external"
"github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/provider"
"github.com/gopherclo... |
/*
http://www.apache.org/licenses/LICENSE-2.0.txt
Copyright 2016 Intel Corporation
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 ... |
/*
* Tencent is pleased to support the open source community by making TKEStack available.
*
* Copyright (C) 2012-2019 Tencent. 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
... |
// SPDX-License-Identifier: Apache-2.0
// Copyright 2016-2019 Authors of Cilium
package allocator
import (
"context"
"math"
"sync"
"time"
"github.com/cilium/cilium/pkg/identity"
"github.com/cilium/cilium/pkg/idpool"
"github.com/cilium/cilium/pkg/kvstore"
"github.com/cilium/cilium/pkg/lock"
)
// backendOpTim... |
package cluster_test
import (
"net/http"
"net/http/httptest"
"strconv"
"testing"
"time"
lxd "github.com/lxc/lxd/client"
"github.com/lxc/lxd/lxd/cluster"
"github.com/lxc/lxd/lxd/db"
"github.com/lxc/lxd/lxd/node"
"github.com/lxc/lxd/lxd/state"
"github.com/lxc/lxd/lxd/util"
"github.com/lxc/lxd/shared"
"gith... |
package outboundgroup
import (
"context"
"encoding/json"
"errors"
"fmt"
"net"
"github.com/Dreamacro/clash/adapter/outbound"
"github.com/Dreamacro/clash/common/murmur3"
"github.com/Dreamacro/clash/common/singledo"
"github.com/Dreamacro/clash/component/dialer"
C "github.com/Dreamacro/clash/constant"
"github.... |
// Copyright 2021 dfuse Platform 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 agre... |
// Copyright © 2018 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 ... |
package repack
import (
"fmt"
"io"
"io/ioutil"
"os"
"strings"
"time"
"github.com/itchio/butler/comm"
"github.com/itchio/butler/mansion"
"github.com/itchio/savior/countingsource"
"github.com/itchio/savior/seeksource"
"github.com/itchio/headway/counter"
"github.com/itchio/headway/united"
"github.com/itc... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package kinesisvideo
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
"github.com/aws/aws-sdk-go-v2/private/protocol"
)
type GetDataEndpointInput struct {
_ struct{} `type:"structure"`
//... |
/*
Copyright © 2020 <NAME>
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, publish, distribute, sublicense... |
package xpoa
import (
"encoding/json"
"fmt"
"sort"
"strconv"
"strings"
common "github.com/xuperchain/xupercore/kernel/consensus/base/common"
"github.com/xuperchain/xupercore/kernel/contract"
)
// runChangeValidates 候选人变更,替代原三代合约的add_validates/delete_validates/change_validates三个操作方法
// Args: validates::候选人钱包地址... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.