text stringlengths 8.57k 38.1k |
|---|
// SPDX-License-Identifier: Unlicense OR MIT
package main
// A Gio program that displays Go contributors from GitHub. See https://gioui.org for more information.
import (
"fmt"
"image"
"image/color"
"runtime"
"golang.org/x/image/draw"
_ "image/jpeg"
_ "image/png"
_ "net/http/pprof"
"gioui.org/ui"
"giou... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v4.0.0
// source: proto/ConsensusUpdateTopic.proto
package proto
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/pr... |
// 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 util
import (
"fmt"
"regexp"
"strings"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes/timestamp"
lab "go.chromiu... |
package main
import (
"bytes"
"context"
"crypto/tls"
"encoding/xml"
"fmt"
"io/ioutil"
"net"
"net/http"
"net/http/httptrace"
"net/url"
"strconv"
"strings"
"time"
"github.com/pkg/errors"
"github.com/prometheus/common/version"
log "github.com/sirupsen/logrus"
)
const (
defaultPort = "8080"
defaultPath... |
package main
import (
"bytes"
"context"
"crypto"
"crypto/rand"
"crypto/rsa"
"crypto/sha256"
"crypto/x509"
"database/sql"
"encoding/base32"
"encoding/hex"
"encoding/json"
"flag"
"fmt"
"github.com/dimiro1/banner"
"github.com/gorilla/mux"
"github.com/joho/godotenv"
"github.com/kjk/dailyrotate"
_ "github... |
// +build cgo,linux ignore
// Deprecated: Now the server is a C++ server and we communicate over the network.
// This is now effectively ignored during a build.
package ndb
// This whole file is VERY UNSAFE as it uses cgo. CARE IS TAKEN SERIOUSLY.
//
// This tries to use cgo efficiently.
// We will use unsafe extens... |
// Copyright 2022 The CubeFS 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc (unknown)
// source: aserto/api/v1/invite.proto
package api
import (
_ "github.com/aserto-dev/go-grpc/aserto/options/v1"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.... |
package main
import (
"math"
)
// originally this was built with numpy and tensorflow.
// I've made some efforts to remove numpy where I could and replace the functions with Go versions, see numpy.go for those.
//
// Missing function implementations collected from TODO below:
// GetGlobalStep
// MomentumOptimizer
//... |
/*
Package echo implements high performance, minimalist Go web framework.
Example:
package main
import (
"net/http"
"github.com/adverax/echo"
"github.com/adverax/echo/middleware"
)
// Handler
func hello(c echo.Context) error {
return c.String(http.StatusOK, "Hello, World!")
}
func ma... |
/*
Copyright 2016 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, ... |
// Copyright (c) 2014 The VolantMQ 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... |
// Copyright 2013 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.
/*
mkwinsyscall generates windows system call bodies
It parses all files specified on command line containing function
prototypes (like syscall_windows.go) and... |
// 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 dpos
import (
"bytes"
"encoding/hex"
"fmt"
"strings"
"time"
"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/util"
"github.com... |
// Copyright (c) 2020 Tigera, 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 agree... |
/*
* File uploader for use by CVE routines.
* It takes as a argument the container image that needs to be uploaded,
* or the keyword "host". In case of container image, the entire image is sent
* out as a tarball. In case of host, the base files are first sent out,
* followed by the language pack files.
*/
packa... |
//
// Copyright (C) 2019-2021 vdaas.org vald team <<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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by a... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: internal/api/synchronizer.proto
package ipb
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"
_ "google.golang.org/genproto/googleapis/api/annotations"
gr... |
// Copyright 2018 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... |
// 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 wri... |
package qln
import (
"bytes"
"fmt"
"time"
"github.com/Rjected/lit/btcutil/chaincfg/chainhash"
"github.com/Rjected/lit/btcutil/txscript"
"github.com/Rjected/lit/crypto/fastsha256"
"github.com/Rjected/lit/crypto/koblitz"
"github.com/Rjected/lit/lnutil"
"github.com/Rjected/lit/logging"
"github.com/Rjected/lit/... |
// Code generated by protoc-gen-go.
// source: google.golang.org/genproto/googleapis/api/distribution/distribution.proto
// DO NOT EDIT!
/*
Package google_api is a generated protocol buffer package.
It is generated from these files:
google.golang.org/genproto/googleapis/api/distribution/distribution.proto
It has th... |
/*
* This file is subject to the terms and conditions defined in
* file 'LICENSE.md', which is part of this source code package.
*/
package model
import (
"bytes"
"errors"
"fmt"
"strings"
"github.com/pzduniak/unipdf/common"
"github.com/pzduniak/unipdf/core"
)
// FieldFlag represents form field flags. Some ... |
/*
* MIT License
*
* (C) Copyright [2019-2021] Hewlett Packard Enterprise Development LP
*
* 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 limita... |
package invoices
import (
"bytes"
"fmt"
"sync"
"sync/atomic"
"time"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcutil"
"github.com/davecgh/go-spew/spew"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/lntypes"
"github.com/lightningnetwork/lnd/lnwire"
"github.com... |
/*
Package mqmetric contains a set of routines common to several
commands used to export MQ metrics to different backend
storage mechanisms including Prometheus and InfluxDB.
*/
package mqmetric
/*
Copyright (c) IBM Corporation 2016, 2021
Licensed under the Apache License, Version 2.0 (the "License");
you may n... |
// Copyright 2019 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 worker provides functionality for running a worker service.
// Its primary operation is to fetch modules from a proxy and write them to the
// databa... |
// 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... |
// Code generated by protoc-gen-go.
// source: google.golang.org/cloud/bigtable/internal/table_data_proto/bigtable_table_data.proto
// DO NOT EDIT!
/*
Package google_bigtable_admin_table_v1 is a generated protocol buffer package.
It is generated from these files:
google.golang.org/cloud/bigtable/internal/table_data_... |
package accountviewnet
import (
"strings"
)
type Fields []Field
type Field string
func (ff Fields) MarshalSchema() string {
fields := make([]string, len(ff))
for i, f := range ff {
fields[i] = string(f)
}
return strings.Join(fields, ",")
}
type BusinessObjects []BusinessObject
type BusinessObject struct {
... |
// Copyright (c) 2017 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. DO NOT EDIT.
// source: machine.proto
package machine
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 compil... |
package core
import (
"bytes"
"fmt"
"io"
"math/big"
"os"
"runtime"
"sync"
"sync/atomic"
"time"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/logge... |
package combination
import (
"math/big"
"github.com/prebid/prebid-server/openrtb_ext"
)
//generator holds all the combinations based
//on Video Ad Pod request and Bid Response Max duration
type generator struct {
podMinDuration uint64 // Pod Minimum duration value present in origin Video Ad Pod Re... |
/*
Copyright 2016 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... |
// 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 may... |
// 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, ... |
package helper
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"sort"
"strings"
"text/template"
"github.com/SAP/jenkins-library/pkg/config"
)
var stepParameterNames []string
// generates the step documentation and replaces the template with the generated documentation
func generateStepDocumentation(stepData config.... |
package b1
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"hash/fnv"
"io"
"log"
"os"
"sort"
"sync"
"time"
"github.com/boltdb/bolt"
"github.com/influxdb/influxdb/models"
"github.com/influxdb/influxdb/tsdb"
)
// Format is the file format name of this engine.
const Format = "b1"
func init() {
tsdb.Re... |
package cmd
import (
"fmt"
"io"
"strconv"
"strings"
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta"
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/resource"
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/GoogleClou... |
/*
Copyright 2016-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 writ... |
package tangle
import (
"errors"
"fmt"
"time"
"github.com/iotaledger/hive.go/daemon"
"github.com/iotaledger/hive.go/syncutils"
"github.com/iotaledger/hive.go/workerpool"
"github.com/gohornet/hornet/pkg/dag"
"github.com/gohornet/hornet/pkg/metrics"
"github.com/gohornet/hornet/pkg/model/hornet"
"github.com/g... |
package daemon
import (
"context"
"fmt"
"io/ioutil"
"net/http"
"os"
"path/filepath"
"strings"
"time"
"github.com/coreos/go-systemd/login1"
ignv2 "github.com/coreos/ignition/config/v2_2"
ignv2_2types "github.com/coreos/ignition/config/v2_2/types"
"github.com/golang/glog"
drain "github.com/openshift/kubern... |
/*
Copyright The starlight 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 ... |
// Copyright (c) 2014-2017 The ltcsuite developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package dash_rpc
import (
"bytes"
"container/list"
"context"
"crypto/tls"
"crypto/x509"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"math"
"net/http"
"net/ur... |
/*
process OCR on a pdf file;
requires:
- tesseract [depending on imagemagick and ghostscript]
- unpaper
- hocr2pdf (from ExactImage)
(C) 2010-2018 <NAME>, modified for tesseract <NAME> 2012
patch for -rgb option contributed by <NAME>
patch for a parallel computing problem with Tesseract 4, <NAME>, 2018
T... |
package index
import (
// "fmt"
. "github.com/gzg1984/golucene/core/analysis/tokenattributes"
"github.com/gzg1984/golucene/core/codec"
. "github.com/gzg1984/golucene/core/codec/spi"
. "github.com/gzg1984/golucene/core/index/model"
"github.com/gzg1984/golucene/core/util"
)
// type TermsHashConsumerPerField inter... |
package dataCollector
import (
"database/sql"
"fmt"
_ "github.com/lib/pq"
"github.com/miekg/dns"
"github.com/niclabs/Observatorio/dbController"
"github.com/niclabs/Observatorio/dnsUtils"
"github.com/niclabs/Observatorio/geoIPUtils"
"github.com/niclabs/Observatorio/utils"
"github.com/oschwald/geoip2-golang"
"... |
package main
import (
"context"
"database/sql"
"errors"
"fmt"
"log"
"net/http"
"os"
"sort"
"strconv"
"strings"
"sync"
"time"
"github.com/anaminus/rbxark/fetch"
"github.com/anaminus/rbxark/filters"
"github.com/anaminus/rbxark/objects"
"github.com/mattn/go-sqlite3"
_ "github.com/mattn/go-sqlite3"
"git... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: proto/event_sync/event_sync.proto
// import "proto/include/google/protobuf/any.proto";
package event_sync
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
... |
package dialects
import "strings"
/*
MySQL keywords
https://dev.mysql.com/doc/refman/5.7/en/keywords.html
Those keywords that had no indicator if they were reserved or not were set to false.
*/
// map[keyword]isReserved
var mysqlKeywords = map[string]bool{
"ACCESSIBLE": true,
"ACCOUNT": ... |
/**
* SPDX-License-Identifier: Apache-2.0
* Copyright 2020 vorteil.io Pty Ltd
*/
package vorteil
import (
"bufio"
"encoding/binary"
"log"
"os/exec"
"runtime"
"sort"
"time"
"unsafe"
"fmt"
"io/ioutil"
mrand "math/rand"
"net"
"regexp"
"strings"
"sync"
"github.com/insomniacslk/dhcp/dhcpv4"
"github.c... |
package main
import (
"bytes"
"encoding/binary"
"fmt"
"github.com/1a1a11a/c2dnPrototype/src/myconst"
"io"
"io/ioutil"
"net/http"
"strconv"
"sync/atomic"
"time"
)
/**
this is the checkOneMore server implementation, similar to ICP, but only checks the necessary servers
*/
func CatchPanicWithFeTxn(feTxn *Fron... |
package main
import (
"compress/gzip"
"crypto/tls"
"flag"
"fmt"
"go-server-go/proxyconfig"
"golang.org/x/crypto/acme/autocert"
"io"
"io/ioutil"
"log"
"net/http"
"net/http/httputil"
url2 "net/url"
"os"
"os/user"
"path/filepath"
"runtime"
"strconv"
"strings"
"sync"
"time"
)
const VERSION = "1.0"
co... |
package v1alpha1
import (
"encoding/json"
"reflect"
"strings"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/rest"
"github.com/argoproj/argo-cd/common"
"github.com/argoproj/argo-cd/util/git"
)
// SyncOperat... |
// Code generated by goyacc -o parser.go -v parser.output parser.y. DO NOT EDIT.
//line parser.y:2
package pifra
import __yyfmt__ "fmt"
//line parser.y:2
var undeclaredProcs []Element
var curProcParams []string
// All elements
var curElem Element // Tracks the current element chain
// Process Constants element
va... |
// Copyright Project Contour 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 strutils_test
import (
"testing"
"github.com/torden/go-strutil"
)
func ipaddrTest(t *testing.T, cktype int, dataset map[string]bool, errfmt string) {
//check : common
for k, v := range dataset {
retval, _ := strvalidator.IsValidIPAddr(k, cktype)
assert.AssertEquals(t, v, retval, errfmt, retval)
a... |
package bubt
import "os"
import "io"
import "fmt"
import "time"
import "bytes"
import "regexp"
import "strings"
import "strconv"
import "runtime"
import "io/ioutil"
import "path/filepath"
import "github.com/bnclabs/gostore/api"
import "github.com/bnclabs/gostore/lib"
import "github.com/bnclabs/gostore/flock"
import s... |
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
// Copyright (c) 2014-2016 The btcsuite developers
// Copyright (c) 2015-2020 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package cpuminer
import (
"context"
"encoding/binary"
"errors"
"runtime"
"sync"
"sync/atomic"
"time"
"github.c... |
// Copyright (c) 2018 The MATRIX Authors
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php
// Package man implements the Matrix protocol.
package man
import (
"errors"
"fmt"
"github.com/MatrixAINetwork/go-matrix/accounts"
"git... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.12.2
// source: eolymp/atlas/solution.proto
package atlas
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
... |
// Copyright 2013 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 language
import (
"errors"
"strings"
"github.com/ipfs/fs-repo-migrations/ipfs-10-to-11/_vendor/golang.org/x/text/internal/language"
)
// A MatchOp... |
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// source: binapis/vpp2001/.vppapi/core/ipfix_export.api.json
/*
Package ipfix_export is a generated VPP binary API for 'ipfix_export' module.
It consists of:
4 enums
5 aliases
6 types
1 union
14 messages
7 services
*/
package ipfix_export
... |
/*
Copyright The Accelerated Container Image 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 ... |
// Copyright 2020 The Cockroach Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ag... |
// Copyright 2013 <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 web
import (
"strings"
"unicode"
"unicode/utf8"
)
type nodeType uint8
const (
static nodeType = iota // default
root
param
catchAll
)
type node struc... |
package rpc
import (
"bytes"
"encoding/hex"
"fmt"
"github.com/btcboost/copernicus/blockchain"
"github.com/btcboost/copernicus/btcjson"
"github.com/btcboost/copernicus/core"
"github.com/btcboost/copernicus/net/msg"
"github.com/btcboost/copernicus/policy"
"github.com/btcboost/copernicus/utils"
"github.com/pkg... |
// Package pingclient is a simple but powerful ICMP echo (ping) library.
// Inspired by go-fastping and go-ping
//
// Here is a very simple example that sends and receives three packets:
//
// import ping "github.com/scientiacoder/PingClient"
//
// pingClients, err := ping.InitWithYAMLFile("config.yaml")
// if err != n... |
package main
import (
"bufio"
"fmt"
"math"
"math/rand"
"os"
"strconv"
"strings"
"time"
)
//GAME CONSTANTS
const podRSQ = 800 * 800
const cpRSQ = 600 * 600
const podCount = 4
const minImpulse = 120
const frictionVal = 0.85
const checkpointGenerationGap = 30
//MATH CONSTANTS
const fullCircle = (2 * math.Pi)
co... |
package rady
import (
"fmt"
"github.com/labstack/echo"
"github.com/tidwall/gjson"
"io/ioutil"
"os"
"reflect"
"strings"
"testing"
)
/*
Application is the bootstrap of a Rady app
Root is pointer of app for config, controller and handler registry
BeanMap is map to find *Bean by `Type` and `Name`(when type is t... |
// This module contains a collection of YANG definitions
// for Cisco IOS-XR upgrade-fpd package operational data.
//
// This module contains definitions
// for the following management objects:
// fpd: Field programmable device (FPD) operational data
//
// Copyright (c) 2013-2017 by Cisco Systems, Inc.
// All righ... |
package gedcom_test
import (
"github.com/elliotchance/gedcom"
"github.com/stretchr/testify/assert"
"sort"
"testing"
)
const (
y = true
n = false
)
var tagTests = map[string]struct {
isKnown bool
isOfficial bool
isEvent bool
tag *gedcom.Tag
str string
}{
// Official
// isKnown
... |
package redis
import (
"flag"
. "launchpad.net/gocheck"
"testing"
"time"
)
// Hook up gocheck into the gotest runner.
func Test(t *testing.T) {
TestingT(t)
}
var rd *Client
var conf Config
type TI interface {
Fatalf(string, ...interface{})
}
func setUpTest(c TI) {
rd = NewClient(conf)
r := rd.Flushall()
i... |
// 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 writin... |
package lmdbbs
import (
"context"
"fmt"
"math"
"math/rand"
"os"
"sync"
"sync/atomic"
"time"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
blockstore "github.com/ipfs/go-ipfs-blockstore"
logging "github.com/ipfs/go-log/v2"
"github.com/ledgerwatch/lmdb-go/lmdb"
uatomic "go.uber.org/ato... |
// Copyright 2018 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, ... |
/*
Copyright 2020 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
package scheduler
import (
"context"
"fmt"
"math/rand"
"sort"
"sync"
"sync/atomic"
"time"
"k8s.io/kubernetes/pkg/scheduler/algorithmprovider"
"k8s.io/kubernetes/pkg/scheduler/client/cache"
"k8s.io/kubernetes/pkg/scheduler/client/informers"
"k8s.io/kubernetes/pkg/scheduler/client/typed"
"k8s.io/kubernetes/... |
// Copyright 2011 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 main
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
"os"
"path"
"reflect"
"strconv"
"strings"
)
type fix struct {
name string
date string ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: tensorflow/core/protobuf/debug.proto
package protobuf
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.... |
// Copyright 2019 The Go Cloud Development Kit 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 appli... |
package main
import (
"bytes"
"context"
"crypto/rand"
"encoding/hex"
"errors"
"fmt"
"io/ioutil"
"os"
"runtime"
"strconv"
"strings"
"time"
"github.com/jedib0t/go-pretty/table"
"github.com/jedib0t/go-pretty/text"
"github.com/lightninglabs/protobuf-hex-display/jsonpb"
"github.com/eacsuite/lnd/lnrpc"
"gi... |
// Copyright Microsoft Corporation.
// Licensed under the MIT License.
package main
import (
"fmt"
"io"
"os"
"path/filepath"
"runtime"
"strings"
"syscall"
"github.com/cavaliercoder/go-cpio"
"github.com/klauspost/pgzip"
"microsoft.com/pkggen/imagegen/configuration"
"microsoft.com/pkggen/internal/file"
"mi... |
/*
Copyright 2014 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 ... |
// Code generated by protoc-gen-go.
// source: bloat_report.proto
// DO NOT EDIT!
/*
Package pganalyze_collector is a generated protocol buffer package.
It is generated from these files:
bloat_report.proto
buffercache_report.proto
compact_activity_snapshot.proto
compact_log_snapshot.proto
compact_snapshot.proto
... |
package mint
import (
"bytes"
"encoding/hex"
"testing"
)
var (
// Extension test cases
extValidIn = Extension{
ExtensionType: ExtensionType(0x000a),
ExtensionData: []byte{0xf0, 0xf1, 0xf2, 0xf3, 0xf4},
}
extEmptyIn = Extension{
ExtensionType: ExtensionType(0x000a),
ExtensionData: []byte{},
}
extTooLo... |
package containerinit
// This package is originally from a fork of Docker and contains no code
// developed by Docker, Inc.
//
// HEAD commit: d0525987c0f29c77520d36a8eec16759e208f64a
// https://github.com/alexlarsson/docker/tree/long-running-dockerinit (original branch)
// https://github.com/titanous/docker/tree/long... |
package img
import (
"fmt"
"image"
"image/color"
"math"
"os"
"github.com/golang/freetype/raster"
"github.com/golang/freetype/truetype"
"golang.org/x/image/draw"
"golang.org/x/image/font"
"golang.org/x/image/font/gofont/gomono"
"golang.org/x/image/math/f64"
"github.com/lucasepe/gg"
)
// Context implement... |
package main
import (
"sync"
)
// Main types
type BlockInfo struct {
BlockHeight int64 `json:"block_height"`
BlockTime int64 `json:"block_time"`
BlockHash string `json:"block_hash"`
TimeElapsed int64 `json:"time_elapsed"`
Status string `json:"status"`
}
type DNSSeeder struct {
Name string `js... |
// gomuks - A terminal Matrix client written in Go.
// Copyright (C) 2020 <NAME>
//
// 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 opti... |
package main
import (
"fmt"
"github.com/rakslice/wxGo/wx"
"github.com/tomcatzh/asynchttpclient"
"log"
"net/http"
"sort"
"strings"
"time"
)
// EXTENDED APP CLASS
// Extends TwitchNotifierMain to provide channel lists and stream info needed for the GUI
type OurTwitchNotifierMain struct {
TwitchNotifierMain
w... |
/*
Copyright 2018 The Multicluster-Controller 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 main - Personal Identifiable Information (PII) database.
// For more info check https://databunker.org/
package main
import (
"bytes"
"compress/gzip"
"context"
"crypto/md5"
"encoding/hex"
"errors"
"flag"
"fmt"
"io"
"log"
"math/rand"
"net/http"
"os"
"os/signal"
"strings"
"syscall"
"time"
"... |
package dustingtest
import (
"fmt"
"github.com/computablelabs/goest/tests/test"
"math/big"
"testing"
"time"
)
func TestRequestDelivery(t *testing.T) {
// user has no credits atm
t.Log("User3 as demand user")
purchased, _ := deployed.DatatrustContract.GetBytesPurchased(nil, context.AuthUser3.From)
t.Logf("Use... |
package boxes
// Code generated by macros/boxes.py DO NOT EDIT
import "github.com/benoitkugler/webrender/html/tree"
// An atomic box in an inline formatting context.
// This inline-level box cannot be split for line breaks.
type AtomicInlineLevelBoxITF interface {
InlineLevelBoxITF
isAtomicInlineLevelBox()
}
// A... |
// Copyright 2016 NDP Systèmes. 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 applica... |
package main
import (
"bytes"
"encoding/hex"
"encoding/json"
"expvar"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
_ "net/http/pprof"
"net/url"
"os"
"runtime"
"strconv"
"strings"
"sync/atomic"
"time"
pb "github.com/dgryski/carbonzipper/carbonzipperpb"
"github.com/dgryski/carbonzipper/mlog"
"github.co... |
/*
A note on indexing of the board
0,0 is the left side if you stand on the high side of the board.
For pixels: along the high side is X, along the left is Y
For squares: lid 0,0 is the left side. 0,3 is the right side.
The board sensors map to the same.
*/
package core
import "sort"
import "fmt"
import "errors"
i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.