text
stringlengths
3.08k
10.4k
package main import ( "os" "github.com/ishanjain28/imgur-bot/log" tbot "github.com/go-telegram-bot-api/telegram-bot-api" "net/http" "github.com/ishanjain28/imgur-bot/botutil" "github.com/ishanjain28/imgur-bot/imgur" "github.com/go-redis/redis" "strings" "strconv" "time" "encoding/json" "github.com/ishan...
// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
package rolling import ( "errors" "fmt" "github.com/metronlab/bow" ) // Rolling allows to process a bow via windows. // Use `Interpolate` and/or `Aggregate` to transform windows. // Use `HasNext` and `Next` to iterate over windows. // Use `Bow` to get the processed bow. type Rolling interface { Interpolate(inter...
// Copyright (c) 2018 <NAME> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distri...
package redis import ( "fmt" "net" "sync" "time" "github.com/FZambia/go-sentinel" "github.com/garyburd/redigo/redis" "github.com/patrickmn/go-cache" "gopkg.in/redsync.v1" "gopkg.in/tomb.v2" "github.com/moira-alert/moira" ) const pubSubWorkerChannelSize = 16384 const ( cacheCleanupInterval = time...
package main import ( "fmt" "os" "sync" "github.com/mit-dci/lit/btcutil/chaincfg/chainhash" "github.com/mit-dci/lit/wire" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/opt" ) /* Read bitcoin core's levelDB index folder, and the blk000.dat files with the blocks. Writes a text txo f...
package validation import ( "crypto/md5" "fmt" "net/http" "net/url" "strconv" "strings" "go.skia.org/infra/go/util" ) // IsValidDigest returns true if the given string is a valid digest // on the string level, i.e. it does not check whether we have // actually seen the given hash but whether it complies with ...
package cpu import "C" import ( "context" "encoding/json" "fmt" "net/http" v1 "github.com/SotirisAlfonsos/chaos-bot/proto/grpc/v1" "github.com/SotirisAlfonsos/chaos-master/config" "github.com/SotirisAlfonsos/chaos-master/pkg/cache" "github.com/SotirisAlfonsos/chaos-master/pkg/chaoslogger" "github.com/Sotiris...
package main import ( "embed" "errors" "fmt" "io" "log" "os" "path/filepath" "strings" "text/template" "unicode" "google.golang.org/protobuf/compiler/protogen" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/pluginpb" ) // templateDir is the directory that createFile will look // fo...
// Code generated by gotdgen, DO NOT EDIT. package tdapi import ( "context" "errors" "fmt" "sort" "strings" "go.uber.org/multierr" "github.com/gotd/td/bin" "github.com/gotd/td/tdjson" "github.com/gotd/td/tdp" "github.com/gotd/td/tgerr" ) // No-op definition for keeping imports. var ( _ = bin.Buffer{} _...
package loops import ( "fmt" "math" ) type Mat4 [16]float32 func NewIdentityMat4() Mat4 { return Mat4{ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, } } func NewTranslateMatrix(tx, ty, tz float32) Mat4 { return Mat4{ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1, } } func NewScaleMatrix...
package soap import ( "bytes" "context" "crypto/tls" "encoding/xml" "fmt" "io/ioutil" "net" "net/http" "strings" ) var ( errUnauthorized = fmt.Errorf("soap: unauthorized") errBody = fmt.Errorf("soap: body response is empty") ) // Envelope implements soap envelope. type Envelope struct { XMLName x...
package portforwardcmd import ( "context" "flag" "fmt" "strings" "github.com/konoui/alfred-k8s/cmd/rootcmd" "github.com/konoui/alfred-k8s/cmd/utils" "github.com/konoui/alfred-k8s/pkg/kubectl" "github.com/konoui/go-alfred" "github.com/peterbourgon/ff/v3/ffcli" ) type Config struct { fs *flag.FlagS...
package main import ( "fmt" "github.com/ghodss/yaml" "github.com/integrii/flaggy" "io/ioutil" "os" ) var version string const helpText = "Usage: depcharge [--labels=<comma-separated,inherited>] [OPTIONS...] -- [COMMAND/ARGS...]" + "\n\n" + "Features:" + "\n" + "* Supports arbitrary params, whatever 'params:...
// Copyright 2020-2021 Hewlett Packard Enterprise Development LP package nimbleos // DiskFields provides field names to use in filter parameters, for example. var DiskFields *DiskFieldHandles func init() { DiskFields = &DiskFieldHandles{ ID: "id", IsDfc: "is_dfc", Serial: ...
package fandango import ( "encoding/json" "errors" "fmt" "io/ioutil" "net/http" "net/url" "os" "strings" "sync" "time" ) type Client struct { sync.RWMutex version string apiKey string } func NewDefaultClient(apiKeysToTry ...string) (*Client, error) { client := new(Client) client.SetAPIKey(envOrDefaul...
// 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writi...
package store import ( "context" "fmt" "sync" "github.com/inconshreveable/log15" "github.com/stephane-martin/skewer/conf" "github.com/stephane-martin/skewer/javascript" "github.com/stephane-martin/skewer/model" "github.com/stephane-martin/skewer/store/dests" "github.com/stephane-martin/skewer/sys/binder" "g...
package elem import ( "testing" "github.com/Bitspark/slang/pkg/core" "github.com/Bitspark/slang/tests/assertions" ) func convertOperator(t *testing.T, from string, to string, in interface{}, out interface{}) { a := assertions.New(t) fo, _ := buildOperator(core.InstanceDef{ Operator: dataConvertId, Generics:...
package bux import ( "context" "database/sql" "encoding/hex" "errors" "github.com/BuxOrg/bux/datastore" "github.com/BuxOrg/bux/utils" "github.com/bitcoinschema/go-bitcoin/v2" ) // AccessKey is an object representing an access key model // // An AccessKey is a private key with a corresponding public key // The...
// Copyright (c) 2019 Uber 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 o...
package oneview type ICTypeCol struct { Total int `json:"total,omitempty"` // "total": 1, Count int `json:"count,omitempty"` // "count": 1, Start int `json:"start,omitempty"` // "start": 0, PrevPageURI string `json:"prevPageUri,omitempty"` // "prevPageUri": null...
// 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...
// MIT License // // Copyright (c) 2019 <NAME> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merg...
package flume import ( "bytes" "encoding/json" "fmt" "github.com/ansel1/merry" "go.uber.org/zap/zapcore" "io" "strconv" "strings" ) type ( // Logger is the basic logging interface. Construct instances of Logger with a Factory, // or with the package functions (which use a package level Factory). Logger 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 ...
// Experimental: Turn the minimal cluster result (key, target, source) into an // indexable biblio ref (10eb30251f89806cb7a0f147f427c5ea7e5f9941). // // Supports multiple input styles transparently, for the moment. // // "id style" // // ---- id, title, ... --- ---- target -------------- ---- source -------------- // /...
package ovsdb import ( "encoding/json" "fmt" "reflect" ) const ( // OperationInsert is an insert operation OperationInsert = "insert" // OperationSelect is a select operation OperationSelect = "select" // OperationUpdate is an update operation OperationUpdate = "update" // OperationMutate is a mutate operat...
package agent import ( "encoding/binary" "fmt" "io" "net" "os" "os/exec" "strings" "syscall" "github.com/jhunt/go-log" "golang.org/x/crypto/ssh" ) type Agent struct { PluginPaths []string config *ssh.ServerConfig Listen net.Listener Name string Version string Port int Registration struct {...
package main import ( "flag" "log" "math/rand" "net/http" "os" "strconv" "sync" "time" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" promdto "github.com/prometheus/client_model/go" ) func randLetter(r *rand.Rand) rune { return rune(r.Intn('z'-'...
package main import ( "flag" "fmt" "os" "strings" "github.com/patrickhener/gonh/logger" "github.com/patrickhener/gonh/nessus" "github.com/patrickhener/gonh/portscan" "github.com/patrickhener/gonh/query" "github.com/patrickhener/gonh/write" ) var ( indir string temp string outfilepath string ...
/* * MIT License * * Copyright (c) 2021 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, m...
// // Copyright (c) 2017 Intel Corporation // // SPDX-License-Identifier: Apache-2.0 // package main import ( "errors" "flag" "fmt" "net" "os" "path/filepath" "time" gpb "github.com/golang/protobuf/ptypes/empty" kpb "github.com/kata-containers/ksm-throttler/pkg/grpc" "github.com/sirupsen/logrus" "golang.o...
package client import ( "bytes" "context" "crypto/md5" "encoding/json" "fmt" "net/http" "strconv" "strings" "time" discovery "github.com/Clever/discovery-go" "github.com/Clever/wag/samples/v8/gen-go-deprecated/models" "github.com/Clever/wag/samples/v8/gen-go-deprecated/tracing" "github.com/afex/hystrix-g...
package databus import ( "context" "encoding/json" "errors" "time" "go-common/app/admin/main/aegis/model" "go-common/app/admin/main/aegis/model/resource" "go-common/library/conf/env" "go-common/library/log" "go-common/library/queue/databus" ) //var var ( ErrInfo = errors.New("error info") ErrNilAgent ...
package naminglanguage import ( "math/rand" ) func isUnique(word string, wordList []Word) bool { for _, entry := range wordList { if word == entry.Word { return false } } return true } func nounFromVerb(word string) string { lastCharacter := string(word[len(word)-1:]) if lastCharacter == "e" { return ...
package userservice import ( "errors" "fmt" "time" "github.com/TomPallister/godutch-api/api/domain/validation/uservalidation" "github.com/TomPallister/godutch-api/api/infrastructure" "github.com/TomPallister/godutch-api/api/infrastructure/encryption" "github.com/TomPallister/godutch-api/api/model" "github.com...
package agilecrm import ( "bytes" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "strings" "time" ) var ErrInvalidCreds = fmt.Errorf("username or password is invalid") var ErrUnauthorized = fmt.Errorf("unauthorized") var ErrWrongFormat = fmt.Errorf("input in wrong format") var ErrContactLimit = fmt.Errorf(...
/* * Copyright 2018 The CovenantSQL 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 ...
// Code generated by pulumi-gen-awsx DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package ec2 import ( "context" "reflect" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Pseudo resource representing the default VPC and associated subnets for an account...
package deepl import ( "encoding/json" "fmt" "io/ioutil" "net/http" "net/url" "strings" ) // Client for the DeepL.com translation API. See: https://www.deepl.com/en/docs-api/ // // To access the API an AuthKey is required which can be obtained by creating "DeepL.com API account" (Free or Pro) at // https://www....
package colors import ( "fmt" "image/color" "math" "strings" "time" ciede2000 "github.com/mattn/go-ciede2000" ) type Color16 struct { Color8 color16 sysColor } var Color16Lookup map[string]*[4]uint8 func init() { Color16Lookup = make(map[string]*[4]uint8) Color16Lookup["black"] = &[4]uint8{30, 0, 0, 0} ...
/* Copyright 2017 The Kubernetes Authors. Copyright 2019 The MayaData 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 app...
package pull import ( "context" "fmt" "regexp" "strings" "sync" cli "github.com/docker/cli/cli/config/types" "github.com/docker/docker/api/types" "gitlab.com/gitlab-org/gitlab-runner/common" "gitlab.com/gitlab-org/gitlab-runner/helpers/docker" "gitlab.com/gitlab-org/gitlab-runner/helpers/docker/auth" ) ty...
package e2e import ( "encoding/json" "fmt" rawv1 "github.com/alauda/nativestor/apis/rawdevice/v1" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/pkg/errors" v1 "k8s.io/api/core/v1" "strings" ) func testCSIRawDevice() { It("start test raw device feature", func() { ns := "test-raw-device" ...
package query import ( "context" "encoding/json" "fmt" "io/ioutil" "log" "os" "time" "github.com/suhay/quest-log/types" graphql "github.com/graph-gophers/graphql-go" "github.com/joho/godotenv" bolt "go.etcd.io/bbolt" ) var graphqlSchema *graphql.Schema var resolver *Resolver // Params is a graphql query...
package redelivery import ( "context" "sync" "github.com/splunk/kafka-mq-go/pkg/logging" "github.com/splunk/kafka-mq-go/queue/internal" kafkamq "github.com/splunk/kafka-mq-go/queue/proto" "github.com/cenkalti/backoff" confluentKafka "github.com/confluentinc/confluent-kafka-go/kafka" "github.com/pkg/errors" )...
package db import ( "bytes" "compress/gzip" "database/sql" "fmt" "io" "io/ioutil" "log" "net/http" "os" "path/filepath" "strings" "time" "github.com/venicegeo/bf-ia-broker/util" ) //ConnectionProvider is a function that can provide a database connection. type ConnectionProvider func(util.LogContext) (*s...
package bytex import ( "encoding/binary" "errors" ) // 字节数组处理类型 type BytesHandlerType int // 字节数组处理函数 type BytesHandler func(in []byte) (out []byte, err error) const ( LittleBlock BytesHandlerType = iota + 1 LittleUnblock BigBlock BigUnblock Base64StdEncode Base64StdDecode Base64RawStdEncode Base64RawStd...
/* * * Copyright 2020 gRPC 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 rules func (this piece) getPawnCoverageFrom(from square, board board) (covered []square) { var captures = whitePawnCaptureOffsets if this.Player() == Black { captures = blackPawnCaptureOffsets } for _, offset := range captures { covered = append(covered, from.Offset(offset)) } return covered } func ...
package hosts import ( "fmt" "github.com/ihaiker/ngx/v2" "github.com/ihaiker/vik8s/libs/ssh" "github.com/ihaiker/vik8s/libs/utils" "io/ioutil" "net" "os" "path/filepath" "regexp" "strconv" ) //解析用户输入地址 root:[paswword|privatekey]@ip-ip:port var ( userAndPwd = `([^:]+)(:(\S+))?` ip = `\d{1,3}\.\d{1,...
// 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 ...
// Code generated by protoc-gen-go. // source: mock_config.proto // DO NOT EDIT! /* Package mock is a generated protocol buffer package. It is generated from these files: mock_config.proto It has these top-level messages: MockConfig ConfigPair MockConfigStatus */ package mock import proto "github.com/golang/pro...
package main import ( "github.com/johto/notifyutils/notifydispatcher" "github.com/lib/pq" "fmt" "github.com/prometheus/client_golang/prometheus" "os" "sync" "time" ) // Implements a wrapper for pq.Listener for use between the PostgreSQL server // and NotifyDispatcher. Here we collect some statistics and pass...
// Copyright 2020 <NAME> <<EMAIL>> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
package dao import ( "bytes" "context" "crypto/hmac" "crypto/sha1" "encoding/base64" "fmt" "hash" "io" "io/ioutil" "mime/multipart" "net/http" "path" "strconv" "time" "go-common/app/admin/main/upload/conf" "go-common/app/admin/main/upload/model" "go-common/library/ecode" "go-common/library/log" ) /...
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved. // // This Source Code Form is subject to the terms of the MIT License. // If a copy of the MIT was not distributed with this file, // You can obtain one at https://github.com/gogf/gf. package dconv_test import ( "github.com/osgochina/donkeygo/co...
package gadget import ( "fmt" "go/ast" "go/parser" "go/token" "io" "os" ) // File contains all the information we have about a parsed Go file. type File struct { Path string // The path of the Go file this File represents. Imports []ImportDecl // The imports contained within the Go file. Types ...
package devtogo import ( "fmt" ) // PublishedArticle returns a published article with post content for the provided article id. // See https://docs.dev.to/api/#operation/getArticleById. func (c *Client) PublishedArticle(id int32) (*Article, error) { var res Article err := c.get(c.baseURL+fmt.Sprintf("/articles/%d"...
// 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 ...
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. package bundle import ( "archive/zip" "bufio" "bytes" "errors" "fmt" "io" "i...
package main import ( //"encoding/json" //"errors" "log" //"net/http" //"net/url" "os" //"strings" //"strconv" //"sync" "time" //"github.com/gorilla/mux" //databox "github.com/me-box/lib-go-databox" databox "github.com/cgreenhalgh/lib-go-databox" ) var dataStoreHref = os.Getenv("DATABOX_STORE_JSON_ENDP...
package dr import "fmt" // Regex represents the nodes of the regex, which // support printing a string, as well as transformation // under derivative. type Regex interface { fmt.Stringer Derivative(rune) Regex Accepting() bool } // Match returns true if the string matches the regex. // This is sugar for calling D...
package main import ( "bufio" "bytes" "flag" "fmt" "html/template" "io" "io/ioutil" "log" "os" "os/exec" "path" "path/filepath" "sort" "strings" "time" "github.com/russross/blackfriday/v2" "github.com/tdewolff/minify" "github.com/tdewolff/minify/css" "github.com/tdewolff/minify/html" ) const _date...
package main import ( "encoding/binary" "encoding/json" "fmt" "log" "sync" "time" "github.com/gorilla/websocket" ) type lxWebsocket struct { address string running bool ws *websocket.Conn ctlChannel chan loxoneControlMessage binChannel chan []byte stsChannel chan loxone...
package curatorext import ( "errors" "time" "github.com/cenkalti/backoff" "github.com/curator-go/curator" "github.com/curator-go/curator/recipes/cache" "github.com/samuel/go-zookeeper/zk" "github.com/LiveRamp/hank-go/thriftext" "fmt" "sync" errors2 "github.com/pkg/errors" log "github.com/sirupsen/logrus...
/* SPDX-License-Identifier: Apache-2.0 Copyright Contributors to the Submariner project. 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...
// Package selectel implements a DNS provider for solving the DNS-01 challenge using Selectel Domains API. // Selectel Domain API reference: https://kb.selectel.com/23136054.html // Token: https://my.selectel.ru/profile/apikeys package selectel import ( "fmt" "net/http" "os" "strconv" "time" "github.com/selecte...
/* Copyright 2020 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...
package main import ( "fmt" "os" "strconv" "strings" "github.com/gocolly/colly" ) var baseURL = "https://hanascan.com/" // Manga ... type Manga struct { Title string URL string LastChapter int ChapterInfo *[]ChapterInfo } // ChapterInfo holds chapter's static information along with the image...
package redfish_client import ( "fmt" "net/http" "github.com/imroc/req" "crypto/tls" "crypto/md5" "encoding/hex" "encoding/base64" "strings" "github.com/metal3-io/baremetal-operator/pkg/bmc" ) type RedfishClient struct { Name string AuthType string BmcCred bmc.Credentials BaseURL string Header ...
package main import ( "bufio" "flag" "fmt" "github.com/nuagenetworks/libvrsdk-demo/vrs" "math/rand" "os" "os/exec" "time" ) func execCmd(c string) { fmt.Println(c) cmd := exec.Command("bash", "-c", c) _, err := cmd.Output() if err != nil { e := fmt.Sprintf("Error: %s", err) fmt.Println(e) os.Exit(1)...
package v1 import ( "gin-vue-admin/global" "gin-vue-admin/model" "gin-vue-admin/model/request" "gin-vue-admin/model/response" "gin-vue-admin/service" "github.com/gin-gonic/gin" "go.uber.org/zap" ) type CreateSentinelInfoForm struct { ClusterName string `json:"cluster_name"` Sentinels []mode...
// Copyright 2020, 2021 <NAME>. All rights reserved. package main import ( "bytes" "context" "encoding/json" "flag" "io/ioutil" "log" "os" "os/exec" "strconv" "syscall" "time" "github.com/tgulacsi/go/globalctx" ) /* #!/bin/sh firefox= swaymsg -m -t subscribe '["window"]' | \ jq -r --unbuffered '.chang...
package handler import ( "encoding/json" "fmt" "go-im/app/model" "go-im/app/service" "net/http" "sync" "time" "github.com/gorilla/websocket" "github.com/sirupsen/logrus" "gopkg.in/fatih/set.v0" ) //本核心在于形成userid 和 Node 的映射关系 type Node struct { Conn *websocket.Conn //并行转串行 DataQueue chan []byte //此管道 用来收...
// 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 aws import ( "fmt" "sort" "strconv" "strings" "time" "github.com/ap-communications/cq/src/ccmd/commons" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" ) func Easyup() { createInstance() } func createInstance() { region := commons.F...
package dagjose // Code generated by go-ipld-prime gengo. DO NOT EDIT. import ( "github.com/ipld/go-ipld-prime/datamodel" ) var _ datamodel.Node = nil // suppress errors when this dependency is not referenced // Type is a struct embeding a NodePrototype/Type for every Node implementation in this package. // One of...
// Copyright (c) 2014, <NAME> <<EMAIL>> // All rights reservec. // Distributed under BSD2 license that can be found in LICENSE file. package widget import ( "image" "image/color" "github.com/js-arias/sparta" ) // Button is a widget that shows a text, and can be "pushed" with the mouse. // When a mouse button is ...
// Copyright 2017 Mirantis // // 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 IBM Corporation 2020. All rights reserved. // SPDX-License-Identifier: Apache2.0 // package listeners import ( "context" "encoding/json" "errors" "os" "sync" "time" "github.com/stellar/go/clients/horizon" "github.com/GFTN/gftn-services/gftn-models/model" global_environment "github.com/GFTN/gf...
package runners import ( "context" "fmt" "net" "sync" "time" coilv2 "github.com/cybozu-go/coil/v2/api/v2" "github.com/cybozu-go/coil/v2/pkg/constants" "github.com/cybozu-go/coil/v2/pkg/nodenet" "github.com/go-logr/logr" "github.com/prometheus/client_golang/prometheus" corev1 "k8s.io/api/core/v1" "sigs.k8s...
package membuf import ( "fmt" "io" "github.com/skillian/errors" ) const ( // pagePow2 is the only const that can be tweaked in this // implementation. pagePow2 = 15 // pageSize is 2 to the (pagePow2) pageSize = 1 << pagePow2 // pageMask is the page size minus one. Go requires 2's complement, so // pageS...
package htlcswitch import ( "bytes" "encoding/hex" "io" "github.com/btcsuite/golangcrypto/ripemd160" "github.com/go-errors/errors" "github.com/lightningnetwork/lightning-onion" "github.com/lightningnetwork/lnd/routing" "github.com/roasbeef/btcd/btcec" "github.com/roasbeef/btcutil" ) // HopID represents the ...
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
package main import ( "encoding/binary" "log" "math/rand" "net" "sync" "time" ) type RoutingRule struct { Distance uint8 NextHop *net.UDPAddr Time time.Time Sequence uint16 Public bool } type RoutingTable struct { routes map[string][]*RoutingRule virtualIP net.IP ifaceName string mutex...
package shake import ( "strings" "github.com/cpmech/gosl/io" "github.com/shyang107/util" ) // SoilProfile is Option#2 that the data for soil profile type SoilProfile struct { //Option#2 // Number : soil dposit number, may be left blank // Indentification : identification for soil profile optionIndentification ...
package platform import ( //"log" "github.com/aniou/morfe/lib/mylog" "github.com/aniou/morfe/emulator/emu" "github.com/aniou/morfe/emulator/bus" "github.com/aniou/morfe/emulator/cpu_65c816" "github.com/aniou/morfe/emulator/cpu_dummy" "github.com/aniou/morfe/emulator/...
package schema import ( "fmt" "github.com/divyesh19/sqlgen2/parse" "bytes" "strconv" "io" "strings" ) type postgres struct{} var Postgres Dialect = postgres{} func (d postgres) Index() int { return PostgresIndex } func (d postgres) String() string { return "Postgres" } func (d postgres) Alias() string { ...
// Copyright 2020 The Chromium OS 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 arcappcompat will have tast tests for android apps on Chromebooks. package arcappcompat import ( "context" "time" "chromiumos/tast/loca...
package transfercoin import ( "fmt" "github.com/make-os/kit/crypto/ed25519" "github.com/make-os/kit/types" "github.com/make-os/kit/types/core" "github.com/make-os/kit/types/state" "github.com/make-os/kit/types/txns" "github.com/make-os/kit/util" "github.com/make-os/kit/util/errors" "github.com/make-os/kit/ut...
package proxy import ( "fmt" vhost "github.com/pavel-d/go-vhost" "io" "log" "net" "strconv" "sync" "time" ) const ( muxTimeout = 10 * time.Second DefaultConnectTimeout = 10 * time.Second ) type Options struct { ConfigPath string } type Backend struct { Addr string `"yaml:addr"` Con...
package main import ( "bufio" "bytes" "container/list" "fmt" "io" "net" "os" "os/exec" "sync" "time" ) var startProcessOnConnect = true var mutex = &sync.Mutex{} type conChanListElement struct { Connection *net.TCPConn } var activeConnectionsList = list.New() var processOutputChannel = make(chan []byte,...
package core import ( "math/rand" "os" "os/signal" "strings" "time" "github.com/jonog/redalert/assertions" "github.com/jonog/redalert/events" "github.com/jonog/redalert/notifiers" "github.com/jonog/redalert/servicepb" "github.com/jonog/redalert/utils" ) func (c *Check) Start() { c.Data.Enabled = true c.D...
/* Copyright © 2020 NAME HERE <EMAIL ADDRESS> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writi...
package main import ( "bytes" "encoding/xml" "flag" "fmt" "io/ioutil" "os" "strings" ) var amqpToGo = map[string]string{ "bit": "bool", "octet": "byte", "short": "uint16", "long": "uint32", "longlong": "uint64", "table": "Table", "timestamp": "uint64", "shortstr": "string", "l...
// // Copyright (c) 2019 <NAME> <<EMAIL>> // // 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 PROVIDED "AS IS" AND THE AUTHOR DISCL...
package birdland import ( "fmt" "github.com/pkg/errors" "github.com/rlouf/birdland/sampler" ) type WeaverCfg struct { DefaultWeight float64 `json:"default_weight"` *BirdCfg } func NewWeaverCfg() *WeaverCfg { cfg := WeaverCfg{ DefaultWeight: 1, BirdCfg: NewBirdCfg(), } return &cfg } // Weaver is ...
// Copyright 2019 Tricot Inc. // Use of this source code is governed by the license in the LICENSE file. package core // import "src.tricot.io/public/bazel2x/bazel/core" import ( "fmt" "path/filepath" "regexp" "strings" ) // WorkspaceName is the name of a Bazel workspace (not including leading "@"), or empty if ...