text
stringlengths
3.08k
10.4k
package phidgets /* #cgo CFLAGS: -g -Wall #cgo LDFLAGS: -lphidget22 #include <stdlib.h> #include <phidget22.h> */ import "C" import ( "errors" "fmt" "time" "unsafe" ) //Phidget - general phidget interface that all phidgets are derived from (for ease of type management) type phidget struct { handle C.PhidgetHandl...
package proxy import ( "github.com/buger/jsonparser" "github.com/fagongzi/log" "github.com/valyala/fasthttp" ) var ( emptyString = []byte{'"', '"'} emptyObject = []byte("{}") emptyArray = []byte("[]") ) type render struct { multi bool multiContext []byte api *apiRuntime nodes []*dis...
package lightning import ( "github.com/ikidev/lightning/utils" "github.com/valyala/fasthttp" "mime/multipart" "strconv" "strings" ) // Request is a struct holding all the request information. type Request struct { // Ctx represents the Context which hold the HTTP request and response. ctx *Ctx Header *Head...
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package cli import ( "fmt" "github.com/aws/copilot-cli/internal/pkg/aws/identity" "github.com/aws/copilot-cli/internal/pkg/aws/sessions" "github.com/aws/copilot-cli/internal/pkg/config" "github.com/aws/c...
// Copyright (c) 2016 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 2015 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 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
// Copyright 2020 The Fuchsia 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 checklicenses import ( "encoding/json" "io/ioutil" "strings" ) type CustomProjectLicense struct { Name string ProjectRoot str...
package main import ( "context" "fmt" "github.com/andersfylling/disgord" "github.com/meooow25/cfspy/bot" "github.com/meooow25/cfspy/fetch" ) // Length limits for short preview of blog/comments. Much lower than Discord message limits. const ( msgLimit = 200 msgSlack = 100 ) // Installs the blog watcher featur...
// Copyright (C) 2019 <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, distri...
/* SPDX-License-Identifier: MIT * * Copyright (C) 2017-2019 WireGuard LLC. All Rights Reserved. */ package tunnel import ( "bufio" "bytes" "fmt" "log" "net" "os" "runtime" "runtime/debug" "strings" "time" "golang.org/x/sys/windows/svc" "golang.org/x/sys/windows/svc/mgr" "golang.zx2c4.com/wireguard/de...
package subscription import ( "encoding/json" "testing" "github.com/dennor/go-paddle/events" "github.com/dennor/go-paddle/events/test" "github.com/dennor/go-paddle/events/types" "github.com/dennor/go-paddle/signature" "github.com/dennor/urldecode" "github.com/stretchr/testify/assert" ) func subscriptionPayme...
package interpolatetext import "fmt" import "errors" import "strings" // ErrEmptyInterpolateArgument represents error discovered on parsing template // string where an empty interpolate (eg `${}`) is given. type ErrEmptyInterpolateArgument struct { Position int } func newErrEmptyInterpolateArgument(position int) (e...
package controller import ( "context" "encoding/json" "io/ioutil" "net/http" "github.com/fabric8-services/fabric8-wit/app" witclient "github.com/fabric8-services/fabric8-wit/client" "github.com/fabric8-services/fabric8-wit/goasupport" "github.com/fabric8-services/fabric8-wit/log" goaclient "github.com/goades...
// Copyright 2019 The Cockroach Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ag...
package parser import ( "fmt" "math/big" "os" "path/filepath" "reflect" "strconv" "testing" "github.com/alecthomas/participle/v2/lexer" "github.com/alecthomas/repr" "github.com/stretchr/testify/require" ) func TestParserFromFixtures(t *testing.T) { files, err := filepath.Glob("../testdata/*.proto") requi...
package writer import ( "bufio" "bytes" "fmt" "net" "net/http" "net/textproto" "strconv" "github.com/avenga/couper/errors" "github.com/avenga/couper/eval" "github.com/avenga/couper/logging" "github.com/hashicorp/hcl/v2" ) type writer interface { http.Flusher http.Hijacker http.ResponseWriter } type mo...
package cmd import ( "errors" "os" "github.com/mikefarah/yq/v4/pkg/yqlib" "github.com/spf13/cobra" ) func createEvaluateAllCommand() *cobra.Command { var cmdEvalAll = &cobra.Command{ Use: "eval-all [expression] [yaml_file1]...", Aliases: []string{"ea"}, Short: "Loads _all_ yaml documents of _all_ ya...
package main import ( "fmt" "log" "os" "path/filepath" "strconv" "syscall" "time" ) func main() { /* The default logger in Go writes to stderr (2). redirect to file ** openvpn requires exit status to be 0 for scripts, otherwise the user ** is not allowed to login */ var fErr *os.File var err error fErr,...
package main import ( "fmt" "github.com/ByteArena/box2d" "github.com/wdevore/RangerGo/api" "github.com/wdevore/RangerGo/engine/nodes" "github.com/wdevore/RangerGo/engine/nodes/custom" "github.com/wdevore/RangerGo/engine/rendering" ) type gameLayer struct { nodes.Node // Box 2D system b2Gravity box2d.B2Vec2...
// Code generated by protoc-gen-go. // source: lazybug.proto // DO NOT EDIT! /* Package lazybug is a generated protocol buffer package. It is generated from these files: lazybug.proto It has these top-level messages: Feedback */ package lazybug import proto "github.com/golang/protobuf/proto" import fmt "fmt" impo...
/* worlds.go by <NAME> 27.1.2018 mouse keyboard messaging jj */ /**/ package main import ( "fmt" "image/color" "github.com/hajimehoshi/ebiten" ) const ( screenwidth = 800 screenheight = 400 kMoveLeft = 1001 kMoveRight = 1002 kMoveUp = 1003 kMoveDown = 1004 kMoveStop = 1005 ) /* ...
package treediagram import ( "context" "fmt" "net/http" "strings" "time" "github.com/jukeizu/birthday/api/protobuf-spec/birthdaypb" "github.com/jukeizu/contract" shellwords "github.com/mattn/go-shellwords" "github.com/olebedev/when" "github.com/olebedev/when/rules/en" "github.com/rs/zerolog" ) type Handle...
package main import ( "github.com/alessiosavi/GoWarehouseValidator/datastructure" "bytes" "flag" "fmt" csvutils "github.com/alessiosavi/GoGPUtils/csv" fileutils "github.com/alessiosavi/GoGPUtils/files" stringutils "github.com/alessiosavi/GoGPUtils/string" "io/ioutil" "log" "os" "path" "strconv" "strings" ...
// Copyright 2022 The Codefresh Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ag...
package pcf_service import ( "bufio" "fmt" "gofree5gc/lib/Nnrf_NFDiscovery" "gofree5gc/lib/http2_util" "gofree5gc/lib/openapi/models" "gofree5gc/lib/path_util" "gofree5gc/src/app" "gofree5gc/src/pcf/AMPolicy" "gofree5gc/src/pcf/BDTPolicy" "gofree5gc/src/pcf/PolicyAuthorization" "gofree5gc/src/pcf/SMPolicy" ...
package authenticator import ( "encoding/json" "errors" "github.com/google/gopacket" "github.com/google/gopacket/layers" "github.com/willscott/sp3" "golang.org/x/net/proxy" "log" "math/rand" "net" "net/http" "strings" ) type PathReflectionAuth struct { Dialer proxy.Dialer servers map[string]string ...
package protomaps import ( "fmt" "github.com/aaronland/go-http-leaflet" "github.com/aaronland/go-http-rewrite" "github.com/sfomuseum/go-http-protomaps/static" "io/fs" _ "log" "net/http" "path/filepath" "strings" ) // By default the go-http-protomaps package will also include and reference Leaflet.js resource...
// Copyright 2020 The kube-timeleap Authors. // SPDX-License-Identifier: BSD-3-Clause package logging import ( "time" "github.com/go-logr/logr" "go.uber.org/zap" "go.uber.org/zap/zapcore" zapf "sigs.k8s.io/controller-runtime/pkg/log/zap" ) // Logger represents a logr.Logger embedded logger. type Logger struct ...
// Copyright (c) 2020-2021 C4 Project // // This file is part of c4t. // Licenced under the MIT licence; see `LICENSE`. // Package parser contains logic for parsing Herd-style observations. package parser import ( "bufio" "fmt" "io" "strings" "github.com/c4-project/c4t/internal/subject/obs" ) // Parse parses a...
/* 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 use this fi...
package compression import ( "bytes" "context" "io" "github.com/containerd/containerd/content" "github.com/containerd/containerd/images" "github.com/containerd/stargz-snapshotter/estargz" digest "github.com/opencontainers/go-digest" ocispecs "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/...
package encoder import ( "fmt" "io" "log" "net" "strings" "sync" "syscall" "time" "github.com/castaneai/mashimaro/pkg/encoder/encoderproto" "github.com/notedit/gst" "github.com/pkg/errors" ) func startGstServer(pipelineStr string, port int) (*GstServer, error) { lis, err := listenTCP(port) if err != ni...
// Copyright 2019 Yunion // // 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 main import ( "errors" "fmt" "regexp" "strconv" "strings" "sync" "sync/atomic" "github.com/aws/aws-sdk-go-v2/service/cloudwatch/types" "github.com/go-kit/kit/log" "github.com/go-kit/kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/stoewer/go-strcase" ) const batchSize =...
package cluster import ( "fmt" "net" "testing" "github.com/stretchr/testify/assert" "golang.org/x/net/context" "google.golang.org/grpc" pb "github.com/thought-machine/please/src/cache/proto/rpc_cache" "github.com/thought-machine/please/src/cache/tools" ) func TestBringUpCluster(t *testing.T) { lis := openR...
// Code generated by re2c, DO NOT EDIT. //line "go/fill/01_fill.re":1 //go:generate re2go $INPUT -o $OUTPUT package main import ( "os" "testing" ) // Intentionally small to trigger buffer refill. const SIZE int = 16 type Input struct { file *os.File data []byte cursor int marker int token int limit int...
// +build integration /* Copyright (C) 2018 Expedia Group. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed t...
package backend import ( "bytes" "fmt" "image" "image/draw" "image/gif" "strconv" "strings" "github.com/disintegration/imaging" colorful "github.com/lucasb-eyer/go-colorful" "github.com/thoas/picfit/constants" imagefile "github.com/thoas/picfit/image" ) func (e *GoImage) Flat(backgroundFile *imagefile.Im...
package client import ( "crypto/md5" "encoding/hex" "encoding/json" "errors" "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/ssm" "github.com/gpestana/envaws/config" "io/ioutil" "log" "time" ) type Con...
// Copyright 2017 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...
/* Copyright 2021 - 2022 Crunchy Data Solutions, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to...
// Copyright 2021 The Matrix.org Foundation C.I.C. // // 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 lister import ( "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/lambda" "github.com/aws/aws-sdk-go-v2/service/lambda/types" "github.com/trek10inc/awsets/arn" "github.com/trek10inc/awsets/context" "github.com/trek10inc/awsets/resource" ) type AWSLambdaFunction struct { } ...
/* Copyright © 2022 lilo <<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, softwar...
package packageLookup import ( "regexp" "strings" "github.com/tactycal/agent/stubUtils" ) const ( dpkgStatusPath = "/var/lib/dpkg/status" sourcesListPath = "/etc/apt/sources.list" aptMaintainerUbuntu = "(ubuntu.com|canonical.com|debian.org)" aptPatchUbuntu = "-[\\d\\.]+ubuntu[\\d\\.~]+$" aptMai...
package create import ( "io/ioutil" "os" "path" "path/filepath" "testing" "github.com/jenkins-x/jx/pkg/cmd/opts/step" resources_test "github.com/jenkins-x/jx/pkg/kube/resources/mocks" "github.com/jenkins-x/jx/pkg/config" "github.com/jenkins-x/jx/pkg/cmd/testhelpers" "github.com/jenkins-x/jx/pkg/gits" "gi...
/* Copyright 2017 LinkedIn 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 writing, s...
/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package inmemory import ( "fmt" "sync" "time" "github.com/hyperledger-labs/fabric-smart-client/platform/view/services/flogging" "github.com/pkg/errors" "github.com/hyperledger-labs/fabric-token-sdk/token/services/selector" to...
package schedulewatcher import ( "context" "fmt" "sync" "time" "github.com/choria-io/go-choria/aagent/model" "github.com/choria-io/go-choria/aagent/util" "github.com/choria-io/go-choria/aagent/watchers/event" "github.com/choria-io/go-choria/aagent/watchers/watcher" ) type State int const ( Unknown State = ...
// Copyright 2018 ETH Zurich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wri...
package anon import ( "bytes" "encoding/hex" "fmt" "github.com/dedis/kyber" "github.com/dedis/kyber/group/edwards25519" "github.com/dedis/kyber/xof/blake2xb" ) func ExampleEncrypt_one() { // Crypto setup: Get a suite which returns a predictable // random number stream for this example. // In production, sim...
// nolint:wrapcheck package main import ( "encoding/json" "errors" "flag" "fmt" "io" "os" "runtime" "strings" "time" "tt/internal/tt" "tt/internal/ui" "tt/internal/util" ) type output struct { json bool w io.Writer } func dispatch(app *tt.TT, args []string, w io.Writer) error { fset := flag.NewFlag...
package mapSimplify import ( "errors" "fmt" "sort" "github.com/paulmach/go.geo" "github.com/paulmach/go.geo/reducers" ) type Polygon struct { Id int Points []Point pointIndex map[Point]int segments map[SegmentId]*Segment simplified bool } func NewPolygon(id int, points []Point) (*Polygon, error) { n := le...
package util import ( "fmt" "strconv" "strings" v1 "k8s.io/api/core/v1" networking "k8s.io/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/G-Research/armada/internal/common" "github.com/G-Research/armada/internal/common/util" "github.com/G-Research/armada/internal/executor/confi...
package ovs import ( "fmt" "net" "strings" "sync" "github.com/golang/glog" "github.com/openshift/openshift-sdn/plugins/osdn" "github.com/openshift/openshift-sdn/plugins/osdn/api" kapi "k8s.io/kubernetes/pkg/api" pconfig "k8s.io/kubernetes/pkg/proxy/config" utilruntime "k8s.io/kubernetes/pkg/util/runtime" ...
// +build go1.9 package mssql import ( "bytes" "encoding/binary" "errors" "fmt" "reflect" "time" ) var ( ErrorEmptyTVPName = errors.New("TVPTypeName must not be empty") ErrorTVPTypeSlice = errors.New("TVPType must be slice type") ErrorTVPTypeSliceIsEmpty = errors.New("TVPType mustn't be null v...
package config import ( "bytes" "fmt" "io/ioutil" "path" "github.com/BurntSushi/toml" "github.com/pkg/errors" ) // Config is cherry picker config struct type Config struct { Github *Github Slack *Slack Repos map[string]*RepoConfig Database *Database Member Member `toml:"member"` } // Redeliver...
// +build unit // Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). You may // not use this file except in compliance with the License. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or in t...
/* Copyright 2018 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
// Package mops implements the EM algorithm described in the cn.mops paper. package mops import "math" // mean of all except highest and lowest values. func mean32(a []float32) float32 { var sum float32 for _, v := range a { sum += v } return sum / float32(len(a)) } func abs(a float64) float64 { if a < 0 { ...
package docker import ( "bytes" "crypto/sha256" "fmt" "io" "io/ioutil" "os" "path" "path/filepath" "strings" "github.com/deislabs/duffle/pkg/builder" "github.com/deislabs/duffle/pkg/duffle/manifest" "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/image/build" "github.com/docker/d...
// Copyright 2015 Auburn University. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package dataflow import ( "go/ast" "github.com/godoctor/godoctor/analysis/cfg" "github.com/godoctor/godoctor/internal/github.com/willf/bitset" "github....
// Copyright (c) 2021 The BFE Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
// Copyright 2013-2014 Aerospike, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
/* Copyright (C) 2018 Black Duck Software, 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...
package mux import ( "context" "sync" ) //CacheGen : cache facade generator type CacheGen func() CacheFacade //WorkerGrp : worker group type WorkerGrp struct { //mux size muxSize int //queue deep size deepSize int //multi workers ws []*Worker //wait group wg *sync.WaitGroup //go routine exit signal cha...
package points import ( "bytes" "errors" "fmt" "io" "math" "strconv" "strings" "time" "github.com/hydrogen18/stalecucumber" ) // Point value/time pair type Point struct { Value float64 Timestamp int64 } // Points from carbon clients type Points struct { Metric string Data []Point } // New create...
package sap_api_input_reader type EC_MC struct { ConnectionKey string `json:"connection_key"` Result bool `json:"result"` RedisKey string `json:"redis_key"` Filepath string `json:"filepath"` PhysicalInventoryDocument struct { PhysicalInventoryDocument string `json:"document_no"` Plant ...
// Pacakge gofactory is used for the craetion and deletion of GameObjects as a whole entity. package gofactory import ( "fmt" "github.com/stnma7e/betuol/common" "github.com/stnma7e/betuol/component" "github.com/stnma7e/betuol/component/scenemanager" "github.com/stnma7e/betuol/event" "github.com/stnma7e/betuol/m...
package controllers import ( "context" "encoding/json" "log" "net/http" "os" "github.com/JonathanGzzBen/ingenialists/api/v1/models" "github.com/gin-gonic/gin" "golang.org/x/oauth2" "golang.org/x/oauth2/endpoints" "gorm.io/gorm" ) var ( state = "ingenialists" googleClientID string googleClientSecret...
package main import ( "bufio" "flag" "fmt" "io" "log" "os" "reflect" "runtime/pprof" "unicode" "github.com/a-h/lexical/input" "github.com/a-h/lexical/parse" "github.com/a-h/lexical/scanner" ) var profile = flag.Bool("profile", false, "Set to true to enable profiling to cpuprofile.out") var memprofile = f...
package vm import ( "flag" "github.com/araddon/dateparse" u "github.com/araddon/gou" "reflect" "testing" ) var ( VerboseTests *bool = flag.Bool("vv", false, "Verbose Logging?") ) func init() { flag.Parse() if *VerboseTests { u.SetupLogging("debug") u.SetColorOutput() } FuncAdd("eq", Eq) FuncAdd("toin...
package metadata import ( "bytes" "encoding/base64" "encoding/json" "errors" "github.com/incognitochain/incognito-chain/common" "github.com/incognitochain/incognito-chain/dataaccessobject/statedb" "github.com/incognitochain/incognito-chain/wallet" "strconv" ) // PortalRequestPTokens - portal user requests pto...
package tdglib import ( "fmt" "math" "testing" ) const float64EqualityThreshold = 1e-9 var commentTests = []struct { in string out string }{ {"//", ""}, {"#", ""}, {"% ", ""}, {"// test contents\t", "test contents"}, {"# test contents", "test contents"}, {"% test contents", "test contents"}, {"/* test ...
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. // +build !integration package rds import ( "net/http" "testing" "time" awssd...
package main import ( "context" "flag" "fmt" "log" "os" "golang.org/x/oauth2" "cloud.google.com/go/bigquery" "cloud.google.com/go/pubsub" "github.com/google/go-github/github" ) var ( gac = flag.String("gac", "", "Location of the Google Application Credentials file") project = flag.String("project", ...
package CloudForest import ( "bytes" "strings" "testing" "github.com/bmizerany/assert" "gonum.org/v1/gonum/mat" ) //A toy feature matrix where either of the first //two variables should be easilly predictible //by the other by a single greedy tree. var constantsfm = `. 0 1 2 3 4 5 6 7 C:CatTarget 0 0 0 0 0 1 1 ...
/* Copyright (c) Facebook, Inc. and 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 law or agreed to in...
package memchan import ( "errors" "fmt" "io" "net" "net/url" "sync" "sync/atomic" "time" "github.com/qbeon/webwire-go/connopt" "github.com/qbeon/webwire-go/message" "github.com/qbeon/webwire-go/wwrerr" ) const statusConnected uint32 = 1 const statusDisconnected uint32 = 2 // SocketType represents the typ...
// Copyright 2013-2017 the u-root 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 cpio implements utilities for reading and writing cpio archives. // // Currently, only newc-formatted cpio archives are supported through cpi...
package main import ( "context" "flag" "fmt" "log" "os" "os/signal" "syscall" "time" "github.com/giantswarm/k8sclient/v5/pkg/k8sclient" "github.com/giantswarm/k8sclient/v5/pkg/k8srestconfig" "github.com/giantswarm/microerror" "github.com/giantswarm/micrologger" "k8s.io/client-go/rest" "github.com/giant...
// 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 sshclient import ( "bufio" "context" "fmt" "io/ioutil" "net" "net/url" "os" "os/user" "path/filepath" "strconv" "sync" "time" "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh/knownhosts" ) var ( homedirOnce sync.Once homedir string ...
// // // File generated from our OpenAPI spec // // package stripe import "encoding/json" // IssuingTransactionPurchaseDetailsFuelType is the type of fuel purchased in a transaction. type IssuingTransactionPurchaseDetailsFuelType string // List of values that IssuingTransactionType can take. const ( IssuingTransac...
/* Copyright 2018 <NAME> jr Couturier. 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, so...
package msgraph import ( "archive/zip" "bytes" "encoding/xml" "fmt" "io" "io/ioutil" "strings" ) // Win32LobAppRequest is used to contruct a request to submit a new Win32LobApp. type Win32LobAppRequest Win32LobApp // NewWin32LobAppRequest creates and returns a new NewWin32LobAppRequest with defaults based on ...
package database import ( clog "log" "net/url" "time" "github.com/go-pg/pg" "github.com/go-pg/pg/orm" "github.com/go-pg/pg/urlvalues" "gitlab.com/IIIS/backend/facade/models" ) // GatewayStore implements database operations for account management by user. type GatewayStore struct { db *pg.DB } // NewGatewayS...
package mr import ( "encoding/json" "fmt" "hash/fnv" "io/ioutil" "log" "net/rpc" "os" "sort" "strconv" ) // // Map functions return a slice of KeyValue. // type KeyValue struct { Key string Value string } // type KeyValues []KeyValue // for sorting by key. func (a KeyValues) Len() int { return ...
// Code generated by gotdgen, DO NOT EDIT. package tdapi import ( "context" "errors" "fmt" "sort" "strings" "go.uber.org/multierr" "github.com/gotd/td/bin" "github.com/gotd/td/tdjson" "github.com/gotd/td/tdp" "github.com/gotd/td/tgerr" ) // No-op definition for keeping imports. var ( _ = bin.Buffer{} _...
package main import ( "fmt" "io" "log" "net" "net/url" "os" "path" "regexp" "strings" "time" "github.com/jlaffaye/ftp" "github.com/pkg/errors" "golang.org/x/crypto/ssh/terminal" ) // Backup the flash of the MM // URL is an FTP URL to store the backup there, e.g. // ftp://user:pass@host/path/filename.tar...
// +build windows package context //#cgo windows LDFLAGS: -lopengl32 -lgdi32 import "C" /* enum KEYCODE { KEYCODE_LEFT, KEYCODE_RIGHT, KEYCODE_UP, KEYCODE_DOWN, KEYCODE_SHIFT, KEYCODE_UNKNOWN }; extern void onInit(); extern void onExit(); extern void onSize(int x, int y); extern void onDra...
package main import ( "encoding/binary" "encoding/hex" "fmt" "io/ioutil" "log" "os/exec" "time" "github.com/dumacp/smartcard/nxp/mifare" "github.com/dumacp/smartcard/multiiso" ) type tagprueba struct { uuid uint32 name string doc uint32 } var tags = []uint32{ 2444651779, 2444661075, 2444660531, 24...
// Copyright © 2018 One Concern package cmd import ( "context" "fmt" "os" daemonizer "github.com/jacobsa/daemonize" "github.com/oneconcern/datamon/pkg/core" "github.com/oneconcern/datamon/pkg/dlogger" "github.com/spf13/cobra" ) func undaemonizeArgs(args []string) []string { foregroundArgs := make([]string...
package importers import ( "bytes" "crypto/sha256" "encoding/base64" "fmt" "path" "path/filepath" "sort" "strings" "github.com/google/go-jsonnet" ) // globCacheKey is the key to use for the importer cache. Two entries are equivalent if // they resolve to the same set of files, have the same relative path to...
package solutions import ( "fmt" ) type Point3D struct { x int y int z int } type Area3D struct { start Point3D end Point3D } func readAreas() ([]Area3D, []string) { areas := make([]Area3D, 0) commands := make([]string, 0) for { var area Area3D var command string _, err := fmt.Scanf("%s x=%d..%d,y...
package lion import ( "time" "github.com/lindsaygelle/nook" "github.com/lindsaygelle/nook/animal" "github.com/lindsaygelle/nook/character" "github.com/lindsaygelle/nook/gender" "github.com/lindsaygelle/nook/personality" "golang.org/x/text/language" ) var ( azizBirthday = nook.Birthday{ Day: 0, Month: t...
package provider import ( log "github.com/Sirupsen/logrus" "github.com/cenkalti/backoff" "github.com/containous/traefik/provider/k8s" "github.com/containous/traefik/safe" "github.com/containous/traefik/types" "io" "io/ioutil" "os" "strings" "text/template" "time" ) const ( serviceAccountToken = "/var/run...
package sessions import ( "sync" "time" "github.com/go-crazy/cache/memstore" ) type ( // provider contains the sessions and external databases (load and update). // It's the session memory manager provider struct { // we don't use RWMutex because all actions have read and write at the same action function. ...