text stringlengths 5.51k 28.1k |
|---|
// Based on <NAME> <<EMAIL>> libcgroup bindings
// https://github.com/vbatts/go-cgroup
package cgroup
/*
#include <libcgroup.h>
#cgo LDFLAGS: -lcgroup
// work around for the 'type' special word
enum cgroup_file_type type_from_file_info(struct cgroup_file_info fi) {
return fi.type;
}
*/
import "C"
import (
"errors... |
// Copyright 2017 Google 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... |
// Code generated by entc, DO NOT EDIT.
package ent
import (
"fmt"
"strings"
"time"
"entgo.io/ent/dialect/sql"
"github.com/willie-lin/kubeMonitor/pkg/nextserver/database/ent/event"
"github.com/willie-lin/kubeMonitor/pkg/nextserver/database/ent/metricendpoint"
"github.com/willie-lin/kubeMonitor/pkg/nextserver/... |
/*
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 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 2022 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: cs3/permissions/v1beta1/permissions_api.proto
package permissionsv1beta1
import (
context "context"
fmt "fmt"
v1beta11 "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
v1beta1 "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
proto "github.com/g... |
// Package dashboard runs a web dashboard that displays information about a CX34 heat pump.
package dashboard
import (
"context"
"fmt"
"net/http"
"sort"
"strconv"
"strings"
"time"
"github.com/golang/glog"
"github.com/golang/protobuf/proto"
"github.com/yuin/goldmark"
"github.com/yuin/goldmark/extension"
"g... |
// Code generated from SwiftFinLexer.g4 by ANTLR 4.7.2. DO NOT EDIT.
package swiftfin
import (
"fmt"
"unicode"
"github.com/antlr/antlr4/runtime/Go/antlr"
)
// Suppress unused import error
var _ = fmt.Printf
var _ = unicode.IsLetter
var serializedLexerAtn = []uint16{
3, 24715, 42794, 33075, 47597, 16764, 15335,... |
package volume
import (
"bytes"
"context"
"fmt"
"sort"
"strings"
"testing"
"time"
"github.com/puppetlabs/wash/datastore"
"github.com/puppetlabs/wash/plugin"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/suite"
)
const fixtureDepth = 7
// Represents the output of StatCmdPOSIX(/var/log)
c... |
package epp
import (
"encoding/xml"
"errors"
"regexp"
"strings"
"time"
)
const transferKeyLowerCaseLetters = "<KEY>"
const transferKeyUpperCaseLetters = "<KEY>"
const transferKeyNumbers = "0123456789"
const transferKeySpecialLetters = "!\"#$%'()*+,-./:;=@[\\]^_'{|}~)"
type APIDomainCheck struct {
XMLName xml.... |
package hotstuff
import (
"context"
"crypto/ecdsa"
"crypto/rand"
"crypto/sha256"
"encoding/base64"
"encoding/binary"
"fmt"
"math/big"
"net"
"strconv"
"sync"
"time"
"github.com/relab/hotstuff/config"
"github.com/relab/hotstuff/consensus"
"github.com/relab/hotstuff/data"
"github.com/relab/hotstuff/inter... |
package order
import (
"encoding/json"
"fmt"
"github.com/seerwo/ark/iris/context"
"github.com/seerwo/ark/util"
)
const (
OBD_URL = "/obd"
OBD_CANCEL_URL = "/cancel"
OBD_URL_V2 = "/odb/v2"
)
type ReqObd struct {
CompanyCode string `json:"companyCode"` //货主编码 companyCode string 是... |
// Copyright (c) 2020 <NAME> <<EMAIL>>
// MIT Licence applies http://opensource.org/licenses/MIT
package main
import (
"flag"
"fmt"
"log"
"os"
"os/exec"
"path/filepath"
aw "github.com/deanishe/awgo"
"github.com/deanishe/awgo/util"
"github.com/peterbourgon/ff/ffcli"
)
var (
// search history
historyCmd = ... |
package common
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"sync"
"testing"
"github.com/ozontech/allure-go/pkg/allure"
"github.com/ozontech/allure-go/pkg/framework/asserts_wrapper/helper"
"github.com/ozontech/allure-go/pkg/framework/core/allure_manager/manager"
"github.com/ozontech/allure-go/pkg/framewo... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: perf_boot_service.proto
package arc
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"
empty "github.com/golang/protobuf/ptypes/empty"
grpc "google.golang.org/grpc"
codes... |
// Copyright 2016 The LUCI Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
package main
import (
"flag"
"fmt"
"io"
"net/url"
"os"
"os/exec"
"sync"
"time"
"infra/libs/infraenv"
"github.com/luci/luci-go/comm... |
package degen
import (
"github.com/faiface/generics/go/ast"
"github.com/faiface/generics/go/token"
)
func degenTypeSpec(cfg *config, spec *ast.TypeSpec) bool {
if len(spec.Params) > 0 {
panic("cannot degenerate a generic type")
}
typ, changedTyp := degenNode(cfg, spec.Type)
cfg.output.Decls = append(cfg.out... |
package main
import (
"context"
"encoding/json"
"errors"
"fmt"
"net"
"net/url"
"os"
"regexp"
"strings"
"time"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/cloudforma... |
package numeric
var formatStrings map[Response]string
func init(){
formatStrings = map[Response]string{
Response("001"): ":Welcome to the %s Internet Relay Chat Network %s",
Response("002"): ":Your host is %s, running version %s",
Response("003"): ":This server was created %s",
Response("004"): "%s %s %s %s ... |
package golog
import (
"fmt"
"log"
"os"
"path"
"runtime"
"time"
)
//初始化方法需要调用装饰器去构造,用哪种级别的就构造哪种的,没构造的就不会起作用
// 构造debug
// loger.Start(loger.DebugLevel, loger.AlsoStdout)
// 构造info
// loger.Start(loger.InfoLevel, loger.AlsoStdout, loger.LogFilePath(saveLogFilePath), loger.EveryDay)
// 构造warn
// loger.Start(loger... |
// Package cert contains certificate specifications and
// certificate-specific management.
package cert
import (
"context"
"crypto/ecdsa"
"crypto/rsa"
"crypto/tls"
"crypto/x509"
"fmt"
"io/ioutil"
"math/rand"
"os"
"path/filepath"
"strings"
"time"
"github.com/pkg/errors"
"gopkg.in/yaml.v2"
"github.com... |
package postgres
import (
"database/sql"
_ "github.com/lib/pq"
"log"
)
type TestDB struct {
root *sql.DB
DB *DB
}
func (t *TestDB) Init() (err error) {
// open the default db
if t.root, err = sql.Open("postgres", "postgres:///?sslmode=disable"); err != nil {
return err
} else if err = t.root.Ping(); err ... |
// Copyright (c) 2020-2021 Blockwatch Data Inc.
// Author: <EMAIL>
package server
import (
"encoding/hex"
"encoding/json"
"fmt"
"io"
"math"
"net/http"
"strconv"
"strings"
"time"
"blockwatch.cc/packdb/encoding/csv"
"blockwatch.cc/packdb/pack"
"blockwatch.cc/packdb/util"
"blockwatch.cc/tzgo/tezos"
"block... |
// 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
/*
Copyright 2017 Google 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
dis... |
// Copyright (c) 2021 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... |
/*
* Copyright 2019-2020 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... |
// Copyright 2012-present <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"
"fmt"
"net/url"
"strings"
"gopkg.in/olivere/elastic.v5/uritemplates"
)
// IndicesStatsService provide... |
/*
Copyright 2019 The KubeEdge 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... |
// Copyright (c) 2017 jelmersnoeck
// Copyright (c) 2018-2021 Aiven, Helsinki, Finland. https://aiven.io/
package aiven
import (
"context"
"fmt"
"net/url"
"regexp"
"strconv"
"strings"
"time"
"github.com/docker/go-units"
"github.com/aiven/aiven-go-client"
"github.com/aiven/terraform-provider-aiven/aiven/tem... |
// Copyright 2020 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 arn
import (
"errors"
"fmt"
"io/ioutil"
"net/http"
"strconv"
"strings"
"sync"
"time"
"github.com/aerogo/aero"
"github.com/aerogo/http/client"
"github.com/animenotifier/ffxiv"
"github.com/animenotifier/notify.moe/arn/autocorrect"
"github.com/animenotifier/notify.moe/arn/validate"
"github.com/anim... |
// The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 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 Soft... |
// Copyright 2016-2019 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... |
// Copyright 2015 Keybase, Inc. All rights reserved. Use of
// this source code is governed by the included BSD license.
package updater
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"time"
"github.com/keybase/go-updater/util"
)
// Version is the updater vers... |
// Copyright (c) 2018-2019, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the
// LICENSE.md file distributed with the sources of this project regarding your
// rights to use or distribute this software.
package cli
import (
"fmt"
"io"
"os"
"os/user"
"p... |
// 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 writi... |
/* 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 face
import (
"container/list"
"math"
"runtime"
"strconv"
"sync"
"time"
"github.com/named-data/YaNFD/core"
"github.com/named-d... |
// MIT License
// Copyright (c) 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, p... |
package consensus
import (
"bytes"
"fmt"
"sort"
"sync"
"testing"
"time"
cfg "github.com/tendermint/go-config"
dbm "github.com/tendermint/go-db"
"github.com/tendermint/go-events"
bc "github.com/tendermint/tendermint/blockchain"
mempl "github.com/tendermint/tendermint/mempool"
sm "github.com/tendermint/tend... |
// Package cmd encapsulates the logic for all cli commands
package cmd
import (
"bufio"
"fmt"
"log"
"os"
"os/exec"
"strconv"
"strings"
"github.com/gabrie30/ghorg/colorlog"
"github.com/gabrie30/ghorg/configs"
"github.com/korovkin/limiter"
"github.com/spf13/cobra"
)
var (
protocol string
path ... |
package es_test
import (
"fmt"
"testing"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/volatiletech/null/v8"
"github.com/Bnei-Baruch/archive-backend/common"
"github.com/Bnei-Baruch/archive-backend/consts"
"github.com/Bnei-Baruch/archive-backend/es"
mdbmodels "github.c... |
package worker
import (
"fmt"
"github.com/golang/glog"
"github.com/turbonomic/kubeturbo/pkg/discovery/metrics"
"github.com/turbonomic/kubeturbo/pkg/discovery/repository"
"github.com/turbonomic/kubeturbo/pkg/discovery/task"
"github.com/turbonomic/kubeturbo/pkg/discovery/util"
"k8s.io/api/core/v1"
)
// Collects ... |
// Copyright 2020 by Blank-Xu. 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 applicab... |
package smtpd
import (
"bufio"
"bytes"
"container/list"
"fmt"
"io"
"net"
"regexp"
"strconv"
"strings"
"sync"
"time"
"github.com/jhillyerd/inbucket/datastore"
"github.com/jhillyerd/inbucket/log"
"github.com/jhillyerd/inbucket/msghub"
"github.com/jhillyerd/inbucket/stringutil"
)
// State tracks the curr... |
// Copyright 2015 The draw2d Authors. All rights reserved.
// created: 26/06/2015 by <NAME>
// TODO: dashed line
package draw2dpdf
import (
"bytes"
"image"
"image/color"
"image/png"
"log"
"math"
"os"
"strconv"
"code.google.com/p/freetype-go/freetype/truetype"
"github.com/jung-kurt/gofpdf"
"github.com/llg... |
package sync
import (
"fmt"
"hash"
"io"
"os"
"path/filepath"
"runtime"
"github.com/pkg/errors"
"golang.org/x/text/unicode/norm"
"github.com/golang/protobuf/ptypes"
fs "github.com/havoc-io/mutagen/pkg/filesystem"
)
const (
// scannerCopyBufferSize specifies the size of the internal buffer that a
// sca... |
// Copyright 2018 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 ... |
package kubernetes
import (
"bytes"
"crypto/tls"
"crypto/x509"
"encoding/json"
"errors"
"fmt"
"io"
"net"
"net/http"
"os"
"regexp"
"sort"
"time"
log "github.com/sirupsen/logrus"
"github.com/zalando/skipper/dataclients/kubernetes/definitions"
"github.com/zalando/skipper/secrets"
"github.com/zalando/sk... |
package cedar
const (
// ValueLimit limit value
ValueLimit = int(^uint(0) >> 1)
)
type node struct {
Value int
Check int
}
func (n *node) base() int {
return -(n.Value + 1)
}
type ninfo struct {
Sibling, Child byte
}
type block struct {
Prev, Next, Num, Reject, Trial, Ehead int
}
func (b *block) init() {
... |
// 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 (
"errors"
"fmt"
"sync"
"time"
"github.com/keybase/client/go/logger"
"github.com/keybase/client/go/protocol/keybase1"
"github.com/keybase... |
// 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 (
"time"
)
// module names
const (
DSortName = "dSort"
DSortNameLowercase = "dsort"
)
// ActionMsg.Action
// includ... |
// 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 2016-2020 Datadog, Inc.
package tracer
import (
"encoding/json"
"fmt"
"io"
"math"
"os"
"regex... |
/*
* Tencent is pleased to support the open source community by making 蓝鲸 available.
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the Li... |
package whatsapp
import (
"encoding/json"
"strings"
)
type JSONMessage []json.RawMessage
type JSONMessageType string
const (
MessageMsgInfo JSONMessageType = "MsgInfo"
MessageMsg JSONMessageType = "Msg"
MessagePresence JSONMessageType = "Presence"
MessageStream JSONMessageType = "Stream"
MessageConn ... |
// 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
// +build go1.7
/*
*
* Copyright 2017 gRPC 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 applic... |
package peco
import (
"fmt"
"sync"
"time"
"unicode/utf8"
"github.com/mattn/go-runewidth"
"github.com/nsf/termbox-go"
)
// PageCrop filters out a new LineBuffer based on entries
// per page and the page number
type PageCrop struct {
perPage int
currentPage int
}
// Crop returns a new LineBuffer whose con... |
// 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
package util
import "strconv"
var (
Option_filetype string
Option_context string
Option_file string
Option_namespace string
Option_allnamespace bool
Option_ip string
Option_clusterName string
Option_allcluster bool
Option_containerName string
Option_stdin boo... |
// Copyright 2019 <NAME>. All rights reserved. Use of this source
// code is governed by the MIT license that can be found in the LICENSE
// file.
// Package edit provides an editable text field widget with support for password hiding.
package edit
import (
"fmt"
"io"
"unicode"
"unicode/utf8"
"github.com/gcla/... |
package terminal
import (
"context"
"encoding/base64"
"encoding/hex"
"fmt"
"io/ioutil"
"net/http"
"strings"
"time"
"github.com/improbable-eng/grpc-web/go/grpcweb"
"github.com/lightningnetwork/lnd/lncfg"
"github.com/lightningnetwork/lnd/macaroons"
grpcProxy "github.com/mwitkow/grpc-proxy/proxy"
"google.go... |
package eval
import (
"strings"
"github.com/chermehdi/comet/lexer"
"github.com/chermehdi/comet/parser"
"github.com/chermehdi/comet/std"
)
type Evaluator struct {
Scope *Scope
Builtins map[string]*std.Builtin
}
// Constructs a new evaluator
// Each constructed evaluator has it's own Scope, i.e variables acc... |
package redcon
import (
"fmt"
"reflect"
"sort"
"strconv"
"strings"
)
// Type of RESP
type Type byte
// Various RESP kinds
const (
Integer = ':'
String = '+'
Bulk = '$'
Array = '*'
Error = '-'
)
// RESP ...
type RESP struct {
Type Type
Raw []byte
Data []byte
Count int
}
// ForEach iterates... |
// Copyright 2016 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 metadata
import (
"bytes"
"encoding/json"
"fmt"
"image/color"
"io/ioutil"
"os"
"path/filepath"
"sort"
"strings"
"github.com/imdario/mergo"
"github.com/ralreegorganon/cddamap/internal/gen/save"
log "github.com/sirupsen/logrus"
)
type overmapTerrain struct {
internalID uint32
ID string ... |
package hatchery
import (
"context"
"fmt"
"os/exec"
"sync/atomic"
"time"
"github.com/patrickmn/go-cache"
"github.com/ovh/cds/sdk"
"github.com/ovh/cds/sdk/cdsclient"
"github.com/ovh/cds/sdk/log"
)
// CommonConfiguration is the base configuration for all hatcheries
type CommonConfiguration struct {
Name str... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/services/group_placement_view_service.proto
package services
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
resources "google.golang.org/genproto/googleapis/ads/googleads/v3/resources"
... |
package restfulspec
import (
"encoding/json"
"reflect"
"strings"
"github.com/go-openapi/spec"
)
type definitionBuilder struct {
Definitions spec.Definitions
Config Config
}
// Documented is
type Documented interface {
SwaggerDoc() map[string]string
}
// Check if this structure has a method with signatu... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/services/campaign_audience_view_service.proto
package services
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
resources "google.golang.org/genproto/googleapis/ads/googleads/v1/resources... |
// Copyright (C) The Arvados Authors. All rights reserved.
//
// SPDX-License-Identifier: Apache-2.0
package arvados
import (
"bufio"
"context"
"encoding/json"
"io"
"net"
"github.com/sirupsen/logrus"
)
type APIEndpoint struct {
Method string
Path string
// "new attributes" key for create/update requests
... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package etcdraft
import (
"context"
"encoding/pem"
"fmt"
"sync"
"sync/atomic"
"time"
"code.cloudfoundry.org/clock"
"github.com/coreos/etcd/raft"
"github.com/coreos/etcd/raft/raftpb"
"github.com/golang/protobuf/proto"
"gith... |
// Copyright 2018 The Cockroach 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 ag... |
package moveserver
import (
"fmt"
"log"
"os"
"os/exec"
"path/filepath"
"regexp"
"sort"
"strconv"
"strings"
"sync"
"time"
"github.com/HawkMachine/kodi_automation/platform"
"github.com/HawkMachine/kodi_automation/utils/collections"
kd "github.com/HawkMachine/kodi_go_api/v6/kodi"
tr "github.com/HawkMachi... |
package monitor
import (
"bytes"
"fmt"
"log"
"time"
"github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights"
"github.com/hashicorp/go-azure-helpers/response"
"github.com/hashicorp/terraform-plugin-sdk/helper/hashcode"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"git... |
package ahaslides
import (
"fmt"
"log"
"strconv"
"strings"
"time"
"github.com/grokify/gocharts/data/roadmap"
su "github.com/grokify/googleutil/slidesutil/v1"
"github.com/grokify/mogo/fmt/fmtutil"
"github.com/grokify/mogo/math/mathutil"
"github.com/grokify/mogo/time/timeutil"
"github.com/grokify/mogo/type/s... |
// Copyright 2015 The go-ethereum Authors
// Copyright 2017 The cypherBFT Authors
// This file is part of the cypherBFT library.
//
// The cypherBFT 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 Foundat... |
package main
//go:generate go run gen.go -out seqdec_amd64.s -stubs delme.go -pkg=zstd
import (
"flag"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"runtime"
_ "github.com/klauspost/compress"
. "github.com/mmcloughlin/avo/build"
"github.com/mmcloughlin/avo/buildtags"
. "github.com/mmcloughlin/avo/operand"
"git... |
// Package grpc provides nodes grpc connection utilities.
package grpc
import (
"context"
cryptorand "crypto/rand"
"crypto/tls"
"fmt"
"math/rand"
"sync"
"time"
"google.golang.org/grpc"
"google.golang.org/grpc/backoff"
"google.golang.org/grpc/resolver"
"google.golang.org/grpc/resolver/manual"
"github.com/... |
package immutable
import (
"fmt"
"math/rand"
"testing"
"github.com/stretchr/testify/assert"
)
func Example_strSet() {
s1 := EmptyStrSet
s2 := s1.Add("Robin")
s1 = s1.Add("Anne").Add("Frank")
s3 := s1.Del("Anne")
fmt.Printf("s1: %s\n", s1)
fmt.Printf("s2: %s\n", s2)
fmt.Printf("s3: %s\n", s3)
// Output:
... |
/*
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... |
package models
import (
"database/sql"
"encoding/json"
"fmt"
"strconv"
"strings"
"time"
"github.com/go-pg/pg/orm"
"github.com/lib/pq"
"github.com/lib/pq/hstore"
"github.com/pkg/errors"
"gopkg.in/yaml.v2"
)
//go:generate stringer -type=EnvironmentStatus
//go:generate stringer -type=QADestroyReason
// Env... |
// go:build test
// +build test
package main
import (
"encoding/json"
"fmt"
"syscall/js"
"testing"
"time"
"github.com/0chain/gosdk/core/common"
"github.com/0chain/gosdk/core/zcncrypto"
"github.com/0chain/gosdk/wasmsdk/httpwasm"
"github.com/0chain/gosdk/zcncore"
"github.com/stretchr/testify/assert"
)
var v... |
package coins
import (
"fmt"
"github.com/MinterTeam/minter-go-node/core/state/bus"
"github.com/MinterTeam/minter-go-node/core/types"
"github.com/MinterTeam/minter-go-node/helpers"
"github.com/MinterTeam/minter-go-node/rlp"
"github.com/MinterTeam/minter-go-node/tree"
"math/big"
"sort"
"sync"
)
const (
mainPr... |
package base
import (
"fmt"
"github.com/siddontang/go-log/log"
"github.com/SisyphusSQ/go-mysql/mysql"
"github.com/SisyphusSQ/go-mysql/replication"
SQL "github.com/SisyphusSQ/my2sql/sqlbuilder"
toolkits "github.com/SisyphusSQ/my2sql/toolkits"
"strings"
)
var G_Bytes_Column_Types []string = []string{"blob", "jso... |
package main
import (
"fmt"
"strconv"
"fyne.io/fyne/widget"
)
type vehicleDef struct {
vehicleTons int
vehicleCost float32
}
var vehicleMap = map[string]vehicleDef{
wATVType: {10, 0.03},
tATVType: {10, 0.03},
airRaftType: {4, 0.6},
speederType: {6, 1.0},
gCarrierType: {8... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v4.0.0
// source: proto/NetworkService.proto
package proto
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "googl... |
// Configuration proto for File targets.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: github.com/cloudprober/cloudprober/targets/file/proto/config.proto
package proto
import (
proto1 "github.com/cloudprober/cloudprober/rds/file/proto"
... |
package selection
import (
"fmt"
"log"
"math/rand"
"sort"
"strings"
"github.com/stts-se/wikispeech-manuscriptor/protocol"
"github.com/stts-se/wikispeech-manuscriptor/text"
)
type Feat struct {
Name string `json:"name"`
Desc string `json:"desc"`
}
func AvailableFeats() []Feat {
res := []Feat{
{Name: text... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.18.0
// source: wechaty/puppet/mini-program.proto
package puppet
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "ref... |
// Copyright (c) 2016 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... |
/*
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... |
package gocudnn
/*
#include <cudnn.h>
*/
import "C"
import (
"fmt"
"runtime"
"unsafe"
"github.com/dereklstinson/cutil"
)
//ReduceTensorD is the struct that is used for reduce tensor ops
type ReduceTensorD struct {
tensorDesc C.cudnnReduceTensorDescriptor_t
// tensorOp C.cudnnReduceTensorOp_t
// tenso... |
package rclone
import (
"fmt"
"io/ioutil"
"os"
"os/exec"
"strings"
"time"
"syscall"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/klog"
"github.com/container-storage-interface/spec/lib/go/csi"
"golang.org/x/net/context"
"google.golang.org/grpc/codes"
"google.golang.org/g... |
package rtmpclient
import (
"bufio"
"bytes"
"crypto/tls"
"errors"
"fmt"
"net"
"time"
amf "github.com/zhangpeihao/goamf"
)
type ConnectionStatus uint
func (s ConnectionStatus) String() string {
connectionStatusNames := map[ConnectionStatus]string{
ConnectionStatusClose: "StatusClose",
Connectio... |
package controller
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"reflect"
"strconv"
"time"
"github.com/cenkalti/backoff/v3"
"github.com/containous/maesh/internal/k8s"
"github.com/containous/maesh/internal/providers/base"
"github.com/containous/maesh/internal/providers/kubernetes"
"github... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/api/v2/cluster/circuit_breaker.proto
package cluster
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import wrappers "github.com/golang/protobuf/ptypes/wrappers"
import base "google.golang.org/grpc/xds/internal/proto... |
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package ibmcloud
import (
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/zclconf/go-cty/cty"
)
// FlatConfig is an auto-generated flat version of Config.
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type F... |
package bucketstats
import (
"fmt"
"math/rand"
"regexp"
"testing"
)
// a structure containing all of the bucketstats statistics types and other
// fields; useful for testing
type allStatTypes struct {
MyName string // not a statistic
bar int // also not a statistic
Total1 Total
A... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.