text stringlengths 3.08k 10.4k |
|---|
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package configservice
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
type SelectAggregateResourceConfigInput struct {
_ struct{} `type:"structure"`
// The name of the configuration agg... |
package istio
import (
"fmt"
"os"
"strings"
"github.com/kyma-incubator/reconciler/pkg/reconciler/instances/istio/actions"
"github.com/kyma-incubator/reconciler/pkg/reconciler/instances/istio/clientset"
"github.com/kyma-incubator/reconciler/pkg/reconciler/instances/istio/istioctl"
"github.com/kyma-incubator/rec... |
package sargon
import (
"fmt"
"github.com/herohde/morlock/pkg/board"
"github.com/herohde/morlock/pkg/eval"
"sort"
)
// Exchange computes the exchange value of the square, if populated.
func Exchange(pos *board.Position, pins Pins, side board.Color, sq board.Square) eval.Pawns {
cur, piece, ok := pos.Square(sq)
... |
/*******************************************************************************
* Copyright 2017 Samsung Electronics 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... |
// Code generated by go-swagger; DO NOT EDIT.
package named_tag_scope
// 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 "git... |
package rollbar
import (
"fmt"
"github.com/davidji99/rollrest-go/rollrest"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
"log"
"strconv"
"time"
)
var (
validTriggers = []string{"new_item", "occurrence_rate", "resolved_item",
"re... |
// Copyright 2017 wgliang. All rights reserved.
// Use of this source code is governed by Apache
// license that can be found in the LICENSE file.
// Package proxy provides proxy service and redirects requests
// form proxy.Addr to remote.Addr.
package proxy
import (
// "bytes"
// "encoding/binary"
"errors"
"fmt"... |
package qless
import (
"time"
"github.com/garyburd/redigo/redis"
)
var (
jobStates = []string{"stalled", "running", "scheduled", "depends", "recurring"}
finishBytes = []byte(`{"finish":"yes"}`)
)
type Job interface {
JID() string
Class() string
State() string
Queue() string
Worker() string
Tracked() boo... |
package baller
import (
"net/url"
)
type BoxscoreSummaryV2Options struct {
GameID string
}
type BoxscoreSummaryV2Response struct {
GameSummary []BoxscoreSummaryV2GameSummary
OtherStats []BoxscoreSummaryV2OtherStats
Officials []BoxscoreSummaryV2Officials
InactivePlayers []BoxscoreSummaryV2Inactiv... |
package keeper
import (
"fmt"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/mesg-foundation/engine/hash"
ownershippb "github.com/mesg-foundation/engine/ownership"
"github.com/mesg-foundation/engine/process"
proce... |
// Copyright 2020 <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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... |
package server
import (
"encoding/base64"
"log"
"sync"
"time"
"github.com/exoscale/egoscale"
)
const (
maxVMs = 200
esDiskSize = 50 // In GB
esZone = "35eb7739-d19e-45f7-a581-4687c54d6d02" // de-fra-1
esServiceOffering = "c6f99499-7f59-4138-94... |
/*
Copyright © 2021
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 u... |
// Package classification Users API.
//
// API for secure authentication and oauth2 authorization
//
//
// Terms Of Service:
//
// there are no TOS at this moment, use at your own risk we take no responsibility
//
// Schemes: https
// Host: accounts.7onetella.net
// BasePath: /
// Version: 0.1.0
// ... |
package planner
import (
parser_model "github.com/pingcap/parser/model"
"github.com/pingcap/parser/opcode"
"github.com/pingcap/tidb/sessionctx/stmtctx"
"github.com/pingcap/tidb/types"
tspb "github.com/zhihu/zetta-proto/pkg/tablestore"
"github.com/zhihu/zetta/pkg/model"
"github.com/zhihu/zetta/tablestore/mysql/e... |
package main
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"strings"
"syscall"
"github.com/yuin/gopher-lua"
"golang.org/x/crypto/ssh/terminal"
)
func loader(src string) lua.LGFunction {
var loader lua.LGFunction = func(L *lua.LState) int {
fn, err := L.LoadString(src)
if err != nil {
emitF... |
// Copyright 2019 The Outline 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... |
package parser
import (
"github.com/arata-nvm/visket/compiler/ast"
"github.com/arata-nvm/visket/compiler/lexer"
"testing"
)
func TestParseProgram(t *testing.T) {
tests := []struct {
input string
expected string
}{
{"fun f(a: int): int {return 1}", "(def-func f(a: int): int ((return 1)))"},
{"fun hoge(... |
// Copyright 2019 eBay Inc.
// Primary authors: <NAME>, <NAME>,
// <NAME>, and <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
// https://www.apache.org/licenses/... |
// Package vpp defines the standard flavor used for full-featured VPP agents.
package vpp
import (
"github.com/ligato/cn-infra/core"
"github.com/ligato/cn-infra/datasync"
"github.com/ligato/cn-infra/datasync/msgsync"
"github.com/ligato/cn-infra/flavors/connectors"
"github.com/ligato/cn-infra/flavors/local"
"gith... |
// Package gosnowth contains an IRONdb client library written in Go.
package gosnowth
import (
"bytes"
"context"
"encoding/json"
"fmt"
"net/url"
)
// ExtensionParam values contain information about an extension parameter.
type ExtensionParam struct {
Type string `json:"type"`
Optional bool ... |
// Package decls provides helpers for creating variable and function declarations.
package decls
import (
"github.com/golang/protobuf/ptypes/empty"
"github.com/golang/protobuf/ptypes/struct"
"github.com/google/cel-spec/proto/checked/v1/checked"
expr "github.com/google/cel-spec/proto/v1/syntax"
)
var (
// Error t... |
package internal
import (
"reflect"
"server/model"
"server/msg"
"time"
"github.com/name5566/leaf/gate"
"github.com/name5566/leaf/log"
)
var (
//临时用
msgList []*msg.ChatMessage
roomMap map[string]*IMChatRoom
)
type IMChatRoom struct {
ID string
Name string
Description string
Avatar s... |
// +build teensy36
package machine
// TODO: create device
import "device/xyz"
// GPIO Pins
const (
D0 = 0 // MOSI1
D1 = 1 // MISO1
D2 = 2 //
D3 = 3 // CAN0TX SCL2
D4 = 4 // CAN0RX SDA2
D5 = 5 //
D6 = 6 //
D7 = 7 // RX3
D8 = 8 // TX3
D9 = 9 // RX2 CS0
D10 = 10 // TX2 CS0
... |
package utils
import (
"encoding/json"
"flag"
"fmt"
"log"
"os"
"path/filepath"
"io/ioutil"
"k8s.io/client-go/kubernetes"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
"net"
"strings"
)
type Operation int
const (
ADD Op... |
package bitstamp
import (
"errors"
"fmt"
"sort"
"strings"
"time"
. "github.com/strengthening/goghostex"
)
type Spot struct {
*Bitstamp
}
// public api
func (spot *Spot) GetTicker(pair Pair) (*Ticker, []byte, error) {
uri := "/api/v2/ticker/" + pair.ToSymbol("", false)
response := struct {
High floa... |
package instances
import (
"fmt"
"reflect"
"time"
"github.com/mitchellh/mapstructure"
"github.com/rackspace/rack/internal/github.com/rackspace/gophercloud"
"github.com/rackspace/rack/internal/github.com/rackspace/gophercloud/openstack/db/v1/datastores"
"github.com/rackspace/rack/internal/github.com/rackspace/g... |
package form
import (
"log"
"strings"
"github.com/charmbracelet/bubbles/help"
"github.com/charmbracelet/bubbles/key"
"github.com/charmbracelet/bubbles/textinput"
tea "github.com/charmbracelet/bubbletea"
"github.com/13k/dm/internal/ui"
"github.com/13k/dm/internal/util"
)
const (
defaultTitle = "Daily Meetin... |
// Copyright (c) Contributors to the Apptainer project, established as
// Apptainer a Series of LF Projects LLC.
// For website terms of use, trademark policy, privacy policy and other
// project policies see https://lfprojects.org/policies
// Copyright (c) 2021-2022, Sylabs Inc. All rights reserved.
// This soft... |
package clickhouse_test
import (
"fmt"
"github.com/ClickHouse/clickhouse-diagnostics/internal/collectors/clickhouse"
"github.com/ClickHouse/clickhouse-diagnostics/internal/platform"
"github.com/ClickHouse/clickhouse-diagnostics/internal/platform/config"
"github.com/ClickHouse/clickhouse-diagnostics/internal/platf... |
package servers
import (
"fmt"
"net"
"net/http"
"strconv"
"strings"
"github.com/leoloobeek/keyserver/logger"
"github.com/miekg/dns"
)
//
// HTTP Handling
//
// ServeHTTP allows SubHTTPServer to handle http requests
// The requested URL path needs to match a key's Data["URL"].Value to
// evaluate the Key
func... |
package main
import (
"bytes"
"encoding/gob"
"errors"
"github.com/hashicorp/raft"
"io"
)
type binLog struct {
Command_code uint32
Command_data interface{}
}
type applyRet struct {
status Status
resp interface{}
}
func newApplyRet(st Status, resp interface{}) *applyRet {
return &applyRet{status: st, resp... |
package bpool
import (
"fmt"
"os"
"github.com/ucladevx/BPool/adapters/http"
"github.com/ucladevx/BPool/services"
"github.com/ucladevx/BPool/stores/postgres"
"github.com/ucladevx/BPool/utils/auth"
"github.com/codyleyhan/config-loader"
"github.com/labstack/echo"
"github.com/labstack/echo/middleware"
"go.uber... |
package githubclient
import (
"archive/tar"
"compress/gzip"
"context"
"fmt"
"io"
"net/http"
"net/url"
"path/filepath"
"strings"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/google/go-github/github"
"github.com/pkg/errors"
errors2 "github.com/replicatedhq/ship/pkg/util/errors... |
package users
import (
"testing"
"github.com/google/uuid"
"github.com/jrapoport/gothic/models/account"
"github.com/jrapoport/gothic/models/types"
"github.com/jrapoport/gothic/models/types/key"
"github.com/jrapoport/gothic/models/types/provider"
"github.com/jrapoport/gothic/store"
"github.com/jrapoport/gothic/... |
package error
import (
"crypto/md5"
"encoding/hex"
"fmt"
"hash"
"io"
"strconv"
"time"
m "github.com/elastic/apm-server/model"
pr "github.com/elastic/apm-server/processor"
"github.com/elastic/apm-server/utility"
"github.com/elastic/beats/libbeat/common"
)
type Event struct {
Id *string
Culprit ... |
// Licensed to the LF AI & Data foundation 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 th... |
package ldapmanager
import (
"fmt"
"regexp"
"strconv"
"strings"
"github.com/go-ldap/ldap"
log "github.com/sirupsen/logrus"
)
const (
// MinUID for POSIX accounts
MinUID = 2000
// MinGID for POSIX accounts
MinGID = 2000
// SortAscending ...
SortAscending = "asc"
// SortDescending ...
SortDescending = "... |
package grafana
import (
"context"
"errors"
"fmt"
"net/http"
"github.com/bdunavant/sdk"
"github.com/circonus/grafana-ds-convert/circonus"
"github.com/circonus/grafana-ds-convert/logger"
)
//Grafana is a struct that holds the sdk client and other properties
type Grafana struct {
Client *sdk.Client
Ci... |
package mbothelper
import (
"log"
"os"
"os/signal"
"fmt"
"github.com/mattermost/platform/model"
)
type BotConfig struct {
MattermostServer string
MattermostWSURL string
Listen string
BotName string
UserEmail string
UserName string
UserPassword string
UserLastname ... |
package main
import (
"context"
"crypto/tls"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net"
"net/http"
"reflect"
"strconv"
"strings"
"time"
"github.com/grafana/grafana_plugin_model/go/datasource"
"github.com/hashicorp/go-plugin"
"github.com/pkg/errors"
"golang.org/x/net/context/ctxhttp"
)
type CHDatas... |
package naivesha256
import (
// "fmt"
"encoding/binary"
"math/bits"
)
// Ch function of SHA-256
func choose(x, y, z uint32) uint32 {
return (x & y) ^ (^x & z)
}
// majority function of SHA-256
func majority(x, y, z uint32) uint32 {
return (x & y) ^ (x & z) ^ (y & z)
}
// E0256 is the Upper Sigma 0 function for... |
package render
import (
"strings"
"github.com/weaveworks/scope/probe/docker"
"github.com/weaveworks/scope/probe/kubernetes"
"github.com/weaveworks/scope/report"
)
// Constants are used in the tests.
const (
UnmanagedID = "unmanaged"
UnmanagedMajor = "Unmanaged"
)
func renderKubernetesTopologies(rpt report.... |
package main
import (
"errors"
"fmt"
"net"
"net/http"
"os"
"os/signal"
"syscall"
"github.com/flavio/collage/config"
"github.com/flavio/collage/handlers"
"github.com/docker/distribution/reference"
gorilla_handlers "github.com/gorilla/handlers"
"github.com/gorilla/mux"
"github.com/opencontainers/go-digest... |
package server
import (
"encoding/json"
"errors"
"fmt"
"net/http"
"os"
"path/filepath"
"strings"
)
// QueryKeyValue is a key-value pair used to register routes with URL Query parameters.
type QueryKeyValue struct {
Key string
Value string
}
// SimpleHandler represents a simplification to the standard http... |
package main
import (
"image"
"image/color"
"sort"
"strconv"
"time"
"gioui.org/app"
"gioui.org/f32"
"gioui.org/font/gofont"
"gioui.org/io/system"
"gioui.org/layout"
"gioui.org/op"
"gioui.org/op/clip"
"gioui.org/op/paint"
"gioui.org/unit"
"gioui.org/widget/material"
"loov.dev/allocview/internal/g"
)
... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: node.proto
package node
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import 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 compi... |
package common
import (
"context"
"fmt"
"time"
"gorm.io/driver/mysql"
"gorm.io/gorm"
"gorm.io/gorm/logger"
"gorm.io/gorm/utils"
)
const (
DriverMysql = "mysql"
)
type DB struct {
*gorm.DB
}
type Config struct {
Driver string
Dsn string
KeepAlive int // 长连接的时间
MaxOpen int // 最大可以打开的数量
MaxId... |
package httpmockserver
import (
"bytes"
"crypto/tls"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"net/http/httptest"
"sync"
"testing"
)
type Opts struct {
Port string
UseSSL bool
Cert io.Reader
Key io.Reader
}
func (o *Opts) validate() error {
return nil
}
func New(t *testing.T) *MockServer {
ret... |
package windows
import (
"bytes"
"encoding/asn1"
"encoding/binary"
"io"
"unsafe"
"github.com/RainwayApp/metapod/errors"
"github.com/RainwayApp/metapod/structs"
)
// http://msdn.microsoft.com/en-us/library/ms920091.aspx.
const (
certificateRevision = 0x200
certificateType = 2
certificateTableIndex =... |
package httptrigger
import (
"context"
"encoding/json"
"fmt"
"net/http"
"path"
"strconv"
"strings"
"time"
"k8s.io/klog"
"github.com/gorilla/mux"
observer "github.com/refunc/go-observer"
"github.com/refunc/refunc/pkg/client"
"github.com/refunc/refunc/pkg/messages"
"github.com/refunc/refunc/pkg/utils"
"... |
package main
import (
"fmt"
"log"
"os"
"strconv"
"time"
"github.com/jszwec/csvutil"
"github.com/karashiiro/bingode"
"github.com/xivapi/godestone/v2"
"github.com/xivapi/godestone/v2/data/gender"
)
var highestID uint32 = 35261910 // As of April 1, 2021 2:52 PM PDT
// The number of characters to attempt to fe... |
// Shortest GUI program written in Golang.
// It displays a window and exits when the "close" button of the window is clicked.
package main
import (
"bytes"
"encoding/json"
"fmt"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/canvas"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/dialog"
"fyne.io/fyne... |
package gossdb
import (
"bytes"
"errors"
"fmt"
"net"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
)
const (
CODE_SUCCESS = "2"
INFO_SUCCESS = "ok"
Status_Default int32 = iota
Status_Networkclose //网络断开
)
type Client struct {
conn net.Conn
recvBuf bytes.Buffer
tryCount int8 //断线重连尝... |
package battlegrip
import (
"encoding/json"
"fmt"
"io"
"os"
"path/filepath"
"strings"
"github.com/spf13/pflag"
"github.com/spf13/cobra"
)
// NewDocs generates the CLI documentation in markdown
func NewJsonDocs(rootCmd *cobra.Command) *cobra.Command {
cmd := &cobra.Command{
Use: "jsondocs",
Short: "... |
package commands
import (
"bufio"
"os"
"strings"
"github.com/github/git-lfs/lfs"
"github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra"
)
var (
prePushCmd = &cobra.Command{
Use: "pre-push",
Run: prePushCommand,
}
prePushDryRun = false
prePushDeleteBranch = "(delete)"
prePushMissingErrM... |
package scoring
import (
"fmt"
"strings"
"github.com/kiteco/kiteco/kite-golib/complete/data"
"github.com/kiteco/kiteco/kite-golib/errors"
"github.com/kiteco/kiteco/kite-go/lang/python/pythoncomplete/offline/example"
)
// CompletionScore contains a lot of values allowing to score and order completions (but it ... |
// Copyright 2017, <NAME>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package jsonfmt
import (
"bytes"
"fmt"
"regexp"
"strings"
)
// tokenRegex is a regexp for any valid JSON token (not including comments).
var tokenRegex = rege... |
package zips
import (
"bufio"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"sort"
"strings"
"time"
clean "github.com/hashicorp/go-cleanhttp"
"github.com/pkg/errors"
"gophers.dev/pkgs/ignore"
"gophers.dev/pkgs/loggy"
"gophers.dev/pkgs/semantic"
"oss.indeed.com/go/modprox/pkg/coordinates"
"oss.indeed.... |
package amm
import (
"sort"
sdk "github.com/cosmos/cosmos-sdk/types"
)
// FindMatchPrice returns the best match price for given order sources.
// If there is no matchable orders, found will be false.
func FindMatchPrice(os OrderSource, tickPrec int) (matchPrice sdk.Dec, found bool) {
highestBuyPrice, found := os.... |
// Copyright © 2021 Alibaba Group Holding Ltd.
//
// 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 common
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"runtime"
"strconv"
"strings"
"time"
"github.com/ChimeraCoder/anaconda"
"../services"
"../utils"
)
type Backend_interface interface {
Command_Audio_List(user string)
Command_Audio_Stop()
Command_Audio_Pause()
Command_Audio_Play_... |
package main
import (
"encoding/json"
"flag"
"fmt"
"net/http"
"net/url"
"os"
"os/signal"
"path"
"runtime"
"time"
"github.com/gorilla/websocket"
"github.com/raintank/raintank-apps/pkg/message"
"github.com/raintank/raintank-apps/pkg/session"
"github.com/raintank/raintank-apps/task-agent/snap"
"github.com... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package config
import (
"crypto/ecdsa"
"crypto/rand"
"crypto/x509"
"encoding/asn1"
"encoding/pem"
"errors"
"fmt"
"io"
"math/big"
"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric-protos-go/common"
"github.... |
// Copyright 2014 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
// Copyright (c) 2015 Western Digital Corporation or its affiliates. All rights reserved.
// SPDX-License-Identifier: MIT
package server
import (
"fmt"
"time"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
dto "github.com/prometheus/client_model/go"
... |
// Copyright 2016 The Gosl Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package h5
/*
#include "hdf5.h"
#include "hdf5_hl.h"
#include "stdlib.h"
// constants from H5Tpublic.h
#ifdef WIN32
hid_t H5LONG() { return H5T_NATIVE_LLON... |
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v20140401
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type AutoscaleSetting struct {
pulumi.C... |
package main
import (
"fmt"
"math"
"math/rand"
"time"
"github.com/faiface/pixel"
"github.com/faiface/pixel/pixelgl"
"github.com/faiface/pixel/text"
"golang.org/x/image/colornames"
)
func initScreen() {
primaryMonitor = pixelgl.PrimaryMonitor()
cfg := pixelgl.WindowConfig{
Title: title,
Bounds: pixel... |
// Copyright 2014 <NAME> and The TARDIS Go Authors
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.
package pogo
import (
"fmt"
"go/token"
"sort"
"strconv"
"strings"
"go/constant"
"golang.org/x/tools/go/ssa"
)
// Recycle the Compilation resources.
func ... |
package cryptonight
/*
#cgo CFLAGS: -maes
#cgo LDFLAGS:
#include "hash-ops.h"
*/
import "C"
import (
"encoding/binary"
"unsafe"
)
// Setting the following environment variable before running 'make
// geth' was required to avoid an aes-related compile error:
// CGO_CFLAGS_ALLOW=-maes
//
// Some other possibly useful... |
// Copyright 2018 The ksonnet 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 applica... |
// +build f746xx
// Peripheral: CEC_Periph HDMI-CEC.
// Instances:
// CEC mmap.CEC_BASE
// Registers:
// 0x00 32 CR Control register.
// 0x04 32 CFGR Configuration register.
// 0x08 32 TXDR Tx data register.
// 0x0C 32 RXDR Rx Data Register.
// 0x10 32 ISR Interrupt and Status Register.
// 0x14 32 IE... |
// Copyright 2017 <NAME>. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
// https://github.com/qjw/kelly
package swagger
import (
"reflect"
"strings"
)
type JsonSchemaObj struct {
Description string `json:"descriptio... |
package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"net/url"
"os"
s5 "github.com/seven5/seven5"
//trick godeps to putting things in the Godep directory that the client
//side needs to compile
_ "github.com/gopherjs/gopherjs/js"
_ "github.com/gopherjs/gopherjs/nosync"
_ "github.com/gopherjs... |
// +build windows
package graceful
import (
"context"
"errors"
"os"
"syscall"
)
var (
// ErrDifferentArch is returned when the target process has a different
// architecture (x86 or x64) than the calling process. Both processes must
// be of the same architecture for an exit to be performed.
ErrDifferentArch... |
package main
import (
"fmt"
"unsafe"
"github.com/temorfeouz/gocl/cl_demo/utils"
"github.com/temorfeouz/gocl/cl"
)
const PROGRAM_FILE = "mod_round.cl"
var KERNEL_FUNC = []byte("mod_round")
func main() {
/* OpenCL data structures */
var device []cl.CL_device_id
var context cl.CL_context
var queue cl.CL_com... |
package config
import (
"fmt"
"regexp"
"sort"
"strings"
"github.com/goccy/go-yaml"
"github.com/k1LoW/glyph"
"github.com/k1LoW/tbls/dict"
)
func (d *Config) UnmarshalYAML(data []byte) error {
raw := struct {
Name string `yaml:"name"`
Desc string `yaml:"desc,omitem... |
package parsers
import (
"fmt"
"github.com/RSE-Cambridge/data-acc/internal/pkg/datamodel"
"github.com/RSE-Cambridge/data-acc/internal/pkg/fileio"
"log"
"strings"
)
type jobSummary struct {
PerJobBuffer *cmdPerJobBuffer
Swap *cmdAttachPerJobSwap
Attachments []datamodel.SessionName
DataIn []data... |
package main
import (
"context"
"log"
"net"
"os"
"strconv"
"sync"
"time"
"github.com/Gimi/fly/hello"
"github.com/golang/protobuf/ptypes/empty"
"google.golang.org/grpc"
"google.golang.org/grpc/reflection"
)
type service struct {
sleepSeconds time.Duration
}
func newService(sleepSeconds int) service {
r... |
package monocanthus
import (
"errors"
"io/ioutil"
"log"
"os"
"os/exec"
"path"
"strconv"
"strings"
"time"
)
const (
rootUser = "root"
procDir = "/proc"
)
// MemChunk contains information regarding a chunk of memory and its path if present
type MemChunk struct {
// An empty string in the path indicates th... |
// Copyright (c) 2015 Couchbase, 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 w... |
package patch
import (
"context"
"github.com/pkg/errors"
"github.com/viant/datly/base"
"github.com/viant/datly/base/contract"
"github.com/viant/datly/config"
"github.com/viant/datly/data"
"github.com/viant/datly/metric"
"github.com/viant/datly/shared"
"github.com/viant/datly/writer"
"github.com/viant/datly/w... |
package main
import (
"encoding/csv"
"fmt"
"io/ioutil"
"log"
"os"
"strconv"
"strings"
"sync"
"flag"
"github.com/PuerkitoBio/goquery"
)
const (
DEFAULT_MTG_FORMAT string = "Pioneer"
BASE_URL string = "https://mtgdecks.net"
)
var (
MTG_FORMAT string = DEFAULT_MTG_FORMAT
)
func checkError(message string,... |
/*
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... |
/*
Copyright 2018 The Jetstack cert-manager 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... |
package stats
import (
"fmt"
"math"
"sort"
"strconv"
stats_errors "github.com/containers-ai/alameda/ai-dispatcher/pkg/stats/errors"
"github.com/containers-ai/alameda/pkg/utils"
"github.com/containers-ai/alameda/pkg/utils/log"
datahub_common "github.com/containers-ai/api/alameda_api/v1alpha1/datahub/common"
d... |
package v1alpha1
import (
"fmt"
group "github.com/tliron/candice/resources/candice.puccini.cloud"
"github.com/tliron/kutil/ard"
"github.com/tliron/kutil/kubernetes"
apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
)
var DeviceGVK = SchemeGroup... |
// Package xtable 终端表格渲染
// list := [][]int{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}
// xtable.New(list).Render()
package xtable
import (
"fmt"
"reflect"
)
type table struct {
elem interface{} // 原始数据
style int // 边界样式枚举值
border bool // 是否显示下边界
headers []string // 表格头部
widths []int // ... |
package commands
import (
"fmt"
"github.com/pivotal-cf/kiln/release"
"gopkg.in/src-d/go-billy.v4/osfs"
"log"
"os"
"github.com/pivotal-cf/kiln/fetcher"
"github.com/pivotal-cf/jhanda"
"github.com/pivotal-cf/kiln/internal/cargo"
)
type Fetch struct {
logger *log.Logger
multiReleaseSourceProvider MultiReleas... |
package gen
import (
"context"
"fmt"
"os"
"os/exec"
"path"
"github.com/mittwald/go-helm-client"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/timoth-y/fabnctl/cmd/fabnctl/shared"
"github.com/timoth-y/fabnctl/pkg/helm"
"github.com/timoth-y/fabnctl/pkg/kube"
"github.com/timoth-y/fabnctl/pkg/... |
// Copyright 2018, OpenCensus Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
package integration
import (
"context"
"fmt"
"github.com/arnisoph/postisto/pkg/config"
"github.com/arnisoph/postisto/pkg/log"
"github.com/arnisoph/postisto/pkg/server"
"github.com/docker/go-connections/nat"
"github.com/stretchr/testify/require"
"github.com/testcontainers/testcontainers-go"
"github.com/testcon... |
package codegen
import (
"errors"
"fmt"
"github.com/getkin/kin-openapi/openapi3"
)
// MergeSchemas merges all the fields in the schemas supplied into one giant schema.
// The idea is that we merge all fields together into one schema.
func MergeSchemas(allOf []*openapi3.SchemaRef, path []string) (Schema, error) {
... |
// Copyright 2016 Mesosphere. 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 applicabl... |
package version
import (
"archive/tar"
"compress/gzip"
"fmt"
"github.com/google/go-github/v29/github"
"github.com/jenkins-zh/jenkins-cli/app"
"github.com/jenkins-zh/jenkins-cli/app/cmd/common"
"github.com/jenkins-zh/jenkins-cli/app/i18n"
"github.com/jenkins-zh/jenkins-cli/client"
"github.com/jenkins-zh/jenkin... |
// +build cgo
package jpegsimp
/*
#cgo linux CFLAGS: -I/usr/include
#cgo linux LDFLAGS: -ljpeg -L/usr/lib
#cgo darwin CFLAGS: -I/opt/libjpeg-turbo/include -I/opt/local/include -DIM_DEBUG
#cgo darwin LDFLAGS: -ljpeg -L/opt/libjpeg-turbo/lib -L/opt/local/lib
// debug CFLAGS:
// -DIM_DEBUG for simp_image output
// -DJP... |
package gfx
import "image/color"
// Standard colors transparent, opaque, black, white, red, green, blue, cyan, magenta, and yellow.
var (
ColorTransparent = ColorNRGBA(0, 0, 0, 0)
ColorOpaque = ColorNRGBA(0xFF, 0xFF, 0xFF, 0xFF)
ColorBlack = Palette1Bit.Color(0)
ColorWhite = Palette1Bit.Color(1)
... |
package types
import (
"bytes"
"io"
"reflect"
"github.com/lyraproj/pcore/px"
)
type taggedType struct {
typ reflect.Type
puppetTags map[string]string
annotations px.OrderedMap
tags map[string]map[string]string
parsedPuppetTags map[string]px.OrderedMap
}
var TagsAnnotatio... |
package snippetslab
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"howett.net/plist"
"github.com/lemoony/snipkit/internal/model"
)
const (
nullEntry = "$null"
)
var languageMapping = map[string]model.Language{
"YamlLexer": model.LanguageYAML,
"BashLexer": model.LanguageBash,
"MarkdownL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.