text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (this *ObjectNames) Type() value.Type { return value.ARRAY } | [
-1.1163849830627441,
-0.6746047735214233,
0.4308905005455017,
-0.2846709191799164,
1.0612692832946777,
0.4427047669887543,
0.4274812638759613,
-1.3729133605957031,
0.7243688106536865,
0.2988843619823456,
-0.6198333501815796,
0.8566405773162842,
-0.22730214893817902,
0.844723105430603,
0.... |
func (this *ObjectNames) Evaluate(item value.Value, context Context) (value.Value, error) {
return this.UnaryEval(this, item, context)
} | [
-1.0796350240707397,
-0.271492063999176,
0.45257577300071716,
-0.6786887645721436,
0.30026787519454956,
-0.2975807189941406,
-0.6790688633918762,
-0.7749007940292358,
0.7120748162269592,
0.19348035752773285,
-0.7538712024688721,
-0.7308107018470764,
0.1447554975748062,
-1.0043526887893677,... |
func (this *ObjectNames) Apply(context Context, arg value.Value) (value.Value, error) {
if arg.Type() == value.MISSING {
return value.MISSING_VALUE, nil
} else if arg.Type() != value.OBJECT {
return value.NULL_VALUE, nil
}
oa := arg.Actual().(map[string]interface{})
keys := make(sort.StringSlice, 0, len(oa))
... | [
-0.4819391965866089,
-0.4163283407688141,
0.9507386684417725,
-0.6977989673614502,
-0.7391844987869263,
0.1412965953350067,
-0.13157746195793152,
0.10559061169624329,
0.2152797430753708,
0.7193167209625244,
-0.146001935005188,
0.11182816326618195,
1.0905083417892456,
0.5375930070877075,
... |
func (this *ObjectNames) Constructor() FunctionConstructor {
return func(operands ...Expression) Function {
return NewObjectNames(operands[0])
}
} | [
-0.9237759709358215,
-0.7240049242973328,
0.4062860608100891,
-0.07903547585010529,
-0.4984302222728729,
-0.1999933272600174,
0.5062588453292847,
-0.09169020503759384,
-0.2817753553390503,
-0.33449387550354004,
-0.45301881432533264,
-0.15600599348545074,
1.2686055898666382,
-0.567315220832... |
func NewObjectPairs(operand Expression) Function {
rv := &ObjectPairs{
*NewUnaryFunctionBase("object_pairs", operand),
}
rv.expr = rv
return rv
} | [
-0.9563910961151123,
-0.28977009654045105,
0.5571891069412231,
0.19194123148918152,
-2.2099478244781494,
-0.06784828752279282,
0.18872077763080597,
0.3345871567726135,
0.044782526791095734,
0.23595260083675385,
-0.26117628812789917,
-0.22534042596817017,
-0.2151491492986679,
-0.82929241657... |
func (this *ObjectPairs) Accept(visitor Visitor) (interface{}, error) {
return visitor.VisitFunction(this)
} | [
-1.9045063257217407,
0.05551118031144142,
0.6313299536705017,
-0.4647871255874634,
-1.3685857057571411,
0.23924514651298523,
1.988269567489624,
-0.4181091785430908,
-0.7232982516288757,
0.11035507917404175,
0.025232717394828796,
-0.5613670349121094,
0.26121610403060913,
-0.1672244369983673... |
func (this *ObjectPairs) Type() value.Type { return value.ARRAY } | [
-1.189757227897644,
-0.6841744184494019,
0.6076979637145996,
0.029014911502599716,
0.514393150806427,
0.7832283973693848,
0.8738841414451599,
-1.1385977268218994,
0.7731418609619141,
0.25584012269973755,
0.02551931142807007,
0.6684342622756958,
-0.7448233962059021,
0.6211578845977783,
0.... |
func (this *ObjectPairs) Evaluate(item value.Value, context Context) (value.Value, error) {
return this.UnaryEval(this, item, context)
} | [
-1.1785094738006592,
-0.14592120051383972,
0.5087891221046448,
-0.28826960921287537,
-0.12555702030658722,
-0.16425679624080658,
-0.1900431513786316,
-0.6750953197479248,
0.7089933156967163,
-0.07083059102296829,
-0.29186978936195374,
-0.7833797335624695,
-0.2481658160686493,
-1.2512793540... |
func (this *ObjectPairs) Apply(context Context, arg value.Value) (value.Value, error) {
if arg.Type() == value.MISSING {
return value.MISSING_VALUE, nil
} else if arg.Type() != value.OBJECT {
return value.NULL_VALUE, nil
}
oa := arg.Actual().(map[string]interface{})
keys := make(sort.StringSlice, 0, len(oa))
... | [
-0.7535447478294373,
-0.46560001373291016,
0.9883608222007751,
-0.4858355224132538,
-1.3284838199615479,
0.20589131116867065,
0.07866167277097702,
0.1030278205871582,
0.04931896552443504,
0.5570268034934998,
-0.01492064818739891,
-0.3185798227787018,
0.7454021573066711,
0.41610002517700195... |
func (this *ObjectPairs) Constructor() FunctionConstructor {
return func(operands ...Expression) Function {
return NewObjectPairs(operands[0])
}
} | [
-1.1455713510513306,
-0.4964238703250885,
0.4043245315551758,
0.5825381278991699,
-1.063965082168579,
-0.011877569369971752,
1.2808834314346313,
0.1894300878047943,
-0.09397736936807632,
-0.5958247184753418,
-0.019374674186110497,
-0.6084882020950317,
0.6184039115905762,
-0.614787399768829... |
func NewObjectValues(operand Expression) Function {
rv := &ObjectValues{
*NewUnaryFunctionBase("object_values", operand),
}
rv.expr = rv
return rv
} | [
-0.4462032914161682,
-0.39302974939346313,
0.5945757627487183,
0.3021421730518341,
-1.3903580904006958,
0.12604966759681702,
-0.5293158888816833,
0.754378616809845,
-0.5401643514633179,
-0.27576640248298645,
-0.9807618260383606,
0.6126892566680908,
1.0400022268295288,
-0.47692403197288513,... |
func (this *ObjectValues) Accept(visitor Visitor) (interface{}, error) {
return visitor.VisitFunction(this)
} | [
-1.3574849367141724,
-0.041634947061538696,
0.6095417141914368,
-0.25255557894706726,
-0.8383280038833618,
0.4752298593521118,
1.399839162826538,
-0.27453160285949707,
-0.960750937461853,
-0.26963430643081665,
-0.28728511929512024,
-0.09582751989364624,
1.101086139678955,
0.170709729194641... |
func (this *ObjectValues) Type() value.Type { return value.ARRAY } | [
-0.4386650025844574,
-0.6317081451416016,
0.48474594950675964,
0.11305467784404755,
1.0129529237747192,
0.6543761491775513,
0.3463650941848755,
-0.9703627228736877,
0.5861660838127136,
-0.010356234386563301,
-0.38586652278900146,
1.0910269021987915,
-0.10804364085197449,
1.0505305528640747... |
func (this *ObjectValues) Evaluate(item value.Value, context Context) (value.Value, error) {
return this.UnaryEval(this, item, context)
} | [
-0.7262676954269409,
-0.20611733198165894,
0.4854017198085785,
-0.07463254779577255,
0.3021250069141388,
-0.21862244606018066,
-0.5864800810813904,
-0.44476622343063354,
0.7536883354187012,
-0.12260200828313828,
-0.5871091485023499,
-0.443681001663208,
0.21614211797714233,
-1.0769369602203... |
func (this *ObjectValues) Apply(context Context, arg value.Value) (value.Value, error) {
if arg.Type() == value.MISSING {
return value.MISSING_VALUE, nil
} else if arg.Type() != value.OBJECT {
return value.NULL_VALUE, nil
}
oa := arg.Actual().(map[string]interface{})
keys := make(sort.StringSlice, 0, len(oa))... | [
-0.24887850880622864,
-0.5356035232543945,
0.980540931224823,
-0.21059410274028778,
-0.8277862071990967,
0.2941606342792511,
-0.0960792750120163,
0.31536343693733215,
0.20976893603801727,
0.4644133746623993,
-0.10547986626625061,
0.21852833032608032,
1.111931324005127,
0.5789220333099365,
... |
func (this *ObjectValues) Constructor() FunctionConstructor {
return func(operands ...Expression) Function {
return NewObjectValues(operands[0])
}
} | [
-0.4780738353729248,
-0.6897280812263489,
0.43820035457611084,
0.7521865367889404,
-0.3894151747226715,
0.2205016016960144,
0.40543708205223083,
0.39249539375305176,
-0.6147197484970093,
-0.8073028922080994,
-0.4973766505718231,
0.10744471848011017,
1.3527320623397827,
-0.17512093484401703... |
func (t *Texture) UnmarshalText(text []byte) error {
textureImage, _ := utils.Try2(ebitenutil.NewImageFromFile(string(text)))
t.Image = textureImage
return nil
} | [
0.7663177251815796,
0.2251179963350296,
0.3224133253097534,
-1.4098656177520752,
-0.5732300877571106,
0.3487299680709839,
0.1579863429069519,
0.512615442276001,
-0.1530086249113083,
1.010792851448059,
-0.4674069881439209,
-0.5652961134910583,
-0.09247259050607681,
0.016038190573453903,
-... |
func NewTransform() *Transform {
return &Transform{}
} | [
0.4396108388900757,
-0.5531083345413208,
-0.02903885394334793,
0.09473354369401932,
0.5355475544929504,
-0.22018000483512878,
-0.2708575427532196,
-1.1564441919326782,
0.22100922465324402,
-2.086884021759033,
-0.6983111500740051,
0.5771740078926086,
-0.3294808566570282,
0.13015849888324738... |
func (t *Transform) SetScale(sx, sy float64) *Transform {
t.Scale1.X = sx - 1
t.Scale1.Y = sy - 1
return t
} | [
-0.5304061770439148,
-0.1709117889404297,
0.36064741015434265,
0.5761734843254089,
0.3547719419002533,
-0.2240263819694519,
-0.5880880355834961,
-0.5217167735099792,
-0.584755003452301,
0.4253789484500885,
-0.7164570689201355,
0.1533498466014862,
0.24058596789836884,
0.45306894183158875,
... |
func (t *Transform) SetRotation(angle float64) *Transform {
t.Rotation = angle
return t
} | [
-0.8953461647033691,
0.8093929886817932,
0.09109540283679962,
-0.46390020847320557,
0.1923673450946808,
-0.2948180139064789,
1.1915044784545898,
-0.1121542677283287,
0.5548480153083801,
-0.0270815622061491,
-1.0144195556640625,
-1.3284519910812378,
-0.2622426152229309,
-0.04374618828296661... |
func (t *Transform) SetTranslation(tx, ty float64) *Transform {
t.Translation.X = tx
t.Translation.Y = ty
return t
} | [
-0.35645511746406555,
-0.005921822041273117,
0.29912519454956055,
-0.1977248191833496,
0.05712517350912094,
-0.2129480540752411,
-0.04983295872807503,
-0.20797011256217957,
-0.1133614107966423,
0.4248882532119751,
-1.5103780031204224,
-1.1620376110076904,
0.8801508545875549,
-0.86577546596... |
func (t *Transform) SetDepth(depth float64) *Transform {
t.Depth = depth
return t
} | [
-0.19881880283355713,
0.22971799969673157,
0.20430897176265717,
-0.20298907160758972,
-0.18967558443546295,
1.1672199964523315,
0.9340816140174866,
0.01726939156651497,
0.581450343132019,
-1.1152483224868774,
-1.6108659505844116,
0.4892446994781494,
0.44203922152519226,
0.5438970327377319,... |
func (t *Transform) SetOrigin(origin string) *Transform {
t.Origin = origin
return t
} | [
-0.5012810826301575,
-0.5314974188804626,
0.24659430980682373,
0.12545837461948395,
-0.356671005487442,
1.067686915397644,
0.1124243214726448,
1.7919607162475586,
0.345281720161438,
-0.43043074011802673,
-1.7413134574890137,
0.5041014552116394,
0.16579411923885345,
-0.08783180266618729,
... |
func (t *Transform) ComputeOriginOffset(screenWidth, screenHeight float64) (offsetX, offsetY float64) {
switch t.Origin {
case TransformOriginTopLeft:
offsetX, offsetY = 0, screenHeight
case TransformOriginTopMiddle:
offsetX, offsetY = screenWidth/2, screenHeight
case TransformOriginTopRight:
offsetX, offsetY... | [
-0.2929677963256836,
-1.235903263092041,
0.8310719132423401,
-0.9516243934631348,
-0.61692875623703,
0.08746049553155899,
0.602062463760376,
0.6684637069702148,
0.16938339173793793,
0.16636346280574799,
0.064826101064682,
0.9696072340011597,
0.10292880982160568,
0.41790759563446045,
0.60... |
func (r *RootResolver) RunExampleResolver(ctx context.Context) {
// Prepare args
req := handlers.MustNewReader(&OnboardStartRequest{})
resp := &bytes.Buffer{}
// Prepare func
fn := handlers.WithLogging(handlers.WithMetrics("start", r.Calls, r.Errors, r.Saturation, r.Duration, OnboardStart(r.userStore, r.acc... | [
-0.6804253458976746,
-0.7047271728515625,
0.75062495470047,
-0.07377693057060242,
-0.3070777356624603,
0.3901005685329437,
0.26367759704589844,
0.08389970660209656,
-0.22714689373970032,
-0.04645279049873352,
-0.019846461713314056,
0.5577295422554016,
-0.21510091423988342,
0.59519797563552... |
func OnboardStart(userStore UserStore, accountStore AccountStore) handlers.Handler {
fn := func(ctx context.Context, w handlers.Writer, r handlers.Reader) error {
req := &OnboardStartRequest{}
handlers.MustDecode(r, req)
// Handle validations
if true {
return &handlers.UserError{"3c157e31-0a63-4f96-9c... | [
0.191307932138443,
-0.6388099193572998,
0.6075738072395325,
-0.3834104835987091,
-0.8976312875747681,
-0.3157307803630829,
0.6487464308738708,
-0.06280463933944702,
0.00012538452574517578,
0.6009097695350647,
0.23017892241477966,
0.36940285563468933,
0.024444270879030228,
0.076010867953300... |
func Log(format string, a ...interface{}) {
s := fmt.Sprintf(format, a...)
s = fmt.Sprintf("%v: %s", time.Now().Format("2006-01-02T15:04:05.000"), s)
fmt.Println(s)
} | [
0.3208359479904175,
-0.5392141938209534,
1.1398265361785889,
0.34554633498191833,
-0.19192513823509216,
0.46355876326560974,
-0.5132783651351929,
0.28507909178733826,
-0.08802241832017899,
-0.4836502969264984,
-0.4911402761936188,
0.5743510127067566,
0.7458181977272034,
0.4854624271392822,... |
func (*TopicSubmissionMessage) Descriptor() ([]byte, []int) {
return file_topic_submission_message_proto_rawDescGZIP(), []int{0}
} | [
-0.0004945847322233021,
-0.3721787929534912,
-0.2922710180282593,
0.28057652711868286,
0.1539716273546219,
-0.38533398509025574,
-0.0858544409275055,
-0.19086456298828125,
-0.7228736281394958,
-0.7487269043922424,
0.4445672631263733,
-0.22036577761173248,
-0.8075237274169922,
0.72074025869... |
func NewVvolBindingDeleteParams() *VvolBindingDeleteParams {
return &VvolBindingDeleteParams{
timeout: cr.DefaultTimeout,
}
} | [
0.386446475982666,
0.18359622359275818,
0.07820285856723785,
1.057700514793396,
-0.1864360272884369,
0.1902410387992859,
-0.39286908507347107,
0.76317298412323,
-0.02564193680882454,
1.4969972372055054,
-0.37096112966537476,
0.3764602839946747,
-1.0473593473434448,
0.5933441519737244,
-0... |
func NewVvolBindingDeleteParamsWithTimeout(timeout time.Duration) *VvolBindingDeleteParams {
return &VvolBindingDeleteParams{
timeout: timeout,
}
} | [
0.9892703294754028,
-0.13956482708454132,
0.2675826847553253,
0.9552479982376099,
-0.021793995052576065,
1.0019865036010742,
-1.2446688413619995,
0.5963536500930786,
-0.04409337416291237,
2.0834381580352783,
-0.06112919747829437,
0.5900677442550659,
-0.8041276931762695,
0.7665593028068542,... |
func NewVvolBindingDeleteParamsWithContext(ctx context.Context) *VvolBindingDeleteParams {
return &VvolBindingDeleteParams{
Context: ctx,
}
} | [
0.46714505553245544,
0.09674622863531113,
0.5588496327400208,
0.46426817774772644,
-0.11461570113897324,
0.9652783870697021,
-1.2018781900405884,
-0.29922690987586975,
0.015819426625967026,
1.6237002611160278,
-0.020391877740621567,
0.48265495896339417,
-0.8108075261116028,
0.0475665256381... |
func NewVvolBindingDeleteParamsWithHTTPClient(client *http.Client) *VvolBindingDeleteParams {
return &VvolBindingDeleteParams{
HTTPClient: client,
}
} | [
0.28579485416412354,
-0.3929978311061859,
0.24320286512374878,
0.6018730401992798,
0.3680187165737152,
0.8329088687896729,
-0.2474294900894165,
0.4743930995464325,
-0.4405522048473358,
1.2034348249435425,
-0.10668277740478516,
0.3085295259952545,
-0.8400559425354004,
0.016940122470259666,
... |
func (o *VvolBindingDeleteParams) WithDefaults() *VvolBindingDeleteParams {
o.SetDefaults()
return o
} | [
0.39445576071739197,
0.2816910445690155,
0.006774536799639463,
0.5364174246788025,
0.961517333984375,
-0.2926519811153412,
-0.45375046133995056,
-0.029816212132573128,
0.48474210500717163,
0.7441779375076294,
0.1148165836930275,
-0.6253751516342163,
-0.7767590284347534,
0.28289923071861267... |
func (o *VvolBindingDeleteParams) SetDefaults() {
var (
deleteAllReferencesDefault = bool(false)
)
val := VvolBindingDeleteParams{
DeleteAllReferences: &deleteAllReferencesDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
} | [
-0.01539775263518095,
0.2829068899154663,
0.3052634000778198,
0.4728577733039856,
1.0938714742660522,
-0.02679162099957466,
-0.1815793514251709,
0.06197170168161392,
0.05415446311235428,
0.7395221590995789,
-0.27987775206565857,
0.5803781151771545,
-1.1713157892227173,
0.8474062085151672,
... |
func (o *VvolBindingDeleteParams) WithTimeout(timeout time.Duration) *VvolBindingDeleteParams {
o.SetTimeout(timeout)
return o
} | [
0.8389312624931335,
-0.09596459567546844,
0.24934327602386475,
0.5376293063163757,
-0.05036476254463196,
0.38793134689331055,
-0.20414286851882935,
0.5013089179992676,
0.7437497973442078,
1.6196010112762451,
0.11912371963262558,
0.32300326228141785,
-0.08313955366611481,
0.7836717367172241... |
func (o *VvolBindingDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
0.37080687284469604,
-0.1520150750875473,
0.20115390419960022,
0.640487015247345,
0.40135446190834045,
0.6657615303993225,
-0.2870786190032959,
0.8612021207809448,
0.4057292938232422,
1.6246826648712158,
-0.0025009512901306152,
0.3311246335506439,
-0.7860974669456482,
0.7171277403831482,
... |
func (o *VvolBindingDeleteParams) WithContext(ctx context.Context) *VvolBindingDeleteParams {
o.SetContext(ctx)
return o
} | [
0.07149742543697357,
-0.014287247322499752,
0.4988493323326111,
0.47740739583969116,
-0.3240034580230713,
0.3042476773262024,
-0.34373319149017334,
-0.26059097051620483,
1.0151212215423584,
1.2609548568725586,
0.13114118576049805,
0.3522275388240814,
-0.6216719746589661,
0.1698389053344726... |
func (o *VvolBindingDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-0.231909841299057,
-0.0513639859855175,
0.3849491477012634,
0.8560807704925537,
0.4058650732040405,
0.41517049074172974,
-0.3628295660018921,
0.007445064838975668,
1.1135004758834839,
1.3951082229614258,
-0.053402483463287354,
0.41536182165145874,
-0.9873490929603577,
0.31942078471183777,... |
func (o *VvolBindingDeleteParams) WithHTTPClient(client *http.Client) *VvolBindingDeleteParams {
o.SetHTTPClient(client)
return o
} | [
0.19268754124641418,
-1.0027072429656982,
0.2603457272052765,
0.22470051050186157,
0.15070731937885284,
0.2717091143131256,
0.42254239320755005,
0.1295066773891449,
0.023740122094750404,
0.8436665534973145,
0.11816972494125366,
0.14583685994148254,
-0.3224087953567505,
-0.17973433434963226... |
func (o *VvolBindingDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
0.4611808955669403,
-0.6605225205421448,
0.2625083029270172,
-0.1809355467557907,
-0.051156461238861084,
-0.04310275986790657,
0.37916454672813416,
0.12301875650882721,
-0.5054477453231812,
1.135450005531311,
-0.2080429345369339,
0.39959007501602173,
-0.8084826469421387,
-0.171689733862876... |
func (o *VvolBindingDeleteParams) WithDeleteAllReferences(deleteAllReferences *bool) *VvolBindingDeleteParams {
o.SetDeleteAllReferences(deleteAllReferences)
return o
} | [
0.36515653133392334,
-1.011359453201294,
0.5950324535369873,
0.4481446146965027,
-0.007800496183335781,
0.016075532883405685,
-0.02867010608315468,
-0.05086899176239967,
0.9359327554702759,
0.6469548344612122,
0.8124703168869019,
0.1714787781238556,
-1.1043663024902344,
0.9028228521347046,... |
func (o *VvolBindingDeleteParams) SetDeleteAllReferences(deleteAllReferences *bool) {
o.DeleteAllReferences = deleteAllReferences
} | [
0.12011293321847916,
-1.1093488931655884,
0.5510740280151367,
0.0013766669435426593,
0.1629292219877243,
0.09786435961723328,
-0.23792240023612976,
-0.1880112588405609,
0.5809040069580078,
0.8315904140472412,
0.6075010299682617,
0.47487014532089233,
-1.5160436630249023,
0.8957861065864563,... |
func (o *VvolBindingDeleteParams) WithProtocolEndpointUUID(protocolEndpointUUID string) *VvolBindingDeleteParams {
o.SetProtocolEndpointUUID(protocolEndpointUUID)
return o
} | [
-0.354586124420166,
-0.6058964133262634,
0.27564266324043274,
0.3994210660457611,
-0.20967519283294678,
0.7221483588218689,
0.13187789916992188,
1.1820149421691895,
0.31361809372901917,
1.2017332315444946,
0.15394797921180725,
-0.30800288915634155,
-0.8306992650032043,
-0.23292842507362366... |
func (o *VvolBindingDeleteParams) SetProtocolEndpointUUID(protocolEndpointUUID string) {
o.ProtocolEndpointUUID = protocolEndpointUUID
} | [
-0.6739531755447388,
-0.8456340432167053,
0.14569281041622162,
0.28672102093696594,
0.02111927792429924,
0.9811060428619385,
-0.1393706202507019,
1.1866557598114014,
0.031101170927286148,
1.1926778554916382,
-0.1472509205341339,
0.23104742169380188,
-1.6380337476730347,
-0.3364636898040771... |
func (o *VvolBindingDeleteParams) WithVvolUUID(vvolUUID string) *VvolBindingDeleteParams {
o.SetVvolUUID(vvolUUID)
return o
} | [
0.4400966167449951,
-1.0824774503707886,
0.4235544502735138,
-0.24171710014343262,
-0.25427302718162537,
0.4183068573474884,
-0.19787290692329407,
0.6930389404296875,
0.44617342948913574,
0.9547136425971985,
-0.4409952163696289,
1.0082802772521973,
-0.3848592936992645,
0.12184172123670578,... |
func (o *VvolBindingDeleteParams) SetVvolUUID(vvolUUID string) {
o.VvolUUID = vvolUUID
} | [
-0.007188356015831232,
-1.1225498914718628,
0.3538523316383362,
-0.2831272780895233,
-0.10772869735956192,
0.427592009305954,
-0.18634562194347382,
0.855931282043457,
0.2475949376821518,
0.9718092083930969,
-0.7249099016189575,
1.6086540222167969,
-0.6974926590919495,
0.2581852376461029,
... |
func (o *VvolBindingDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.DeleteAllReferences != nil {
// query param delete_all_references
var qrDeleteAllReferences bool
if o.DeleteAllReferenc... | [
-0.7839878797531128,
-0.43663474917411804,
0.975249707698822,
-0.2950756251811981,
0.6426714062690735,
-0.15469086170196533,
0.884122371673584,
0.2093326449394226,
-0.17045526206493378,
0.6934816241264343,
0.23471780121326447,
0.520014226436615,
-0.6925056576728821,
0.4836636185646057,
0... |
func New() *MemStore {
return &MemStore{
privateKeyEntryMap: make(map[string]*uid.KeyEntry),
publicKeyEntryMap: make(map[string]*uid.KeyEntry),
sessionStates: make(map[string]*session.State),
sessions: make(map[string]*memSession),
sessionKeys: make(map[string]*sessionKey),
}
} | [
0.1427294760942459,
-1.5404632091522217,
-0.20886947214603424,
-0.8301336765289307,
-1.4245721101760864,
-0.1033347100019455,
-0.7643902897834778,
-0.375016450881958,
0.7335425615310669,
-0.32667821645736694,
-0.5675421953201294,
0.16155150532722473,
-0.3971861004829407,
0.28427654504776,
... |
func (ms *MemStore) SessionKey() string {
return ms.sessionKey
} | [
0.17610198259353638,
-0.585063636302948,
0.0740256980061531,
0.22507034242153168,
-0.08050484210252762,
0.11700153350830078,
0.8648885488510132,
-0.6501942276954651,
1.3848369121551514,
0.8188143372535706,
0.10994028300046921,
0.7653957605361938,
-0.642790675163269,
0.28828164935112,
-0.... |
func (ms *MemStore) AddPrivateKeyEntry(ke *uid.KeyEntry) {
ms.privateKeyEntryMap[ke.HASH] = ke
} | [
-0.0566553957760334,
-0.43665361404418945,
0.008656742051243782,
-0.24341677129268646,
-0.2729162573814392,
0.8107098340988159,
-0.5529109239578247,
-0.1507701724767685,
0.966425895690918,
0.3621841371059418,
-1.2577015161514282,
0.07496023178100586,
-1.0139236450195312,
1.0952110290527344... |
func (ms *MemStore) AddPublicKeyEntry(identity string, ke *uid.KeyEntry) {
ms.publicKeyEntryMap[identity] = ke
} | [
0.19271191954612732,
-0.38860127329826355,
0.07377064228057861,
0.2731291353702545,
-0.1325279176235199,
1.1555486917495728,
-0.7586379647254944,
0.20706966519355774,
0.4473363757133484,
0.15512718260288239,
-0.6704971194267273,
-0.10285408049821854,
-0.7475427389144897,
1.0471994876861572... |
func (ms *MemStore) GetSessionState(sessionStateKey string) (
*session.State,
error,
) {
return ms.sessionStates[sessionStateKey], nil
} | [
-0.1411619633436203,
-0.014451970346271992,
0.13212843239307404,
0.5636568665504456,
-1.1934889554977417,
-1.0150517225265503,
0.11541595309972763,
-0.6884638667106628,
1.4663804769515991,
0.36743780970573425,
-0.6580232381820679,
0.1981620341539383,
-0.6157116889953613,
-0.274653583765029... |
func (ms *MemStore) SetSessionState(
sessionStateKey string,
sessionState *session.State,
) error {
ms.sessionStates[sessionStateKey] = sessionState
return nil
} | [
-0.4142504930496216,
-0.4659605920314789,
0.12998950481414795,
-0.04864358901977539,
-0.9505771398544312,
-0.24237540364265442,
-0.226204052567482,
-0.21265792846679688,
1.4305566549301147,
0.6123716831207275,
-1.3953708410263062,
0.1463174670934677,
-0.42227888107299805,
-0.07882964611053... |
func (ms *MemStore) StoreSession(
sessionKey, rootKeyHash, chainKey string,
send, recv []string,
) error {
if len(send) != len(recv) {
return log.Error("memstore: len(send) != len(recv)")
}
log.Debugf("memstore.StoreSession(): %s", sessionKey)
s, ok := ms.sessions[sessionKey]
if !ok {
ms.sessions[sessionKey]... | [
-0.1684921383857727,
-0.5150052309036255,
0.4602333903312683,
-0.4713405966758728,
0.07192088663578033,
-0.7667296528816223,
0.07845854014158249,
-1.2004327774047852,
1.2984471321105957,
-0.17041273415088654,
-1.1038782596588135,
0.4010864198207855,
-1.0922600030899048,
0.18125073611736298... |
func (ms *MemStore) HasSession(sessionKey string) bool {
_, ok := ms.sessions[sessionKey]
return ok
} | [
-0.39025941491127014,
-0.41472524404525757,
0.22870402038097382,
-0.19365359842777252,
-0.04458547756075859,
-0.6465372443199158,
0.24792349338531494,
-0.26016920804977417,
1.430356502532959,
0.006077398546040058,
-0.8034079074859619,
-0.4648711681365967,
-0.24853935837745667,
0.1846397370... |
func (ms *MemStore) GetPrivateKeyEntry(pubKeyHash string) (*uid.KeyEntry, error) {
ke, ok := ms.privateKeyEntryMap[pubKeyHash]
if !ok {
return nil, log.Error(session.ErrNoKeyEntry)
}
return ke, nil
} | [
0.6733431816101074,
-0.3919893801212311,
0.15478190779685974,
0.14415289461612701,
-0.2127959281206131,
-0.48029977083206177,
-0.3223099708557129,
-0.42041102051734924,
0.8575159907341003,
0.5238023996353149,
-0.568372368812561,
0.6351950168609619,
-1.515835165977478,
1.0306974649429321,
... |
func (ms *MemStore) GetPublicKeyEntry(uidMsg *uid.Message) (*uid.KeyEntry, string, error) {
ke, ok := ms.publicKeyEntryMap[uidMsg.Identity()]
if !ok {
return nil, "", log.Error(session.ErrNoKeyEntry)
}
return ke, "undefined", nil
} | [
0.359578937292099,
-0.17719461023807526,
0.3346281051635742,
0.12552833557128906,
-0.4662075340747833,
-0.24183398485183716,
0.3622398376464844,
-0.25735723972320557,
0.048094119876623154,
0.027528412640094757,
-0.20394761860370636,
0.6068657636642456,
-0.9999232888221741,
1.45327687263488... |
func (ms *MemStore) NumMessageKeys(sessionKey string) (uint64, error) {
s, ok := ms.sessions[sessionKey]
if !ok {
return 0, log.Errorf("memstore: no session found for %s", sessionKey)
}
return uint64(len(s.send)), nil
} | [
-0.8252467513084412,
0.03834490105509758,
0.5716645121574402,
-0.9945348501205444,
-0.688910722732544,
-1.4667766094207764,
0.046812355518341064,
-0.5676764845848083,
1.2216323614120483,
0.9410423040390015,
-1.1308093070983887,
-0.10410448163747787,
-0.3456774950027466,
0.7918051481246948,... |
func (ms *MemStore) GetMessageKey(
sessionKey string,
sender bool,
msgIndex uint64,
) (*[64]byte, error) {
s, ok := ms.sessions[sessionKey]
if !ok {
return nil, log.Errorf("memstore: no session found for %s", sessionKey)
}
if msgIndex >= uint64(len(s.send)) {
return nil, log.Error("memstore: message index ou... | [
-0.5195671319961548,
-0.09981835633516312,
0.5953814387321472,
-0.3614775836467743,
-0.3274078071117401,
-1.3275103569030762,
-0.3696170747280121,
-0.679325520992279,
0.7860098481178284,
0.9366458058357239,
0.47619789838790894,
0.6729751229286194,
-0.7417688369750977,
0.47828465700149536,
... |
func (ms *MemStore) GetRootKeyHash(sessionKey string) (*[64]byte, error) {
s, ok := ms.sessions[sessionKey]
if !ok {
return nil, log.Errorf("memstore: no session found for %s", sessionKey)
}
// decode root key hash
var hash [64]byte
k, err := base64.Decode(s.rootKeyHash)
if err != nil {
return nil, log.Error... | [
0.8044174909591675,
-0.4081731140613556,
0.33901655673980713,
0.775768518447876,
-1.251939296722412,
-0.642484188079834,
-0.5289027094841003,
-0.584486186504364,
0.8166977763175964,
0.3835960924625397,
0.16459082067012787,
0.5741880536079407,
-1.1977248191833496,
0.4733922481536865,
0.09... |
func (ms *MemStore) GetChainKey(sessionKey string) (*[32]byte, error) {
s, ok := ms.sessions[sessionKey]
if !ok {
return nil, log.Errorf("memstore: no session found for %s", sessionKey)
}
// decode chain key
var key [32]byte
k, err := base64.Decode(s.chainKey)
if err != nil {
return nil, log.Error("memstore:... | [
0.03717374429106712,
-0.1634504497051239,
0.7519775032997131,
0.21844612061977386,
0.16825012862682343,
-0.9857985973358154,
0.021225810050964355,
-0.9945075511932373,
0.5523818731307983,
0.5099489092826843,
-0.5936529040336609,
0.9766621589660645,
-0.4645764231681824,
0.2885405719280243,
... |
func (ms *MemStore) DelMessageKey(
sessionKey string,
sender bool,
msgIndex uint64,
) error {
s, ok := ms.sessions[sessionKey]
if !ok {
return log.Errorf("memstore: no session found for %s", sessionKey)
}
if msgIndex >= uint64(len(s.send)) {
return log.Error("memstore: message index out of bounds")
}
// de... | [
0.027561575174331665,
-0.03870697319507599,
0.503385066986084,
-0.8002695441246033,
-0.8784539103507996,
-0.7146140933036804,
-0.0973656103014946,
-0.23210836946964264,
1.0006654262542725,
0.9950369000434875,
0.3147774934768677,
0.27522408962249756,
-0.5803132057189941,
1.0556650161743164,... |
func (ms *MemStore) AddSessionKey(
hash, json, privKey string,
cleanupTime uint64,
) error {
ms.sessionKeys[hash] = &sessionKey{
json: json,
privKey: privKey,
cleanupTime: cleanupTime,
}
return nil
} | [
-0.581128716468811,
-0.2767103314399719,
0.4205799400806427,
0.09584031999111176,
0.07137595117092133,
-0.12665221095085144,
-0.18427225947380066,
-0.25678759813308716,
0.6277745366096497,
0.19865283370018005,
-0.8690482974052429,
0.5965983271598816,
-0.18738853931427002,
0.958820700645446... |
func (ms *MemStore) GetSessionKey(hash string) (
json, privKey string,
err error,
) {
sk, ok := ms.sessionKeys[hash]
if !ok {
return "", "", log.Error(session.ErrNoKeyEntry)
}
return sk.json, sk.privKey, nil
} | [
-0.3735431134700775,
-0.6222832202911377,
0.6624589562416077,
0.6829848885536194,
-0.2116885483264923,
-1.1298725605010986,
-0.2167343646287918,
-0.6768720746040344,
0.8322650790214539,
0.9425680041313171,
-0.7272379994392395,
1.6185580492019653,
-0.023606836795806885,
0.6093490123748779,
... |
func (ms *MemStore) DelPrivSessionKey(hash string) error {
sk, ok := ms.sessionKeys[hash]
if !ok {
return nil
}
sk.privKey = ""
return nil
} | [
0.20575009286403656,
-0.5088692307472229,
0.35903453826904297,
0.3091859519481659,
-1.0289952754974365,
-0.15772438049316406,
-0.588985800743103,
0.019451601430773735,
1.191483497619629,
0.6572319269180298,
-0.1699802577495575,
0.6274123191833496,
-0.5160313844680786,
0.9175704121589661,
... |
func (ms *MemStore) CleanupSessionKeys(t uint64) error {
var oldKeys []string
for hash, sk := range ms.sessionKeys {
if sk.cleanupTime < t {
oldKeys = append(oldKeys, hash)
}
}
for _, hash := range oldKeys {
delete(ms.sessionKeys, hash)
}
return nil
} | [
-0.81944340467453,
-0.8124591112136841,
0.38695257902145386,
-0.27672305703163147,
-1.0030796527862549,
-0.664105236530304,
-0.3567122519016266,
-0.293134480714798,
0.8008617162704468,
1.0004172325134277,
-0.4854705035686493,
0.09842053055763245,
0.05830806866288185,
0.564454972743988,
-... |
func NewDatapoint(datasetID int64, imageURL string) (dp *Datapoint, err error) {
var id int64
err = DB.QueryRow("INSERT INTO datapoint (dataset_id, image_url) VALUES ($1, $2) RETURNING id", datasetID, imageURL).Scan(&id)
if err != nil {
return // something went wrong! lets get out of here!
}
//blank space for... | [
-0.43014323711395264,
-0.27063336968421936,
0.24572652578353882,
-0.2602766752243042,
-0.32201725244522095,
-0.35501351952552795,
-1.1461968421936035,
0.05577406659722328,
0.5457085967063904,
0.10129871219396591,
-0.3215029239654541,
-0.1805000603199005,
-0.22849364578723907,
0.28232520818... |
func GetDatapointByID(id int64) (dp *Datapoint, err error) {
var datasetID int64
var imageURL string
err = DB.QueryRow("SELECT id, dataset_id, image_url FROM datapoint WHERE id=$1", id).Scan(&id, &datasetID, &imageURL)
if err != nil {
return // something went wrong! lets get out of here!
}
dp = &Datapoint{
... | [
-0.14711813628673553,
0.06241132318973541,
0.17245358228683472,
-0.3137491047382355,
-0.4528326094150543,
-0.5309541821479797,
-0.8265515565872192,
-0.3152894973754883,
0.8660939931869507,
0.19398707151412964,
-0.39531806111335754,
0.050403933972120285,
0.325825572013855,
0.180145010352134... |
func NewDeleteCoreV1NamespacedPodOK() *DeleteCoreV1NamespacedPodOK {
return &DeleteCoreV1NamespacedPodOK{}
} | [
-0.5692571997642517,
0.19715645909309387,
0.5942860841751099,
0.34419944882392883,
-0.68146812915802,
1.4691131114959717,
-0.15494972467422485,
0.021465731784701347,
0.31978312134742737,
0.5639148354530334,
-0.5215371251106262,
-0.13701675832271576,
0.30265840888023376,
0.7642925977706909,... |
func (o *DeleteCoreV1NamespacedPodOK) WithPayload(payload *models.IoK8sAPICoreV1Pod) *DeleteCoreV1NamespacedPodOK {
o.Payload = payload
return o
} | [
0.0848568007349968,
0.35586339235305786,
0.34953758120536804,
-0.21532803773880005,
-0.9168325662612915,
0.5945841073989868,
-0.16960124671459198,
-0.4768645763397217,
0.9440953731536865,
0.6436522006988525,
-0.08745594322681427,
-0.3723391592502594,
-0.006294442340731621,
0.46503171324729... |
func (o *DeleteCoreV1NamespacedPodOK) SetPayload(payload *models.IoK8sAPICoreV1Pod) {
o.Payload = payload
} | [
0.08342399448156357,
0.4888714551925659,
0.19148485362529755,
-0.31822481751441956,
-0.44799166917800903,
0.7966374158859253,
-0.6157196164131165,
-0.8952680826187134,
0.9221886992454529,
0.5196146368980408,
-0.18819431960582733,
0.18213339149951935,
-0.5851662158966064,
0.9068430662155151... |
func (o *DeleteCoreV1NamespacedPodOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
} | [
-0.5603387355804443,
-0.18554051220417023,
0.329898476600647,
-0.05905699357390404,
0.25143852829933167,
-0.28734055161476135,
0.21792609989643097,
-0.3027914762496948,
0.8060379028320312,
0.8603167533874512,
-0.21578748524188995,
-0.4386095404624939,
-0.8458842039108276,
0.316995173692703... |
func NewDeleteCoreV1NamespacedPodAccepted() *DeleteCoreV1NamespacedPodAccepted {
return &DeleteCoreV1NamespacedPodAccepted{}
} | [
0.31943652033805847,
0.6231139898300171,
0.7671631574630737,
-0.3998562693595886,
-1.7597777843475342,
1.0500538349151611,
-0.39966318011283875,
0.0419808030128479,
0.0262659452855587,
0.04971474036574364,
-0.4792780578136444,
0.5781101584434509,
0.1328992247581482,
0.33246907591819763,
... |
func (o *DeleteCoreV1NamespacedPodAccepted) WithPayload(payload *models.IoK8sAPICoreV1Pod) *DeleteCoreV1NamespacedPodAccepted {
o.Payload = payload
return o
} | [
0.2561505436897278,
0.7865500450134277,
0.44206640124320984,
-0.5548700094223022,
-1.6956961154937744,
0.6536371111869812,
-0.29464271664619446,
-0.2559906840324402,
0.9384823441505432,
0.23354630172252655,
-0.04229919984936714,
0.20432069897651672,
0.2591005265712738,
0.042679041624069214... |
func (o *DeleteCoreV1NamespacedPodAccepted) SetPayload(payload *models.IoK8sAPICoreV1Pod) {
o.Payload = payload
} | [
0.12340901046991348,
1.0972368717193604,
0.3417128026485443,
-0.6458582878112793,
-1.174204707145691,
0.8882489800453186,
-0.4406919777393341,
-0.6224074363708496,
0.912793755531311,
0.3584214150905609,
-0.2596358060836792,
0.7533364295959473,
-0.40495699644088745,
0.317085325717926,
1.6... |
func (o *DeleteCoreV1NamespacedPodAccepted) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(202)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
} | [
-0.550582766532898,
0.6842046976089478,
0.4468165338039398,
-0.046204935759305954,
-0.33592209219932556,
-0.20226792991161346,
0.09691135585308075,
-0.030724024400115013,
0.9260571002960205,
0.5427301526069641,
-0.083358034491539,
0.4455166757106781,
-0.4539119601249695,
0.0154447043314576... |
func NewDeleteCoreV1NamespacedPodUnauthorized() *DeleteCoreV1NamespacedPodUnauthorized {
return &DeleteCoreV1NamespacedPodUnauthorized{}
} | [
-0.7315900921821594,
-0.1429792195558548,
0.9413148164749146,
0.19260600209236145,
-1.0030778646469116,
0.5074711441993713,
-0.5363739728927612,
0.6557314395904541,
0.6078681349754333,
-0.23331229388713837,
-0.13051412999629974,
1.1865087747573853,
-0.04426926374435425,
-0.0232984405010938... |
func (o *DeleteCoreV1NamespacedPodUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(401)
} | [
-0.7823684811592102,
-0.23975692689418793,
0.4638223946094513,
0.23029597103595734,
0.27901947498321533,
-0.2890956997871399,
0.2446976751089096,
-0.03224654123187065,
0.8612394332885742,
0.2613738775253296,
-0.10396545380353928,
0.29359665513038635,
-1.0340300798416138,
-0.197101712226867... |
func NewDriver(root string) *Driver {
return &Driver{
root: root,
}
} | [
0.5283932685852051,
-1.3781623840332031,
0.026739124208688736,
1.1752525568008423,
-1.3205294609069824,
0.07493805140256882,
-0.4178265929222107,
-0.07231658697128296,
0.15333347022533417,
-0.7135016322135925,
0.6654966473579407,
0.7106726765632629,
-0.7100133895874023,
0.7905557751655579,... |
func (*Driver) ID() string {
return DriverID
} | [
0.004954286850988865,
-1.5313143730163574,
0.29059842228889465,
1.1918777227401733,
0.3410995304584503,
1.0216397047042847,
-0.1340400129556656,
0.5285437703132629,
1.6432081460952759,
-0.2333199679851532,
-0.08133842796087265,
-0.5782406330108643,
-0.7796667218208313,
0.9095491170883179,
... |
func (d *Driver) Create(
db, table, id string,
expressions []sql.Expression,
config map[string]string,
) (sql.Index, error) {
_, err := mkdir(d.root, db, table, id)
if err != nil {
return nil, err
}
if config == nil {
config = make(map[string]string)
}
exprs := make([]string, len(expressions))
for i, e ... | [
-0.11134826391935349,
-0.02405373565852642,
0.7254824638366699,
0.08518660813570023,
-0.3575144112110138,
0.44774356484413147,
0.42328107357025146,
0.5988293886184692,
-0.5446961522102356,
-0.15437649190425873,
0.015240074135363102,
-0.6416347026824951,
-0.346477746963501,
-0.0201698038727... |
func (d *Driver) LoadAll(db, table string) ([]sql.Index, error) {
var (
indexes []sql.Index
errors []string
root = filepath.Join(d.root, db, table)
)
dirs, err := ioutil.ReadDir(root)
if err != nil {
if os.IsNotExist(err) {
return indexes, nil
}
return nil, err
}
for _, info := range dirs {
... | [
-0.2218291014432907,
-0.09601808339357376,
0.677584707736969,
1.660308837890625,
-0.1736842542886734,
0.041256457567214966,
-0.19903481006622314,
0.16781988739967346,
0.045019157230854034,
0.3040560185909271,
0.2454962283372879,
0.49778226017951965,
-0.2982102632522583,
1.4348546266555786,... |
func (d *Driver) Save(
ctx *sql.Context,
i sql.Index,
iter sql.PartitionIndexKeyValueIter,
) (err error) {
start := time.Now()
idx, ok := i.(*pilosaIndex)
if !ok {
return errInvalidIndexType.New(i)
}
if err := idx.index.Open(); err != nil {
return err
}
defer idx.index.Close()
idx.wg.Add(1)
defer idx... | [
-0.5311911702156067,
-0.11416389048099518,
0.8145712018013,
-0.005396100226789713,
-0.07899335026741028,
-0.5988296270370483,
0.6233383417129517,
-0.08646939694881439,
-0.5338141918182373,
0.7900137901306152,
-0.03928267955780029,
-0.6347461342811584,
-0.5291051864624023,
0.029943734407424... |
func (d *Driver) Delete(i sql.Index, partitions sql.PartitionIter) error {
idx, ok := i.(*pilosaIndex)
if !ok {
return errInvalidIndexType.New(i)
}
if idx.cancel != nil {
idx.cancel()
idx.wg.Wait()
}
if err := idx.index.Open(); err != nil {
return err
}
defer idx.index.Close()
if err := os.RemoveAll(... | [
-0.14592282474040985,
0.0031055747531354427,
0.7546229958534241,
0.2464115172624588,
-0.46006137132644653,
-0.2612021863460541,
-0.03354185074567795,
-0.016764098778367043,
-0.2985277771949768,
0.5105276703834534,
0.7455998063087463,
-1.4635478258132935,
-0.9349043965339661,
-1.03195416927... |
func mkdir(elem ...string) (string, error) {
path := filepath.Join(elem...)
return path, os.MkdirAll(path, 0750)
} | [
-0.07532904297113419,
-0.44906583428382874,
0.33794814348220825,
0.8871970772743225,
-0.6069626808166504,
1.3541659116744995,
0.35718077421188354,
0.07304497063159943,
-0.20879390835762024,
-0.1432352215051651,
0.40692588686943054,
-0.9037972092628479,
0.5056366324424744,
0.869639098644256... |
func dedupLiveResources(targetObjs []*unstructured.Unstructured, liveObjsByKey map[kubeutil.ResourceKey]*unstructured.Unstructured) {
targetObjByKey := make(map[kubeutil.ResourceKey]*unstructured.Unstructured)
for i := range targetObjs {
targetObjByKey[kubeutil.GetResourceKey(targetObjs[i])] = targetObjs[i]
}
liv... | [
-0.4752044379711151,
-0.8300148248672485,
0.820915699005127,
-0.20234325528144836,
-0.03281653672456741,
0.3682003617286682,
1.231093406677246,
0.37888988852500916,
0.6847406029701233,
0.8810387849807739,
-0.7539799213409424,
-0.959783136844635,
-0.6028862595558167,
0.7910935878753662,
-... |
func (n *Notification) Index() mgo.Index {
return mgo.Index{
Key: []string{"uid", "list"},
Unique: true,
//DropDups: true,
Background: true,
//Sparse: true,
}
} | [
0.15582586824893951,
0.5545631051063538,
0.1758238971233368,
-0.532718300819397,
0.07336631417274475,
0.7577166557312012,
0.910325288772583,
0.9524962306022644,
0.45284682512283325,
0.3244808316230774,
-1.3663644790649414,
0.7235431671142578,
0.45118191838264465,
-0.015689849853515625,
-... |
func (n *Notification) Collection() string {
return COLLECTION
} | [
-0.17755089700222015,
-0.6050606966018677,
0.34735700488090515,
-0.15387775003910065,
0.31325763463974,
1.3351246118545532,
0.10239104926586151,
-0.4975147843360901,
-0.5857262015342712,
0.34748154878616333,
-0.2405412644147873,
0.16768071055412292,
0.5842275023460388,
1.195250391960144,
... |
func NewCreateUserRepository(handler *database.MongoHandler) entity.UserRepositoryCreator {
return createUserRepository{
handler: handler,
collection: "users",
}
} | [
-0.44803863763809204,
-0.14003627002239227,
-0.25933128595352173,
-0.013741063885390759,
-0.0725356787443161,
-0.3865007758140564,
0.5811251997947693,
0.3428504467010498,
0.3749544024467468,
0.17028170824050903,
-0.13116797804832458,
-0.5832934975624084,
0.7143860459327698,
1.1937457323074... |
func (c createUserRepository) Create(ctx context.Context, u entity.User) (entity.User, error) {
var bson = createUserBSON{
ID: u.ID().Value(),
FullName: u.FullName().Value(),
Document: createUserDocumentBSON{
Type: u.Document().Type().String(),
Value: u.Document().Value(),
},
Email: u.Email()... | [
-0.19447001814842224,
0.6936839818954468,
0.521264374256134,
0.6925616264343262,
0.3199318051338196,
0.7969406843185425,
0.08546601980924606,
-0.6261616945266724,
-0.21474424004554749,
-0.0028212827164679766,
-0.24334800243377686,
-0.9262527227401733,
-0.7237088084220886,
0.547239303588867... |
func syncBucket(name string) {
objects, err := s3.ListBucket(name, "")
if err != nil {
log.Printf("Can't list objects in bucket: %v", err)
}
// download each file that we don't have yet locally:
for _, object := range objects {
localfile := filepath.Join(galleryPath, object)
if _, err := os.Stat(localfile); ... | [
0.265227735042572,
-0.16406677663326263,
1.0620757341384888,
-0.5240886807441711,
0.6919576525688171,
0.39453601837158203,
0.6289150714874268,
-0.3964249789714813,
-0.318187415599823,
0.7867968082427979,
-0.8940261602401733,
0.8680179715156555,
0.6826167106628418,
0.6947368383407593,
-0.... |
func (p *Poller) RegisterHandler(fd uintptr, h EventHandler, data interface{}) (*Pollable, error) {
if err := syscall.SetNonblock(int(fd), true); err != nil {
return nil, err
}
return p.register(fd, h, data)
} | [
-0.10471709817647934,
1.1324551105499268,
0.45581772923469543,
0.208303764462471,
0.11000249534845352,
0.42706769704818726,
-0.2019266039133072,
0.5334829092025757,
-0.5350362062454224,
-0.6976567506790161,
-0.2749694287776947,
-0.5713226795196533,
-0.757576048374176,
1.3919341564178467,
... |
func GetInstNameField(objID string) string {
switch objID {
case BKInnerObjIDApp:
return BKAppNameField
case BKInnerObjIDSet:
return BKSetNameField
case BKInnerObjIDModule:
return BKModuleNameField
case BKInnerObjIDObject:
return BKInstNameField
case BKInnerObjIDHost:
return BKHostNameField
case BKInne... | [
-0.07964041084051132,
0.11900565773248672,
0.7298871874809265,
-0.526482105255127,
-0.9175142645835876,
0.5278810262680054,
0.05071067810058594,
-1.1984341144561768,
0.06843575090169907,
1.010433316230774,
-0.5010757446289062,
0.2884345054626465,
-0.7750163674354553,
0.2878321707248688,
... |
func GetInstIDField(objType string) string {
switch objType {
case BKInnerObjIDApp:
return BKAppIDField
case BKInnerObjIDSet:
return BKSetIDField
case BKInnerObjIDModule:
return BKModuleIDField
case BKInnerObjIDObject:
return BKInstIDField
case BKInnerObjIDHost:
return BKHostIDField
case BKInnerObjIDPr... | [
0.11786142736673355,
0.18010295927524567,
0.6618183851242065,
-0.32139530777931213,
-0.2450658679008484,
0.9212096333503723,
0.6176506280899048,
-1.0847785472869873,
0.3320513069629669,
0.5858752727508545,
-0.3379479646682739,
0.5968608260154724,
-1.3647304773330688,
-0.02784063294529915,
... |
func IsInnerMainlineModel(objType string) bool {
switch objType {
case BKInnerObjIDApp, BKInnerObjIDSet, BKInnerObjIDModule:
return true
default:
return false
}
} | [
-0.19357804954051971,
-1.3136975765228271,
0.5663909912109375,
0.14042693376541138,
-0.20889520645141602,
1.1292247772216797,
-0.7060046195983887,
-0.704544186592102,
-0.049281273037195206,
0.048427313566207886,
-0.08825276792049408,
0.07000218331813812,
-1.030963659286499,
0.5357093214988... |
func DBConn() (db *sql.DB) {
dbDriver := "mysql"
dbUser := "root"
dbPass := "vrajupaj"
dbName := "example"
db, err := sql.Open(dbDriver, dbUser+":"+dbPass+"@/"+dbName)
if err != nil {
panic(err.Error())
} else {
log.Println("Connection was opened correctly")
}
return db
} | [
0.1594868004322052,
-0.43011125922203064,
0.4821098744869232,
0.6679812073707581,
-0.6631693840026855,
0.2879215180873871,
-0.5187903642654419,
0.8453550934791565,
0.0705457255244255,
-0.7292602062225342,
-0.022546688094735146,
0.3644010126590729,
-0.34888821840286255,
0.009519312530755997... |
func NewNodeResourceTopologies() (*apiextensionsv1.CustomResourceDefinition, error) {
_, file, _, ok := runtime.Caller(0)
if !ok {
return nil, fmt.Errorf("cannot retrieve manifests directory")
}
baseDir := filepath.Dir(file)
crdPath := filepath.Clean(filepath.Join(baseDir, "..", "..", "..", "deployment", "base"... | [
0.6270588040351868,
-1.1831027269363403,
0.2403922826051712,
-0.7765601873397827,
-1.136425256729126,
-0.4893746078014374,
0.2948557734489441,
-0.08848556876182556,
0.09096870571374893,
-0.050476472824811935,
0.021699344739317894,
-0.053282998502254486,
-0.0789189413189888,
0.6228038072586... |
func CreateNodeResourceTopologies(ctx context.Context, extClient extclient.Interface) (*apiextensionsv1.CustomResourceDefinition, error) {
crd, err := NewNodeResourceTopologies()
if err != nil {
return nil, err
}
// Delete existing CRD (if any) with this we also get rid of stale objects
err = extClient.Apiexten... | [
0.4563620388507843,
-0.2904849350452423,
0.636246919631958,
-0.5874441266059875,
-0.29196152091026306,
-0.23292048275470734,
0.011981088668107986,
-0.7559286952018738,
0.16269557178020477,
0.23137490451335907,
-0.23965121805667877,
-0.23135334253311157,
-0.22155164182186127,
0.300181537866... |
func GetNodeTopology(ctx context.Context, topologyClient *topologyclientset.Clientset, nodeName string) *v1alpha2.NodeResourceTopology {
var nodeTopology *v1alpha2.NodeResourceTopology
var err error
gomega.EventuallyWithOffset(1, func() bool {
nodeTopology, err = topologyClient.TopologyV1alpha2().NodeResourceTopol... | [
-0.5514404773712158,
0.5105544924736023,
0.467072457075119,
-0.6936523914337158,
-0.039129264652729034,
-0.6726077198982239,
0.28952986001968384,
-1.269545555114746,
0.12818455696105957,
-0.2553062438964844,
0.31493380665779114,
0.029170995578169823,
0.13385683298110962,
-0.047719009220600... |
func AllocatableResourceListFromNodeResourceTopology(nodeTopo *v1alpha2.NodeResourceTopology) map[string]corev1.ResourceList {
allocRes := make(map[string]corev1.ResourceList)
for _, zone := range nodeTopo.Zones {
if zone.Type != "Node" {
continue
}
resList := make(corev1.ResourceList)
for _, res := range ... | [
0.20904535055160522,
-0.6993251442909241,
0.20565369725227356,
0.1589190512895584,
-0.5797438025474548,
0.3972488343715668,
0.6520473957061768,
-0.4170246124267578,
0.6652811765670776,
0.7997151017189026,
0.561778724193573,
-0.8572208285331726,
0.7865890860557556,
-0.09121288359165192,
-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.