text stringlengths 5.51k 28.1k |
|---|
package server
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net"
"net/http"
"os"
"os/signal"
"regexp"
"runtime"
"runtime/debug"
"strconv"
"strings"
"syscall"
"time"
auth "github.com/Azure/aad-pod-identity/pkg/auth"
k8s "github.com/Azure/aad-pod-identity/pkg/k8s"
"github.com/Azure/aad-pod-ide... |
//go:build windows || darwin || dev
package main
import (
"bytes"
"context"
"errors"
"flag"
"fmt"
"image/color"
"os"
"os/exec"
"os/signal"
"path/filepath"
"runtime"
"runtime/debug"
"strings"
"syscall"
"time"
"github.com/ncruces/go-strftime"
"github.com/ncruces/zenity"
"github.com/ncruces/zenity/int... |
// Copyright (c) 2019 InfraCloud Technologies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge... |
// Copyright 2019 The Goma Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/*
Binary remoteexec-proxy is a proxy server between Goma client and Remote Execution API.
*/
package main
import (
"context"
"crypto/tls"
"crypto/x509"
... |
package v1
import (
"github.com/RHsyseng/operator-utils/pkg/olm"
oappsv1 "github.com/openshift/api/apps/v1"
buildv1 "github.com/openshift/api/build/v1"
oimagev1 "github.com/openshift/api/image/v1"
routev1 "github.com/openshift/api/route/v1"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
rbacv1 "k8s.io... |
package template
import (
"github.com/Masterminds/sprig"
)
const (
sprigCrypto = "Sprig Cryptographic & Security, http://masterminds.github.io/sprig/crypto.html"
sprigDate = "Sprig Date, http://masterminds.github.io/sprig/date.html"
sprigDict = "Sprig Dictionnary, http://masterminds.gi... |
package ckks
import (
"fmt"
"math"
"math/big"
"math/bits"
"runtime"
"github.com/tuneinsight/lattigo/v3/ring"
"github.com/tuneinsight/lattigo/v3/utils"
)
// Polynomial is a struct storing the coefficients of a polynomial
// that then can be evaluated on the ciphertext
type Polynomial struct {
MaxDeg int
Coef... |
/*
* Tencent is pleased to support the open source community by making Blueking Container Service available.
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except
* in compliance with the License. You may obta... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: protos/udsver_v1/udsver.proto
/*
Package udsver_v1 is a generated protocol buffer package.
It is generated from these files:
protos/udsver_v1/udsver.proto
It has these top-level messages:
Request
Response
*/
package udsver_v1
import (
fmt "fmt"
proto... |
package clitest
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"testing"
"github.com/stretchr/testify/require"
app "github.com/summa-tx/relays/golang"
rtypes "github.com/summa-tx/relays/golang/x/relay/types"
clientkeys "github.com/cosmos/cosmos-sdk/client/keys"
"github.com/cosm... |
package main
import (
"bytes"
"crypto/rand"
"encoding/base64"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"net"
"net/http"
"net/url"
"os"
"regexp"
"strings"
"sync"
"time"
"git.torproject.org/pluggable-transports/snowflake.git/common/safelog"
"github.com/keroserene/go-webrtc"
"golang.org/x/net/websocket"
)
... |
package tool
import (
"bytes"
"fmt"
)
func GenerateCode(pkg string) string {
return generateCode(pkg, parseJniMethodList(headerCode))
}
func generateCode(pkg string, list []*method) string {
buf := bytes.NewBuffer(nil)
fmt.Fprintf(buf, "package %s\n", pkg)
fmt.Fprint(buf, `
//
// #include <jni.h>
// #include ... |
// Copyright 2015 <NAME> and The Caddy 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... |
package entrypoint
import (
"context"
"fmt"
"io/ioutil"
"os"
"path"
"time"
"github.com/datawire/ambassador/v2/pkg/kates"
"github.com/datawire/ambassador/v2/pkg/snapshot/v1"
snapshotTypes "github.com/datawire/ambassador/v2/pkg/snapshot/v1"
"github.com/datawire/dlib/dlog"
)
// The IstioCertSource and IstioCe... |
package safecoin
import (
"log"
"net"
"os"
"runtime"
"strconv"
"sync"
"sync/atomic"
"time"
"github.com/btcsuite/btcd/addrmgr"
"github.com/btcsuite/btcd/peer"
"github.com/btcsuite/btcd/wire"
"github.com/oleksandrblack/dnsseeder/safecoin/network"
"github.com/pkg/errors"
)
var (
ErrRepeatConnection = er... |
package app
import (
"bufio"
"bytes"
"encoding/base64"
"fmt"
"io"
"net"
"net/http"
"net/http/httputil"
"net/url"
"os"
"path/filepath"
"strings"
"sync"
"time"
"github.com/schollz/progressbar/v3"
"github.com/signalsciences/waf-testing-framework/pkg/config"
"github.com/signalsciences/waf-testing-framewo... |
package vm6Util
import (
"fmt"
"strconv"
"testing"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-proj... |
package repository
import (
"context"
"time"
account "github.com/fabric8-services/fabric8-auth/account/repository"
applicationrepo "github.com/fabric8-services/fabric8-auth/application/repository/base"
"github.com/fabric8-services/fabric8-auth/authorization"
resource "github.com/fabric8-services/fabric8-auth/au... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v0/enums/content_label_type.proto
package enums // import "google.golang.org/genproto/googleapis/ads/googleads/v0/enums"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppres... |
package commands
import (
"fmt"
"log"
"os"
"strings"
"github.com/urfave/cli/v2"
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/StackExchange/dnscontrol/v3/pkg/credsfile"
"github.com/StackExchange/dnscontrol/v3/pkg/nameservers"
"github.com/StackExchange/dnscontrol/v3/pkg/normalize"
"github.com/... |
package dns_proxy
import (
"encoding/binary"
"fmt"
"github.com/miekg/dns"
"github.com/pkg/errors"
"github.com/weishi258/redfrog-core/common"
"github.com/weishi258/redfrog-core/config"
"github.com/weishi258/redfrog-core/log"
"github.com/weishi258/redfrog-core/pac"
"github.com/weishi258/redfrog-core/routing"
"... |
/*
* Copyright 2019-2020 VMware, 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... |
// Calculate the value for first moves
// Only does 6 actual first moves:
// 0 1 2 3 4
// 0 . . . _ _
// 1 _ . . _ _
// 2 _ _ . _ _
// 3 _ _ _ _ _
// 4 _ _ _ _ _
//
// <0,0>, <0,1>, <0,2>, <1,1>, <1,2> and <2,2>
// Every other first move is a reflection or rotation of
// the board away from... |
package gcp
import (
"context"
"errors"
"fmt"
"sync"
"testing"
jwt "github.com/dgrijalva/jwt-go"
"github.com/spiffe/go-spiffe/v2/spiffeid"
nodeattestorv1 "github.com/spiffe/spire-plugin-sdk/proto/spire/plugin/server/nodeattestor/v1"
"github.com/spiffe/spire/pkg/common/catalog"
"github.com/spiffe/spire/pkg/c... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.19.4
// source: report.proto
package pb
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grp... |
package dkg
import (
"bytes"
"context"
"fmt"
"strconv"
"strings"
"sync"
"time"
"github.com/dedis/drand/key"
"github.com/dedis/drand/log"
"github.com/dedis/drand/net"
vss_proto "github.com/dedis/drand/protobuf/crypto/share/vss"
dkg_proto "github.com/dedis/drand/protobuf/dkg"
"go.dedis.ch/kyber/v3"
dkg "g... |
package markdown
import (
"asciidoc2md/ast"
"asciidoc2md/token"
"asciidoc2md/utils"
"cdr.dev/slog"
"context"
"fmt"
"io"
"regexp"
"strings"
)
type GetWriterFunc func(*ast.Header) io.Writer
type Converter struct {
strictIndent bool // use 4 spaces as indentation for every nesting level
imageFolder string
c... |
// Copyright 2019 spaGO 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 cfn
import (
mat "github.com/nlpodyssey/spago/pkg/mat32"
"github.com/nlpodyssey/spago/pkg/ml/ag"
"github.com/nlpodyssey/spago/pkg/ml/losses"
"github... |
// Copyright 2018 The gg 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... |
// Copyright (c) 2017-2019 The Elastos Foundation
// Use of this source code is governed by an MIT
// license that can be found in the LICENSE file.
//
/*
This package provides the DPOS routes(network addresses) protocol, it can
collect all DPOS peer addresses from the normal P2P network.
*/
package routes
import (
... |
// Copyright 2020 CUE 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 ... |
// MIT License
//
// Copyright (c) 2020 CADCloud
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, ... |
package ofp
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"github.com/netrack/openflow/internal/encoding"
)
// XMType defines the flow match field types for OpenFlow basic class.
type XMType uint8
func (t XMType) String() string {
text, ok := xmTypeText[t]
if !ok {
return fmt.Sprintf("XMType(%d)", t)
}
return ... |
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package describe
import (
"bytes"
"encoding/json"
"fmt"
"math"
"strings"
"text/tabwriter"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/copilot-cli/internal/pkg/aws/aas"
"github.com/aws/cop... |
package main
import (
"fmt"
"image"
"math"
"math/cmplx"
"os"
"runtime"
"strconv"
"sync"
"github.com/matthewapeters/dali"
)
func drawChunk(start, chunk, height, iterations int, view *ViewPort, wg *sync.WaitGroup, chout chan *Iterant) {
max := start + chunk
imageWidth := view.Image.LowerRight.X - view.Image... |
package livemedia
import (
sys "syscall"
gs "github.com/djwackey/dorsvr/groupsock"
"github.com/djwackey/gitea/log"
)
const (
// RTCP packet types:
RTCP_PT_SR = 200
RTCP_PT_RR = 201
RTCP_PT_SDES = 202
RTCP_PT_BYE = 203
RTCP_PT_APP = 204
// SDES tags:
RTCP_SDES_END = 0
RTCP_SDES_CNAME = 1
RTCP_SD... |
package tx_generic
import (
"bytes"
"encoding/base64"
"encoding/json"
"errors"
"fmt"
"github.com/incognitochain/go-incognito-sdk-v2/coin"
"github.com/incognitochain/go-incognito-sdk-v2/common"
"github.com/incognitochain/go-incognito-sdk-v2/key"
"github.com/incognitochain/go-incognito-sdk-v2/metadata"
"github... |
// Package ais provides core functionality for the AIStore object storage.
/*
* Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
*/
package ais
import (
"sort"
"strings"
"sync"
"time"
"github.com/NVIDIA/aistore/3rdparty/atomic"
"github.com/NVIDIA/aistore/cmn"
"github.com/NVIDIA/aistore/cmn/c... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/type/matcher/v3/regex.proto
package envoy_type_matcher_v3
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/p... |
package soundPlayer
import (
"bytes"
"encoding/binary"
"flag"
"fmt"
"io"
"math/rand"
"os"
"runtime"
"strconv"
"strings"
"text/tabwriter"
"time"
log "github.com/Sirupsen/logrus"
"github.com/bwmarrin/discordgo"
"github.com/dustin/go-humanize"
)
const (
moduleName = "SoundPlayer"
)
var (
// sound enco... |
// Code generated by protoc-gen-go.
// source: github.com/NEU-SNS/ReverseTraceroute/vpservice/pb/vpservice.proto
// DO NOT EDIT!
/*
Package pb is a generated protocol buffer package.
It is generated from these files:
github.com/NEU-SNS/ReverseTraceroute/vpservice/pb/vpservice.proto
It has these top-level messages:
... |
// Copyright 2020 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, ... |
package main
import (
"context"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"os"
"os/signal"
"path/filepath"
"strings"
"sync"
"syscall"
"time"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/google/uuid"
"github.com/gorilla/mux"
"github.com/prometheus/client_golang/prometheus"
"... |
// Copyright (c) 2020-2021 Blockwatch Data Inc.
// Author: <EMAIL>
package server
import (
"encoding/json"
"fmt"
"io"
"net/http"
"strconv"
"strings"
"time"
"blockwatch.cc/packdb/encoding/csv"
"blockwatch.cc/packdb/pack"
"blockwatch.cc/packdb/util"
"blockwatch.cc/tzgo/tezos"
"blockwatch.cc/tzindex/etl/mod... |
// Package guesslanguage provides a simple way to detect language of unicode string.
//
// Source code and project home:
// https://github.com/endeveit/guesslanguage
//
package guesslanguage
import (
"errors"
"github.com/endeveit/guesslanguage/models"
"regexp"
"strings"
"unicode/utf8"
)
var (
regexWords *r... |
package acquire
import (
"bytes"
"context"
"errors"
"fmt"
configTypes "github.com/gleanerio/gleaner/internal/config"
"log"
"strings"
"text/template"
"time"
"github.com/gleanerio/gleaner/internal/common"
"github.com/gleanerio/gleaner/internal/objects"
"github.com/minio/minio-go/v7"
"github.com/spf13/viper... |
package redisenterprise
import (
"fmt"
"log"
"strings"
"time"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"... |
/*
* Copyright (c) 2014 <NAME> | <NAME>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLA... |
package inet
import (
"bytes"
"encoding/binary"
"encoding/hex"
"errors"
"fmt"
"github.com/dcs4y/NetGo/ginterface"
"github.com/dcs4y/NetGo/gnet"
"net"
"strings"
)
type Connection7878 struct {
gnet.Connection
}
// NewConnection 创建连接的方法
func NewConnection(server ginterface.IServer, conn *net.TCPConn) (ginter... |
package appspacestatus
import (
"sync"
"github.com/teleclimber/DropServer/cmd/ds-host/domain"
)
// takes signals from various places
// and determines if an appspace can be used at this moment.
//
// Signals:
// - appspace paused
// - [appspace stopped] (for deletion)// for now deletion begins with pausing
// - ho... |
package openapi
import (
"errors"
"fmt"
"log"
"net/http"
"regexp"
"strings"
"time"
"github.com/dikhan/terraform-provider-openapi/openapi/openapiutils"
"github.com/go-openapi/loads"
"github.com/go-openapi/spec"
)
const extTfResourceRegionsFmt = "x-terraform-resource-regions-%s"
// specV2Analyser defines an... |
package smp
import (
"time"
"github.com/netsys-lab/scion-path-discovery/packets"
lookup "github.com/netsys-lab/scion-path-discovery/pathlookup"
"github.com/netsys-lab/scion-path-discovery/pathselection"
"github.com/netsys-lab/scion-path-discovery/socket"
"github.com/scionproto/scion/go/lib/snet"
log "github.co... |
// Parses files containing network consensuses
package zoossh
import (
"bufio"
"bytes"
"encoding/base64"
"errors"
"fmt"
"io"
"net"
"os"
"regexp"
"strconv"
"strings"
"time"
)
var consensusAnnotations = map[Annotation]bool{
// The file format we currently (try to) support.
Annotation{"network-status-cons... |
package control
import (
"container/ring"
"errors"
"fmt"
"math/rand"
"net"
"strings"
"time"
"github.com/l0k18/pod/pkg/util/quit"
"github.com/VividCortex/ewma"
"go.uber.org/atomic"
"github.com/l0k18/pod/app/conte"
"github.com/l0k18/pod/cmd/kopach/control/hashrate"
"github.com/l0k18/pod/cmd/kopach/con... |
// Copyright 2015-2017 trivago GmbH
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed ... |
package main
import (
"database/sql"
"flag"
"fmt"
"os"
"path/filepath"
"strings"
"sync"
"sync/atomic"
"time"
_ "github.com/ClickHouse/clickhouse-go"
"github.com/colinmarc/hdfs/v2"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"github.com/housepower/ckman/common"
)
// export data of given tim... |
package driver
import (
"context"
"errors"
"fmt"
"net"
"sort"
"strings"
"sync"
"time"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"github.com/zrepl/zrepl/replication/report"
"github.com/zrepl/zrepl/util/chainlock"
"github.com/zrepl/zrepl/util/envconst"
)
type interval struct {
begin... |
package cli
import (
"fmt"
"net/url"
"os"
"strings"
"time"
gofig "github.com/akutz/gofig/types"
glog "github.com/akutz/golf/logrus"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/rexray/rexray/libstorage/api/context"
apitypes "github.com/rexray/rexray/libst... |
/*
* Copyright (c) 2018, https://github.com/nebulaim
* 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
*
* Un... |
package tree
import (
"fmt"
"github.com/stretchr/testify/assert"
"testing"
)
// 构建一棵二叉树:
// 25
// / \
// 18 47
// / \ / \
// 9 21 30 62
// / / \ /
// 5 19 40 51
// \
// 8
//
// 该二叉树的层序遍历为: 25 18 47 9 21 30 62 5 19 40 51 8
/... |
package main
import (
"encoding/json"
"flag"
"fmt"
"github.com/DSiSc/craft/log"
"io/ioutil"
"math"
"math/rand"
"net/http"
"os"
"strconv"
"strings"
"sync"
"time"
)
var (
GlobalTestAccount = "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b"
GlobalNonceCounter = struct {
nonce uint64
mu sync.Mutex
}{n... |
package checks
import (
"context"
"errors"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/DataDog/datadog-agent/pkg/process/config"
"github.com/DataDog/datadog-agent/pkg/process/net"
"github.com/DataDog/datadog-agent/pkg/process/procutil"
"github.com/DataDog/datadog-agent/pkg/process/util"
agentutil "gi... |
// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved.
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose ei... |
package runtime
import (
"context"
"fmt"
"sync"
"time"
beacon "github.com/oasisprotocol/oasis-core/go/beacon/api"
"github.com/oasisprotocol/oasis-core/go/common/cbor"
"github.com/oasisprotocol/oasis-core/go/common/quantity"
"github.com/oasisprotocol/oasis-core/go/common/version"
consensus "github.com/oasispr... |
/* Apache v2 license
* Copyright (C) <2019> Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
package handlers
import (
"context"
"database/sql"
"encoding/json"
"github.com/intel/rsp-sw-toolkit-im-suite-inventory-service/app/cloudconnector/event"
"github.com/intel/rsp-sw-toolkit-im-suite-utilities/... |
package wtrcsv
import (
"bufio"
"encoding/csv"
"github.com/pkg/errors"
"io"
"log"
"regexp"
"sort"
"strconv"
)
type Row struct {
LicenceNumber string
LicenceIssueDate string
SidLatNS string
SidLatDeg string
SidLatMin string
SidLatSec str... |
// Copyright (c) 2017-2018 <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... |
package main
import (
"fmt"
)
var (
c *Cpu
pc uint16
)
func immediateAddress() int {
val, _ := Ram.Read(pc - 1)
return int(val)
}
func absoluteAddress() (result int) {
// Switch to an int (or more appropriately uint16) since we
// will overflow when shifting the high byte
high, _ := Ram.Read(pc + 1)
low,... |
package step
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"math/rand"
"net/http"
"net/url"
"regexp"
"sort"
"strconv"
"strings"
"appengine"
"appengine/datastore"
"appengine/memcache"
"appengine/urlfetch"
)
const kPeerStoreKind = "peerSouce"
const kPeerStoreId = "current"
const kSelfN... |
package main
import (
"github.com/go-gl/mathgl/mgl32"
"github.com/lakal3/vge/vge/materials/env"
"github.com/lakal3/vge/vge/materials/noise"
"github.com/lakal3/vge/vge/materials/pbr"
"github.com/lakal3/vge/vge/materials/shadow"
"github.com/lakal3/vge/vge/vapp"
"github.com/lakal3/vge/vge/vmodel"
"github.com/laka... |
//-----------------------------------------------------------------------------------
// ♛ GopherCheck ♛
// Copyright © 2014 <NAME>
//-----------------------------------------------------------------------------------
package main
const ( // TODO: expose these options via UCI interface.
LAZY_EVAL_MARGIN = BISHOP_VAL... |
package config
import (
"fmt"
"sort"
"strings"
hcl2 "github.com/hashicorp/hcl/v2"
gohcl2 "github.com/hashicorp/hcl/v2/gohcl"
hcl2parse "github.com/hashicorp/hcl/v2/hclparse"
"github.com/hashicorp/terraform/configs/hcl2shim"
"github.com/zclconf/go-cty/cty"
)
// hcl2Configurable is an implementation of configu... |
package main
import (
"bytes"
"encoding/gob"
"fmt"
"os"
"strings"
"github.com/slzatz/vimango/rawmode"
"golang.org/x/sys/unix"
)
type Session struct {
screenCols int
screenLines int //total number of screen lines
textLines int // considering margins, bottom messages
divider int
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: mobile.proto
package pb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import 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 compi... |
// Package lrjson contains functions for unmarshalling JSON responses returned by RESTful API
package lrjson
import (
"encoding/json"
"log"
"time"
)
// DynamicUnmarshal takes stringified json and unmarshals it into a map with string keys and
// interface{} values. This is recommended for parsing LoginRadius API re... |
// SPDX-FileCopyrightText: 2020-present Open Networking Foundation <<EMAIL>>
//
// SPDX-License-Identifier: Apache-2.0
package kpmv2ctypes
import (
"encoding/hex"
"github.com/onosproject/onos-e2-sm/servicemodels/e2sm_kpm_v2/pdubuilder"
e2sm_kpm_v2 "github.com/onosproject/onos-e2-sm/servicemodels/e2sm_kpm_v2/v2/e2s... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.13.0
// source: spec.proto
package proto_out
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/pr... |
package config
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"strings"
"sync"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/service/s3/s3manager"
"github.com/fsnotify/fsnotify"
"githu... |
package nes
import "image/color"
type Instruction struct{
mnemonic string
addrMode AddrMode
cycle uint64
}
var instructions = map[byte]Instruction{
0x00: {"BRK", Implied, 7},
0x01: {"ORA", IndirectX, 6},
0x02: {"KIL", Accumulator, 2},
0x03: {"SLO", IndirectY, 8},
0x04: {"NOP", Zeropage, 3},
0x05: {"ORA",... |
// Copyright (C) 2018 by <NAME> <<EMAIL>>
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, pu... |
package dyld
import (
"bytes"
"encoding/binary"
"fmt"
"strings"
"github.com/blacktop/go-macho/types"
"github.com/dustin/go-humanize"
"github.com/olekukonko/tablewriter"
)
func (dch CacheHeader) String() string {
var magicBytes []byte = dch.Magic[:]
return fmt.Sprintf(
"Magic = %s\n"+
"Ma... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: cs3/rpc/v1beta1/code.proto
package rpcv1beta1
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// ... |
package dialect
import (
"context"
"fmt"
"strings"
"time"
"cloud.google.com/go/spanner"
database "cloud.google.com/go/spanner/admin/database/apiv1"
"google.golang.org/api/iterator"
apioption "google.golang.org/api/option"
databasepb "google.golang.org/genproto/googleapis/spanner/admin/database/v1"
"google.g... |
package main
import (
"context"
"fmt"
"io/ioutil"
"net/http"
"net/netip"
"os"
"os/signal"
"path/filepath"
"strconv"
"strings"
"sync"
"syscall"
"time"
"github.com/gin-gonic/gin"
"github.com/tidwall/buntdb"
"github.com/urfave/cli/v2"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
// Provided by govvv ... |
/*
Package tara provides a client for authenticating with the TARA authentication
service provided by the Information System Authority of the Republic of
Estonia.
This simply wraps an OpenID Connect client with some specific choices and
adjustments made by TARA.
*/
package tara
import (
"context"
"crypto/rand"
"cr... |
package spellingbee
import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"io"
"sort"
"strings"
"testing"
"testing/iotest"
"time"
)
func TestInferPuzzle(t *testing.T) {
tests := []struct {
name string
official []string
unofficial []string
center string
lett... |
// Copyright 2017, OpenCensus 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 dao
import (
"sync"
. "go.knocknote.io/eevee/code"
"go.knocknote.io/eevee/types"
)
const (
// ImportPlugin name for hook of Imports
ImportsPlugin = "imports"
// StructFieldsPlugin name for hook of StructFields
StructFieldsPlugin = "struct-fields"
// ConstructorDeclarePlugin name for hook of Construct... |
/*
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: google/cloud/automl/v1/text_extraction.proto
package automl
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 othe... |
// Code generated by protoc-gen-go.
// source: proto/lookupd.proto
// DO NOT EDIT!
package lintflow_core
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they a... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package mirbft
import (
"fmt"
pb "github.com/IBM/mirbft/mirbftpb"
"github.com/pkg/errors"
)
// epochConfig is the information required by the various
// state machines whose state is scoped to an epoch
type epochConfig struct {
... |
/*
* Copyright (c) 2018 VMware, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish, ... |
/*
Copyright 2019 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 acsengine
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"path"
"path/filepath"
"strings"
"testing"
"github.com/Azure/acs-engine/pkg/acsengine/transform"
"github.com/Azure/acs-engine/pkg/api"
"github.com/Azure/acs-engine/pkg/api/v20160330"
"github.com/Azure/acs-engine/pkg/api/vlabs"
"github.c... |
// 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 wri... |
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
package app
import (
"bytes"
"image"
"io"
"io/ioutil"
"net/http"
"net/url"
"strconv"
"strings"
"time"
"github.com/dyatlov/go-opengraph/opengraph"
"github.com/mattermost/mattermost-server/v5/mod... |
// Copyright 2013 Google LLC. 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... |
// Copyright 2016 - 2022 The excelize 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 excelize providing a set of functions that allow you to write to
// and read from XLSX / XLSM / XLTM files. Supports reading and writi... |
// Copyright 2019 NDP Systèmes. All Rights Reserved.
// See LICENSE file for full licensing details.
package models
import (
"reflect"
"github.com/gleke/hexya/src/models/fieldtype"
"github.com/gleke/hexya/src/models/types"
"github.com/gleke/hexya/src/tools/nbutils"
"github.com/gleke/hexya/src/tools/strutils"
)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.