text stringlengths 5.51k 28.1k |
|---|
package gbitcoin
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"github.com/niftynei/glightning/jrpc2"
"io/ioutil"
"log"
"math"
"net/http"
"os"
"strconv"
"sync/atomic"
"time"
)
// taken from bitcoind
const defaultClientTimeout int = 900
const defaultRpcHost string = "http://localhost"
const debug bool ... |
// Copyright (c) 2012-present <NAME>, https://menteslibres.net/xiam
//
// 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 us... |
package model
//go:generate ffjson $GOFILE
import (
"fmt"
"sync"
"time"
"github.com/awnumar/memguard"
"github.com/gogo/protobuf/proto"
"github.com/pquerna/ffjson/ffjson"
"github.com/stephane-martin/skewer/model/avro"
"github.com/stephane-martin/skewer/utils"
"github.com/stephane-martin/skewer/utils/sbox"
)
... |
// Copyright 2017-2020 The ShadowEditor Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
//
// For more information, please visit: https://github.com/tengge1/ShadowEditor
// You can also visit: https://gitee.com/tengge1/ShadowEditor
//... |
package helm
import (
"bytes"
"context"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"net/http/httptest"
"os"
"path/filepath"
"sort"
"testing"
"time"
"github.com/mgoltzsche/khelm/v2/pkg/config"
"github.com/stretchr/testify/require"
"helm.sh/helm/v3/pkg/chart"
"helm.sh/helm/v3/pkg/cli"
"helm.sh/helm/v3/pk... |
package serviceI2B2dc
import (
"database/sql"
"time"
"github.com/BurntSushi/toml"
"github.com/JLRgithub/PrivateDCi2b2/lib"
"github.com/JLRgithub/PrivateDCi2b2/protocols"
"github.com/btcsuite/goleveldb/leveldb/errors"
_ "github.com/lib/pq"
"github.com/satori/go.uuid"
"gopkg.in/dedis/crypto.v0/abstract"
"gop... |
// +build linux,amd64
// MIT License
//
// Copyright (c) 2019 <NAME>
//
// 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 ... |
/*
SPDX-License-Identifier: Apache-2.0
Copyright Contributors to the Submariner project.
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 requ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v0/errors/feed_item_error.proto
package errors // import "google.golang.org/genproto/googleapis/ads/googleads/v0/errors"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppres... |
package main
import (
"log"
"time"
"github.com/jmoiron/sqlx"
)
// Seed defines the seed structure
type Seed struct {
DB *sqlx.DB
}
// NewSeed creates a new seed
func NewSeed(db *sqlx.DB) *Seed {
return &Seed{
DB: db,
}
}
// Pollute prepares database with seed data
func (s *Seed) Pollute() {
s.createTables... |
/*
* Copyright (C) 2018-2019 Fusion Foundation Ltd. All rights reserved.
* Copyright (C) 2018-2019 <EMAIL> <EMAIL>
*
* This library is free software; you can redistribute it and/or
* modify it under the Apache License, Version 2.0.
*
* This library is distributed in the hope that it will be useful,
* bu... |
package holepunch
import (
"context"
"errors"
"fmt"
"sync"
"time"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/protocol"
pb "github.com/libp2p/go-libp2p/p2p/protocol/holepunch/pb"
"github.com/lib... |
package resolvers
import (
"context"
"fmt"
"sort"
"time"
"github.com/cockroachdb/errors"
"github.com/hashicorp/go-multierror"
"github.com/opentracing/opentracing-go/log"
"github.com/sourcegraph/sourcegraph/enterprise/internal/codeintel/stores/dbstore"
store "github.com/sourcegraph/sourcegraph/enterprise/int... |
package cmd
import (
"context"
"fmt"
"io"
"mime/multipart"
"net/http"
"net/textproto"
"os"
"path"
"path/filepath"
"strings"
"sync"
"github.com/spf13/cobra"
"github.com/treeverse/lakefs/pkg/api"
"github.com/treeverse/lakefs/pkg/api/helpers"
"github.com/treeverse/lakefs/pkg/uri"
)
const fsStatTemplate =... |
package cmd
import (
"encoding/base64"
"fmt"
"image"
"image/draw"
"image/jpeg"
"image/png"
"io"
"io/ioutil"
"math"
"math/rand"
"os"
"os/exec"
"path"
"path/filepath"
"strconv"
"strings"
"time"
"unicode/utf8"
"github.com/disintegration/imaging"
"github.com/golang/freetype"
"github.com/golang/freety... |
package yudiencore
import (
"container/list"
"fmt"
"strings"
"encoding/json"
"io/ioutil"
)
const (
part_unknown = iota
part_function = iota
part_item = iota
part_string = iota
part_compound = iota
part_list = iota
part_map = iota
part_map_key = iota
)
const (
type_int = iota
... |
package main
import (
"context"
"crypto/tls"
"encoding/json"
"errors"
"fmt"
"os"
"path/filepath"
"strings"
"time"
httpapi "github.com/ipfs/go-ipfs-http-client"
logging "github.com/ipfs/go-log/v2"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/textileio/go-buckets"
"github.com/textileio/g... |
// Copyright 2015 The Mangos Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use 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 testStrategies
import (
"bytes"
"encoding/json"
"encoding/xml"
"fmt"
"io"
"io/ioutil"
"math/rand"
"mime/multipart"
"net/http"
"os"
"regexp"
"strconv"
"strings"
"sync"
"time"
log "github.com/Sirupsen/logrus"
"github.com/jmespath/go-jmespath"
"github.com/xtracdev/automated-perf-test/perfTestUt... |
package main
import (
"bytes"
"crypto/tls"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"net"
"os"
"time"
// debuggin' -- used for runtime profiling/debugging
"net/http"
_ "net/http/pprof"
"github.com/voutilad/bolt-proxy/backend"
"github.com/voutilad/bolt-proxy/bolt"
"github.com/voutilad/bolt-proxy/health"
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: metric.proto
package main
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/proto... |
/*
Copyright (c) 2021 - Present. Blend Labs, Inc. All rights reserved
Use of this source code is governed by a MIT license that can be found in the LICENSE file.
*/
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.12.3
// source: calculator.proto
pac... |
//
// Copyright (c) 2018 Volterra, Inc. All rights reserved.
// Code generated by ves-gen-schema-go. DO NOT EDIT.
//
package site
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"net/http"
"strings"
"github.com/gogo/protobuf/proto"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"google.golang.org/grpc"
"go... |
// Package db implements bridge to persistent storage represented by Mongo database.
package db
import (
"context"
"crypto/sha256"
"fantom-api-graphql/internal/types"
"fmt"
"math/big"
"time"
"github.com/ethereum/go-ethereum/common"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitiv... |
// (c) Copyright 2017-2021 <NAME>
package server
import (
"context"
"fmt"
"strconv"
"strings"
"sync"
"github.com/jumptown-skydiving/manifest-server/pkg/burble"
"github.com/jumptown-skydiving/manifest-server/pkg/core"
"github.com/jumptown-skydiving/manifest-server/pkg/settings"
"google.golang.org/protobuf/p... |
package acrostic
import (
"bufio"
"fmt"
"os"
"reflect"
"strconv"
"strings"
"testing"
log "github.com/sirupsen/logrus"
)
func IntToBoolMat(matint [][]int) [][]bool {
mat := make([][]bool, len(matint))
for i := range matint {
mat[i] = make([]bool, len(matint[i]))
for k := range matint[i] {
if matint[i... |
//
//Copyright [2016] [SnapRoute 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 t... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: yandex/cloud/iam/v1/key.proto
package iam // import "github.com/yandex-cloud/go-genproto/yandex/cloud/iam/v1"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import timestamp "github.com/golang/protobuf/ptypes/timestamp"
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/datacatalog/v1beta1/search.proto
package datacatalog
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Re... |
package badger
import (
"bytes"
"encoding/binary"
)
type DBTimestamp struct {
wall_time int64
logical int32
}
type mvccKey struct {
key []byte
ts DBTimestamp
}
var kZeroTimestamp = DBTimestamp{0, 0}
var kMVCCVersionTimestampSize = 12
var kMaxItersBeforeSeek = 10
func (t *DBTimestamp) compare(oth DBTimestam... |
// Copyright 2022 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... |
package prometheus_test
import (
"fmt"
"log"
"time"
"github.com/takattila/prometheus"
)
func ExampleObject_Histogram() {
p := prometheus.New(prometheus.Init{
Host: "0.0.0.0",
Port: prometheus.GetFreePort(),
Environment: "test",
AppName: "ExampleHistogram",
})
start := time.Now()
/... |
package wanikaniapi
import (
"bytes"
"context"
"crypto/x509"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"math"
"math/rand"
"net/http"
"net/url"
"regexp"
"strconv"
"time"
)
//////////////////////////////////////////////////////////////////////////////
//
//
//
// Exported functions
//
//
//
/////////////////... |
package dungeongen
import (
"errors"
"log"
"math"
"math/rand"
"time"
"github.com/atla/dungeonsrv/pkg/util"
)
// RandomRoomStrategy...
type RandomRoomStrategy struct {
Density RoomDensity
MaxRooms int
UseRandomSeed bool
Seed int
MaxRoomWidth int
... |
package opengl
type debuggingOpenGL struct {
gl OpenGL
onEntry DebuggingEntryFunc
onExit DebuggingExitFunc
onError DebuggingErrorFunc
}
func (debugging *debuggingOpenGL) recordEntry(name string, param ...interface{}) {
debugging.onEntry(name, param...)
}
func (debugging *debuggingOpenGL) recordExit(name strin... |
/*
Copyright 2019 Cloudera, Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... |
package logger
import (
"bytes"
"compress/gzip"
"fmt"
"io"
golog "log"
"log/syslog"
"os"
"reflect"
"runtime"
"strings"
"syscall"
"time"
"github.com/golang/glog"
)
// Parameters parameters for logger setup
type Parameters struct {
RootPath string
FileName string
MaxFile... |
/*
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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: ipstate.proto
package ipstate
import (
context "context"
fmt "fmt"
ipprovider "github.com/cisco-app-networking/nsm-nse/api/ipam/ipprovider"
ipreceiver "github.com/cisco-app-networking/nsm-nse/api/ipam/ipreceiver"
proto "github.com/golang/protobuf/proto"... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: create.proto
package workload
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/gogo/protobuf/types"
_ "github.com/mwitkow/go-proto-validators"
container "github.com/easyopsapis/easyops-api... |
package spec
import (
"encoding/json"
"fmt"
"github.com/imulab/go-scim/pkg/v2/annotation"
"github.com/imulab/go-scim/pkg/v2/spec/internal"
"reflect"
"sort"
"strings"
)
// Attribute models a superset of defined SCIM attributes. It serves as the basic unit that describes data requirement
// this project.
//
// I... |
package storagemarket
import (
"context"
"database/sql"
"errors"
"fmt"
"io"
"os"
"sync"
"time"
"github.com/filecoin-project/boost/api"
"github.com/filecoin-project/boost/build"
"github.com/filecoin-project/boost/db"
"github.com/filecoin-project/boost/db/migrations"
"github.com/filecoin-project/boost/fund... |
package rtmp
import (
"encoding/binary"
"errors"
"github.com/yapingcat/gomedia/codec"
"github.com/yapingcat/gomedia/flv"
)
//example
//1. rtmp 推流服务端
//
//listen, _ := net.Listen("tcp4", "0.0.0.0:1935")
//conn, _ := listen.Accept()
//
// handle := NewRtmpServerHandle()
// handle.OnPublish(func(app, st... |
package tracker
import (
"bytes"
"context"
"encoding/json"
"fmt"
"github.com/chihaya/bencode"
"github.com/leighmacdonald/mika/consts"
"github.com/leighmacdonald/mika/store"
"github.com/stretchr/testify/require"
"net/http"
"net/http/httptest"
"net/url"
"testing"
"time"
)
func performRequest(r http.Handler... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: log.proto
package grpc_logging // import "istio_ecosystem/wasm_extensions/grpc_logging"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import durationpb "google.golang.org/protobuf/types/known/durationpb"
import timestamp... |
// Copyright 2019 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... |
package godnf
import (
"errors"
"sort"
)
var conjSizeTooLargeError error = errors.New("conjunction size too large(max: 255)")
// attribute interface of doc
type DocAttr interface {
ToString() string
ToMap() map[string]interface{}
}
// delete(lazy delete) doc from Handler by id
func (h *Handler) DeleteDoc(docid,... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: segcore.proto
package segcorepb
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
schemapb "github.com/milvus-io/milvus/internal/proto/schemapb"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = prot... |
package generator
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
"strings"
"text/template"
"text/template/parse"
"log"
"github.com/go-openapi/inflect"
"github.com/go-openapi/swag"
"github.com/kr/pretty"
)
var templates *Repository
// FuncMap is a map with default funct... |
/*
Copyright 2020 The Tekton 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, so... |
// 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... |
// Copyright 2015 Sorint.lab
//
// 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 2021 The KubeVela 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, so... |
// Copyright 2016 The G3N 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 geometry implements several primitive geometry generators.
package geometry
import (
"math"
"strconv"
"github.com/Glenn-Gray-Labs/g3n/gls"
"gi... |
package main
import (
"bytes"
"container/list"
"errors"
"flag"
"fmt"
"go/build"
"hash/fnv"
"html/template"
"io"
"io/ioutil"
"os"
"path/filepath"
"runtime/debug"
"strings"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/huner2/gomarkdoc"
"github.com/huner2/gomarkdoc/format"
"github.co... |
// Copyright 2017 Drone.IO 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 github
import (
"context"
"fmt"
"net/http"
"strconv"
"time"
"github.com/jenkins-x/go-scm/scm"
)
type repository struct {
ID int `json:"id"`
... |
/*
* Copyright 2019-2020 by <NAME>
* https://www.fibratus.io
* 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
*... |
/*
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 scheduler
import (
"container/list"
"time"
"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/log"
"github.com/docker/swarmkit/manager/state"
"github.com/docker/swarmkit/manager/state/store"
"github.com/docker/swarmkit/protobuf/ptypes"
"golang.org/x/net/context"
)
type schedulingDecision st... |
// 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 types
import (
"go/ast"
"go/token"
)
func (check *Checker) call(x *operand, ... |
// Code generated by smithy-go-codegen DO NOT EDIT.
package s3
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"git... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.15.1
// source: enum_example/enum_example.proto
package enumpb
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/p... |
// cqlc generates Go code from your Cassandra schema
// so that you can write type safe CQL statements in Go with a natural query syntax.
//
// For a full guide visit http://relops.com/cqlc
//
// var FOO = FooTableDef()
//
// iter, err := ctx.Select(FOO.BAR).
// From(FOO).
// Where... |
/*
Copyright 2020 The node-detacher 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 writin... |
// +build windows
// have to put pdh.go codez into this file to do cross compile from linux.
// don't know way
package pdh
import (
"fmt"
"syscall"
"unsafe"
)
/*
typedef long LONG;
typedef unsigned long DWORD;
typedef struct _PDH_FMT_COUNTERVALUE_DOUBLE
{
DWORD CStatus;
double DoubleValue;
}PDH_FMT_COUNTE... |
// Copyright 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 in wr... |
// Copyright 2009 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 net
import (
"bytes"
"reflect"
"testing"
"os"
"runtime"
)
func isEqual(a, b []byte) bool {
if a == nil && b == nil {
return true
}
if a == n... |
// 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.
// Garbage collector: write barriers.
//
// For the concurrent garbage collector, the Go compiler implements
// updates to pointer-valued fields that may be in ... |
// Copyright 2017 Delos Development Foundation and contributors. Licensed
// under the Apache License, Version 2.0. See the COPYING file at the root
// of this distribution or at http://www.apache.org/licenses/LICENSE-2.0
package types
import (
"bytes"
"errors"
"fmt"
"io"
"strings"
"time"
. "github.com/DelosIs... |
// Copyright 2018 Tigera 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 w... |
package goloba
import (
"context"
"errors"
"fmt"
"os"
"sync"
"sync/atomic"
"time"
"github.com/hnakamur/ltsvlog"
)
// advertisement represents a VRRPv3 advertisement packet. Field names and sizes are per RFC 5798.
type advertisement struct {
VersionType uint8
VRID uint8
Priority uint8
CountI... |
// Copyright 2021 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 will evolve, since we plan to do a mix of stenciling and passing
// around dictionaries.
package noder
import (
"bytes"
"cmd/compile/internal/b... |
package parser
import (
"fmt"
"github.com/end-r/guardian/token"
"github.com/end-r/guardian/ast"
)
// Operator ...
type Operator struct {
rightAssoc bool
prec int
}
// Guardian uses Swift's operator precedence table
var (
//assignmentOperator = Operator{true, 90}
ternaryOperator = Operator{t... |
package main
import (
"context"
"encoding/json"
"errors"
"fmt"
"time"
logging "github.com/ipfs/go-log/v2"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/textileio/go-threads/util"
"github.com/textileio/textile/v2/cmd"
"github.com/textileio/textile/v2/core"
)
const (
daemonName = "hubd"
m... |
package ntapi
/*
#cgo CFLAGS: -I/opt/napatech3/include
#cgo LDFLAGS: -L/opt/napatech3/lib -lntapi -lpthread -lm
#include <stdlib.h>
#include <nt.h>
#include "macro_wrapper.h"
char errorBuffer[128];
*/
import "C"
import (
"unsafe"
"time"
"errors"
"bytes"
)
// Struct to hold NTPL Response data (Basic content)
ty... |
// 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 a... |
package applications_test
import (
"encoding/json"
"net/http"
"net/http/httptest"
"time"
"code.cloudfoundry.org/cli/cf/api/apifakes"
"code.cloudfoundry.org/cli/cf/errors"
"code.cloudfoundry.org/cli/cf/models"
"code.cloudfoundry.org/cli/cf/net"
"code.cloudfoundry.org/cli/cf/terminal/terminalfakes"
testconfig... |
package identity
import (
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"errors"
"fmt"
"io/ioutil"
"math/big"
"net"
"net/http"
"net/url"
"strconv"
"strings"
"time"
"github.com/AthenZ/athenz/clients/go/zts"
"github.com/yahoo/k8s-athenz-identity/pkg/util"
"github.com/AthenZ/k8s-athenz-s... |
// 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 i... |
package server
import (
"crypto/md5"
"encoding/hex"
"encoding/json"
"io/ioutil"
"net/http"
"net/http/httptest"
"path"
"strings"
"testing"
"time"
"github.com/ndlib/bendo/blobcache"
"github.com/ndlib/bendo/fragment"
"github.com/ndlib/bendo/items"
"github.com/ndlib/bendo/store"
"github.com/ndlib/bendo/tra... |
// Copyright 2022 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 2018 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 2017 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
// Package cap1188 controls a Microchip cap1188 device over I²C.
//
// The cap1188 device is a 8 channel capacitive touch sensor with 8 LED d... |
// Copyright 2016 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 main
import (
"flag"
"fmt"
"html/template"
"log"
"os"
"strings"
"time"
"github.com/thrasher-corp/gocryptotrader/common"
)
const (
commonPath = "..%s..%scommon%s"
communicationsPath = "..%s..%scommunications%s"
communicationsBasePath = "..%s..%scommunicati... |
package mesh
import (
"context"
"math/big"
"strconv"
"testing"
"github.com/stretchr/testify/assert"
"github.com/spacemeshos/go-spacemesh/common/types"
"github.com/spacemeshos/go-spacemesh/log"
"github.com/spacemeshos/go-spacemesh/rand"
"github.com/spacemeshos/go-spacemesh/signing"
)
var goldenATXID = types... |
/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright(c) 2022 Wind River Systems, Inc. */
package ptpinstance
import (
"context"
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/starlingx/inventory/v1/ptpinstances"
perrors "github.com/pkg/errors"
starlingxv1 "github.com/wind-river/cloud-... |
package minersc
import (
"0chain.net/core/datastore"
"errors"
"fmt"
"sort"
"0chain.net/chaincore/block"
cstate "0chain.net/chaincore/chain/state"
"0chain.net/chaincore/config"
"0chain.net/chaincore/node"
sci "0chain.net/chaincore/smartcontractinterface"
"0chain.net/chaincore/state"
"0chain.net/chaincore/tr... |
package ogen
import (
"encoding/json"
"github.com/go-faster/errors"
"github.com/go-faster/jx"
)
// Spec is the root document object of the OpenAPI document.
type Spec struct {
// This string MUST be the semantic version number
// of the OpenAPI Specification version that the OpenAPI document uses.
OpenAPI s... |
package fs
import (
"io/ioutil"
"os"
"strings"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestAgeSuffix(t *testing.T) {
for _, test := range []struct {
in string
want float64
err bool
}{
{"0", 0, false},
{"", 0, true},
{"1ms", float64(ti... |
// Copyright 2009 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 typecheck
import (
"fmt"
"sync"
"cmd/compile/internal/base"
"cmd/compile/internal/ir"
"cmd/compile/internal/types"
"cmd/internal/src"
)
var Dec... |
// Copyright 2016 <NAME>, Inc. All rights reserved.
// Licensed under the Apache License, version 2.0:
// http://www.apache.org/licenses/LICENSE-2.0
package datas
import (
"bufio"
"compress/gzip"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"strings"
"sync"
"time"
"github.com/attic-labs/noms/go/chunks"
"g... |
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ssm"
"github.com/aws/copilot-cli/internal/pkg/aws/identity"
"github.com/aws/copilot-cli/internal/pkg/aws/tag... |
// Package cspp implements a DiceMix Light and CoinShuffle++ client.
package cspp
import (
"bytes"
"compress/flate"
"context"
"crypto/rand"
"crypto/subtle"
"encoding"
"encoding/gob"
"errors"
"fmt"
"io"
"math/big"
"math/bits"
"net"
"path/filepath"
"runtime"
"sort"
"time"
"decred.org/cspp/dcnet"
"dec... |
package drainer
import (
"context"
"net/http"
"os"
"path/filepath"
"sync"
"time"
"github.com/olebedev/emitter" // Event bus.
elastic "github.com/olivere/elastic/v7" // Elasticsearch client.
"github.com/pkg/errors" // Wrap errors with stacktrace.
"github.c... |
package kademlia
import (
"errors"
"net"
"time"
"fmt"
"log"
"github.com/vmihailenco/msgpack"
"rpc"
"strconv"
)
const (
TCP = iota
UDP
)
var ConnectionTimeout = time.Second * 5
var ConnectionRetryDelay = time.Second
var ReceiveBufferSize = 1 << 20 // One MB
// Msgpack package ... |
package main
import (
"context"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"math"
"os"
"path"
"strconv"
"time"
"github.com/avast/retry-go"
"github.com/influxdata/influxdb-client-go/v2"
"ecobee_influx_connector/ecobee" // taken from https://github.com/rspier/go-ecobee and lightly customized
)
type ... |
package hids
import (
"strings"
"sync"
"time"
"github.com/0xrawsec/gene/v2/engine"
"github.com/0xrawsec/golang-utils/datastructs"
"github.com/0xrawsec/whids/event"
)
type ConStat struct {
FirstSeen string `json:"first-seen"`
LastSeen string `json:"last-seen"`
Resolved map[string]uint `js... |
// Copyright 2019 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writin... |
package main
import (
"fmt"
"os"
"syscall"
"unsafe"
wayland "github.com/neurlang/wayland/libwayland"
vulkan "github.com/neurlang/wayland/vulkan"
vk "github.com/vulkan-go/vulkan"
"golang.org/x/sys/unix"
)
const WL_PROXY_FLAG_ID_DELETED = 1
const MAX_NUM_IMAGES = 4
type Wland struct {
wait_for_configure boo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.