text stringlengths 3.08k 10.4k |
|---|
package lib
import (
"errors"
"fmt"
"io/ioutil"
"math/rand"
"os"
"regexp"
log "github.com/Sirupsen/logrus"
)
var (
apiVersions = map[string]string{
"1.12": "1.0.1",
"1.13": "1.1.2",
"1.14": "1.2.0",
"1.15": "1.3.3",
"1.16": "1.4.1",
"1.17": "1.5.0",
"1.18": "1.6.0",
"1.19": "1.7.1",
"1.20":... |
package validator
import (
"fmt"
"math/big"
"github.com/hyperledger/burrow/crypto"
)
// Ring stores the validator power history in buckets as a riNng buffer. The primary storage is a the difference between
// each rotation (commit - i.e. block) in 'delta' and the cumulative result of each delta in cum, where the ... |
// Copyright 2013 <NAME> and the websocketd team.
// 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 (
"flag"
"fmt"
"os"
"os/exec"
"runtime"
"strings"
"time"
"github.com/joewalnes/websocketd/libwebsocketd"
)
typ... |
package cmd
import (
"fmt"
"io"
"net/url"
"os"
"strings"
"github.com/richarda23/rspace-client-go/rspace"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
const (
APIKEY_ENV_NAME = "RSPACE_API_KEY"
BASE_URL_ENV_NAME = "RSPACE_URL"
)
var (
validOutputFormats = []string{"json", "csv", "quiet", "table"}... |
package manifestival
import (
"fmt"
"github.com/go-logr/logr"
"github.com/go-logr/logr/testing"
"github.com/manifestival/manifestival/overlay"
"github.com/manifestival/manifestival/patch"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)
// Man... |
package pgs
import (
plugin_go "github.com/golang/protobuf/protoc-gen-go/plugin"
"path/filepath"
)
// BuildContext tracks code generation relative to an output path. By default,
// BuildContext's path is relative to the output location specified when
// executing protoc (an absolute path to this location is n... |
package packet
import (
"fmt"
"github.com/jsimonetti/go-artnet/packet/code"
)
var _ ArtNetPacket = &ArtPollReplyPacket{}
// ArtPollReplyPacket contains an ArtPollReply Packet.
//
// A device, in response to a Controller’s ArtPoll, sends the ArtPollReply. This packet
// is also broadcast to the Directed Broadcast ... |
package pkg
import (
"fmt"
fp "path/filepath"
"strings"
"github.com/rs/zerolog/log"
)
type recursiveBuildPathErrorCallback = func(base string, arg Any)
/**
* Recursively build a path from a slice of strings of arbitrary depth.
*
* The only arguments this function can handle are strings, and
* slices of stri... |
/*
Problem:
- Given an undirected graph, with maximum degree d, find a graph coloring
using at most d + 1 colors. Assume that there is no node with a loop.
Example:
- For a graph with degree 3, we could use at most 4 colors.
Approach:
- Use a greedy approach to iterate over the graph and assign each node the
firs... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.