text stringlengths 3.08k 10.4k |
|---|
package goldi
import (
"fmt"
"reflect"
"runtime"
"strings"
)
// A Type holds all information that is necessary to create a new instance of a type.
// Type implements the TypeFactory interface.
type typeFactory struct {
factory reflect.Value
factoryType reflect.Type
factoryArguments []reflect.Valu... |
package main
import "fmt"
// map 是散列表的引用,类型是 map[K]V
/* import (
"fmt"
"sort"
)
func main() {
// 通过 make 创建 map
agess := map[string]int{
"alice": 31,
"charlie": 34,
}
fmt.Println(agess)
ages := make(map[string]int)
ages["alice"] = 31
ages["charlie"] = 34
// 空 map 也可以写为 map[string]int{}
ages["alice"... |
package handle
import (
"errors"
"fmt"
"os"
"sync"
"time"
"golang.org/x/sys/windows"
)
// Inspector describes a structure that queries details (name and type name) to a specific handle.
// Common elements such as type ID to name mappings and process handles are cached and reused.
type Inspector struct {
query... |
// Copyright 2017 XUEQIU.COM
//
// 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 model
import (
"github.com/sgreben/piecewiselinear"
)
type sensorLut struct {
LUT []float64
}
var (
afe3ScalingFactor = float64(0.0000005960464478) // named "lsb" in datasheet.
// Temperatures used in the LUT
afe3LutTemperatures = []float64{-30.0, -20.0, -10.0, 0.0, 10.0, 20.0, 30.0, 40.0, 50.0}
// L... |
package model
import (
"fmt"
"time"
core_v1 "k8s.io/api/core/v1"
)
type KVObject struct {
Key string
Value string
}
type Event struct {
Time time.Time `json:"time"`
Name string `json:"name,omitempty"`
Namespace string `json:... |
package generic
import (
"errors"
"fmt"
"io"
"strconv"
"github.com/redgoat650/fielder/parsing/csvhelper"
fielder "github.com/redgoat650/fielder/scheduling"
)
func ParseCaptainListFromFile(filename string) (fielder.BetterRoster, error) {
return parseCaptainListFromFile(filename)
}
func parseCaptainListFromFil... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: add_devices_to_firmware_hub.proto
package deviced
import (
fmt "fmt"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
va... |
package main
import (
"crypto/sha1"
"encoding/hex"
"fmt"
"image"
_ "image/png"
_ "image/color"
"image/png"
"log"
"os"
"strings"
"gonion_ring/model"
"flag"
)
func main() {
if parseArguments() {
process()
} else {
printUsage()
}
}
var sourceName string
var outputName string
func parseArguments() bo... |
//
//Copyright [2016] [SnapRoute Inc]
//
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... |
package tpl
import (
"bytes"
"fmt"
"path"
"strconv"
"strings"
"arhat.dev/pkg/fshelper"
"arhat.dev/pkg/yamlhelper"
"arhat.dev/rs"
"gopkg.in/yaml.v3"
"arhat.dev/dukkha/pkg/dukkha"
"arhat.dev/dukkha/pkg/renderer"
"arhat.dev/dukkha/pkg/templateutils"
"arhat.dev/dukkha/third_party/golang/text/template"
)
co... |
package apicompat
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"strings"
"time"
)
// revisionFS is a keyword to use the file system not VCS for read operations
const revisionFS = "."
// VCS defines a version control system
// the vcs should be able to handle calls to ReadFile concu... |
// Copyright 2014 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 2014 The mqrouter Author. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package redis
import (
"context"
"fmt"
"runtime"
"strings"
"sync"
"github.com/shawnfeng/sutil/cache/constants"
"github.com/shawnfeng/sutil/sconf/c... |
// Copyright 2020 Thinkium
//
// 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 events
import (
"strings"
"github.com/loft-sh/vcluster/pkg/controllers/syncer"
synccontext "github.com/loft-sh/vcluster/pkg/controllers/syncer/context"
"github.com/loft-sh/vcluster/pkg/controllers/syncer/translator"
"github.com/loft-sh/vcluster/pkg/constants"
"github.com/loft-sh/vcluster/pkg/util/clien... |
// Copyright 2014-2015 Amazon.com, Inc. 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. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license... |
package job
/*
Copyright 2017 - 2020 Crunchy Data Solutions, 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 ag... |
/*
Copyright 2018 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 kubernetes
import (
"fmt"
"io/ioutil"
"os"
"time"
"github.com/emicklei/go-restful"
"github.com/golang/glog"
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api"
kclient "github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/record"
"github.c... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
package watch
import (
"io/ioutil"
"os"
"path"
"path/filepath"
"strings"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/client-go/informers"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/cache"
cmd "k8s.io/client-go/tool... |
/*
Simple set of tests for server.go used in project 1 of UBC CS 416
2017W2. Runs through the server's RPCs and their error codes.
Usage:
$ go run tester.go
-b int
Heartbeat interval in ms (default 10)
-i string
RPC server ip:port
-p int
start port (default 54320)
*/
package main
import (
"c... |
package keeper
import (
"testing"
"github.com/stretchr/testify/require"
sdk "github.com/tendermint/classic/sdk/types"
"github.com/tendermint/classic/sdk/x/supply/internal/types"
)
const initialPower = int64(100)
var (
holderAcc = types.NewEmptyModuleAccount(holder)
burnerAcc = types.NewEmptyModuleAcc... |
// Copyright 2018 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... |
// Copyright 2021 The etcd 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 t... |
package survey
import (
"github.com/attodev/survey/v2/core"
"github.com/attodev/survey/v2/terminal"
)
/*
Input is a regular text input that prints each character the user types on the screen
and accepts the input with the enter key. Response type is a string.
name := ""
prompt := &survey.Input{ Message: "What is... |
// Copyright (C) 2019-2020 Zilliz. 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 l... |
// Copyright 2010 The Walk Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build windows
package walk
import (
"unsafe"
)
import (
"git.zx2c4.com/wireguard-windows/manager/walk/win"
)
const mainWindowWindowClass = `\o/ Walk... |
package api
import (
"bytes"
"context"
"crypto"
"encoding/json"
"errors"
"fmt"
"net/http"
"time"
"github.com/cenkalti/backoff/v4"
"github.com/go-acme/lego/v4/acme"
"github.com/go-acme/lego/v4/acme/api/internal/nonces"
"github.com/go-acme/lego/v4/acme/api/internal/secure"
"github.com/go-acme/lego/v4/acme/... |
package main
import (
"database/sql"
"os"
"pandora/pod"
"path"
"strconv"
"strings"
"time"
cp "github.com/fatih/color"
"github.com/go-hayden-base/str"
)
func cmd_sync(args *Args) {
println("准备数据...")
excluedKeyMap, e := readExistKeys()
if e != nil {
cp.Red(e.Error())
return
}
excludeModuleMap := re... |
package upgrade
import (
"context"
"fmt"
"runtime"
"strings"
"github.com/go-logr/logr"
"github.com/openshift/special-resource-operator/pkg/cluster"
"github.com/openshift/special-resource-operator/pkg/registry"
"github.com/openshift/special-resource-operator/pkg/utils"
corev1 "k8s.io/api/core/v1"
"sigs.k8s.... |
// 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... |
package main
import (
"encoding/json"
"flag"
"fmt"
"github.com/90poe/kafka_connect_exporter/env"
"github.com/90poe/service-chassis/health"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/prometheus/common/log"
"io/ioutil"
"net/http"
"net... |
// Copyright 2014 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package markup
import (
"bytes"
"fmt"
"path"
"path/filepath"
"strings"
"github.com/russross/blackfriday"
"github.com/G-Node/gogs/internal/conf"
"gi... |
/*
Copyright 2020 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... |
package net
import (
"fmt"
"io/ioutil"
"os"
"strings"
"syscall"
"testing"
"github.com/micro-in-cn/platform-web/assembly-line/exporters/os/third_party/gopsutil/internal/common"
"github.com/stretchr/testify/assert"
)
func TestIOCountersByFileParsing(t *testing.T) {
// Prpare a temporary file, which will be re... |
// Package unixconn facilitates creating reverse proxy connections
package unixconn // import "vimagination.zapto.org/reverseproxy/unixconn"
import (
"errors"
"net"
"net/http"
"os"
"runtime"
"strconv"
"sync"
"sync/atomic"
"syscall"
"time"
)
type buffer [http.DefaultMaxHeaderBytes]byte
type ns struct {
c ... |
package check
import (
"fmt"
"path/filepath"
"regexp"
"strings"
"gorm.io/driver/mysql"
"gorm.io/gorm"
"gorm.io/gorm/utils/tests"
"gorm.io/gen/internal/parser"
)
/*
** The feature of mapping table from database server to Golang struct
** Provided by @qqxhb
*/
const (
ModelPkg = "model"
//query table str... |
// +build examples1
package e2e
import (
"context"
"encoding/json"
"io/ioutil"
"net/http"
"os/exec"
"strconv"
"strings"
"testing"
"time"
framework "github.com/operator-framework/operator-sdk/pkg/test"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
appsv1 "k8s.io/api/apps/v1"
... |
// Copyright 2018 The gVisor 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 bifrost
import (
"context"
"encoding/json"
"code.cloudfoundry.org/eirini/k8s/shared"
"code.cloudfoundry.org/eirini/models/cf"
"code.cloudfoundry.org/eirini/opi"
"github.com/pkg/errors"
)
//counterfeiter:generate . LRPConverter
//counterfeiter:generate . LRPClient
//counterfeiter:generate . LRPNamespace... |
package xml // import "github.com/tdewolff/minify/xml"
import (
"bytes"
"fmt"
"os"
"regexp"
"testing"
"github.com/tdewolff/minify/v2"
"github.com/tdewolff/test"
)
func TestXML(t *testing.T) {
xmlTests := []struct {
xml string
expected string
}{
{"<!-- comment -->", ""},
{"<A>x</A>", "<A>x</A>"}... |
/*
* MinIO Client (C) 2019 MinIO, 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 agr... |
package typechecker
import (
"fmt"
"strings"
"github.com/stackoverflow/novah-go/compiler/ast"
"github.com/stackoverflow/novah-go/data"
)
type Typechecker struct {
TypeVarMap map[int]string
currentId int
env *Env
infer *Inference
uni *Unification
context TypingContext
}
func NewTypec... |
package terraform
import (
"fmt"
"sort"
)
// StateFilter is responsible for filtering and searching a state.
//
// This is a separate struct from State rather than a method on State
// because StateFilter might create sidecar data structures to optimize
// filtering on the state.
//
// If you change the State, the ... |
/*************************************************************************
* Copyright 2018 Gravwell, Inc. All rights reserved.
* Contact: <<EMAIL>>
*
* This software may be modified and distributed under the terms of the
* BSD 2-clause license. See the LICENSE file for details.
**********************************... |
package amount_test
import (
"fmt"
"strings"
"testing"
"github.com/stellar-modules/go/sdk/amount"
"github.com/stellar-modules/go/sdk/xdr"
)
var Tests = []struct {
S string
I xdr.Int64
valid bool
}{
{"100.0000000", 1000000000, true},
{"-100.0000000", -1000000000, true},
{"100.0000001", 1000000001, ... |
// Copyright (C) MongoDB, Inc. 2014-present.
//
// 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 mongoreplay
import (
"bytes"
"encoding/... |
// Copyright (c) 2020, <NAME>. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
package main
import (
"fmt"
"strings"
"time"
"github.com/cassava/repoctl/internal/term"
"github.com/cassava/repoctl/pacman/aur"
"github.com/goulash/pr"
"github... |
// Copyright 2021 The go-github 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 github
import (
"context"
"encoding/json"
"fmt"
)
// Environment represents a single environment in a repository.
type Environment struct... |
/*
* Copyright 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Licen... |
package redists
import (
"context"
"fmt"
"reflect"
"strconv"
"time"
)
type Rules map[string]Aggregation
func parseRules(is []interface{}) map[string]Aggregation {
rs := make(map[string]Aggregation)
for _, v := range is {
is := v.([]interface{})
rs[parseString(is[0])] = Aggregation{
TimeBucket: time.Dur... |
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github... |
// 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 ... |
// Copyright 2019 The Meshery 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... |
/*
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... |
package amqp
import (
"context"
"fmt"
"sync"
"time"
"github.com/golang/protobuf/proto"
"github.com/streadway/amqp"
"github.com/lukasjarosch/genki/broker"
"github.com/lukasjarosch/genki/logger"
)
type PublishExchange string
type Session struct {
addr string
ctx context.Context
cancel ... |
// Copyright © 2019 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wri... |
package gfx
import "github.com/go-gl/gl/all-core/gl"
type FrameBuffer struct {
FrameBuffer uint32
texture uint32
depthBuffer uint32
vao uint32
vbo uint32
program uint32
frameBufferTexID int32
vertAttrib uint32
aspectUniform int32
fadeUn... |
package storagemarket
import (
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p-core/peer"
ma "github.com/multiformats/go-multiaddr"
cbg "github.com/whyrusleeping/cbor-gen"
"github.com/filecoin-project/go-address"
datatransfer "github.com/filecoin-project/go-data-transfer"
"github.com/filecoin-project/go-... |
package proc
import (
"bufio"
"fmt"
"os"
"os/exec"
"strings"
"github.com/pkg/errors"
)
type Status struct {
Name string
Umask string
State string
Tgid string
Ngid string
Pid string
PPid string
TracerPid string
Uids []string
Gids []string
FdSize string
Groups []string
NStgid string
NSpid []string
... |
package elements
import (
"sort"
"github.com/Nv7-Github/Nv7Haven/eod/eodsort"
"github.com/Nv7-Github/Nv7Haven/eod/types"
"github.com/Nv7-Github/Nv7Haven/eod/util"
)
func (b *Elements) InvCmd(user string, m types.Msg, rsp types.Rsp, sorter string, filter string, postfix bool, defaul bool) {
rsp.Acknowledge()
d... |
// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Gardener contributors.
//
// SPDX-License-Identifier: Apache-2.0
package signature
import (
"context"
"errors"
"fmt"
"os"
"path/filepath"
cdv2 "github.com/gardener/component-spec/bindings-go/apis/v2"
"github.com/gardener/component-spec/bind... |
//go:build e2e
// +build e2e
/*
Copyright 2021 The Knative 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 render
import (
"bytes"
"compress/zlib"
"encoding/base64"
"encoding/binary"
"fmt"
"io"
"math"
"reflect"
"strings"
"github.com/clj/hrm-profile-tool/instructions"
)
type renderInstructionsTextOptions struct {
showInstructionNumber bool
showLineNumber bool
showRawInstruction bool
instruc... |
// Copyright 2021 Security Scorecard 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 services
import (
"errors"
"sync"
"time"
"github.com/mrwonko/cron"
"github.com/smartcontractkit/chainlink/logger"
"github.com/smartcontractkit/chainlink/store"
"github.com/smartcontractkit/chainlink/store/models"
"github.com/smartcontractkit/chainlink/utils"
)
// Scheduler contains fields for Recurri... |
/*
Copyright 2018, Cossack Labs Limited
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, softwa... |
package ffi
// #cgo pkg-config: libffi
//
// #include <stdlib.h>
// #include <string.h>
// #include "go-ffi.h"
import "C"
import (
"fmt"
"reflect"
"unsafe"
)
var (
ptrSize = unsafe.Sizeof((*uintptr)(nil))
)
// ABI is the FFI ABI for the local platform
type ABI C.ffi_abi
const (
FirstABI ABI = C.FFI_FIRST_ABI... |
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package jose
// IANA registered JOSE headers (https://tools.ietf.org/html/rfc7515#section-4.1)
const (
// HeaderAlgorithm identifies:
// For JWS: the cryptographic algorithm used to secure the JWS.
// For JWE: the... |
/*
* The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
* (the "License"). You may not use this work except in compliance with the License, which is
* available at www.apache.org/licenses/LICENSE-2.0
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDI... |
package db
import (
"errors"
"fmt"
"sort"
"strings"
"time"
"golang.org/x/text/language"
"golang.org/x/text/search"
)
const BookmarkInteractiveFileFormatString = `# Bookmark
# Headings must not be edited
# Lines starting with a # are ignored
## Title
%s
## URL
%s
## Description
%s
## Tags (comma and newline se... |
/*
____ _ _ _____ _ _
/ __ \ | | | | | __ \ | | | |
| | | |_ __ ___| | ___ __| | __ _ ___ _ __ | |__) | __ ___ | |_ ___ ___ ___ | |
| | | | '_ \ / _ \ | / _ ... |
package runtimelog
import (
"context"
"fmt"
"io"
"time"
v1 "k8s.io/api/core/v1"
"github.com/windmilleng/tilt/internal/container"
"github.com/windmilleng/tilt/internal/k8s"
"github.com/windmilleng/tilt/internal/store"
"github.com/windmilleng/tilt/pkg/logger"
"github.com/windmilleng/tilt/pkg/model"
"github.... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package glacier
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"
)
// Provides options for retrieving the notification configuration set on an... |
/*
Copyright 2018, Cossack Labs Limited
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, softwa... |
package client
import (
"fmt"
"strings"
"github.com/keybase/cli"
"github.com/keybase/client/go/libcmdline"
"github.com/keybase/client/go/libkb"
"golang.org/x/net/context"
)
type cmdWalletGetStarted struct {
libkb.Contextified
accepted bool
}
func newCmdWalletGetStarted(cl *libcmdline.CommandLine, g *libkb.G... |
// Copyright 2018 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
// Copyright 2014 The Serviced 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... |
package i2c
import (
"bytes"
"encoding/binary"
"time"
"github.com/stevebargelt/mygobot"
)
const mpu6050Address = 0x68
const MPU6050_RA_ACCEL_XOUT_H = 0x3B
const MPU6050_RA_PWR_MGMT_1 = 0x6B
const MPU6050_PWR1_CLKSEL_BIT = 2
const MPU6050_PWR1_CLKSEL_LENGTH = 3
const MPU6050_CLOCK_PLL_XGYRO = 0x01
const MPU6050_... |
package dump
import (
"bytes"
"encoding/hex"
"fmt"
"github.com/lightningnetwork/lnd/input"
"net"
"github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcutil"
"github.com/lightningnetwork/lnd/chanbackup"
"github.com/lightnin... |
// 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... |
// Copyright 2018 The Cockroach Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ag... |
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... |
package common
import (
"math"
"testing"
)
func TestPointAngleTo(t *testing.T) {
point1 := Point{1, 1}
point2 := Point{1, 0}
point3 := Point{-1, 0}
check := func(a Point, b Point, expected float64) {
got := a.AngleTo(b)
if math.Abs(got - expected) > 0.001 {
t.Fatalf("expected %f for angle from %v to %v, ... |
package key
import (
"crypto"
"crypto/ecdsa"
"crypto/ed25519"
"crypto/elliptic"
"crypto/rand"
"crypto/rsa"
"encoding/base64"
"fmt"
"os"
"strings"
"github.com/pkg/errors"
"github.com/smallstep/cli/command"
"github.com/smallstep/cli/utils"
"github.com/urfave/cli"
"go.step.sm/cli-utils/errs"
"go.step.sm/... |
// Copyright (c) 2018-2021 Zededa, Inc.
// SPDX-License-Identifier: Apache-2.0
package provider
import (
"context"
"fmt"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
zschemas "github.com/zededa/terraform-provider-zedcloud/schemas"
zedcloudapi "... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
package blobstore
import (
"context"
"database/sql"
"fmt"
"os"
"magma/orc8r/cloud/go/blobstore... |
//
// Copyright IBM Corporation 2020,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 a... |
package server
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"testing"
config "github.com/quan-to/chevron/internal/config"
"github.com/quan-to/chevron/internal/keymagic"
"github.com/quan-to/chevron/internal/tools"
"github.com/quan-to/chevron/pkg/QuantoError"
"github.com/quan-to... |
package main
import (
"encoding/json"
"regexp"
"strings"
"github.com/alibaba/pouch/apis/types"
"github.com/alibaba/pouch/test/command"
"github.com/alibaba/pouch/test/environment"
"github.com/go-check/check"
"github.com/gotestyourself/gotestyourself/icmd"
)
// PouchPsSuite is the test suite for ps CLI.
type ... |
// Copyright Contributors to the Open Cluster Management project.
package hive
import (
"context"
"encoding/json"
"errors"
"log"
"strconv"
"strings"
"time"
"github.com/open-cluster-management/cluster-curator-controller/pkg/jobs/utils"
hivev1 "github.com/openshift/hive/pkg/apis/hive/v1"
hiveclient "github.co... |
package main
import (
"log"
"github.com/ExploratoryEngineering/air-quality-sensor-node/server/pkg/api"
"github.com/ExploratoryEngineering/air-quality-sensor-node/server/pkg/listener"
"github.com/ExploratoryEngineering/air-quality-sensor-node/server/pkg/listener/hordelistener"
"github.com/ExploratoryEngineering/a... |
/*
* 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... |
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.
// +build kubeapiserver
package apiserver
import (
"sync"
"k8s.io/ap... |
package handlers
import (
"errors"
"fmt"
"github.com/go-co-op/gocron"
guuid "github.com/google/uuid"
"github.com/labstack/echo"
"log"
"net/http"
"pigeon/db"
. "pigeon/model"
. "pigeon/pkg/executors"
"reflect"
"strconv"
"strings"
"time"
)
var s = gocron.NewScheduler(time.Local)
func AttachNewTask(c echo... |
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"bytes"
"fmt"
"html/template"
"net/http"
"os/exec"
"sort"
"strings"
"time"
)
func handleStatus(w http.ResponseWriter, r *http.Re... |
package lister
import (
"fmt"
"strings"
"github.com/aws/aws-sdk-go-v2/service/appsync"
"github.com/trek10inc/awsets/arn"
"github.com/trek10inc/awsets/context"
"github.com/trek10inc/awsets/resource"
)
type AWSAppsyncGraphqlApi struct {
}
func init() {
i := AWSAppsyncGraphqlApi{}
listers = append(listers, i)
... |
// Copyright 2020 Red Hat, Inc. 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 applic... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.