text stringlengths 5.51k 28.1k |
|---|
/*
Copyright 2018 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 2018 The Hugo 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 by applicable ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: go.chromium.org/luci/logdog/api/endpoints/coordinator/logs/v1/state.proto
package logdog
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
math "math"
)
// Reference imports to suppress e... |
package main
// TODO: seperate resolver RPC into a standalone package
// TODO: properly handle the time locks - Important!!!!
import (
"fmt"
"log"
"net"
"sync"
"encoding/hex"
"crypto/rand"
"golang.org/x/net/context"
"google.golang.org/grpc"
pb "github.com/ExchangeUnion/lnd/lnrpc"
pbp2p "github.com/Exchange... |
/*
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-2019 CERN
//
// 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... |
/*
Copyright 2020 Elotl 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
distr... |
package repv2
import (
"fmt"
"io/ioutil"
"os"
"strconv"
)
// This package is not thread-safe.
type Reputation interface {
// Donate to post @p p wit @p s coins.
// Note that if migrate is required, it must be done before donate.
DonateAt(u Uid, p Pid, s LinoCoin) IF
// user's freescore += @p r, NOTE: unit i... |
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Go2asm converts the Go compiler's -S output to equivalent assembler source files.
//
// Usage:
//
// go2asm [-s symregexp] [file]
//
// Go2asm reads the comp... |
// Copyright 2016 tsuru 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 swarm
import (
"crypto/tls"
"fmt"
"io"
"net"
"net/http"
"strconv"
"strings"
"time"
"github.com/docker/docker/api/types/container"
"github.com... |
// Copyright 2016-2018, Pulumi Corporation.
//
// 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... |
/*
* Copyright 2021 chenquan
*
* 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 IBM Corp. All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//
package bft
import (
"sync"
"sync/atomic"
"github.com/SmartBFT-Go/consensus/pkg/api"
"github.com/SmartBFT-Go/consensus/pkg/types"
protos "github.com/SmartBFT-Go/consensus/smartbftprotos"
"github.com/golang/protobuf/proto"
... |
package docparse
import (
"fmt"
"go/ast"
"go/build"
"go/parser"
"go/token"
"io"
"path"
"path/filepath"
"reflect"
"sort"
"strings"
"github.com/teamwork/utils/goutil"
)
// FindComments finds all comments in the given paths or packages.
func FindComments(w io.Writer, prog *Program) error {
pkgPaths, err :=... |
// Code generated by goyacc -o calc.y.go -p calc calc.y. DO NOT EDIT.
//line calc.y:8
package main
import __yyfmt__ "fmt"
//line calc.y:8
import (
"fmt"
)
var idValueMap = map[string]int{}
//line calc.y:17
type calcSymType struct {
yys int
value int
id string
}
const NUMBER = 57346
const ID = 57347
cons... |
package mesh
import (
"log"
"math"
"alvin.com/GoCarver/geom"
"alvin.com/GoCarver/hmap"
)
// gridRow: Rows of vertices form a grid; each square in that grid form 2 triangles.
// row i+1: +---+---+---+-- -
// | /| /| /|
// | / | / | / |
// |/ |/ |/ |
// row i: +---+---+---+-- -
/... |
package main
import (
"bytes"
"encoding/binary"
"flag"
"fmt"
"log"
"net"
"os"
"os/signal"
"runtime/pprof"
"sync"
"sync/atomic"
"time"
_ "unsafe"
"gopkg.in/yaml.v2"
)
type Config struct {
IDs map[int]string `yaml:"ids"`
Heap map[int]struct {
Left int `yaml:"left"`
Right int `yaml:"right"`
} `ya... |
/*
Copyright 2018 Oracle and/or its affiliates. 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 la... |
// Code generated by entc, DO NOT EDIT.
package runtime
import (
"time"
"github.com/lalifeier/vvgo-mall/app/shop/admin/internal/data/ent/api"
"github.com/lalifeier/vvgo-mall/app/shop/admin/internal/data/ent/dictdata"
"github.com/lalifeier/vvgo-mall/app/shop/admin/internal/data/ent/dicttype"
"github.com/lalifeie... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.13.0
// source: sit.proto
package types
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoim... |
/*Package apirest gestiona las rutas y comportamientos de aplicaciones que exponen
funcionalidad APIREST.*/
package apirest
import (
"context"
"fmt"
"net/http"
"os"
"strconv"
"strings"
)
// cors almacena los nombres de los campos de la cabecera CORS.
var cors = struct {
AccessControlAllowOrigin ... |
package duitx
// Original code from github.com/mjl-/duit
//
// 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 limi... |
package rtc
import (
"context"
"errors"
"sort"
"sync"
"sync/atomic"
"time"
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/logger"
"github.com/livekit/protocol/utils"
"github.com/pion/rtcp"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v3/pkg/rtcerr"
"github.com/livekit/livekit-... |
package goalstateprocessor
import (
"bytes"
"context"
"fmt"
cp "github.com/Azure/azure-container-networking/npm/pkg/controlplane"
"github.com/Azure/azure-container-networking/npm/pkg/dataplane"
"github.com/Azure/azure-container-networking/npm/pkg/dataplane/ipsets"
"github.com/Azure/azure-container-networking/n... |
// 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 main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"github.com/pkg/errors"
"io"
"io/ioutil"
"k8s.io/gengo/parser"
"k8s.io/gengo/types"
"k8s.io/klog"
"net/http"
"os"
"path/filepath"
"regexp"
"sort"
"strings"
"text/template"
"time"
)
var (
flConfig = flag.String("config", "", "path to co... |
// Package web is a lightweight web framework for Go. It's ideal for
// writing simple, performant backend web services.
package web
import (
"bytes"
"crypto/hmac"
"crypto/sha1"
"crypto/tls"
"encoding/base64"
"errors"
"fmt"
"io/ioutil"
"mime"
"misc/iptable"
"net/http"
"os"
"path"
"reflect"
"regexp"
"s... |
package main
import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"math/rand"
"os"
"path/filepath"
"time"
"github.com/Ryan1729/broughlike-tutorial-ports/go/assets"
"github.com/Ryan1729/broughlike-tutorial-ports/go/game"
"github.com/veandco/go-sdl2/img"
"github.com/veandco/go-sdl2/mix"
"github.com/veandco/go... |
package main
import (
"bytes"
"fmt"
"io"
"path/filepath"
"strings"
"reflect"
"strconv"
"github.com/golang/glog"
"github.com/golang/protobuf/proto"
desc "github.com/golang/protobuf/protoc-gen-go/descriptor"
plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
"github.com/grpc-ecosystem/grpc-gateway/pr... |
package controller
import (
"context"
"fmt"
"net/url"
"strconv"
"github.com/fabric8-services/fabric8-auth/app"
"github.com/fabric8-services/fabric8-auth/application"
"github.com/fabric8-services/fabric8-auth/authentication/provider"
"github.com/fabric8-services/fabric8-auth/authorization/token"
"github.com/f... |
// This program scrapes the cloudformation documentation to determine the schema
// and produces a go program to the file specified by the `-out` flag.
package main
import (
"encoding/json"
"flag"
"fmt"
"io"
"log"
"net/http"
"os"
"os/exec"
"path"
"regexp"
"strings"
"github.com/PuerkitoBio/goquery"
"githu... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: bios_service.proto
package firmware
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.... |
package tfc
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io"
"math/rand"
"net/http"
"net/url"
"reflect"
"regexp"
"strconv"
"strings"
"time"
"github.com/google/go-querystring/query"
"github.com/hashicorp/go-retryablehttp"
tfe "github.com/hashicorp/go-tfe"
"github.com/svanharmelen/jsonapi"
"golan... |
// Copyright 2021 The searKing Author. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import (
"fmt"
"io"
"os"
"regexp"
"sort"
"strings"
"sync"
"time"
errors_ "github.com/searKing/golang/go/errors"
filepath_ "github.co... |
/*
Copyright 2015 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, ... |
package app
import (
"context"
"fmt"
"log"
"sort"
"strings"
"sync"
"time"
"github.com/byxorna/nycmesh-tool/generated/go/uisp/client/outages"
"github.com/byxorna/nycmesh-tool/generated/go/uisp/models"
)
type OutageUISP models.Outage
// Outage is a single UISP Outage, which impacts a single Device/Site pair
... |
package repository
// This was all copied from https://github.com/golang/gddo/blob/master/gosrc/data.go
const (
goRepoPath = 1
packagePath = 2
)
var pathFlags = map[string]int{
"C": 2,
"archive": 1,
"archive/t... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.15.2
// source: service/notification_service.proto
package service
import (
domain "github.com/kyawmyintthein/rzcfg/protopb/domain"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "... |
package iso4217
const (
defaultCode = "UNKNOWN"
defaultName = "Unknown"
)
const (
defaultCurrency Currency = iota
AED
AFN
ALL
AMD
ANG
AOA
ARS
AUD
AWG
AZN
BAM
BBD
BDT
BGN
BHD
BIF
BMD
BND
BOB
BRL
BSD
BTN
BWP
BYN
BZD
CAD
CDF
CHF
CLP
CNY
COP
CRC
CUC
CUP
CVE
CZK
DJF
DKK
DOP
DZD
... |
package tools
import (
"bytes"
"encoding/json"
"fmt"
"net/url"
"path/filepath"
"regexp"
"sort"
"strings"
"time"
"unicode/utf8"
"github.com/andrewarchi/browser/jsonutil"
"golang.org/x/sys/execabs"
)
type Project struct {
ID string `json:"id,omitempty"`
Name string `json:"name"`
Desc... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: pkg/api/events/events.proto
/*
Package events is a generated protocol buffer package.
It is generated from these files:
pkg/api/events/events.proto
It has these top-level messages:
WorkflowCreated
WorkflowDeleted
WorkflowParsed
WorkflowParsingFailed
I... |
// Code generated by protoc-gen-go.
// source: comment.proto
// DO NOT EDIT!
package proto
import proto1 "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto1.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type Comm... |
/*
* Copyright 2017 Workiva
* 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: tensorflow/core/lib/core/error_codes.proto
/*
Package core is a generated protocol buffer package.
It is generated from these files:
tensorflow/core/lib/core/error_codes.proto
It has these top-level messages:
*/
package core
import proto "github.com/golan... |
package oneview
import (
//"errors"
"fmt"
"io/ioutil"
"log"
"os"
"sort"
"strconv"
"strings"
"sync"
"github.com/ghodss/yaml"
)
type SPTemplateCol struct {
Type string `json:"type,omitemty,omitempty"`
Members []SPTemplate `json:"members,omitempty"`
NextPageURI string `json:"nextPag... |
// Copyright 2019 Intel Corporation and Smart-Edge.com, 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
//
//... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: update_version_env_type.proto
package version
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
artifact "github.com/easyopsapis/easyops-api-go/protorepo-models/... |
package extractClasses
import "testing"
func TestExtract(t *testing.T) {
for rule, expected := range testData {
output := Extract(rule)
if len(output) != len(expected) {
t.Errorf("Extract(%q)\nslice length %v != %v\n%q != \n%q", rule, len(output), len(expected), expected, output)
} else {
for i, s := ran... |
package rinzler
import (
"fmt"
"strings"
"bufio"
"os"
"io"
"bytes"
"encoding/binary"
"github.com/json-iterator/go"
"strconv"
"sort"
"time"
"github.com/valyala/gozstd"
"hash/crc32"
_"io/ioutil"
)
const (
BYTE_CHECKSUM = 1
LENGTH_MARKER = 2
RESERVED_BY... |
package bp128
func unpack32_0(in *byte, out uintptr, offset int, seed *byte) {}
func unpack32_1(in *byte, out uintptr, offset int, seed *byte)
func unpack32_2(in *byte, out uintptr, offset int, seed *byte)
func unpack32_3(in *byte, out uintptr, offset int, seed *byte)
func unpack32_4(in *byte, out uintptr, offset int,... |
package ruler
import (
native_ctx "context"
"crypto/md5"
"encoding/json"
"flag"
"fmt"
"net/http"
"net/url"
"strings"
"sync"
"time"
gklog "github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
opentracing "github.com/opentracing/opentracing-go"
"github.com/prometheus/client_golang/prometheus"
con... |
package state
import (
"errors"
"reflect"
"sync"
"github.com/diamondburned/arikawa/v2/gateway"
)
var (
// ErrInvalidHandler gets returned if a handler given to
// EventManager.AddHandler or EventManager.MustAddHandler is not a valid
// handler func, i.e. not following the form of func(*State, e) where e is
/... |
package pango
import (
"math"
"github.com/benoitkugler/textlayout/fribidi"
)
/* Overall, the way we ellipsize is we grow a "gap" out from an original
* gap center position until:
*
* line_width - gap_width + ellipsize_width <= goalWidth
*
* Line: [-------------------------------------------]
* Runs: [----... |
package main
import (
"crypto/rand"
"encoding/base64"
"encoding/binary"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"net"
"net/http"
"os"
"strings"
"time"
"github.com/dgrijalva/jwt-go"
"github.com/dgrijalva/jwt-go/request"
"golang.org/x/crypto/ssh"
)
type Config struct {
Listen string `js... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: configuration.proto
package hlmirbft
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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.15.2
// source: postfinance/discovery/v1/server.proto
package discoveryv1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
tim... |
package install
import (
"fmt"
"net/http"
"os"
"os/exec"
"sort"
"strings"
"time"
"github.com/docker/docker/pkg/reexec"
"github.com/rancher/mapper/slice"
"github.com/rancher/rio/cli/pkg/clicontext"
"github.com/rancher/rio/cli/pkg/progress"
"github.com/rancher/rio/cli/pkg/up/questions"
"github.com/rancher/... |
package room
import (
"PZ_GameServer/common/random_name"
"PZ_GameServer/common/util"
"PZ_GameServer/model"
"PZ_GameServer/protocol/pb"
"PZ_GameServer/sdk"
"PZ_GameServer/server/game/room/ningbo"
"PZ_GameServer/server/game/room/pinshi"
"PZ_GameServer/server/game/room/srddz"
"PZ_GameServer/server/game/room/xian... |
package types
import (
"bytes"
"fmt"
"github.com/incognitochain/incognito-chain/privacy/coin"
"math"
"sort"
"github.com/incognitochain/incognito-chain/common"
"github.com/incognitochain/incognito-chain/metadata"
"github.com/incognitochain/incognito-chain/privacy"
"github.com/incognitochain/incognito-chain/tr... |
package loadbot
import (
"bytes"
"errors"
"fmt"
"math"
"math/big"
"net"
"net/url"
"sort"
"strings"
"github.com/0xPolygon/polygon-edge/command/helper"
"github.com/0xPolygon/polygon-edge/command/loadbot/generator"
"github.com/0xPolygon/polygon-edge/helper/common"
"github.com/0xPolygon/polygon-edge/types"
... |
//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... |
package pipeline
import (
"context"
"errors"
"fmt"
"io"
"strconv"
"sync"
"github.com/garryfan2013/goget/config"
"github.com/garryfan2013/goget/controller"
"github.com/garryfan2013/goget/sink"
"github.com/garryfan2013/goget/source"
"github.com/garryfan2013/goget/util"
)
var (
wg sync.WaitGroup
)
// Defau... |
// Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) 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 r... |
package html
import (
"bytes"
"crypto/sha512"
"fmt"
"io"
"strings"
"github.com/abadojack/whatlanggo"
"github.com/zoomio/stopwords"
"golang.org/x/net/html"
"golang.org/x/net/html/atom"
"github.com/zoomio/tagify/config"
"github.com/zoomio/tagify/extension"
"github.com/zoomio/tagify/model"
"github.com/zoom... |
package account
import (
"encoding/json"
"errors"
"log"
"math"
"strconv"
"time"
"github.com/go-redis/redis"
"github.com/junzhli/btcd-address-indexing-worker/btcd"
"github.com/junzhli/btcd-address-indexing-worker/logger"
"github.com/junzhli/btcd-address-indexing-worker/mongo"
rs "github.com/junzhli/btcd-add... |
package main
import (
"bufio"
"bytes"
"database/sql"
"encoding/json"
"errors"
"flag"
"fmt"
ht "html/template"
"io"
"io/ioutil"
"log"
"net/http"
"net/url"
"path/filepath"
"regexp"
"strconv"
"strings"
"time"
"github.com/aohorodnyk/mimeheader"
"github.com/bcmk/siren/lib"
"github.com/bcmk/siren/sitel... |
package gen
import (
"fmt"
"math/rand"
)
// CityStateZipGenerator generates a City state zip line in the form: City, ST 99999
func CityStateZipGenerator() string {
var state = StateNameGenerator()
return fmt.Sprintf("%s, %s %s", CityNameGenerator(), state, ZipcodeGenerator(state))
}
// CityStateZipGenerator2 gen... |
package main
import (
"bufio"
"bytes"
"errors"
"flag"
"fmt"
"io"
"log"
"net"
"os"
"runtime"
"runtime/pprof"
"strings"
"sync"
"time"
"github.com/ojarva/key-value-store-go/storage"
)
var customLogger *log.Logger
func sendLine(c net.Conn, statusCode int, line []byte, writeTimeout *time.Duration) {
c.Se... |
package control_plane
import (
"context"
"fmt"
"net"
"sync"
"sync/atomic"
"time"
"github.com/gogo/protobuf/proto"
"dropbox/dlog"
"dropbox/exclog"
"dropbox/kglb/common"
"dropbox/kglb/utils/discovery"
"dropbox/kglb/utils/dns_resolver"
"dropbox/kglb/utils/fwmark"
"dropbox/kglb/utils/health_manager"
pb "d... |
package gosslyze
import (
"encoding/json"
"errors"
"fmt"
"reflect"
"strings"
"time"
)
// Outermost structures
type HostResult struct {
InvalidTargets []ConnectivityError `json:"server_connectivity_errors"`
Targets []Target `json:"server_scan_results"`
Url string `jso... |
// Package roothash implements the tendermint backed roothash backend.
package roothash
import (
"bytes"
"context"
"math"
"sync"
"github.com/eapache/channels"
"github.com/pkg/errors"
"github.com/tendermint/tendermint/abci/types"
tmrpctypes "github.com/tendermint/tendermint/rpc/core/types"
tmtypes "github.com... |
// Copyright 2018 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... |
// Copyright (c) 2019 The bitcoinpay developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package common
import (
"fmt"
"github.com/btceasypay/bitcoinpay-miner/common/go-flags"
"github.com/btceasypay/bitcoinpay/core/address"
l "github.com/btceasypay/bitcoin... |
package cmd
import (
"fmt"
"io/ioutil"
"strings"
"github.com/k-kinzal/aliases/pkg/aliases/yaml"
"github.com/k-kinzal/aliases/pkg/aliases/context"
"github.com/k-kinzal/aliases/pkg/docker"
"github.com/k-kinzal/aliases/pkg/aliases/script"
"github.com/urfave/cli"
)
// opt is docker run option for aliases run... |
package main
import (
//"context"
"flag"
"fmt"
"log"
//"math/rand"
"os"
"sync"
"time"
//"runtime"
"encoding/json"
"github.com/google/uuid"
api "github.com/synerex/synerex_alpha/api"
napi "github.com/synerex/synerex_alpha/nodeapi"
"github.com/synerex/synerex_alpha/provider/simutil"
"github.com/syner... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: location.proto
package cloud
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
common "github.com/microsoft/moc/rpc/common"
grpc "google.golang.org/grpc"
codes "google.g... |
package txnetwork
import (
"bytes"
model "github.com/abchain/fabric/core/gossip/model"
"github.com/abchain/fabric/core/ledger"
pb "github.com/abchain/fabric/protos"
"testing"
)
func newTransactionPool(ledger *ledger.Ledger) *transactionPool {
ret := new(transactionPool)
ret.cCaches = make(map[string]commitData... |
package lib
import (
"strings"
"github.com/dbsteward/dbsteward/lib/model"
"github.com/dbsteward/dbsteward/lib/output"
"github.com/dbsteward/dbsteward/lib/util"
"github.com/pkg/errors"
)
var GlobalDBX *DBX = NewDBX()
type DBX struct {
defaultSchema *model.Schema
}
func NewDBX() *DBX {
return &DBX{}
}
func (... |
/* {{{ Copyright (c) 2017, <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, ... |
package main
import (
"fmt"
"io"
"log"
"math"
"sort"
"strings"
"github.com/gmlewis/go-fonts/webfont"
"github.com/gmlewis/go3d/float64/vec2"
)
// recorder implements the webfont.Processor interface.
type recorder struct {
lastX, lastY float64
segments [][]*segment
f io.Writer
dedup map[rune]*webfont... |
// Copyright 2018 the u-root Authors. All rights reserved
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package strace traces Linux process events.
//
// An straced process will emit events for syscalls, signals, exits, and new
// children.
package strace
i... |
/*
Copyright 2019 The Vitess 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 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package binlogplayer contains the code that plays a filtered replication
// stream on a client database. It usually runs inside the destination master
// vttabl... |
// mgo - MongoDB driver for Go
//
// Copyright (c) 2010-2012 - <NAME> <<EMAIL>>
//
// 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 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
// Copyright 2020 IBM Corp.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
package chanfunding
import (
"crypto/sha256"
"errors"
"fmt"
"sync"
"github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcutil/psbt"
"github.com/cryptomeow/lnd/input"
"github.com/cryptomeow/lnd/keychain"
)
... |
// Copyright 2017 Pilosa Corp.
//
// 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... |
// Copyright 2014 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... |
package cluster
import (
"context"
"fmt"
"os"
"path/filepath"
"strings"
"time"
g "github.com/onsi/ginkgo"
o "github.com/onsi/gomega"
v1 "k8s.io/api/core/v1"
apierrs "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pk... |
// Copyright 2018 The Grafeas 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 by ap... |
package main
import (
"context"
"fmt"
"io"
"strings"
"time"
"github.com/pkg/errors"
"github.com/spf13/cobra"
helm "helm.sh/helm/v3/pkg/action"
"helm.sh/helm/v3/pkg/chart"
"helm.sh/helm/v3/pkg/chart/loader"
"helm.sh/helm/v3/pkg/strvals"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pk... |
// Copyright 2017 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 2020 The Kubernetes Authors.
SPDX-License-Identifier: Apache-2.0
*/
package deployment
import (
"context"
"fmt"
"os"
"regexp"
"sync"
"time"
api "github.com/intel/pmem-csi/pkg/apis/pmemcsi/v1beta1"
"github.com/intel/pmem-csi/pkg/k8sutil"
"github.com/intel/pmem-csi/pkg/logger"
pmemcontroller "g... |
package godim
import (
"errors"
"fmt"
"log"
"sync"
"time"
)
type EventState int
const (
// ESEmitted the event is being processed
ESEmitted EventState = iota
// ESResolved the event has been successfully processed by the interceptors and the receivers
ESResolved
// ESAborted the event processing is stopped... |
/*
Copyright 2020 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, ... |
package parser
import (
"encoding/binary"
"math"
)
type Comment struct {
Star bool
Inline bool
Lines []CommentLine
}
type CommentLine struct {
Line Line
Text string
}
type TypeCode byte
const (
TypeCodeUnknown TypeCode = 0
TypeCodeBool TypeCode = 1
TypeCodeI8 TypeCode = 2
TypeC... |
package rgo
/*
#define USE_RINTERNALS
#include <Rinternals.h>
void doubleInsert(SEXP s, int index, double v) {
double *rp = REAL(s);
*(rp+index) = v;
}
void intInsert(SEXP s, int index, int v) {
int *ip = INTEGER(s);
*(ip+index) = v;
}
void listInsert(SEXP s, int index, SEXP obj) {
SET_VECTOR_ELT(s, index, obj);
... |
// Copyright 2016 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
package jobs
import (
"database/sql"
"encoding/json"
"fmt"
"strings"
"time"
"github.com/jmoiron/sqlx"
"github.com/pkg/errors"
"github.com/ContainerSolutions/flux"
)
const StatusQueued = "Queued."
// DatabaseStore is a job store backed by a sql.DB.
type DatabaseStore struct {
conn dbProxy
oldest time.Du... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.