text stringlengths 5.51k 28.1k |
|---|
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.6.1
// source: github.com/solo-io/gloo/projects/ingress/api/v1/service.proto
package v1
import (
reflect "reflect"
sync "sync"
any "github.com/golang/protobuf/ptypes/any"
_ "github.com/solo-io/protoc-gen-... |
// Contains an implementation of OCPP message dispatcher via JSON over WebSocket.
package ocppj
import (
"encoding/json"
"fmt"
"math/rand"
"reflect"
"gopkg.in/go-playground/validator.v9"
"github.com/lorenzodonini/ocpp-go/ocpp"
)
// The validator, used for validating incoming/outgoing OCPP messages.
var Valida... |
/*
* Copyright (c) 2015- terrak <<EMAIL>>
*
* This file originated from: http://www.terrak.net/
*
* Permission to use, copy, modify, and 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.
*... |
package gateway
import (
"crypto/tls"
"crypto/x509"
"fmt"
"net"
"net/http"
"net/url"
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
grpc_logrus "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus"
grpc_ctxtags "github.com/grpc-ecosystem/go-grpc-middleware/tags"
grpc_prometheus "gith... |
package scipipe
import (
"crypto/sha1"
"encoding/hex"
"fmt"
"os"
"os/exec"
"path/filepath"
"strings"
"time"
)
// Task represents a single static shell command, or go function, to be
// executed, and are scheduled and managed by a corresponding Process
type Task struct {
Name string
Command st... |
package lib
type ApiResponse struct {
Bots []Bot `json:"bots,omitempty"`
CacheVersion string `json:"cache_version,omitempty"`
Channels []Channel `json:"channels,omitempty"`
Channel Channel `json:"channel,omitempty"`
Groups []Group `json:"groups,omitempty"`
Group Gro... |
/*
Package popbuilder is the server component of the popbuilder application,
a web-app that allows the user to build a population estimate for an
arbitrary set of small areas in Great Britain.
*/
package main
import (
"bytes"
"database/sql"
"fmt"
_ "github.com/mattn/go-sqlite3"
"github.com/olihawkins/decimals"
"... |
package stats
import (
"sync"
"time"
"github.com/toni-moreno/snmpcollector/pkg/agent/selfmon"
"github.com/toni-moreno/snmpcollector/pkg/data/snmp"
"github.com/toni-moreno/snmpcollector/pkg/data/utils"
)
// GatherStatType a device stat type
type GatherStatType uint
const (
// SnmpGetQueries num Get Queries on ... |
package operations
import (
"fmt"
"strings"
"sync"
"time"
"github.com/kr/pretty"
"github.com/virtual-kubelet/virtual-kubelet/providers/vic/cache"
vicpod "github.com/virtual-kubelet/virtual-kubelet/providers/vic/pod"
"github.com/virtual-kubelet/virtual-kubelet/providers/vic/proxy"
vicerrors "github.com/vmwa... |
// Copyright (c) 2021, 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 main
import (
"context"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"time"
githubql "github.com/shurcooL/githubv4"
"github.com/sirupsen/logrus"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.i... |
/*
Copyright © 2021 blacktop
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicen... |
package syscall
// TODO(brainman): autogenerate types in ztypes_windows_386.go
//import "unsafe"
// Constants
const (
sizeofPtr = 0x4
sizeofShort = 0x2
sizeofInt = 0x4
sizeofLong = 0x4
sizeofLongLong = 0x8
PathMax = 0x1000
SizeofLinger = 0x8
SizeofMsghdr = 0x1c
SizeofCmsghdr = 0... |
package f5
// f5Result represents an F5 BIG-IP LTM request response. f5Result is used to
// unmarshal the JSON response when receiving responses from the F5 iControl
// REST API. These responses generally are JSON blobs containing at least the
// fields described in this structure.
//
// f5Result may be embedded int... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v2/services/hotel_group_view_service.proto
package services
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
resources "google.golang.org/genproto/googleapis/ads/googleads/v2/resources"
_ "... |
// Copyright 2019 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
// Package datatablessrv handles the server side processing of an AJAX request for DataTables
// For details on the parameters and the results, read the datatables documentation at
// https://datatables.net/manual/server-side
package datatablessrv
import (
"errors"
"fmt"
"net/http"
"regexp"
"strconv"
"strings"
)... |
// Copyright (c) 2017-2020 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package main
import (
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"net/http"
"net/http/httputil"
"sync"
"time"
"github.com/davecgh/go-spew/spew"
"github.com/... |
package jsondiff
import (
"bytes"
"encoding/json"
"reflect"
"sort"
"strconv"
)
type Difference int
const (
FullMatch Difference = iota
SupersetMatch
NoMatch
FirstArgIsInvalidJson
SecondArgIsInvalidJson
BothArgsAreInvalidJson
)
func (d Difference) String() string {
switch d {
case FullMatch:
return "F... |
/*
* Copyright (c) 2021 THL A29 Limited, a Tencent company.
*
* 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... |
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"strconv"
"strings"
"time"
"github.com/andrewarrow/wolfservers/digitalocean"
"github.com/andrewarrow/wolfservers/display"
"github.com/andrewarrow/wolfservers/files"
"github.com/andrewarrow/wolfservers/keys"
"github.com/andrewarrow/wolfservers/li... |
package langserver
import (
"context"
"fmt"
"io"
"io/ioutil"
"log"
"path/filepath"
"sort"
"strings"
"sync"
"time"
"github.com/creachadair/jrpc2"
"github.com/creachadair/jrpc2/channel"
"github.com/creachadair/jrpc2/handler"
"github.com/moby/buildkit/client/llb"
digest "github.com/opencontainers/go-diges... |
package main
import (
"crypto/sha1"
"encoding/csv"
"fmt"
"io"
"log"
"math/rand"
"net"
"os"
"time"
"golang.org/x/crypto/pbkdf2"
"github.com/golang/snappy"
"github.com/pkg/errors"
"github.com/urfave/cli"
kcp "github.com/xtaci/kcp-go"
"github.com/biotooff/rawcon"
"path/filepath"
)
var (
// VERSION is ... |
package cpu
import (
"fmt"
)
type StatusRegister struct {
N, V, R, B, D, I, Z, C bool
}
type Registers struct {
A, X, Y uint8
P *StatusRegister
SP uint16
PC uint16
}
type CPU struct {
registers *Registers
bus *CPUBus
}
func nthBit(v uint8, n uint8) uint8 {
return uint8((v >> n) & 1)
... |
/*
* Copyright © 2018-2021 Software AG, Darmstadt, Germany and/or its licensors
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://... |
package bsonkit
import (
"testing"
"github.com/stretchr/testify/assert"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
)
func newSchema(m bson.M) *Schema {
return NewSchema(MustConvertValue(m).(bson.D))
}
func validateSchema(t *testing.T, schema bson.M, value interface{}, msg s... |
// Copyright 2012 <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 t... |
package main
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"log"
"math/rand"
"os"
"os/signal"
"strconv"
"strings"
"time"
"github.com/bwmarrin/discordgo"
"github.com/jonas747/dca"
cmap "github.com/orcaman/concurrent-map"
"github.com/sardap/discgov"
"github.com/sardap/vi... |
//
// Copyright Coinbase, Inc. All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//
// Package sign implements the 2-2 threshold signature protocol of [DKLs18](https://eprint.iacr.org/2018/499.pdf).
// The signing protocol is defined in "Protocol 4" page 9, of the paper. The Zero Knowledge Proof ideal fun... |
package cfg
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/url"
"os"
"strings"
"syscall"
"time"
"github.com/Sirupsen/logrus"
"github.com/andygrunwald/go-jira"
"github.com/dghubble/oauth1"
"github.com/fsnotify/fsnotify"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"golang.org/x/crypto/ss... |
/*
Copyright 2021 The terraform-docs Authors.
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 License at the LICENSE file in
the root directory of this source tree.
*/
package terraform
import (
"encoding/json"
"errors"
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.22.0
// protoc v3.11.4
// source: eth/v1alpha1/pandora_shard.proto
package eth
import (
reflect "reflect"
sync "sync"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/golang/protobuf/proto"
protoreflect "google.go... |
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
package ld
import (
"cmd/link/internal/objfile"
"cmd/link/internal/sym"
"encoding/json"
lb "gosb/commons"
"log"
"sort"
"strings"
)
var (
nonbloat *lb.Package
// stmps *lb.Package
Bloats map[string]*lb.Package
toSym map[*lb.Section][]*sym.Symbol
lookup map[int]string
domains []*lb.SandboxD... |
//微信公众号接入口:响应公众号的校验等
package main
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"encoding/base64"
"encoding/xml"
"fmt"
"github.com/aosfather/bingo/mvc"
"github.com/aosfather/bingo/utils"
"github.com/aosfather/bingo/wx"
"github.com/aosfather/bingo/wx/wxcorp"
"strings"
"time"
)
//事件类型
const (
EVENT_SUB ... |
/*
* Copyright (c) 2014 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, dis... |
// Copyright 2019 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
package tester
import (
"context"
"fmt"
"reflect"
"sort"
"sync/atomic"
"testing"
"time"
"github.com/benbjohnson/clock"
"github.com/cschleiden/go-workflows/internal/activity"
margs "github.com/cschleiden/go-workflows/internal/args"
"github.com/cschleiden/go-workflows/internal/converter"
"github.com/cschlei... |
package main
import (
"bytes"
"context"
"crypto/sha256"
"crypto/subtle"
"encoding/base64"
"encoding/json"
"errors"
"flag"
"fmt"
"hash"
"io"
"io/ioutil"
"log"
"mime"
"net"
"net/http"
"os"
"os/signal"
"path"
"path/filepath"
"strings"
"sync"
"syscall"
"time"
bolt "go.etcd.io/bbolt"
)
// extOver... |
package kv
import (
"bytes"
"context"
"encoding/gob"
"github.com/Bonsiour/rache/raft"
"github.com/gogo/protobuf/proto"
"sync"
"time"
)
const (
// 操作返回的错误类型
OK = "OK"
ErrNoKey = "ErrNoKey"
ErrWrongGroup = "ErrWrongGroup"
ErrNotReady = "ErrNotReady"
// server执行的操作类型
RECONFIGURE = "Reconf... |
package plugins_test
var jiraIssueResponse = `
{
"expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations",
"id": "10092",
"self": "http://jira.teamsinspace.com:8080/rest/api/2/issue/10092",
"key": "TIS-41",
"fields": {
"issuetype": {
"self":... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: npu_utilization.proto
/*
Package npu_utilization is a generated protocol buffer package.
It is generated from these files:
npu_utilization.proto
It has these top-level messages:
NetworkProcessorUtilization
Utilization
MemoryLoad
PacketLoad
*/
package n... |
package main
import (
"time"
"github.com/bcmk/siren/lib"
"github.com/bcmk/siren/payments"
"github.com/google/uuid"
)
func (w *worker) newNotifications() []notification {
var nots []notification
var iter notification
w.mustQuery(
`select id, endpoint, chat_id, model_id, status, time_diff, image_url, social, ... |
package github
import (
"context"
"errors"
"fmt"
"net/http"
"os"
"strconv"
"strings"
"sync"
"time"
"golang.org/x/oauth2"
githubO2 "golang.org/x/oauth2/github"
"github.com/google/go-github/github"
"github.com/watchly/ngbuild/core"
)
var oauth2State = fmt.Sprintf("%d%d%d", os.Getuid(), os.Getpid(), time.... |
// Copyright 2017 <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package tdbank provides methods for online banking with TD Bank.
// It uses agouti's Chrome web driver to access the bank's web site.
// For now it only supports scr... |
package rpcclient
import (
"context"
"errors"
"fmt"
"time"
abci "github.com/lazyledger/lazyledger-core/abci/types"
"github.com/lazyledger/lazyledger-core/config"
tmbytes "github.com/lazyledger/lazyledger-core/libs/bytes"
tmpubsub "github.com/lazyledger/lazyledger-core/libs/pubsub"
tmquery "github.com/lazyled... |
package pmdmanager
import (
"errors"
"fmt"
"strconv"
"strings"
"sync"
api "github.com/intel/pmem-csi/pkg/apis/pmemcsi/v1alpha1"
pmemexec "github.com/intel/pmem-csi/pkg/exec"
"github.com/intel/pmem-csi/pkg/ndctl"
pmemcommon "github.com/intel/pmem-csi/pkg/pmem-common"
"k8s.io/klog/v2"
)
const (
// 4 MB alig... |
package persist
import (
"context"
"database/sql/driver"
"encoding/json"
"fmt"
"math/big"
"net/http"
"net/url"
"strings"
"github.com/ethereum/go-ethereum/common"
"github.com/mikeydub/go-gallery/util"
)
const (
// TokenTypeERC721 is the type of an ERC721 token
TokenTypeERC721 TokenType = "ERC-721"
// Tok... |
// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.12.1
// source: infra/rts/cmd/rts-chromium/rt... |
// Copyright (c) 2017-2018 Uber Technologies, 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 applicabl... |
package inbound
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"
protocol "v2ray.com/core/common/protocol"
)
const (
// Verify that this generated code is suffi... |
package main
import (
"fmt"
"io"
"log"
"net"
"os"
"os/signal"
"strconv"
"strings"
"time"
"github.com/fsnotify/fsnotify"
"github.com/godbus/dbus/v5"
mpris2 "github.com/hrfee/mpris2client"
flag "github.com/spf13/pflag"
)
// Various paths and values to use elsewhere.
const (
SOCK = "/tmp/waybar-mpris.... |
/*
Package jsonmsg parses API specs.
The resulting spec can be used to generate server/client source code in any supported language.
The jsonmsg implementation is based on https://github.com/jsonmsg/spec with the meta-schema https://github.com/jsonmsg/spec/blob/master/meta.json
Generators
go: https://godoc.org/githu... |
package echo
import (
"fmt"
"io"
"net/http"
"net/url"
"strings"
"sync"
"github.com/admpub/log"
"github.com/webx-top/echo/engine"
"github.com/webx-top/echo/logger"
)
type (
Echo struct {
engine engine.Engine
middleware []interface{}
head Handler
maxParam *int
... |
/*
Copyright © 2021 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writi... |
// Copyright 2019 Northern.tech AS
//
// 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 ipv6util
import (
"bufio"
"bytes"
"fmt"
"net"
"regexp"
"strings"
"github.com/asaskevich/govalidator"
)
const (
// PxctlStatus defines the pxctl status command
PxctlStatus = "status"
// PxctlClusterList defines the pxctl cluster list command
PxctlClusterList = "cluster list"
// PxctlClusterInspect... |
//Copyright (c) 2013 <NAME>. All rights reserved.
//
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and ... |
// Copyright 2019-2020 Cisco Systems 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 a... |
package text
import (
"fmt"
"strings"
"github.com/benoitkugler/textlayout/language"
"github.com/benoitkugler/textprocessing/pango"
pr "github.com/benoitkugler/webrender/css/properties"
"github.com/benoitkugler/webrender/text/hyphen"
)
// Language system tags
// From https://docs.microsoft.com/typography/openty... |
// +build linux
package linux
import (
"fmt"
"os"
"strings"
"syscall"
"unsafe"
"github.com/djthorpe/gopi/v3"
)
////////////////////////////////////////////////////////////////////////////////
// CONSTANTS
const (
I2C_DEV = "/dev/i2c"
I2C_SMBUS_BLOCK_MAX = 32 /* As specified in SMBus standard */... |
/*
* 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 ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: infra/unifiedfleet/api/v1/proto/state.proto
package ufspb
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
math "math"
)
// Reference imports to suppress errors if they are not otherwise... |
package db
import (
"database/sql"
"fmt"
"strings"
"time"
"github.com/jmoiron/sqlx"
_ "github.com/lib/pq"
)
const (
host = "postgres"
port = 5432
user = "postgres"
password = "<PASSWORD>"
dbname = "postgres"
)
var db *sqlx.DB
func init() {
psqlInfo := fmt.Sprintf("host=%s port=%d user=%s ... |
package system_metrics_reader
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
"time"
"github.com/syunkitada/goapp/pkg/lib/logger"
"github.com/syunkitada/goapp/pkg/lib/str_utils"
"github.com/syunkitada/goapp/pkg/resource/config"
"github.com/syunkitada/goapp/pkg/resource/consts"
"github.com/syunkitada/goapp/... |
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
// Code generated by protoc-gen-go.
// source: google.golang.org/genproto/googleapis/cloud/dataproc/v1/operations.proto
// DO NOT EDIT!
package google_cloud_dataproc_v1 // import "google.golang.org/genproto/googleapis/cloud/dataproc/v1"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "mat... |
package effe
import (
"fmt"
"io"
"log"
"runtime/debug"
"unicode"
)
type node struct {
kind nodeKind
rawValue string
literalValue Value
children []*node
operatorValue operator
}
type nodeKind int
const (
NodeKindFunction nodeKind = iota
NodeKindLiteral
NodeKindOperator
NodeKindHole
... |
/*
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 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
/*
This package reads and writes pickled data. The format is the same
as the Python "pickle" module.
Protocols 0,1,2 are implemented. These are the versions written by the Python
2.x series. Python 3 defines newer protocol versions, but can write the older
protocol versions so they are readable by this package.
To re... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
package common
// the orchestrators supported
const (
// Mesos is the string constant for MESOS orchestrator type
Mesos string = "Mesos"
// DCOS is the string constant for DCOS orchestrator type and defaults to DCOS188
... |
// Copyright (c) 2017 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.
// Package field implements fast arithmetic modulo 2^255-19.
package field
import (
"crypto/subtle"
"encoding/binary"
"math/bits"
)
// Element represen... |
/*
Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.
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 ... |
package mock
import (
"fmt"
"reflect"
"runtime"
"strings"
"sync"
"time"
"github.com/stretchr/objx"
"github.com/stretchr/testify/assert"
)
// TestingT is an interface wrapper around *testing.T
type TestingT interface {
Logf(format string, args ...interface{})
Errorf(format string, args ...interface{})
}
/*... |
// Copyright (c) 2018 Couchbase, 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... |
// Copyright 2016 The Upspin 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 path
import (
"testing"
"upspin.io/upspin"
)
type parseTest struct {
path upspin.PathName
cleanPath upspin.PathName
isRoot bool
}
v... |
// Copyright (c) 2004-present Facebook All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated by entc, DO NOT EDIT.
package ent
import (
"fmt"
"strings"
"time"
"github.com/facebook/ent/dialect/sql"
"github.com/facebookincub... |
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2019 Intel Corporation
package eaa_test
import (
"bytes"
"context"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"encoding/json"
"encoding/pem"
"errors"
"flag"
"io"
"io/ioutil"
"math/big"
mrand "math... |
/*
Copyright 2017 the Velero 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 by applicable law or agreed to in writing,... |
package generator
import (
"fmt"
"io/ioutil"
"log"
"math"
"os"
"path/filepath"
"regexp"
"strings"
"sync"
"github.com/but80/talklistener/internal/julius"
"github.com/but80/talklistener/internal/vsqx"
"github.com/mkb218/gosndfile/sndfile"
"golang.org/x/xerrors"
)
const (
f0FramePeriod = .005
resample... |
/*
*
* Copyright 2021 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 applicable law or agree... |
package git
import (
"context"
"sort"
"testing"
"time"
"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/require"
"github.com/sourcegraph/sourcegraph/internal/api"
"github.com/sourcegraph/sourcegraph/internal/database"
"github.com/sourcegraph/sourcegraph/internal/gitserver/gitdomain"
)
func TestH... |
package eventdriven
import (
"bytes"
"context"
"encoding/hex"
"encoding/json"
"errors"
"github.com/golang/protobuf/proto"
"github.com/niclabs/tcrsa"
"github.com/sirupsen/logrus"
"github.com/syndtr/goleveldb/leveldb"
go_hotstuff "github.com/wjbbig/go-hotstuff"
"github.com/wjbbig/go-hotstuff/config"
"github.... |
package web
import (
"fmt"
"github.com/adyen/adyen-go-api-library/v5/src/checkout"
"github.com/adyen/adyen-go-api-library/v5/src/common"
//commonPb "github.com/ennismore/em-domain/v2/common"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"log"
"net/http"
"net/url"
)
var (
lastShopperReference ... |
/*
* gomacro - A Go interpreter with Lisp-like macros
*
* Copyright (C) 2018-2019 <NAME>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* ge... |
/*
MIT License
Copyright (c) 2018,2020 ifritJP
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, d... |
// Package ggl defines essential abstraction over opengl types, you should use this and dodge gl calls to
// make you code cleaner. If struct has methdod Drop it has to be called in order to prevent memory leak.
// All main datatypes that has Drop method contain pointer to underlining gl object so droping one struct
//... |
// DO NOT EDIT THIS FILE. GENERATED BY xgen.
// +build k210
package gpiohs
import (
"embedded/mmio"
"unsafe"
"github.com/embeddedgo/kendryte/p/mmap"
)
type Periph struct {
INPUT_VAL RINPUT_VAL
INPUT_EN RINPUT_EN
OUTPUT_EN ROUTPUT_EN
OUTPUT_VAL ROUTPUT_VAL
PULLUP_EN RPULLUP_EN
DRIVE RDRIVE
RISE_... |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package compute
import (
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// > This content is derived from https://github.com... |
// +build linux
/*
Copyright 2021 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 agree... |
// Copyright 2017 The Gitea Authors. All rights reserved.
// Copyright 2014 The Gogs 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 repo
import (
"bytes"
"encoding/base64"
"fmt"
gotemplate "html/template"
"io/ioutil"
... |
// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the Lice... |
// Package monitor provides a service and associated functionality
// for InfluxDB to self-monitor internal statistics and diagnostics.
package monitor // import "github.com/influxdata/influxdb/monitor"
import (
"errors"
"expvar"
"fmt"
"os"
"runtime"
"sort"
"strconv"
"sync"
"time"
"github.com/influxdata/inf... |
package main
import (
"context"
"flag"
"fmt"
"net/url"
"os"
"os/exec"
"regexp"
"strings"
"time"
"github.com/buildkite/go-buildkite/v3/buildkite"
"github.com/cockroachdb/errors"
"github.com/gen2brain/beeep"
"github.com/peterbourgon/ff/v3/ffcli"
"github.com/sourcegraph/sourcegraph/dev/sg/internal/bk"
"g... |
// Copyright 2015 The etcd 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 t... |
// Package histosketch introduces the histosketch implementation based on
// https://github.com/aaw/histosketch
// histogram_sketch is an implementation of the Histogram Sketch data structure
// described in Ben-Haim and Tom-Tov's "A Streaming Parallel Decision Tree
// Algorithm" in Journal of Machine Learning Research... |
package node
import (
"bytes"
"context"
"errors"
"net/http"
"net/url"
"strconv"
"strings"
"time"
"0chain.net/core/common"
"0chain.net/core/datastore"
"0chain.net/core/encryption"
"0chain.net/core/logging"
metrics "github.com/rcrowley/go-metrics"
"go.uber.org/zap"
)
var ErrSendingToSelf = common.NewErro... |
// Copyright 2018-2019 the u-root 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 main
import (
"bytes"
"crypto/rand"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"net"
"os"
"os/exec"
"path/filepath"
"strings"
"syscall"
... |
// Copyright 2014 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.