text stringlengths 3.08k 10.4k |
|---|
package main
import (
"fmt"
"github.com/losinggeneration/hge"
. "github.com/losinggeneration/hge/gfx"
"github.com/losinggeneration/hge/helpers/font"
"github.com/losinggeneration/hge/helpers/particle"
"github.com/losinggeneration/hge/helpers/sprite"
. "github.com/losinggeneration/hge/input"
. "github.com/losin... |
/*
Copyright © 2020 <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 law or agreed to in writing, softw... |
package main
import (
"database/sql"
"errors"
"fmt"
"html/template"
"log"
"net/http"
"strings"
"github.com/julienschmidt/httprouter"
_ "github.com/lib/pq" // the underscore allows for import without explicit reference
"github.com/satori/go.uuid"
)
var db *sql.DB
var tpl *template.Template
func init() {
t... |
package dns
import (
"context"
"crypto/md5"
"errors"
"fmt"
"io"
"strconv"
"strings"
"github.com/aws/aws-sdk-go/aws"
v1 "github.com/kuadrant/kcp-glbc/pkg/apis/kuadrant/v1"
"github.com/kuadrant/kcp-glbc/pkg/cluster"
"github.com/kuadrant/kcp-glbc/pkg/dns"
)
// healthChecksConfig represents the user configur... |
// Copyright (c) 2017 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 Software without restriction, including without limitation the rights
// to use, copy, modify, merge... |
package tcp
import (
"context"
"errors"
"net"
"os"
"runtime"
"time"
"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/transport"
tptu "github.com/libp2p/go-libp2p-transport-upgrader"
rtpt "github.com/libp2p/go-reuseport-transport"
loggin... |
package main
import (
"fmt"
"io"
"os"
"strings"
"github.com/containers/image/types"
"github.com/containers/libpod/cmd/podman/libpodruntime"
"github.com/containers/libpod/cmd/podman/shared"
"github.com/containers/libpod/libpod/image"
"github.com/containers/libpod/utils"
"github.com/pkg/errors"
"github.com/s... |
//
package app
import (
"fmt"
"log"
"github.com/gorilla/schema"
"github.com/go-chi/chi" //Using chi mux/router
"net/http"
"github.com/bobsar0/AutoTrade/webClient"
"github.com/bobsar0/AutoTrade/model"
)
var (
indexTmpl = webClient.NewAppTemplate("index.gohtml")
tickerTmpl = webClient.NewAppTemplate("getticke... |
package client
import (
"bytes"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
"encoding/json"
"encoding/pem"
"fmt"
"io/ioutil"
"log"
"net/http"
"strings"
"github.com/Drinkey/keyvault/certio"
"github.com/Drinkey/keyvault/commands/configuration"
"github.com/Drinkey/keyvault/commands/restcli... |
package main
import (
"bytes"
"errors"
"fmt"
"image"
"image/color"
"image/jpeg"
"image/png"
"math"
"sort"
"gocv.io/x/gocv"
)
func toBinary(grayImg gocv.Mat, dst *gocv.Mat) {
img := gocv.NewMat()
defer img.Close()
gocv.BitwiseNot(grayImg.Clone(), &grayImg)
gocv.GaussianBlur(grayImg, &img, image.Point{9,... |
/*
Copyright 2018, 2019 the Velero 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 wr... |
// cmd_measurements.go
package main
import (
"fmt"
"github.com/keltia/ripe-atlas"
"github.com/urfave/cli"
"log"
"os"
"strconv"
)
// init injects our measurement-related commands
func init() {
cliCommands = append(cliCommands, cli.Command{
Name: "measurements",
Aliases: []string{
"measures",
"m",
}... |
package selfstate
import (
"encoding/json"
"fmt"
"sync"
"time"
"gopkg.in/tomb.v2"
"github.com/moira-alert/moira"
"github.com/moira-alert/moira/notifier"
)
var defaultCheckInterval = time.Second * 10
const (
redisDisconnectedErrorMessage = "Redis disconnected"
filterStateErrorMessage = "Moira-Filte... |
// Data Use Statement Compliance Checker (DUCK)
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
package structs
import (
"bytes"
"encoding/json"
jwt "github.com/dgrijalva/jwt-go"
"github.com/labstack/echo"
)
type DBConf struct {
Location string `json:"location"`
... |
package dotnet
/*
#cgo CXXFLAGS: -std=c++11 -Wall
#cgo windows CXXFLAGS: -DWIN32
#cgo linux LDFLAGS: -ldl
#cgo windows LDFLAGS: -ldl
#include <stdlib.h>
#include "runtime.hpp"
*/
import "C"
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"runtime"
"strings"
"unsafe"
"github.com/kardianos/osext"
)
... |
// Copyright 2022 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 or agree... |
// Copyright 2018 ETH Zurich
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wri... |
/*
* // 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
* //
* /... |
//
// Code generated by go-jet DO NOT EDIT.
//
// WARNING: Changes to this file may cause incorrect behavior
// and will be lost if the code is regenerated
//
package table
import (
"github.com/go-jet/jet/v2/postgres"
)
var PgType = newPgTypeTable()
type pgTypeTable struct {
postgres.Table
//Columns
Oid ... |
package eval_test
import (
"os"
"testing"
"time"
"src.elv.sh/pkg/diag"
. "src.elv.sh/pkg/eval"
"src.elv.sh/pkg/parse"
"src.elv.sh/pkg/eval/errs"
. "src.elv.sh/pkg/eval/evaltest"
"src.elv.sh/pkg/eval/vals"
"src.elv.sh/pkg/testutil"
)
func TestKindOf(t *testing.T) {
Test(t,
That("kind-of a []").Puts("str... |
package statement
import (
"bytes"
"fmt"
"log"
"strconv"
"strings"
"sync"
"time"
"github.com/EnnioRC/influxdb/stress/v2/stress_client"
)
// InsertStatement is a Statement Implementation that creates points to be written to the target InfluxDB instance
type InsertStatement struct {
TestID string
Statem... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package iot
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"
)
type ListThingRegistrationTaskReportsInput struct {
_ struct{} `type:"structur... |
package gortex
import (
"fmt"
"github.com/vseledkin/gortex/assembler"
)
// Gated recurrent unit
type VAE struct {
z_size int
W *Matrix
WB *Matrix
W1 *Matrix
W1B *Matrix
WM *Matrix
WD *Matrix
WW1 *Matrix
WW1B *Matrix
WW *Matrix
WWB *Matrix
}
func MakeVae(x_size, z_size int) *VAE {
vae := new(... |
package core
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/http"
"os"
"strings"
"sync/atomic"
"time"
"github.com/gin-contrib/pprof"
"github.com/gin-gonic/gin"
"github.com/opentracing/opentracing-go"
"github.com/panco95/go-garden/core/log"
"github.com/prometheus/client_golang/prometheus/promht... |
package analysis
import (
"github.com/john-nguyen09/go-phpparser/lexer"
"github.com/john-nguyen09/go-phpparser/phrase"
"github.com/john-nguyen09/phpintel/analysis/storage"
"github.com/john-nguyen09/phpintel/internal/lsp/protocol"
"github.com/john-nguyen09/phpintel/util"
)
// Function contains information of func... |
package servicemonitor
import (
"encoding/json"
"fmt"
"reflect"
"sort"
"strings"
monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1"
util "github.com/rancher/rancher/pkg/controllers/user/workload"
rmonitoringv1 "github.com/rancher/types/apis/monitoring.coreos.com/v1"
v3 "github.com/ra... |
package plugprint
import (
"bytes"
"fmt"
"io"
"path"
"reflect"
"sort"
"strings"
"text/tabwriter"
"github.com/gobuffalo/plugins"
)
// Print will try and print a helpful Usage printing
// of the plugin and any plugins that are provided.
// $ buffalo
// ---------
//
// Usage of buffalo:
// -h, --help pri... |
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed ... |
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// Package ecs provides a client to make API requests to Amazon Elastic Container Service.
package ecs
import (
"fmt"
"strings"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/arn"
... |
// The MIT License (MIT)
//
// Copyright (c) 2015-2016 <NAME>
// Copyright (c) 2016 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without li... |
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
// Copyright 2009 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 walk
import (
"cmd/compile/internal/base"
"cmd/compile/internal/ir"
)
// The result of walkStmt MUST be assigned back to n, e.g.
// n.Left = walkSt... |
package events
import (
"errors"
"fmt"
"math/rand"
"net"
"net/http"
"net/http/httptest"
"net/url"
"strconv"
"sync/atomic"
"testing"
"time"
"github.com/chilons/transporter/log"
)
type counter struct {
emitCount int64
}
func (c *counter) countEmitter() EmitFunc {
return EmitFunc(func(event Event) error ... |
// Copyright 2017 clair 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 i... |
// Copyright 2021 VMware, 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 zavro
import (
"encoding/binary"
"errors"
"fmt"
"github.com/brimdata/zed"
"github.com/brimdata/zed/zcode"
"github.com/brimdata/zed/zson"
)
// These errors shouldn't happen because the input should be type checked.
var ErrBadValue = errors.New("bad zng value in kavro translator")
func Encode(dst []byte... |
// Package metavars allows manipulation of "meta variables" stored as variable
// declarations in Go files.
package metavars
import (
"bytes"
"fmt"
"go/ast"
"go/format"
"go/parser"
"go/token"
"io"
"os"
"strconv"
"strings"
"github.com/mmcloughlin/addchain/internal/errutil"
"github.com/mmcloughlin/addchain/... |
// Copyright 2019 the orbs-ethereum-contracts authors
// This file is part of the orbs-ethereum-contracts library in the Orbs project.
//
// This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
// The above notice should be included in all copies or sub... |
/*
This file is part of rclgo
Copyright © 2021 Technology Innovation Institute, United Arab Emirates
Licensed under the Apache License, Version 2.0 (the "License");
http://www.apache.org/licenses/LICENSE-2.0
*/
/*
THIS FILE IS AUTOGENERATED BY 'rclgo-gen generate'
*/
package example_interfaces_msg
import (
"unsaf... |
package main
import (
"bytes"
"context"
"fmt"
"github.com/pkg/profile"
"github.com/viert/go-lame"
"golang.org/x/sync/errgroup"
"os"
"sort"
"time"
)
// 16-bit audio == 2 bytes
const byteDepth = 2.0
// what's the smallest subsequence in seconds that should be considered a duplicate
const minDurationSec = 10.0... |
package modules
import (
"fmt"
"sort"
"github.com/go-kit/log"
"github.com/pkg/errors"
"github.com/grafana/dskit/services"
)
// module is the basic building block of the application
type module struct {
// dependencies of this module
deps []string
// initFn for this module (can return nil)
initFn func() (s... |
package bucketrequest
import (
"context"
"fmt"
"strings"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1"
bucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-a... |
//go:generate bash -c "go-bindata $BINDATAFLAGS -o bindata.go templates/..."
package main
import (
"context"
"fmt"
"html/template"
"log"
"net/http"
"sort"
"time"
"github.com/codegangsta/negroni"
"github.com/gorilla/mux"
"github.com/kiteco/kiteco/kite-go/web/midware"
"github.com/kiteco/kiteco/kite-golib/co... |
// Package traceroute provides functions for executing a tracroute to a remote
// host.
package traceroute
import (
"errors"
"fmt"
"net"
"syscall"
"time"
"golang.org/x/net/icmp"
"golang.org/x/net/ipv4"
)
const DEFAULT_PORT = 33434
const DEFAULT_MAX_HOPS = 64
const DEFAULT_FIRST_HOP = 1
const DEFAULT_TIMEOUT_M... |
package service
import (
"context"
"fmt"
"github.com/JohnnyTing/rabida/config"
"github.com/chromedp/cdproto/browser"
"github.com/chromedp/chromedp"
"github.com/pkg/errors"
"log"
"strings"
"testing"
"time"
)
func TestRabidaImpl_DownloadFile(t *testing.T) {
conf := config.LoadFromEnv()
fmt.Printf("%+v\n", c... |
// Copyright (c) 2021 Oracle and/or its affiliates, All rights reserved.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
package test
import (
"fmt"
"log"
"os"
"reflect"
"testing"
"time"
"github.com/gruntwork-io/terratest/modules/terraform"
"github.c... |
// Copyright (c) 2020 Siemens AG
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, di... |
// Package consumertest provides utilities for in-process unit testing of Gazette consumer applications.
package consumertest
import (
"context"
"os"
"runtime"
"syscall"
"time"
"github.com/stretchr/testify/assert"
"go.etcd.io/etcd/clientv3"
"go.gazette.dev/core/allocator"
"go.gazette.dev/core/broker/client"
... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package iot
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"
"github.com/aws/aws-sdk-go-v2/private/protocol/restjson"
)
type CancelJobExecuti... |
package docker
import (
"fmt"
"net/http"
"strconv"
"strings"
"github.com/containous/traefik/log"
"github.com/containous/traefik/types"
)
const (
labelDockerNetwork = "traefik.docker.network"
labelBackendLoadBalancerSwarm = "traefik.backend.loadbalancer.swarm"
labelDockerComposeProject = "com.... |
package schemer
import (
"bytes"
"encoding/binary"
"encoding/json"
"fmt"
"io"
"reflect"
)
type ObjectField struct {
Aliases []string
Schema Schema
}
type FixedObjectSchema struct {
SchemaOptions
Fields []ObjectField
}
func (s *FixedObjectSchema) GoType() reflect.Type {
var fields []reflect.StructField =... |
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
/*
Copyright 2020 Gravitational, 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, soft... |
// Copyright 2017 CNI 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 ... |
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
// Copyright 2009 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 jpeg
import "io"
// Each code is at most 16 bits long.
const maxCodeLength = 16
// Each decoded value is a uint8, so there are at most 256 such value... |
// Package maillog implements a log specifically for email.
package maillog
import (
"fmt"
"io"
"io/ioutil"
"log/syslog"
"net"
"sync"
"time"
"blitiri.com.ar/go/chasquid/internal/trace"
"blitiri.com.ar/go/log"
)
// Global event logs.
var (
authLog = trace.NewEventLog("Authentication", "Incoming SMTP")
)
//... |
package shared
import (
"bytes"
crand "crypto/rand"
"crypto/rsa"
"crypto/sha256"
"crypto/x509"
"crypto/x509/pkix"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"math/big"
"math/rand"
"time"
"github.com/pavel-v-chernykh/keystore-go"
"github.com/prometheus/common/log"
corev... |
package GAEImageServer
import (
"image"
_ "image/gif"
"image/jpeg"
_ "image/png"
"math"
"net/http"
"github.com/gorilla/mux"
"appengine"
"appengine/blobstore"
"github.com/dbenque/goAppengineToolkit/datastoreEntity"
"appengine/datastore"
"appengine/taskqueue"
)
const imageKind = "image"
type ImageInGAE... |
package lexer
import (
"fmt"
"strings"
)
// TokenType is a type of token
type TokenType uint8
const (
// if nothing was found
ttEmpty TokenType = iota
ttIdentifier
// variables identifier need to be of the following form: [$§][A-Za-z_]+[A-z0-9_]*
// public variables identifier, starting with $ (until space)
... |
// Copyright (c) 2019 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 Software without restriction, including without limitation the rights
// to use, copy, modify, merge... |
// Copyright 2018 ETH Zurich
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wri... |
// Copyright (c) 2018 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 Software without restriction, including without limitation the rights
// to use, copy, modify, merge... |
package admin
import (
"bufio"
"errors"
"fmt"
"log"
"os"
"sort"
"github.com/gojek/kat/cmd/base"
"github.com/gojek/kat/logger"
"github.com/gojek/kat/pkg/client"
"github.com/gojek/kat/pkg/model"
"github.com/spf13/cobra"
)
type reassignPartitions struct {
client.Lister
client.Partitioner
topics ... |
/**
* Author: <NAME>
* Created: 13.11.2019
*
* (C)
**/
package classes
type RelevantApps struct {
relevantApps_id int `db:"relevantApps_id"`
name string `db:"name"`
path string `db:"path"`
extPort int `db:"extPort"`
extProtocoll string `db:"extProtocoll"`
intInterface string `db:"intInterface"`
modul... |
/*
* 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 servicers
import (
"fmt"
"magma/feg/cloud/go/protos"
fegprotos "magma/feg/cloud/go/proto... |
// Copyright 2021 <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 writi... |
package photos
import (
"context"
"fmt"
"log"
"sync"
"github.com/int128/gpup/photos/internal"
photoslibrary "google.golang.org/api/photoslibrary/v1"
)
var uploadConcurrency = 4
var batchCreateSize = 50
// AddToLibrary adds the items to the library.
// This method tries uploading all items and ignores any err... |
package main
import (
"bytes"
"context"
"encoding/json"
"errors"
"flag"
"fmt"
"io/ioutil"
"net/http"
"os"
"os/signal"
"strings"
"syscall"
"github.com/genuinetools/pkg/cli"
"github.com/jessfraz/pastebinit/version"
"github.com/sirupsen/logrus"
)
var (
baseuri string
username string
password string
... |
// Copyright 2013 The StudyGolang Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// http://studygolang.com, http://golang.top
// Author:polaris <EMAIL>
// 解析 http://www.reddit.com/r/golang 最新 Go 信息
package service
import (
"errors... |
package config
import (
"context"
"fmt"
"net/url"
"regexp"
yaml "github.com/ghodss/yaml"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"github.com/weaveworks/cluster-api-provider-existinginfra/pkg/plan/runners/sudo"
"github.com/weaveworks/cluster-api-provider-existinginfra/pkg/specs"
"github.com/... |
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
"time"
)
type Cube struct {
x, y, z int
on bool
}
type Mega struct {
x1, x2 int
y1, y2 int
z1, z2 int
}
func check(e error) {
if e != nil {
panic(e)
}
}
func getLines(filename string) []string {
fh, err := os.OpenFile(filename, os.O_... |
/*
Copyright 2021, Staffbase GmbH 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 wr... |
// Copyright 2018 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License included
// in the file licenses/BSL.txt and at www.mariadb.com/bsl11.
//
// Change Date: 2022-10-01
//
// On the date above, in accordance with the Business Source License, use
// of this software will be gov... |
/*
Copyright 2019 Cloudical Deutschland GmbH. 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 ... |
// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"fmt"
"strconv"
"strings"
log "github.com/golang/glog"
"github.com/youtube/vitess/go/sqltypes"
"github.com/youtube/vitess/go/... |
package main
import (
"io/ioutil"
"math"
"net/http"
"strings"
"sync"
"time"
dtypes "github.com/Prev/HotFunctions/worker_front/types"
)
type FunctionRunner struct {
imageBuilder *ImageBuilder
singletonContainerManager *SingletonContainerManager
cachingOptions CachingOptions
lru ... |
package storage
import (
"fmt"
"time"
"cmd/vossibility-collector/config"
"cmd/vossibility-collector/transformation"
)
// Repository represents a GitHub repository with its associated user given
// name and subscribed events set.
//
// Data for a repository is stored in Elastic Search according to the following
/... |
// Copyright 2015, <NAME>
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package index defines functionality for creating and manipulating a Tchaik music index.
package index
import (
"compress/gzip"
"encoding/json"
"fmt"
"io"
"time"
)
// Library is an... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package iam
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"
"github.com/aws/aws-sdk-go-v2/private/protocol/query"
)
// Please a... |
// Code generated by go-swagger; DO NOT EDIT.
package metrics
// 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.com/... |
package pbservice
import "net"
import "fmt"
import "net/rpc"
import "log"
import "time"
import "viewservice"
import "sync"
import "sync/atomic"
import "os"
import "syscall"
import "math/rand"
type PBServer struct {
mu sync.Mutex
l net.Listener
dead int32 // for testing
unreliable int32 //... |
package aws
import (
"finala/collector"
"fmt"
awsClient "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/pricing"
log "github.com/sirupsen/logrus"
)
// EC2VolumeClientDescriptor is an interface defining the AWS EC2
type EC2VolumeClientDescriptor interfa... |
// Copyright 2016 Google 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 ... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package kinesis
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
type UpdateShardCountInput struct {
_ struct{} `type:"structure"`
// The scaling type. Uniform scaling creates shards of ... |
// Copyright 2021 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 star
import (
"math"
)
type root struct {
id int
pt []root
}
var epsilon float64
var n int
var s int
var num int
var den int
var num2 int
var subtotala int = 0
var subtotalb int = 0
var lexsizealpha []int
var maxsizealpha []int
var lexsizebeta []int
var maxsizebeta []int
var borne_sup float64 = 0.0
var bo... |
package mlpack
/*
#cgo CFLAGS: -I./capi -Wall
#cgo LDFLAGS: -L. -lmlpack_go_approx_kfn
#include <capi/approx_kfn.h>
#include <stdlib.h>
*/
import "C"
import "gonum.org/v1/gonum/mat"
type ApproxKfnOptionalParam struct {
Algorithm string
CalculateError bool
ExactDistances *mat.Dense
InputModel *appro... |
/*
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 agree... |
package godot
import (
"github.com/shadowapex/godot-go/gdnative"
)
/*------------------------------------------------------------------------------
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. Any updates should be... |
package bot
import (
"context"
"fmt"
"log"
"net/http"
"strings"
"cloud.google.com/go/firestore"
"github.com/fatih/structs"
"github.com/gorilla/mux"
)
type Recurser struct {
Id string `structs:"id" firestore:"id"`
Name string `structs:"name" firestore:"name"`
Email ... |
/*
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 transforms
import (
"context"
"errors"
"fmt"
"sync"
"github.com/pbudner/argosminer/pipeline"
"github.com/prometheus/client_golang/prometheus"
"github.com/tidwall/gjson"
"go.uber.org/zap"
)
type JsonParserConfigs struct {
Parsers []JsonParserConfig `yaml:"parsers"`
}
type JsonParserConfig struct {
... |
package cluster
import (
"context"
"fmt"
"strconv"
"github.com/go-logr/logr"
"github.com/pkg/errors"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/kubefed/pkg/apis/core/v1beta1"
"s... |
package service
import (
"context"
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
service_mocks "github.com/cortezaproject/corteza-server/compose/service/mocks"
"github.com/cortezaproject/corteza-server/pkg/automation"
)
func Test_automationRunner_findImplicitScripts(t *testin... |
/**
*Author: <NAME>
* e-mail: <EMAIL>
* Date:14/02/2022
**/
package main
import(
"log"
"net"
"fmt"
"encoding/json"
//"math" <-La uso cuando quiero enviar un archivo de gran tamaño a otro cliente usando
)
type ClienteJob struct{
Estado string
Conn net.Conn
Datos Person
}
type Person struct {
Peticion int
... |
/*MIT License
Copyright (c) 2021 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribu... |
package platformclientv2
import (
"time"
"github.com/leekchan/timeutil"
"encoding/json"
"strconv"
"strings"
)
// Predictor
type Predictor struct {
// Id - The globally unique identifier for the object.
Id *string `json:"id,omitempty"`
// Queues - The queue IDs associated with the predictor.
Queues *[]Addre... |
// 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 http
import (
"context"
"errors"
"fmt"
"mosn.io/api"
"net"
"net/http"
"sync/atomic"
"time"
"github.com/valyala/fasthttp"
"mosn.io/api"
"mosn.io/mosn/pkg/network"
"mosn.io/mosn/pkg/protocol"
mosnhttp "mosn.io/mosn/pkg/protocol/http"
"mosn.io/mosn/pkg/stream"
_ "mosn.io/mosn/pkg/stream/http" // r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.