text stringlengths 5.51k 28.1k |
|---|
/*
* Copyright 2017 <NAME>, Inc. and 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... |
package store
import (
"context"
"sort"
"strings"
"github.com/keegancsmith/sqlf"
"github.com/sourcegraph/sourcegraph/internal/observation"
"github.com/sourcegraph/sourcegraph/lib/errors"
)
type Schema struct {
Extensions []string `json:"extensions"`
Enums []Enum `json:"enums"`
Functions []Funct... |
package main
import (
"bufio"
"container/list"
dl "de.knallisworld/aoc/aoc2019/dayless"
"fmt"
"github.com/fatih/color"
"math"
"os"
"regexp"
"strings"
"sync"
"time"
)
const AocDay = 25
const AocDayName = "day25"
const AocDayTitle = "Day 25"
func main() {
dl.PrintDayHeader(AocDay, AocDayTitle)
defer dl.Ti... |
package web
import (
"bytes"
"crypto/hmac"
"crypto/sha1"
"encoding/base64"
"fmt"
"io/ioutil"
"log"
"mime"
"net"
"net/http"
"net/http/pprof"
"net/url"
"os"
"path"
"reflect"
"regexp"
"runtime"
"strconv"
"strings"
"time"
)
type ResponseWrite... |
/*
Copyright 2020 The Knative 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, soft... |
// Copyright 2017 Istio Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... |
//go:build go1.16
// +build go1.16
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the cod... |
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Benchstat computes and compares statistics about benchmarks.
//
// This package has moved. Please use https://golang.org/x/perf/cmd/benchstat
package main
... |
/*
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
* This source code is licensed under the Apache License Version 2.0.
*/
package controller
import (
"context"
"encoding/json"
"fmt"
"github.com/pkg/errors"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apima... |
/*
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 not use this f... |
/*
Copyright 2020 The GoPlus Authors (goplus.org)
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... |
// ratt operates on a Debian .changes file of a just-built package, identifies
// all reverse-build-dependencies and rebuilds them with the .debs from the
// .changes file.
//
// The intended use-case is, for example, to package a new snapshot of a Go
// library and verify that the new version does not break any other ... |
package proc
import (
"fmt"
"sort"
"strconv"
"testing"
protest "github.com/derekparker/delve/proc/test"
)
type varTest struct {
name string
value string
setTo string
varType string
err error
}
func assertVariable(t *testing.T, variable *Variable, expected varTest) {
if variable.Name != expecte... |
package sync
import (
"sync"
"time"
"github.com/icon-project/goloop/common/crypto"
"github.com/icon-project/goloop/common/db"
"github.com/icon-project/goloop/common/errors"
"github.com/icon-project/goloop/common/log"
"github.com/icon-project/goloop/common/merkle"
"github.com/icon-project/goloop/module"
"gith... |
package groupby
import (
"context"
"sync"
"github.com/brimdata/zed"
"github.com/brimdata/zed/order"
"github.com/brimdata/zed/pkg/field"
"github.com/brimdata/zed/runtime/expr"
"github.com/brimdata/zed/runtime/op"
"github.com/brimdata/zed/runtime/op/spill"
"github.com/brimdata/zed/zbuf"
"github.com/brimdata/z... |
package finance
import (
"context"
"encoding/json"
"github.com/shopspring/decimal"
)
//
// Contains all the structs / info needed to
// consume and parse yfin apis.
//
// YfinError represents information returned in an error response.
type YfinError struct {
Code string `json:"code"`
Description string ... |
/*
Copyright © 2020 Red Hat, 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, software... |
/*
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 © 2018 <NAME> <<EMAIL>>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: types/events.proto
package types
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 com... |
package registry
import (
"fmt"
"os"
"path/filepath"
"strings"
"github.com/TouchBistro/goutils/file"
"github.com/TouchBistro/tb/app"
"github.com/TouchBistro/tb/playlist"
"github.com/TouchBistro/tb/service"
"github.com/TouchBistro/tb/util"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"gopkg.in/... |
package printer
import (
"fmt"
"strings"
astro "github.com/withastro/compiler/internal"
"github.com/withastro/compiler/internal/js_scanner"
"github.com/withastro/compiler/internal/loc"
"github.com/withastro/compiler/internal/sourcemap"
"github.com/withastro/compiler/internal/transform"
"golang.org/x/net/html/... |
//line parser.go.y:2
// Parser is a type to analyse scheme source's syntax.
// It embeds Lexer to generate tokens from a source code.
// Parser.Parse() does syntactic analysis and returns scheme object pointer.
package scheme
import __yyfmt__ "fmt"
//line parser.go.y:6
//line parser.go.y:9
type yySymType struct {
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.1
// source: httpgreet/httpgreet.proto
package httpgreet
import (
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "googl... |
// MIT License
//
// Copyright 2018 Canonical Ledgers, LLC
//
// 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, ... |
package tars
import (
"encoding/json"
"fmt"
"hash/crc32"
"io/ioutil"
"math/rand"
"path/filepath"
"sort"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/TarsCloud/TarsGo/tars/protocol/res/endpointf"
"github.com/TarsCloud/TarsGo/tars/protocol/res/queryf"
"github.com/TarsCloud/TarsGo/tars/util/consistent... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/services/mobile_device_constant_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/v3/resources... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/config/filter/http/cache/v2alpha/cache.proto
package envoy_config_filter_http_cache_v2alpha
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
route "github.com/envoyproxy/go-control-plane/envoy/api/v2/route"
matcher "github.com/envoyp... |
package main
import (
"math"
"math/rand"
"syscall/js"
"time"
"github.com/biotty/springweb"
)
const (
defaultK = 1.
armKFactor = 1e3
minK = defaultK * .25
maxK = defaultK * 5
defaultMass = 5e-3
minMass = defaultMass * .25
maxMass ... |
// Package cgoopc provides Go OPCUA client API and driver to browse/read/write/subscribe OPCUA tags.
package cgoopc
// open62541 library wrapper in Go
/*
#cgo CFLAGS: -std=c99 -I .
#include <stdlib.h>
#include "cgoua_api.h"
*/
import "C"
import (
"errors"
"fmt"
"log"
"math"
"sync"
"time"
"unsafe"
)
type DataH... |
// Copyright 2013 <NAME>. All rights reserved.
// Copyright 2021 <NAME>. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// Package reflectx implements extensions to the standard reflect lib suitable
// for implementing marshalling and unmars... |
package darksky
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"sort"
"strconv"
"strings"
"time"
)
// A Block is a data block in a response.
type Block string
// Blocks.
const (
BlockAlerts Block = "alerts"
BlockCurrently Block = "currently"
BlockDaily Block = "daily"
... |
// Copyright 2019 eBay Inc.
// Primary authors: <NAME>, <NAME>,
// <NAME>, and <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
// https://www.apache.org/licenses/... |
// Copyright 2020 The LUCI Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... |
package chat
import (
"contexts/ctx"
"contexts/web"
"examples/chat"
"toolkit"
"encoding/json"
"net/http"
"strings"
"time"
)
func get(m *ctx.Message, arg ...string) *ctx.Message {
m.Option("temp_expire", -1)
m.Option("format", "object")
m.Cmdy("web.get", "feishu", arg, "temp", "data")
return m
}
func post... |
package azfile
import (
"context"
"encoding/xml"
"errors"
"net/http"
"strings"
"time"
)
// FileHTTPHeaders contains read/writeable file properties.
type FileHTTPHeaders struct {
ContentType string
ContentMD5 []byte
ContentEncoding string
ContentLanguage string
ContentDisposition string... |
// Copyright (c) 2020-2021 Blockwatch Data Inc.
// Author: <EMAIL>
package server
import (
"encoding/json"
"fmt"
"strconv"
"time"
"blockwatch.cc/packdb/pack"
"blockwatch.cc/packdb/util"
"blockwatch.cc/tzgo/tezos"
"blockwatch.cc/tzindex/etl/model"
)
var (
// all series field names as list
supplySeriesNames... |
// Copyright (c) 2019 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 applicable law o... |
package log
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"path"
"path/filepath"
"runtime"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"unsafe"
"git.xiaojukeji.com/soda-framework/go-log/internal/lumberjack"
)
const (
defaultLoggerTimeFormat = "2006-01-02T15:04:05.000-0700"
... |
/*
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 lua
import (
"bufio"
"errors"
"fmt"
"os"
"path/filepath"
"strings"
"sync"
"github.com/yuin/gopher-lua/parse"
"github.com/kardianos/osext"
"github.com/raggaer/castro/app/util"
glua "github.com/yuin/gopher-lua"
)
// luaStatePool struct used for lua state pooling
type luaStatePool struct {
m sy... |
/*
* vsh2_boss_creator.go
*
* Copyright 2020 Nirari Technologies.
*
* 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, cop... |
/*
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 main
import (
"bufio"
"bytes"
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"sort"
"strings"
"github.com/eidolon/wordwrap"
"github.com/houseabsolute/omegasort/internal/sorters"
"golang.org/x/term"
"golang.org/x/text/language"
kingpin "gopkg.in/alecthomas/kingpin.v2"
)
var version = "0.0.5"
type omegaso... |
/*
Command golf provides some Go one-liner fun.
Invoke it with a snippet of Go code in the -e flag, which will be compiled
and run for you.
Additional flags such as -n turn on awk/perl-like line mode, which are useful
in processing text data. See the examples and flags sections below.
Some variables and functions ar... |
package main
// Transform Rancher catalog into normalized v2 format.
import (
"errors"
"flag"
"fmt"
"io/ioutil"
"os"
"os/exec"
"strings"
log "github.com/Sirupsen/logrus"
"gopkg.in/yaml.v2"
)
type RancherCatalog struct {
Endpoint string
Branch string
CloneDir string
Templates []*RancherTemplate
Lo... |
// Package lcd models all functionality related to the Game Boy's video output
package lcd
import (
"image"
"image/color"
"image/draw"
"../cpu"
"../io"
"../mmu"
"../timer"
"github.com/hajimehoshi/ebiten"
)
// GBLCD represents the state of the LCD
// mode: which mode the GB is in - VBlank, HBlank, OAM read, V... |
package cmd
import (
"fmt"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"github.com/go-flutter-desktop/hover/internal/enginecache"
"github.com/hashicorp/go-version"
"github.com/otiai10/copy"
"github.com/spf13/cobra"
"github.com/go-flutter-desktop/hover/cmd/packaging"
"github.com/go-flutter-desktop... |
// Copyright 2018 Microsoft. All rights reserved.
// MIT License
package npm
import (
"fmt"
"reflect"
"time"
"github.com/Azure/azure-container-networking/log"
"github.com/Azure/azure-container-networking/npm/ipsm"
"github.com/Azure/azure-container-networking/npm/iptm"
"github.com/Azure/azure-container-networki... |
package index
import (
"fmt"
"github.com/jtejido/golucene/core/analysis"
. "github.com/jtejido/golucene/core/codec/spi"
. "github.com/jtejido/golucene/core/index/model"
"github.com/jtejido/golucene/core/store"
"github.com/jtejido/golucene/core/util"
"log"
"sync/atomic"
)
// index/DocumentsWriterPerThread.java... |
package handlers
import (
"bufio"
"context"
"encoding/json"
"errors"
"fmt"
"math/big"
"math/rand"
"os"
"regexp"
"time"
"github.com/tendermint/tendermint/light/provider"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/common"
tibceth "github.com/bianjieai/tibc-sdk-go/... |
/*
* ECAL
*
* Copyright 2020 <NAME>. All rights reserved.
*
* This Source Code Form is subject to the terms of the MIT
* License, If a copy of the MIT License was not distributed with this
* file, You can obtain one at https://opensource.org/licenses/MIT.
*/
package parser
import (
"bufio"
"bytes"
"fmt"
"... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.3
// source: v8platform/serialize/v1/locks.proto
package serializev1
import (
_ "github.com/v8platform/protoc-gen-go-ras/plugin/ras/encoding"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"... |
package main
import (
"fmt"
"go/build"
"image"
"image/draw"
_ "image/png"
"log"
"os"
"runtime"
"strings"
"github.com/go-gl/gl/v4.1-core/gl"
"github.com/go-gl/glfw/v3.3/glfw"
"github.com/go-gl/mathgl/mgl32"
)
const (
windowWidth = 800
windowHeight = 600
vertexShader = `
#version 330
uniform mat4 ... |
// Code generated from ECL.g4 by ANTLR 4.7.2. DO NOT EDIT.
package ecl // ECL
import "github.com/antlr/antlr4/runtime/Go/antlr"
// BaseECLListener is a complete listener for a parse tree produced by ECLParser.
type BaseECLListener struct{}
var _ ECLListener = &BaseECLListener{}
// VisitTerminal is called when a ter... |
package main
import (
"bufio"
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"net/http"
"github.com/tidwall/sjson"
"github.com/go-pg/pg"
"github.com/go-pg/pg/orm"
)
// export api
// curl -u 93e43f5663a58bc385048a27c4e90c30:0c2b7453dec44b1b0c628d... |
// Package db implements bridge to persistent storage represented by Mongo database.
package db
import (
"context"
"fantom-api-graphql/internal/types"
"fmt"
"github.com/ethereum/go-ethereum/common"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"... |
package main
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"log"
"os"
"path/filepath"
"runtime"
"strings"
"github.com/charlievieth/utils/shlex/deque"
"github.com/charlievieth/utils/shlex/token"
)
var debug = log.New(os.Stderr, "shlex: ", log.Lshortfile)
// TODO: use Options to configure Shlex
// ... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: tensorflow/core/protobuf/error_codes.proto
package for_core_protos_go_proto
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fm... |
package registry // import "github.com/docker/docker/registry"
import (
"net"
"net/url"
"regexp"
"strconv"
"strings"
"github.com/docker/distribution/reference"
"github.com/docker/docker/api/types/registry"
"github.com/sirupsen/logrus"
)
// ServiceOptions holds command line options.
type ServiceOptions struct... |
package geo
import (
"bytes"
"encoding/binary"
"encoding/json"
"errors"
"fmt"
"log"
"math"
"regexp"
"strconv"
)
// Represents a Physical Point in geographic notation [lat, lng].
type Point struct {
lat float64
lng float64
}
const (
// According to Wikipedia, the Earth's radius is about 6,371km
EARTHRADI... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/resources/mobile_device_constant.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
enums "google.golang.org/genproto/googleapis/... |
// Copyright (C) 2015-2020 the Gprovision Authors. All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
// SPDX-License-Identifier: BSD-3-Clause
//
package disk
import (
"bytes"
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
fp "path/f... |
package evaluation
import (
"crypto/sha256"
"encoding/binary"
"encoding/json"
"fmt"
"reflect"
"regexp"
"strconv"
"strings"
"time"
"github.com/statsig-io/go-sdk/internal/net"
"github.com/statsig-io/go-sdk/types"
"github.com/statsig-io/ip3country-go/pkg/countrylookup"
"github.com/ua-parser/uap-go/uaparser... |
// Copyright (c) 2014 The btcsuite developers
// Copyright (c) 2015-2021 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package types
// FundRawTransactionResult models the data from the fundrawtransaction command.
type FundRawTransactionResult... |
// Copyright 2020, OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ag... |
// 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, ... |
// This is a client that writes out to a file, and optionally rolls the file
package main
import (
"compress/gzip"
"errors"
"flag"
"fmt"
"io"
"log"
"os"
"os/signal"
"path"
"path/filepath"
"regexp"
"strings"
"sync"
"syscall"
"time"
"github.com/nsqio/go-nsq"
"github.com/xww/rabbitgo/internal/app"
"g... |
/*
Copyright 2017 Google 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 agreedto in writing, software
dist... |
/*
Copyright 2017-2020 by the 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... |
// 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 windows
import (
"sync"
"sync/atomic"
"syscall"
"unsafe"
)
// We need to use LoadLibrary and GetProcAddress from the Go runtime, beca... |
// Package scanner implements a scanner for HCL (HashiCorp Configuration
// Language) source text.
package scanner
import (
"bytes"
"fmt"
"os"
"regexp"
"unicode"
"unicode/utf8"
"github.com/hashicorp/hcl/hcl/token"
)
// eof represents a marker rune for the end of the reader.
const eof = rune(0)
// Scanner def... |
// Copyright 2021 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 fint
import (
"bufio"
"bytes"
"context"
"errors"
"fmt"
"io"
"os"
"path"
"path/filepath"
"regexp"
"strings"
"time"
"unicode"
"go.fuc... |
package beehive
import (
"encoding/gob"
"errors"
"fmt"
"reflect"
"sync"
"github.com/kandoo/beehive/Godeps/_workspace/src/github.com/coreos/etcd/raft/raftpb"
"github.com/kandoo/beehive/Godeps/_workspace/src/github.com/golang/glog"
bhgob "github.com/kandoo/beehive/gob"
"github.com/kandoo/beehive/raft"
)
var (... |
package config
import (
"bytes"
"crypto/sha256"
"errors"
"fmt"
"io"
"os"
"path/filepath"
"reflect"
"strings"
"text/template"
"github.com/sirupsen/logrus"
"github.com/updatecli/updatecli/pkg/core/pipeline/condition"
"github.com/updatecli/updatecli/pkg/core/pipeline/pullrequest"
"github.com/updatecli/upd... |
// Copyright 2018 The gVisor 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 cmd
import (
"errors"
"fmt"
"io"
"strings"
"github.com/golang/glog"
"github.com/spf13/cobra"
kapi "k8s.io/kubernetes/pkg/api"
kerrors "k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/unversioned"
kclient "k8s.io/kubernetes/pkg/client/unversioned"
kcmdutil "k8s.io/kubernetes/pkg/kubect... |
package main
import (
"bytes"
"encoding/json"
"errors"
"flag"
"fmt"
"io"
"log"
"net"
"net/http"
"os"
"strings"
"sync"
"time"
"github.com/drycc/drycc/discoverd/client"
dd "github.com/drycc/drycc/discoverd/deployment"
"github.com/drycc/drycc/discoverd/server"
dt "github.com/drycc/drycc/discoverd/types"... |
// 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/service/load_stats/v3alpha/lrs.proto
package envoy_service_load_stats_v3alpha
import (
context "context"
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
v3alpha "github.com/envoyproxy/go-control-plane/envoy/config/core/v3alpha"
v3alpha1 "gi... |
// +build linux
// +build cgo
package main
import (
"fmt"
"io"
"io/ioutil"
"net"
"os"
"path"
"path/filepath"
"strconv"
"strings"
"unsafe"
"golang.org/x/sys/unix"
"github.com/lxc/lxd/lxd/types"
"github.com/lxc/lxd/lxd/util"
"github.com/lxc/lxd/shared"
"github.com/lxc/lxd/shared/logger"
"github.com/lx... |
// +build solaris,cgo
package daemon
import (
"fmt"
"net"
"strconv"
"github.com/docker/docker/api/types"
containertypes "github.com/docker/docker/api/types/container"
"github.com/docker/docker/container"
"github.com/docker/docker/daemon/config"
"github.com/docker/docker/image"
"github.com/docker/docker/pkg/... |
// Copyright (c) 2019 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 applicable law o... |
/*
Copyright 2018 The OpenEBS 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, sof... |
package mockservice
import (
"bytes"
"compress/gzip"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"strings"
"github.com/bettersun/moist"
"github.com/sirupsen/logrus"
)
/// 全局变量:配置
var config *Config
/// 全局变量:目标主机切片
var hostSlice []string
/// 全局变量: 模拟服务信息切片
var mockServiceInfoSlice []MockServi... |
package astcomp
import (
"github.com/arnodel/golua/ast"
"github.com/arnodel/golua/ir"
"github.com/arnodel/golua/ops"
)
//
// Expression compilation
//
type expCompiler struct {
*compiler
dst ir.Register
}
var _ ast.ExpProcessor = (*expCompiler)(nil)
// ProcessBFunctionCallExp compiles a BFunctionCall
func (c ... |
// Stuff related to PostgreSQL stats
package stat
import (
"bytes"
"database/sql"
"fmt"
"github.com/lesovsky/pgcenter/lib/utils"
"github.com/pkg/errors"
"sort"
"strconv"
"strings"
)
const (
DatabaseView = "pg_stat_database"
ReplicationView = "pg_stat_replication"
TablesView = "pg... |
/*
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distributi... |
package values
import (
"strconv"
"strings"
"time"
"unicode/utf8"
"github.com/influxdata/flux/ast"
"github.com/influxdata/flux/codes"
"github.com/influxdata/flux/internal/errors"
"github.com/influxdata/flux/internal/parser"
)
type Time int64
// Duration is a vector representing the duration unit components.... |
// +build mimxrt1062
package machine
import (
"device/nxp"
"runtime/interrupt"
"runtime/volatile"
)
// UART peripheral abstraction layer for the MIMXRT1062
type UART struct {
Bus *nxp.LPUART_Type
Buffer *RingBuffer
Interrupt interrupt.Interrupt
// txBuffer should be allocated globally (such as when... |
// Copyright 2014 The Serviced Authors.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... |
package ovsdb
import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"math"
"os"
"strings"
)
// DatabaseSchema is a database schema according to RFC7047
type DatabaseSchema struct {
Name string `json:"name"`
Version string `json:"version"`
Tables map[string]TableSchema `json:"ta... |
// Copyright 2019 MSolution.IO
//
// 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 goann implments a neural network builder and trainer and two Activations
package goann
import (
"encoding/json"
"fmt"
"math/rand"
"os"
"github.com/Go-ANN/act"
)
type layer struct {
style act.Activation
inout []float64
}
func (l *layer) addNode() {
l.inout = append(l.inout, 0.0)
... |
package gorush
import (
"errors"
"fmt"
"net/http"
"net/url"
"path/filepath"
"time"
"github.com/google/go-gcm"
apns "github.com/sideshow/apns2"
"github.com/sideshow/apns2/certificate"
"github.com/sideshow/apns2/payload"
)
// D provide string array
type D map[string]interface{}
const (
// ApnsPriorityLow w... |
package postgres
import (
"errors"
"fmt"
"reflect"
"strconv"
"strings"
"unicode"
"ariga.io/atlas/schema/schemaspec"
"ariga.io/atlas/sql/internal/specutil"
"ariga.io/atlas/sql/schema"
"ariga.io/atlas/sql/sqlspec"
)
type doc struct {
Tables []*sqlspec.Table `spec:"table"`
Schemas []*sqlspec.Schema `spec:... |
// Copyright 2016, RadiantBlue 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 applicable la... |
// Copyright 2020 ConsenSys Software 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 main
import (
"bytes"
"fmt"
"io"
"os"
"os/exec"
"strings"
"unsafe"
"github.com/ethereum/go-ethereum/common"
"github.com/holiman/uint256"
tc "github.com/smartbch/moeingevm/evmwrap/testcase"
)
/*
#cgo LDFLAGS: -levmwrap -L.
#include "../host_bridge/bridge.h"
int64_t zero_depth_call_wrap(evmc_bytes32... |
package qml
// #include <stdlib.h>
// #include "capi.h"
import "C"
import (
"bytes"
"fmt"
"image/color"
"reflect"
"strings"
"unicode"
"unsafe"
)
var (
intIs64 bool
intDT C.DataType
ptrSize = C.size_t(unsafe.Sizeof(uintptr(0)))
nilPtr = unsafe.Pointer(uintptr(0))
nilCharPtr = (*C.char)(nilPtr)
t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.