text stringlengths 5.51k 28.1k |
|---|
package raft
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"os"
"strconv"
"strings"
"sync"
"time"
"github.com/go-basic/uuid"
"golang.org/x/time/rate"
"github.com/eolinker/eosc/env"
"github.com/eolinker/eosc/log"
"go.etcd.io/etcd/client/pkg/v3/fileutil"
"go.etcd.... |
package astequal
import (
"bytes"
"go/ast"
"go/printer"
"go/token"
"reflect"
"testing"
"github.com/go-toolsmith/strparse" // Only for testing
)
type astEqualTest struct {
// x and y are expr/stmt/decl strings.
x string
y string
equal bool
}
func TestEqualExprNils(t *testing.T) {
t.SkipNow() // TODO
}
... |
// Package e2e launches an OSD cluster, performs tests on it, and destroys it.
package e2e
import (
"bytes"
"compress/gzip"
"encoding/json"
"encoding/xml"
"fmt"
"io/ioutil"
"log"
"math"
"os"
"path/filepath"
"strings"
"testing"
"github.com/onsi/ginkgo"
ginkgoConfig "github.com/onsi/ginkgo/config"
"githu... |
package element
type Element byte
const (
Invalid = Element(0)
Ac = Element(1)
Ag = Element(2)
Al = Element(3)
Am = Element(4)
Ar = Element(5)
As = Element(6)
At = Element(7)
Au = Element(8)
B = Element(9)
Ba = Element(10)
Be = Element(11)
Bh =... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.3
// source: xgo/tests/gojsonexternal/gojson_external.proto
package gojsonexternal
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/pro... |
package tview
import (
"github.com/gdamore/tcell"
)
// DefaultFormFieldWidth is the default field screen width of form elements
// whose field width is flexible (0). This is used in the Form class for
// horizontal layouts.
var DefaultFormFieldWidth = 10
// FormItem is the interface all form items must implement to... |
package api
import (
"encoding/json"
"fmt"
"os"
"path"
"github.com/grafana/grafana/pkg/services/alerting"
"github.com/grafana/grafana/pkg/services/dashboards"
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/components/dashdiffs"
"github.com/gra... |
// Package bsr is generated by gogll. Do not edit.
/*
Package bsr implements a Binary Subtree Representation set as defined in
Scott et al
Derivation representation using binary subtree sets,
Science of Computer Programming 175 (2019)
*/
package bsr
import (
"bytes"
"fmt"
"strings"
"unicode/utf8"
"nested/le... |
package query_test
import (
"math"
"testing"
"github.com/EnnioRC/influxdb/query"
"github.com/EnnioRC/influxql"
)
func TestMath_TypeMapper(t *testing.T) {
for _, tt := range []struct {
s string
typ influxql.DataType
err bool
}{
{s: `abs(f::float)`, typ: influxql.Float},
{s: `abs(i::integer)`, typ: i... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: google/rpc/code.proto
package rpc
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
math "math"
strconv "strconv"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.I... |
// 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v0/enums/custom_placeholder_field.proto
package enums // import "google.golang.org/genproto/googleapis/ads/googleads/v0/enums"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to s... |
package oidc
import (
"encoding/json"
"fmt"
"html"
"html/template"
"net"
"net/http"
"net/url"
"os"
"strings"
"time"
gooidc "github.com/coreos/go-oidc"
"github.com/dgrijalva/jwt-go"
log "github.com/sirupsen/logrus"
"golang.org/x/oauth2"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd... |
package hukabuk
import (
"bytes"
"crypto/sha256"
"encoding/base64"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"math/big"
"net/http"
"regexp"
"strconv"
"strings"
"sync"
"time"
"appengine"
"appengine/memcache"
"appengine/urlfetch" // From urlfetch.go in go-endpoints
)
const (
// DefaultCertURI is Goo... |
package main
import (
"fmt"
"math/rand"
"net/http"
"strconv"
"sync"
"sync/atomic"
"time"
model "github.com/DataDog/agent-payload/v5/process"
"github.com/DataDog/datadog-agent/pkg/config/resolver"
"github.com/DataDog/datadog-agent/pkg/forwarder"
"github.com/DataDog/datadog-agent/pkg/orchestrator"
"github.c... |
/*
Copyright 2018 Pressinfra SRL
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
... |
package module
import (
"reflect"
"regexp"
"time"
"unicode/utf8"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/duration"
"github.com/golang/protobuf/ptypes/timestamp"
"github.com/lyft/protoc-gen-star"
"github.com/lnnujxxy/protoc-gen-validate/valida... |
// Copyright 2018 The Nakama 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 ... |
package gui
import (
"fmt"
"io/ioutil"
"os"
"runtime"
"sync"
"os/exec"
"strings"
"time"
"github.com/go-errors/errors"
"github.com/fatih/color"
"github.com/golang-collections/collections/stack"
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/la... |
// Copyright 2011 Google Inc. All Rights Reserved.
// This file is available under the Apache license.
package mtail
import (
"context"
"encoding/json"
"expvar"
"fmt"
"html/template"
"io"
"net"
"net/http"
"net/http/pprof"
"os"
"os/signal"
"runtime"
"sync"
"syscall"
"time"
"github.com/golang/glog"
"g... |
package authenticate // import "github.com/pomerium/pomerium/authenticate"
import (
"encoding/base64"
"encoding/json"
"errors"
"fmt"
"net/http"
"net/url"
"strings"
"time"
"github.com/rs/cors"
"github.com/pomerium/csrf"
"github.com/pomerium/pomerium/internal/cryptutil"
"github.com/pomerium/pomerium/intern... |
package driver
import (
"bytes"
"encoding/json"
"fmt"
"log"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"syscall"
"time"
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/go-plugin"
"github.com/mitchellh/mapstructure"
"github.com/hashicorp/nomad/client/config"
"github.com/hashicorp/no... |
//go:build tools
// +build tools
/*
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 applic... |
// Copyright 2020 The Cockroach Authors.
//
// Licensed as a CockroachDB Enterprise file under the Cockroach Community
// License (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// https://github.com/cockroachdb/cockroach/blob/master/li... |
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
"fmt"
"log"
"math/big"
mrand "math/rand"
"sync"
"testing"
"time"
"github.com/jmhodges/clock"
"golang.org/x/net/context"
"github.com/letsencrypt/boulder/core"
"github.com/letsencrypt/boulder/features"
blog "github.com/le... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: platform/proto/alert/alert.proto
package alert
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Re... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: ledger_info.proto
package gowrapper
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a ... |
package models
import (
"context"
"errors"
"fmt"
"math"
"net/http"
"time"
"github.com/gobuffalo/nulls"
"github.com/gobuffalo/pop/v5"
"github.com/gobuffalo/validate/v3"
"github.com/gofrs/uuid"
"github.com/silinternational/cover-api/api"
"github.com/silinternational/cover-api/domain"
)
var ValidPayoutOpti... |
// Copyright (c) 2022 Zededa, Inc.
// SPDX-License-Identifier: Apache-2.0
package dpcmanager
import (
"context"
"errors"
"fmt"
"time"
"github.com/lf-edge/eve/pkg/pillar/conntester"
"github.com/lf-edge/eve/pkg/pillar/netmonitor"
"github.com/lf-edge/eve/pkg/pillar/types"
)
const (
waitForIfRetries = 2
wai... |
// Copyright (c) 2021 Terminus, 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 agree... |
package qrcode
import (
"errors"
"log"
"strconv"
// "github.com/skip2/go-qrcode/bitset"
"github.com/yeqown/reedsolomon/binary"
)
// ecLevel error correction level
type ecLevel int
const (
// ErrorCorrectionLow :Level L: 7% error recovery.
ErrorCorrectionLow ecLevel = iota + 1
// ErrorCorrectionMedium :Leve... |
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"time"
"github.com/Shopify/sarama"
"github.com/kataras/iris/v12"
)
/*
首先,请阅读有关Apache Kafka的信息,如果还没有安装,请安装并运行它:https://kafka.apache.org/quickstart
First of all, read about Apache Kafka, install and run it, if you didn't already: https://kafka.apache.org/q... |
package ws
import (
"encoding/json"
"fmt"
"github.com/gorilla/websocket"
"github.com/guonaihong/flag"
"github.com/guonaihong/gurl/core"
"github.com/guonaihong/gurl/input"
"github.com/guonaihong/gurl/output"
"github.com/guonaihong/gurl/report"
"github.com/guonaihong/gurl/task"
"github.com/guonaihong/gurl/util... |
package eventsource
import (
"context"
"encoding/base64"
"encoding/json"
"fmt"
"github.com/imdario/mergo"
"github.com/pkg/errors"
"go.uber.org/zap"
appv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/ap... |
//
// Copyright 2020 The Feast 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... |
package main
import (
"database/sql"
"strings"
"time"
"github.com/pkg/errors"
"github.com/umisama/go-sqlbuilder"
"fknsrs.biz/p/don/acct"
"fknsrs.biz/p/don/activitystreams"
)
var (
peopleTable = sqlbuilder.NewTable(
"people",
nil,
sqlbuilder.IntColumn("ROWID", nil),
sqlbuilder.StringColumn("id", &sql... |
// Copyright 2018 The Kubeflow 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 nibiru
import (
"encoding/json"
"fmt"
api "github.com/preichenberger/go-coinbase-exchange"
"os"
"time"
)
const simulationActivated bool = true
type GdaxClient struct {
client api.Client //Gdax API
side string
productId string
cashAvailable float64 // Updated in refreshCas... |
// Copyright 2018 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/resources/customer_feed.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
wrappers "github.com/catper/protobuf/ptypes/wrappers"
common "google.golang.org/genproto/googleapis/ads/goog... |
package secondary_structure
import (
"fmt"
"strings"
"github.com/Open-Science-Global/poly/checks"
)
/******************************************************************************
July, 01, 2021
This file defines the structs and functions needed to get the 'annotated'
structure and `SecondaryStructure` of a RNA ... |
// Copyright 2019 Yunion
//
// 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 dispatcher
import (
"context"
"encoding/json"
"fmt"
"log"
"strings"
"sync"
"sync/atomic"
"time"
contribchannels "knative.dev/eventing-contrib/pkg/channel"
eventingduck "knative.dev/eventing/pkg/apis/duck/v1alpha1"
messagingv1alpha1 "knative.dev/eventing/pkg/apis/messaging/v1alpha1"
eventingchannel... |
// 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 ... |
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package types
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"strings"
"time"
"github.com/33cn/chain33/common/crypto"
"github.com/33cn/c... |
/*
Copyright 2011-2013 <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 writing, s... |
package core
import (
"bytes"
"context"
"errors"
"fmt"
"io"
"net"
"net/http"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/aler9/gortsplib"
"github.com/aler9/gortsplib/pkg/ringbuffer"
"github.com/aler9/gortsplib/pkg/rtpaac"
"github.com/aler9/rtsp-simple-server/internal/conf"
"github.com/aler9/rts... |
package main
type PresetLocations []string
var PRESETS = map[string]PresetLocations{
"afghanistan": PresetLocations{
"afghanistan",
"ghazni",
"herat",
"jalalabad",
"kabul",
"kandahar",
"mazar-e-sharif",
"nangarhar"
},
"alba... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/services/payments_account_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"
_ "... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.21.0
// protoc v3.6.1
// source: github.com/solo-io/gloo-mesh/api/networking/v1/applied_policies.proto
package v1
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
_ "github.com/solo-io/protoc... |
package main
import (
"bytes"
"fmt"
"go/format"
"io/ioutil"
"path"
"sort"
"strings"
"text/template"
"k8s.io/gengo/parser"
"k8s.io/gengo/types"
)
const (
PKGName = "github.com/andersfylling/disgord"
)
var noStruct struct{}
func DisgordTypes(whitelist ...types.Kind) (typesList []*types.Type, p *types.Pack... |
package workflow
import (
"context"
"fmt"
"sync"
"time"
"github.com/go-gorp/gorp"
"github.com/rockbears/log"
"github.com/ovh/cds/engine/cache"
"github.com/ovh/cds/engine/gorpmapper"
"github.com/ovh/cds/sdk"
"github.com/ovh/cds/sdk/telemetry"
)
// ProcessorReport represents the state of the workflow proces... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v2/enums/content_label_type.proto
package enums
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imports to suppress errors if they are... |
// Copyright 2018 The Fuchsia 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 (
"context"
"encoding/json"
"flag"
"fmt"
"io"
"io/ioutil"
"net"
"os"
"path/filepath"
"sync"
"time"
"go.fuchsia.dev/fuchsia... |
/*
Copyright 2021 The KubeVela 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, softw... |
package gtoken
import (
"context"
"errors"
"fmt"
"github.com/gogf/gf/v2/crypto/gaes"
"github.com/gogf/gf/v2/crypto/gmd5"
"github.com/gogf/gf/v2/encoding/gbase64"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/text/gstr"
"github.com/g... |
package cmd
import (
"context"
"fmt"
"io"
"os"
"os/exec"
"os/signal"
"strings"
"sync/atomic"
"syscall"
"github.com/dnephin/pflag"
"github.com/fatih/color"
"github.com/pkg/errors"
"gotest.tools/gotestsum/log"
"gotest.tools/gotestsum/testjson"
)
var version = "dev"
func Run(name string, args []string) e... |
package crane
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"github.com/imdario/mergo"
"gopkg.in/v2/yaml"
"io/ioutil"
"os"
"path/filepath"
"sort"
"strconv"
"strings"
"time"
)
type Config interface {
DependencyMap() map[string]*Dependencies
ContainersForReference(reference string) (result []string)
P... |
/*
Copyright oVirt Authors
SPDX-License-Identifier: Apache-2.0
*/
package clients
import (
"context"
"fmt"
"math"
"regexp"
"time"
"github.com/pkg/errors"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/klog"
ovirtsdk "github.com/ovirt/go-ovirt"
machinev1 "github.com/opens... |
package testtools
import (
"crypto/ecdsa"
"crypto/rsa"
"crypto/x509"
"encoding/json"
"errors"
"fmt"
"github.com/smartedge/codechallenge"
"github.com/smartedge/codechallenge/crypt"
"github.com/smartedge/codechallenge/deps"
"github.com/xeipuuv/gojsonschema"
"os"
"path/filepath"
"reflect"
"regexp"
"sort"
... |
package config
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"text/template"
"github.com/hootsuite/vault-ctrl-tool/v2/util"
"github.com/rs/zerolog"
zlog "github.com/rs/zerolog/log"
"gopkg.in/yaml.v2"
)
// VaultTokenType for writing the contents of a VAULT_TOKEN to the specified file w... |
package main
import (
"bufio"
"crypto/rand"
"io"
"io/ioutil"
"os"
"os/signal"
"path/filepath"
"regexp"
"strings"
"sync"
"time"
goMetrics "github.com/rcrowley/go-metrics"
"github.com/rs/zerolog"
"github.com/spf13/afero"
"github.com/spf13/cobra"
"github.com/spf13/viper"
bolt "go.etcd.io/bbolt"
"githu... |
package transactions
import (
"errors"
"fmt"
"github.com/fivebinaries/go-cardano-serialization/bip32"
"github.com/fivebinaries/go-cardano-serialization/common"
"github.com/fivebinaries/go-cardano-serialization/crypto"
"github.com/fivebinaries/go-cardano-serialization/fees"
"github.com/fivebinaries/go-cardano-s... |
// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
// Use of this file is governed by the BSD 3-clause license that
// can be found in the LICENSE.txt file in the project root.
package antlr
import (
"fmt"
"strconv"
)
const serializedVersion = 4
type loopEndStateIntPair struct {
item0 *LoopEndSta... |
/*
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 v3client
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"golang.org/x/sync/semaphore"
"io/ioutil"
"net/http"
"net/url"
"strconv"
"strings"
"time"
)
const tokenFile string = ".mashery-logon"
// V3AccessTokenProvider Access token provider that supplies the access token, depending on the ... |
// Copyright (c) 2013-2017 The btcsuite developers
// Copyright (c) 2018-2019 The Soteria DAG developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package blockdag
import (
"encoding/binary"
"fmt"
"math/big"
"sort"
"time"
qithash "github.com/Qitmeer/qitm... |
package astilibav
import (
"context"
"fmt"
"math"
"sync"
"sync/atomic"
"time"
"github.com/asticode/go-astiencoder"
"github.com/asticode/go-astikit"
"github.com/asticode/goav/avutil"
)
var countRateEnforcer uint64
// RateEnforcer represents an object capable of enforcing rate based on PTS
type RateEnforcer ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/resources/asset.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
wrappers "github.com/catper/protobuf/ptypes/wrappers"
common "google.golang.org/genproto/googleapis/ads/googleads/v3... |
//nolint:gosimple
package gojqextra
import (
"bytes"
"fmt"
"math/big"
"github.com/wader/fq/internal/colorjson"
"github.com/wader/gojq"
)
func Typeof(v interface{}) string {
switch v := v.(type) {
case nil:
return "null"
case bool:
return "boolean"
case int, float64, *big.Int:
return "number"
case st... |
package configmap
import (
"bytes"
"text/template"
aerospikev1alpha1 "github.com/aerospike/aerospike-kubernetes-operator/pkg/apis/aerospike/v1alpha1"
"github.com/aerospike/aerospike-kubernetes-operator/pkg/controller/utils"
)
const initializeShTemplateStr = `
#! /bin/bash
# --------------------------------------... |
// Package selector is a terminal single-selection list library. selector library provides the
// functions of page up and down and key movement, and supports custom rendering methods.
package selector
import (
"fmt"
"strconv"
"strings"
"github.com/mritd/bubbles/common"
tea "github.com/charmbracelet/bubbletea"
... |
/*
Copyright (c) 2020, Tomasz "VedVid" Nowakowski
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and... |
package gpsr
import (
"bufio"
"fmt"
"log"
"math"
rand "math/rand"
"os"
"sort"
probs "damd/problems"
)
// struct to hold the calculated values of a single point
// across a set of equations
type PntStats struct {
AveErr, Variance, MinErr, MaxErr float64
}
type PntStatsArray2d [][]PntStats // |dataSets|*|numP... |
package sdl
import (
"fmt"
"path"
"sort"
"strconv"
"github.com/pkg/errors"
"github.com/ovrclk/akash/manifest"
providerUtil "github.com/ovrclk/akash/provider/cluster/util"
types "github.com/ovrclk/akash/types/v1beta2"
dtypes "github.com/ovrclk/akash/x/deployment/types/v1beta2"
)
const (
nextCaseError ... |
package runtime
import (
"fmt"
"math"
"math/big"
"os"
"strings"
"unicode"
)
const (
OpCharInt int32 = iota
OpCharInc
OpCharDec
OpCharAdd
OpCharSub
OpCharEq
OpCharNeq
OpCharLess
OpCharLessEq
OpCharMore
OpCharMoreEq
OpCharToUpper
OpCharToLower
OpCharIsWhitespace
OpCharIsLetter
OpCharIsDigit
OpCha... |
package main
import (
"bufio"
"bytes"
"errors"
"flag"
"fmt"
"io"
"log"
"os"
"path"
"path/filepath"
"regexp"
"strings"
"time"
)
// TODO: add --version flag and version command.
// Variables set by go build.
var (
// buildRevision is the build revision (docker commit string or git rev-parse HEAD).
buildR... |
/*
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 under the License ... |
package tuple
import (
"fmt"
"golang.org/x/exp/constraints"
)
// T7 is a tuple type holding 7 generic values.
type T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7 any] struct {
V1 Ty1
V2 Ty2
V3 Ty3
V4 Ty4
V5 Ty5
V6 Ty6
V7 Ty7
}
// Len returns the number of values held by the tuple.
func (t T7[Ty1, Ty2, Ty3, Ty4, Ty5, ... |
// BUG: // Help message.
package main
import (
"fmt"
"os"
"path/filepath"
"runtime"
)
var helpMsg = `
USAGE
%[1]v [OPTIONS] [<DIRS>]
DESCRIPTION
Searches directory trees for files that match regular expressions
using parallelism to improve performance. It is written in go.
It was developed to al... |
package chess
import "fmt"
var coord map[bitmap][2]uint8
func init() {
coord = make(map[bitmap][2]uint8)
var s bitmap = 1
var x uint8
var y uint8
for y = 0; y < 8; y++ {
for x = 7; x <= 7; x-- {
coord[s] = [2]uint8{x, y}
s <<= 1
}
}
}
type bitmap uint64
func (b bitmap) Coordinates() [2]uint8 {
r... |
package consensus
import (
"bytes"
"errors"
"fmt"
"sort"
"sync"
"github.com/dusk-network/dusk-blockchain/pkg/core/consensus/header"
"github.com/dusk-network/dusk-blockchain/pkg/p2p/wire/encoding"
"github.com/dusk-network/dusk-blockchain/pkg/p2p/wire/message"
"github.com/dusk-network/dusk-blockchain/pkg/p2p/w... |
// Copyright 2014 DoAT. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the follo... |
package main
import (
"encoding/xml"
"errors"
"io/ioutil"
"net/http"
"net/url"
"strings"
"sync"
)
const (
// CommonURL is a constant that stores the common URL of the restAPI.
CommonURL = "http://openapi.gbis.go.kr/ws/rest"
// BusStationURLPath is a constant that stores the URL Path to the bus station.
Bus... |
// Copyright 2021 Edgecast Inc
package icmpengine
import (
"fmt"
"math/rand"
"sort"
"sync"
"time"
"github.com/hashicorp/go-hclog"
"inet.af/netaddr"
"container/list"
"log"
"net"
"syscall"
"golang.org/x/net/icmp"
"golang.org/x/net/ipv4"
"golang.org/x/net/ipv6"
)
const (
PingerFractionModulo = 10
Pd... |
package advertisement_operator
import (
"context"
"errors"
"github.com/liqoTech/liqo/internal/discovery/kubeconfig"
pkg "github.com/liqoTech/liqo/pkg/advertisement-operator"
"github.com/liqoTech/liqo/pkg/crdClient"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/klog"
"... |
// Copyright 2020 The NATS 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 wr... |
package api
import (
"context"
"fmt"
"log"
"time"
"github.com/brigadecore/brigade-foundations/crypto"
libCrypto "github.com/brigadecore/brigade/v2/apiserver/internal/lib/crypto"
"github.com/brigadecore/brigade/v2/apiserver/internal/meta"
"github.com/pkg/errors"
)
// LogLevel represents the desired granularit... |
package memory
import (
"fmt"
"strings"
"github.com/milosgajdos/kraph/pkg/api"
"github.com/milosgajdos/kraph/pkg/attrs"
"github.com/milosgajdos/kraph/pkg/errors"
"github.com/milosgajdos/kraph/pkg/metadata"
"github.com/milosgajdos/kraph/pkg/query"
"github.com/milosgajdos/kraph/pkg/store"
"github.com/milosgajd... |
package i3s
// #include <stdlib.h>
import "C"
type NodeID C.size_t
type LayerID C.size_t
type AttribIndex C.int
type AttribSchemaID C.int
type TextureID C.int
type GeometryID C.int
type Rgba8 [4]C.uchar
type UVRegion [4]C.uchar
type GeometryFormat C.int
const (
GF_NOT_SET = GeometryFormat(0)
GF_LEGACY ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/services/payments_account_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/v3/resources"
_ "... |
package text
import (
"math"
"strings"
"github.com/benoitkugler/textlayout/language"
"github.com/benoitkugler/textprocessing/pango"
pr "github.com/benoitkugler/webrender/css/properties"
"github.com/benoitkugler/webrender/text/hyphen"
"github.com/benoitkugler/webrender/utils"
)
// Splitted exposes the result o... |
/*
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... |
// 13 december 2015
package ui
// #include "pkgui.h"
import "C"
// DrawPath represents a geometric path in a drawing context.
// This is the basic unit of drawing: all drawing operations consist of
// forming a path, then stroking, filling, or clipping to that path.
// A path is an OS resource; you must explicitly f... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// deprecated/deprecated.proto is a deprecated file.
// package deprecated contains only deprecated messages and services.
package deprecated
import (
context "context"
fmt "fmt"
proto "github.com/tron-us/protobuf/proto"
grpc "google.golang.org/grpc"
codes "goo... |
/*
Copyright IBM Corp All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package e2e
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"time"
"github.com/hyperledger/fabric/integration/helpers"
"github.com/hyperledger/fabric/integration/runner"
"github.com/hyperledger/fabric/integration/world"
. "gi... |
package dto
import (
"fmt"
"strconv"
"time"
"github.com/savannahghi/enumutils"
"github.com/savannahghi/feedlib"
"github.com/savannahghi/mycarehub/pkg/mycarehub/application/enums"
"github.com/savannahghi/scalarutils"
validator "gopkg.in/go-playground/validator.v9"
)
// FacilityInput describes the facility inp... |
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"math"
"math/rand"
"os"
"sort"
"strconv"
"time"
)
type Point struct {
x, y int
}
type Edge struct {
from, to int
}
type LineSegment struct {
from, to Point
}
type PosePoint struct {
fixed bool
point Point
}
type PointAndIndex struct {
i... |
// Copyright (c) 2018-2020. The asimov developers
// Copyright (c) 2013-2017 The btcsuite developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package blockchain
import (
"fmt"
"github.com/AsimovNetwork/asimov/asiutil"
"github.com/AsimovNetwork/asimov/blockch... |
package google
import (
"crypto/rand"
"encoding/base32"
"errors"
"fmt"
"path"
"strconv"
"strings"
"time"
"github.com/kelda/kelda/cloud/acl"
"github.com/kelda/kelda/cloud/cfg"
"github.com/kelda/kelda/cloud/google/client"
"github.com/kelda/kelda/db"
"github.com/kelda/kelda/join"
"github.com/kelda/kelda/ut... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.