text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func NewGame() *Game {
return &Game{}
} | [
-0.0037138941697776318,
-0.5670647025108337,
-0.07811497151851654,
0.6907230615615845,
-0.6829454302787781,
0.6401354074478149,
-1.187645435333252,
-1.2573273181915283,
-0.01114092767238617,
-0.1813061535358429,
0.681864857673645,
-0.07427065074443817,
-0.904618501663208,
-0.21695952117443... |
func NewLogWriter(ctx context.Context, logger *logrus.Logger, level logrus.Level) *LogWriter {
lw := &LogWriter{
entry: logger.WithContext(ctx),
level: level,
}
if ctx.Value(CtxSpinner) != nil {
lw.spinner = ctx.Value(CtxSpinner).(*Spinner)
}
return lw
} | [
-0.21761861443519592,
-0.5874590873718262,
0.05387662723660469,
0.07902858406305313,
-1.2298845052719116,
-0.6855323314666748,
-0.3472529649734497,
0.5815587639808655,
0.6241425275802612,
-0.06132000312209129,
-0.14964069426059723,
0.5664012432098389,
-0.15836843848228455,
0.50140768289566... |
func (c *pulsarClient) Packages() Packages {
return &packages{
pulsar: c,
basePath: "/packages",
}
} | [
0.39308372139930725,
0.39842599630355835,
0.013401982374489307,
-0.7444954514503479,
-0.044548336416482925,
-0.10931240022182465,
-0.12734641134738922,
0.04688394442200661,
0.2764863073825836,
-1.263071894645691,
0.3429909944534302,
-0.2495005875825882,
-0.021077491343021393,
-0.2947746813... |
func (_m *MockInterface) ReadPassword(prompt string) (string, error) {
ret := _m.Called(prompt)
var r0 string
if rf, ok := ret.Get(0).(func(string) string); ok {
r0 = rf(prompt)
} else {
r0 = ret.Get(0).(string)
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(prompt)
} else {
... | [
-0.766119122505188,
-0.5343108177185059,
0.6213944554328918,
0.6928125023841858,
-0.039579082280397415,
0.06367256492376328,
1.1021933555603027,
0.4074513018131256,
0.018413765355944633,
-0.07432211935520172,
-0.1380338817834854,
0.4003354609012604,
-0.14065812528133392,
0.0281345285475254... |
func (_e *MockInterface_Expecter) ReadPassword(prompt interface{}) *MockInterface_ReadPassword_Call {
return &MockInterface_ReadPassword_Call{Call: _e.mock.On("ReadPassword", prompt)}
} | [
0.09365211427211761,
0.04779805615544319,
0.772081732749939,
0.49274346232414246,
-0.20467348396778107,
0.48546406626701355,
0.5046932697296143,
0.011763744987547398,
0.4928593337535858,
0.750320315361023,
-0.02823900431394577,
-0.30553901195526123,
-0.39980000257492065,
0.3276756405830383... |
func (_m *MockInterface) ReadString(prompt string) (string, error) {
ret := _m.Called(prompt)
var r0 string
if rf, ok := ret.Get(0).(func(string) string); ok {
r0 = rf(prompt)
} else {
r0 = ret.Get(0).(string)
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(prompt)
} else {
r... | [
-1.0703651905059814,
-0.2133571207523346,
0.45175793766975403,
0.46396496891975403,
-0.00270634307526052,
-0.11058367043733597,
0.9689414501190186,
0.22807347774505615,
-0.16592951118946075,
-0.343551367521286,
0.4983324110507965,
0.44458839297294617,
0.1862242966890335,
-0.569573819637298... |
func (_e *MockInterface_Expecter) ReadString(prompt interface{}) *MockInterface_ReadString_Call {
return &MockInterface_ReadString_Call{Call: _e.mock.On("ReadString", prompt)}
} | [
-0.23937520384788513,
0.1189073920249939,
0.5287215709686279,
0.02830776758491993,
-0.3244503140449524,
0.24302330613136292,
0.5222561955451965,
-0.445347398519516,
0.10790029168128967,
0.08556932955980301,
0.5199466347694397,
-0.18097521364688873,
-0.03528675064444542,
-0.6100013852119446... |
func NewMockInterface(t mockConstructorTestingTNewMockInterface) *MockInterface {
mock := &MockInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
} | [
-0.545587420463562,
-0.600219190120697,
0.1108364686369896,
0.33942294120788574,
-0.1881750226020813,
0.4699462354183197,
0.8391964435577393,
-0.662484347820282,
0.15229174494743347,
0.08212985098361969,
-0.4940311014652252,
-0.9698154330253601,
-1.102988839149475,
1.073377013206482,
0.0... |
func NewBitbucketRemote(cfg *config.Bitbucket) (Remote, error) {
var client *bitbucket.Client
if basic := cfg.GetBasic(); basic != nil {
username := basic.Username
password := ""
if pwd := basic.GetPassword(); pwd != nil {
password = pwd.Value
}
client = bitbucket.NewBasicAuth(username, password)
} el... | [
-0.46528860926628113,
-0.8861560225486755,
0.5087260603904724,
-0.07351779192686081,
-1.0722947120666504,
0.5885921120643616,
-1.1750468015670776,
-0.1314174085855484,
-1.0581755638122559,
0.3660943806171417,
-1.341932773590088,
0.5515340566635132,
-0.9542862176895142,
0.17083124816417694,... |
func (api *API) SendPhotoMessage(mes *PhotoMessage) error {
fields := map[string]string{
"chat_id": strconv.Itoa(int(mes.ChatID)),
"photo": mes.Photo,
"caption": mes.Caption,
"parse_mode": "MarkdownV2",
}
return api.sendMessage(fields, methodSendPhoto)
} | [
-1.6198724508285522,
-0.39874741435050964,
0.4267204701900482,
0.8365605473518372,
-0.5399462580680847,
-0.09970312565565109,
-0.6721577048301697,
-1.0643905401229858,
-0.4858194887638092,
0.10756665468215942,
-1.1053838729858398,
0.30277904868125916,
-0.21384598314762115,
1.53269171714782... |
func (api *API) SendTextMessage(mes *TextMessage) error {
fields := map[string]string{
"chat_id": strconv.Itoa(int(mes.ChatID)),
"text": mes.Text,
"parse_mode": "MarkdownV2",
}
return api.sendMessage(fields, methodSendMessage)
} | [
-1.0951147079467773,
-0.12312594801187515,
0.37909024953842163,
0.12085908651351929,
-0.2371869683265686,
-0.07126440107822418,
-1.5525331497192383,
-0.48914995789527893,
-0.7616536021232605,
0.6668266654014587,
-0.8345421552658081,
0.1264980584383011,
-0.9626919031143188,
1.44946694374084... |
func (c *Client) ListRepoBranches(user, repo string) ([]*Branch, error) {
branches := make([]*Branch, 0, 10)
return branches, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/branches", user, repo), nil, nil, &branches)
} | [
-0.21804192662239075,
0.4858579635620117,
0.19623489677906036,
0.2329951375722885,
0.215451180934906,
-0.5747965574264526,
-0.6754335165023804,
-0.8698722720146179,
0.24258281290531158,
0.016475815325975418,
-1.2365914583206177,
-0.5886640548706055,
-1.3849221467971802,
0.26161298155784607... |
func (c *Client) GetRepoBranch(user, repo, branch string) (*Branch, error) {
b := new(Branch)
return b, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/branches/%s", user, repo, branch), nil, nil, &b)
} | [
-0.31003132462501526,
1.2232401371002197,
0.31151941418647766,
0.8584446310997009,
0.21008770167827606,
-0.017678504809737206,
-0.3239800035953522,
-0.6641989946365356,
-0.0949920043349266,
-0.6524296998977661,
-0.7726077437400818,
0.43904048204421997,
-0.8874920010566711,
0.1478261500597,... |
func New6DisigtHOTPOpts(issuer, account string) CryptorOpts {
opt, _ := NewCustomHOTPOpts(issuer, account, sha1.New, 6, DefaultMsg)
return opt
} | [
0.6620972752571106,
-0.07685337215662003,
0.23258258402347565,
0.8126622438430786,
-0.2069520652294159,
-0.21586716175079346,
-0.37539905309677124,
-0.04819398373365402,
1.0941095352172852,
0.7630197405815125,
-0.3519035875797272,
-0.5025749206542969,
0.48778221011161804,
-0.64359635114669... |
func New8DisigtHOTPOpts(issuer, account string) CryptorOpts {
opt, _ := NewCustomHOTPOpts(issuer, account, sha1.New, 8, DefaultMsg)
return opt
} | [
0.5006219744682312,
0.18880176544189453,
0.22847913205623627,
0.2281043827533722,
-0.04615955427289009,
0.02388589270412922,
-0.5975815653800964,
-0.12986992299556732,
1.527101993560791,
0.8720514178276062,
-0.11481144279241562,
-0.08407183736562729,
0.15386736392974854,
-0.699306249618530... |
func NewHOTP() *HOTP { return &HOTP{} } | [
0.8222771286964417,
-1.3668736219406128,
0.2960982918739319,
1.5347462892532349,
-0.821919322013855,
0.2538849115371704,
-0.4664953052997589,
-0.607644259929657,
0.19570928812026978,
0.2614094018936157,
0.04551665112376213,
-0.30695465207099915,
-0.1676194667816162,
-0.3460300862789154,
... |
func (h *HOTP) Generate(count int64, key string, opts CryptorOpts) (string, error) {
c, err := h.generate(count, []byte(key), opts)
if err != nil {
return "", err
}
return strconv.Itoa(c), nil
} | [
-0.4092375338077545,
0.007625780068337917,
0.5788189172744751,
0.4229566752910614,
-0.32821813225746155,
0.1439787596464157,
-0.6665255427360535,
-0.6151547431945801,
-0.5452289581298828,
0.6865559220314026,
-0.24655111134052277,
-0.8392267227172852,
-0.32478809356689453,
0.025441328063607... |
func (h *HOTP) Verify(code string, count int64, key string, opts CryptorOpts) bool {
exp, err := h.Generate(count, key, opts)
if err != nil {
return false
}
if len(exp) == len(code) && subtle.ConstantTimeCompare([]byte(code), []byte(exp)) == 1 {
return true
}
return false
} | [
-0.13112615048885345,
0.4708702564239502,
0.5391635298728943,
0.9217769503593445,
0.2037762552499771,
0.11690632253885269,
-0.44516927003860474,
0.2380484938621521,
-0.16328532993793488,
0.4185894727706909,
-0.9390847682952881,
-0.05620551109313965,
-0.9164360761642456,
0.7635643482208252,... |
func SeedPosts(db *gorm.DB) error {
if result := db.Create(&posts); result.Error == nil {
return result.Error
}
return nil
} | [
0.9627940654754639,
1.4770723581314087,
0.36119794845581055,
0.2181486040353775,
0.36790457367897034,
0.5897772908210754,
0.240934818983078,
0.004141263198107481,
-0.38192030787467957,
0.004611351527273655,
-0.3084281086921692,
-0.9675490260124207,
-1.3074802160263062,
0.8552671074867249,
... |
func UpdateGraphMetrics(ctx context.Context) error {
var err error
contextLogger := log.WithFields(log.Fields{
"_id": ctx.Value("id").(string),
"_func": "UpdateGraphMetrics",
})
// Create new metric vectors
nextGraphApplicationKeyExpire := newGraphApplicationKeyExpire()
nextGraphApplicationPasswordExpire ... | [
-0.5738410949707031,
-0.6009684801101685,
0.6346714496612549,
-0.01963842287659645,
-1.4349699020385742,
0.29226574301719666,
0.0035064597614109516,
-0.3472652733325958,
-0.6227812767028809,
1.649715781211853,
0.231886625289917,
0.736709713935852,
-0.5870952606201172,
0.21112965047359467,
... |
func Builder(_ openrtb_ext.BidderName, config config.Adapter, _ config.Server) (adapters.Bidder, error) {
bidder := &adapter{
endpoint: config.Endpoint,
}
return bidder, nil
} | [
-0.9001981019973755,
-0.8080445528030396,
0.2610105872154236,
0.48632603883743286,
-1.053049921989441,
-0.2033199667930603,
-0.6006743907928467,
0.7754913568496704,
0.19556139409542084,
-0.298256516456604,
-0.6496087312698364,
0.7316908240318298,
-0.00397039158269763,
0.14629431068897247,
... |
func (m *DestinyDefinitionsDestinyItemSocketBlockDefinition) Validate(formats strfmt.Registry) error {
var res []error
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | [
-0.09806200116872787,
0.9973393082618713,
0.5738202333450317,
-0.08828115463256836,
0.31824442744255066,
-0.49431172013282776,
0.32113590836524963,
-1.048108458518982,
-0.21468529105186462,
-0.031601712107658386,
-0.49470046162605286,
0.29737523198127747,
-0.40039563179016113,
0.7668200731... |
func InitFromEnv() (faasflow.DataStore, error) {
minioDataStore := &MinioDataStore{}
minioDataStore.region = regionName()
endpoint := os.Getenv("s3_url")
tlsEnabled := tlsEnabled()
minioClient, connectErr := connectToMinio(endpoint, "s3-secret-key", "s3-access-key", tlsEnabled)
if connectErr != nil {
retur... | [
0.7718036770820618,
-0.13831999897956848,
0.38066625595092773,
-0.5584592223167419,
-0.37586817145347595,
0.4374246597290039,
-0.8583936095237732,
0.24776683747768402,
0.869863748550415,
-0.5052042007446289,
-0.9008255004882812,
0.8991517424583435,
0.4291071891784668,
-0.03907178342342377,... |
func Init(endpoint, region, secretKeySecretPath, accessKeySecretPath string, tlsEnabled bool) (faasflow.DataStore, error) {
minioDataStore := &MinioDataStore{}
minioDataStore.region = region
minioClient, connectErr := connectToMinio(endpoint, secretKeySecretPath, accessKeySecretPath, tlsEnabled)
if connectErr != ... | [
0.991789698600769,
0.06559403985738754,
0.2717629075050354,
-0.8544421792030334,
-0.861005425453186,
0.16483381390571594,
-0.7886556386947632,
0.8043040633201599,
0.36371490359306335,
-0.5423169732093811,
-0.3316645324230194,
0.5216994881629944,
0.1358308643102646,
-0.49855610728263855,
... |
func getPath(bucket, key string) string {
fileName := fmt.Sprintf("%s.value", key)
return fmt.Sprintf("%s/key/%s", bucket, fileName)
} | [
0.15633484721183777,
-0.7898035645484924,
0.49365678429603577,
-0.13154909014701843,
-0.13339616358280182,
0.8479794263839722,
0.3596576154232025,
-0.34664368629455566,
-1.2599842548370361,
0.4165100157260895,
0.5787017345428467,
0.16220615804195404,
-0.13322781026363373,
0.047712642699480... |
func (s OpenWeatherService) GetWeatherReport(ctx context.Context, lat, long string) (WeatherReport, error) {
// Start the service segment
ctx, seg := xray.BeginSubsegment(ctx, "openweather-service")
// The default return value
retval := WeatherReport{}
// Get the api key:
apikey := os.Getenv("OPENWEATHER_API_K... | [
-0.5064871907234192,
-0.02044828236103058,
0.8283651471138,
-0.6668166518211365,
0.15030917525291443,
-0.28553611040115356,
-0.6033068299293518,
-0.3218339681625366,
-0.9156403541564941,
-0.40884432196617126,
-0.2378939390182495,
0.8528167605400085,
-1.6701804399490356,
0.08777720481157303... |
func (n *CreateUser) Schema() sql.Schema {
return types.OkResultSchema
} | [
0.03126458451151848,
0.5556899309158325,
0.38297566771507263,
1.177715539932251,
0.6653247475624084,
0.15066494047641754,
0.0254495982080698,
-0.2649420499801636,
0.3316090404987335,
-0.9084192514419556,
-0.28988006711006165,
-0.48011571168899536,
-0.7337572574615479,
-0.27987319231033325,... |
func (n *CreateUser) String() string {
users := make([]string, len(n.Users))
for i, user := range n.Users {
users[i] = user.UserName.String("")
}
ifNotExists := ""
if n.IfNotExists {
ifNotExists = "IfNotExists: "
}
return fmt.Sprintf("CreateUser(%s%s)", ifNotExists, strings.Join(users, ", "))
} | [
-0.31681641936302185,
-0.16637742519378662,
0.0738605409860611,
-0.3707030713558197,
0.5365200042724609,
0.20432552695274353,
0.18826888501644135,
-0.8342257142066956,
-0.3222358226776123,
0.6704117655754089,
-0.005909200757741928,
-0.041444599628448486,
-0.2839905321598053,
0.259048759937... |
func (n *CreateUser) Database() sql.Database {
return n.MySQLDb
} | [
-0.374471515417099,
0.23575858771800995,
0.07624395191669464,
1.3645641803741455,
0.15541575849056244,
0.5831120014190674,
-0.2827969789505005,
-0.60977703332901,
0.3604312837123871,
-0.9953080415725708,
-0.6252411603927612,
-0.0009416391840204597,
-0.3647323548793793,
0.9773651957511902,
... |
func (n *CreateUser) WithDatabase(db sql.Database) (sql.Node, error) {
nn := *n
nn.MySQLDb = db
return &nn, nil
} | [
-0.47357234358787537,
0.6878378391265869,
0.15944398939609528,
0.33972862362861633,
-0.37566667795181274,
0.17021484673023224,
0.22724898159503937,
-0.6465827822685242,
0.6310399770736694,
-0.2391124665737152,
-1.3721771240234375,
-0.6880180239677429,
-0.298123836517334,
0.7180471420288086... |
func (n *CreateUser) Resolved() bool {
_, ok := n.MySQLDb.(sql.UnresolvedDatabase)
return !ok
} | [
-0.40087610483169556,
0.687341570854187,
0.5089096426963806,
0.11664871871471405,
0.5337414145469666,
0.08136969804763794,
-0.7621735334396362,
0.4751938581466675,
-0.6103755831718445,
-1.51300048828125,
-1.784043788909912,
-0.9004289507865906,
-0.7334785461425781,
0.4036141633987427,
-0... |
func (n *CreateUser) Children() []sql.Node {
return nil
} | [
-0.4392443299293518,
0.7851455211639404,
0.36650824546813965,
-0.061286360025405884,
-0.10801315307617188,
1.1088827848434448,
-0.4203898310661316,
-0.8350939154624939,
-0.5334384441375732,
-0.9674894213676453,
-0.9886781573295593,
0.039806559681892395,
-0.3801039457321167,
0.0224097371101... |
func (n *CreateUser) WithChildren(children ...sql.Node) (sql.Node, error) {
if len(children) != 0 {
return nil, sql.ErrInvalidChildrenNumber.New(n, len(children), 0)
}
return n, nil
} | [
-0.22557564079761505,
0.913131833076477,
0.3657170832157135,
0.39364999532699585,
-0.137917160987854,
0.07552040368318558,
0.3752811551094055,
-0.9492843747138977,
-0.4539176821708679,
-0.8193525075912476,
-0.3624245822429657,
-0.9561429619789124,
-0.017548128962516785,
-0.1428642421960830... |
func (n *CreateUser) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool {
return opChecker.UserHasPrivileges(ctx,
sql.NewPrivilegedOperation("", "", "", sql.PrivilegeType_CreateUser))
} | [
-0.29982879757881165,
0.8011784553527832,
0.475697785615921,
1.0216211080551147,
0.23171548545360565,
-0.10631383955478668,
-0.14797049760818481,
-0.7979949116706848,
-0.21856166422367096,
0.08209699392318726,
0.17839182913303375,
-0.3506513833999634,
-0.8736401796340942,
1.049156904220581... |
func (*CreateUser) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte) {
return sql.Collation_binary, 7
} | [
0.467174232006073,
-0.4435238540172577,
0.6529034376144409,
0.595693051815033,
-0.04183090850710869,
0.38054192066192627,
0.946047842502594,
-0.22225765883922577,
0.2983521521091461,
0.3671884834766388,
-0.54413902759552,
-0.5818830132484436,
-0.4352363646030426,
0.19616326689720154,
0.2... |
func (n *CreateUser) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error) {
mysqlDb, ok := n.MySQLDb.(*mysql_db.MySQLDb)
if !ok {
return nil, sql.ErrDatabaseNotFound.New("mysql")
}
editor := mysqlDb.Editor()
defer editor.Close()
for _, user := range n.Users {
// replace empty host with any host
if u... | [
-1.1120293140411377,
0.119470976293087,
0.573772132396698,
0.21598580479621887,
-0.41536837816238403,
-0.3051892817020416,
0.19929823279380798,
-0.22436106204986572,
-0.01595412567257881,
-0.08435389399528503,
0.09514184296131134,
-0.7072144150733948,
-0.07102546840906143,
0.75311738252639... |
func NewMockOutboundTransport(expectedResponse string) *MockOutboundTransport {
return &MockOutboundTransport{ExpectedResponse: expectedResponse}
} | [
-0.4129943549633026,
-1.2879924774169922,
0.23905783891677856,
-0.3504674434661865,
-0.3531583547592163,
0.5379458069801331,
-0.15139895677566528,
-0.613756000995636,
0.4831739664077759,
0.019513750448822975,
-1.0603818893432617,
0.20160336792469025,
-0.5142906308174133,
0.0456723421812057... |
func (transport *MockOutboundTransport) Send(data []byte, destination string) (string, error) {
return transport.ExpectedResponse, transport.SendErr
} | [
-0.8484099507331848,
-0.5946142077445984,
0.42984890937805176,
-0.43706580996513367,
-0.08461760729551315,
0.7428104281425476,
-0.5498719215393066,
-0.12012734264135361,
0.1299239695072174,
-0.06636742502450943,
-0.35654398798942566,
0.2130172699689865,
-0.5057254433631897,
-0.242459103465... |
func (o *GetAPI24RemoteVolumeSnapshotsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetApi24RemoteVolumeSnapshotsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, ... | [
-0.2982541620731354,
-1.390949010848999,
0.7341821789741516,
0.3948555588722229,
-0.049681007862091064,
-0.8965889811515808,
-0.37301793694496155,
-0.14396321773529053,
0.4402884244918823,
-0.0815301463007927,
0.2066817730665207,
-0.8144384026527405,
-0.5742353796958923,
-0.455508947372436... |
func NewGetApi24RemoteVolumeSnapshotsOK() *GetApi24RemoteVolumeSnapshotsOK {
return &GetApi24RemoteVolumeSnapshotsOK{}
} | [
-0.09364031255245209,
-0.5215669274330139,
0.6900570392608643,
1.147302508354187,
-0.23356099426746368,
-0.6590605974197388,
-0.8326037526130676,
0.4021543562412262,
-0.18082039058208466,
-0.30960536003112793,
-1.2722069025039673,
-0.747026264667511,
0.36166173219680786,
-1.360683083534240... |
func NewGetApi24RemoteVolumeSnapshotsBadRequest() *GetApi24RemoteVolumeSnapshotsBadRequest {
return &GetApi24RemoteVolumeSnapshotsBadRequest{}
} | [
-0.07797977328300476,
-0.9183295369148254,
0.9362053275108337,
0.8584803938865662,
-0.26539427042007446,
-0.26852384209632874,
-0.6337333917617798,
0.4756462275981903,
-0.1453307569026947,
-0.5070028305053711,
-0.523300290107727,
0.6249461770057678,
-0.25895050168037415,
-0.900409340858459... |
func Edit(ctx context.Context, w io.Writer) error {
server := config.GetDefaultContext()
engineCli, err := client.NewCluster(server)
if err != nil {
return err
}
existingPolicy, err := engineCli.GetPolicy(ctx)
if err != nil {
return err
}
policyInput, err := askForPolicyInput(existingPolicy)
if err != n... | [
0.029064597561955452,
-0.7928971648216248,
0.5417640209197998,
-0.6085534691810608,
1.0053683519363403,
1.3028123378753662,
1.0813214778900146,
0.060719043016433716,
-0.18995662033557892,
0.42369434237480164,
0.576421856880188,
0.9277559518814087,
-0.5775049328804016,
-0.1565178483724594,
... |
func askForPolicyInput(existingPolicy *graphql.Policy) (*graphql.PolicyInput, error) {
policyStr, err := toYAMLString(existingPolicy)
if err != nil {
return nil, err
}
editor := ""
prompt := &survey.Editor{
Message: "Edit current Policy using YAML syntax",
Default: heredoc.Doc(policyStr),
Appe... | [
0.10942993313074112,
-0.6913873553276062,
0.26323238015174866,
-0.679246723651886,
-0.6809628009796143,
0.8407003879547119,
0.7991147041320801,
0.01157059334218502,
0.2771790027618408,
-0.6396727561950684,
0.15245817601680756,
0.6618849635124207,
-0.17642034590244293,
-0.23578910529613495,... |
func (h *HelloController) Setup(router *gin.Engine) {
router.GET("/hello", h.handleHello)
} | [
-0.04826192930340767,
0.12687495350837708,
0.3924059569835663,
0.45272210240364075,
1.714360237121582,
0.12210668623447418,
0.5108968615531921,
0.47084107995033264,
-0.6063370704650879,
-1.0405347347259521,
-0.9989237785339355,
0.061352770775556564,
0.394761323928833,
0.8730512261390686,
... |
func main() {
ws := new(restful.WebService)
ws.Route(ws.GET("/run").To(hello))
restful.Add(ws)
log.Fatal(http.ListenAndServe(":8080", nil))
} | [
0.4733520746231079,
-0.162112757563591,
0.6716250777244568,
0.7614184021949768,
0.7527400255203247,
0.19273115694522858,
-0.3600063920021057,
0.2426927536725998,
-0.9573220014572144,
-0.3302372097969055,
-0.5488373637199402,
1.3017877340316772,
-0.02890423685312271,
0.09668675065040588,
... |
func (s *server) TokenHandler(w http.ResponseWriter, r *http.Request) {
grantType := r.FormValue("grant_type")
switch grantType {
case "password":
s.ResourceOwnerPasswordGrant(w, r)
case "refresh_token":
s.RefreshTokenGrant(w, r)
default:
s.handleError(w, r, oauthError("unsupported_grant_type", ""))
}
} | [
-0.16713041067123413,
-0.42798635363578796,
0.5641459822654724,
0.7766624689102173,
-0.26279717683792114,
0.060098420828580856,
0.2734253704547882,
-0.3004791736602783,
0.7818819880485535,
-0.12200235575437546,
0.6375912427902222,
0.20504017174243927,
-0.1609717756509781,
0.882496356964111... |
func (s *server) ResourceOwnerPasswordGrant(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
username := r.FormValue("username")
password := r.FormValue("password")
cookie := r.Header.Get(xhttp.XUseCookie)
if username == "" {
s.log.WithContext(ctx).Warn("username required")
s.handleError(w, r, o... | [
0.34103360772132874,
-0.12920676171779633,
0.9905002117156982,
0.41323184967041016,
-0.7377555966377258,
-0.20921485126018524,
0.12869027256965637,
-0.16997723281383514,
0.3629559874534607,
0.27567043900489807,
0.5454704761505127,
0.6226345300674438,
-0.13800419867038727,
0.662005126476287... |
func (s *server) RefreshTokenGrant(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
refreshTokenParam := r.FormValue("refresh_token")
cookie := r.Header.Get(xhttp.XUseCookie)
if refreshTokenParam == "" {
s.log.WithContext(ctx).Warn("refresh_token required")
s.handleError(w, r, oauthError("invalid... | [
0.6225936412811279,
-0.7319987416267395,
1.0655194520950317,
0.45593079924583435,
-0.44098395109176636,
-0.16677320003509521,
-0.5217118859291077,
-0.4814380705356598,
0.28726860880851746,
0.2917371988296509,
0.8471918106079102,
0.9214409589767456,
-0.17972718179225922,
0.2872738838195801,... |
func New(host string, port int) http_multiplexer.IMultiplexer {
return &multiplexer{
host: host,
mux: goji.NewMux(),
port: port,
}
} | [
-0.2513602375984192,
-0.8071160912513733,
0.4144766628742218,
-0.007123230025172234,
-0.7570297122001648,
-0.9095327854156494,
-1.1700258255004883,
0.20939962565898895,
-0.9643939733505249,
-0.10158863663673401,
-0.6905350089073181,
0.16847556829452515,
-0.471728652715683,
0.41483271121978... |
func (m *multiplexer) Get(endpoint string, handler func(http.ResponseWriter, *http.Request)) {
m.mux.HandleFunc(pat.Get(endpoint), handler)
} | [
-0.4166380763053894,
-0.18308022618293762,
0.46887022256851196,
0.05694032460451126,
0.10670685023069382,
-0.4149112403392792,
-0.36591482162475586,
0.46780702471733093,
-0.3137331008911133,
-0.6194228529930115,
0.10929081588983536,
0.3735189735889435,
0.7428626418113708,
-0.60594487190246... |
func (m *multiplexer) Post(endpoint string, handler func(http.ResponseWriter, *http.Request)) {
m.mux.HandleFunc(pat.Post(endpoint), handler)
} | [
-0.037977367639541626,
0.08431632816791534,
0.31604984402656555,
0.8545229434967041,
-0.3576531708240509,
0.15049001574516296,
-0.11587919294834137,
0.38822582364082336,
-0.2692713737487793,
-1.2189184427261353,
-0.33518290519714355,
-0.6345129609107971,
0.49111706018447876,
0.038334771990... |
func (m *multiplexer) Serve() {
m.initialize()
err := m.server.ListenAndServe()
if err != nil {
fmt.Errorf("failed calling ListenAndServe() on http.Server. %s", err.Error())
}
} | [
0.075304314494133,
-0.901208221912384,
0.27769237756729126,
0.4684162735939026,
0.4391137361526489,
-0.38435909152030945,
-0.37134599685668945,
0.392372190952301,
-1.2735594511032104,
-0.4704584777355194,
-1.030822992324829,
0.05176670849323273,
-0.6285736560821533,
1.1414780616760254,
1... |
func (m *multiplexer) Use(middleware func(http.Handler) http.Handler) {
m.mux.Use(middleware)
} | [
-0.665457010269165,
0.04004389047622681,
0.9694381356239319,
0.5216301679611206,
-0.8791900873184204,
-0.2007146030664444,
-0.6130233407020569,
-0.10344772040843964,
0.0844518318772316,
-0.432623952627182,
0.0700661912560463,
-0.01973973959684372,
-0.8564060926437378,
1.1802253723144531,
... |
func (h *H) WaitForEndpointReady(svc *kubev1.Service, n int, dur time.Duration) error {
if svc == nil {
return errors.New("svc was nil")
}
for i := 0; i < n; i++ {
if endpoints, err := h.Kube().CoreV1().Endpoints(svc.Namespace).Get(svc.Name, metav1.GetOptions{}); err != nil {
log.Println(err)
} else if end... | [
-0.8652831315994263,
0.16479039192199707,
0.4604147970676422,
-0.5367271304130554,
0.3109706938266754,
-0.6074614524841309,
-1.144362211227417,
-0.5286285877227783,
0.016651498153805733,
0.4610547423362732,
-0.10762448608875275,
0.3754104673862457,
0.2998546361923218,
0.6375082731246948,
... |
func (rpcServer HttpServer) estimateFeeWithEstimator(defaultFee int64, shardID byte, numBlock uint64, tokenId *common.Hash) uint64 {
estimateFeeCoinPerKb := uint64(0)
if defaultFee == -1 {
if _, ok := rpcServer.config.FeeEstimator[shardID]; ok {
temp, _ := rpcServer.config.FeeEstimator[shardID].EstimateFee(numBl... | [
0.6549803018569946,
0.5903766751289368,
0.6423965096473694,
1.02610182762146,
0.1184517964720726,
-0.8132815957069397,
-0.14712591469287872,
0.028892090544104576,
-0.17889805138111115,
0.18848514556884766,
0.31853845715522766,
-0.00013055092131253332,
-1.2609140872955322,
1.501202940940857... |
func (rpcServer HttpServer) estimateFee(
defaultFee int64,
candidateOutputCoins []*privacy.OutputCoin,
paymentInfos []*privacy.PaymentInfo, shardID byte,
numBlock uint64, hasPrivacy bool,
metadata metadata.Metadata,
customTokenParams *transaction.CustomTokenParamTx,
privacyCustomTokenParams *transaction.CustomTo... | [
0.3163745701313019,
0.4364563226699829,
0.8267345428466797,
0.2592596709728241,
-0.08341783285140991,
-0.9881298542022705,
-0.05772317573428154,
0.3287942707538605,
-0.7821075916290283,
0.4421918988227844,
0.27431681752204895,
0.10243967175483704,
-1.4225680828094482,
0.6971638798713684,
... |
func (rpcServer HttpServer) chooseBestOutCoinsToSpent(outCoins []*privacy.OutputCoin, amount uint64) (resultOutputCoins []*privacy.OutputCoin, remainOutputCoins []*privacy.OutputCoin, totalResultOutputCoinAmount uint64, err error) {
resultOutputCoins = make([]*privacy.OutputCoin, 0)
remainOutputCoins = make([]*privac... | [
-0.2169990837574005,
-0.37152916193008423,
0.7341604828834534,
-0.6063232421875,
-0.20622602105140686,
-0.7094035744667053,
0.5286933779716492,
-1.0044448375701904,
-0.06676675379276276,
0.2812277674674988,
0.2992904484272003,
0.8567436933517456,
-0.5679584741592407,
-0.45477017760276794,
... |
func (rpcServer HttpServer) GetPaymentAddressFromPrivateKeyParams(senderKeyParam string) (*privacy.PaymentAddress, error) {
keySet, err := rpcServer.GetKeySetFromPrivateKeyParams(senderKeyParam)
if err != nil {
return nil, err
}
return &keySet.PaymentAddress, err
} | [
-0.7076475024223328,
-0.7034624218940735,
0.7546203136444092,
0.4458340108394623,
-0.998223066329956,
-0.12416055798530579,
0.1370692402124405,
-0.33470046520233154,
0.15034006536006927,
0.5703966021537781,
0.20948179066181183,
0.741493821144104,
-0.6645684242248535,
0.6056424379348755,
... |
func (rpcServer HttpServer) GetKeySetFromKeyParams(keyParam string) (*incognitokey.KeySet, error) {
keyWallet, err := wallet.Base58CheckDeserialize(keyParam)
if err != nil {
return nil, err
}
return &keyWallet.KeySet, nil
} | [
-0.2525720000267029,
-0.19961123168468475,
0.20601683855056763,
0.10308001190423965,
-0.25548428297042847,
-0.5440065264701843,
-0.20063212513923645,
-0.7169904708862305,
0.29063647985458374,
0.25220417976379395,
-0.12661883234977722,
0.22626806795597076,
-1.7061212062835693,
-0.2076696157... |
func (rpcServer HttpServer) GetKeySetFromPrivateKeyParams(privateKeyWalletStr string) (*incognitokey.KeySet, error) {
// deserialize to crate keywallet object which contain private key
keyWallet, err := wallet.Base58CheckDeserialize(privateKeyWalletStr)
if err != nil {
return nil, err
}
// fill paymentaddress an... | [
-0.25635388493537903,
-0.5199070572853088,
0.40145277976989746,
-0.42437174916267395,
-0.5624439120292664,
-0.5811517238616943,
-0.7410264015197754,
-0.9544392228126526,
0.5020883679389954,
0.6573200821876526,
0.35366514325141907,
0.7680055499076843,
-0.9783484935760498,
0.3463601469993591... |
func AzureUniqueID(cloudMetadataTimeout timeutil.Duration) string {
c := http.Client{
Timeout: cloudMetadataTimeout.AsDuration(),
}
req, err := http.NewRequest("GET", "http://169.254.169.254/metadata/instance?api-version=2018-10-01", nil)
if err != nil {
return ""
}
req.Header.Set("Metadata", "true")
resp, ... | [
0.3104861080646515,
-0.1560335010290146,
0.7146994471549988,
-0.9944651126861572,
-0.1829652041196823,
-0.007489378564059734,
-0.7214488983154297,
-0.5128502249717712,
-0.400470495223999,
1.4916599988937378,
0.3614146411418915,
0.9092563390731812,
-0.13272733986377716,
0.13845595717430115,... |
func SaveToEgressCache(egressConfigFromPilot map[string][]*config.EgressRule) {
{
var egressconfig []control.EgressConfig
for _, v := range egressConfigFromPilot {
for _, v1 := range v {
var Ports []*control.EgressPort
for _, v2 := range v1.Ports {
p := control.EgressPort{
Port: (*v2).Por... | [
-0.33628904819488525,
0.5401511788368225,
0.5361419916152954,
-0.6807344555854797,
0.8640006184577942,
0.6244104504585266,
-0.04701997712254524,
0.5822750329971313,
-0.6930224299430847,
1.3694045543670654,
-1.1867895126342773,
0.15594999492168427,
-0.5125227570533752,
0.7362786531448364,
... |
func GetBucketPublicAccessTypeEnumValues() []BucketPublicAccessTypeEnum {
values := make([]BucketPublicAccessTypeEnum, 0)
for _, v := range mappingBucketPublicAccessType {
values = append(values, v)
}
return values
} | [
-0.481393963098526,
-0.6778374910354614,
0.41098716855049133,
0.33969515562057495,
0.31005752086639404,
0.7960220575332642,
-0.15204720199108124,
0.10066214948892593,
-0.6879849433898926,
-0.6708818674087524,
-1.2015647888183594,
0.07302861660718918,
0.561443030834198,
0.17002984881401062,... |
func GetBucketStorageTierEnumValues() []BucketStorageTierEnum {
values := make([]BucketStorageTierEnum, 0)
for _, v := range mappingBucketStorageTier {
values = append(values, v)
}
return values
} | [
-0.8988887071609497,
-1.317462682723999,
0.5290825963020325,
-0.24325025081634521,
0.7544133067131042,
-0.18465378880500793,
-0.7508658170700073,
0.015374606475234032,
-0.43386366963386536,
-0.6800912022590637,
-1.5191270112991333,
-0.04531881958246231,
0.6559205055236816,
-0.5459930300712... |
func GetBucketVersioningEnumValues() []BucketVersioningEnum {
values := make([]BucketVersioningEnum, 0)
for _, v := range mappingBucketVersioning {
values = append(values, v)
}
return values
} | [
-1.0787420272827148,
-0.9168745279312134,
0.4467734694480896,
0.3151821792125702,
0.9918327331542969,
0.8693679571151733,
-0.17899322509765625,
0.5366846323013306,
-0.6396840214729309,
-0.29325854778289795,
-1.5571397542953491,
-0.06170089915394783,
0.4435798227787018,
0.31142890453338623,... |
func GetBucketAutoTieringEnumValues() []BucketAutoTieringEnum {
values := make([]BucketAutoTieringEnum, 0)
for _, v := range mappingBucketAutoTiering {
values = append(values, v)
}
return values
} | [
-0.2002730667591095,
-0.7890588641166687,
0.5294619202613831,
0.5731092691421509,
0.6075513362884521,
-0.1211971566081047,
0.5023084282875061,
0.6144155859947205,
-1.1551544666290283,
-0.8046202659606934,
-1.5211811065673828,
0.2643671929836273,
0.43943098187446594,
0.08182534575462341,
... |
func (m MagneticFlux) Unit() *Unit {
return New(float64(m), Dimensions{
CurrentDim: -1,
LengthDim: 2,
MassDim: 1,
TimeDim: -2,
})
} | [
-0.20932142436504364,
-0.07531290501356125,
0.4163697063922882,
0.12738148868083954,
0.0034757505636662245,
-0.12511293590068817,
0.7272388935089111,
0.15246228873729706,
0.17274165153503418,
-0.9309219121932983,
-0.342581182718277,
0.6685829162597656,
-0.7111641764640808,
0.29963690042495... |
func (m MagneticFlux) MagneticFlux() MagneticFlux {
return m
} | [
0.7780000567436218,
-0.16663086414337158,
-0.07484433054924011,
0.20511408150196075,
-0.30117398500442505,
-0.12259349972009659,
-0.2653423845767975,
-0.18223640322685242,
0.22169165313243866,
-1.3358103036880493,
-0.4014897048473358,
0.47357597947120667,
-0.5534748435020447,
0.64641910791... |
func (m *MagneticFlux) From(u Uniter) error {
if !DimensionsMatch(u, Weber) {
*m = MagneticFlux(math.NaN())
return errors.New("Dimension mismatch")
}
*m = MagneticFlux(u.Unit().Value())
return nil
} | [
0.4394993185997009,
-0.06724881380796432,
0.21722707152366638,
0.7817713618278503,
-0.6667910814285278,
0.44529882073402405,
0.09952451288700104,
0.14397628605365753,
-0.17908407747745514,
-1.4333617687225342,
0.533598005771637,
0.5031925439834595,
0.331269770860672,
0.6258599162101746,
... |
func NewTracer() Tracer {
return &nullTracer{}
} | [
0.724111795425415,
-0.47373709082603455,
0.03526686504483223,
0.03144123777747154,
-0.6653572916984558,
0.21143795549869537,
-0.1414542943239212,
-0.6088281273841858,
0.5206249952316284,
-1.076347827911377,
0.019231783226132393,
-0.001413113554008305,
-0.3950471878051758,
1.245928883552551... |
func checkJoinMempools(t *testing.T) {
r := ObtainHarness(mainHarnessName)
// Assert main test harness has no transactions in its mempool.
pooledHashes, err := r.NodeRPCClient().GetRawMempool("")
if err != nil {
t.Fatalf("unable to get mempool for main test harness: %v", err)
}
if len(pooledHashes) != 0 {
t.... | [
0.8287487030029297,
-0.023232057690620422,
0.9620482325553894,
-0.07680679857730865,
0.698387622833252,
-0.05987193062901497,
0.5144667029380798,
-0.7134421467781067,
-0.5552797317504883,
0.5751367211341858,
-0.34020304679870605,
0.5461722016334534,
-0.9267669916152954,
-0.0036631689872592... |
func PossibleAsyncOperationStateValues() []AsyncOperationState {
return []AsyncOperationState{AsyncOperationStateFailed, AsyncOperationStateInProgress, AsyncOperationStateSucceeded}
} | [
-1.1272621154785156,
-0.26227813959121704,
0.273516982793808,
0.3253728151321411,
-0.34966176748275757,
-0.10284410417079926,
-0.4763682782649994,
-0.023153478279709816,
0.37791961431503296,
0.2770286798477173,
0.3982856571674347,
-0.4650479853153229,
0.3821273148059845,
0.0843399539589881... |
func PossibleClusterProvisioningStateValues() []ClusterProvisioningState {
return []ClusterProvisioningState{ClusterProvisioningStateCanceled, ClusterProvisioningStateDeleting, ClusterProvisioningStateFailed, ClusterProvisioningStateInProgress, ClusterProvisioningStateSucceeded}
} | [
-0.39245671033859253,
0.1088232770562172,
0.35215234756469727,
0.9650904536247253,
-0.6149320602416992,
0.24584224820137024,
-0.5032937526702881,
0.28974807262420654,
0.4647741913795471,
0.862773060798645,
0.06485907733440399,
-0.40109989047050476,
-0.4036320149898529,
-0.3033706843852997,... |
func PossibleDaysOfWeekValues() []DaysOfWeek {
return []DaysOfWeek{DaysOfWeekFriday, DaysOfWeekMonday, DaysOfWeekSaturday, DaysOfWeekSunday, DaysOfWeekThursday, DaysOfWeekTuesday, DaysOfWeekWednesday}
} | [
-0.28796255588531494,
0.2433556318283081,
0.49627694487571716,
-0.7122991681098938,
-0.01995350606739521,
-0.45170044898986816,
-0.3943798542022705,
-1.562401533126831,
0.39846229553222656,
-0.9967641234397888,
0.02683880180120468,
0.34673288464546204,
1.0254666805267334,
1.444711089134216... |
func PossibleDirectoryTypeValues() []DirectoryType {
return []DirectoryType{DirectoryTypeActiveDirectory}
} | [
-0.9122637510299683,
-0.48666784167289734,
0.4021821618080139,
1.3111903667449951,
0.2220565676689148,
-0.30539774894714355,
0.24204987287521362,
-0.19726061820983887,
0.36945825815200806,
-0.4151884913444519,
-0.7611154913902283,
0.23522548377513885,
0.05702877789735794,
1.654552578926086... |
func PossibleFilterModeValues() []FilterMode {
return []FilterMode{FilterModeDefault, FilterModeExclude, FilterModeInclude, FilterModeRecommend}
} | [
-0.967934250831604,
-0.4313303232192993,
0.4278794229030609,
1.125143051147461,
-0.6846123337745667,
0.3182142674922943,
-0.9843546748161316,
0.22497998178005219,
0.1116548404097557,
-0.09979507327079773,
-0.7212694883346558,
1.0171682834625244,
-0.02975792996585369,
0.7575016617774963,
... |
func PossibleJSONWebKeyEncryptionAlgorithmValues() []JSONWebKeyEncryptionAlgorithm {
return []JSONWebKeyEncryptionAlgorithm{JSONWebKeyEncryptionAlgorithmRSA15, JSONWebKeyEncryptionAlgorithmRSAOAEP, JSONWebKeyEncryptionAlgorithmRSAOAEP256}
} | [
0.03586205840110779,
-0.0315198116004467,
0.4930865466594696,
0.9279978275299072,
-0.9362130761146545,
-0.39973321557044983,
0.3618025481700897,
-0.4012816846370697,
0.3051805794239044,
0.9646772742271423,
-0.8667929172515869,
0.5719280242919922,
0.5127129554748535,
1.5927623510360718,
0... |
func PossibleOSTypeValues() []OSType {
return []OSType{OSTypeLinux, OSTypeWindows}
} | [
-0.7719358801841736,
-0.11634078621864319,
0.3644644021987915,
1.3160960674285889,
-0.3789893686771393,
0.14411847293376923,
-0.9182294607162476,
-0.16803371906280518,
-0.12797024846076965,
-0.5367391705513,
-0.8056778311729431,
0.8322198390960693,
-0.19203580915927887,
1.5146979093551636,... |
func PossiblePrivateLinkValues() []PrivateLink {
return []PrivateLink{PrivateLinkDisabled, PrivateLinkEnabled}
} | [
-0.7399095296859741,
-0.2850514054298401,
0.04871784523129463,
1.1270833015441895,
0.2041487693786621,
0.15150567889213562,
-0.686882734298706,
0.46378883719444275,
0.7323790192604065,
-0.981377363204956,
-0.703193724155426,
1.027163028717041,
-0.3847033381462097,
1.2142164707183838,
0.7... |
func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
return []ResourceIdentityType{ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, ResourceIdentityTypeSystemAssignedUserAssigned, ResourceIdentityTypeUserAssigned}
} | [
-0.15460149943828583,
-1.0142980813980103,
0.31187349557876587,
0.6157777905464172,
0.34342724084854126,
0.38035041093826294,
0.42634472250938416,
-0.17088192701339722,
0.6974285244941711,
-0.41586339473724365,
-0.9259501099586487,
-0.7880887389183044,
-0.5525209307670593,
1.05716168880462... |
func PossibleResourceProviderConnectionValues() []ResourceProviderConnection {
return []ResourceProviderConnection{ResourceProviderConnectionInbound, ResourceProviderConnectionOutbound}
} | [
-0.5097160339355469,
-1.2459880113601685,
0.014163006097078323,
0.5039750933647156,
-0.3738231062889099,
0.5979444980621338,
-0.5762072801589966,
0.20614609122276306,
-0.04354512318968773,
-0.049699198454618454,
0.37957873940467834,
-0.29576575756073,
-0.107691191136837,
0.5193521976470947... |
func PossibleTierValues() []Tier {
return []Tier{TierPremium, TierStandard}
} | [
-0.5564460754394531,
-0.705605149269104,
0.29353073239326477,
0.7690238952636719,
-0.9803029894828796,
0.2906130850315094,
-0.9137564301490784,
0.6713962554931641,
-0.6500305533409119,
-0.7262508273124695,
-0.6261696219444275,
0.6443877816200256,
0.07745927572250366,
1.3020257949829102,
... |
func (l *Factory) CreateLocalDiscoveryProvider(config fabApi.EndpointConfig) (fabApi.LocalDiscoveryProvider, error) {
logger.Debug("create local Provider Impl")
return &impl{config, l.LocalPeer, l.LocalPeerTLSCertPem}, nil
} | [
0.32808148860931396,
-0.6885948181152344,
0.09314337372779846,
0.08236485719680786,
-0.36283859610557556,
0.4180960953235626,
0.1714070737361908,
0.49847710132598877,
0.8687630891799927,
0.2719578444957733,
-0.5335123538970947,
-0.6956875324249268,
-0.43232354521751404,
0.18924480676651,
... |
func (l *impl) CreateLocalDiscoveryService(mspID string) (fabApi.DiscoveryService, error) {
return &localDiscoveryService{l.clientConfig, l.localPeer, l.localPeerTLSCertPem}, nil
} | [
0.7863760590553284,
-0.8754451870918274,
0.009949649684131145,
-0.005436450242996216,
0.04035310819745064,
0.2946503460407257,
-0.06868381053209305,
0.12338487058877945,
0.46130064129829407,
-0.714177131652832,
-0.4292665123939514,
-0.36929553747177124,
-0.9280888438224792,
1.1137754917144... |
func (o *PostLeasesIDAuthReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewPostLeasesIDAuthCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return resu... | [
-0.05521606653928757,
-0.984997034072876,
0.7285874485969543,
0.4242427945137024,
-0.46372902393341064,
-0.7441880702972412,
-0.36837321519851685,
-0.20502063632011414,
0.7589808702468872,
0.31464987993240356,
0.021761680021882057,
-0.16570758819580078,
-0.9095422029495239,
0.0309078209102... |
func NewPostLeasesIDAuthCreated() *PostLeasesIDAuthCreated {
return &PostLeasesIDAuthCreated{}
} | [
1.1368567943572998,
-0.8777022957801819,
-0.013596036471426487,
-0.06446470320224762,
-0.5664787888526917,
-0.04656009003520012,
-0.09221845865249634,
0.012537472881376743,
0.4123227298259735,
-0.8179742693901062,
-0.8096687197685242,
-0.9143370389938354,
0.02725505828857422,
0.20733174681... |
func NewPostLeasesIDAuthUnauthorized() *PostLeasesIDAuthUnauthorized {
return &PostLeasesIDAuthUnauthorized{}
} | [
-0.09385789185762405,
-0.9033077359199524,
0.4626425802707672,
0.260105699300766,
-1.489504098892212,
-0.5171092748641968,
-0.6781471371650696,
0.6144136190414429,
0.5127891898155212,
-0.872038722038269,
-0.5688641667366028,
0.6793634295463562,
0.0033409229945391417,
-0.284725546836853,
... |
func NewPostLeasesIDAuthForbidden() *PostLeasesIDAuthForbidden {
return &PostLeasesIDAuthForbidden{}
} | [
0.08385977894067764,
-0.2884436845779419,
0.21416378021240234,
0.31099215149879456,
-1.1249195337295532,
0.1032579317688942,
-0.43743962049484253,
-0.33139553666114807,
0.41633737087249756,
-0.38793835043907166,
-0.6651577949523926,
0.21184101700782776,
0.1465662568807602,
-0.3205430805683... |
func (o *PostLeasesIDAuthCreatedBody) Validate(formats strfmt.Registry) error {
return nil
} | [
0.6643072366714478,
-0.10262159258127213,
-0.026120444759726524,
-0.6274307370185852,
0.35616615414619446,
0.6802464127540588,
-0.39161160588264465,
-0.0980837494134903,
0.005295431707054377,
-0.49596095085144043,
-0.423580139875412,
-0.008683293126523495,
-0.9108790755271912,
1.1356726884... |
func PrepareNetwork(experimentsDetails *experimentTypes.ExperimentDetails, clients clients.ClientSets, resultDetails *types.ResultDetails) error {
var endTime <-chan time.Time
timeDelay := time.Duration(experimentsDetails.ChaosDuration) * time.Second
log.Info("[Chaos Target]: Fetching dependency info")
deps, err ... | [
-0.37057992815971375,
0.2027733325958252,
0.9153652191162109,
-0.27288103103637695,
1.2161234617233276,
-0.4237513244152069,
-0.0077326796017587185,
0.3624633550643921,
-0.17752605676651,
-0.4471670985221863,
0.46664753556251526,
-0.3845008611679077,
0.37725433707237244,
0.0731286779046058... |
func ChaosTargetPID(chaosNode string, appNs string, appLabel string, clients clients.ClientSets) ([]int, error) {
podList, err := clients.KubeClient.CoreV1().Pods(appNs).List(metav1.ListOptions{
LabelSelector: appLabel,
FieldSelector: "spec.nodeName=" + chaosNode,
})
if err != nil {
return []int{}, err
}
if... | [
-0.4852515757083893,
-1.4039950370788574,
0.8864941596984863,
0.04474484175443649,
1.0643149614334106,
-0.4628218710422516,
-0.4030130207538605,
-0.1488243192434311,
0.26352041959762573,
0.3660913407802582,
0.36933186650276184,
0.2367497682571411,
-0.7265864014625549,
-0.0906035378575325,
... |
func resolveXipIoWithContext(ctx context.Context, network, addr string) (net.Conn, error) {
dialer := &net.Dialer{
DualStack: true,
}
if strings.Contains(addr, ".xip.io") {
regex := `\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).xip.io\b`
re := regexp.MustCompile... | [
0.25894248485565186,
-0.5453237891197205,
0.9883140325546265,
0.5892813205718994,
-0.3913804590702057,
-0.6982938051223755,
-0.23214498162269592,
0.1427152305841446,
0.6157040596008301,
0.6236214637756348,
-0.10504668951034546,
-0.68260258436203,
-0.6183326840400696,
-0.8911017179489136,
... |
func PanicErr(err error) {
if err != nil {
panic(err)
}
} | [
0.9058816432952881,
-0.25746849179267883,
-0.07963442802429199,
1.1924660205841064,
-1.0516836643218994,
0.5705191493034363,
-0.5394848585128784,
0.4007565677165985,
0.736709713935852,
-0.06520958989858627,
0.3093774616718292,
-0.6308850646018982,
0.15157562494277954,
2.045837163925171,
... |
func LogErr(err error, msg string) {
if err != nil {
log.Fatal(msg, err)
}
} | [
1.0472607612609863,
-0.3814580738544464,
0.214370995759964,
0.7363930344581604,
-0.614701509475708,
-0.12737521529197693,
-1.3173189163208008,
0.8722167015075684,
0.6708028316497803,
-0.30020299553871155,
0.3289380371570587,
0.1412040740251541,
-0.12584269046783447,
1.6096783876419067,
1... |
func Hash(data []byte) []byte {
return hash.SHA256(data)
} | [
1.205262541770935,
-0.16679538786411285,
0.03657010570168495,
0.08029590547084808,
0.05585380271077156,
0.6879202723503113,
-0.8040589094161987,
0.5550754070281982,
0.5660461187362671,
-0.1979740709066391,
-1.0177929401397705,
1.1697133779525757,
-0.3631722331047058,
0.33293965458869934,
... |
func cfree(c *C.char) {
C.free(unsafe.Pointer(c))
} | [
1.0951441526412964,
0.15461735427379608,
0.5007760524749756,
-1.608541488647461,
-0.3939172029495239,
0.06386974453926086,
0.20802900195121765,
-0.9848508834838867,
-0.8040773272514343,
0.4716998040676117,
-0.39086616039276123,
0.0810350775718689,
-0.7632238268852234,
1.0907580852508545,
... |
func boolToC(v bool) C.int {
if v {
return 1
}
return 0
} | [
-0.03666489198803902,
-0.4743821620941162,
0.36499565839767456,
-0.25411665439605713,
-0.178192138671875,
-0.2099967896938324,
1.150191068649292,
-0.534812331199646,
-0.5497806668281555,
0.25811678171157837,
-0.09467015415430069,
0.24352318048477173,
1.1540336608886719,
-0.1294557005167007... |
func convertSize(size uint64) C.ulonglong {
return C.ulonglong(size * 2) // kB to 512-byte sectors
} | [
-0.7095332741737366,
0.27493953704833984,
0.6291941404342651,
0.03573114052414894,
-0.930832028388977,
-0.8561583161354065,
-0.2859945595264435,
-0.26857855916023254,
2.0448429584503174,
-0.11479534208774567,
-0.6478590369224548,
-0.6197221875190735,
-0.6706240773200989,
0.4244060218334198... |
func (s *Queue) Push(val interface{}) {
if s.IsEmpty() {
tmp := new(node)
tmp.val = val
s.head = tmp
s.tail = tmp
s.len += 1
} else {
current_tail := s.tail
tmp := new(node)
tmp.val = val
current_tail.previous = tmp
tmp.next = current_tail
s.tail = tmp
s.len += 1
}
} | [
-0.00880551990121603,
1.0188325643539429,
0.41887834668159485,
-0.4105554223060608,
-0.5460821986198425,
0.07489833980798721,
0.23552609980106354,
-0.43160492181777954,
0.4150587320327759,
0.11520852148532867,
-0.5562117099761963,
1.4035871028900146,
-0.008847806602716446,
1.38043963909149... |
func (s *Queue) Pop() interface{} {
if s.IsEmpty() {
panic("Pop on empty queue")
} else {
current_head := s.head
val := current_head.val
s.head = current_head.previous
current_head.val = nil
return val
}
} | [
0.16499163210391998,
0.027739806100726128,
0.45573070645332336,
0.26986202597618103,
-1.0263266563415527,
-0.7218970060348511,
0.13171052932739258,
-0.4527719020843506,
0.4233599007129669,
0.6545052528381348,
-0.3240826427936554,
0.30532410740852356,
-0.4497566223144531,
0.3227943480014801... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.