text stringlengths 5.51k 28.1k |
|---|
package permission
import (
"context"
"fmt"
"io/ioutil"
"log"
"os"
"strings"
"testing"
corev1alpha "github.com/EdgeNet-project/edgenet/pkg/apis/core/v1alpha"
registrationv1alpha "github.com/EdgeNet-project/edgenet/pkg/apis/registration/v1alpha"
"github.com/EdgeNet-project/edgenet/pkg/generated/clientset/ver... |
package main
import (
"time"
"github.com/flynn/flynn/pkg/cluster"
"github.com/flynn/flynn/pkg/postgres"
"github.com/flynn/flynn/pkg/random"
. "github.com/flynn/go-check"
)
type MigrateSuite struct{}
var _ = Suite(&MigrateSuite{})
type testMigrator struct {
c *C
db *postgres.DB
id int
}
func (t *testMigr... |
// Copyright 2015 CoreOS, 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... |
// 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 mysqlctl
import (
"bufio"
// "crypto/md5"
"encoding/hex"
"fmt"
"hash"
// "hash/crc64"
"encoding/json"
"io"
"io/ioutil"
"net/http"
"os"
"path"
... |
package geocodio
import "net/http"
// Geocodio is the base struct
type Geocodio struct {
APIKey string
client *http.Client
}
type Address struct {
Components Components `json:"address_components"`
Formatted string `json:"formatted_address"`
Location Location `json:"location"`
Accuracy float6... |
/*
Sniperkit-Bot
- Status: analyzed
*/
// Copyright 2015-2016, Cyrill @ Sch<EMAIL> and the CoreStore contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apa... |
package main
import (
"encoding/json"
"errors"
"io"
"net"
"os"
"path"
"strings"
"sync"
"sync/atomic"
"syscall"
"unsafe"
)
/*
#cgo linux LDFLAGS: -ldl
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "loadlib.h"
#define LIBCORDIS_PATH_TMP 1
#define LIBCORDIS_PATH_HOME 2
#define LIBCORDI... |
package aws
import (
"context"
"errors"
"fmt"
"testing"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/autoscaling"
astypes "github.com/aws/aws-sdk-go-v2/service/autoscaling/types"
"github.com/aws/aws-sdk-go-v2/service/ec2"
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/... |
package syncer
import (
"github.com/aergoio/aergo/chain"
"github.com/aergoio/aergo/p2p/p2putil"
"runtime/debug"
"github.com/Cofresi/aergo-lib/log"
cfg "github.com/aergoio/aergo/config"
"github.com/aergoio/aergo/pkg/component"
"fmt"
"reflect"
"testing"
"time"
"github.com/aergoio/aergo-actor/actor"
"githu... |
package api
import (
kapi "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
kruntime "k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/util/sets"
)
// Authorization is calculated against
// 1. all deny RoleBinding PolicyRules in the master namespace - short circuit on match
// 2. all allow ... |
// Copyright (c) 2021 Tailscale Inc & 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 hujson contains a parser and packer for the JWCC format:
// JSON With Commas and Comments (or "human JSON").
//
// JWCC is an extension o... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.18.1
// source: google/ads/googleads/v10/enums/mime_type.proto
package enums
import (
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.... |
// Copyright (C) 2021 Gridworkz Co., Ltd.
// KATO, Application Management Platform
// 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 r... |
package atscfg
/*
* 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
* ... |
package cmd
import (
"github.com/cronitorio/cronitor-cli/lib"
"errors"
"fmt"
"os"
"os/user"
"strings"
"github.com/manifoldco/promptui"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
type ExistingMonitors struct {
Monitors []lib.MonitorSummary
Names []string
CurrentKey string
CurrentCode s... |
package editor
import (
"fmt"
"path/filepath"
"strings"
"github.com/akiyosi/goneovim/util"
shortpath "github.com/akiyosi/short_path"
"github.com/neovim/go-client/nvim"
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/gui"
"github.com/therecipe/qt/svg"
"github.com/therecipe/qt/widgets"
)
// Tabline o... |
package style
/*
License
Governed by a 3-Clause BSD license. License file may be found in the root
folder of this module.
Copyright © 2017–2022 <NAME> <<EMAIL>>
*/
import (
"fmt"
"strings"
"github.com/npillmayer/schuko/tracing"
)
// tracer will return a tracer. We are tracing to 'tyse.dom'
func tracer() traci... |
package command
import (
"bytes"
"context"
"fmt"
"io"
"os"
"path/filepath"
"strings"
"time"
"github.com/evergreen-ci/evergreen"
"github.com/evergreen-ci/evergreen/agent/internal"
"github.com/evergreen-ci/evergreen/agent/internal/client"
"github.com/evergreen-ci/evergreen/model"
"github.com/evergreen-ci/e... |
/*
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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/enums/ad_group_type.proto
package enums
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 are not ... |
/*
Copyright 2020 Red Hat Community of Practice.
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 gorse Project 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 ... |
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ld
import (
"bytes"
"cmd/internal/dwarf"
"cmd/internal/objabi"
"cmd/internal/sys"
"cmd/link/internal/loader"
"cmd/link/internal/sym"
"container/... |
/*
Copyright 2016 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... |
/*
Copyright 2019 The Crossplane 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 executor
import (
"fmt"
"io"
"io/fs"
"log"
"os"
"os/exec"
"reflect"
"time"
"github.com/dadosjusbr/executor/status"
"google.golang.org/protobuf/encoding/prototext"
"google.golang.org/protobuf/types/known/timestamppb"
)
const (
noExitError = -2
dirPermission = 0666
)
// Pipeline represents the ... |
// Copyright 2019 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 PingCAP, Inc. Licensed under Apache-2.0.
package backup_test
import (
"context"
"encoding/json"
"math"
"testing"
"time"
"github.com/golang/protobuf/proto"
. "github.com/pingcap/check"
backuppb "github.com/pingcap/kvproto/pkg/brpb"
"github.com/pingcap/kvproto/pkg/encryptionpb"
"github.com/... |
package email
import (
"bufio"
"bytes"
"crypto/rand"
"encoding/base64"
"errors"
"fmt"
"io"
"math"
"math/big"
"mime"
"mime/multipart"
"mime/quotedprintable"
"net/mail"
"net/textproto"
"os"
"path/filepath"
"strings"
"time"
"unicode"
)
const (
MaxLineLength = 76 // Ma... |
package redis
import (
"bufio"
"fmt"
"strings"
"testing"
"time"
"github.com/go-redis/redis"
"github.com/influxdata/telegraf/testutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
type testClient struct {
}
func (t *testClient) BaseTags() map[string]string {
return map[strin... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0-devel
// protoc v3.19.3
// source: github.com/aperturerobotics/bifrost/peer/peer.proto
package peer
import (
reflect "reflect"
sync "sync"
hash "github.com/aperturerobotics/bifrost/hash"
protoreflect "google.golang.or... |
// Package kobo contains stuff related to Kobo devices, firmware, and nickel.
package kobo
import (
"fmt"
"image"
)
// See https://gist.github.com/pgaskin/613b34c23f026f7c39c50ee32f5e167e and
// https://github.com/shermp/Kobo-UNCaGED/issues/16
// Device is a device model.
type Device int
// Hardware is a hardware... |
// Copyright 2019 The Kanister 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 traveler
// Countries returns the country list map which was built from
// https://en.wikipedia.org/wiki/ISO_3166-1 and is based on the CountryAlpha2
// for indexing. It is recommended you go through the Verify() or
// Information() if possible.
func Countries() map[CountryAlpha2]CountryInformation {
return c... |
/*
Copyright 2021 The AtomCI Group 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, s... |
/*
* Copyright NetFoundry, 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
*
* https://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: google/ads/googleads/v1/resources/ad_group_criterion_simulation.proto
package resources
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
common "google.golang.org/genproto/goo... |
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package main
import (
"bufio"
"bytes"
"io"
"os"
"os/exec"
"path/filepath"
"regexp"
"runtime"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"... |
package _go
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"math"
"os"
)
const (
_APK_SIG_BLOCK_MIN_SIZE uint32 = 32
// https://android.googlesource.com/platform/build/+/android-7.1.2_r27/tools/signapk/src/com/android/signapk/ApkSignerV2.java
// APK_SIGNING_BLOCK_MAGIC = {
// 0x41, 0x50, 0x4b, 0x20, 0x53... |
package app
import (
"bytes"
"context"
"flag"
"fmt"
"io"
"net/http"
"sort"
"time"
"github.com/go-kit/log/level"
"github.com/gorilla/mux"
"github.com/grafana/dskit/flagext"
"github.com/grafana/dskit/grpcutil"
"github.com/grafana/dskit/kv/memberlist"
"github.com/grafana/dskit/modules"
"github.com/grafana... |
/*
Copyright 2021.
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 un... |
package openapiv3
import (
"hash/fnv"
"strings"
"testing"
"goa.design/goa/v3/codegen"
"goa.design/goa/v3/expr"
"goa.design/goa/v3/http/codegen/openapi"
"goa.design/goa/v3/http/codegen/openapi/v3/testdata/dsls"
)
// describes a type for comparison in tests.
type typ struct {
Type string
Format string... |
package rethinkdb
import (
"encoding/binary"
"encoding/json"
"fmt"
"gopkg.in/check.v1"
"gopkg.in/rethinkdb/rethinkdb-go.v6/encoding"
"net"
"reflect"
"sync"
"time"
"golang.org/x/net/context"
p "gopkg.in/rethinkdb/rethinkdb-go.v6/ql2"
)
// Mocking is based on the amazing package github.com/stretchr/testify
... |
// Copyright (c) 2018, The GoKi 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 giv
import (
"fmt"
"reflect"
"strconv"
"strings"
"github.com/goki/gi/gi"
"github.com/goki/gi/gist"
"github.com/goki/gi/units"
"github.c... |
package compiler
import (
"go/ast"
"go/token"
"math"
"strconv"
"strings"
"github.com/redneckbeard/thanos/bst"
"github.com/redneckbeard/thanos/parser"
"github.com/redneckbeard/thanos/types"
)
// Expression translation methods _do_ return AST Nodes because of the
// specificity of where they have to be inserte... |
/***
Copyright 2016 Cisco Systems 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 shadow
import (
"unsafe"
"github.com/go-gl/mathgl/mgl32"
"github.com/lakal3/vge/vge/vk"
"github.com/lakal3/vge/vge/vmodel"
"github.com/lakal3/vge/vge/vscene"
)
// AlphaTexture materials have a albedo texture with holes. Holes are marked with alpha < cutoff
// If cutoff is 0, material is opaque event if ... |
/*
* Copyright (c) 2019, 2021 Oracle and/or its affiliates.
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package helper
import (
"fmt"
coh "github.com/oracle/coherence-operator/api/v1"
"github.com/pkg/errors"
"io"
"io/ioutil"
corev1 "k8s.io/api... |
// 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 ... |
package auth
import (
"context"
"encoding/base64"
"encoding/json"
"fmt"
"github.com/commonpool/backend/config"
"github.com/commonpool/backend/model"
"github.com/commonpool/backend/utils"
"github.com/coreos/go-oidc"
echo "github.com/labstack/echo/v4"
"golang.org/x/oauth2"
"io/ioutil"
"net/http"
"net/url"
... |
package middleware
import (
"encoding/json"
"fmt"
"log"
"net"
"net/http"
"os"
"os/exec"
"reflect"
"strconv"
"strings"
"time"
"github.com/digitalbitbox/bitbox-base/middleware/src/handlers"
"github.com/digitalbitbox/bitbox-base/middleware/src/prometheus"
"github.com/digitalbitbox/bitbox-base/middleware/sr... |
// Copyright 2013 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... |
// Copyright (C) 2020 <NAME>. All Rights Reserved.
package twitter_test
import (
"context"
"encoding/json"
"flag"
"io"
"log"
"net/http"
"os"
"strings"
"testing"
"github.com/dnaeon/go-vcr/cassette"
"github.com/dnaeon/go-vcr/recorder"
"github.com/creachadair/jhttp"
"github.com/creachadair/twitter"
"gith... |
package proto
import (
"bytes"
"fmt"
. "github.com/uhoh-itsmaciek/femebe/buf"
. "github.com/uhoh-itsmaciek/femebe/core"
e "github.com/uhoh-itsmaciek/femebe/error"
"io"
"regexp"
"strconv"
)
func InitStartupMessage(m *Message, params map[string]string) {
buf := bytes.NewBuffer(make([]byte, 0, 1024))
// Protoc... |
// Copyright 2014 The ZxxLang 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 surface
import (
"fmt"
"github.com/achun/testing-want"
"go/ast"
"reflect"
"testing"
)
func TestType(t *testing.T) {
wt := want.T(t)
for i,... |
// Copyright 2016 The etcd Authors. All rights reserved.
// Use of this source code is governed by a Apache License(Version 2.0)
// that can be found in the LICENSES/etcd-LICENSE file.
// Copyright 2018 The kingbus Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this fi... |
package rsync
import (
"bytes"
"encoding/base64"
"fmt"
"log"
"os"
"os/exec"
"path"
"regexp"
"strings"
"sync"
"github.com/rinetd/drone-rsync/utils"
)
type (
// Config in Rsync
Config struct {
Hosts []string
Port string
User string
Key string
Password string
Source str... |
package xdvnode
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"path/filepath"
"sync"
config "github.com/ipfs/go-ipfs-config"
libp2p "github.com/ipfs/go-ipfs/core/node/libp2p"
ma "github.com/multiformats/go-multiaddr"
"github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/core/coreapi"
"git... |
// Copyright 2019-2020 Dolthub, 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... |
/*
Copyright (2021) Cobalt Speech and Language 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: sgnb_change_required.proto
package streaming_protobufs
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used... |
package main
import(
"net"
"log"
"github.com/imroc/biu"
"strings"
"strconv"
"os"
"bufio"
"regexp"
"bytes"
"encoding/binary"
"flag"
"time"
)
type dnsHeader struct {
id []byte //标识字段,客户端会解析服务器返回的DNS应答报文,获取ID值与请求报文设置的ID值做比较,如果相同,则认为是同一个DNS会话。
qr int64 //0表示查询报文,1表示响应报文;
opcode int64 //0(标准查询),其他... |
package main
import (
"context"
"flag"
"fmt"
"math/rand"
"net/http"
"os"
"strconv"
"strings"
"time"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/prometheus/client_golang/prometheus/promhttp"
log "github.com/sirupsen/logrus"
"gith... |
package snapshotter
import (
"context"
"fmt"
"time"
kSnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1beta1"
kSnapshotClient "github.com/kubernetes-csi/external-snapshotter/client/v4/clientset/versioned"
"github.com/portworx/sched-ops/k8s/core"
"github.com/sirupse... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: graphqlc/compiler/plugin.proto
package compiler
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
graphqlc "github.com/samlitowitz/graphqlc/pkg/graphqlc"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var... |
// 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.
//
package main // import "github.com/tdewolff/hasher"
import (
"bytes"
"flag"
"fmt"
"go/ast"
"go/format"
"go/parser"
"go/token"
"go/types"
"io/ioutil"... |
package k8s
import (
"context"
"errors"
"fmt"
"sync"
"testing"
"time"
"github.com/go-logr/logr"
"github.com/stretchr/testify/require"
appsv1 "k8s.io/api/apps/v1"
core "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/watch"
k8sfake "k8s.io/client-go/kubernetes/fa... |
// BalancedGo - A research prototype to compute structural decompositions of Conjunctive Queries and CSPs
// via the use of Balanced Separators with a focus on parallelism using the programming language Go.
//
// For more detailed information, see "Fast and Parallel Decomposition of Constraint Satisfaction Problems",
... |
/*
Sniperkit-Bot
- Status: analyzed
*/
// Copyright 2015-present, Cyrill @ <EMAIL>umacher.fm and the CoreStore contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http... |
package models
import (
"encoding/json"
"fmt"
"time"
)
type Event struct {
Id *string `json:"id,omitempty"`
// The categories associated with the item
Categories *[]string `json:"categories,omitempty"`
// Identifies the version of the item. Every time the item is changed, changeKey changes as well. This allows... |
package erouter
/*
基于基数树算法实现一个标准功能的路由器。
*/
import (
"net/http"
"strings"
)
const (
radixNodeKindConst uint8 = 1 << iota
radixNodeKindParam
radixNodeKindWildcard
radixNodeKindAnyMethod
)
type (
// RouterRadix Basic function router based on radix tree implementation.
//
// Features such as zero memory copy, ... |
package chainview
import (
"context"
"fmt"
"sync"
"sync/atomic"
"github.com/decred/dcrd/chaincfg/chainhash"
"github.com/decred/dcrd/gcs/v2"
"github.com/decred/dcrd/wire"
"github.com/decred/dcrlnd/chainscan"
"github.com/decred/dcrlnd/channeldb"
)
type chainscanChainSource interface {
GetBlock(context.Contex... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.1
// source: engine_gcmessages.proto
package protobuf
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "google.golang.org... |
package inline
import (
"fmt"
"strings"
"github.com/npillmayer/cords"
"github.com/npillmayer/cords/styled"
"github.com/npillmayer/tyse/core/parameters"
"github.com/npillmayer/tyse/engine/dom"
"github.com/npillmayer/tyse/engine/dom/style"
"github.com/npillmayer/tyse/engine/dom/style/css"
"github.com/npillmaye... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.13.0
// source: yuanting/yt/v1/vendor.proto
package yt
import (
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
protoreflect "google.golang.org/protobuf/refl... |
package ptp
import (
"encoding/json"
"fmt"
"math"
"sort"
)
const (
maxDecimalsFeedrate = 1
maxDecimalsFanSpeed = 0
maxDecimalsTemperature = 1
maxDecimalsLayerHeight = 4
)
type bufferData struct {
Offset int `json:"offset"`
Size int `json:"size"`
}
type legendHeader struct {
... |
package download
import (
"os"
"github.com/boltdb/bolt"
"fmt"
"context"
"time"
"net/http"
"log"
"regexp"
"io"
"path/filepath"
"net/url"
"strings"
"math"
//"encoding/json"
"github.com/satori/go.uuid"
"github.com/gosuri/uiprogress"
"sync"
"encoding/json"
"github.com/dustin/go-humanize"
"strconv"
)
v... |
package test
import (
"strings"
"testing"
"github.com/helloticket/superfile"
"github.com/helloticket/superfile/file"
"github.com/helloticket/superfile/layout/itau"
"github.com/stretchr/testify/assert"
)
func TestRemessaItauCnab240Pagamento(t *testing.T) {
source := strings.NewReader(itau.CNAB240Pagamentos)
l... |
/*
Copyright 2019 Cisco Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"log"
"os"
"strings"
"text/tabwriter"
"time"
"github.com/nlopes/slack"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/clie... |
package sequence
import (
"bufio"
"fmt"
"github.com/jteutenberg/downpore/util"
"io"
"log"
"math"
"os"
"path/filepath"
"strings"
"sync"
)
type ReadSeekCloser interface {
io.ReadSeeker
io.Closer
}
type SequenceSet interface {
GetSequences() <-chan Sequence
GetNSequencesFrom(int, int) <-chan Sequence //st... |
/*
* Copyright 2022 The Furiko 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 charger
import (
"errors"
"fmt"
"strings"
"time"
"github.com/mark-sch/evcc/api"
"github.com/mark-sch/evcc/util"
"github.com/mark-sch/evcc/util/request"
)
// https://github.com/goecharger/go-eCharger-API-v2/
const goeCloud = "https://api.go-e.co"
var lastLpMode api.ChargeMode = api.ModeOff
// goeClo... |
/*
Copyright 2019 NexClipper.
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
distri... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: unlock_state.proto
package terraform
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
types "github.com/gogo/protobuf/types"
_ "github.com/mwitkow/go-proto-validators"
cmdb "github.com/easyopsapis/easyo... |
package config
import (
"encoding/csv"
"errors"
"fmt"
"net/url"
"regexp"
"strings"
"time"
"github.com/DataDog/datadog-agent/pkg/config"
"github.com/DataDog/datadog-agent/pkg/trace/osutil"
"github.com/DataDog/datadog-agent/pkg/trace/writer/backoff"
writerconfig "github.com/DataDog/datadog-agent/pkg/trace/wr... |
package sm9curve
func lineFunctionAdd(r, P *twistPoint, Q *curvePoint, R2 *gfP2) (a, b, c *gfP2, rOut *twistPoint) {
// See the mixed addition algorithm from "Faster Computation of the
// Tate Pairing", http://arxiv.org/pdf/0904.0854v3.pdf
B := (&gfP2{}).Mul(&P.x, &r.t)
D := (&gfP2{}).Add(&P.y, &r.z)
D.Square(D)... |
package autofile
import (
"bufio"
"errors"
"fmt"
"io"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"sync"
"time"
"github.com/tendermint/tendermint/libs/service"
)
const (
defaultGroupCheckDuration = 5000 * time.Millisecond
defaultHeadSizeLimit = 10 * 1024 * 1024 // 10MB
defaultTotalSiz... |
// SPDX-FileCopyrightText: 2021 SAP SE or an SAP affiliate company and Gardener contributors.
//
// SPDX-License-Identifier: Apache-2.0
package landscaper
import (
"fmt"
"path/filepath"
cdv2 "github.com/gardener/component-spec/bindings-go/apis/v2"
"github.com/gardener/component-spec/bindings-go/codec"
"github.c... |
/*
* This file is part of the KubeVirt 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 required by applicable la... |
// Copyright 2019-2020 Authors of Cilium
// Copyright 2017 Lyft, 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 req... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: tensorflow/core/framework/types.proto
package tensorflow
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 _ = m... |
package orm
import (
"encoding/base64"
"fmt"
"io/ioutil"
"log"
"math/big"
"net/url"
"os"
"path/filepath"
"reflect"
"strconv"
"time"
"nulink/core/assets"
"nulink/core/logger"
"nulink/core/utils"
"github.com/ethereum/go-ethereum/common"
"github.com/gin-gonic/contrib/sessions"
"github.com/gin-gonic/gin... |
// This code is available on the terms of the project LICENSE.md file,
// also available online at https://blueoakcouncil.org/license/1.0.0.
package btc
import (
"encoding/hex"
"errors"
"fmt"
"testing"
dexbtc "decred.org/dcrdex/dex/networks/btc"
"decred.org/dcrdex/server/asset"
"github.com/btcsuite/btcd/chain... |
/*
Copyright 2015 The Kubernetes 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 law or ag... |
// 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 (c) 2014, <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:
//
// * Redistributions of source code must retain the above copyright notice, this
// list of cond... |
package controllers
import (
"encoding/csv"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"reflect"
"sort"
"strconv"
"github.com/libonomy/libonomy-gota/dataframe"
"github.com/libonomy/libonomy-light/engine/dto"
"github.com/libonomy/libonomy-light/engine/models"
"github.com/libonomy/libonomy-li... |
package archiver
import (
"archive/zip"
"bytes"
"compress/flate"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"path"
"path/filepath"
"strings"
"github.com/dsnet/compress/bzip2"
"github.com/klauspost/compress/zstd"
"github.com/ulikunitz/xz"
)
// ZipCompressionMethod Compression type
type ZipCompressionMethod uint1... |
// Copyright © 2019 The Things Network Foundation, The Things Industries B.V.
//
// 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
//
// Un... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.