text stringlengths 8.57k 38.1k |
|---|
/*
Copyright © 2020 ConsenSys
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
dis... |
package termutil
import (
"bytes"
"context"
"fmt"
"io"
"math"
"os"
"os/exec"
"os/signal"
"strconv"
"strings"
"sync"
"sync/atomic"
"syscall"
"time"
"github.com/grailbio/base/errors"
"github.com/grailbio/base/log"
gunsafe "github.com/grailbio/base/unsafe"
"github.com/grailbio/gql/columnsorter"
"githu... |
/*
*
* Copyright 2018 gRPC 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 main
import (
"fmt"
"math"
"math/cmplx"
"os"
"sort"
"strconv"
)
const (
CheckpointCoreSize = 50
//MaxLoopBeforeBoost = 3
//MaxLoopBeforeShield = 10
PodRadius = 200
CheckpointRadius = 600
)
// ToRadians convert the parameters corresponding to an angle in degrees int an angle in radians.
// r... |
package worldstate
var WorldStateLocations = map[string]string{
"SolNode0": "SolNode0",
"SolNode1": "Galatea (Neptune)",
"SolNode2": "Aphrodite (Venus)",
"SolNode3": "Cordelia (Uranus)",
"SolNode4": "Acheron (Pluto)",
"SolNode5": "Perdita (Uranus)",
"SolNode6": ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/config/overload/v3/overload.proto
package envoy_config_overload_v3
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
any "github.com/gola... |
// 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.proto
/*
Package v2 is a generated protocol buffer package.
It is generated from these files:
envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.proto
It has these top-level messages:
TcpProxy
*/
package ... |
package gdk3
/*
#include <gdk/gdk.h>
#include <stdlib.h>
static void _gdk_threads_init() {
gdk_threads_init();
}
static inline GdkDisplay* to_GdkDisplay(void* obj) { return GDK_DISPLAY(obj); }
static inline GdkDevice* to_GdkDevice(void* obj) { return GDK_DEVICE(obj); }
static inline GdkScreen* to_GdkScreen(void* ob... |
// Copyright 2021 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 ... |
package start
import (
"fmt"
"net"
"net/url"
"path"
"regexp"
"strconv"
"github.com/spf13/pflag"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apiserver/pkg/util/flag"
"k8s.io/kubernetes/pkg/master/ports"
"k8s.io/kubernetes/pkg/regi... |
package utils
import (
"encoding/base64"
"encoding/json"
"errors"
"fmt"
"image"
"io/ioutil"
"os"
"path"
"reflect"
"sync"
"github.com/disintegration/imaging"
"strconv"
"strings"
html1 "html/template"
"github.com/TruthHun/BookStack/conf"
"github.com/TruthHun/BookStack/models/store"
"github.com/Truth... |
// Based on cmd/internal/obj/ppc64/a.out.go.
//
// Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
// Portions Copyright © 1995-1997 <NAME> (<EMAIL>)
// Portions Copyright © 1997-1999 Vita Nuova Limited
// Portions Copyright © 2000-2008 Vita Nuova Holdings Limited (www.vitanuova.com)
// Portions Co... |
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2017 Datadog, Inc.
// This code is not tied to docker itself, hence no docker build flag.
// It coul... |
package executor
import (
"encoding/binary"
"fmt"
"io"
"math"
"os"
"sort"
"time"
"github.com/alpacahq/marketstore/v4/planner"
"github.com/alpacahq/marketstore/v4/utils"
. "github.com/alpacahq/marketstore/v4/utils/io"
"github.com/alpacahq/marketstore/v4/utils/log"
)
const RecordsPerRead = 8192
type Sorted... |
package synth
import (
"sort"
"github.com/oakmound/oak/v4/audio/pcm"
)
// A Pitch is a frequency value which represents how fast a wave should oscillate to produce a specific tone.
type Pitch uint16
// Pitch frequencies, taken from http://peabody.sapp.org/class/st2/lab/notehz/
// These span octave 0 through octav... |
/*
Package cachebusting handles creation of static files that will not be found in browser
caches to prevent serving of old version of a file causing webpage/webapp performance or
execution issues.
Cache busting is done at runtime by calculating a hash of each defined, original file (for
example, script.min.js), creat... |
// 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... |
package gdb
// This is a parsing wrapper for GDB. It is designed for use with this tool,
// but may have independent utility, in which case I'll refactor it out later.
// It implements the simple Debugger() interface required by the crashwalk
// package. Essentially, crashwalk takes care of finding the files, this cod... |
// Package doc extracts source code documentation from a Magpie AST.
package doc
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"magpie/ast"
"net/http"
"os"
"path/filepath"
"regexp"
"sort"
"strconv"
"strings"
"text/template"
"unicode"
)
var (
regexpType = regexp.MustCompile(`^\{(.+)\}$`)... |
package runtimes
import (
"bytes"
"context"
"crypto/sha256"
"encoding/json"
"fmt"
"io"
"os"
"path/filepath"
"strings"
"text/tabwriter"
"time"
"github.com/adrg/xdg"
"github.com/containerd/containerd/platforms"
"github.com/docker/distribution/reference"
"github.com/mitchellh/go-homedir"
"github.com/moby... |
package iptables_parser
import (
"errors"
"fmt"
"io"
"net"
"reflect"
"regexp"
"strconv"
"strings"
vd "github.com/kilo-io/iptables_parser/validate_dns"
)
// Line represents a line in a iptables dump, e.g. generated with iptables-save.
// It is either Comment, Header, Default or Rule.
type Line interface {
S... |
// 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 is the name of view with databases' stats
DatabaseView = "pg_stat_database"
// ReplicationView is th... |
package server
import (
"asapo_authorizer/authorization"
"asapo_authorizer/common"
"asapo_authorizer/ldap_client"
"asapo_authorizer/token_store"
"asapo_common/structs"
"asapo_common/utils"
"github.com/stretchr/testify/assert"
"io/ioutil"
"net/http"
"net/http/httptest"
"os"
"path/filepath"
"strings"
"test... |
package main
import (
"bufio"
"errors"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"runtime"
"strconv"
"strings"
"time"
"unicode"
"github.com/common-nighthawk/go-figure"
)
// global CF element vars
var surname, firstname, sex, dob, comuneCode, mCode, comune, path string
var birthYear, day, maxAgeInYears, minAge... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: import_public/sub/a.proto
package sub
import (
fmt "fmt"
proto "github.com/temporalio/gogo-protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
... |
// -*- coding: utf-8 -*-
// Copyright (C) 2018 Nippon Telegraph and Telephone 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... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: common/v1/common.proto
package v1
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 _ = fmt.Errorf
var _ = math.Inf
// This is a co... |
/* Copyright (c) 2018 Cisco and/or its affiliates.
*
* 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 tsdb
import (
"encoding/binary"
"errors"
"fmt"
"math"
"sort"
"strings"
"github.com/influxdb/influxdb/influxql"
)
// MapperValue is a complex type, which can encapsulate data from both raw and aggregate
// mappers. This currently allows marshalling and network system to remain simpler. For
// aggregate... |
package app
import (
"errors"
"fmt"
"github.com/coschain/contentos-go/common"
"github.com/coschain/contentos-go/common/constants"
"github.com/coschain/contentos-go/iservices"
"github.com/coschain/contentos-go/prototype"
"github.com/gogo/protobuf/proto"
"github.com/sirupsen/logrus"
"sync"
"sync/atomic"
"time... |
// 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.
// This file implements typechecking of call and selector expressions.
package types2
import (
"cmd/compile/internal/syntax"
"strings"
"unicode"
)
// func... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/api/quota.proto
package serviceconfig
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// ... |
package mapper
import (
"fmt"
"regexp"
"sort"
"strconv"
"strings"
v1beta1 "github.com/kubevirt/vm-import-operator/pkg/apis/v2v/v1beta1"
vos "github.com/kubevirt/vm-import-operator/pkg/providers/vmware/os"
"github.com/kubevirt/vm-import-operator/pkg/utils"
"github.com/vmware/govmomi/object"
"github.com/vmwar... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.22.0
// protoc v3.10.1
// source: envoy/config/metrics/v3/metrics_service.proto
package envoy_config_metrics_v3
import (
_ "github.com/cncf/udpa/go/udpa/annotations"
v3 "github.com/envoyproxy/go-control-plane/envoy/config/cor... |
/*
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, softw... |
package main
import (
"bufio"
"bytes"
"context"
"encoding/hex"
"fmt"
"os"
"strings"
"github.com/btcsuite/btcutil"
"github.com/lightninglabs/pool/auctioneer"
"github.com/lightninglabs/pool/order"
"github.com/lightninglabs/pool/poolrpc"
"github.com/lightninglabs/pool/sidecar"
"github.com/lightningnetwork/l... |
// Copyright (c) 2018 Tomochain
//
// This program 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, or
// (at your option) any later version.
//
// This program is dist... |
package apmz
import (
"bytes"
"encoding/json"
"fmt"
"math"
"strconv"
"strings"
"testing"
"time"
)
const testIkey = "<KEY>"
func TestJsonSerializerEvents(t *testing.T) {
mockClock(time.Unix(1511001321, 0))
defer resetClock()
var buffer telemetryBufferItems
buffer.add(
NewTraceTelemetry("testing", Erro... |
package io
import (
"bytes"
"compress/gzip"
"context"
"errors"
"fmt"
"io"
"mime"
"mime/multipart"
"net/http"
"net/textproto"
"strconv"
"strings"
"sync"
"time"
"github.com/gorilla/mux"
"github.com/gorilla/websocket"
"github.com/benthosdev/benthos/v4/internal/bloblang/field"
"github.com/benthosdev/be... |
// Copyright 2016 <NAME> <<EMAIL>>
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package assembler
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"github.com/ev3dev/lmsasm/ast"
"github.com/ev3dev/lmsasm/bytecodes"
"github.com/ev3dev/lmsasm/scanner"
... |
package pge
import (
"bufio"
"fmt"
"io/ioutil"
"log"
"math"
"os"
"strconv"
"strings"
levmar "github.com/verdverm/go-levmar"
config "github.com/verdverm/go-pge/config"
probs "github.com/verdverm/go-pge/problems"
expr "github.com/verdverm/go-symexpr"
)
type pgeConfig struct {
// search params
maxGen ... |
package iso
import (
"errors"
"fmt"
"log"
"os"
"path/filepath"
"strings"
hypervcommon "github.com/hashicorp/packer/builder/hyperv/common"
"github.com/hashicorp/packer/common"
"github.com/hashicorp/packer/common/bootcommand"
powershell "github.com/hashicorp/packer/common/powershell"
"github.com/hashicorp/pa... |
// Copyright 2019 Intel Corporation. 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 app... |
package truetype
import (
"encoding/hex"
"fmt"
"log"
"os"
"reflect"
"strings"
"testing"
"github.com/benoitkugler/textlayout/fonts"
)
func TestVariations(t *testing.T) {
expected := []VarAxis{
{Tag: MustNewTag("wght"), Minimum: 100, Maximum: 900, Default: 100},
{Tag: MustNewTag("slnt"), Minimum: -12, Max... |
package main
import (
"context"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"sort"
"strconv"
"strings"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/arn"
"github.com/aws/aws-sdk-go/aws/endpoints"
"github.com/aws/aws-sdk-go/aws/request"
awssession "github.com/aws/aws-sdk-go/aws/session"... |
// +build !nopkcs11
// Package pkcs11key implements crypto.Signer for PKCS #11 private
// keys. Currently, only RSA keys are supported.
// See ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-30/pkcs-11v2-30b-d6.pdf for
// details of the Cryptoki PKCS#11 API.
package pkcs11key
import (
"crypto"
"crypto/ecdsa"
"crypto... |
// Code generated by protoc-gen-go.
// source: google.golang.org/genproto/googleapis/logging/v2/log_entry.proto
// DO NOT EDIT!
/*
Package v2 is a generated protocol buffer package.
It is generated from these files:
google.golang.org/genproto/googleapis/logging/v2/log_entry.proto
google.golang.org/genproto/googleap... |
// Package cfg implements a configuration database,
// loaded from a json file.
// Filename must be given as command line argument
// or environment variable.
// Access to the config data is made in threadsafe manner.
package cfg
import (
"bytes"
"encoding/json"
"io"
"log"
"path"
"path/filepath"
"strings"
"tim... |
// Copyright 2019-present Facebook Inc. All rights reserved.
// This source code is licensed under the Apache 2.0 license found
// in the LICENSE file in the root directory of this source tree.
package schema
import (
"fmt"
"math"
"sort"
"strconv"
"strings"
"github.com/facebookincubator/ent/dialect/sql"
"gith... |
// Copyright (c) 2018 Cisco and/or its affiliates.
//
// 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 applicabl... |
/*
* This file is subject to the terms and conditions defined in
* file 'LICENSE.md', which is part of this source code package.
*/
package creator
import (
"errors"
"fmt"
"strings"
"unicode"
"github.com/pzduniak/unipdf/common"
"github.com/pzduniak/unipdf/contentstream"
"github.com/pzduniak/unipdf/contents... |
// Package consensus_channel manages a running ledger channel.
package consensus_channel
import (
"bytes"
"fmt"
"math/big"
"sort"
"github.com/ethereum/go-ethereum/common"
"github.com/statechannels/go-nitro/channel/state"
"github.com/statechannels/go-nitro/channel/state/outcome"
"github.com/statechannels/go-ni... |
// Copyright ©2017 The Gonum 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 hdf5
/*
#include "hdf5.h"
#include <stdlib.h>
#include <string.h>
hid_t _H5T_C_S1() { return H5T_C_S1; }
hid_t _H5T_FORTRAN_S1() { return H5... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.19.4
// source: contrib/envoy/extensions/private_key_providers/cryptomb/v3alpha/cryptomb.proto
package v3alpha
import (
_ "github.com/cncf/xds/go/udpa/annotations"
v3 "github.com/envoyproxy/go-control-plane/... |
// 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 sql
import (
"database/sql/driver"
"fmt"
"reflect"
"runtime"
"strings"
"sync"
"testing"
"time"
)
var someTime = time.Unix(123, 0)
var answer i... |
package server
import (
"net"
"strings"
"sync"
"github.com/juju/errors"
"github.com/peer-calls/peer-calls/server/codecs"
"github.com/peer-calls/peer-calls/server/identifiers"
"github.com/peer-calls/peer-calls/server/logger"
"github.com/peer-calls/peer-calls/server/message"
"github.com/peer-calls/peer-calls/s... |
package main
import (
"fmt"
"encoding/json"
"os"
"io/ioutil"
"math"
//"strconv"
//"sort"
"github.com/dhconnelly/rtreego"
"container/heap"
)
// for 2k by 2k tiles
// The unit of interval is in 'hop' - each hop is 2 meters.
var interval_1 int = 37 // 50 meters for control points (25*1.5=37)
var interval_2 ... |
// 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 fidlgen_cpp
import (
"fmt"
"strings"
"go.fuchsia.dev/fuchsia/tools/fidl/lib/fidlgen"
)
//
// Generate code for sending and receiving FIDL mes... |
package al
// #include <stdlib.h>
import "C"
import (
"fmt"
"unsafe"
"golang.org/x/sys/windows"
)
var (
dll *windows.DLL
buffer3f *windows.Proc
buffer3i *windows.Proc
bufferData *windows.Proc
bufferf *windows.Proc
bufferfv *windows... |
package guc
import (
"fmt"
"math/bits"
"runtime"
"strconv"
"sync"
"sync/atomic"
"unsafe"
)
const (
defaultCapacity = 16
defaultContendCellCount = 8
loadFactor = 0.75
maxCapacity = 1 << 30
treeifyThreshold = 8
resizeStampBits = 16
maxResizers = ... |
package consumer
import (
"fmt"
"hash/crc32"
"net"
"runtime/debug"
"sort"
"sync"
"sync/atomic"
"time"
"github.com/couchbase/eventing/common"
"github.com/couchbase/eventing/dcp"
mcd "github.com/couchbase/eventing/dcp/transport"
"github.com/couchbase/eventing/dcp/transport/client"
"github.com/couchbase/eve... |
// 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 uweb
import (
"bytes"
"encoding/json"
"fmt"
"html"
"io"
go_log "log"
"net"
"net/http"
"net/http/fcgi"
"net/url"
"reflect"
"regexp"
go_debug "runti... |
package main
import (
"bytes"
"flag"
"fmt"
"net/http"
"os"
"os/exec"
"path/filepath"
//"strconv"
"strings"
"sync"
"time"
log "github.com/sirupsen/logrus"
fsnotify "github.com/fsnotify/fsnotify"
uj "github.com/nanoscopic/ujsonin/mod"
)
type DevEvent struct {
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/datacatalog/v1beta1/table_spec.proto
package datacatalog
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imports to suppress errors if they ar... |
package main
/*
DHT uptime=55201.76s active=21010 total_peers_found=27123493
Current Hosts cons=5196 streams=13378 peerstore=45215
Total Connections out=167291 (20725 fails) (26935482 dupes) in=1464232
Total Writes ping=1370331 find_node=4863266
Active writers=274 readers=285
Reads put=1440 get=334 addprov=82496 getpr... |
// Package hashmap implements an on-disk hash map.
package hashmap
import (
"bytes"
"encoding/binary"
"errors"
"hash/fnv"
"github.com/gogo/protobuf/proto"
"github.com/roy2220/fsm"
"github.com/roy2220/plainkv/hashmap/internal/protocol"
)
// HashMap represents a hash map on disk.
type HashMap struct {
fileSto... |
package controller
import (
"context"
"fmt"
"net/http"
"os"
"time"
"github.com/heptiolabs/healthcheck"
"github.com/prometheus/client_golang/prometheus"
"go.uber.org/zap"
apiv1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimach... |
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License ... |
package main
import (
crypto_rand "crypto/rand"
"encoding/binary"
"fmt"
"github.com/docopt/docopt-go"
"github.com/faiface/pixel"
"github.com/faiface/pixel/imdraw"
"github.com/faiface/pixel/pixelgl"
"github.com/faiface/pixel/text"
"github.com/seifertd/go/vector"
"github.com/seifertd/nbody-go/body"
"golang.or... |
// Copyright (c) 2018-present, MultiVAC Foundation.
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
// Copyright (c) 2013-2017 The btcsuite developers
// Copyright (c) 2015-2017 The Decred developers
package connection
import (
"fmt"
"ne... |
package tsdb
import (
"bytes"
"encoding/binary"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"sync"
"time"
"github.com/influxdata/influxdb/models"
"github.com/influxdata/influxdb/pkg/rhh"
"go.uber.org/zap"
)
// SeriesIDSize is the size in bytes of a series key ID.
const SeriesIDSize = 8
// DefaultSeriesFileCom... |
package server
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"strconv"
"strings"
"time"
"github.com/Robihamanto/csie-bot/model"
"github.com/Robihamanto/csie-bot/service/praytime"
"github.com/Robihamanto/csie-bot/utils/csv"
"github.com/beevik/ntp"
"github.com/go-vgo/robotgo"
"github.com/tidwall/gjson"
)
//... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: errcode.proto
package errcode
import (
fmt "fmt"
math "math"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Err... |
// Copyright 2017 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... |
package lnwallet
import (
"net"
"sync"
"github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/lnwallet/cha... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/errors/setting_error.proto
package errors
import (
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imports to suppress errors if they are no... |
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.
package commands
import (
"bytes"
"context"
"encoding/json"
"errors"... |
/*
Copyright 2012 The Perkeep 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 node
import (
"encoding/json"
"errors"
"fmt"
"math/rand"
"sync"
"sync/atomic"
"time"
"github.com/youzan/ZanRedisDB/common"
"github.com/youzan/ZanRedisDB/metric"
"github.com/youzan/ZanRedisDB/pkg/wait"
"github.com/youzan/ZanRedisDB/raft/raftpb"
"github.com/youzan/ZanRedisDB/syncerpb"
)
var enableT... |
package oned
// Decodes Code 128 barcodes.
import (
"github.com/makiuchi-d/gozxing"
)
var code128CODE_PATTERNS = [][]int{
{2, 1, 2, 2, 2, 2}, // 0
{2, 2, 2, 1, 2, 2},
{2, 2, 2, 2, 2, 1},
{1, 2, 1, 2, 2, 3},
{1, 2, 1, 3, 2, 2},
{1, 3, 1, 2, 2, 2}, // 5
{1, 2, 2, 2, 1, 3},
{1, 2, 2, 3, 1, 2},
{1, 3, 2, 2, 1,... |
// Copyright 2020 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... |
// Copyright (c) 2018-2019, The Decred developers
// Copyright (c) 2017, The dcrdata developers
// See LICENSE for details.
package pubsub
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"strconv"
"sync"
"time"
"github.com/decred/dcrd/chaincfg/v2"
"github.com/decred/dcrd/dcrutil/v2"
chainjson "github.com... |
// Copyright 2014 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.
//go:build android
// +build android
/*
Android Apps are built with -buildmode=c-shared. They are loaded by a
running Java process.
Before any entry point is ... |
// SPDX-License-Identifier: Unlicense OR MIT
package d3d11
import (
"errors"
"fmt"
"image"
"math"
"reflect"
"unsafe"
"golang.org/x/sys/windows"
"gioui.org/gpu/internal/driver"
"gioui.org/internal/d3d11"
)
type Backend struct {
dev *d3d11.Device
ctx *d3d11.DeviceContext
// Temporary storage to avoid ga... |
// generated by stacks/gong/go/models/orm_file_per_struct_back_repo.go
package orm
import (
"database/sql"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"sort"
"time"
"gorm.io/gorm"
"github.com/tealeg/xlsx/v3"
"github.com/fullstack-lang/gongsvg/go/models"
)
// dummy variable to... |
package generator
import (
"encoding/hex"
"fmt"
"sort"
"strconv"
"strings"
)
var nativeTypes = map[string]string{
"dat8": "[1]byte",
"dat16": "[2]byte",
"dat24": "[3]byte",
"dat32": "[4]byte",
"dat40": "[5]byte",
"dat48": "[6]byte",
... |
package types
import (
"bytes"
"fmt"
"io"
"math"
"strings"
"sync/atomic"
"github.com/lyraproj/issue/issue"
"github.com/lyraproj/pcore/hash"
"github.com/lyraproj/pcore/px"
"github.com/lyraproj/pcore/utils"
"github.com/lyraproj/semver/semver"
)
const (
KeyNameAuthority = `name_authority`
KeyReferences ... |
package parser
import (
"bytes"
"encoding/binary"
"encoding/hex"
"errors"
"fmt"
"io"
"strings"
)
type Range struct {
// In bytes
Offset, Length int64
IsSparse bool
}
type RangeReaderAt interface {
io.ReaderAt
Ranges() []Range
}
type LimitedReader struct {
RangeReaderAt
N int64
}
func (self Lim... |
/*
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, ... |
// 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... |
package main
import (
"bufio"
"bytes"
"crypto/tls"
"encoding/json"
"errors"
"fmt"
"gopkg.in/resty.v0"
"io/ioutil"
"log"
"os"
"os/exec"
"path/filepath"
"strconv"
"strings"
vmwcommon "github.com/mitchellh/packer/builder/vmware/common"
"github.com/mitchellh/packer/common"
"github.com/mitchellh/packer/he... |
package evmdis
import (
"fmt"
)
type OpCode byte
func (op OpCode) IsPush() bool {
switch op {
case PUSH1, PUSH2, PUSH3, PUSH4, PUSH5, PUSH6, PUSH7, PUSH8, PUSH9, PUSH10, PUSH11, PUSH12, PUSH13, PUSH14, PUSH15, PUSH16, PUSH17, PUSH18, PUSH19, PUSH20, PUSH21, PUSH22, PUSH23, PUSH24, PUSH25, PUSH26, PUSH27, PUSH28, ... |
/*
Package variants implements functionality to annotate mutations relative
to a reference sequence for all records in a multiple sequence alignment
(in fasta format).
*/
package variants
import (
"bufio"
"bytes"
"errors"
"fmt"
"io"
"os"
"sort"
"strconv"
"strings"
"sync"
"github.com/virus-evolution/gofasta... |
package main
/*
#include <stdlib.h>
*/
import "C"
import (
"fmt"
"log"
"strconv"
"os"
"os/signal"
"path/filepath"
"math/rand"
nes "github.com/kazzmir/nes/lib"
"github.com/kazzmir/nes/util"
"github.com/veandco/go-sdl2/sdl"
"github.com/veandco/go-sdl2/ttf"
"encoding/bin... |
package terraform
import (
"fmt"
"os"
"path/filepath"
"runtime/debug"
"sort"
"strings"
"time"
"github.com/gruntwork-io/terragrunt/aws_helper"
tgcli "github.com/gruntwork-io/terragrunt/cli"
"github.com/gruntwork-io/terragrunt/cli/tfsource"
tgconfig "github.com/gruntwork-io/terragrunt/config"
tgconfigstack ... |
/*
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 2021 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 2019 New Relic Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
package processor
import (
"regexp"
"strconv"
"strings"
"sync"
"time"
"github.com/newrelic/infra-integrations-sdk/data/event"
"github.com/newrelic/infra-integrations-sdk/data/metric"
"github.com/newrelic... |
/*
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, sof... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.