text stringlengths 5.51k 28.1k |
|---|
package pango
// LayoutIter is a structure that can be used to
// iterate over the visual extents of a `Layout`.
type LayoutIter struct {
layout *Layout
/* If run is NULL, it means we're on a "virtual run"
* at the end of the line with 0 width
*/
runs *RunList
run *GlyphItem
/* list of Extents for each line... |
package requests
import (
"encoding/json"
"fmt"
"net/url"
"strings"
"time"
"github.com/google/go-querystring/query"
"github.com/atomicjolt/canvasapi"
"github.com/atomicjolt/canvasapi/models"
"github.com/atomicjolt/string_utils"
)
// UpdateCourse Update an existing course.
//
// Arguments are the same as Co... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: alameda_api/v1alpha1/datahub/common/metrics.proto
package common
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
math "math"
)
// Reference imports to suppress errors if they are not ot... |
// Copyright 2020 The PipeCD 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/config/accesslog/v2/als.proto
package envoy_config_accesslog_v2
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
... |
package topgun_test
import (
"context"
"crypto/tls"
"database/sql"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"os/exec"
"path/filepath"
"regexp"
"strings"
"testing"
"time"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
gclient "code.cloudfoundry.org/garden/client"
gconn "code.cloudfoundry.org/ga... |
package sqlx
import (
"strings"
)
// Интерфейс, описываем тут те методы
// для которых хотим иметь возможность переопределения
type glammar interface {
wrap(...interface{}) string
wrapp(value string) string
wrapQuote(string) string
parameter(...interface{}) string
prepareRaw(interface{}) string
combineSelect(*... |
/*************************************************************************
*
* COPYRIGHT 2018 Deluxe Entertainment Services Group Inc. and its subsidiaries (“Deluxe”)
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Deluxe and its suppliers,
* if any. The... |
package goharvest
import (
"fmt"
"runtime/debug"
"sync"
"sync/atomic"
"time"
"github.com/google/uuid"
"github.com/obsidiandynamics/goharvest/metric"
"github.com/obsidiandynamics/goneli"
"github.com/obsidiandynamics/libstdgo/concurrent"
"github.com/obsidiandynamics/libstdgo/diags"
"github.com/obsidiandynami... |
package events
import (
"encoding/json"
"fmt"
"reflect"
"time"
"github.com/go-openapi/strfmt"
"github.com/manifoldco/go-manifold"
"github.com/manifoldco/go-manifold/errors"
"github.com/manifoldco/go-manifold/idtype"
)
// Type represents the different types of events.
type Type string
const (
// TypeOperati... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: kythe/proto/graph_serving.proto
package graph_serving_go_proto
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
schema_go_proto "kythe.io/kythe/proto/schema_go_proto"
storage_go_proto "kythe.io/kythe/proto/storage_go_proto"
math "math"
)
// ... |
package automaton
import (
"fmt"
"github.com/gzg1984/golucene/core/util"
"sort"
"unicode"
)
// util/automaton/Automaton.java
/*
Represents an automaton and all its states and transitions. States
are integers and must be created using {@link #createState}. Mark a
state as an accept state using {@link #setAccept}... |
package main
import (
"bytes"
"fmt"
"go/types"
"sort"
"github.com/alextanhongpin/mapper"
"github.com/alextanhongpin/mapper/cmd/mapper/internal"
"github.com/alextanhongpin/mapper/loader"
"github.com/dave/jennifer/jen"
. "github.com/dave/jennifer/jen"
)
const GeneratorName = "github.com/alextanhongpin/mapper"... |
package aoc2021
import (
"fmt"
"strconv"
"strings"
)
/*
--- Day 11: Dumbo Octopus ---
You enter a large cavern full of rare bioluminescent dumbo octopuses! They seem to not like the Christmas lights on your submarine, so you turn them off for now.
There are 100 octopuses arranged neatly in a 10 by 10 grid. Each o... |
/*
Copyright 2015 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 youtube provides loading audio from video files for given youtube channels
package youtube
import (
"context"
"crypto/sha1"
"encoding/xml"
"fmt"
"os"
"path"
"regexp"
"sort"
"strings"
"time"
"github.com/bogem/id3v2/v2"
log "github.com/go-pkgz/lgr"
"github.com/google/uuid"
"github.com/pkg/error... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.24.0
// protoc v3.12.3
// source: role.proto
package security
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/pro... |
// Copyright 2017 Intel Corporation.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package scheduler
import (
"runtime"
"time"
"github.com/intel-go/yanff/common"
"github.com/intel-go/yanff/low"
)
// TODO: 1 is a delta of speeds. This delta should be
// v... |
package main
import (
"fmt"
"io"
"os"
"os/exec"
"path/filepath"
"strings"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/spf13/viper"
"github.com/streadway/amqp"
)
var config Co... |
package main
import (
"container/heap"
"context"
"flag"
"fmt"
"io/ioutil"
"strings"
"github.com/lizthegrey/adventofcode/2021/trace"
"go.opentelemetry.io/otel"
//"go.opentelemetry.io/otel/attribute"
"os"
"runtime/pprof"
)
var inputFile = flag.String("inputFile", "inputs/day23.input", "Relative file path t... |
// Copyright (c) 2017 <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Fillstruct fills a struct literal with default values.
//
// For example, given the following types,
//
// type User struct {
// ID int64
// Name string
// ... |
// Copyright 2018 <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 writing, ... |
// Copyright 2022 Dolthub, 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 protoc-gen-go. DO NOT EDIT.
// source: rpc.proto
package rpc
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppre... |
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
// ----------------------- Opcode Struct Start -----------------------
type Opcode struct {
opcode int
tags []int
}
func get_opcode(value int) Opcode {
var opcode int = value % 100
var tags []int = make([]int, 0)
value = value / 100
for va... |
// +build linux
package linux
import (
"fmt"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"syscall"
"unsafe"
// Frameworks
"github.com/djthorpe/gopi/v3"
)
////////////////////////////////////////////////////////////////////////////////
// CGO
/*
#include <sys/ioctl.h>
#include <linux/types.h>
sta... |
package logrus_file
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"os"
"path/filepath"
"regexp"
"runtime"
"strconv"
"strings"
"sync"
"time"
)
// RFC5424 log message levels.
const (
LevelError = iota
LevelWarn
LevelInfo
LevelDebug
)
const (
y1 = `0123456789`
y2 ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: moc_nodeagent_loadbalancer.proto
package network
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/gr... |
// Copyright 2011 <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package reflect
import (
"github.com/rdrdr/hamcrest/base"
. "github.com/rdrdr/hamcrest/core"
"reflect"
)
// Returns a new matcher that applies the type of its inp... |
//go:build darwin || windows
package client
import (
"fmt"
"os"
"reflect"
"runtime"
"strings"
"github.com/Notifiarr/notifiarr/pkg/bindata"
"github.com/Notifiarr/notifiarr/pkg/mnd"
"github.com/Notifiarr/notifiarr/pkg/notifiarr"
"github.com/Notifiarr/notifiarr/pkg/ui"
"github.com/getlantern/systray"
"golift... |
package pgxexporter
import (
"fmt"
"github.com/blang/semver"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/log"
"math"
"time"
)
// MetricMapNamespace groups metric maps under a shared set of labels.
type MetricMapNamespace struct {
labels []string // Label n... |
package args
import (
"bytes"
"fmt"
"os"
"regexp"
"sort"
"sync"
"strings"
"github.com/fatih/structs"
"github.com/pkg/errors"
)
var regexIsOptional = regexp.MustCompile(`^(\W+)([\w|-]*)$`)
type ParseModifier func(*ArgParser)
type ArgParser struct {
Command *Rule
EnvPrefix string
... |
/*
* Copyright (c) 2013-2016 <NAME> <<EMAIL>>
* Copyright (c) 2021 <NAME>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PRO... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v2/services/hotel_group_view_service.proto
package services
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
resources "google.golang.org/genproto/googleapis/ads/googleads/v2/resources"
_ "... |
package main
import (
"flag"
"fmt"
"github.com/russross/blackfriday"
"html"
"io/ioutil"
"log"
"net/http"
"os"
"path/filepath"
"strings"
)
type (
options struct {
root string
port uint
recursive bool
stylesheet string
extension string
}
)
func main() {
opts ... |
// Copyright 2018 <NAME>. All rights reserved.
package web
import (
"fmt"
"sort"
"strconv"
"strings"
"sync"
"time"
"github.com/simagix/keyhole/mdb"
"github.com/simagix/keyhole/sim"
"github.com/simagix/keyhole/sim/util"
)
// TimeSeriesDoc -
type TimeSeriesDoc struct {
Target string `json:"target"`... |
// Copyright 2020 <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 ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: service.proto
package zconfig
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compil... |
// Copyright 2020 CUE 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 ... |
package beater
import (
"database/sql"
"fmt"
"math"
"strconv"
"strings"
"time"
"github.com/elastic/beats/libbeat/beat"
"github.com/elastic/beats/libbeat/common"
"github.com/elastic/beats/libbeat/logp"
_ "github.com/go-sql-driver/mysql"
"github.com/anzot/mysqlbeat/config"
)
// Mysqlbeat configuration.
ty... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: example.proto
/*
Package pb is a generated protocol buffer package.
It is generated from these files:
example.proto
It has these top-level messages:
HelloRequest
HelloResponse
TickerRequest
TickerResponse
*/
package pb
import proto "github.com/golang/... |
package main
import (
"bytes"
"flag"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"text/template"
"github.com/xyproto/env"
"github.com/xyproto/textoutput"
)
const (
versionString = "Desktop File Generator 1.0.8"
versionHelp = "Show application name and version"
nodownloadHelp = "Don't down... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: server/grpc/orchestrator/runner.proto
package orchestrator
import (
context "context"
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
github_com_mesg_foundation_engine_hash "github.com/mesg-foundation/engine/has... |
package main
import (
"bytes"
"fmt"
"image"
"image/color"
"image/draw"
"image/gif"
"image/jpeg"
"image/png"
"io"
"io/ioutil"
"log"
"math/rand"
"net/http"
"os"
"path/filepath"
"sort"
"strings"
"time"
"github.com/anthonynsimon/bild/blend"
"github.com/anthonynsimon/bild/noise"
... |
package baker
import (
"bytes"
"fmt"
"io"
"os"
"reflect"
"regexp"
"strings"
"unicode"
"github.com/rasky/toml"
)
// The configuration for the topology is parsed from TOML format.
// Each of Input, Filter, Output have a separate section (table)
// in the file containing a key called "Name" that specifies
// w... |
/*
** Copyright (c) 2021 Oracle and/or its affiliates.
**
** The Universal Permissive License (UPL), Version 1.0
**
** Subject to the condition set forth below, permission is hereby granted to any
** person obtaining a copy of this software, associated documentation and/or data
** (collectively the "Software"), free of... |
/*
Copyright (c) 2022, Network Next, Inc. All rights reserved.
This is open source software licensed under the BSD 3-Clause License.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code mu... |
package ripemd160
import "encoding/binary"
// https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
// https://homes.esat.kuleuven.be/~bosselae/ripemd160/pdf/AB-9601/AB-9601.pdf
// nonlinear functions at bit level: exor, mux, -, mux, -
func f(j int, x, y, z uint32) uint32 {
// f(j, x, y, z) = x ⊕ y ⊕ z ... |
package encoding
import (
"bufio"
"bytes"
"context"
"fmt"
"io"
"math/rand"
"os"
"path"
"sort"
"testing"
"time"
"github.com/google/uuid"
"github.com/grafana/tempo/pkg/util"
"github.com/grafana/tempo/tempodb/backend"
"github.com/grafana/tempo/tempodb/backend/local"
"github.com/grafana/tempo/tempodb/enco... |
package main
import (
"bufio"
"context"
"errors"
"flag"
"fmt"
"io/ioutil"
"log"
_ "net/http/pprof"
"os"
"os/user"
"path/filepath"
"regexp"
"runtime"
"strconv"
"strings"
"time"
"cloud.google.com/go/datastore"
"github.com/rustyx/dsutil/dsio"
"google.golang.org/api/iterator"
)
var (
project = fl... |
package fixture
import (
"time"
"github.com/weaveworks/scope/probe/docker"
"github.com/weaveworks/scope/probe/endpoint"
"github.com/weaveworks/scope/probe/host"
"github.com/weaveworks/scope/probe/kubernetes"
"github.com/weaveworks/scope/probe/process"
"github.com/weaveworks/scope/render"
"github.com/weavework... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: list_repository.proto
package provider
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
pipeline "github.com/easyopsapis/easyops-api-go/protorepo-models/easyops... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.12.4
// source: xsuportal/resources/clarification.proto
package resources
import (
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
protoreflect "google.golan... |
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ssa
import (
"container/heap"
"sort"
)
const (
ScorePhi = iota // towards top of block
ScoreArg
ScoreNilCheck
ScoreReadTuple
ScoreVarDef
Score... |
//----------------------------------------
//
// Copyright © ying32. All Rights Reserved.
//
// Licensed under Apache License 2.0
//
//----------------------------------------
// +build windows
package win
import (
"fmt"
"syscall"
"unsafe"
. "github.com/dollarkillerx/govcl/vcl/types"
)
var (
// kernel32.dll
... |
// Copyright 2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
package main
import (
"fmt"
"time"
_ "github.com/lib/pq"
restclient "k8s.io/client-go/rest"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
operatorv1 "github.com/cloud-ark/kubeplus-operators/moodle/pkg/apis/moodlecontroller/v1"
clientset "github.com/cloud-ark/kubeplus-operators/... |
package renter
import (
"context"
"fmt"
"sync"
"time"
"github.com/uplo-tech/uplo/build"
"github.com/uplo-tech/uplo/crypto"
"github.com/uplo-tech/uplo/modules"
"github.com/uplo-tech/errors"
)
const (
// projectDownloadByRootPerformanceDecay defines the amount of decay that is
// applied to the exponential ... |
/*
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 agreedto in writing, software
dist... |
// Copyright (c) 2014-2017 <NAME>
// Licensed under the MIT license
package http
import (
"encoding/json"
"fmt"
"html/template"
"math/rand"
"net"
"net/http"
"os"
"path/filepath"
"sort"
"strconv"
"strings"
"sync"
"time"
. "github.com/etix/mirrorbits/config"
"github.com/etix/mirrorbits/core"
"github.co... |
package deployments
import (
"fmt"
"math/rand"
"strings"
"time"
g "github.com/onsi/ginkgo"
o "github.com/onsi/gomega"
kapi "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/test/e2e"
deployutil "github.com/openshift/origin/pkg/deploy/util"
exutil "github.com/openshift/origi... |
package netlink
import (
"fmt"
"io/ioutil"
"strconv"
"strings"
"syscall"
"github.com/rschmied/netlink/nl"
"golang.org/x/sys/unix"
)
// NOTE function is here because it uses other linux functions
func NewNetem(attrs QdiscAttrs, nattrs NetemQdiscAttrs) *Netem {
var limit uint32 = 1000
var lossCorr, delayCorr,... |
// Copyright 2013, zhangpeihao All rights reserved.
package gortmp
import (
"bufio"
"bytes"
"crypto/tls"
"errors"
"fmt"
"github.com/zhangpeihao/goamf"
"github.com/zhangpeihao/log"
"github.com/lucas-clemente/quic-go"
"net"
"time"
)
const (
OUTBOUND_CONN_STATUS_CLOSE = uint(0)
OUTBOUND_CONN_STAT... |
// Copyright (C) 2016 The GoHBase Authors. All rights reserved.
// This file is part of GoHBase.
// Use of this source code is governed by the Apache License 2.0
// that can be found in the COPYING file.
package gohbase
import (
"bytes"
"context"
"errors"
"fmt"
"time"
log "github.com/Sirupsen/logrus"
"githu... |
package fasthttp
import (
"bytes"
"io"
"sync"
)
// AcquireURI returns an empty URI instance from the pool.
//
// Release the URI with ReleaseURI after the URI is no longer needed.
// This allows reducing GC load.
func AcquireURI() *URI {
return uriPool.Get().(*URI)
}
// ReleaseURI releases the URI acquired via A... |
package main
import (
"bufio"
"fmt"
"os"
"time"
"math"
"math/rand"
"encoding/binary"
"strconv"
"runtime"
"io"
"io/ioutil"
"path/filepath"
"sync"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
... |
// Copyright 2020 <NAME>
// SPDX-License-Identifier: Apache-2.0
package wasmsolo
import (
"flag"
"testing"
"time"
"github.com/iotaledger/goshimmer/packages/ledgerstate"
"github.com/iotaledger/goshimmer/packages/ledgerstate/utxoutil"
cryptolib "github.com/iotaledger/hive.go/crypto/ed25519"
"github.com/iotaledg... |
// Copyright 2019 Prometheus Team
// 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 team5
import (
"fmt"
"math"
"sort"
"github.com/SOMAS2020/SOMAS2020/internal/common/shared"
"github.com/SOMAS2020/SOMAS2020/pkg/miscutils"
"github.com/pkg/errors"
"gonum.org/v1/gonum/floats"
)
type forecastVariable int
const (
x forecastVariable = iota
y
magnitude
period
)
type forecastInfo struc... |
package bundle
import (
"context"
"errors"
"fmt"
"io"
"net"
"net/http"
"os"
"time"
"github.com/fission/fission-workflows/pkg/api"
"github.com/fission/fission-workflows/pkg/api/projectors"
"github.com/fission/fission-workflows/pkg/api/store"
"github.com/fission/fission-workflows/pkg/apiserver"
"github.com... |
// barchart - bar chart
package main
import (
"encoding/xml"
"flag"
"fmt"
"github.com/centrifugal/centrifugo/Godeps/_workspace/src/github.com/ajstarks/svgo"
"io"
"math"
"os"
"strconv"
"strings"
)
var (
width, height, iscale, fontsize, barheight, gutter, cornerRadius, labelimit int
bgcolor, barcolor, title,... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package service
import (
"sync"
gproto "github.com/hyperledger/fabric-protos-go/gossip"
tspb "github.com/hyperledger/fabric-protos-go/transientstore"
corecomm "github.com/hyperledger/fabric/core/comm"
"github.com/hyperledger/fab... |
/*
Package bbb provides BeagleBone Black support.
The following features are supported on Linux kernel 3.8+
GPIO (digital (rw), analog (ro), pwm)
I²C
LED
*/
package bbb
import (
"bufio"
"fmt"
"io/ioutil"
"os"
"strings"
"github.com/golang/glog"
"github.com/ssokol/embd"
"github.com/ssokol/embd/host/generi... |
// Package edit implements a command line editor.
package edit
import (
"bufio"
"bytes"
"fmt"
"io"
"os"
"sync"
"syscall"
"time"
"github.com/u-root/u-root/cmds/elvish/edit/eddefs"
"github.com/u-root/u-root/cmds/elvish/edit/highlight"
"github.com/u-root/u-root/cmds/elvish/edit/tty"
"github.com/u-root/u-root... |
package ceph
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"os/exec"
"path/filepath"
"strings"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins/inputs"
)
const (
measurement = "ceph"
typeMon = "monitor"
typeOsd = "osd"
osdPrefix = "ceph-osd"
monPrefix = "... |
// Copyright 2013 The Changkong Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package product
const VersionNo = "20130808"
/* 卖家设置售后服务对象 */
type AfterSale struct {
AfterSaleId int `json:"after_sale_id"`
AfterSaleName strin... |
package config
import (
"database/sql"
"encoding/json"
"io/ioutil"
"net"
"reflect"
"github.com/gochan-org/gochan/pkg/gcutil"
)
const (
randomStringSize = 16
cookieMaxAgeEx = ` (example: "1 year 2 months 3 days 4 hours", or "1y2mo3d4h"`
/* currentConfig = iota
oldConfig
invalidConfig */
)
var (
cfg ... |
package e2e
import (
"fmt"
"github.com/openshift/windows-machine-config-bootstrapper/tools/windows-node-installer/pkg/client"
"os"
"testing"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ec2"
awscp "github.com/openshift/windows-machine-config-bootstrapper/tools/windows-node-install... |
// Copyright 2017 phcurtis fn 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 fn_test
import (
"bytes"
"io"
"io/ioutil"
"log"
"os"
"regexp"
"testing"
"github.com/phcurtis/fn"
)
func Test_logtr_panic1(t *testing.T) ... |
// +build unittest
package monitor
import (
"testing"
"time"
"github.com/libopenstorage/stork/drivers/volume"
"github.com/libopenstorage/stork/drivers/volume/mock"
stork_api "github.com/libopenstorage/stork/pkg/apis/stork/v1alpha1"
fakeclient "github.com/libopenstorage/stork/pkg/client/clientset/versioned/fake... |
package bindnode
import (
"fmt"
"go/token"
"reflect"
"strings"
"github.com/ipfs/go-cid"
"github.com/ipld/go-ipld-prime/datamodel"
cidlink "github.com/ipld/go-ipld-prime/linking/cid"
"github.com/ipld/go-ipld-prime/schema"
)
var (
goTypeBool = reflect.TypeOf(false)
goTypeInt = reflect.TypeOf(int(0))
... |
// Copyright (c) 2021 Terminus, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
package cs
import (
"encoding/json"
"fmt"
"github.com/bjlhlin/aliyungo/ecs"
"net/http"
"time"
"github.com/bjlhlin/aliyungo/common"
)
type TaskState string
const (
// task status
Task_Status_Running = "running"
Task_Status_Success = "Success"
Task_Status_Failed = "Failed"
// upgrade state
UpgradeStep_N... |
/*
* Copyright 2020 The Dragonfly 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 la... |
package sherpa
import (
"bytes"
"context"
"encoding/json"
"fmt"
"html/template"
"io"
"log"
"mime"
"net/http"
"reflect"
"strings"
"time"
"github.com/mjl-/sherpadoc"
)
// SherpaVersion is the version of the Sherpa protocol this package implements. Sherpa is at version 1.
const SherpaVersion = 1
// JSON h... |
// Copyright 2018-2020, Square, Inc.
package metrics
import (
"fmt"
"sync"
"time"
gm "github.com/daniel-nichter/go-metrics"
"github.com/square/etre"
)
// Group is a one-to-many proxy for setting metrics in multiple metric groups.
// Group implements the Metrics inteface. The API uses a single Group for all
// ... |
package userinvite
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
"time"
"github.com/labstack/echo"
log "github.com/sirupsen/logrus"
"github.com/cloudfoundry-incubator/stratos/src/jetstream/repository/interfaces"
)
// CFError is the error info returned from th... |
// Copyright 2020-2021 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... |
package runtime
import (
"fmt"
"io/ioutil"
"net"
"net/http"
"os"
"path"
"strconv"
"strings"
"time"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/sirupsen/logrus"
ac "github.com/avenga/couper/accesscontrol"
"github.com/avenga/couper/config"
"github.com/avenga/couper/erro... |
// Copyright (c) 2018, The Gide 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 gide
import (
"image/color"
"log"
"sort"
"strings"
"github.com/goki/gi/gi"
"github.com/goki/gi/gist"
"github.com/goki/gi/giv"
"github.c... |
//
// Copyright (c) 2021 Seagate Technology LLC 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 requ... |
/*
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... |
//+build ignore
package main
import (
"image"
"image/draw"
"image/png"
"os"
)
func main() {
bw, err := readImage("ball.png")
check(err)
gray := toGray(bw)
hist := grayHistogram(gray)
threshold(gray, thresholdOtsu(&hist))
writeImage(gray, "threshold.png")
mask := makeCircleMask(3)
opened := openBinary(gra... |
package metathings_plugin_evaluator
import (
"context"
"encoding/json"
"strconv"
"sync"
"github.com/golang/protobuf/proto"
"github.com/spf13/cast"
"github.com/stretchr/objx"
lua "github.com/yuin/gopher-lua"
context_helper "github.com/nayotta/metathings/pkg/common/context"
grpc_helper "github.com/nayotta/me... |
//
// Copyright 2020 IBM Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... |
package genclient
import (
"bytes"
"fmt"
"os"
"path/filepath"
"sort"
"strings"
"text/template"
"github.com/goadesign/goa/design"
"github.com/goadesign/goa/goagen/codegen"
)
func makeToolDir(g *Generator, apiName string) (toolDir string, err error) {
codegen.OutputDir = filepath.Join(codegen.OutputDir, "cli... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: envoy/service/discovery/v2/ads.proto
/*
Package v2 is a generated protocol buffer package.
It is generated from these files:
envoy/service/discovery/v2/ads.proto
envoy/service/discovery/v2/hds.proto
envoy/service/discovery/v2/sds.proto
It has the... |
// Copyright (c) 2017 The btcsuite developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
//
// Copyright (c) 2009 The Go Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided ... |
package noah
import (
"bytes"
"fmt"
"github.com/noah-blockchain/noah-go-node/cmd/utils"
"github.com/noah-blockchain/noah-go-node/config"
"github.com/noah-blockchain/noah-go-node/core/appdb"
eventsdb "github.com/noah-blockchain/noah-go-node/core/events"
"github.com/noah-blockchain/noah-go-node/core/rewards"
"gi... |
// +build !lambdabinary
package sparta
import (
"context"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"runtime"
"sort"
"strings"
"sync"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/cloudformation"
"github.com/aws/aws... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.