text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (r Account) MarshalJSON() ([]byte, error) { return json.Marshal(struct { OtherAccount ResourceType string `json:"resourceType"` }{ OtherAccount: OtherAccount(r), ResourceType: "Account", }) }
[ 0.26733946800231934, -0.1529390960931778, 0.20871706306934357, 0.034472521394491196, -0.1668122410774231, -0.5503525137901306, 1.004911184310913, -0.18230806291103363, 1.6887483596801758, 0.1377175748348236, -0.38455989956855774, 0.8193427324295044, -0.06724653393030167, 0.8821356892585754...
func UnmarshalAccount(b []byte) (Account, error) { var account Account if err := json.Unmarshal(b, &account); err != nil { return account, err } return account, nil }
[ 0.2617550492286682, 0.09357697516679764, 0.62208491563797, -0.3717617988586426, -0.9875280857086182, -0.6206403374671936, 0.6500569581985474, 0.6545293927192688, 1.2059513330459595, 0.45546451210975647, -0.24339216947555542, 0.6885681748390198, -0.2652949392795563, -0.4851888120174408, 0...
func getProcesses(limit int) ([]interface{}, error) { processGroups, err := gops.TopRSSProcessGroups(limit) if err != nil { return nil, err } snapData := make([]ProcessField, len(processGroups)) for i, processGroup := range processGroups { processField := ProcessField{ strings.Join(processGroup.Usernames(...
[ -1.1337575912475586, 0.5105636119842529, 0.5820367336273193, -0.6023251414299011, 0.2804206907749176, -0.16925646364688873, -0.405910849571228, -0.7980492115020752, 0.21505911648273468, -0.01117701455950737, 0.1526489406824112, 0.01068873144686222, -0.8070647716522217, 0.13006044924259186,...
func hasWritePerm(path string, fi os.FileInfo) bool { if os.Getuid() == 0 { // The root user can access any file, but we still want to default to // read-only mode if the go.mod file is marked as globally non-writable. // (If the user really intends not to be in readonly mode, they can // pass -mod=mod explici...
[ -0.0017551615601405501, -0.6937999725341797, 0.5917962193489075, 0.6404702663421631, 0.24830588698387146, -0.2262054830789566, 0.608692467212677, 0.9146419763565063, -0.9369670748710632, -0.30927273631095886, 0.5655985474586487, 0.2211156189441681, -0.7329923510551453, 0.4381027817726135, ...
func SetRoutes(r routes.Routes) { rts = r }
[ 0.3002770245075226, 0.5941362977027893, 0.07010655850172043, -0.46716341376304626, -0.10263581573963165, -0.1140524372458458, -0.3362146317958832, -0.0279554296284914, 1.0762923955917358, -0.5478718280792236, -0.46934789419174194, 0.25700676441192627, -0.16888825595378876, 0.97171133756637...
func NewUnboxed(c Type, i *debug.Information) Unboxed { switch c.(type) { case Unboxed: panic("cannot unbox unboxed types") case Function: panic("cannot unbox function types") } return Unboxed{c, i} }
[ -0.057079195976257324, -0.4549514055252075, 0.35974550247192383, -0.2794609069824219, -0.46587011218070984, -0.017260923981666565, 0.05182960629463196, -0.5230356454849243, -0.1545831561088562, -0.747363805770874, -0.4057854413986206, 0.7156648635864258, -0.1296091377735138, -0.06816654652...
func (u Unboxed) Content() Type { return u.content }
[ -0.13343825936317444, -0.1916380673646927, 0.21714608371257782, 0.11968265473842621, -0.48925691843032837, 1.1350218057632446, 0.5813056230545044, -0.7532382607460022, 0.1536317765712738, -0.7556350827217102, -0.16700294613838196, 0.17487744987010956, -0.2346782237291336, -0.54813963174819...
func (u Unboxed) Unify(t Type) ([]Equation, error) { uu, ok := t.(Unboxed) if !ok { return fallbackToVariable(u, t, NewTypeError("not an unboxed", t.DebugInformation())) } return u.content.Unify(uu.content) }
[ -0.913216769695282, 0.15462668240070343, 0.5164850950241089, 0.2120147943496704, 0.4480211138725281, -0.5444042682647705, 0.17659983038902283, -0.331674724817276, -0.07723116874694824, 0.18301254510879517, -0.8285453915596008, -0.12629011273384094, 0.46062222123146057, 0.3351284861564636, ...
func (u Unboxed) SubstituteVariable(v Variable, t Type) Type { return NewUnboxed(u.content.SubstituteVariable(v, t), u.debugInformation) }
[ -0.3586498498916626, -0.06403111666440964, 0.29671141505241394, -1.072751522064209, 0.07245906442403793, -0.05860692262649536, 0.009870490059256554, 0.2983529269695282, -0.13683561980724335, 0.03027024120092392, -1.7851694822311401, 0.08569782972335815, -0.5319910049438477, -0.247217476367...
func (u Unboxed) DebugInformation() *debug.Information { return u.debugInformation }
[ -0.728371262550354, -0.0010832970729097724, 0.2533484101295471, -0.650469958782196, 0.04929434508085251, 0.08426342904567719, 0.38365721702575684, -1.0354907512664795, 0.645526111125946, -1.0491372346878052, -0.5978579521179199, 0.20078428089618683, 0.049962542951107025, 0.4201349318027496...
func (u Unboxed) ToCore() coretypes.Type { return coretypes.Unbox(u.content.ToCore()) }
[ 0.10432305932044983, 0.19045384228229523, 0.49239295721054077, -0.5962749123573303, 0.2290060818195343, -0.08828994631767273, 0.3508182764053345, -0.39284783601760864, 0.6560395956039429, 0.3088301718235016, -0.011218921281397343, -0.4917725622653961, -1.1011698246002197, -0.33651080727577...
func NewTimeBucket(opcode uint64, numOpcodeBits, numValueBits int) TimeBucket { return TimeBucket{ opcode: opcode, numOpcodeBits: numOpcodeBits, numValueBits: numValueBits, min: -(1 << uint(numValueBits-1)), max: (1 << uint(numValueBits-1)) - 1, } }
[ -0.23086948692798615, 0.7165877223014832, 0.6866743564605713, 0.36659786105155945, -0.4195473790168762, -0.05093059316277504, 0.3274334669113159, -1.1788930892944336, -0.277792751789093, 0.48829710483551025, -0.4534566104412079, 0.7320888638496399, -0.42319440841674805, 0.4163398742675781,...
func (tb *TimeBucket) Opcode() uint64 { return tb.opcode }
[ -0.1326368749141693, -0.24687041342258453, 0.5244877934455872, 0.10951971262693405, 0.5160148739814758, 0.15047436952590942, 0.6429072618484497, 0.20650842785835266, -0.512457549571991, 0.4447767436504364, 0.7903609871864319, -0.3620040714740753, 0.1208137571811676, 0.09319112449884415, ...
func (tb *TimeBucket) NumOpcodeBits() int { return tb.numOpcodeBits }
[ -0.6680939793586731, 0.7218031883239746, 0.5148014426231384, -0.05032924935221672, -0.8506134152412415, 0.644012451171875, 0.156526118516922, -0.5411496758460999, -0.16816112399101257, 0.355330228805542, -1.140649676322937, -0.4410247206687927, -0.6256895661354065, 0.9964523315429688, 0....
func (tb *TimeBucket) Min() int64 { return tb.min }
[ -0.2679317891597748, -0.2292039841413498, 0.2720876634120941, 0.40886783599853516, -0.4633029103279114, 0.45901280641555786, -0.4192662239074707, -0.792990505695343, -0.5601683259010315, -0.5913001894950867, -0.1805216521024704, -0.7585442662239075, -0.1115933284163475, 0.6843711137771606,...
func (tb *TimeBucket) Max() int64 { return tb.max }
[ -0.5495167970657349, 0.541695237159729, 0.46025392413139343, 0.6990698575973511, 0.36658158898353577, 0.5089107751846313, -0.5963799357414246, -0.11488594859838486, -0.575298011302948, 0.22879581153392792, -0.43151694536209106, -0.32518503069877625, 0.14424528181552887, 0.8950505256652832,...
func (tb *TimeBucket) NumValueBits() int { return tb.numValueBits }
[ -0.08017326146364212, 0.5283271670341492, 0.24180683493614197, 0.8787671327590942, -0.10815572738647461, 0.8713301420211792, 0.09304635226726532, -0.5630332827568054, -0.029617242515087128, -0.024780675768852234, -0.8120359182357788, 0.1872246116399765, 0.08029530197381973, 1.0718289613723...
func NewTimeEncodingSchemes(schemes map[xtime.Unit]TimeEncodingScheme) TimeEncodingSchemes { encodingSchemes := make(TimeEncodingSchemes, xtime.UnitCount()) for k, v := range schemes { if !k.IsValid() { continue } encodingSchemes[k] = v } return encodingSchemes }
[ -0.5493463277816772, 0.43522700667381287, 0.11832494288682938, 0.43114206194877625, -0.7921956777572632, 0.5048762559890747, -0.36622416973114014, -0.8635060787200928, 0.5699307322502136, 0.8226938843727112, -0.8831251859664917, -0.9840713739395142, -0.3840266764163971, 0.3963525593280792,...
func NewTimeEncodingScheme(numValueBitsForBuckets []int, numValueBitsForDefault int) TimeEncodingScheme { numBuckets := len(numValueBitsForBuckets) buckets := make([]TimeBucket, 0, numBuckets) numOpcodeBits := 1 opcode := uint64(0) i := 0 for i < numBuckets { opcode = uint64(1<<uint(i+1)) | opcode buckets = a...
[ -0.47299230098724365, 0.8302111029624939, 0.6214267611503601, 0.5912734270095825, -0.2612784206867218, -0.6090116500854492, -0.2866683006286621, -0.45892876386642456, -0.007681615650653839, 0.8801048398017883, -1.1356234550476074, -1.0066009759902954, -0.23050636053085327, 0.41867464780807...
func (tes *TimeEncodingScheme) ZeroBucket() *TimeBucket { return &tes.zeroBucket }
[ -0.23258008062839508, 0.6999439597129822, 0.2582862079143524, -0.40829479694366455, -0.1451062709093094, 0.2945312559604645, 0.4439619779586792, -0.33172833919525146, 0.11289280652999878, -0.7224553823471069, 0.414432555437088, 0.09828504920005798, -0.001890227198600769, 0.7180922031402588...
func (tes *TimeEncodingScheme) Buckets() []TimeBucket { return tes.buckets }
[ -0.9368945360183716, 0.17114414274692535, 0.45776018500328064, -0.014293218031525612, -0.2586163282394409, 0.8562991619110107, -0.23480479419231415, -0.8535547256469727, 0.4112006723880768, 0.09527164697647095, -0.46892493963241577, -0.42676323652267456, 0.2838180959224701, 0.4005736112594...
func (tes *TimeEncodingScheme) DefaultBucket() *TimeBucket { return &tes.defaultBucket }
[ 0.19161076843738556, 0.9049813747406006, 0.24742519855499268, 0.49293047189712524, 0.20207133889198303, 0.6155151128768921, 0.10798133164644241, -0.6607719659805298, 0.11803652346134186, -0.5930606126785278, 0.23829707503318787, -0.9651842713356018, -0.1237928494811058, 1.1345220804214478,...
func (s TimeEncodingSchemes) SchemeForUnit(u xtime.Unit) (*TimeEncodingScheme, bool) { if !u.IsValid() || int(u) >= len(s) { return nil, false } return &s[u], true }
[ -1.206788182258606, 0.6181583404541016, 0.33539754152297974, -0.3932533264160156, -0.24824759364128113, 0.12739010155200958, -0.39258232712745667, -0.7152611613273621, 0.1940520852804184, 0.034509431570768356, -0.14040082693099976, -0.18543756008148193, 0.15735799074172974, 0.1584460437297...
func NewMarkerEncodingScheme( opcode uint64, numOpcodeBits int, numValueBits int, endOfStream Marker, annotation Marker, timeUnit Marker, ) *MarkerEncodingScheme { scheme := &MarkerEncodingScheme{ opcode: opcode, numOpcodeBits: numOpcodeBits, numValueBits: numValueBits, endOfStream: endOfStream...
[ -0.69914710521698, -0.16003505885601044, 0.395112007856369, 0.10937090963125229, -0.46005916595458984, -0.8696467280387878, 0.7109604477882385, -0.2456584870815277, 0.26871350407600403, 0.34434768557548523, 0.015194692648947239, 0.5910308957099915, 0.258619487285614, 0.1463950276374817, ...
func WriteSpecialMarker(os OStream, scheme *MarkerEncodingScheme, marker Marker) { os.WriteBits(scheme.Opcode(), scheme.NumOpcodeBits()) os.WriteBits(uint64(marker), scheme.NumValueBits()) }
[ -0.6250948905944824, 0.1357434093952179, 0.34957146644592285, 0.4480074346065521, -0.021753840148448944, -0.5544323325157166, 0.8403289318084717, 0.9425060153007507, 0.7425429224967957, -0.062198538333177567, -1.218624234199524, 1.1599723100662231, 0.49289530515670776, 1.1502851247787476, ...
func (mes *MarkerEncodingScheme) Opcode() uint64 { return mes.opcode }
[ -0.15485522150993347, -0.1935429722070694, 0.4752129018306732, 0.31288856267929077, 0.0769289955496788, -0.29995197057724, 1.1202350854873657, 0.39704638719558716, 0.21352912485599518, 0.3907107412815094, 0.9136776924133301, 0.10239262133836746, -0.04972289502620697, 0.16886252164840698, ...
func (mes *MarkerEncodingScheme) NumOpcodeBits() int { return mes.numOpcodeBits }
[ -0.7319765686988831, 0.7182653546333313, 0.3847750425338745, 0.009565655142068863, -0.8792190551757812, 0.25749436020851135, 0.5054395794868469, -0.18866732716560364, 0.18773391842842102, 0.4168952405452728, -1.2958521842956543, -0.1858571171760559, -0.38164594769477844, 0.9852209687232971...
func (mes *MarkerEncodingScheme) NumValueBits() int { return mes.numValueBits }
[ -0.253490686416626, 0.44082963466644287, 0.22766628861427307, 0.8478955626487732, -0.27889373898506165, 0.551363468170166, 0.18122853338718414, -0.20193952322006226, 0.37031060457229614, -0.10100482404232025, -0.9332674741744995, 0.5345115661621094, 0.12316954880952835, 1.2020728588104248,...
func (mes *MarkerEncodingScheme) EndOfStream() Marker { return mes.endOfStream }
[ 0.12416058778762817, -0.11054132878780365, 0.3718205690383911, -0.4386652410030365, -0.5255424380302429, -0.4005492925643921, 0.4338855743408203, -0.6145120859146118, 0.39827874302864075, -0.4303007125854492, -0.16267389059066772, -0.3700452744960785, -0.507447361946106, 0.9740990400314331...
func (mes *MarkerEncodingScheme) Annotation() Marker { return mes.annotation }
[ -0.23192770779132843, -0.5880992412567139, 0.2871350049972534, 0.41625598073005676, -0.13169023394584656, -0.168086975812912, 0.8038837909698486, 0.4308284819126129, 0.5296610593795776, 0.12559913098812103, -0.5076543092727661, -0.13798096776008606, 0.16092628240585327, 0.42505496740341187...
func (mes *MarkerEncodingScheme) TimeUnit() Marker { return mes.timeUnit }
[ -0.6706333756446838, -0.13946382701396942, 0.34401819109916687, -1.620328426361084, -0.3157407343387604, 0.35143226385116577, 0.22312819957733154, -0.3154730498790741, 0.4769328236579895, 0.10221733152866364, -0.6920759081840515, 0.010467512533068657, -0.8048568367958069, -0.25800088047981...
func (mes *MarkerEncodingScheme) Tail(b byte, pos int) checked.Bytes { return mes.tails[int(b)][pos-1] }
[ -0.3366706669330597, -0.4589167535305023, 0.3837164342403412, -0.1358935385942459, -0.1775103509426117, 0.09429460763931274, -0.3789025843143463, -0.8393273949623108, -0.3806205689907074, 0.24230150878429413, -0.6989326477050781, 0.8633109331130981, -0.8008955121040344, -0.4205074310302734...
func MessageFromBytes(b []byte) (*Message, error) { buffer := new(Message) // Init message buffer if err := json.Unmarshal(b, buffer); err != nil { // Check for errors return &Message{}, err // Return found error } return buffer, nil // Return decoded message }
[ -0.04342566058039665, -0.7265475988388062, 0.5811415910720825, -0.6046192646026611, -0.5729189515113831, 0.07840004563331604, -0.689219057559967, -0.8195343017578125, 0.5515079498291016, -0.23391517996788025, -0.0538221150636673, -0.3484470248222351, -0.37670063972473145, 0.058380652219057...
func (message *Message) Bytes() ([]byte, error) { return json.Marshal(*message) // Return encoded }
[ -0.4477827847003937, 0.016197629272937775, 0.5042065382003784, -0.49050813913345337, -0.0178094319999218, -0.13537436723709106, -1.1663932800292969, -0.9219123125076294, 0.5122708082199097, -0.727496862411499, -0.36794641613960266, 1.7710318565368652, -0.8365106582641602, 1.01386559009552,...
func (client *Client) GetServiceOfferings(query ...Query) ([]ServiceOffering, Warnings, error) { var resources []ServiceOffering query = append(query, Query{Key: FieldsServiceBroker, Values: []string{"name", "guid"}}) included, warnings, err := client.MakeListRequest(RequestParams{ RequestName: internal.GetServ...
[ -0.5175476670265198, 0.6835823059082031, 0.5283324718475342, 0.7658464312553406, -0.7042698860168457, -0.27214720845222473, -0.26634708046913147, -0.2297874242067337, -0.6135621070861816, 0.6548271775245667, 0.17598330974578857, 0.49293413758277893, -1.6684545278549194, 0.6257949471473694,...
func (e *ExecutionJobController) getActiveJobsForExecution(namespace string, selector labels.Selector) ([]*batch.Job, error) { // List all pods to include those that don't match the selector anymore // but have a ControllerRef pointing to this controller. jobs, err := e.jobLister.Jobs(namespace).List(selector) if e...
[ -0.4307532012462616, -0.8177387714385986, 0.47458797693252563, 0.252207487821579, 0.636348307132721, -0.7084426283836365, -0.05192605406045914, -0.977771520614624, -0.15745702385902405, -0.12377741187810898, 0.13037718832492828, 0.1065535619854927, -0.3885350525379181, 0.36887654662132263,...
func LookupIdent(ident string) Type { if tok, ok := keywords[ident]; ok { return tok } return Ident }
[ -0.2952728569507599, -0.6252802610397339, 0.4484923183917999, -0.7690556645393372, -0.7745071649551392, 0.048113979399204254, -0.41688331961631775, -0.5740645527839661, 1.0563474893569946, 0.3335452079772949, -0.42837998270988464, 0.0522986575961113, -0.6960594654083252, -0.367144197225570...
func NewServerAuthInterceptor(jwtManager *JWTManager, methods map[string][]string) *ServerAuthInterceptor { return &ServerAuthInterceptor{jwtManager, methods} }
[ -0.7813141942024231, -0.658602774143219, 0.4269551932811737, -0.25262942910194397, -2.3598380088806152, 0.012389717623591423, -0.7235694527626038, 0.6786075234413147, 0.6485500931739807, 0.5741378664970398, -0.7576573491096497, 0.6072096824645996, -0.7763559818267822, 0.45135626196861267, ...
func (interceptor *ServerAuthInterceptor) Unary() grpc.UnaryServerInterceptor { return func( ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler, ) (resp interface{}, err error) { log.Printf("---> unary interceptor: ", info.FullMethod) // call the authorized method...
[ -0.13882789015769958, 0.2084427922964096, 0.727579653263092, -0.2428686022758484, -0.3412298262119293, -0.49048852920532227, -0.29013490676879883, 0.11134534329175949, 0.6667267084121704, -0.6444554328918457, 0.4226490557193756, 0.900993824005127, -0.24441683292388916, -0.4384346604347229,...
func (interceptor *ServerAuthInterceptor) authorize(ctx context.Context, method string) error { // if the method has no "route" associated, it means that there is no role for it // so, just return to the caller methods, ok := interceptor.methods[method] if !ok { return nil } md, ok := metadata.FromIncomingCon...
[ -0.34305819869041443, 0.2007935494184494, 0.9596557021141052, -0.07046468555927277, 0.0031278107780963182, -1.0269272327423096, -0.2151910662651062, -0.3955705761909485, 0.03692743927240372, 0.8198407888412476, 0.8624099493026733, 0.9497078657150269, -0.7254253625869751, 0.4372667372226715...
func Open(rw eio.ReaderWriterAt) (q Qcow2, err error) { var qi *qcow2 err = eio.BacktraceWrap(func() { qi = &qcow2{} qi.header = &headerImpl{} qi.header.open(rw) }) return qi, err }
[ -0.348385214805603, -0.8320131897926331, 0.4401668608188629, -0.650061309337616, -0.9617835879325867, -0.0012448211200535297, 0.5284968018531799, -0.4468013346195221, 0.05732111632823944, -0.3448244333267212, 0.19016122817993164, -0.10855325311422348, -0.18128950893878937, 0.23112602531909...
func IsLeapYear(year int) bool { return isEvenlyDivisible(year, 4) && !(isEvenlyDivisible(year, 100) && !isEvenlyDivisible(year, 400)) }
[ -0.9752272367477417, 0.011040898971259594, 0.6882783770561218, -0.7820658087730408, -1.514586329460144, 1.3113065958023071, -0.6520692110061646, -0.4295389652252197, 1.6663734912872314, 0.5709095597267151, -0.36968961358070374, -0.530123770236969, -0.06311148405075073, 0.9373780488967896, ...
func isEvenlyDivisible(number int, divisor int) bool { return number%divisor == 0 }
[ -0.530375063419342, 0.6406461596488953, 0.6980968117713928, -0.014374655671417713, -0.3724474608898163, 0.2737169563770294, 0.1380692720413208, 0.548685610294342, 0.25163954496383667, 0.22179441154003143, -0.2079862654209137, -0.2958580255508423, -0.13981807231903076, 0.9952117800712585, ...
func main() { fmt.Printf(" Main message: %s\n", MainSay()) fmt.Printf("Subpkg message: %s\n", subpkg.ThingToSay) }
[ 0.5653448700904846, 0.1594298928976059, 0.66876620054245, 0.48183149099349976, 0.4143114387989044, 0.6325697898864746, -0.20846419036388397, 0.06466864794492722, -0.8861712217330933, -0.40903550386428833, 0.17833437025547028, 0.5548611879348755, -0.16727325320243835, 0.774044930934906, -...
func (ss *securityOperator) GetAllSecuritiesInfos() ([]*Security, error) { secs, err := ss.securityRepo.GetAllSecurities() if err != nil { err = errors.Annotatef(err, "sql exec") return nil, err } if len(secs) == 0 { err = errors.NotFoundf("securities") return nil, err } secSymbs, err := GetSymbolOperat...
[ 0.10420341789722443, -0.6604312658309937, 0.24909423291683197, -0.03220900520682335, 0.10090453177690506, 0.16642695665359497, -0.24679994583129883, -0.9370018243789673, 0.16230374574661255, -0.2418750524520874, -0.6378849744796753, 0.2825409471988678, -0.07868976145982742, 1.1271001100540...
func (so *securityOperator) InsertSecurityInfo(info *Security) error { return so.securityRepo.InsertSecurity(info) }
[ 0.052094317972660065, 0.7020837068557739, 0.37879350781440735, 0.9136729836463928, 0.10724599659442902, 0.6766039133071899, 0.8591866493225098, -0.002551586367189884, -0.42446812987327576, 0.02602623589336872, -1.7646763324737549, -1.725956678390503, -0.732539713382721, 0.08802761882543564...
func Start(pbfFileName string, xSize, ySize int, createCoastlineGeoJSON, lessMemory, noBoundingTree, basicGrid, basicPointInPolygon bool) map[string]string { if basicGrid && (xSize < 360 || ySize < 360) { log.Fatal("\n\nBasic grid not possibly for xSize or ySize under 360.") } if noBoundingTree { fmt.Printf("\n...
[ -0.08292800933122635, -0.7677295804023743, 0.9523235559463501, 0.19922581315040588, 0.1915491223335266, 0.19380652904510498, 0.14698080718517303, -0.15015244483947754, -0.9390986561775208, 0.061536408960819244, -0.40548330545425415, 0.4865283668041229, 0.0830613225698471, 0.572853624820709...
func (sw *StopWatch) Mark() time.Duration { d := time.Since(sw.mark) sw.mark = time.Now() return d }
[ -0.027031416073441505, 1.3410691022872925, 0.33427438139915466, -0.4144272804260254, 0.3600444793701172, -0.1287042796611786, 0.8088608980178833, 0.20782047510147095, -0.24957892298698425, -0.27693837881088257, -0.43023762106895447, 0.7129359245300293, 0.36226943135261536, 0.52200365066528...
func (sw *StopWatch) FromLastMark() time.Duration{ return time.Since(sw.mark) }
[ 0.8184360265731812, 0.5232328176498413, 0.3231409788131714, -0.2412997931241989, -0.4704991281032562, -0.6920993328094482, 0.2391064167022705, 0.3611094653606415, -0.05699138715863228, -0.12736856937408447, 0.09219615161418915, -0.24871522188186646, 0.3253032863140106, 0.8792489767074585, ...
func ApiInfo() http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { // log.Printf("%s %s %s\n", r.RemoteAddr, r.Method, r.URL) if _, err := fmt.Fprintf(w, "Hello from Kudos API!"); err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } }) }
[ 0.060323525220155716, -0.9265604615211487, 0.7631339430809021, -0.6215161681175232, -0.8375639319419861, 0.3338433802127838, -0.11374429613351822, 0.0726642906665802, -0.8114888072013855, 0.21434496343135834, 0.4863240718841553, -0.012864694930613041, -0.017494842410087585, -0.451829552650...
func (c *config) loadCertificate() { if c.CertFile != "" && c.KeyFile != "" { cert, err := tls.LoadX509KeyPair(c.CertFile, c.KeyFile) if err != nil { log.Println("Error loading TLS certificate:", err) return } c.TLSCert = cert parsed, err := x509.ParseCertificate(cert.Certificate[0]) if err != nil { ...
[ 0.7453016042709351, 0.1096704974770546, 0.6102809309959412, 0.268418550491333, -0.1720169633626938, -0.2715681791305542, -0.16709046065807343, 1.0348788499832153, -0.969266951084137, 0.1579357534646988, -0.2506113648414612, -0.35295212268829346, -0.7646290063858032, 0.26532694697380066, ...
func connectDirect(conn net.Conn, serverAddr string, extraData []byte, dialer *net.Dialer) (uploaded, downloaded int64) { activeConnections.Add(1) defer activeConnections.Done() serverConn, err := dialer.Dial("tcp", serverAddr) if err != nil { log.Printf("error with pass-through of SSL connection to %s: %s", ser...
[ -0.024610307067632675, -0.8572730422019958, 0.9127801656723022, -0.4449293315410614, -0.9035073518753052, 0.05141079053282738, 0.24510763585567474, -0.23363560438156128, 0.055677980184555054, -0.6036903858184814, -0.34967803955078125, 0.6886609792709351, 0.111907958984375, 0.70420169830322...
func SSLBump(conn net.Conn, serverAddr, user, authUser string, r *http.Request) { defer func() { if err := recover(); err != nil { buf := make([]byte, 4096) buf = buf[:runtime.Stack(buf, false)] log.Printf("SSLBump: panic serving connection to %s: %v\n%s", serverAddr, err, buf) conn.Close() } }() se...
[ -0.16875338554382324, -0.5960346460342407, 1.1114537715911865, -0.3979054391384125, -0.7454801201820374, 0.33206310868263245, 0.13629290461540222, -0.12455325573682785, -0.04107962176203728, 0.44713303446769714, -0.1679520308971405, 0.43817338347435, 0.25734829902648926, -0.208803609013557...
func imitateCertificate(serverCert *x509.Certificate, selfSigned bool, sni string) (cert tls.Certificate, err error) { conf := getConfig() // Use a hash of the real certificate (plus some other things) as the serial number. h := md5.New() h.Write(serverCert.Raw) for _, c := range conf.TLSCert.Certificate { h.Wri...
[ 0.6159722805023193, 0.6041374802589417, 0.5901221632957458, 0.16007187962532043, -0.864199697971344, -0.46958521008491516, 0.06883879750967026, -0.05812162905931473, 0.703726589679718, 0.05438784137368202, -0.9237353205680847, 0.031300053000450134, -0.5613267421722412, -0.38282155990600586...
func fakeCertificate(sni string) (cert tls.Certificate, err error) { conf := getConfig() serial, err := rand.Int(rand.Reader, big.NewInt(1<<62)) if err != nil { return tls.Certificate{}, err } y, m, d := time.Now().Date() template := &x509.Certificate{ SerialNumber: serial, Subject: pkix.N...
[ 0.2943543493747711, 0.18517261743545532, 0.6087653636932373, -0.2349441647529602, -0.6854568719863892, -0.3452685475349426, -0.3143939673900604, -0.48602983355522156, 0.6104050278663635, 0.3531210124492645, -0.9940918684005737, -0.35467827320098877, -0.6749197244644165, -0.2790296077728271...
func parseClientHello(data []byte) (*tls.ClientHelloInfo, error) { // The implementation of this function is based on crypto/tls.clientHelloMsg.unmarshal var info tls.ClientHelloInfo s := cryptobyte.String(data) // Skip message type, length, version, and random. if !s.Skip(43) { return nil, errors.New("too shor...
[ 0.7236345410346985, -0.5137666463851929, 0.7822915315628052, -0.7070757150650024, -0.9920423030853271, 0.12130171060562134, 0.40598613023757935, -1.0870730876922607, -0.053780488669872284, 0.44878455996513367, -1.2613143920898438, -0.006371881812810898, -0.578688383102417, 0.02642179094254...
func ValidColumn(column string) bool { for i := range Columns { if column == Columns[i] { return true } } return false }
[ -0.0011544028529897332, -0.9698054194450378, 0.47790923714637756, 0.3947250545024872, 0.07442084699869156, 0.6267186403274536, -0.015806810930371284, 0.38189634680747986, -0.21145063638687134, -0.15180832147598267, -0.8481018543243408, 0.23681211471557617, -0.21461717784404755, -0.42537471...
func (c *Command) GetCobraCmd() *cobra.Command { c.Register() return c.cobraCmd }
[ 0.8679356575012207, -0.06495601683855057, 0.4977801740169525, 0.541675329208374, 0.8026201725006104, 0.7603950500488281, 0.28646793961524963, 0.07419098168611526, 0.0009870260255411267, -1.0993179082870483, -0.3759916126728058, 0.9485951662063599, -0.9259774684906006, 0.7581042647361755, ...
func (c *Command) FlagByName(name string, persistOnly bool) *Flag { for _, flag := range c.Flags { if flag.Name == name && (!persistOnly || flag.Persist) { return flag } } for _, parent := range c.parentCmds { if flag := parent.FlagByName(name, true); flag != nil { return flag } } return nil }
[ 0.7021978497505188, 0.48269176483154297, 0.7645561099052429, 0.06461837142705917, -0.6942107081413269, 0.004629557486623526, 0.7229753732681274, -0.28085625171661377, -0.7840849757194519, -0.13590234518051147, -0.5124696493148804, 0.15304125845432281, -1.0260717868804932, 1.106435894966125...
func (c *Command) runner(cmd *cobra.Command, args []string) { outputFlag := cmd.Flag("output") if outputFlag != nil && outputFlag.Changed { analytics.CustomDimensions.SetOutput(outputFlag.Value.String()) } analytics.Event(analytics.CatRunCmd, c.Name) // Run OnUse functions for flags if !c.DisableFlagParsing { ...
[ 0.153198704123497, -0.3485584557056427, 0.5467432737350464, 0.19708621501922607, -0.23656590282917023, 0.05611726641654968, 1.042324185371399, 0.33022987842559814, -1.0941920280456543, -0.12483184784650803, -0.38685187697410583, 0.16867293417453766, 0.06714034080505371, 1.1096919775009155,...
func (c *Command) argInputValidator(cmd *cobra.Command, args []string) error { // Validate whether we have all arguments that need to be defined if len(args) < len(c.Arguments) { errMsg := "" for i := len(args); i < len(c.Arguments); i++ { arg := c.Arguments[i] if !arg.Required { break } errMsg ...
[ -0.6363106966018677, -0.44194090366363525, 0.7123131155967712, -0.4148050844669342, -0.006529859267175198, 0.22821290791034698, 0.264671266078949, 0.5896137952804565, -1.2046468257904053, 0.05844738334417343, 0.338077574968338, 0.19280938804149628, -1.0557914972305298, 1.0091902017593384, ...
func (c *Command) Unregister() { c.cobraCmd = nil }
[ 0.43387371301651, 0.4705967307090759, 0.048135627061128616, -0.2829369008541107, 1.20215904712677, -0.9325067400932312, 1.19110107421875, 1.4880446195602417, -0.7948161363601685, -1.6266909837722778, -0.7320645451545715, 0.3838883340358734, -0.6023635864257812, 1.5836642980575562, 1.7526...
func (c *Command) Register() { if c.cobraCmd != nil { return } if c.Exiter == nil { if !condition.InTest() { c.Exiter = os.Exit } else { c.Exiter = func(code int) { panic(fmt.Sprintf("Test exited with code %d, you probably want to use testhelpers/exiter.", code)) } } } c.cobraCmd = &cobra.Co...
[ -0.016392050310969353, -0.012054183520376682, 0.7013031840324402, 0.0989052876830101, 1.1084249019622803, -0.584078848361969, 0.7274268269538879, 0.7036392092704773, -0.4485616385936737, -0.4411539137363434, -0.4602085053920746, 0.06595781445503235, -0.27282407879829407, 1.389467716217041,...
func (c *Command) AddFlag(flag *Flag) error { cc := c.GetCobraCmd() flagSetter := cc.Flags if flag.Persist { flagSetter = cc.PersistentFlags } switch flag.Type { case TypeString: flagSetter().StringVarP(flag.StringVar, flag.Name, flag.Shorthand, flag.StringValue, T(flag.Description)) case TypeInt: flagSet...
[ -0.007770484779030085, 0.16215632855892181, 0.6020109057426453, 0.4547138512134552, 1.0015465021133423, 0.7996268272399902, -0.11434298753738403, -0.23025448620319366, -0.7688872218132019, -1.0113611221313477, 0.20910529792308807, 0.6975299119949341, -1.0205564498901367, 1.3785042762756348...
func (c *Command) validateAddArgument(arg *Argument, idx int) error { if idx == -1 { idx = len(c.Arguments) - 1 } if idx > 0 && arg.Required && !c.Arguments[idx-1].Required { return failures.FailInput.New( fmt.Sprintf("Cannot have a non-required argument followed by a required argument.\n\n%v\n\n%v", arg,...
[ -0.8247962594032288, 0.19603143632411957, 0.4439811110496521, -0.9819870591163635, 0.04865337535738945, 0.9888327717781067, -0.29640254378318787, -0.7978118062019348, 0.0936870127916336, 0.16072916984558105, 0.4210103154182434, 1.2061524391174316, -0.7532843351364136, 1.4874521493911743, ...
func (c *Command) AddArgument(arg *Argument) error { err := c.validateAddArgument(arg, -1) if err != nil { return err } c.Arguments = append(c.Arguments, arg) return nil }
[ -0.7645325660705566, 0.2997688949108124, 0.27959901094436646, -0.3665686547756195, 0.22540289163589478, 1.2041743993759155, 0.08679276704788208, 1.028611183166504, 0.3413350284099579, -0.21555577218532562, 0.3644151985645294, 0.8265485167503357, -0.7535176277160645, 1.4872548580169678, 0...
func (c *Command) Append(subCmd *Command) { c.Register() subCmd.Register() subCmd.parentCmds = append(subCmd.parentCmds, c) c.cobraCmd.AddCommand(subCmd.cobraCmd) }
[ 0.7453271150588989, 0.4726307988166809, 0.4734172821044922, 0.061906442046165466, -0.011461474932730198, 0.5842007398605347, -0.1215236634016037, 0.5232647657394409, 0.2726474106311798, -1.5098861455917358, -0.8053568601608276, 0.9942997694015503, -0.14245709776878357, 1.856131911277771, ...
func NewNotificationDataPlaneClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client NotificationDataPlaneClient, err error) { baseClient, err := common.NewClientWithConfig(configProvider) if err != nil { return } client = NotificationDataPlaneClient{BaseClient: baseClient} client.B...
[ -0.050515271723270416, 0.29516905546188354, 0.02616836130619049, 0.5977112650871277, -0.5396233201026917, 1.062997817993164, 0.9333440065383911, -0.588983416557312, -0.5038490295410156, 0.5107151865959167, -0.734874963760376, 0.04931527376174927, -0.24843084812164307, 0.9346681833267212, ...
func (client *NotificationDataPlaneClient) SetRegion(region string) { client.Host = common.StringToRegion(region).Endpoint("notification") }
[ 0.3618188500404358, 0.5263626575469971, 0.05992430821061134, -0.24117478728294373, -0.18710242211818695, 0.8956440091133118, 0.24610857665538788, 0.2718767523765564, -0.8744122982025146, 0.27353763580322266, -0.2842651307582855, 1.3701434135437012, -0.4360203444957733, 0.550106406211853, ...
func (client *NotificationDataPlaneClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { return err } // Error has been checked already region, _ := configProvider.Region() client.SetRegion(region) client.c...
[ -0.24103815853595734, 0.37779903411865234, 0.1153063029050827, 0.30461835861206055, -0.5849581956863403, 0.4897969663143158, 1.0116636753082275, -0.058062028139829636, -0.15371130406856537, 0.8748018145561218, -0.4112122356891632, -0.13890406489372253, -0.467843621969223, 1.112238883972168...
func (client *NotificationDataPlaneClient) ConfigurationProvider() *common.ConfigurationProvider { return client.config }
[ 0.7187706828117371, 0.850357174873352, 0.06071337312459946, 0.023383866995573044, -0.5011177659034729, 0.9187164902687073, 0.7201350927352905, -0.5696303844451904, -0.18513169884681702, 0.4951271414756775, -0.03262738138437271, -0.9677169322967529, -0.6360737085342407, 0.8867243528366089, ...
func (client NotificationDataPlaneClient) CreateSubscription(ctx context.Context, request CreateSubscriptionRequest) (response CreateSubscriptionResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } if !(req...
[ 0.10117650777101517, -0.02485748566687107, 0.75474613904953, 0.014621129259467125, 0.23705987632274628, -0.1280238777399063, 0.18184657394886017, -1.0106321573257446, 0.6639319658279419, 0.3605346381664276, -0.1534930020570755, 0.2792049050331116, -0.9444661736488342, 0.24719834327697754, ...
func (client NotificationDataPlaneClient) createSubscription(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { httpRequest, err := request.HTTPRequest(http.MethodPost, "/subscriptions") if err != nil { return nil, err } var response CreateSubscriptionResponse var httpResponse *http.R...
[ 0.06515691429376602, 0.2845456302165985, 0.7601478695869446, -0.15021562576293945, 0.6585590839385986, -0.3077980875968933, 0.13400490581989288, -1.1348227262496948, 0.3121192455291748, 0.45342618227005005, -0.08570960909128189, -0.2957617938518524, -0.9807236790657043, 0.3646244406700134,...
func (client NotificationDataPlaneClient) DeleteSubscription(ctx context.Context, request DeleteSubscriptionRequest) (response DeleteSubscriptionResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } ociRespon...
[ 0.017646854743361473, 0.26192787289619446, 0.9690836071968079, 0.09413646906614304, -0.1823461651802063, -0.36923596262931824, 0.572700560092926, -0.6632176041603088, 1.0767865180969238, 0.048138730227947235, 0.1798202395439148, 0.42247799038887024, -0.5559020638465881, 0.18183250725269318...
func (client NotificationDataPlaneClient) deleteSubscription(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { httpRequest, err := request.HTTPRequest(http.MethodDelete, "/subscriptions/{subscriptionId}") if err != nil { return nil, err } var response DeleteSubscriptionResponse var h...
[ 0.09519907087087631, 0.18545156717300415, 0.9384861588478088, -0.1693570464849472, 0.07538524270057678, -0.8062627911567688, 0.3694007098674774, -0.9408469796180725, 0.9103495478630066, 0.15628652274608612, 0.28249529004096985, 0.15072324872016907, -0.6057273745536804, 0.4096010625362396, ...
func (client NotificationDataPlaneClient) GetConfirmSubscription(ctx context.Context, request GetConfirmSubscriptionRequest) (response GetConfirmSubscriptionResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if request.RetryPolicy() != nil { policy = *request.RetryPolicy() ...
[ 0.19992370903491974, 0.3353002667427063, 0.9403169751167297, 0.31871169805526733, -0.06843898445367813, -0.2782886028289795, 0.2033398300409317, -0.9830580353736877, 0.23273847997188568, 0.2228674292564392, -0.18781718611717224, 1.1914410591125488, -0.8112424612045288, 0.18651241064071655,...
func (client NotificationDataPlaneClient) getConfirmSubscription(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { httpRequest, err := request.HTTPRequest(http.MethodGet, "/subscriptions/{id}/confirmation") if err != nil { return nil, err } var response GetConfirmSubscriptionResponse ...
[ 0.11965910345315933, 0.5564095377922058, 1.0565881729125977, 0.17370688915252686, 0.20504499971866608, -0.5547869205474854, -0.19906963407993317, -1.4000139236450195, 0.08013016730546951, 0.36322489380836487, -0.15275996923446655, 0.9420198202133179, -0.6141378283500671, 0.506996750831604,...
func (client NotificationDataPlaneClient) GetSubscription(ctx context.Context, request GetSubscriptionRequest) (response GetSubscriptionResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } ociResponse, err =...
[ 0.13706476986408234, 0.3370225429534912, 0.891021728515625, 0.27207303047180176, 0.3348967134952545, -1.0012205839157104, 0.35509252548217773, -1.066541075706482, 0.8627514243125916, 0.19371530413627625, 0.1961117535829544, 0.9180166125297546, -0.9350302815437317, -0.20900768041610718, 0...
func (client NotificationDataPlaneClient) getSubscription(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { httpRequest, err := request.HTTPRequest(http.MethodGet, "/subscriptions/{subscriptionId}") if err != nil { return nil, err } var response GetSubscriptionResponse var httpRespon...
[ 0.19372975826263428, 0.2640901803970337, 0.9872961044311523, 0.07695309817790985, 0.5164332985877991, -1.050260066986084, 0.17764905095100403, -1.3331800699234009, 0.7579552531242371, 0.32773900032043457, 0.28394442796707153, 0.6847572326660156, -0.8941725492477417, 0.11160525679588318, ...
func (client NotificationDataPlaneClient) GetUnsubscription(ctx context.Context, request GetUnsubscriptionRequest) (response GetUnsubscriptionResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } ociResponse,...
[ -0.6839758157730103, 0.48575910925865173, 0.8953760862350464, -0.3049836754798889, -0.46518179774284363, -0.4551568925380707, 0.2862034738063812, -0.36326003074645996, 0.4746263325214386, 0.16117388010025024, 0.06853940337896347, 1.1773439645767212, -0.8550867438316345, -0.2135525494813919...
func (client NotificationDataPlaneClient) getUnsubscription(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { httpRequest, err := request.HTTPRequest(http.MethodGet, "/subscriptions/{id}/unsubscription") if err != nil { return nil, err } var response GetUnsubscriptionResponse var htt...
[ -0.560413658618927, 0.43702468276023865, 1.0655409097671509, -0.39181673526763916, -0.15758194029331207, -0.7407996654510498, 0.1483420729637146, -0.8210003972053528, 0.36812248826026917, 0.09950669854879379, 0.1852763146162033, 0.9008581042289734, -0.8216571807861328, 0.022105688229203224...
func (client NotificationDataPlaneClient) ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) (response ListSubscriptionsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } ociResponse,...
[ -0.15082645416259766, 0.18084140121936798, 0.9333106875419617, -0.04325280338525772, 0.23884077370166779, -0.7318626642227173, 0.014699106104671955, -0.8997820019721985, 1.119525671005249, 0.26437655091285706, 0.021889325231313705, 0.4741905927658081, -0.4778768718242645, 0.446856766939163...
func (client NotificationDataPlaneClient) listSubscriptions(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { httpRequest, err := request.HTTPRequest(http.MethodGet, "/subscriptions") if err != nil { return nil, err } var response ListSubscriptionsResponse var httpResponse *http.Resp...
[ 0.17574259638786316, 0.1371055394411087, 0.9398862719535828, -0.3013811707496643, 0.5229330062866211, -0.9364469051361084, -0.0826169103384018, -1.1005468368530273, 0.7112778425216675, 0.3372451066970825, 0.30084657669067383, 0.3098134398460388, -0.6327289342880249, 0.5624679327011108, -...
func (client NotificationDataPlaneClient) PublishMessage(ctx context.Context, request PublishMessageRequest) (response PublishMessageResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } ociResponse, err = co...
[ -0.649150550365448, 0.24761541187763214, 0.7997915148735046, -0.04432958737015724, 0.4352984130382538, -0.30830755829811096, 0.010364600457251072, -0.5386819839477539, 0.3900674879550934, 0.3792451024055481, 0.6349725723266602, 0.26428595185279846, -1.2403746843338013, 0.8918432593345642, ...
func (client NotificationDataPlaneClient) publishMessage(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { httpRequest, err := request.HTTPRequest(http.MethodPost, "/topics/{topicId}/messages") if err != nil { return nil, err } var response PublishMessageResponse var httpResponse *ht...
[ -0.503720760345459, 0.3442119359970093, 0.596656858921051, -0.44950565695762634, 0.95355224609375, -0.419100821018219, -0.03782050311565399, -0.7123008370399475, -0.043689560145139694, 0.4227564334869385, 0.8403963446617126, -0.14322803914546967, -1.3934389352798462, 1.0512837171554565, ...
func (client NotificationDataPlaneClient) ResendSubscriptionConfirmation(ctx context.Context, request ResendSubscriptionConfirmationRequest) (response ResendSubscriptionConfirmationResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if request.RetryPolicy() != nil { policy = ...
[ 0.4257344603538513, 0.1563696563243866, 0.7547839879989624, 0.4594617187976837, -0.5832265019416809, -0.4360320568084717, 0.1650920957326889, -0.4589966833591461, 0.3795459568500519, 0.4250992238521576, -0.8163328766822815, 0.8032447695732117, -0.31365352869033813, 0.19614779949188232, 0...
func (client NotificationDataPlaneClient) resendSubscriptionConfirmation(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { httpRequest, err := request.HTTPRequest(http.MethodPost, "/subscriptions/{id}/resendConfirmation") if err != nil { return nil, err } var response ResendSubscripti...
[ 0.3129657208919525, 0.3408264219760895, 0.8105434775352478, 0.3397783637046814, -0.4382830858230591, -0.6561078429222107, -0.1319054663181305, -0.715721070766449, 0.13933758437633514, 0.49000564217567444, -0.838581919670105, 0.7646288275718689, -0.38610249757766724, 0.3918408453464508, 0...
func (client NotificationDataPlaneClient) UpdateSubscription(ctx context.Context, request UpdateSubscriptionRequest) (response UpdateSubscriptionResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } ociRespon...
[ -0.5647297501564026, -0.48827803134918213, 0.8993131518363953, 0.10129600018262863, -0.521169126033783, -0.4397519528865814, 0.1387273669242859, -0.6122168898582458, 0.810798704624176, 0.6751188039779663, -0.03405236080288887, 0.7154165506362915, -0.9290005564689636, -0.0451091043651104, ...
func (client NotificationDataPlaneClient) updateSubscription(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) { httpRequest, err := request.HTTPRequest(http.MethodPut, "/subscriptions/{subscriptionId}") if err != nil { return nil, err } var response UpdateSubscriptionResponse var http...
[ -0.5691940188407898, -0.5155777335166931, 0.8682639002799988, -0.19046799838542938, -0.19630873203277588, -0.6925249099731445, 0.054322343319654465, -0.8343762755393982, 0.7296762466430664, 0.8274801969528198, 0.0015440161805599928, 0.37595948576927185, -0.8721284866333008, 0.1567542552947...
func (r *Resource) ensureNodesCordoned(ctx context.Context, nodes []corev1.Node) (int, error) { cc, err := controllercontext.FromContext(ctx) if err != nil { return 0, microerror.Mask(err) } var count int for _, n := range nodes { // Node already cordoned? if n.Spec.Unschedulable { count++ continue ...
[ -0.6401507258415222, 0.48013031482696533, 0.7558447122573853, -0.9317674040794373, 0.7301422953605652, -0.4036642611026764, 0.3582375645637512, 0.023154366761446, 0.05607987195253372, 1.124455213546753, 0.16021910309791565, 0.39056527614593506, -0.597540557384491, 0.6152936816215515, -0....
func (l loader) fnt(directory, filename string) (glyphs *Glyphs, err error) { // the header is the first line in the file. hfmt := "common lineHeight=%d base=%d scaleW=%d scaleH=%d pages=%d packed=%d alphaChnl=%d redChnl=%d greenChnl=%d blueChnl=%d" var lh, b, sw, sh, pgs, pkd, ac, rc, gc, bc int var file io.ReadC...
[ 0.24465647339820862, -0.3897782564163208, 0.6340658068656921, -1.7427409887313843, -0.10331030189990997, -0.8551218509674072, 0.09121888875961304, -0.7351105809211731, -0.5668295621871948, -0.3588174283504486, -0.7061309814453125, 0.31669455766677856, 0.8937162160873413, 0.2444176077842712...
func BenchmarkFindInstrument_SQLBoiler(b *testing.B) { setup(b) //boil.DebugMode = true b.ResetTimer() for i := 0; i < b.N; i++ { id := randInstrumentIDs[i%len(randInstrumentIDs)] instrument, err := models.FindInstrument(db, id) if err != nil { b.Fatal("Failed to select Instrument", "err", err) } if i...
[ -0.10374265164136887, 0.06741242110729218, 0.572394847869873, 0.16490988433361053, 0.7809906601905823, 0.11092530936002731, 0.9919358491897583, -0.710731029510498, -0.30488985776901245, 0.4234846234321594, -0.09453680366277695, 0.29172974824905396, -1.4857133626937866, 1.1944211721420288, ...
func BenchmarkFindInstrument_PGXStdlib(b *testing.B) { setup(b) b.ResetTimer() stmt, err := db.Prepare("select * from instrument where instrument_id = $1") if err != nil { b.Fatal("Failed prepare query", "err", err) } defer stmt.Close() var i models.Instrument for j := 0; j < b.N; j++ { row := stmt.QueryR...
[ -0.257990300655365, 0.40096908807754517, 0.6173423528671265, -0.1751023381948471, -0.21176233887672424, 0.43919917941093445, 0.8542072772979736, -1.2873594760894775, -0.5302683115005493, 0.11712779104709625, 0.34896501898765564, 0.1026390790939331, -1.1209124326705933, 0.17642803490161896,...
func BenchmarkFindInstrument_PGXNative(b *testing.B) { setup(b) b.ResetTimer() _, err := conn.Prepare("select_instrument", "select * from instrument where instrument_id = $1") if err != nil { b.Fatal("Failed prepare query", "err", err) } var i models.Instrument for j := 0; j < b.N; j++ { row := conn.QueryR...
[ -0.4561419188976288, 0.42216765880584717, 0.668320894241333, -0.13000620901584625, -0.2640923261642456, -0.02042333036661148, 0.1855669766664505, -1.569677472114563, -0.7473395466804504, 0.47271594405174255, 0.31224095821380615, 0.3712725341320038, -1.0361104011535645, 0.004657223355025053...
func UnmarshalEvent(data []byte) (Event, error) { //first we extract the generic part aux := struct { StreamTCStr string `json:"stream-timecode"` RecTCStr string `json:"rec-timecode"` UpdateType string `json:"update-type"` }{} if err := json.Unmarshal(data, &aux); err != nil { return nil, err } if l...
[ 0.33897650241851807, -0.3339241147041321, 1.0743005275726318, -1.2280092239379883, -0.7097726464271545, -0.09975265711545944, 0.10054576396942139, -0.554987370967865, -0.06538329273462296, 0.7836057543754578, 0.2534254193305969, 0.37332668900489807, -0.21792034804821014, -0.021068414673209...
func (s CreateServerInput) String() string { return awsutil.Prettify(s) }
[ -0.002619382692500949, 0.05243898555636406, 0.08894883096218109, -0.5036624670028687, -0.4873257577419281, 1.6046216487884521, 0.8299985527992249, -1.4539225101470947, -0.007460666820406914, -0.43362003564834595, -0.3704477846622467, 1.385701298713684, -0.2340255081653595, 0.26057109236717...
func (s *CreateServerInput) Validate() error { invalidParams := aws.ErrInvalidParams{Context: "CreateServerInput"} if s.Tags != nil && len(s.Tags) < 1 { invalidParams.Add(aws.NewErrParamMinLen("Tags", 1)) } if s.Tags != nil { for i, v := range s.Tags { if err := v.Validate(); err != nil { invalidParams.A...
[ -0.25217732787132263, 0.44866761565208435, 0.5449567437171936, 0.011961112730205059, 0.24915921688079834, 0.29580697417259216, -0.16933147609233856, -0.9336771368980408, -0.6231626868247986, 0.18235407769680023, -0.09114336222410202, 0.1902943104505539, -0.9647684097290039, 1.4373081922531...
func (s CreateServerOutput) String() string { return awsutil.Prettify(s) }
[ 0.6912523508071899, -0.3438652753829956, 0.0067081996239721775, -0.46177369356155396, -0.8341030478477478, 0.5661561489105225, 0.7647082209587097, -1.3300809860229492, -0.6020348072052002, -0.5057034492492676, -0.05494130775332451, 0.806090235710144, 0.030995437875390053, 0.068785354495048...
func (r CreateServerRequest) Send(ctx context.Context) (*CreateServerResponse, error) { r.Request.SetContext(ctx) err := r.Request.Send() if err != nil { return nil, err } resp := &CreateServerResponse{ CreateServerOutput: r.Request.Data.(*CreateServerOutput), response: &aws.Response{Request: r.Re...
[ -1.0072096586227417, -0.07744984328746796, 0.2157006710767746, -0.22770097851753235, 0.434055894613266, 0.34773778915405273, -0.11145390570163727, -1.2143772840499878, 0.4362860918045044, -0.1926979124546051, -0.4865650534629822, 0.7677712440490723, -1.1106083393096924, 0.2848133146762848,...
func (r *CreateServerResponse) SDKResponseMetdata() *aws.Response { return r.response }
[ 0.032944776117801666, -0.187684565782547, 0.23482251167297363, -0.3816958963871002, 0.15526804327964783, 0.845099925994873, -0.5837000012397766, -0.593152642250061, 0.9251167178153992, -0.1922781765460968, -0.8625317215919495, 0.30961713194847107, -0.5671879053115845, -0.24841974675655365,...