text stringlengths 5.51k 28.1k |
|---|
// Copyright 2020 gorse Project Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed ... |
// Copyright 2016 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 frontend
import (
"fmt"
"io"
"net/http"
"regexp"
"sort"
"strconv"
"strings"
"sync"
"time"
"infra/experimental/appengine/buildbucket-vi... |
package tetris
import (
"fmt"
"log"
"os"
"strconv"
"strings"
"time"
"github.com/gotk3/gotk3/cairo"
"github.com/gotk3/gotk3/gdk"
"github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/gtk"
)
const (
SIGNAL_ACTIVATE = "activate"
SIGNAL_DRAW = "draw"
SIGNAL_KEY_PRESS_EVENT = "key-press-eve... |
// Copyright 2016-2017 Authors of Cilium
//
// 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 2019 Cisco Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
/*
Copyright © 2020 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 agreed to in writing, software... |
package seth
import (
"bytes"
"compress/gzip"
"encoding/hex"
"encoding/json"
"fmt"
"hash"
"io"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"sort"
"strconv"
"strings"
"github.com/newalchemylimited/seth/keccak"
"github.com/tinylib/msgp/msgp"
)
type sourcefile struct {
Content string `json:"content"`
}
... |
// Copyright (c) 2018-2021, <NAME> and the Choria Project contributors
//
// SPDX-License-Identifier: Apache-2.0
package config
import (
"errors"
"fmt"
"os"
"path/filepath"
"runtime"
"strings"
"github.com/choria-io/go-choria/build"
"github.com/fatih/color"
log "github.com/sirupsen/logrus"
"github.com/chor... |
/*
Copyright 2019 Cisco Systems
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
// Copyright 2020 ConsenSys 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 to in... |
// Copyright 2015-2019 Bleemeo
//
// bleemeo.com an infrastructure monitoring solution in the Cloud
//
// 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/LI... |
package framework
import (
"fmt"
"sort"
"github.com/CCDirectLink/CCUpdaterOC/frenyard"
)
// Implements a highly limited subset of flexbox to be extended to full support as-needed.
// FlexboxWrapMode describes a type of wrapping mode for Flexbox containers.
type FlexboxWrapMode uint8
// FlexboxWrapModeNone disal... |
// Copyright 2015 <NAME> (LA5NTA). All rights reserved.
// Use of this source code is governed by the MIT-license that can be
// found in the LICENSE file.
package fbb
import (
"bufio"
"bytes"
"errors"
"fmt"
"io"
"log"
"mime"
"strconv"
"strings"
"time"
"github.com/la5nta/wl2k-go/transport"
)
var ErrOffse... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.1
// source: api/plugin/v1/error.proto
package v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync ... |
package template
import (
"path/filepath"
"context"
. "github.com/dave/jennifer/jen"
mstrings "github.com/devimteam/microgen/generator/strings"
"github.com/devimteam/microgen/generator/write_strategy"
)
const (
nameInterruptHandler = "InterruptHandler"
nameMain = "main"
nameInitLogger = "I... |
package app
import (
"encoding/json"
"fmt"
pub "github.com/go-ap/activitypub"
"github.com/go-ap/auth"
"github.com/go-ap/errors"
"github.com/go-ap/fedbox/activitypub"
"github.com/go-ap/fedbox/cmd"
"github.com/go-ap/storage"
"github.com/openshift/osin"
"github.com/sirupsen/logrus"
"github.com/unrolled/render"... |
// Copyright 2016 The Gosl 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 msh
import "github.com/cpmech/gosl/la"
// FuncHex8 calculates the shape functions (S) and derivatives of shape functions (dSdR) of hex8
// elements ... |
/*
Copyright 2021 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, ... |
/**
* @file
* @copyright defined in aergo/LICENSE.txt
*/
package p2p
import (
"os"
"path/filepath"
"sync"
"time"
"github.com/aergoio/aergo/p2p/metric"
"github.com/aergoio/aergo/p2p/p2pcommon"
"github.com/aergoio/aergo/p2p/p2putil"
subproto "github.com/aergoio/aergo/p2p/subproto"
"github.com/aergoio/ae... |
/**
*
* Copyright 2021- IBM Inc. All rights reserved
* SPDX-License-Identifier: Apache2.0
*
* 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/LICEN... |
package main
// smaller sun & moon, underwater
// moon shape, hide stars behind the moon
import (
"fmt"
"math"
"time"
"github.com/losinggeneration/hge"
. "github.com/losinggeneration/hge/gfx"
"github.com/losinggeneration/hge/helpers/color"
dist "github.com/losinggeneration/hge/helpers/distortionmesh"
"github... |
/*
* Copyright 2021 Comcast Cable Communications Management, 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... |
package processor
// #include "ogr_api.h"
// #include "ogr_srs_api.h"
// #cgo pkg-config: gdal
import "C"
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"net/url"
"strings"
"time"
"unsafe"
"github.com/edisonguo/jet"
geo "github.com/nci/geometry"
"github.com/nci/gsky... |
package main
import (
"bufio"
"fmt"
"math"
"os"
)
func doLines(filename string, do func(line string) error) error {
f, err := os.Open(filename)
if err != nil {
return err
}
defer f.Close()
scanner := bufio.NewScanner(f)
for scanner.Scan() {
line := scanner.Text()
if err := do(line); err != nil {
r... |
package tstoreds
import (
"context"
"fmt"
"sort"
"sync"
"time"
lru "github.com/hashicorp/golang-lru"
ds "github.com/ipfs/go-datastore"
"github.com/ipfs/go-datastore/query"
logging "github.com/ipfs/go-log"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-peerstore/pstoremem"
ma "github.... |
/*
* Copyright (c) 2013-2017, <NAME> (<<EMAIL>>)
*
* 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 2015 Pikkpoiss
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wr... |
// Package handler provides a HTTP handler for the web server.
package handler
import (
"encoding/json"
"log"
"net/http"
"net/url"
"path"
"strings"
"time"
"github.com/go-chi/chi"
"github.com/gorilla/securecookie"
"github.com/jjeffery/errors"
"github.com/jjeffery/httpapi"
"github.com/jjeffery/kv"
"github.... |
package main
import (
"fmt"
"net/http"
"net/url"
"os"
"strings"
)
func main() {
if len(os.Args) != 2 {
fmt.Println("Usage: ", os.Args[0], "http://host:port/page")
os.Exit(1)
}
url, err := url.Parse(os.Args[1])
checkError(err)
client := &http.Client{}
request, err := http.NewRequest("GET", url.String(... |
/*
Copyright (C) 2018 Synopsys, Inc.
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
"... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: moc_cloudagent_etcdserver.proto
package cloud
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
common "github.com/microsoft/moc/rpc/common"
grpc "google.golang.org/grpc"... |
package analyticEngine
import (
"context"
"fmt"
"google.golang.org/grpc"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"log"
"net"
"openmcp/openmcp/omcplog"
"openmcp/openmcp/openmcp-analytic-engine/pkg/influx"
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.14.0
// source: spire/plugin/types/bundle.proto
package types
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflec... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/solo-io/gloo/projects/gloo/api/external/envoy/config/trace/v3/zipkin.proto
package v3
import (
bytes "bytes"
fmt "fmt"
math "math"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
_ "github.com/gogo/protobuf/gogoproto"
proto "github... |
package main
import (
"fmt"
"os"
"net/http"
"log"
"strings"
"regexp"
"strconv"
"time"
//"reflect"
"github.com/PuerkitoBio/goquery"
"gopkg.in/headzoo/surf.v1"
)
const Version = "0.11"
// This is the main user data structure
type Player struct {
Name string
Jobtxt string
Mainjob string
Mainlevel int
Su... |
package lib
import (
"time"
)
// A tetromino that also has positional information so it can move
// around a board
type ActiveTetromino struct {
*Tetromino
Position
}
type Direction int
type Position struct {
x, y int
}
const (
UP Direction = iota
DOWN
LEFT
RIGHT
)
const STARTING_X = 4
const STARTING_Y = 2... |
package testassets
import (
"encoding/json"
"github.com/macinnir/dvc/core/lib/utils/db"
"github.com/macinnir/dvc/core/lib/utils/query"
"gopkg.in/guregu/null.v3"
)
const (
Job_TableName query.TableName = "Job"
// Columns
Job_Column_JobID query.Column = "JobID"
Job_Column_DateCreated ... |
// Copyright (c) 2019, The Emergent 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"
"log"
"math/rand"
"strings"
"github.com/emer/emergent/env"
"github.com/emer/emergent/erand"
"github.com... |
// Copyright (c) <NAME>. (https://github.com/jeevatkm)
// Source code and usage is governed by a MIT style
// license that can be found in the LICENSE file.
package aah
import (
"errors"
"io"
"net/http"
"sync"
"time"
"aahframe.work/ahttp"
"aahframe.work/ainsp"
"aahframe.work/aruntime"
"aahframe.work/essenti... |
package system
import (
"encoding/json"
"fmt"
"log"
"regexp"
"strconv"
"strings"
"sync"
"time"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins/inputs"
"github.com/fsouza/go-dockerclient"
)
type Docker struct {
Endpoint string
ContainerNames []string
client DockerClient
... |
package metadata
import (
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"github.com/fivebinaries/go-cardano-serialization/hash_map"
"github.com/fxamacker/cbor/v2"
"strconv"
"strings"
)
// MetadataJsonSchema
// Different schema methods for mapping between JSON and the metadata CBOR.
// This conversion should m... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: yandex/cloud/mdb/mysql/v1/backup_service.proto
package mysql
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "github.com/yandex-cloud/go-genproto/yandex/cloud"
_ "google.golang.org/genproto/googleapis/api/annotations"
gr... |
/*
Copyright 2020 Authors of Arktos.
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, softw... |
package codeamp
import (
"bytes"
"context"
"errors"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"strings"
"time"
"github.com/codeamp/circuit/plugins"
graphql_resolver "github.com/codeamp/circuit/plugins/codeamp/graphql"
"github.com/codeamp/circuit/plugins/codeamp/model"
log "github.com/codeamp/logg... |
/* Copyright (c) 2018 Cisco and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
// Copyright 2016 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 chacha20 implements the ChaCha20 and XChaCha20 encryption algorithms
// as specified in RFC 8439 and draft-irtf-cfrg-xchacha-01.
package chacha20
im... |
// Copyright (c) 2021 Apptainer a Series of LF Projects LLC
// For website terms of use, trademark policy, privacy policy and other
// project policies see https://lfprojects.org/policies
// Copyright (c) 2020, Control Command Inc. All rights reserved.
// Copyright (c) 2018-2021, Sylabs Inc. All rights reserved.
//... |
package restore
import (
"context"
"database/sql"
"fmt"
"sort"
"strings"
"sync"
"testing"
"time"
"github.com/DATA-DOG/go-sqlmock"
"github.com/pingcap/errors"
. "github.com/pingcap/tidb/br/pkg/lightning/checkpoints"
"github.com/pingcap/tidb/ddl"
"github.com/pingcap/tidb/kv"
"github.com/pingcap/tidb/parse... |
package block
import (
"encoding/json"
"fmt"
"hash/crc32"
"math/rand"
"os"
"path/filepath"
"sort"
"strings"
"time"
"github.com/go-kit/kit/log"
"github.com/improbable-eng/thanos/pkg/runutil"
"github.com/oklog/ulid"
"github.com/pkg/errors"
"github.com/prometheus/tsdb"
"github.com/prometheus/tsdb/chunks"
... |
/* Deals with getting Keep Server blocks from API Server and Keep Servers. */
package keep
import (
"bufio"
"encoding/json"
"errors"
"flag"
"fmt"
"git.curoverse.com/arvados.git/sdk/go/arvadosclient"
"git.curoverse.com/arvados.git/sdk/go/blockdigest"
"git.curoverse.com/arvados.git/sdk/go/keepclient"
"git.curo... |
package server
import (
"context"
"encoding/json"
"fmt"
"math/big"
"net"
"net/http"
"net/http/httputil"
"net/url"
"os"
"path/filepath"
"time"
"github.com/filecoin-project/go-address"
"github.com/improbable-eng/grpc-web/go/grpcweb"
"github.com/ipfs/go-datastore"
badger "github.com/ipfs/go-ds-badger2"
h... |
package acdef
import (
"crypto/md5"
"encoding/hex"
"github.com/cgabriel5/compiler/utils/slices"
"github.com/cgabriel5/compiler/utils/structs"
ps "github.com/cgabriel5/compiler/utils/parsetools"
"github.com/elliotchance/orderedmap"
"regexp"
"sort"
"strconv"
"strings"
"time"
)
type Flag = structs.Flag
type S... |
// Copyright 2018 The vault-operator 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 o... |
// Copyright 2019 The Hugo 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 ... |
// 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 2017 Datadog, Inc.
// +build docker
package docker
import (
"context"
"fmt"
"os"
"regexp"
"st... |
// Copyright 2020 Coinbase, 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... |
// Package kubernetes contains an observer that watches the Kubernetes API for
// pods and nodes that are running on the same node as the agent. It uses the
// streaming watch API in K8s so that updates are seen immediately without any
// polling interval.
package kubernetes
import (
"errors"
"fmt"
"os"
"reflect"... |
// Package parser implements a parser for HCL (HashiCorp Configuration
// Language)
package parser
import (
"errors"
"fmt"
"strings"
"github.com/hashicorp/hcl/hcl/ast"
"github.com/hashicorp/hcl/hcl/scanner"
"github.com/hashicorp/hcl/hcl/token"
)
type Parser struct {
sc *scanner.Scanner
// Last read token
t... |
// Copyright 2019 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 discord
// https://discord.com/developers/docs/resources/guild#guild-object
type Guild struct {
// ID is the guild id.
ID GuildID `json:"id"`
// Name is the guild name (2-100 characters, excluding trailing and leading
// whitespace).
Name string `json:"name"`
// Icon is the icon hash.&nullableUint64{}
I... |
// Copyright 2017 GRAIL, Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
// Package values defines data structures for representing (runtime) values
// in Reflow. Any valid reflow type has representable values (see grail.com/reflow/ty... |
// Code generated by go-swagger; DO NOT EDIT.
package operations
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"net/http"
"strings"
"github.com/go-openapi/errors"
"github.com/go-openapi/loads"
"github.com/go-... |
// 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 not... |
package exporter
import (
"context"
"crypto/md5"
"fmt"
"log"
"os"
"os/exec"
"regexp"
"sort"
"strconv"
"strings"
"github.com/databrickslabs/terraform-provider-databricks/common"
"github.com/databrickslabs/terraform-provider-databricks/compute"
"github.com/databrickslabs/terraform-provider-databricks/ident... |
// The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Soft... |
// 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 beachfront
import (
"encoding/json"
"errors"
"fmt"
"net/http"
"strings"
"github.com/golang/glog"
"github.com/mxmCherry/openrtb"
"github.com/prebid/prebid-server/adapters"
"github.com/prebid/prebid-server/errortypes"
"github.com/prebid/prebid-server/openrtb_ext"
)
const Seat = "beachfront"
const Bid... |
// Copyright (c) 2021 <NAME>. All rights reserved.
// Use of this source code is governed by the Apache License, Version 2.0
// that can be found in the LICENSE file.
//
//go:build darwin && cgo
// +build darwin,cgo
package main
import (
"errors"
"flag"
"fmt"
"io/fs"
"log"
"os"
"os/exec"
"path/filepath"
"reg... |
package evaluator
import (
"aura/src/ast"
b "aura/src/builtins"
obj "aura/src/object"
"unicode/utf8"
)
// evlauate given nodes of the ast
func Evaluate(baseNode ast.ASTNode, env *obj.Enviroment) obj.Object {
switch node := baseNode.(type) {
case *ast.Program:
return evaluateProgram(node, env)
case *ast.Exp... |
package view
import (
"errors"
"fmt"
sq "github.com/Masterminds/squirrel"
pagination_interface "github.com/crypto-com/chain-indexing/appinterface/pagination"
"github.com/crypto-com/chain-indexing/appinterface/projection/view"
"github.com/crypto-com/chain-indexing/appinterface/rdb"
"github.com/crypto-com/chain... |
package net
import (
"context"
"errors"
routing "gx/ipfs/QmSY3nkMNLzh9GdbFKK5tT7YMfLpf52iUZ8ZRkr29MJaa5/go-libp2p-kad-dht"
libp2p "gx/ipfs/QmTW4SdgBWq9GjsBsHeUx8WuGxzhgzAf88UMH2w62PC8yK/go-libp2p-crypto"
ma "gx/ipfs/QmTZBfrPJmjWsCvHEtX5FE6KimVJhsJg5sBbqEFYf4UZtL/go-multiaddr"
"gx/ipfs/QmTbxNB1NwDesLmKTscr4udL2t... |
package main
import (
"bufio"
"flag"
"fmt"
"io"
"log"
"net/http"
"os"
"os/signal"
"path/filepath"
"sort"
"strings"
"syscall"
"time"
//_ "net/http/pprof"
"github.com/VictoriaMetrics/metrics"
ui "github.com/gizak/termui/v3"
"github.com/shibukawa/configdir"
"github.com/xxxserxxx/opflag"
"github.com/... |
package env
import (
"fmt"
"net"
"os"
"strconv"
"strings"
"sync"
cstructs "github.com/hashicorp/nomad/client/structs"
"github.com/hashicorp/nomad/helper"
hargs "github.com/hashicorp/nomad/helper/args"
"github.com/hashicorp/nomad/nomad/structs"
)
// A set of environment variables that are exported by each d... |
// Copyright 2018 The Kubeflow 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.12.4
// source: pkg/functions/grpc/pod-create.proto
package grpc
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "ref... |
// Copyright 2015 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... |
// Code generated by go-swagger; DO NOT EDIT.
package networking
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.c... |
package mariner
import (
"context"
"fmt"
"math"
"os"
"strings"
batchv1 "k8s.io/api/batch/v1"
k8sv1 "k8s.io/api/core/v1"
k8sResource "k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// this file contains code for creating job spec for mariner-engine and mariner-task jobs... |
package geom
import (
"fmt"
"github.com/stretchr/testify/assert"
"testing"
)
func TestCreateMatrix2x2(t *testing.T) {
m2 := NewMat2x2([]float64{-3, 5, 1, -2})
assert.Equal(t, -3.0, m2.Get(0, 0))
assert.Equal(t, 5.0, m2.Get(0, 1))
assert.Equal(t, 1.0, m2.Get(1, 0))
assert.Equal(t, -2.0, m2.Get(1, 1))
}
func T... |
package main
import (
"fmt"
"io/ioutil"
"net"
"os"
"os/signal"
"strconv"
"strings"
"syscall"
"time"
// "github.com/davecgh/go-spew/spew"
"github.com/jessevdk/go-flags"
"github.com/xing/beetle/consul"
"github.com/xing/beetle/daemonize"
"gopkg.in/yaml.v2"
)
var opts struct {
Verbose boo... |
package browser
import (
"context"
"encoding/base64"
"fmt"
"github.com/gopcua/opcua"
"github.com/gopcua/opcua/id"
"github.com/gopcua/opcua/ua"
log "github.com/sirupsen/logrus"
"math"
"strings"
"time"
)
type UABrowse struct {
Client *opcua.Client
Nodes map[string]*NodeDef
Host ... |
package workflow
import (
"cane-project/api"
"cane-project/database"
"cane-project/model"
"cane-project/util"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"reflect"
"regexp"
"strconv"
"strings"
//"github.com/mongodb/mongo-go-driver/mongo/options"
"go.mongodb.org/mongo-driver/mongo/o... |
// Copyright 2021 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 (C) 2019-2021 vdaas.org vald team <<EMAIL>>
//
// 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 a... |
package docxplate
import (
"archive/zip"
"bytes"
"encoding/xml"
"fmt"
"io"
"io/ioutil"
"log"
"regexp"
)
// Template ..
type Template struct {
path string
zipr *zip.ReadCloser // zip reader
// save all zip files here so we can build it again
files map[string]*zip.File
// only modified files (converted t... |
package rmtool
import (
"bufio"
"bytes"
"encoding/json"
"fmt"
"io"
"strconv"
"strings"
"github.com/akeil/rmtool/internal/errors"
)
// TrashFolder is the ID whoch is used for the reMArkable trash folder.
// Items that have been soft-deleted have their parent ID set to this value.
const TrashFolder = "trash"
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.13.0
// source: wrapper.proto
package protocol
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/... |
// 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
package handlers
import (
"fmt"
"github.com/vouch/vouch-proxy/handlers/adfs"
"github.com/vouch/vouch-proxy/handlers/common"
"github.com/vouch/vouch-proxy/handlers/github"
"github.com/vouch/vouch-proxy/handlers/google"
"github.com/vouch/vouch-proxy/handlers/homeassistant"
"github.com/vouch/vouch-proxy/handlers/i... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: bootstrap.proto
package bootstrap
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
types "github.com/gogo/protobuf/types"
auth "github.com/easyopsapis/easyops-api-go/protorepo-models/easyops/model/auth"
... |
package web
import (
"encoding/json"
"fmt"
"github.com/go-martini/martini"
"github.com/gorilla/securecookie"
"github.com/martini-contrib/binding"
"github.com/martini-contrib/render"
"github.com/martini-contrib/sessionauth"
"github.com/martini-contrib/sessions"
"hash/fnv"
"html/template"
"log"
"mdrobek/watn... |
package main
import (
"bytes"
"encoding/json"
"flag"
"html/template"
"io"
"log"
"net/http"
"os"
"os/signal"
"os/user"
"strconv"
"strings"
"syscall"
"github.com/gorilla/websocket"
"github.com/svagner/go-gitlab/config"
"github.com/svagner/go-gitlab/events"
"github.com/svagner/go-gitlab/git"
daemon "gi... |
package main
import (
"flag"
"net/http"
"os"
"os/signal"
"path/filepath"
"strings"
"sync"
"syscall"
"time"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/dyn... |
package kubectlwrappers
import (
"bufio"
"flag"
"fmt"
"path"
"strings"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"k8s.io/cli-runtime/pkg/genericclioptions"
kclientcmd "k8s.io/client-go/tools/clientcmd"
"k8s.io/kubernetes/pkg/kubectl/cmd/annotate"
"k8s.io/kubernetes/pkg/kubectl/cmd/apiresources"
"... |
package generator
import (
"fmt"
"strconv"
"strings"
"github.com/jhump/protoreflect/desc"
"github.com/vektah/gqlparser/v2/ast"
"google.golang.org/protobuf/proto"
descriptor "google.golang.org/protobuf/types/descriptorpb"
gqlpb "github.com/fizx/go-proto-gql/pb"
)
func NewSchemas(files []*desc.FileDescriptor,... |
// Copyright 2014 beego Author. 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 applica... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.9.1
// source: wso2/discovery/config/enforcer/issuer.proto
package enforcer
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google... |
package logmux
import (
"bufio"
"bytes"
"io"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
logagg "github.com/flynn/flynn/logaggregator/types"
"github.com/flynn/flynn/logaggregator/utils"
"github.com/flynn/flynn/pkg/stream"
"github.com/flynn/flynn/pkg/syslog... |
// Package pki allows to manage Kubernetes PKI certificates.
package pki
import (
// #nosec G505
"bytes"
"crypto/rand"
"crypto/rsa"
"crypto/sha1"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"fmt"
"math/big"
"net"
"sort"
"strings"
"time"
"sigs.k8s.io/yaml"
"github.com/flexkube/libflexkube/pkg/ty... |
//go:generate go run generate/main.go
package i18naddress
import (
"encoding/json"
"fmt"
"io"
"regexp"
"sort"
"strings"
)
var (
VALID_COUNTRY_CODE *regexp.Regexp // regexp for checking country code
FORMAT_REGEX *regexp.Regexp //
VALIDATION_DATA_PATH string // path to .json files
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.