text stringlengths 5.51k 28.1k |
|---|
// Copyright 2020 The Chromium OS 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 arcappcompat will have tast tests for android apps on Chromebooks.
package arcappcompat
import (
"context"
"time"
"chromiumos/tast/erro... |
package parser
import (
"bufio"
"bytes"
"errors"
"fmt"
"io"
"os"
"regexp"
"strconv"
"strings"
"github.com/dakyskye/dxhd/logger"
"github.com/sirupsen/logrus"
)
// EventType is a custom int8 type
type EventType int8
// event definitions
const (
EvtKeyPress EventType = iota
EvtKeyRelease
EvtButtonPress
... |
package gossip
import (
"fmt"
"math/rand"
"net/http"
"sync"
"time"
log "github.com/sirupsen/logrus"
)
//Controller represents a controller instance
type Controller struct {
//IP is the IP address of the Controller
IP string
//Port is the port for the HTTP server on the controller
Port int
//Peers is a syn... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: mesh/v1alpha1/health_check.proto
package v1alpha1
import (
fmt "fmt"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"
_ "github.com/golang/protobuf/ptyp... |
/*
* 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 License, Version 2.0 (the
* "License"); you ... |
package cony
import (
"fmt"
"math/rand"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/davecgh/go-spew/spew"
"github.com/pkg/errors"
"github.com/ethereum/go-ethereum/log"
"github.com/streadway/amqp"
)
var (
// ErrNoConnection is an indicator that currently there is no connection
// available
ErrNo... |
package iso9660
import (
"encoding/binary"
"fmt"
"os"
"path"
"regexp"
"strings"
"time"
)
const (
directoryEntryMinSize uint8 = 34 // min size is all the required fields (33 bytes) plus 1 byte for the filename
directoryEntryMaxSize int = 254 // max size allowed
)
// directoryEntry is a single directory en... |
package vdf
import (
"bytes"
cryptorand "crypto/rand"
"crypto/sha256"
"encoding/gob"
"errors"
"fmt"
"io/ioutil"
"math"
"math/big"
"os"
"prime"
"runtime"
"sort"
"strconv"
"sync"
"tictoc"
"time"
)
const (
perFile = 1 << 30
)
// helper functions
func computeL(t int) (L []*big.Int) {
var primes []uint... |
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
package stratum
import (
"bufio"
"bytes"
"encoding/binary"
"encoding/hex"
"encoding/json"
"io"
"math/big"
"net"
"strconv"
"time"
"github.com/minernl/go-miningcore-pool/types"
"github.com/minernl/go-miningcore-pool/bans"
"github.com/minernl/go-miningcore-pool/config"
"github.com/minernl/go-miningcore-po... |
package repository
import (
"bytes"
"fmt"
"strings"
"github.com/golang/glog"
"github.com/turbonomic/kubeturbo/pkg/discovery/metrics"
"github.com/turbonomic/kubeturbo/pkg/discovery/util"
v1 "k8s.io/api/core/v1"
"github.com/turbonomic/turbo-go-sdk/pkg/proto"
)
// Kube Cluster represents the Kubernetes cluster... |
// Copyright 2018 Owkin, inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: alameda_api/v1alpha1/datahub/common/queries.proto
package common
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
math "math"
)
// ... |
package goapidoc
// ==========
// Definition
// ==========
// Definition represents an api definition information of Document.
type Definition struct {
name string
desc string
xmlRepr *XMLRepr
generics []string
properties []*Property
}
// NewDefinition creates a default Definition with given arguments.
fu... |
package types
import (
"encoding/json"
"strings"
"time"
)
const GINKGO_FOCUS_EXIT_CODE = 197
const GINKGO_TIME_FORMAT = "01/02/06 15:04:05.999"
// Report captures information about a Ginkgo test run
type Report struct {
//SuitePath captures the absolute path to the test suite
SuitePath string
//SuiteDescripti... |
package orderwatch
import (
"context"
"errors"
"math/big"
"time"
"github.com/0xProject/0x-mesh/common/types"
"github.com/0xProject/0x-mesh/constants"
"github.com/0xProject/0x-mesh/zeroex"
"github.com/0xProject/0x-mesh/zeroex/ordervalidator"
"github.com/ethereum/go-ethereum/common"
logger "github.com/sirupse... |
package pythontype
import (
"fmt"
"github.com/kiteco/kiteco/kite-go/lang/python/pythonimports"
"github.com/kiteco/kiteco/kite-go/lang/python/pythonresource"
"github.com/kiteco/kiteco/kite-go/lang/python/pythonresource/keytypes"
"github.com/kiteco/kiteco/kite-golib/kitectx"
"github.com/pkg/errors"
)
// GlobalVa... |
// SPDX-FileCopyrightText: 2021 The Go-SSB Authors
//
// SPDX-License-Identifier: MIT
// +build integration
package network
import (
"bytes"
"encoding/json"
"fmt"
"net"
"os"
"os/exec"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.cryptoscope.co/netwrap"
... |
package helper
import (
"bufio"
"bytes"
"context"
"crypto/tls"
"encoding/json"
"errors"
"fmt"
"net"
"net/http"
"os"
"os/exec"
"regexp"
"strconv"
"strings"
"sync"
"time"
"github.com/alibaba/git-repo-go/config"
"github.com/alibaba/git-repo-go/path"
"github.com/jiangxin/goconfig"
log "github.com/jian... |
package main
import (
"bytes"
"context"
"errors"
"fmt"
"go/ast"
"go/build"
"go/types"
"io"
"log"
"os"
"path/filepath"
"regexp"
"sort"
"strings"
"golang.org/x/tools/imports"
)
// ATTENTION: The code in this file is mostly copied from https://github.com/vektra/mockery/blob/e725139b5f9a25fcbb2c40a43b7d16... |
// 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... |
// Code generated by protoc-gen-go.
// source: automation.proto
// DO NOT EDIT!
/*
Package automation is a generated protocol buffer package.
It is generated from these files:
automation.proto
It has these top-level messages:
ClusterOperation
TaskContainer
Task
EnqueueClusterOperationRequest
EnqueueClusterOper... |
// 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... |
package main
import (
"fmt"
"os"
"strconv"
"strings"
"time"
)
type Board [5][5]int
const WIN = 10000
const LOSS = -10000
const MAXIMIZER = 1
const MINIMIZER = -1
const UNSET = 0
// Arrays of losing triplets and winning quads, indexed
// by <x,y> coords of all pairs composing each of the quads
// or triplets. M... |
// Copyright 2018 The go-hpb Authors
// Modified based on go-ethereum, which Copyright (C) 2014 The go-ethereum Authors.
//
// The go-hpb 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... |
// Copyright 2020 The ZKits Project 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 o... |
// Copyright 2020-2021 Grabtaxi Holdings PTE LTE (GRAB), All rights reserved.
//
// Use of this source code is governed by the Apache License 2.0 that can be
// found in the LICENSE file
package main
import "C"
import (
"container/heap"
"sync"
"sync/atomic"
)
// TL;DR: clutch is mostly an optimised, thread safe m... |
package core
import (
"context"
"fmt"
"io"
"io/ioutil"
"log"
"math"
"os"
"os/signal"
"path/filepath"
"sort"
"strings"
"sync"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/athena"
"github.com/aws/aws-sdk-go/service/athena/athenaiface"
homedir "github.com/mitchellh/go-homedi... |
package smokescreen
import (
"crypto/tls"
"errors"
"fmt"
"net"
"net/http"
"os"
"os/signal"
"strings"
"syscall"
"time"
"github.com/armon/go-proxyproto"
"github.com/elazarl/goproxy"
"github.com/sirupsen/logrus"
"github.com/stripe/go-einhorn/einhorn"
)
const (
ipAllowDefault ipType = iota
ipAllowUserCon... |
package main
import (
"container/list"
"context"
"crypto/tls"
"crypto/x509"
"fmt"
"net/http"
"os"
"os/signal"
"regexp"
"strconv"
"strings"
"syscall"
"time"
assetfs "github.com/elazarl/go-bindata-assetfs"
"github.com/gorilla/mux"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/pkg/errors"... |
//
// Copyright 2021 IBM 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 law or agreed to ... |
// 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... |
package main
import (
"bufio"
"encoding/json"
"fmt"
"io/ioutil"
"net"
"os"
"path/filepath"
clkeys "github.com/cosmos/cosmos-sdk/client/keys"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/server"
sdk "github.com/cosmos/cosmos-sdk/types"
"gi... |
package srtp
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVers... |
// DO NOT EDIT THIS FILE. GENERATED BY svdxgen.
// +build stm32h7x3
// Package flash provides access to the registers of the Flash peripheral.
//
// Instances:
// FLASH1 Flash_BASE - FLASH Flash
// FLASH2 Flash_BASE+0x100 - FLASH Flash
// Registers:
// 0x000 32 ACR Access control regis... |
package reddit
import (
"context"
"net/http"
"net/url"
)
// AccountService handles communication with the account
// related methods of the Reddit API.
//
// Reddit API docs: https://www.reddit.com/dev/api/#section_account
type AccountService struct {
client *Client
}
// SubredditKarma holds user karma data for ... |
/*
Copyright 2022.
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
distributed un... |
package core
import (
"path"
"strings"
"time"
"git.fd.io/govpp.git/adapter"
"git.fd.io/govpp.git/api"
)
var (
RetryUpdateCount = 10
RetryUpdateDelay = time.Millisecond * 10
HealthCheckInterval = time.Second // default health check probe interval
)
const (
SystemStatsPrefix = "/sys/"
Sy... |
package lexer
import (
"bufio"
"fmt"
"io"
"strconv"
"strings"
"unicode"
"github.com/stackoverflow/novah-go/data"
)
type TokenType int
const (
LPAREN TokenType = iota
RPAREN
LSBRACKET
RSBRACKET
LBRACKET
RBRACKET
SETBRACKET
METABRACKET
HASH
HASHDASH
DOT
DOTBRACKET
COMMA
COLON
SEMICOLON
EQUALS
... |
// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use ... |
package genrpc
import (
"bytes"
"fmt"
"io/ioutil"
"regexp"
"go/ast"
"log"
"os"
"strings"
"github.com/lawrsp/pigo/pkg/builder"
"github.com/lawrsp/pigo/pkg/nameutil"
"github.com/lawrsp/pigo/pkg/parser"
"golang.org/x/tools/imports"
)
type ImportLine struct {
Name string
Path string
}
func (l ImportLine)... |
/*
Copyright © 2020 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writi... |
package handlers
import (
"fmt"
"html"
"log"
"net/http"
"path"
"strings"
"time"
"github.com/zew/go-questionnaire/pkg/cfg"
"github.com/zew/go-questionnaire/pkg/cloudio"
"github.com/zew/go-questionnaire/pkg/detect"
"github.com/zew/go-questionnaire/pkg/lgn"
"github.com/zew/go-questionnaire/pkg/qst"
"github.... |
package main
import (
"context"
"fmt"
vnc "github.com/amitbet/vnc2video"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
"net"
"os"
"os/exec"
"os/signal"
"path"
"syscall"
"time"
"strconv"
"strings"
"errors"
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
)
func... |
/*
*
* k6 - a next-generation load testing tool
* Copyright (C) 2016 Load Impact
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your o... |
// Copyright 2020 The Chromium OS 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 ui
import (
"context"
"fmt"
"time"
"chromiumos/tast/common/perf"
"chromiumos/tast/ctxutil"
"chromiumos/tast/errors"
"chromiumos/tast/l... |
package main
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/http/httputil"
"os"
"time"
"crypto/x509"
"crypto/tls"
"golang.org/x/crypto/acme/autocert"
"github.com/evalphobia/logrus_sentry"
"github.com/getsentry/raven-go"
"github.com/rs/cors"
"github.com/sirupsen/logrus"
"g... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.19.1
// source: odpf/assets/facets/v1beta1/lineage.proto
package facetsv1beta1
import (
v1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1"
protoreflect "google.golang.org/protobuf/reflect/pro... |
package client
import (
"encoding/base64"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
"sync"
"sync/atomic"
"time"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"encoding/asn1"
"github.com/juju/errors"
log "github.com/sirupsen/logrus"
)
const tokenExpirationMargin = time.Minute
... |
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Compilebench benchmarks the speed of the Go compiler.
//
// Usage:
//
// compilebench [options]
//
// It times the compilation of various packages and print... |
/*
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 law or agreed to in ... |
package v1
import (
"encoding/json"
"fmt"
"strings"
"github.com/mongodb/mongodb-kubernetes-operator/pkg/authentication/scram"
"github.com/mongodb/mongodb-kubernetes-operator/pkg/kube/annotations"
appsv1 "k8s.io/api/apps/v1"
"github.com/mongodb/mongodb-kubernetes-operator/pkg/automationconfig"
"github.com/mo... |
package main
import (
"bytes"
"context"
"encoding/json"
"fmt"
"net/http"
"os"
"path/filepath"
"strings"
"time"
"github.com/sensu-community/sensu-plugin-sdk/sensu"
corev2 "github.com/sensu/sensu-go/api/core/v2"
k8scorev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go... |
// Do not edit. Bootstrap copy of /home/eyberg/go/src/github.com/deferpanic/gorump/go/src/cmd/compile/internal/gc/racewalk.go
//line /home/eyberg/go/src/github.com/deferpanic/gorump/go/src/cmd/compile/internal/gc/racewalk.go:1
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governe... |
package neuralNetwork
import (
"fmt"
"math"
"math/rand"
"testing"
"time"
"github.com/gcla/sklearn/datasets"
"github.com/gcla/sklearn/metrics"
"gonum.org/v1/gonum/floats"
"github.com/gcla/sklearn/base"
"github.com/gcla/sklearn/preprocessing"
"gonum.org/v1/gonum/mat"
)
type Problem struct {
X, Y ... |
package xwindow
import (
"fmt"
"github.com/jezek/xgb/xproto"
"github.com/alex11br/xgbutil"
"github.com/alex11br/xgbutil/keybind"
"github.com/alex11br/xgbutil/mousebind"
"github.com/alex11br/xgbutil/xevent"
"github.com/alex11br/xgbutil/xrect"
)
// Window represents an X window. It contains an XUtilValue to si... |
// Copyright 2019, OpenTelemetry 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: exec/exec.proto
package admin
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
common "github.com/microsoft/moc/rpc/common"
grpc "google.golang.org/grpc"
codes "google.... |
package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
"os/signal"
"reflect"
"runtime"
"strconv"
"strings"
"sync"
"syscall"
"time"
"github.com/gorilla/mux"
"github.com/gorilla/websocket"
"github.com/rs/cors"
"github.com/zairza-cetb/bench-routes/src/collector/process"
"github.com/zairza-cetb/benc... |
// Copyright 2019 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, ... |
//go:build go1.16
// +build go1.16
// 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 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 in wri... |
package xlsx
import (
"bytes"
"encoding/base64"
"fmt"
"math"
"strconv"
"strings"
"time"
)
const (
maxNonScientificNumber = 1e11
minNonScientificNumber = 1e-9
)
// CellType is an int type for storing metadata about the data type in the cell.
type CellType int
// These are the cell types from the ST_CellType... |
package sentry
import (
"context"
"crypto/x509"
"fmt"
"io"
"io/ioutil"
"log"
"math/rand"
"net/http"
"os"
"reflect"
"sort"
"sync"
"time"
)
// maxErrorDepth is the maximum number of errors reported in a chain of errors.
// This protects the SDK from an arbitrarily long chain of wrapped errors.
//
// An add... |
/*
Copyright 2018 MBT 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, software
distr... |
package jenkins
import (
"context"
"fmt"
"net/http"
"net/url"
"strconv"
"strings"
"sync"
"time"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/filter"
"github.com/influxdata/telegraf/internal"
"github.com/influxdata/telegraf/internal/tls"
"github.com/influxdata/telegraf/plugins/inputs"
... |
// Copyright The OpenTelemetry 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 main
import (
"crypto/tls"
"encoding/json"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"os"
"time"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/prometheus/common/version"
)
type NginxVts struct {
HostName string `j... |
package server
import (
"encoding/binary"
"fmt"
"io"
"io/ioutil"
"github.com/dustin/go-humanize/english"
"github.com/hashicorp/raft"
"github.com/pkg/errors"
proto "github.com/liftbridge-io/liftbridge/server/protocol"
)
// recoverLatestCommittedFSMLog returns the last committed Raft FSM log entry.
// It retu... |
package radio
import (
"bits"
"mmio"
"unsafe"
"nrf5/hal/internal/mmap"
"nrf5/hal/te"
)
type Periph struct {
te.Regs
crcstatus mmio.U32
_ mmio.U32
rxmatch mmio.U32
rxcrc mmio.U32
dai mmio.U32
_ [60]mmio.U32
packetptr mmio.U32
frequency mmio.U32
txpower m... |
/*
Copyright 2020 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 by applicable law or ag... |
// Copyright 2016 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 2016 The Periph 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 ssd1306
// Some have SPI enabled;
// https://hallard.me/adafruit-oled-display-driver-for-pi/
// https://learn.adafruit.com/ssd1306-o... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: workload.proto
package workload
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherw... |
/*
Copyright 2015 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
package graphql
import (
"context"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"strconv"
"strings"
"unicode"
"github.com/dennwc/graphql/language/ast"
"github.com/dennwc/graphql/language/lexer"
"github.com/dennwc/graphql/language/parser"
"github.com/cayleygraph/cayley/graph"
"github.com/cayleygraph/cayley/gra... |
// Copyright 2021 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 ledgerbackend
import (
"bytes"
"fmt"
"io/ioutil"
"regexp"
"strings"
"github.com/diamnet/go/support/errors"
"github.com/diamnet/go/support/log"
"github.com/diamnet/go/xdr"
"github.com/pelletier/go-toml"
)
const (
defaultHTTPPort = 11626
defaultFailureSafety = -1
// if LOG_FILE_PATH is omitt... |
// 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 writ... |
package main
import (
"encoding/json"
"errors"
"fmt"
"io"
"log"
"net/url"
"os"
"os/exec"
"strings"
"time"
"github.com/cheggaaa/pb"
"github.com/docker/docker/pkg/term"
cfg "github.com/flynn/flynn/cli/config"
"github.com/flynn/flynn/controller/client"
ct "github.com/flynn/flynn/controller/types"
"github... |
// SPDX-FileCopyrightText: 2020-present Open Networking Foundation <<EMAIL>>
//
// SPDX-License-Identifier: Apache-2.0
package mobility
import (
"context"
"fmt"
"math"
"math/rand"
"sync"
"time"
e2sm_mho "github.com/onosproject/onos-e2-sm/servicemodels/e2sm_mho_go/v2/e2sm-mho-go"
"github.com/onosproject/onos... |
/*
Copyright 2021 Terway 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, software... |
package hrp
import (
"bytes"
"crypto/tls"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/http/httputil"
"net/url"
"strconv"
"strings"
"testing"
"time"
"github.com/jinzhu/copier"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
"github.com/httprunner/hrp/internal/ga"
)
// Run starts to run API ... |
package cache
import (
"bytes"
"context"
"crypto/aes"
"crypto/cipher"
"database/sql"
"fmt"
"io/ioutil"
"net"
"net/http"
"strconv"
"strings"
"time"
"github.com/cachecashproject/go-cachecash/batchsignature"
"github.com/cachecashproject/go-cachecash/cache/models"
"github.com/cachecashproject/go-cachecash/... |
package azblob
import (
"context"
"encoding/base64"
"io"
"net/http"
"bytes"
"os"
"sync"
"time"
"errors"
"github.com/Azure/azure-pipeline-go/pipeline"
)
// CommonResponse returns the headers common to all blob REST API responses.
type CommonResponse interface {
// ETag returns the value for header ETag.
... |
package controller
import (
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"os"
"path/filepath"
"reflect"
"stncCms/app/domain/entity"
stnccollection "stncCms/app/domain/helpers/stnccollection"
"stncCms/app/domain/helpers/stncupload"
"stncCms/app/domain/helpers/stnchelper"
"stncCms/app/domain/helpers/stncsession... |
package pgx
import (
"errors"
"fmt"
"net"
"time"
)
const (
copyBothResponse = 'W'
walData = 'w'
senderKeepalive = 'k'
standbyStatusUpdate = 'r'
initialReplicationResponseTimeout = 5 * time.Second
)
var epochNano int64
func init() {
... |
// Copyright 2014 Unknwon
//
// 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 writ... |
package docker
import (
"context"
"fmt"
"io"
"os"
"path"
"sort"
dockerTypes "github.com/docker/docker/api/types"
dockerContainer "github.com/docker/docker/api/types/container"
"github.com/docker/docker/pkg/stdcopy"
"github.com/docker/docker/pkg/sysinfo"
"github.com/lovethedrake/go-drake/config"
"github.co... |
// Copyright 2016 The Periph 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 chip
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"strings"
"periph.io/x/conn/v3/driver/driverreg"
"... |
// Discordgo - Discord bindings for Go
// Available at https://github.com/bwmarrin/discordgo
// Copyright 2015-2016 <NAME> <<EMAIL>>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This file contains all structures for the discordgo pac... |
/*
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... |
/*
* @file
* @copyright defined in aergo/LICENSE.txt
*/
package p2p
import (
"fmt"
"github.com/pkg/errors"
"runtime/debug"
"sync"
"time"
"github.com/aergoio/aergo/p2p/metric"
"github.com/aergoio/aergo/p2p/p2pcommon"
lru "github.com/hashicorp/golang-lru"
"github.com/aergoio/aergo-lib/log"
"github.com/a... |
// Code generated by protoc-gen-go.
// source: persistent.proto
// DO NOT EDIT!
/*
Package protos is a generated protocol buffer package.
It is generated from these files:
persistent.proto
transaction.proto
It has these top-level messages:
FuncRecord
UserData
PublicKey
ECPoint
DeploySetting
NounceData
RegCh... |
/*******************************************************************************
* Copyright (c) 2021 Genome Research Ltd.
*
* Author: <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to dea... |
// Copyright 2017 The LUCI Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... |
package command
import (
"fmt"
"sort"
"strings"
"time"
"github.com/hashicorp/nomad/api"
"github.com/hashicorp/nomad/scheduler"
"github.com/posener/complete"
)
const (
jobModifyIndexHelp = `To submit the job with version verification run:
nomad job run -check-index %d %s
When running the job with the check-... |
package acceptance
import (
"fmt"
"io/ioutil"
"math/rand"
"net"
"os"
"path/filepath"
"sync"
"testing"
"time"
"path"
lauthor "github.com/drausin/libri/libri/author"
"github.com/drausin/libri/libri/author/io/publish"
"github.com/drausin/libri/libri/author/keychain"
"github.com/drausin/libri/libri/common/... |
package dialects
import "strings"
/*
PostgreSQL keywords
https://www.postgresql.org/docs/current/sql-keywords-appendix.html
*/
// map[keyword]isReserved
var pgKeywords = map[string]bool{
"ABORT": false,
"ABSOLUTE": false,
"ACCESS": false,
"ACTION": false,
"ADD": ... |
package lexic
import (
"encoding/json"
"fmt"
"os"
"strings"
"unicode/utf8"
)
type stateFn func(*Lexer) stateFn
// EOF represents a End Of File
const EOF = -1
// Lexer holds the state of the scanner.
type Lexer struct {
Name string // the name of the input; used only for error reports
Input string ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.