text stringlengths 5.51k 28.1k |
|---|
// Copyright 2018 The Kubeflow Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... |
// Copyright 2015 Light Code Labs, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... |
package internal
import (
"fmt"
"log"
"strings"
)
// SchemaSync 配置文件
type SchemaSync struct {
Config *Config
SourceDb *MyDb
DestDb *MyDb
}
var changeMap = map[string]string{
"clickhouse": "MODIFY COLUMN",
"mysql": "CHANGE",
}
var addMap = map[string]string{
"clickhouse": "ADD COLUMN",
"mysql": ... |
package main
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"github.com/abbot/go-http-auth"
"io/ioutil"
"log"
"math"
"net/http"
"net/http/httputil"
"net/url"
"strconv"
"strings"
"sync"
"time"
)
const (
wdHub = "/wd/hub/"
statusPath = "/status"
queuePath = wdHub... |
//go:build linux
// +build linux
/*
Copyright 2022 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... |
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
/*
Copyright 2014 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 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, s... |
// Package graphite provides a service for InfluxDB to ingest data via the graphite protocol.
package graphite // import "github.com/influxdata/influxdb/services/graphite"
import (
"bufio"
"fmt"
"math"
"net"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/influxdata/influxdb/models"
"github.com/influxdata... |
package launcher
import (
"context"
"fmt"
"os"
"path"
"sort"
"strings"
"time"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/console/prompt"
"github.com/ethereum/go-ethereum/ethclie... |
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
/*
Copyright 2021 Antrea 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, software... |
/*
* 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 ... |
/*
* Copyright 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Licen... |
// Copyright 2014 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... |
// Copyright 2017 The Prometheus 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... |
// 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 file.
package websocket
import (
"bytes"
"io"
"net"
"strconv"
"sync"
"time"
"github.com/go-siris/siris/context"
"github.com/gorilla/websocket"
)
type (
connec... |
// 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... |
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package api
import (
"fmt"
"net"
"net/http"
"net/url"
"strings"
l4g "github.com/alecthomas/log4go"
"github.com/gorilla/mux"
goi18n "github.com/nicksnyder/go-i18n/i18n"
"github.com/mattermost/platform/mod... |
// Copyright 2018 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 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
// Copyright 2015 The Prometheus 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... |
package cpu
import (
"fmt"
)
type Option func(*CPU)
type CPU struct {
A byte // Accumulator
X byte // Index
Y byte // Index
PC uint16 // Program Counter
S byte // Stack Pointer
P StatusRegister
I *Interrupter
bus *Bus
t *Trace
}
func New(bus *Bus, i *Interrupter, opts ...Option) *CPU {
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.1
// source: protodecode/protodemo/demo.proto
package protodemo
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protob... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/admin/v3alpha/certs.proto
package envoy_admin_v3alpha
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
math "math"
)
// Reference impo... |
package loggers
import (
"compress/gzip"
"encoding/binary"
"fmt"
"io"
"io/ioutil"
"net"
"os"
"os/exec"
"path/filepath"
"regexp"
"sort"
"strconv"
"strings"
"time"
"github.com/dmachard/go-dnscollector/dnsutils"
"github.com/dmachard/go-logger"
"github.com/google/gopacket"
"github.com/google/gopacket/la... |
package apiauth
import (
"context"
"fmt"
"net"
"net/http"
"strings"
"sync"
"time"
"go.aporeto.io/enforcerd/trireme-lib/collector"
"go.aporeto.io/enforcerd/trireme-lib/controller/internal/enforcer/applicationproxy/serviceregistry"
"go.aporeto.io/enforcerd/trireme-lib/controller/pkg/packet"
"go.aporeto.io/en... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: envoy/config/cluster/v3/circuit_breaker.proto
package envoy_config_cluster_v3
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
v31 "github.com/envoyproxy/go-control-plane/env... |
package expression
import (
"fmt"
"math"
"math/rand"
"strconv"
)
type ValueResolver interface {
resolve(v Variable) (*Expr, error)
}
var _ ValueResolver = Vars{}
// Vars maps variables to a chosen value.
type Vars map[Variable]*Expr
func (vrs Vars) resolve(v Variable) (*Expr, error) {
value, ok := vrs[v]
if... |
/*
* Copyright 2017 Dgraph Labs, Inc. and Contributors
* Modifications copyright (C) 2017 <NAME> and Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.ap... |
/*
Copyright 2021 Alibaba Group Holding Limited.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... |
/*
Copyright 2021 The Everoute 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, so... |
// Copyright 2021 The gVisor Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
//MIT License
//
//Copyright (c) [2019] [Befovy]
//
//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 The Velero Contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: consignment/consignment.proto
package shippy_service_consignment
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
import (
client "github.com/micro/go-micro/client"
server "github.com/micro/go-micro/server"
context "golang.org... |
package main
//go:generate go build -buildmode=plugin -o ../../obj/faker.so
import (
"fmt"
"math/rand"
plug "plugins/config"
"strings"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/jaswdr/faker"
"github.com/njones/logger"
"github.com/z... |
/*
Copyright 2019 The OpenEBS 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, sof... |
// Copyright 2010 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.
// This file contains tests for the printf checker.
package testdata
import (
"fmt"
"os"
"unsafe" // just for test case printing unsafe.Pointer
... |
// Copyright 2014-2018 <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 asm
import (
"fmt"
"strconv"
)
//
// exprOp
//
type exprOp byte
const (
// operators in descending order of precedence
// unary operations
opUnar... |
// This directory was copied and adapted from https://github.com/grafana/agent/tree/main/pkg/metrics.
// We cannot vendor the agent in since the agent vendors loki in, which would cause a cyclic dependency.
// NOTE: many changes have been made to the original code for our use-case.
package instance
import (
"bytes"
... |
// Copyright 2011 The draw2d Authors. All rights reserved.
// created: 27/05/2011 by <NAME>
package raster
var SUBPIXEL_OFFSETS_SAMPLE_8 = [8]float64{
5.0 / 8,
0.0 / 8,
3.0 / 8,
6.0 / 8,
1.0 / 8,
4.0 / 8,
7.0 / 8,
2.0 / 8,
}
var SUBPIXEL_OFFSETS_SAMPLE_8_FIXED = [8]Fix{
Fix(SUBPIXEL_OFFSETS_SAMPLE_8[0] * F... |
package topology
import (
"bytes"
"container/list"
"context"
"errors"
"sync"
"time"
"github.com/criticalstack/swoll/api/v1alpha1"
"github.com/criticalstack/swoll/internal/pkg/pubsub"
"github.com/criticalstack/swoll/pkg/event"
"github.com/criticalstack/swoll/pkg/kernel"
"github.com/criticalstack/swoll/pkg/k... |
package renter
import (
"bytes"
"context"
"encoding/hex"
"fmt"
"time"
"github.com/opentracing/opentracing-go"
"gitlab.com/SkynetLabs/skyd/build"
"gitlab.com/SkynetLabs/skyd/skymodules"
"go.sia.tech/siad/crypto"
"go.sia.tech/siad/modules"
"go.sia.tech/siad/types"
"gitlab.com/NebulousLabs/errors"
)
var (
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc (unknown)
// source: admin/user_service.proto
package admin
import (
_ "github.com/envoyproxy/protoc-gen-validate/validate"
common "github.com/go-sdk/pb/common"
_ "github.com/grpc-ecosystem/grpc-gateway/v2/pro... |
/*
* GoScans, a collection of network scan modules for infrastructure discovery and information gathering.
*
* Copyright (c) Siemens AG, 2016-2021.
*
* This work is licensed under the terms of the MIT license. For a copy, see the LICENSE file in the top-level
* directory or visit <https://opensource.org/licenses/MIT>.
... |
package ldvalue
import (
"encoding/json"
"fmt"
"sort"
"testing"
"gopkg.in/launchdarkly/go-jsonstream.v1/jreader"
"gopkg.in/launchdarkly/go-jsonstream.v1/jwriter"
"gopkg.in/launchdarkly/go-sdk-common.v2/jsonstream"
"github.com/stretchr/testify/assert"
)
func TestNilValueMap(t *testing.T) {
m := ValueMap{}
... |
/*
* 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 ... |
package tx
import (
"encoding/hex"
"encoding/json"
"fmt"
clistore "github.com/FourthState/plasma-mvp-sidechain/cmd/plasmacli/store"
"github.com/FourthState/plasma-mvp-sidechain/cmd/plasmacli/subcmd/eth"
"github.com/FourthState/plasma-mvp-sidechain/msgs"
"github.com/FourthState/plasma-mvp-sidechain/plasma"
"git... |
package beater
import (
"strconv"
"fmt"
"sort"
"sync"
"time"
"os"
"os/user"
"regexp"
"github.com/elastic/beats/libbeat/beat"
"github.com/elastic/beats/libbeat/common"
"github.com/elastic/beats/libbeat/logp"
"github.com/abarrios1/testing/config"
"github.com/wvanbergen/kazoo-go"
"github.com/Shopify/sarama"... |
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package tinkcrypto
import (
"crypto/ecdsa"
"crypto/elliptic"
_ "embed"
"encoding/base64"
"encoding/hex"
"encoding/json"
"testing"
"github.com/stretchr/testify/require"
"golang.org/x/crypto/chacha20poly1305"... |
/*
* Copyright (c) 2017, MegaEase
* 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 ap... |
/*
* Copyright 2017 <NAME>, Inc. and Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
// Package object implements the database.Model interface for the Object entity.
package object
import (
"context"
"crypto/md5"
"crypto/sha256"
"database/sql"
"encoding/hex"
"io"
"net/http"
"net/url"
"strconv"
"strings"
"time"
"djinn-ci.com/database"
"djinn-ci.com/env"
"djinn-ci.com/errors"
"djinn-ci.c... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.15.5
// source: post.proto
package v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf... |
package cmd
import (
"github.com/rsteube/carapace"
"github.com/rsteube/carapace-bin/completers/youtube-dl_completer/cmd/action"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "youtube-dl",
Short: "download videos from youtube.com or other video platforms",
Long: "https://github.com/ytdl-org/yo... |
/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the cpackget project. */
package installer
import (
"archive/zip"
"bytes"
"fmt"
"io/ioutil"
"net/url"
"os"
"path"
"path/filepath"
"strings"
"github.com/lu4p/cat"
errs "github.com/open-cmsis-pack/cpackget/cmd/errors"
"github.com/open-c... |
package node_management
import (
"fmt"
"github.com/open-horizon/anax/cli/cliconfig"
"github.com/open-horizon/anax/cli/cliutils"
"github.com/open-horizon/anax/i18n"
"github.com/open-horizon/anax/semanticversion"
"github.com/open-horizon/edge-sync-service/common"
"io/ioutil"
"net/http"
"path"
)
type ManifestIn... |
package diffmatchpatch
import (
"bytes"
"errors"
"net/url"
"regexp"
"strconv"
"strings"
)
// Patch holds information about a patch.
type Patch struct {
Diffs []Diff
Start1 int
Start2 int
Length1 int
Length2 int
}
// String satisfies the fmt.Stringer interface.
//
// Generates a string that emulates GN... |
package ios
import (
"fmt"
"path/filepath"
"strings"
"gopkg.in/yaml.v2"
"github.com/bitrise-io/bitrise-init/analytics"
"github.com/bitrise-io/bitrise-init/models"
"github.com/bitrise-io/go-utils/fileutil"
"github.com/bitrise-io/go-utils/log"
"github.com/bitrise-io/go-utils/pathutil"
"github.com/bitrise-io/... |
package main
import (
"bytes"
"context"
"database/sql"
"flag"
"fmt"
"log"
"math/rand"
"net/url"
"os"
"os/signal"
"runtime"
"strconv"
"strings"
"sync"
"sync/atomic"
"syscall"
"testing"
"time"
"github.com/codahale/hdrhistogram"
"github.com/satori/go.uuid"
"github.com/tylertreat/hdrhistogram-writer"... |
// Package blockchain
//
// @author: xwc1125
package blockchain
import (
"crypto/rand"
"fmt"
"github.com/chain5j/chain5j-pkg/math"
"github.com/chain5j/chain5j-pkg/types"
"github.com/chain5j/chain5j-pkg/util/dateutil"
"github.com/chain5j/chain5j-protocol/models"
"github.com/chain5j/chain5j-protocol/protocol"
"g... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: models/linux/iptables/iptables.proto
package linux_iptables
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
namespace "github.com/ligato/vpp-agent/api/models/linux/namespace"
math "math"
)
// Reference... |
package platformclientv2
import (
"time"
"github.com/leekchan/timeutil"
"encoding/json"
"strconv"
"strings"
)
// Dialercampaignconfigchangecampaign
type Dialercampaignconfigchangecampaign struct {
// ContactList
ContactList *Dialercampaignconfigchangeurireference `json:"contactList,omitempty"`
// Queue - A ... |
package cryptonym
import (
"encoding/hex"
"encoding/json"
"fmt"
errs "github.com/blockpane/cryptonym/errLog"
"github.com/blockpane/cryptonym/fuzzer"
"github.com/fioprotocol/fio-go"
"github.com/fioprotocol/fio-go/eos"
"math"
"math/rand"
"strconv"
"strings"
)
func abiSelectTypes(mustExist string) []string {
... |
package vmath
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestVec2f_String(t *testing.T) {
assert.Equal(t, "Vec2f[5.000000 x -3.100000]", Vec2f{5, -3.1}.String())
}
func TestVec2f_Format(t *testing.T) {
assert.Equal(t, "vec 5, -3", Vec2f{5, -3.1}.Format("vec %.0f, %.0f"))
}
func TestVec2f_Is... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.21.0
// protoc v3.11.4
// source: api.proto
package api
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/... |
// Copyright 2021-2022 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: tradingdata.proto
package tradingdatapb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are no... |
package deej
import (
"bufio"
"errors"
"fmt"
"io"
"math"
"reflect"
"regexp"
"strconv"
"strings"
"time"
"github.com/jacobsa/go-serial/serial"
"go.uber.org/zap"
"github.com/zahnatomletsplay/deej/util"
)
// SerialIO provides a deej-aware abstraction layer to managing serial I/O
type SerialIO struct {
com... |
package Schultz
import (
"bytes"
"context"
"crypto/sha256"
"encoding/gob"
"fmt"
"google.golang.org/grpc/status"
"math/big"
"net"
"strconv"
"sync"
"time"
"../../utils/conv"
"../../utils/interpolation"
polycommit "../../utils/polycommit/pbc"
"./services"
"github.com/golang/protobuf/proto"
"github.com/m... |
package emuarius
import (
"crypto"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/binary"
"errors"
"net/url"
"path"
"sort"
"strconv"
"strings"
"time"
"github.com/ChimeraCoder/anaconda"
"github.com/boltdb/bolt"
"github.com/emersion/go-ostatus"
"github.com/emersion/go-ostatus/activitystream"
"githu... |
package spider
import (
"log"
"movie_spider/config"
"movie_spider/database"
"movie_spider/model"
"movie_spider/utils"
"regexp"
"runtime"
"strconv"
"strings"
"sync"
"time"
"github.com/go-redis/redis/v7"
"github.com/panjf2000/ants/v2"
"github.com/spf13/viper"
"github.com/valyala/fasthttp"
"go.mongodb.or... |
package model
import (
"github.com/58-facettes/mangopay-go-sdk/model/country"
)
// Payin is used for the payin instrcution.
type Payin struct {
// The type of payin.
Payment Payment `json:"PaymentType"`
// The type of execution for the payin.
Execution Execution `json:"ExecutionType"`
}
// Payment is the paymen... |
package host
import (
"github.com/cihub/seelog"
"ligomonitor/pkg/model"
"strconv"
"syscall"
)
/*
用于获取进程的系统调用情况
*/
//生产者,提供系统调用信息
func PtraceProvider(msg chan model.PtraceMsg, pid int) {
defer func() {
if err := recover(); err != nil {
seelog.Warn("PtraceProvider recover reason : ", err)
return
}
}()
... |
package cpu
import (
. "github.com/retroenv/nesgo/pkg/addressing"
)
// AddressingInfo contains the opcode and timing info for an instruction addressing mode.
type AddressingInfo struct {
Opcode byte
}
// Instruction contains information about a NES CPU instruction.
type Instruction struct {
Name string
uno... |
package iex
import (
"encoding/json"
"fmt"
)
const IEXTP1 = "IEXTP1"
const (
StartMessages = "O"
StartSystemHours = "S"
StartMarketHours = "R"
EndMarketHours = "M"
EndSystemHours = "E"
EndMessages = "C"
)
const (
// Trading halted across all US equity markets.
TradingHalted = "H"
// Trading h... |
// Copyright (c) 2021 <NAME> <<EMAIL>>
// All rights reserved.
//
// 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 must retain the above copyright notice, this
// list of condit... |
package main
import (
"bufio"
"fmt"
"log"
"net/http"
"net/url"
"os"
"path/filepath"
"strconv"
"strings"
"text/scanner"
"github.com/PuerkitoBio/goquery"
)
const (
SuperMax = 100
adWord = "banner"
)
type Gallery struct {
title string
numImgs int
startURL string
}
func VerifyURL(url string) bool... |
package suppression
import (
"bufio"
"bytes"
"context"
"fmt"
"os"
"path/filepath"
"regexp"
"strconv"
"time"
"github.com/CMSgov/bcda-app/bcda/constants"
"github.com/CMSgov/bcda-app/bcda/models/postgres"
"github.com/CMSgov/bcda-app/bcda/utils"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"... |
package main
import (
"bufio"
"fmt"
"github.com/golang-demos/chalk"
"os"
"strings"
"time"
)
// ScoreItem holds data on a scoreboard item's name, current point value, and ID
type ScoreItem struct {
name string
points int
id int
}
// GenerateBoard creates blank (0's) data for each playable option
func G... |
// Copyright (C) 2014 <NAME> <<EMAIL>>.
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.
package sqlite3
/*
#cgo CFLAGS: -std=gnu99
#include <sqlite3.h>
#include <stdlib.h>
#include <string.h>
#ifdef __CYGWIN__
# include <errno.h>
#endif
#ifndef SQLITE_OPEN... |
// Copyright (c) 2017,2018 Zededa, Inc.
// SPDX-License-Identifier: Apache-2.0
package zedcloud
import (
"bytes"
"context"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"net/url"
"strings"
"sync"
"time"
"github.com/gorilla/websocket"
"github.com/lf-edge/eve/pkg/pillar/agentlog"
"github.com/lf-edge/eve/pkg/pi... |
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
// Code generated by go-swagger; DO NOT EDIT.
package operations
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"net/http"
"strings"
errors "github.com/go-openapi/errors"
loads "github.com/go-openapi/loads"
ru... |
package config
import (
"io/ioutil"
"math"
"net/url"
"os"
"strings"
"github.com/pkg/errors"
"code.cloudfoundry.org/bytefmt"
yaml "gopkg.in/yaml.v2"
)
type Config struct {
Buildpacks BlobstoreConfig
Droplets BlobstoreConfig
Packages BlobstoreConfig
AppStash BlobstoreConfig `yaml:"app_stash"`
Roo... |
package xchaincore
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"fmt"
"io/ioutil"
"math/big"
"net"
"os"
"os/exec"
"testing"
"time"
"github.com/golang/protobuf/proto"
log "github.com/xuperchain/log15"
"github.com/xuperchain/xuperunion/common/config"
"github.com/xuperchain/xuperunion/global"
... |
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package walk
import (
"errors"
"fmt"
"cmd/compile/internal/base"
"cmd/compile/internal/ir"
"cmd/compile/internal/reflectdata"
"cmd/compile/internal/ssag... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v0/errors/function_parsing_error.proto
package errors // import "google.golang.org/genproto/googleapis/ads/googleads/v0/errors"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to ... |
/*
Copyright 2019 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
/*
Copyright 2019 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dist... |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package flate
import (
"fmt"
"io"
"math"
)
const (
NoCompression = 0
BestSpeed = 1
fastCompression = 3
BestCompression = 9
Default... |
//
// Author:: <NAME> <<EMAIL>>
// Copyright:: Copyright 2017, Chef Software Inc.
//
package backend
import (
"encoding/json"
"fmt"
"strings"
"time"
log "github.com/sirupsen/logrus"
)
// ChefClientRun is the struct representing a chef client converge message
type ChefClientRun struct {
ChefServerFqdn ... |
// Code generated by transpiler. DO NOT EDIT.
/**
* Go Video Downloader
*
* Copyright 2019 Tenta, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.or... |
// Package kubernetes provides the kubernetes backend.
package kubernetes
import (
"context"
"errors"
"fmt"
"net"
"strings"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/etcd/msg"
"github.com/coredns/coredns/plugin/kubernetes/object"
"github.com/coredns/coredns/plugin/pkg/dnsutil"
"... |
package node
import (
"bytes"
"context"
"fmt"
"math/rand"
"time"
"github.com/ethereum/go-ethereum/rlp"
"github.com/harmony-one/harmony/api/proto"
proto_node "github.com/harmony-one/harmony/api/proto/node"
"github.com/harmony-one/harmony/block"
"github.com/harmony-one/harmony/consensus"
"github.com/harmony-... |
// Copyright 2011 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 zip
import (
"bufio"
"encoding/binary"
"errors"
"hash"
"hash/crc32"
"io"
)
// TODO(adg): support zip file comments
// Writer implements a zip f... |
// Copyright 2016 CodisLabs. All Rights Reserved.
// Licensed under the MIT (MIT-LICENSE.txt) license.
package run
import (
"bufio"
"bytes"
"fmt"
"io"
"net"
"os"
"strconv"
"strings"
"time"
"pkg/libs/atomic2"
"pkg/libs/io/pipe"
"pkg/libs/log"
"pkg/redis"
"redis-shake/common"
"redis-shake/configure"
"r... |
/*
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, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.