text stringlengths 3.08k 10.4k |
|---|
//(C) Copyright [2020] Hewlett Packard Enterprise Development LP
//
//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 a... |
package xinput
import (
"fmt"
"strings"
"unicode"
"github.com/BurntSushi/xgb"
"github.com/BurntSushi/xgb/xproto"
"github.com/jmigpin/editor/util/uiutil/event"
)
// $ man keymaps
// https://tronche.com/gui/x/xlib/input/XGetKeyboardMapping.html
// https://tronche.com/gui/x/xlib/input/keyboard-encoding.html
// ht... |
package encryption
import (
"encoding/binary"
"errors"
"fmt"
"math/rand"
)
// global mask
var mask = []uint32{0xFFFFFFFF, 0xFFFFFF00, 0xFFFF0000, 0xFF000000}
type Encryption struct {
recvXorKey uint32
isFirstPacket bool
xorKeyTableBaseMultiple uint32
Key *XorKeyTable
RecvXo... |
package sparse
import (
"os"
"syscall"
"unsafe"
)
const (
FiemapSize = 32 // sizeof(struct fiemap)
ExtentSize = 56 // sizeof(struct Extent)
// FS_IOC_FIEMAP is defined in <linux/fs.h>:
FS_IOC_FIEMAP = 3223348747
// FIEMAP_MAX_OFFSET Defined in <linux/fiemap.h>:
FIEMAP_MAX_OFFSET = ^uint64(0)
FI... |
package controllers
import (
"context"
"fmt"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/labels"
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/milvus-io/milvus-operator/apis/milvus.io/v1alpha1"
"github.com/milvus-io/milvus-operator/pkg/helm"
"github.com/milvus-io/milvus-operator/pkg/util"
... |
package azure
/*
This file is largely based on rjw57/oauth2device's code, with the follow differences:
* scope -> resource, and only allow a single one
* receive "Message" in the DeviceCode struct and show it to users as the prompt
* azure-xplat-cli has the following behavior that this emulates:
- does... |
// Copyright 2016-2020, Pulumi Corporation.
//
// 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 2018- The Pixie 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 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 ... |
package vpc
//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
//distribut... |
package module
import (
"context"
"fmt"
"io"
"io/ioutil"
"strings"
"time"
"github.com/filecoin-project/go-fil-markets/storagemarket"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/api/apistruct"
"github.com/filecoin-project/lotus/... |
package build
import (
"bytes"
"os"
"path"
"sort"
"text/template"
"time"
"github.com/modem7/docker-error-pages/internal/config"
"github.com/modem7/docker-error-pages/internal/tpl"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"go.uber.org/zap"
)
type historyItem struct {
Code, Message, Path string
}
... |
package azure
import (
"fmt"
"io/ioutil"
"regexp"
"github.com/BurntSushi/toml"
"github.com/hashicorp/terraform/states/statefile"
"github.com/kyma-incubator/hydroform/provision/internal/errs"
terraform_operator "github.com/kyma-incubator/hydroform/provision/internal/operator/terraform"
"github.com/kyma-incuba... |
// Copyright 2018 Shift Devices AG
//
// 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 workflow
import (
"context"
"github.com/go-gorp/gorp"
"github.com/ovh/cds/engine/cache"
"github.com/ovh/cds/sdk"
"github.com/ovh/cds/sdk/log"
)
// Resync a workflow in the given workflow run
func Resync(ctx context.Context, db gorp.SqlExecutor, store cache.Store, proj sdk.Project, wr *sdk.WorkflowRun) ... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package computing
import (
"context"
"github.com/aokumasan/nifcloud-sdk-go-v2/internal/nifcloudutil"
"github.com/aws/aws-sdk-go-v2/aws"
)
type RegisterCorporateInfoForCertificateInput struct {
_ struct{} `type:"structure"`
Agreement *bool `l... |
// Copyright 2014 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... |
package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"math"
"net/http"
"github.com/go-graphite/carbonapi/zipper/httpHeaders"
protov2 "github.com/go-graphite/protocol/carbonapi_v2_pb"
"gopkg.in/yaml.v2"
pickle "github.com/lomik/og-rek"
)
type responseFormat int
func (r responseFor... |
// Copyright (c) 2019 Cisco and/or its affiliates.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by app... |
// Copyright (c) 2016-2019 Uber Technologies, 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... |
package handler_test
import (
"errors"
"github.com/go-chassis/go-chassis/core/archaius"
"github.com/go-chassis/go-chassis/core/config"
"github.com/go-chassis/go-chassis/core/config/model"
"github.com/go-chassis/go-chassis/core/handler"
"github.com/go-chassis/go-chassis/core/invocation"
"github.com/go-chassis/go... |
// Copyright 2021 The baidu 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 © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.
package device
import (
"fmt"
"sort"
"time"
"github.com/TheThingsNetwork/ttn/core/handler/device/migrate"
"github.com/TheThingsNetwork/ttn/core/storage"
"github.com/TheThingsN... |
//go:build gcp
// +build gcp
// NOTE: We use build tags to differentiate GCP testing for better isolation and parallelism when executing our tests.
package test
import (
"fmt"
"strings"
"testing"
"time"
"github.com/gruntwork-io/terratest/modules/gcp"
"github.com/gruntwork-io/terratest/modules/random"
"github... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: CryptoDelete.proto
package proto
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
// This is a com... |
/*
* Copyright (c) 2013, 2014 Conformal Systems LLC <<EMAIL>>
*
* 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"... |
package log
import (
"errors"
"os"
"sync"
"github.com/loft-sh/devspace/pkg/util/survey"
"github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/util/runtime"
)
// Logdir specifies the relative path to the devspace logs
var Logdir = "./.devspace/logs/"
var logs = map[string]Logger{}
var logsMutext sync.Mutex
va... |
package onetimetoken
import (
"bytes"
"context"
"encoding/json"
"fmt"
"net/http"
"github.com/kyma-incubator/compass/components/director/pkg/log"
"github.com/kyma-incubator/compass/components/director/internal/domain/client"
"github.com/avast/retry-go"
"github.com/kyma-incubator/compass/components/director/... |
// Copyright 2017 Pilosa Corp.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
package goDbApi
import (
"database/sql"
"errors"
"log"
"math/rand"
"os"
"time"
_ "github.com/mattn/go-sqlite3"
)
var DB *sql.DB
// InitDb initializes the db
func InitDb() {
var db *sql.DB
var err error
if (os.Getenv("DB_DRIVER") == "PG") {
db, err = initPg()
} else {
db, err = initSqlite()
}
if (... |
package tfserving
import (
"crypto/tls"
"github.com/kiteco/kiteco/kite-golib/errors"
"github.com/kiteco/kiteco/kite-golib/kitectx"
"github.com/kiteco/kiteco/kite-golib/kiteserver"
tf_proto "github.com/kiteco/kiteco/kite-golib/protobuf/tensorflow/core/framework"
serving_proto "github.com/kiteco/kiteco/kite-golib... |
package main
import (
"fmt"
log "github.com/sirupsen/logrus"
"io/ioutil"
"os"
"regexp"
"strings"
"time"
)
const (
letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" // map for random string
letterIdxBits = 6 // 6 bits to represent a let... |
package worker
import (
"fmt"
"net/http"
"time"
"github.com/allegro/akubra/internal/akubra/log"
"github.com/allegro/akubra/internal/akubra/metrics"
"github.com/allegro/akubra/internal/akubra/watchdog"
"github.com/allegro/akubra/internal/brim/model"
model2 "github.com/allegro/akubra/internal/brim/model"
"gith... |
/*
Copyright AppsCode Inc. and 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 by applicable law or agreed to in writing... |
package api
import (
"strconv"
"github.com/seccom/kpass/src/auth"
"github.com/seccom/kpass/src/bll"
"github.com/seccom/kpass/src/schema"
"github.com/seccom/kpass/src/util"
"github.com/teambition/gear"
)
// User is API oject for users
//
// @Name User
// @Description User API
// @Accepts json
// @Produces json
... |
package internal
import (
"fmt"
"html"
"log"
"os"
"strconv"
"strings"
)
type statics struct {
timer *myTimer
tables []*tableStatics
Config *Config
}
type tableStatics struct {
timer *myTimer
table string
alter *TableAlterData
alterRet error
schemaAfter string
}
func newStatics(cf... |
package smoke_tests_test
import (
"fmt"
"math/rand"
"os/exec"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gbytes"
"github.com/onsi/gomega/gexec"
)
var letters = []rune("abcdefghi")
func randSeq(n int) string {
b := make([]rune, n)
for i := range b {
b[i] = letters[rand.... |
package models
import (
"errors"
"fmt"
"time"
"github.com/dgrijalva/jwt-go"
"github.com/garyburd/redigo/redis"
)
var (
errWrongRole = errors.New("Wrong token role.")
errNoRoleClaim = errors.New("Claims do not contain role.")
errNoAdminClaim = errors.New("Claims do not contain admin.")
errNoSubClaim = ... |
// Copyright 2014 The Cockroach Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ag... |
/*
Copyright © 2020 NAME HERE <EMAIL ADDRESS>
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 writi... |
// Package v038 is used for legacy migration scripts. Actual migration scripts
// for v038 have been removed, but the v039->v042 migration script still
// references types from this file, so we're keeping it for now.
package v038
import (
"fmt"
"strings"
"time"
"github.com/Pylons-tech/cosmos-sdk/codec"
sdk "gith... |
package ibft
import (
"fmt"
"github.com/0xPolygon/polygon-edge/types"
"github.com/umbracle/fastrlp"
)
var (
// IstanbulDigest represents a hash of "Istanbul practical byzantine fault tolerance"
// to identify whether the block is from Istanbul consensus engine
IstanbulDigest = types.StringToHash("0x63746963616... |
// Copyright (C) MongoDB, Inc. 2017-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 sessionopt
import (
"reflect"
"github.... |
/*
Copyright 2018-2022 Mailgun Technologies 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 writing... |
package connector
import (
"fmt"
"os"
"os/signal"
"sync"
"syscall"
"time"
"github.com/nnset/iot-cloud-connector/bus"
"github.com/nnset/iot-cloud-connector/services"
"github.com/google/uuid"
"github.com/sirupsen/logrus"
)
// Cloud Connector have its own logging system, it will not interact in any way, with... |
package msgfmt
import (
"github.com/v2pro/plz/parse"
"unicode"
"github.com/v2pro/plz/parse/read"
"github.com/v2pro/plz/parse/skip"
"errors"
)
type lexer struct {
leftCurly *leftCurlyToken
literal *literalToken
variable *variableLexer
formatter *formatterLexer
merge func(left inter... |
package htm
import (
"fmt"
"github.com/cznic/mathutil"
"github.com/nupic-community/htm/utils"
//"github.com/skelterjohn/go.matrix"
//"math"
//"math/rand"
//"sort"
//"github.com/gonum/floats"
"github.com/zacg/ints"
)
/*
(n = half the number of average input columns on)
"random" - predict n random columns
"zer... |
package gentle
import (
"github.com/benbjohnson/clock"
"github.com/cenkalti/backoff"
"time"
)
// BackOffFactory creates a BackOff every time when RetryStream.Get()
// or RetryHandler.Handle() needs a series of back-offs.
type BackOffFactory interface {
NewBackOff() BackOff
}
const (
// BackOffStop is a sentinel... |
package helpers
import (
"bufio"
"context"
"fmt"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm"
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/ioutils"
"github.com/docker/docker/pkg/stdcopy"
"github.com/stretchr/testify/require"
"io"
"os"
"sync"
"sync/atom... |
package hjem
import (
"errors"
"regexp"
"strconv"
"strings"
"gorm.io/gorm"
)
var (
ErrInvalidZipCodes = errors.New("invalid zip code format")
ErrInvalidPropertyType = errors.New("invalid property type format")
ErrUnknownAddr = errors.New("unknown address")
)
type Config struct {
PropertyTypes [... |
/* Copyright (c) 2021 <NAME> */
package main
import (
"bufio"
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"regexp"
"runtime"
"strings"
. "github.com/dbulkow/reservations/api"
"github.com/spf13/cobra"
)
func init() {
configCmd := &cobra.Command{
Use: "config",
Alias... |
//
// Copyright 2016 <NAME>. 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 ... |
package cmd
import (
"errors"
"fmt"
"os"
"strconv"
"strings"
"github.com/suzuki-shunsuke/github-comment/pkg/api"
"github.com/suzuki-shunsuke/github-comment/pkg/comment"
"github.com/suzuki-shunsuke/github-comment/pkg/config"
"github.com/suzuki-shunsuke/github-comment/pkg/option"
"github.com/suzuki-shunsuke/g... |
package podcast
import (
"encoding/xml"
"fmt"
"strconv"
"unicode/utf8"
"github.com/podpalinc/rss-feed-generator/html2text"
)
// Item represents a single entry in a podcast.
//
// Article minimal requirements are:
// - Title
// - Description
// - Link
//
// Audio minimal requirements are:
// - Title
// - Descrip... |
/*
* @Author: EagleXiang
* @Github: https://github.com/eaglexiang
* @Date: 2019-01-04 14:30:39
* @LastEditors: EagleXiang
* @LastEditTime: 2019-08-28 19:51:38
*/
package httpproxy
import (
"errors"
"fmt"
"net/url"
"strings"
"github.com/eaglexiang/go/logger"
mynet "github.com/eaglexiang/go/net"
"github.c... |
package logging
import (
"crypto/tls"
"net/http"
"net/http/httptrace"
"net/url"
"sync"
"time"
"github.com/sirupsen/logrus"
"github.com/avenga/couper/config/env"
"github.com/avenga/couper/config/request"
"github.com/avenga/couper/errors"
"github.com/avenga/couper/handler/validation"
)
var _ http.RoundTrip... |
package mqtt
import (
"bytes"
"encoding/binary"
"fmt"
"io"
lp "github.com/unit-io/unitd/lineprotocol"
)
type FixedHeader lp.FixedHeader
type LineProto struct {
}
// ReadPacket unpacks the packet from the provided reader.
func (p *LineProto) ReadPacket(r io.Reader) (lp.Packet, error) {
var fh FixedHeader
if ... |
package aws
import (
"errors"
"fmt"
"strings"
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
)
func TestAccAWSAMICopy(t *testing.T) {
var ami... |
package api
import (
"fmt"
"image"
"image/color"
"io/ioutil"
"math"
"math/rand"
"github.com/fogleman/gg"
"golang.org/x/image/font/opentype"
)
// Params defines the parameters used to draw a vizualization
type Params struct {
N int
Max int32
Filename string
Format ImageFormat
Width int
Height ... |
package okta
import (
"errors"
"fmt"
"net/url"
"time"
)
const (
groupRuleStatus = "ACTIVE"
groupRuleTypeFilter = "group_rule"
groupRuleNameFilter = "q"
groupRuleLastUpdatedFilter = "lastUpdated"
groupRuleExpressionType = "urn:okta:expression:1.0"
)
type GroupRuleService service
... |
package types
import (
"bytes"
"fmt"
"strings"
"time"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/params"
"github.com/cosmos/cosmos-sdk/x/params/subspace"
)
// DefaultParamspace defines the default auth module parameter subspa... |
package services
import (
"bytes"
"fmt"
"io"
"net/http"
"net/url"
"os"
"path/filepath"
"strings"
"github.com/hooklift/iso9660"
log "github.com/sirupsen/logrus"
)
// TODO - This currently is inefficient and results in an open/parse of an iso for every file operation.
// github.com/qeedquan/iso9660 may need ... |
/*
Copyright 2021-2022 The Volcano 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 2017 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 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 wifi
import (
"context"
"time"
"github.com/golang/protobuf/ptypes/empty"
"chromiumos/tast/ctxutil"
"chromiumos/tast/errors"
"chromiumo... |
// Package identity_store provides the tooling to build the Raito identity store import files.
// Simply use the NewIdentityStoreFileCreator function by passing in the config coming from the CLI
// to create the necessary files.
// The returned IdentityStoreFileCreator can then be used (using the AddUsers and AddGroups... |
package jsx
import (
"bytes"
"fmt"
"strings"
"github.com/robertkrimen/otto/ast"
"github.com/robertkrimen/otto/file"
"github.com/robertkrimen/otto/parser"
)
// React implements Visitor.
// Should be called with Walk(NewReact(...), node).
type React struct {
fset *file.FileSet
errList parser.ErrorList
file... |
package snap_printer
import (
"github.com/evanw/esbuild/internal/js_ast"
"regexp"
)
// Tracks `let` statements that need to be inserted at the top level scope and
// the top of the file.
// This is the simplest way to ensure that the replacement functions are declared
// before they are used and accessible where ne... |
package cwmpclient
import (
"bytes"
"encoding/xml"
"fmt"
"github.com/lucacervasio/mosesacs/cwmp"
"github.com/lucacervasio/mosesacs/daemon"
"github.com/lucacervasio/mosesacs/xmpp"
"io/ioutil"
"log"
"math/rand"
"net/http"
"net/http/cookiejar"
"net/url"
"strconv"
"time"
)
var (
defaultHTTPListenAddr strin... |
package transcoder
import (
"context"
"io"
"testing"
"github.com/ericxtang/m3u8"
"github.com/livepeer/lpms/stream"
"github.com/nareix/joy4/av"
)
type Counter struct {
Count int
}
type PacketsDemuxer struct {
c *Counter
}
func (d PacketsDemuxer) Close() error { return nil }
func (d Packet... |
// Copyright 2020 The LUCI 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 main
import (
"labix.org/v2/mgo/bson"
"time"
)
type Cdr struct {
calldate time.Time
clid string
src string
dst string
channel string
dcontext string
disposition string
billsec int
duration int
uniqueid string
dstchannel string
recordfile string
waitA... |
package validator
import (
"database/sql/driver"
"encoding/base64"
"reflect"
"regexp"
"strconv"
"strings"
"authcore.io/authcore/internal/clientapp"
"authcore.io/authcore/internal/errors"
"authcore.io/authcore/pkg/httputil"
"authcore.io/authcore/pkg/nulls"
"github.com/go-playground/validator/v10"
"github.... |
/* Copyright (c) 2016-2017 - CloudPerceptions, 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 requir... |
// Copyright 2021 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 main
import (
"fmt"
"net/http"
"os"
"strconv"
"strings"
"github.com/gin-gonic/gin"
"gopkg.in/redis.v2"
)
type Ad struct {
Slot string `json:"slot"`
Id string `json:"id"`
Title string `json:"title"`
Type string `json:"type"`
Advertiser string `json:"advertiser"`
Dest... |
package cache
import (
"errors"
"sync"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/apiserver/pkg/authentication... |
// Package generate is used to generate resource and property functions from the CloudFormation specification.
// Each function is registered with it's respective map, resourceFuncs or propertyFuncs.
//
package main
import (
"bytes"
"errors"
"fmt"
"os"
"sort"
"strings"
"text/template"
"github.com/awslabs/aws-... |
package cart
//TODO: Rework test to look like item_test.go
import (
"github.com/google/uuid"
// "reflect"
"testing"
"github.com/jmoiron/sqlx"
_ "github.com/lib/pq"
)
var db *sqlx.DB
var id uuid.UUID
func TestCart(t *testing.T) {
var err error
db, err = sqlx.Connect("postgres", "postgres://webForum_RW:reachme... |
package libhealth
import (
"bytes"
"encoding/json"
"net/http"
"os"
"strconv"
"strings"
"time"
"oss.indeed.com/go/libtime"
)
// The exposed endpoints for private healthchecks.
const (
PrivateHealthCheck = `/private/healthcheck`
PrivateHealthCheckLive = `/private/healthcheck/live`
)
const (
privateBad ... |
package vm
import (
"bytes"
"fmt"
"github.com/rooby-lang/rooby/bytecode"
"strings"
)
// VM represents a stack based virtual machine.
type VM struct {
// a stack that holds call frames
callFrameStack *callFrameStack
// call frame pointer
cfp int
// data stack
stack *stack
// stack pointer
sp int
// a map ... |
package ui
import (
"fmt"
"github.com/charmbracelet/bubbles/help"
"github.com/charmbracelet/bubbles/key"
"github.com/charmbracelet/bubbles/list"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/ibrokemypie/kwatch/pkg/cfg"
)
type childView int
const (
filePicker childV... |
package server
import (
"context"
"errors"
"strings"
"time"
"github.com/findy-network/findy-agent/agent/agency"
"github.com/findy-network/findy-agent/agent/bus"
"github.com/findy-network/findy-agent/agent/comm"
"github.com/findy-network/findy-agent/agent/e2"
"github.com/findy-network/findy-agent/agent/handsh... |
// Copyright 2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
package typhon
import (
"context"
"fmt"
"regexp"
"strings"
"github.com/monzo/terrors"
)
// We use a custom type to guarantee we won't get a collision with another package. Using an anonymous struct type
// directly means we'd get a collision with any other package that does the same.
// https://play.golang.org/... |
package storage
import (
"Kart/utils"
"bytes"
"fmt"
"io"
"os"
"path/filepath"
// "syscall"
// "github.com/spf13/viper"
"Kart/config"
)
// Storage 存储
type Storage struct {
DirPath string
// BlockNum int
BlockList []*Block
FreeList []*Section
Indexes *IndexDB
Buckets *BucketDB
Users... |
// Copyright 2011 <NAME>. 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 (
"os"
"regexp"
"strconv"
"fmt"
"path/filepath"
"strings"
)
func UndoCmd(args []string) (err os.Error) {
if len(args) != 0 {
return os.Ne... |
/* The Computer Language Benchmarks Game
* http://benchmarksgame.alioth.debian.org/
*
* contributed by The Go Authors.
* based on C program by <NAME>
* flag.Arg hack by <NAME>
*/
package main
import (
"flag"
"fmt"
"math"
"strconv"
)
var n = 0
type Body struct {
x, y, z, vx, vy, vz, mass float64... |
package connect
import (
"net/url"
"strconv"
cconf "github.com/pip-services3-go/pip-services3-commons-go/config"
cerr "github.com/pip-services3-go/pip-services3-commons-go/errors"
crefer "github.com/pip-services3-go/pip-services3-commons-go/refer"
cauth "github.com/pip-services3-go/pip-services3-components-go/a... |
// 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... |
package main
import (
"context"
"sync"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/hcl"
"github.com/spiffe/spire/pkg/common/catalog"
nodeattestorbase "github.com/spiffe/spire/pkg/server/plugin/nodeattestor/base"
"github.com/spiffe/spire/proto/spire/common"
"github.com/spiffe/spire/proto/spire/common... |
/*
* Copyright (c) 2021, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
package github
import "time"
// TokenResponse represents a API token returned by the Gith... |
// -*- compile-command: "go build && ./utron && fstl utron.stl"; -*-
package main
import (
"math"
"github.com/gmlewis/pt/examples/utron/enclosure"
"github.com/gmlewis/pt/examples/utron/half-magnet"
"github.com/gmlewis/pt/examples/utron/half-utron"
. "github.com/gmlewis/pt/pt"
)
// All dimensions in mm
const (
... |
// +build integration_test
package handlers
import (
"sort"
"testing"
"github.com/ldsec/medco/connector/restapi/server/operations/genomic_annotations"
utilserver "github.com/ldsec/medco/connector/util/server"
"github.com/sirupsen/logrus"
)
var variantNameGetValuesValue = "78"
var variantNameGetValuesResult = [... |
package broker
import (
"crypto/rsa"
"encoding/json"
"fmt"
"io/ioutil"
"log"
mrand "math/rand"
"net/http"
"net/url"
"strconv"
"strings"
"time"
"bitbucket.org/mikelsr/sakaban-broker/auth"
)
// Broker stores information about peers indexed by their public key
type Broker struct {
Auths map[token]session
... |
/*
Copyright © 2020 ConsenSys
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
dis... |
/*
* Copyright (C) 2020 Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
package mocks
import (
"encoding/json"
"io/ioutil"
"reflect"
"time"
"github.com/google/uuid"
"github.com/intel-secl/intel-secl/v4/pkg/hvs/constants"
"github.com/intel-secl/intel-secl/v4/pkg/hvs/domain"
"github.com/intel-se... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cognitoidentityprovider
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
type AdminListUserAuthEventsInput struct {
_ struct{} `type:"structure"`
// The maximum number of authent... |
/*******************************************************************************
* Copyright 2019 Dell 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/licen... |
package client
import (
"fmt"
"github.com/hyperledger/fabric-sdk-go/pkg/client/channel"
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/context"
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/core"
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab"
"github.com/hyperledger/fab... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.