text stringlengths 5.51k 28.1k |
|---|
// Copyright © 2018 BigOokie
//
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.
package skymgrmon
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"sync"
"time"
"github.com/BigOokie/skywire-wing-commander/internal/skynode"
"github.com/BigOoki... |
//
// Last.Backend LLC CONFIDENTIAL
// __________________
//
// [2014] - [2020] Last.Backend LLC
// All Rights Reserved.
//
// NOTICE: All information contained herein is, and remains
// the property of Last.Backend LLC and its suppliers,
// if any. The intellectual and technical concepts contained
// herein are prop... |
// Copyright 2015 Apcera Inc. All rights reserved.
package main
import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"strings"
"sync"
"sync/atomic"
"time"
"math/rand"
"github.com/nats-io/go-nats-streaming"
"github.com/nats-io/go-nats"
)
// Some sane defaults
const (
DefaultConnectWait = 4 ... |
package wrappers
// #include "wrappers_config.h"
// #cgo CFLAGS: -I/usr/local/include/
// #cgo LDFLAGS: -lndpi -lpcap -lm -pthread
// #include "nDPI_wrapper_impl.h"
import "C"
import (
"unsafe"
"github.com/dreadl0ck/go-dpi/types"
"github.com/dreadl0ck/gopacket"
"github.com/pkg/errors"
)
// ndpiCodeToProtocol map... |
// MQTT 客戶端
package nyamqtt
import (
"bytes"
"context"
"crypto/tls"
"crypto/x509"
"encoding/binary"
"fmt"
"io/ioutil"
"net/url"
"strconv"
"time"
mqtt "github.com/eclipse/paho.mqtt.golang"
cmap "github.com/orcaman/concurrent-map"
"github.com/tidwall/gjson"
)
// <類>
var ctx = context.Background()
type Ny... |
/*
* Copyright (C) 2017-2018 GIG Technology NV and Contributors
*
* 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 ... |
/*
Copyright 2019 Cisco 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 required by applicable law or agreed to in writing, software
d... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: example/proto/helloworld.proto
package helloworld
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
... |
package lextwt
// EBNF
// lower = rune, Initial = []rune, CAPS = Element
// ```
// eof = EOF ;
// illegal = 0 ;
// any = ? any unicode excluding eof or illegal ? ;
//
// sp = " " ;
// nl = "\n" ;
// tab = "\t" ;
// ls = "\u2028" ;
//
// term = EOF | 0 ;
// Space = { sp }, !( nl |... |
package cmd
import (
"github.com/gophercloud/gophercloud/openstack/blockstorage/v3/volumes"
"github.com/gophercloud/gophercloud/openstack/compute/v2/servers"
"github.com/sbueringer/kubectl-openstack-plugin/pkg/kubernetes"
"github.com/sbueringer/kubectl-openstack-plugin/pkg/openstack"
"github.com/sbueringer/kubect... |
// Copyright 2020 MatrixOrigin.
//
// 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... |
// ClueGetter - Does things with mail
//
// Copyright 2016 <NAME>, Freeaqingme.
//
// This Source Code Form is subject to the terms of the Apache License, Version 2.0.
// For its contents, please refer to the LICENSE file.
//
package core
import (
"context"
"crypto/md5"
"encoding/hex"
"fmt"
"net"
"strconv"
"str... |
package console
import (
"fmt"
"time"
"github.com/veandco/go-sdl2/gfx"
"github.com/veandco/go-sdl2/sdl"
)
type mode struct {
pixelBuffer
}
type pixelBuffer struct {
textCursor pos // note print pos in char/line pos not pixel pos
fgColor Color
bgColor Color
palette *palette
charCols in... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: channel.proto
package relation
import (
context "context"
fmt "fmt"
common "github.com/appootb/protobuf/go/common"
_ "github.com/appootb/protobuf/go/permission"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
t... |
/*
Copyright 2019 Cisco 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 required by applicable law or agreed to in writing, software
d... |
// 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 entity
import (
"context"
"gxt-park-assets/internal/app/schema"
"gxt-park-assets/pkg/gormplus"
"gxt-park-assets/pkg/util"
)
// GetTAssetDataDB 资产数据
func GetTAssetDataDB(ctx context.Context, defDB *gormplus.DB) *gormplus.DB {
return getDBWithModelPlus(ctx, defDB, TAssetData{})
}
// SchemaTAssetData 资产数据
... |
// Copyright (c) 2019, Google Inc.
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS... |
package shabal
import (
"encoding/binary"
// "unsafe"
// "bytes"
// "reflect"
// "strconv"
// "fmt"
)
var A_init_512 = [...]uint32{
(0x20728DFD), (0x46C0BD53), (0xE782B699), (0x55304632),
(0x71B4EF90), (0x0EA9E82C), (0xDBB930F1), (0xFAD06B8B),
(0xBE0CAE40), (0x8BD14410), (0x76D2ADAC), (0x28ACAB7F),
}
v... |
package mustache
import (
"os"
"path"
"strings"
"testing"
)
type Test struct {
tmpl string
context interface{}
expected string
}
type Data struct {
A bool
B string
}
type User struct {
Name string
Id int64
}
type settings struct {
Allow bool
}
func (u User) Func1() string {
return u.Name
}
fu... |
// Scrape custom queries
package collector
import (
"context"
"database/sql"
"errors"
"fmt"
"io/ioutil"
"math"
"path/filepath"
"strconv"
"strings"
"sync"
"time"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/log"
"gopkg.in/alecthomas/kingpin.v2"
"gopkg.in/yaml.v2"
)
va... |
// Package ldap implements strategies for authenticating using the LDAP protocol.
package ldap
import (
"context"
"crypto/tls"
"crypto/x509"
"encoding/json"
"fmt"
"io/ioutil"
"net"
"gopkg.in/ldap.v2"
"github.com/dexidp/dex/connector"
"github.com/dexidp/dex/pkg/log"
)
// Config holds the configuration para... |
// Copyright 2014 beego Author. 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 applica... |
// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package repository
import (
"bytes"
"context"
"fmt"
"os"
"path"
"path/filepath"
"sort"
"strings"
"time"
"code.gitea.io/gitea/models"
repo_model ... |
package dependency
import (
"container/list"
"os"
"path/filepath"
"strings"
"github.com/Masterminds/glide/cfg"
"github.com/Masterminds/glide/msg"
"github.com/Masterminds/glide/util"
)
// MissingPackageHandler handles the case where a package is missing during scanning.
//
// It returns true if the package can... |
package kubernetes
import (
"bytes"
"reflect"
"sort"
"strconv"
"testing"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/prompbmarshal"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discoveryutils"
)
func TestParseNodeListFailure(t *testing.T) {
f := func(s string) {
t.Helper()
r := bytes.Ne... |
/*
Copyright The containerd 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 2017 Istio 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 dockerutil
import (
"bufio"
"bytes"
"fmt"
"log"
"os"
"os/exec"
"regexp"
"strings"
"time"
"net/url"
"github.com/Masterminds/semver"
"github.com/drud/ddev/pkg/output"
"github.com/fsouza/go-dockerclient"
)
// NetName provides the default network name for ddev.
const NetName = "ddev_default"
// En... |
// Package clip provides everything for calculating and altering polygons.
// The external clipper lib should only be used inside of this package.
package clip
import (
"github.com/aligator/goslice/data"
clipper "github.com/aligator/go.clipper"
goconvexhull2d "github.com/furstenheim/go-convex-hull-2d"
)
// Patter... |
package dap
import (
"flag"
"io"
"net"
"os"
"path/filepath"
"reflect"
"strings"
"sync"
"testing"
"time"
"github.com/go-delve/delve/pkg/logflags"
protest "github.com/go-delve/delve/pkg/proc/test"
"github.com/go-delve/delve/service"
"github.com/go-delve/delve/service/dap/daptest"
"github.com/go-delve/del... |
/*
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, ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/datastore/admin/v1/index.proto
package admin // import "google.golang.org/genproto/googleapis/datastore/admin/v1"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/a... |
/*
Copyright (c) 2018 The Helm 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 mysql
import (
"bytes"
"database/sql/driver"
"fmt"
"io"
"math"
"strings"
"time"
)
type packet struct {
bytes.Buffer
}
func newPacket() (p packet) {
p.Write([]byte{0, 0, 0, 0})
return p
}
func readHeader(r io.Reader, seq byte) (int, error) {
var h [4]byte
_, err := io.ReadFull(r, h[:])
if err !=... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/resources/campaign_bid_modifier.proto
package resources // import "google.golang.org/genproto/googleapis/ads/googleads/v1/resources"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import wrappers "... |
package management
import (
"bytes"
"encoding/json"
"encoding/xml"
"net/http"
clients "github.com/ryanjdew/go-marklogic-go/clients"
handle "github.com/ryanjdew/go-marklogic-go/handle"
"github.com/ryanjdew/go-marklogic-go/util"
)
// DatabaseProperties represents the properties of a MarkLogic Database
type Data... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package etcdraft
import (
"crypto/x509"
"encoding/pem"
"time"
"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric-protos-go/common"
"github.com/hyperledger/fabric-protos-go/orderer"
"github.com/hyperledger/fabric... |
package router
import (
"context"
"crypto/tls"
"database/sql"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"path/filepath"
"strings"
"time"
"github.com/cmlight/go-adscert/pkg/adscert"
"github.com/cmlight/go-adscert/pkg/adscertcrypto"
"github.com/prebid/prebid-server/currency"
"github.com/prebid/prebid-s... |
// Copyright 2019 The Hugo 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 applicable ... |
package api
import (
"encoding/json"
"fmt"
"math"
"sort"
"strings"
"github.com/go-playground/validator/v10"
)
var compositionValidator = func() *validator.Validate {
v := validator.New()
v.RegisterStructValidation(ValidateInstances, &Instances{})
return v
}()
type Groups []*Group
func (gs Groups) Validate... |
/*
Copyright © 2020 <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 to in writing, softwar... |
// Copyright (c) 2019-2022 Tigera, 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 ap... |
// Package core contains the core Bazelisk logic, as well as abstractions for Bazel repositories.
package core
// TODO: split this file into multiple smaller ones in dedicated packages (e.g. execution, incompatible, ...).
import (
"bufio"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"os/exec"
"os/signal"
"path/filepath... |
// Copyright 2018 Istio 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... |
// Copyright (c) <NAME> <<EMAIL>>. All rights reserved. Use
// of this source code is governed by the MIT license that can be found in
// the LICENSE file.
package girc
import (
"bytes"
"fmt"
"strings"
"time"
)
const (
eventSpace byte = ' ' // Separator.
maxLength int = 510 // Maximum length is 510 (2 for li... |
/*
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... |
// Copyright 2021 <NAME>
//
// https://github.com/atc0005/dnsc
//
// Licensed under the MIT License. See LICENSE file in the project root for
// full license information.
// Package config provides types and functions to collect, validate and apply
// user-provided settings.
package config
import (
"errors"
"flag"
... |
package queue
import (
"context"
"fmt"
"math/rand"
"os"
"sync"
"time"
"github.com/mongodb/amboy"
"github.com/mongodb/amboy/registry"
"github.com/mongodb/grip"
"github.com/mongodb/grip/message"
"github.com/pkg/errors"
uuid "github.com/satori/go.uuid"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
// mongoDB... |
package proxy
import (
"encoding/json"
"fmt"
"io"
"sort"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/deepfabric/elasticell/pkg/log"
"github.com/deepfabric/elasticell/pkg/pb/metapb"
"github.com/deepfabric/elasticell/pkg/pb/pdpb"
"github.com/deepfabric/elasticell/pkg/pb/raftcmdpb"
"github.com/deepfab... |
/*
Package golp gives Go bindings for LPSolve, a Mixed Integer Linear
Programming (MILP) solver.
For usage examples, see https://github.com/draffensperger/golp#examples.
Not all LPSolve functions have bindings. Feel free to open an issue or
contact me if you would like more added.
One difference from the LPSolve C l... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: plugin.proto
package plugin_go
import (
fmt "fmt"
proto "github.com/cosmos/gogoproto/proto"
descriptor "github.com/cosmos/gogoproto/protoc-gen-gogo/descriptor"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _... |
package chain
import (
"context"
"sync"
"time"
"<KEY>"
"<KEY>"
"<KEY>"
logging "<KEY>"
"github.com/filecoin-project/go-filecoin/actor/builtin"
"github.com/filecoin-project/go-filecoin/consensus"
"github.com/filecoin-project/go-filecoin/sampling"
"github.com/filecoin-project/go-filecoin/state"
"github.com... |
// Package hawk implements the Hawk HTTP authentication scheme.
package hawk
import (
"bytes"
"crypto/hmac"
"crypto/rand"
"encoding/base64"
"fmt"
"hash"
"io"
"net"
"net/http"
"net/url"
"regexp"
"strconv"
"strings"
"time"
)
// Now is a func() time.Time that is used by the package to get the current time.... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.6.1
// source: protobuf/meta.proto
package protobuf
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
... |
package retryabledns
import (
"bytes"
"encoding/gob"
"encoding/json"
"errors"
"fmt"
"math/rand"
"net"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/miekg/dns"
"github.com/projectdiscovery/iputil"
"github.com/projectdiscovery/retryabledns/doh"
"github.com/projectdiscovery/retryabledns/hostsfile"
"g... |
// Copyright 2014, The Serviced Authors. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
package api
import (
"encoding/json"
"fmt"
"io/ioutil"
"math"
"os"
"os/exec"
"path/filepath"
"regexp"
"sort"
"strconv"
"strings"
"time"
... |
package openapiv3
import (
"fmt"
"sort"
"strconv"
"goa.design/goa/v3/expr"
"goa.design/goa/v3/http/codegen/openapi"
)
// OpenAPIVersion is the OpenAPI specification version targeted by this package.
const OpenAPIVersion = "3.0.3"
// New returns the OpenAPI v3 specification for the given API.
// It returns nil ... |
package btree
import (
"fmt"
"godev/basic"
)
// https://en.wikipedia.org/wiki/B-tree
// Item stored int Node
type Item struct {
Key interface{}
Value interface{}
}
func (item *Item) String() string {
return fmt.Sprintf("{%+v: %+v}", item.Key, item.Value)
}
// Node in BTree
type Node struct {
Items []*It... |
package forward
import (
"context"
"errors"
"fmt"
"os"
"strings"
"github.com/spf13/cobra"
"google.golang.org/grpc"
"github.com/mutagen-io/mutagen/cmd"
"github.com/mutagen-io/mutagen/cmd/mutagen/daemon"
"github.com/mutagen-io/mutagen/pkg/configuration/global"
"github.com/mutagen-io/mutagen/pkg/filesystem... |
// Package cmn provides common constants, types, and utilities for AIS clients
// and AIStore.
/*
* Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
*/
package cmn
import (
"fmt"
"path/filepath"
"reflect"
"strings"
"github.com/NVIDIA/aistore/cmn/cos"
"github.com/NVIDIA/aistore/cmn/debug"
)
/... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: temporal/server/api/enums/v1/task.proto
package enums
import (
fmt "fmt"
math "math"
strconv "strconv"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.... |
package deluge
import (
"encoding/json"
"time"
)
// Deluge WebUI methods.
const (
AuthLogin = "auth.login"
AddMagnet = "core.add_torrent_magnet"
AddTorrentURL = "core.add_torrent_url"
AddTorrentFile = "core.add_torrent_file"
GetTorrentStat = "core.get_torrent_status"
GetAllTorrents = "core.get_torr... |
// This code is available on the terms of the project LICENSE.md file,
// also available online at https://blueoakcouncil.org/license/1.0.0.
package dcr
import (
"context"
"encoding/hex"
"fmt"
"sync"
"time"
"decred.org/dcrdex/client/asset"
"github.com/decred/dcrd/chaincfg/chainhash"
"github.com/decred/dcrd/g... |
package mdp
import (
"errors"
"fmt"
"runtime"
"time"
"github.com/geoffjay/plantd/core/util"
log "github.com/sirupsen/logrus"
czmq "github.com/zeromq/goczmq/v4"
)
// Broker defines a single broker instance.
type Broker struct {
Socket *czmq.Sock // Socket for clients & workers
endpoint ... |
// Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"fmt"
"sync"
"time"
"github.com/keybase/client/go/logger"
"golang.org/x/net/context"
)
// KBFSOpsStandard implements the KBFSOps interf... |
package builder
import (
"bytes"
"fmt"
"reflect"
"github.com/golang/protobuf/proto"
dpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
"github.com/xiaoshude/protoreflect/desc"
"github.com/xiaoshude/protoreflect/dynamic"
)
// Builder is the core interface implemented by all descriptor builders. It
// e... |
package ui
import (
"bufio"
"encoding/json"
"fmt"
"os"
"path/filepath"
"strings"
"time"
"github.com/darkhz/invidtui/lib"
"github.com/darkhz/tview"
"github.com/gdamore/tcell/v2"
"golang.org/x/sync/semaphore"
)
// EntryData stores playlist entry data.
type EntryData struct {
ID int `json:"id"`
Fi... |
// A command line utility that uses the certlint library to validate one or more
// certificates.
//
// See the examples directory for other use cases.
package main
import (
"bufio"
"bytes"
"crypto/sha1"
"crypto/sha256"
"crypto/x509"
"encoding/csv"
"encoding/hex"
"encoding/pem"
"flag"
"fmt"
"io/ioutil"
"n... |
package ddevapp
import (
"bytes"
"fmt"
"html/template"
"io/ioutil"
"os"
"path/filepath"
"strings"
"regexp"
"github.com/drud/ddev/pkg/appports"
"github.com/drud/ddev/pkg/exec"
"github.com/drud/ddev/pkg/fileutil"
"github.com/drud/ddev/pkg/output"
"github.com/drud/ddev/pkg/util"
"github.com/drud/ddev/pkg/... |
package sdk
import (
"context"
"encoding/json"
"fmt"
"strings"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/discovery"
"k8s.io/client-go/third_party/forked/golang/t... |
/* YaNFD - Yet another NDN Forwarding Daemon
*
* Copyright (C) 2020-2021 <NAME>.
*
* This file is licensed under the terms of the MIT License, as found in LICENSE.md.
*/
package fw
import (
"encoding/binary"
"runtime"
"strconv"
"strings"
"github.com/cespare/xxhash"
"github.com/named-data/YaNFD/core"
"git... |
package cmd
import (
"io"
"strings"
"fmt"
"errors"
os_user "os/user"
"github.com/Pallinder/go-randomdata"
"github.com/jenkins-x/jx/pkg/jx/cmd/gke"
"github.com/jenkins-x/jx/pkg/jx/cmd/log"
"github.com/jenkins-x/jx/pkg/jx/cmd/templates"
cmdutil "github.com/jenkins-x/jx/pkg/jx/cmd/util"
"github.com/jenkin... |
/*
This file is part of Astarte.
Copyright 2020 Ispirata Srl
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 applica... |
// 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 (
"bufio"
"encoding/binary"
"flag"
"fmt"
"github.com/alltom/dirgui/rfb"
"golang.org/x/image/font"
"golang.org/x/image/font/basicfont"
"golang.org/x/image/math/fixed"
"image"
"image/color"
"image/draw"
"io"
"io/ioutil"
"log"
"net"
"os"
"os/exec"
"path/filepath"
"strings"
"sync"
)... |
// Copyright © 2019 <NAME> <<EMAIL>>
// <NAME> <<EMAIL>>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: tensorflow/core/protobuf/tensor_bundle.proto
package protobuf
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import tensorflow "github.com/kuberlab/tfservable-proxy/pkg/tensorflow/core/framework"
import tensorflow15 "gith... |
// Copyright 2022 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 w... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: go/pkg/balancer/proto/grpcbalancer.proto
package grpcbalancer
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _... |
//line parser_ctype.rl:1
// -*-go-*-
//
// Content Type header parser
package sipmsg
//line parser_ctype.rl:7
//line parser_ctype.go:12
var _ctype_actions []byte = []byte{
0, 1, 0, 1, 1, 1, 2, 1, 3,
2, 4, 6, 2, 5, 6,
}
var _ctype_key_offsets []byte = []byte{
0, 0, 14, 30, 34, 35, 37, 40,
57, 58, 60, 76, 80, 81, ... |
package service
import (
"context"
"errors"
"net/http"
"strconv"
"time"
"github.com/dgrijalva/jwt-go"
uuid "github.com/satori/go.uuid"
"github.com/yunfeiyang1916/micro-go-course/oauth/model"
)
var (
// 授权类型错误
ErrNotSupportGrantType = errors.New("grant type is not supported")
// 不支持的操作
ErrNotSupportOpera... |
package sql
import (
"fmt"
"net"
"reflect"
"strings"
"sync"
"testing"
"time"
)
type rowCount struct {
table string
rows int
}
var tests = []struct {
question string
qtype uint16
hijacked bool
answers []string
t time.Time
remoteAddr net.IP
rowCounts []rowCount
}{
{"foo.example.... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v0/errors/keyword_plan_error.proto
package errors // import "google.golang.org/genproto/googleapis/ads/googleads/v0/errors"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to supp... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.12.3
// source: grpc.proto
package proto
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.... |
package cli
import (
"bufio"
"fmt"
"io"
"log"
"net"
"os"
"path/filepath"
"sort"
s "strings"
"sync"
"time"
"github.com/elastic/hey-apm/worker"
"github.com/elastic/hey-apm/cli/fileio"
"github.com/elastic/hey-apm/commands"
"github.com/elastic/hey-apm/es"
"github.com/elastic/hey-apm/out"
"github.com/pkg... |
package pdiutil
import "encoding/xml"
type JSONObject = map[string]interface{}
// LoginResponse struct
type LoginResponse struct {
XMLName xml.Name `xml:"Login"`
Text string `xml:",chardata"`
Messages struct {
Text string `xml:",chardata"`
Message []struct {
Text string `xml:",chardata"`
T... |
package main
/*
Simulate the accuracy of a user's query (e.g without requiring PIR or encryptions)
1) Sample hash functions randomly from the distribution
2) Hash all dataset points under each hash function and construct hash tables
3) For each query in the testing set
a) Compute the NumProbes closest lattice poi... |
package interactive
import (
"strings"
"fmt"
"io"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ecs"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/chzyer/readline"
"github.com/jdrivas/sl"
"... |
package config
import (
"context"
"errors"
"os"
"os/exec"
"path/filepath"
"time"
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/mysql"
_ "github.com/jinzhu/gorm/dialects/sqlite"
gc "github.com/patrickmn/go-cache"
"github.com/photoprism/photoprism/internal/entity"
"github.com/photoprism/photop... |
package main
import (
"bytes"
"encoding/gob"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"math"
"sync/atomic"
// "runtime"
"strings"
"sync"
"time"
"github.com/juju/ratelimit"
"github.com/spf13/viper"
"github.com/yawhide/go-lol"
"gopkg.in/pg.v4"
)
var championToRoleMapping = map[string][]string{}
var matc... |
// Copyright © 2016 <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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: lint.proto
package gitalypb
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.... |
// Copyright (c) 2015 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 main
import (
"encoding/binary"
"errors"
"flag"
"fmt"
"io"
"io/ioutil"
"net"
"os"
"path/filepath"
"sort"
"strconv"
"strings"
"time"
"github.com/gomodule/redigo/redis"
"github.com/hashicorp/raft"
raftjss "github.com/tidwall/raft-jss"
raftwal "github.com/tidwall/raft-wal"
"github.com/tidwall/r... |
// Code generated by protoc-gen-go.
// source: security_group.proto
// DO NOT EDIT!
/*
Package oaktree is a generated protocol buffer package.
It is generated from these files:
security_group.proto
It has these top-level messages:
SecurityGroupRule
SecurityGroupRuleList
SecurityGroup
SecurityGroupList
*/
packag... |
package macho
import (
"bufio"
"bytes"
"encoding/binary"
"io/ioutil"
"log"
"os"
"sort"
)
// Bytes - Returns the bytes of an assembled *macho.File
func (machoFile *File) Bytes() ([]byte, error) {
var bytesWritten uint64
w := bytes.NewBuffer(nil)
// Write entire file header.
buf := &bytes.Buffer{}
err := b... |
package dvara
import (
"errors"
"fmt"
"io"
"net"
"os"
"strings"
"sync"
"time"
"github.com/facebookgo/rpool"
"github.com/facebookgo/stats"
)
const headerLen = 16
var (
errZeroMaxConnections = errors.New("dvara: MaxConnections cannot be 0")
errZeroMaxPerClientConnections = errors.New("dvara: MaxP... |
package places
import (
"context"
"fmt"
"github.com/agnivade/levenshtein"
"github.com/dgraph-io/ristretto"
"sort"
"sync"
"sync/atomic"
"time"
)
// Config is the configuration for Places.
type Config struct {
// MaxPrefixLength is the maximum prefixes length to precompute results for.
MaxPrefixLength int `j... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.