text stringlengths 3.08k 10.4k |
|---|
// Copyright 2018 ETH Zurich
//
// 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... |
package rollup
import (
"encoding/xml"
"fmt"
"regexp"
"time"
"github.com/lomik/graphite-clickhouse/helper/point"
)
/*
<graphite_rollup>
<pattern>
<regexp>click_cost</regexp>
<function>any</function>
<retention>
<age>0</age>
<precision>3600</precision>
</retention>
<retention>
<age>8... |
package cloudflare
import (
"errors"
"fmt"
"time"
cloudflareSDK "github.com/cloudflare/cloudflare-go"
"github.com/nitschmann/cfdns/internal/pkg/customerror"
"github.com/nitschmann/cfdns/internal/pkg/model"
)
// DNSRecordRepository is the data interface for the Cloudflare DNS record API
type DNSRecordRepositor... |
/*
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
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softw... |
// Copyright 2019 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 api
import (
"encoding/json"
"fmt"
"time"
datatransfer "github.com/filecoin-project/go-data-transfer"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/chain/types"
"github.com/ipfs/go-cid"
"github.com/lib... |
/*
* Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* ... |
package GoMybatis
import (
"database/sql"
"github.com/zhuxiujia/GoMybatis/ast"
"github.com/zhuxiujia/GoMybatis/engines"
"github.com/zhuxiujia/GoMybatis/utils"
"sync"
)
type GoMybatisEngine struct {
mutex sync.RWMutex //读写锁
isInit bool //是否初始化
dataSourceRout... |
/*
MIT License
Copyright (c) 2017 <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 use, copy, modify, merge, publish, distrib... |
package rak
import (
"regexp"
"time"
"github.com/ipsusila/lorago/atcmd"
"github.com/ipsusila/opt"
)
// List of known at command.
// P2P config at+set_config=lorap2p:<frequency>:<spreadfact>:<bandwidth>:<codingrate>:<preamlen>:<power>
const (
atVersion = "at+version"
atHelp ... |
// Copyright 2021 iLogtail 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 2018 The Operator-SDK 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 ... |
// Copyright (c) 2012-2016 The Revel Framework Authors, All rights reserved.
// Revel Framework source code and usage is governed by a MIT style
// license that can be found in the LICENSE file.
package revel
import (
"crypto/rand"
"encoding/hex"
"fmt"
"net/http"
"net/url"
"strconv"
"strings"
"time"
)
// Ses... |
package dshowvt
import (
"github.com/rodrigocfd/windigo/win"
"github.com/rodrigocfd/windigo/win/com/autom/automvt"
"github.com/rodrigocfd/windigo/win/com/idl/idlvt"
)
// IBaseFilter virtual table.
//
// 📑 https://docs.microsoft.com/en-us/windows/win32/api/strmif/nn-strmif-ibasefilter
type IBaseFilter s... |
// Copyright 2009-2012 by <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Code for handling .go files.
*/
package godata
import (
"strings"
"os"
"go/ast"
"go/parser"
"go/token"
"./logger"
)
var DefaultOutputFileName string... |
// Package modconfig provides matchers for config.Map that query
// modules registry and parse inline module definitions.
//
// They should be used instead of manual querying when there is need to
// reference a module instance in the configuration.
//
// See ModuleFromNode documentation for explanation of what is 'arg... |
package dicom
import "encoding/json"
import "fmt"
import "github.com/macadamian/dicom/dicom2019b"
import "github.com/gradienthealth/dicom"
import "github.com/gradienthealth/dicom/dicomtag"
import "os"
import "reflect"
func main() {
inst := dicom2019b.MRImageStorage{}
inFilePath := "/Users/cmcgee/Downloads/4151021e... |
package acceptance_test
import (
"fmt"
"os/exec"
"time"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
)
var _ = Describe("bbl", func() {
Describe("help", func() {
Describe("bbl -h", func() {
It("prints out the usage", fu... |
/*
Copyright 2018 Oracle and/or its affiliates. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable la... |
package metrics
import (
"encoding/json"
"strings"
"github.com/golang/glog"
"kubesphere.io/kubesphere/pkg/client"
"kubesphere.io/kubesphere/pkg/constants"
"fmt"
)
type ContainerMetrics struct {
NodeName string `json:"node_name"`
ContainerName string `json:"containe... |
package samples
import (
"errors"
"fmt"
"os"
"github.com/manifoldco/promptui"
"github.com/spf13/cobra"
"github.com/stripe/stripe-cli/pkg/ansi"
"github.com/stripe/stripe-cli/pkg/config"
"github.com/stripe/stripe-cli/pkg/samples"
"github.com/stripe/stripe-cli/pkg/validators"
"github.com/stripe/stripe-cli/pkg... |
package rueidis
import (
"context"
"net"
"sync"
"sync/atomic"
"time"
"github.com/rueian/rueidis/internal/cmds"
)
type connFn func(dst string, opt *ClientOption) conn
type dialFn func(dst string, opt *ClientOption) (net.Conn, error)
type wireFn func() wire
type singleconnect struct {
w wire
e error
g sync.W... |
package repository
import (
"encoding/base64"
"fmt"
"io/ioutil"
"net/http"
"os"
"path/filepath"
"testing"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitaly/v14/internal/git"
"gitlab.com/gitlab-org/gitaly/v14/internal/git/gittest"
"gitlab.com/gitlab-org/gitaly/v14/internal/gitaly/config"
... |
/*
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2019-Present Datadog, Inc.
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO N... |
// Copyright (c) 2019 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package pool
import (
"testing"
"time"
"github.com/decred/dcrd/dcrutil/v2"
bolt "go.etcd.io/bbolt"
)
// makePaymentBundle creates a new payment bundle.
func makePaymentB... |
// Copyright (c) 2021 Terminus, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package apigateway
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
"github.com/aws/aws-sdk-go-v2/private/protocol"
)
// Requests API Gateway to get information about a Deployments collectio... |
package datatype
import (
"fmt"
"sort"
"testing"
)
func TestMap1(t *testing.T) {
// map的声明和注意事项
var a map[string]string
// a["no1"] = "宋江" // panic: assignment to entry in nil map
// 在使用map前,需要先make,make的作用就是给map分配数据空间
a = make(map[string]string, 10)
a["no1"] = "宋江"
a["no2"] = "吴用"
a["no1"] = "武松"
a["no3"... |
// 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.
// Windows performance counters.
// (MANY THINGS ARE BROKEN)
package pc
import (
"syscall"
"time"
"unsafe"
)
// Performance query.
type Query struct {
Ha... |
// Copyright 2020 The Chromium OS 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 audio interacts with audio operation.
package audio
import (
"context"
"fmt"
"math"
"regexp"
"strconv"
"time"
"chromiumos/tast/erro... |
/*
* 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 (c) 2015 Couchbase, 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... |
// Copyright 2019 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 cmd
import (
"errors"
"fmt"
"io"
"io/ioutil"
"path"
"strings"
"github.com/golang/protobuf/jsonpb"
"github.com/maruel/subcommands"
"go.... |
package types
import (
"encoding/base64"
accountParser "github.com/forbole/soljuno/solana/account"
clienttypes "github.com/forbole/soljuno/solana/client/types"
)
type AccountInfoPayload struct {
SessionVariables map[string]interface{} `json:"session_variables"`
Input AccountInfoArgs `json:"inp... |
package spice
import (
"encoding/binary"
"log"
"sync/atomic"
"github.com/gordonklaus/portaudio"
"github.com/hraban/opus"
)
type ChRecord struct {
cl *Client
conn *SpiceConn
mode uint16 // 1=raw 3=opus
channels uint32
format uint16
freq uint32
stream *portaudio.Stream
pcm []int16 // d... |
package crypto
import (
"bytes"
"encoding/base64"
"errors"
"io"
pb "github.com/igorrendulic/mcrypt-sdk-go/proto"
"google.golang.org/protobuf/proto"
)
const (
// Ed25519 is an enum for the supported Ed25519 key type
Ed25519 = iota
)
var (
// ErrBadKeyType is returned when a key is not supported
ErrBadKeyTy... |
// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use ... |
// Copyright 2020 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
package basrepo
import (
// "github.com/cockroachdb/errors"
"omega/domain/base/basmodel"
"omega/domain/base/message/basterm"
"omega/internal/core"
"omega/internal/core/corerr"
"omega/internal/core/corterm"
"omega/internal/core/validator"
"omega/internal/param"
"omega/internal/types"
"omega/pkg/dict"
"omega... |
package models
import (
"database/sql/driver"
"encoding/json"
"fmt"
"strconv"
"time"
"github.com/lib/pq"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/pkg/errors"
null "gopkg.in/guregu/null.v4"
)
type (
IDEmbed struct {
ID int32 `json:"-" toml:"-" gorm:"primary_key"`
}
JobSpecV2 ... |
package e2e
import (
"context"
"fmt"
"math"
"strings"
"testing"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
deschedulerapi "sigs.k8s.io/descheduler/pkg/api"
"sigs.k8s.io/descheduler/pkg/descheduler/evictions"
eutils "sigs.k8s.io/descheduler/pkg/descheduler/evictions/utils"
"sigs.... |
// Copyright (C) 2017 <NAME>. All Rights Reserved.
// Package jctx implements an encoder and decoder for request context values,
// allowing context metadata to be propagated through JSON-RPC.
//
// A context.Context value carries request-scoped values across API boundaries
// and between processes. The jrpc2 package ... |
package kafka
import (
"context"
"log"
"time"
"fmt"
"github.com/Shopify/sarama"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/... |
package dashboard
import (
"fmt"
"github.com/keptn-contrib/dynatrace-service/internal/common"
"github.com/keptn-contrib/dynatrace-service/internal/dynatrace"
"github.com/keptn-contrib/dynatrace-service/internal/sli/query"
"github.com/keptn-contrib/dynatrace-service/internal/sli/unit"
keptncommon "github.com/kept... |
package model
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"strings"
"time"
"github.com/bcext/cashutil"
"github.com/copernet/whccommon/model"
"github.com/copernet/whcexplorer/config"
"github.com/garyburd/redigo/redis"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
const (
BalancePrefix = "... |
// Copyright 2015 The TCell 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 core
import (
"errors"
"fmt"
"strings"
)
var ErrNotFound = errors.New("not found")
type Manager struct {
Down *Download
}
func NewManager(token string) (*Manager, error) {
down, err := NewDownload(token)
if err != nil {
return nil, err
}
return &Manager{
Down: down,
}, nil
}
func (m *Manager)... |
// Copyright 2019 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
/*
Copyright 2020 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
package util
/*
* 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
* "L... |
// Package conf provides easy CLI configuration management via flags and environment variables.
package conf
import (
"fmt"
"io"
"os"
"github.com/goph/env"
flag "github.com/spf13/pflag"
)
// ErrorHandling defines how to handle parsing errors.
type ErrorHandling int
const (
// ContinueOnError will return an er... |
// Copyright ©2020 The go-hep 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 hplot
import (
"fmt"
"image/color"
"io"
"math"
"os"
"path/filepath"
"strings"
"gonum.org/v1/plot/vg"
"gonum.org/v1/plot/vg/draw"
"gonum... |
package robot
import (
"errors"
"fmt"
"net"
"sync"
"time"
"lib/comm/method"
"lib/comm/proto"
"lib/comm/token"
"lib/packet"
"github.com/golang/protobuf/proto"
)
const (
//运行状态
ROBOT_STATUS_ERROR = "status_error"
ROBOT_STATUS_INIT = "status_init"
ROBOT_STATUS_STOP = "status_stop"
ROBOT_STATUS_CONN =... |
package admin
import (
"context"
"errors"
"fmt"
"io/ioutil"
"net/http"
"strings"
"sync"
"github.com/coreos/go-oidc"
"github.com/flyteorg/flyteidl/clients/go/admin/mocks"
"github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
"github.com/flyteorg/flytestdlib/logger"
grpc_middleware "github.com/grpc-ecos... |
package eval
import (
"errors"
"fmt"
"github.com/elves/elvish/pkg/eval/vals"
"github.com/elves/elvish/pkg/parse"
"github.com/elves/elvish/pkg/ui"
)
var errStyledSegmentArgType = errors.New("argument to styled-segment must be a string or a styled segment")
//elvdoc:fn styled-segment
//
// ```elvish
// styled-se... |
package controller
import (
"context"
"fmt"
"net"
"strconv"
"strings"
"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/any"
c "github.com/mayuresh82/gocast/config"
api "github.com/osrg/gobgp/api"
gobgp "github.com/osrg/gobgp/pkg/server"
)
type Route struct {
Net *net.IPNet
C... |
// Copyright 2019 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 translatedassert
import (
"fmt"
"reflect"
)
var binExprKindOrders = []reflect.Kind{
reflect.String,
reflect.Bool,
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64,
reflect.Complex64, reflect.Complex128,
reflect.Float32, reflect.Float64,
reflect.Int, reflect.Int8, reflect.Int... |
//
// Copyright (c) 2018 Red Hat, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
package graph
// This file will be automatically regenerated based on the schema, any resolver implementations
// will be copied through when generating and any unknown code will be moved to the end.
import (
"context"
"log"
"github.com/tochukaso/graphql-server-sample/db"
"github.com/tochukaso/graphql-server-sam... |
// MIT License
//
// Copyright (c) 2016 GenesisKernel
//
// 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, modif... |
// Copyright (c) 2012 The 'objc' Package 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 objc
/*
#cgo LDFLAGS: -lobjc -framework Foundation
#define __OBJC2__ 1
#include <objc/runtime.h>
#include <objc/message.h>
#include <st... |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Manages a Event Hubs as a nested resource within... |
package sqlingo
import (
"context"
"database/sql"
"time"
)
// Database is the interface of a database with underlying sql.DB object.
type Database interface {
// Get the underlying sql.DB object of the database
GetDB() *sql.DB
BeginTx(ctx context.Context, opts *sql.TxOptions, f func(tx Transaction) error) error... |
// Copyright 2011-2017 <NAME>.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in t... |
// 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... |
package graphqlws_test
import (
"bytes"
"context"
"fmt"
"net/http"
"net/http/httptest"
"strings"
"testing"
"time"
"github.com/gorilla/websocket"
"github.com/graphql-go/graphql"
"github.com/meandrewdev/graphqlws"
log "github.com/sirupsen/logrus"
)
var wsMountPath = "/subscriptions"
var subscriptionName = ... |
package updatehub
import (
"encoding/json"
"fmt"
"net/url"
"github.com/parnurzeal/gorequest"
)
type ProbeResponse interface{}
const (
Updating = "updating"
NoUpdate = "no_update"
TryAgain = "try_again"
)
type APIState string
const (
Park = "park"
EntryPoint = "entry_point"
Poll ... |
package api
import (
"github.com/360EntSecGroup-Skylar/excelize/v2"
"github.com/gogf/gf-demos/app/model"
"github.com/gogf/gf-demos/app/service"
"github.com/gogf/gf-demos/library/response"
"github.com/gogf/gf/net/ghttp"
"github.com/gogf/gf/util/gconv"
)
// 用户API管理对象
var Score = new(scoreApi)
type scoreApi struc... |
// Copyright (c) 2019 The BFE 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 agre... |
// DBDeployer - The MySQL Sandbox
// Copyright © 2006-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 require... |
/*
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, sof... |
package gui
import (
"context"
"sync"
"github.com/setlog/trivrost/pkg/misc"
"github.com/andlabs/ui"
log "github.com/sirupsen/logrus"
)
type progressState int
const (
stateInfo progressState = 1
stateError progressState = 2
statePaused progressState = 3
)
const maxLineWidth = 110
var (
window ... |
/*
Copyright 2020 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
//
// Copyright 2021 The Sigstore 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 ... |
/*
Copyright © 2020 patrickcisco
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
... |
package main
import (
"fmt"
"log"
"net/http"
"encoding/json"
"github.com/codegangsta/negroni"
"github.com/gorilla/mux"
"github.com/unrolled/render"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"time"
"bytes"
"strings"
"net"
"io/ioutil"
"strconv"
)
/*
Variable declaration and initiali... |
// Copyright (c) 2020-2021 C4 Project
//
// This file is part of c4t.
// Licenced under the MIT licence; see `LICENSE`.
package builder_test
import (
"context"
"reflect"
"testing"
"github.com/c4-project/c4t/internal/observing"
"github.com/c4-project/c4t/internal/model/litmus"
"github.com/stretchr/testify/moc... |
package authprovisioningv2
import (
"reflect"
"time"
v3 "github.com/rancher/rancher/pkg/apis/management.cattle.io/v3"
"github.com/rancher/rancher/pkg/rbac"
"github.com/rancher/wrangler/pkg/name"
"github.com/sirupsen/logrus"
rbacv1 "k8s.io/api/rbac/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/api... |
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License i... |
package main
import (
"flag"
"fmt"
"io/ioutil"
"math/big"
"strconv"
"strings"
)
var inputFile = flag.String("inputFile", "inputs/day22.input", "Relative file path to use as input.")
type Deck [10007]int
type Operation func(pos, deckSize int64, iCache map[int64]int64) int64
func main() {
flag.Parse()
bytes, ... |
package jwt
import (
"bytes"
"crypto/subtle"
"encoding/json"
"errors"
"time"
"github.com/ory/x/errorsx"
jjson "gopkg.in/square/go-jose.v2/json"
)
var TimeFunc = time.Now
// MapClaims provides backwards compatible validations not available in `go-jose`.
// It was taken from [here](https://raw.githubuserconten... |
package certificate
import (
"crypto/x509"
"os"
"strconv"
"strings"
"time"
"github.com/smallstep/cli/flags"
"github.com/pkg/errors"
"github.com/smallstep/cli/crypto/pemutil"
"github.com/smallstep/cli/errs"
"github.com/urfave/cli"
)
const defaultPercentUsedThreshold = 66
func needsRenewalCommand() cli.Com... |
package main
import (
"RustCallGraphConverter/src/internal/fasten"
"RustCallGraphConverter/src/internal/rust"
"encoding/json"
"errors"
"flag"
"github.com/lovoo/goka"
"github.com/lovoo/goka/codec"
"io/ioutil"
"log"
"os"
"path/filepath"
"strings"
"sync"
"time"
)
var broker = flag.String("b", "localhost:90... |
package flow
import (
"context"
"encoding/json"
"fmt"
"github.com/lunarway/release-manager/internal/git"
"github.com/lunarway/release-manager/internal/intent"
"github.com/lunarway/release-manager/internal/log"
"github.com/lunarway/release-manager/internal/slack"
"github.com/lunarway/release-manager/internal/t... |
package resourcebundlestate
import (
"context"
"log"
"github.com/onap/multicloud-k8s/src/monitor/pkg/apis/k8splugin/v1alpha1"
appsv1 "k8s.io/api/apps/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/... |
package cmd
import (
"bytes"
"encoding/base64"
"fmt"
"os"
"path/filepath"
uuid "github.com/satori/go.uuid"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
archivist "github.com/thepwagner/archivist/proto"
"google.golang.org/protobuf/types/known/timestamppb"
)
func SyncFilesystem(idx *archivist.Index,... |
package main
import (
"bufio"
"container/heap"
"fmt"
"os"
)
var reader = bufio.NewReader(os.Stdin)
var writer = bufio.NewWriter(os.Stdout)
func scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }
func scan(a ...interface{}) { fmt.Fscan(reader, a...) }
func printf(f string, a ...interfa... |
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
//go:generate go run sigs.k8s.io/kustomize/v3/cmd/pluginator
package main
import (
"sigs.k8s.io/kustomize/v3/pkg/gvk"
"sigs.k8s.io/kustomize/v3/pkg/ifc"
"sigs.k8s.io/kustomize/v3/pkg/resid"
"sigs.k8s.io/kustomize/v3/pkg/resmap"
"sig... |
package logging
import (
"encoding/json"
"errors"
"io"
"io/ioutil"
"os"
"strings"
"time"
stackdriver "github.com/TV4/logrus-stackdriver-formatter"
"github.com/bshuster-repo/logrus-logstash-hook"
"github.com/kelseyhightower/envconfig"
log "github.com/sirupsen/logrus"
"github.com/spf13/viper"
"gopkg.in/gem... |
package dpos
import (
"sync"
"sync/atomic"
"time"
"github.com/qlcchain/go-qlc/common/topic"
"github.com/qlcchain/go-qlc/common/types"
"github.com/qlcchain/go-qlc/config"
)
type BlockReceivedVotes struct {
block *types.StateBlock
balance types.Balance
}
type electionStatus struct {
winner *types.StateBloc... |
// 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 errors
import (
"regexp"
"strings"
)
const (
braketOpen = "["
parenOpen = "("
curlyOpen = "{"
rootOpen = "*"
customOpen = "~"
rawOpen = "...|"
braketClose = "]"
parenClose = ")"
curlyClose = "}"
rawClose = "|..."
)
var (
sepOpeners = map[string]string{
braketOpen: string(braketOpe... |
// Copyright 2015 tsuru authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package docker
import (
"crypto"
"crypto/rand"
"fmt"
"io"
"net"
"net/url"
"time"
"github.com/fsouza/go-dockerclient"
"github.com/tsuru/config"
"githu... |
// Copyright 2019 FairwindsOps 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... |
package battles
import (
"strings"
"github.com/pkg/errors"
"github.com/sasalatart/batcoms/domain/summaries"
"github.com/sasalatart/batcoms/domain/wikiactors"
"github.com/sasalatart/batcoms/pkg/scraper/urls"
"github.com/sasalatart/batcoms/pkg/strclean"
"github.com/gocolly/colly"
)
type factionsMapper map[stri... |
/*
Copyright The Stash 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, software
d... |
// Copyright (c) 2004-present Facebook All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated (@generated) by entc, DO NOT EDIT.
package ent
import (
"fmt"
"strconv"
"strings"
"time"
"github.com/facebookincubator/ent/dialec... |
// Copyright 2017-2021 <NAME> (<EMAIL>) and other 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.apache.org/licenses/LICENSE-2.0
//
// Unless required ... |
//
// Copyright (c) 2017, Cisco Systems
// 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 conditi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.