text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (m *MockTaskDao) ListHistoryTask(page *service.Pagination, isDBA bool) ([]task.OwlTask, int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ListHistoryTask", page, isDBA) ret0, _ := ret[0].([]task.OwlTask) ret1, _ := ret[1].(int) ret2, _ := ret[2].(error) return ret0, ret1, ret2 }
[ -0.32584062218666077, -0.5231609344482422, 0.4735391438007355, 0.47247400879859924, 1.0691291093826294, 0.012963137589395046, 0.9425435662269592, 0.08213073015213013, -0.3123069107532501, -1.032940149307251, -1.3364263772964478, 0.27071261405944824, -0.46905118227005005, 1.2550729513168335...
func (mr *MockTaskDaoMockRecorder) ListHistoryTask(page, isDBA interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListHistoryTask", reflect.TypeOf((*MockTaskDao)(nil).ListHistoryTask), page, isDBA) }
[ 0.14353841543197632, 0.15924839675426483, 0.18905627727508545, 0.7380248308181763, 0.3351614475250244, 0.08556697517633438, -0.4635409116744995, -0.5819785594940186, 0.952149510383606, -0.4342975914478302, -0.29123038053512573, 0.6689180135726929, -0.21032093465328217, 1.6150413751602173, ...
func (m *MockTaskDao) GetTask(id int64) (*task.OwlTask, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetTask", id) ret0, _ := ret[0].(*task.OwlTask) ret1, _ := ret[1].(error) return ret0, ret1 }
[ -0.3772802948951721, 0.3785860538482666, 0.4493435025215149, 1.1962037086486816, 1.5456502437591553, -0.0924212709069252, 1.5369406938552856, -0.48597073554992676, -0.16722151637077332, -0.6110293865203857, -1.198728322982788, 0.033196061849594116, 0.11118373274803162, 0.8474738597869873, ...
func (mr *MockTaskDaoMockRecorder) GetTask(id interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTask", reflect.TypeOf((*MockTaskDao)(nil).GetTask), id) }
[ -0.005370066035538912, 1.2217012643814087, 0.21236607432365417, 0.7446725964546204, 0.6454964876174927, -0.18642538785934448, 0.4705260097980499, -1.0927517414093018, 0.9866980314254761, 0.6523106098175049, -0.07034651190042496, 0.6076944470405579, -0.3169071674346924, 1.2216341495513916, ...
func (m *MockTaskDao) GetExecWaitTask() ([]task.OwlTask, int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetExecWaitTask") ret0, _ := ret[0].([]task.OwlTask) ret1, _ := ret[1].(int) ret2, _ := ret[2].(error) return ret0, ret1, ret2 }
[ -0.7410758137702942, 0.18992018699645996, 0.6240453720092773, 0.07449883222579956, 0.7423390746116638, 0.05511888116598129, 1.1641006469726562, -0.4193274676799774, -0.8112430572509766, -0.8211123943328857, -0.8499121069908142, -0.22238962352275848, 0.11946969479322433, 1.1416079998016357,...
func (mr *MockTaskDaoMockRecorder) GetExecWaitTask() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExecWaitTask", reflect.TypeOf((*MockTaskDao)(nil).GetExecWaitTask)) }
[ -0.5202377438545227, 0.8747544884681702, 0.5066732168197632, -0.39850181341171265, 0.3948622941970825, 0.14560386538505554, 0.16004885733127594, -0.554236114025116, 0.3711281418800354, 0.43623968958854675, 0.11584004759788513, 0.299407422542572, 0.1715778112411499, 0.92130047082901, -0.6...
func NewMockSubTaskDao(ctrl *gomock.Controller) *MockSubTaskDao { mock := &MockSubTaskDao{ctrl: ctrl} mock.recorder = &MockSubTaskDaoMockRecorder{mock} return mock }
[ 1.1600815057754517, 0.46524807810783386, 0.47489288449287415, 0.8396174311637878, -1.213431477546692, 0.5000576376914978, 1.4590883255004883, 0.897615373134613, 0.3804382085800171, -0.32771262526512146, -1.554321050643921, 0.7891348600387573, 0.9801075458526611, 0.3039265275001526, -0.39...
func (m *MockSubTaskDao) EXPECT() *MockSubTaskDaoMockRecorder { return m.recorder }
[ 0.7032055854797363, 1.1824350357055664, 0.2177407443523407, 0.5386947989463806, -0.846301794052124, 0.40907782316207886, 0.5818537473678589, 0.9909868836402893, 0.33248311281204224, -0.7373692989349365, -0.5247724652290344, 1.167191982269287, 0.3259902000427246, 0.3744039237499237, -0.33...
func (m *MockSubTaskDao) UpdateItem(item *task.OwlExecItem) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UpdateItem", item) ret0, _ := ret[0].(error) return ret0 }
[ -0.5571138262748718, -0.23834528028964996, 0.12296956777572632, 1.2007404565811157, 1.090396761894226, 1.1841456890106201, 1.0838617086410522, -0.23169533908367157, -0.8571637868881226, -0.20406223833560944, -0.6224867105484009, -0.44563984870910645, -0.3734622895717621, 0.3577411472797394...
func (mr *MockSubTaskDaoMockRecorder) UpdateItem(item interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateItem", reflect.TypeOf((*MockSubTaskDao)(nil).UpdateItem), item) }
[ -0.167947918176651, 0.7615629434585571, -0.056529540568590164, 1.2007904052734375, -0.3825016915798187, 1.1074944734573364, -0.07011238485574722, -0.42480722069740295, 0.8265548944473267, 0.3558464050292969, 0.2684417963027954, 0.4536876082420349, -0.3971783518791199, 0.35694408416748047, ...
func (m *MockSubTaskDao) DelItem(item *task.OwlExecItem) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DelItem", item) ret0, _ := ret[0].(error) return ret0 }
[ -0.033348239958286285, 0.4184896647930145, 0.13904254138469696, 1.2248739004135132, 0.9784208536148071, 1.1729100942611694, 1.0763170719146729, 0.18730203807353973, -0.3877260684967041, -0.6659078598022461, -0.345514178276062, -0.39285218715667725, -0.748928964138031, 0.4953085780143738, ...
func (mr *MockSubTaskDaoMockRecorder) DelItem(item interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelItem", reflect.TypeOf((*MockSubTaskDao)(nil).DelItem), item) }
[ 0.17407989501953125, 1.4199187755584717, 0.02995743416249752, 1.0087337493896484, -0.3730508089065552, 1.2507134675979614, -0.290055513381958, -0.16727697849273682, 1.1294262409210205, -0.29706451296806335, 0.5897657871246338, 0.5759312510490417, -0.8158681988716125, 0.3388683497905731, ...
func (m *MockSubTaskDao) UpdateItemByBackupId(item *task.OwlExecItem) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UpdateItemByBackupId", item) ret0, _ := ret[0].(error) return ret0 }
[ -0.13996726274490356, -0.6035528182983398, 0.5223261117935181, 1.3143843412399292, 1.1377876996994019, -0.004678876139223576, 0.20378468930721283, -0.6476961970329285, -0.7810414433479309, 0.4683791995048523, -1.1554591655731201, -0.8885931968688965, -0.8044637441635132, 0.3280436396598816...
func (mr *MockSubTaskDaoMockRecorder) UpdateItemByBackupId(item interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateItemByBackupId", reflect.TypeOf((*MockSubTaskDao)(nil).UpdateItemByBackupId), item) }
[ 0.23078598082065582, 0.047644518315792084, 0.45306652784347534, 1.2796350717544556, 0.10493259876966476, -0.08451786637306213, -0.9085781574249268, -0.9127468466758728, 0.5295819044113159, 1.1897796392440796, -0.46040695905685425, -0.12573659420013428, -0.8452679514884949, 0.35458120703697...
func NewYurttunnelServerCommand(stopCh <-chan struct{}) *cobra.Command { o := NewYurttunnelServerOptions() cmd := &cobra.Command{ Use: "Launch " + projectinfo.GetServerName(), Short: projectinfo.GetServerName() + " sends requests to yurttunnel-agents", RunE: func(c *cobra.Command, args []string) error { i...
[ 0.005434505641460419, -0.9991649985313416, 0.9184154272079468, -0.4553425908088684, 0.302407443523407, 0.4637358784675598, 0.07194695621728897, 0.009447954595088959, 0.10136154294013977, -0.3896934688091278, -0.6260637044906616, 0.9199947118759155, -0.0462159588932991, 0.4687619209289551, ...
func NewYurttunnelServerOptions() *YurttunnelServerOptions { o := &YurttunnelServerOptions{ bindAddr: "0.0.0.0", insecureBindAddr: "127.0.0.1", enableIptables: true, iptablesSyncPeriod: 60, serverCount: 1, serverAgentPort: constants.YurttunnelSe...
[ -0.2737022340297699, -0.3990096151828766, 0.4348892867565155, -1.0830422639846802, 0.3390049934387207, 0.14045806229114532, 0.17155800759792328, -0.2422088384628296, 0.8447065353393555, -0.621035099029541, -0.5525356531143188, 0.8480170369148254, -0.10518082976341248, 0.024280348792672157,...
func (o *YurttunnelServerOptions) validate() error { if len(o.bindAddr) == 0 { return fmt.Errorf("%s's bind address can't be empty", projectinfo.GetServerName()) } return nil }
[ 0.17027316987514496, 0.2888562083244324, 0.3789181113243103, -0.44101929664611816, 1.1011844873428345, 0.5173885822296143, 0.5081086754798889, -0.41219958662986755, 0.29728418588638306, -0.5949550271034241, 0.48264017701148987, 0.3448505997657776, -0.9013468623161316, 0.6651093363761902, ...
func (o *YurttunnelServerOptions) complete() error { o.serverAgentAddr = fmt.Sprintf("%s:%d", o.bindAddr, o.serverAgentPort) o.serverMasterAddr = fmt.Sprintf("%s:%d", o.bindAddr, o.serverMasterPort) o.serverMasterInsecureAddr = fmt.Sprintf("%s:%d", o.insecureBindAddr, o.serverMasterInsecurePort) klog.Infof("server ...
[ -0.2666407525539398, -0.2908116281032562, 0.5655274391174316, -0.7136540412902832, 0.7424872517585754, 0.2467324435710907, 0.5002008676528931, 0.09853611141443253, -0.0801684632897377, 0.1884327083826065, -0.3048704266548157, 0.5278794765472412, -0.24752052128314972, 0.48294597864151, 1....
func (o *YurttunnelServerOptions) run(stopCh <-chan struct{}) error { // 1. start the IP table manager if o.enableIptables { iptablesMgr := iptables.NewIptablesManager(o.clientset, o.sharedInformerFactory, o.bindAddr, o.iptablesSyncPeriod, stopCh) if iptablesMgr == nil { return fmt.Errorf("fail to ...
[ -0.46754685044288635, -0.2963590919971466, 0.9167752265930176, -0.514062762260437, 0.5523689389228821, 0.5074597001075745, 0.04347090795636177, 0.23620454967021942, -0.1867399960756302, -0.37177157402038574, -0.3659467101097107, 0.026995200663805008, -0.456920862197876, 0.5684149265289307,...
func NewRawNotificationHTTPHandlerFunc(c *apns.Client) (f http.HandlerFunc) { f = func(c *apns.Client) http.HandlerFunc { var handlerFunc http.HandlerFunc handlerFunc = func(w http.ResponseWriter, req *http.Request) { startTime := time.Now() atomic.AddUint64(&notificationCounter, 1) var responseData []...
[ -0.6204146146774292, 0.15195627510547638, 0.9547315835952759, -0.11449398100376129, -0.4289228320121765, -0.1750131994485855, 0.3286132514476776, -0.6766884326934814, -0.255459725856781, 0.24069200456142426, -0.46082809567451477, 0.5816819667816162, 0.766777753829956, 0.3229637145996094, ...
func NewExpiredDevicesHTTPHandlerFunc(c *apns.Client) (f http.HandlerFunc) { f = func(c *apns.Client) http.HandlerFunc { var handlerFunc http.HandlerFunc handlerFunc = func(w http.ResponseWriter, req *http.Request) { startTime := time.Now() atomic.AddUint64(&feedbackCounter, 1) var responseData []byte ...
[ -0.005348792299628258, -0.5544893145561218, 0.6404736042022705, -0.4689396917819977, -0.5880354046821594, 0.0792844370007515, 0.4851686358451843, -0.5967326760292053, -0.1646915078163147, -0.06121943145990372, 0.6439487338066101, 0.5950537919998169, 0.15743225812911987, 0.7216194868087769,...
func StatementRouter() http.Handler { r := chi.NewRouter() r.Get("/", allStatements) r.Post("/", createStatement()) // POST /articles - different way (func is returned) r.Get("/range", rangeStatements) // GET /statement/data from date to r.Get("/on-date", onDateStatements) // GET /statement/data from date ...
[ -0.6645028591156006, -0.9789023995399475, 0.6386753916740417, 0.05203883349895477, -0.06726999580860138, -0.03524339199066162, 0.3682996928691864, -0.21974697709083557, 0.5169270634651184, 0.6467515826225281, -0.08167966455221176, -0.6581395864486694, -0.49615567922592163, 0.33662661910057...
func statementCtx(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { stID := chi.URLParam(r, "stID") var stmt model.Statement err := driver.DoOne(&stmt, stID, driver.GetOne) if err != nil { http.Error(w, http.StatusText(404), 404) return } ctx := ...
[ -0.6301721334457397, -0.600176990032196, 0.6183297038078308, -0.4122895300388336, -0.42092201113700867, 0.14431630074977875, -0.18038253486156464, -0.3960713744163513, 0.5320342183113098, 0.6108583211898804, 0.26710447669029236, -0.035799384117126465, 0.1871185302734375, -0.014675947837531...
func New(imagePath, libraryURL string, d types.Definition, isDetached, force bool, builderAddr, authToken string) (rb *RemoteBuilder, err error) { builderURL, err := url.Parse(builderAddr) if err != nil { return nil, errors.Wrap(err, "failed to parse builder address") } rb = &RemoteBuilder{ Client: http.Client...
[ -0.04931502416729927, -0.4981759190559387, 0.3530140519142151, -0.18857945501804352, -0.678589403629303, 0.5202454924583435, 0.004743858240544796, 0.5131012201309204, 0.3292529881000519, -0.32556378841400146, -0.919130265712738, 1.2100226879119873, -0.6055701375007629, 0.6840112805366516, ...
func (rb *RemoteBuilder) Build(ctx context.Context) (err error) { var libraryRef string if strings.HasPrefix(rb.ImagePath, "library://") { // Image destination is Library. libraryRef = rb.ImagePath } // Send build request to Remote Build Service rd, err := rb.doBuildRequest(ctx, rb.Definition, libraryRef) i...
[ -0.15387602150440216, -0.7101966142654419, 0.828912615776062, 0.09664683043956757, 0.31623122096061707, 0.17944957315921783, 0.28912875056266785, -0.2854965329170227, 0.2733822464942932, -0.2362331748008728, 0.5646762847900391, 0.4786321520805359, -0.5203390717506409, 0.8869198560714722, ...
func (rb *RemoteBuilder) streamOutput(ctx context.Context, url string) (err error) { h := http.Header{} rb.setAuthHeader(h) h.Set("User-Agent", useragent.Value()) c, resp, err := websocket.DefaultDialer.Dial(url, h) if err != nil { sylog.Debugf("websocket dial err - %s, partial response: %+v", err, resp) retu...
[ 0.40093234181404114, -0.1643543243408203, 0.8908726572990417, -0.338759183883667, -0.6296659111976624, 0.186986044049263, 0.12926138937473297, -1.1102170944213867, 0.5073449611663818, 0.22323408722877502, -0.009851455688476562, 0.8722715377807617, -0.9823153018951416, 0.37287065386772156, ...
func (rb *RemoteBuilder) doBuildRequest(ctx context.Context, d types.Definition, libraryRef string) (rd types.ResponseData, err error) { if libraryRef != "" && !client.IsLibraryPushRef(libraryRef) { err = fmt.Errorf("invalid library reference: %v", rb.ImagePath) sylog.Warningf("%v", err) return types.ResponseDat...
[ -0.820829451084137, -0.5440995693206787, 1.186357021331787, -0.14203280210494995, 0.09928152710199356, 0.2112327665090561, 0.05095728114247322, -0.7058693170547485, -0.11520650237798691, 0.272779256105423, -0.12260624766349792, 1.0254818201065063, -0.7293974161148071, 0.932121753692627, ...
func (rb *RemoteBuilder) doStatusRequest(ctx context.Context, id bson.ObjectId) (rd types.ResponseData, err error) { req, err := http.NewRequest(http.MethodGet, rb.BuilderURL.String()+"/v1/build/"+id.Hex(), nil) if err != nil { return } req = req.WithContext(ctx) rb.setAuthHeader(req.Header) req.Header.Set("Use...
[ -1.2480802536010742, -0.5109883546829224, 1.0614113807678223, -0.11045534908771515, 0.20236051082611084, 0.44323253631591797, -0.3411635160446167, -0.34920960664749146, 0.7303879261016846, 0.5997834205627441, -0.7292565107345581, 1.0856389999389648, -0.26796722412109375, 0.2113503515720367...
func HandleRequest(request events.APIGatewayProxyRequest) (Response, error) { log.Println("start") eventsAPIEvent, err := getAPIEvents(request.Body) if err != nil { log.Print(err) return Response{ StatusCode: 400, }, err } log.Printf("eventsAPIEvent: %+v\n", eventsAPIEvent) switch eventsAPIEvent.Type {...
[ -0.05307728424668312, -0.13658425211906433, 0.9906678795814514, -0.4840725362300873, 0.5978763699531555, -0.2825283706188202, -0.018649106845259666, 0.16523079574108124, 0.42564117908477783, 0.14194662868976593, 0.7352749109268188, 0.3544427752494812, -0.441561222076416, 0.5703979730606079...
func ContainsString(s []string, v string) bool { for _, vv := range s { if vv == v { return true } } return false }
[ 0.025920746847987175, -1.1587097644805908, 0.2883070409297943, 0.3077635169029236, -0.06294456124305725, 0.22630639374256134, -0.7850134968757629, -0.6316498517990112, 0.27095723152160645, 0.6078423261642456, -0.6089975833892822, 0.6188147068023682, 0.029674051329493523, -0.796810686588287...
func NewBoard(dealer int, hands []KomaArray) *Board { b := &Board{} b.initWithInitialStateData(dealer, hands) return b }
[ 0.18991754949092865, 0.2107386589050293, 0.37892529368400574, 1.8730452060699463, -0.3052564859390259, 0.07117655128240585, -0.2395516335964203, 0.15665729343891144, 0.3547394573688507, -0.6556833386421204, 0.6048758029937744, -0.34373942017555237, -0.598266065120697, 0.43431249260902405, ...
func NewBoardRandom(dealer int) *Board { b := &Board{} ring := KomaRing() Shuffle(ring) hands := make([]KomaArray, 4) for i := 0; i < 4; i++ { hands[i] = ring[i*FieldLength : (i+1)*FieldLength] hands[i].Sort() } b.initWithInitialStateData(dealer, hands) return b }
[ -0.16563668847084045, 0.6177942752838135, 0.6592115163803101, 0.19670024514198303, -0.8166771531105042, 0.3190747797489166, 0.7710211277008057, -0.29379552602767944, 0.2137446105480194, -0.2946588099002838, -0.46685847640037537, -0.14819949865341187, -0.8980183601379395, 0.3446322381496429...
func ParseBoard(historyString string) *Board { b := &Board{} b.initWithHistoryString(historyString) return b }
[ 1.178566575050354, 0.7459980249404907, 0.39962539076805115, 1.1301777362823486, -0.6333429217338562, 0.02091771736741066, 0.049031250178813934, 0.3566240966320038, 0.7562119364738464, -1.5549507141113281, 0.02137068659067154, 0.011498981155455112, -0.8857951760292053, 0.09626289457082748, ...
func (b *Board) LastAttacker() int { if len(b.AttackerLog) == 0 { return b.Dealer } return b.AttackerLog[len(b.AttackerLog)-1] }
[ -0.6394895315170288, -0.2931765019893646, 0.924318790435791, -0.4616113305091858, -0.9180796146392822, -0.5688690543174744, 0.29625189304351807, 0.786984384059906, -0.24403223395347595, -0.07427725940942764, 0.6841439604759216, -0.5501290559768677, -0.5718691349029541, -0.23074333369731903...
func (b *Board) PlayMove(move *Move) (ok bool) { // face-down check if b.LastAttacker() == b.Turn { move.FaceDown = true } b.MoveHistoryIndex++ b.MoveHistory[b.MoveHistoryIndex] = move b.MoveHistoryLen = b.MoveHistoryIndex + 1 finished := false if !move.IsPass() { p := b.Players[b.Turn] p.pushKoma(move....
[ -0.34593790769577026, 0.5125191807746887, 1.0158132314682007, 0.5098714232444763, -0.25589925050735474, -0.47870373725891113, 0.7744120359420776, -0.24337996542453766, 0.08842721581459045, 0.38715606927871704, -0.2469944953918457, -0.5512218475341797, -1.3651244640350342, 0.143220603466033...
func (b *Board) RedoMove() (ok bool) { if b.MoveHistoryLen <= b.MoveHistoryIndex+1 { return false } move := b.MoveHistory[b.MoveHistoryIndex+1] b.PlayMove(move) return true }
[ -0.6535676717758179, 1.7654286623001099, 0.8571888208389282, 0.5831012725830078, -0.22695034742355347, -0.5048179626464844, -0.05665627121925354, -0.04128492251038551, 0.4335288405418396, 0.47599685192108154, -0.2633100152015686, 0.057061776518821716, -0.9509012699127197, -0.34745642542839...
func (b *Board) UndoMove() (ok bool) { if b.MoveHistoryIndex < 0 { return false } b.Turn = util.GetPreviousTurn(b.Turn) b.Finish = false move := b.MoveHistory[b.MoveHistoryIndex] b.MoveHistoryIndex-- if !move.IsPass() { p := b.Players[b.Turn] p.popKoma() p.popKoma() if (move.Block.IsKing() && !move....
[ -0.40199047327041626, 0.2817917466163635, 1.1016883850097656, -0.14698626101016998, -0.1985289305448532, -0.5358116030693054, 0.6022720336914062, 1.0434200763702393, -0.7039795517921448, 0.468500018119812, -0.19288821518421173, -0.12746456265449524, -1.1115565299987793, -0.2790173292160034...
func (b *Board) PossibleMoves(buf KomaArray, moves []*Move) []*Move { if b.Finish { return []*Move{} } hand := b.Players[b.Turn].hand uniqueCount := hand.Unique(buf) uniqueHand := buf[:uniqueCount] fieldCounter := b.Players[b.Turn].fieldCounter moves = moves[:0] if b.LastAttackMove == nil || b.Turn == b.Attac...
[ -0.1869727373123169, -0.6847395300865173, 0.7682084441184998, 0.8772791028022766, -0.01479358971118927, -0.3225208520889282, 0.17601050436496735, 0.237420916557312, 0.13536396622657776, 0.3193780779838562, -0.02507821097970009, -0.2777877151966095, -0.6524983048439026, -0.00966907292604446...
func (b *Board) GetPossibleMoves() []*Move { buf := make(KomaArray, FieldLength) moves := make([]*Move, 0, 64) return b.PossibleMoves(buf, moves) }
[ -0.6687139272689819, 0.656877338886261, 0.47332414984703064, 1.6210538148880005, 0.538304328918457, -0.31448987126350403, -0.50566565990448, -0.3573239743709564, 0.13590660691261292, 0.2779868245124817, -0.760945200920105, 0.7340953946113586, -1.3826429843902588, 0.2729640305042267, 0.59...
func (b *Board) IsEnd() bool { if b.Finish { return true } for _, p := range b.Players { if p.fieldCounter == FieldLength { return true } } return false }
[ -0.5132855176925659, 0.465671181678772, 0.7705023288726807, 0.4339355528354645, 0.37959709763526917, 0.3089141547679901, -0.308187335729599, 0.3052997589111328, -0.6439657807350159, 1.1586182117462158, -0.7609213590621948, 0.018392855301499367, -1.341452956199646, 0.5332857370376587, -0....
func (b *Board) IsGoshi() bool { goshi := -1 for i, v := range b.InitialShiCounts { if v == 5 { if goshi >= 0 { return false } goshi = i } } return false }
[ 0.3776592016220093, 0.843003511428833, 0.4417746365070343, 1.1125539541244507, 0.28450363874435425, -0.20298272371292114, 0.2593776285648346, 0.229942187666893, -1.1114758253097534, -0.1077650934457779, -0.8668720126152039, 0.17029976844787598, -1.0788475275039673, 0.4893232583999634, 0....
func (b *Board) HasYaku() bool { goshi := -1 for i, v := range b.InitialShiCounts { if v >= 6 { return true } else if v >= 5 { if goshi >= 0 { if util.IsSameTeam(i, goshi) { return true } } else { goshi = i } } } return false }
[ 0.020900804549455643, 0.4525091350078583, 0.6872668266296387, 0.7594133019447327, 0.38225093483924866, -1.140578031539917, 0.9156016707420349, 1.0165681838989258, -0.7801505327224731, -0.7890233397483826, -0.6685455441474915, -0.25728416442871094, -0.11782241612672806, 0.9535743594169617, ...
func (b *Board) WonPlayerNo() int { if b.Finish { for i, p := range b.Players { if p.fieldCounter == FieldLength { return i } } } return -1 }
[ -1.0537989139556885, -0.29415038228034973, 0.659818172454834, 0.3732636570930481, -0.5558045506477356, -0.34198203682899475, 1.0941494703292847, 0.457411527633667, -1.2777149677276611, -0.3585929870605469, -0.9825358986854553, 0.08403230458498001, -0.8031488656997681, 0.25789323449134827, ...
func (b *Board) Score() int { if !b.Finish { return 0 } // yaku ? or finish move // b.HasYaku() //TODO: yaku score s := b.LastAttackMove.Attack.GetScore() if b.LastAttackMove.FaceDown && b.LastAttackMove.Block == b.LastAttackMove.Attack { s = s * 2 } return s }
[ 0.41686350107192993, -0.09175767749547958, 0.8577424883842468, 0.7925923466682434, 0.15765699744224548, -1.1977704763412476, 0.9188041090965271, -0.2468627691268921, -0.2632370889186859, 0.5786986351013184, 0.14259684085845947, -0.5217394828796387, -0.2709522843360901, 0.5819515585899353, ...
func (b *Board) FinishMoveScore() int { if b.LastAttackMove.FaceDown && b.LastAttackMove.Block == b.LastAttackMove.Attack { return b.LastAttackMove.Attack.GetScore() * 2 } return b.LastAttackMove.Attack.GetScore() }
[ 0.2517201900482178, -0.545318603515625, 1.0514415502548218, -0.05353165045380592, -0.42885729670524597, -0.8952904939651489, 0.010300752706825733, -0.626319944858551, -0.5361547470092773, 1.2669841051101685, -0.2144259363412857, 0.08108186721801758, -0.3608476519584656, 0.09680042415857315...
func (b *Board) SubHistory(start int, end int) MoveHashArray { moves := make(MoveHashArray, 0, end-start+1) for i := start; i < end; i++ { m := b.MoveHistory[i] moves = append(moves, m.Hash()) } return moves }
[ 0.6140031218528748, 0.5352560877799988, 0.6757415533065796, 0.9597611427307129, -0.38042083382606506, -0.29100435972213745, -0.24493488669395447, 0.3843047618865967, -0.7618408203125, 0.236603781580925, -0.9472549557685852, 0.7197214961051941, -0.08585471659898758, -0.49502041935920715, ...
func (l LogEntry) MarshalJSON() ([]byte, error) { type Alias LogEntry return json.Marshal( struct { meta.TypeMeta `json:",inline"` Alias `json:",inline"` }{ TypeMeta: meta.TypeMeta{ APIVersion: meta.APIVersion, Kind: "LogEntry", }, Alias: (Alias)(l), }, ) }
[ 0.36703920364379883, -0.37370365858078003, 0.2898015081882477, -0.9866611361503601, 0.45152223110198975, -0.037576910108327866, -0.3444899916648865, 0.5197449326515198, 0.4419010877609253, 0.875909149646759, -0.6332376599311829, 1.7728570699691772, 0.659600555896759, 0.5675150156021118, ...
func (b *BSTNode) TraversePostOrder() { if *b == (BSTNode{}) { fmt.Println("Node is empty") return } if b.Right != nil { b.Right.TraversePostOrder() } fmt.Println("DATA->", b.Data) if b.Left != nil { b.Left.TraversePostOrder() } }
[ -0.1833154261112213, 0.10603620857000351, 0.796257734298706, 0.2175782173871994, -0.3242965638637543, 0.05366537719964981, -0.43444183468818665, -0.36622288823127747, -0.4097590744495392, -0.18880638480186462, -1.1141984462738037, 0.2084292620420456, -0.5493130087852478, 1.9494497776031494...
func (s *SmartContract) Init(APIstub shim.ChaincodeStubInterface) sc.Response { return shim.Success(nil) }
[ -0.5243491530418396, 0.08938487619161606, 0.506217896938324, 0.07783778756856918, 0.08763840049505234, -0.6433934569358826, -0.0882711410522461, 0.7688431739807129, 0.3836457133293152, -0.6624517440795898, -0.5816953778266907, 0.5960165858268738, -0.5361734628677368, 0.08645450323820114, ...
func (s *SmartContract) Invoke(APIstub shim.ChaincodeStubInterface) sc.Response { function, args := APIstub.GetFunctionAndParameters() logger.Infof("Function name is: %d", function) logger.Infof("Args length is : %d", len(args)) switch function { case "queryProduct": return s.queryProduct(APIstub, args) case...
[ -0.8409934043884277, 0.1472439169883728, 0.7999523878097534, 0.8322523832321167, 0.11883021891117096, -0.661895751953125, 0.004643188323825598, -0.010595973581075668, 0.5732927322387695, -0.06830412149429321, -0.36045098304748535, 0.4345131814479828, -0.24683648347854614, -0.44437959790229...
func main() { // Create a new Smart Contract err := shim.Start(new(SmartContract)) if err != nil { fmt.Printf("Error creating new Smart Contract: %s", err) } }
[ 0.9188963174819946, -0.04043641313910484, 0.726228654384613, 1.0211631059646606, 0.0017453532200306654, 0.0693558007478714, 0.410116970539093, 1.0851428508758545, 0.6619133353233337, -0.2647523581981659, -0.7748851180076599, 0.4329872727394104, -0.1346379667520523, -0.07924967259168625, ...
func (m GenericErrors) Validate(formats strfmt.Registry) error { return nil }
[ -0.32120344042778015, 0.03267088904976845, 0.19962041079998016, -0.5262437462806702, 1.441827654838562, 0.5809376239776611, -0.08068940788507462, -0.20529910922050476, -0.4174685478210449, -0.7022696733474731, 0.5168789029121399, 0.5462633967399597, -0.4617212116718292, 0.4762043356895447,...
func RunClient(conf Conf, isCopy bool, isMove bool) { conn, err := net.DialTimeout("tcp", conf.Connect, conf.Timeout) if err != nil { log.Fatal(fmt.Sprintf("Unable to connect to %v - Is a Piknik server running on that host?", conf.Connect)) } defer conn.Close() conn.SetDeadline(time.Now().Add(conf.Timeout)) ...
[ -0.5440613031387329, -0.24446077644824982, 0.7779828906059265, 0.45254096388816833, -0.711205244064331, 0.2528757154941559, 0.5958563685417175, 0.4255358874797821, -0.4237714409828186, 0.5484859943389893, -0.40992817282676697, 0.4776996374130249, -0.8515921235084534, 0.03393982723355293, ...
func main() { }
[ 0.5935109257698059, -0.5238813161849976, 0.06262364238500595, 1.9832351207733154, 0.3146790564060211, 0.4833202362060547, 1.6697919368743896, 0.6601263284683228, -0.13723190128803253, -0.6224525570869446, -0.7590957880020142, 0.3508590757846832, -0.36477935314178467, 0.25635138154029846, ...
func (o *oVirtClient) UploadImage( alias string, storageDomainID StorageDomainID, sparse bool, size uint64, reader io.ReadSeekCloser, retries ...RetryStrategy, ) (UploadImageResult, error) { o.logger.Warningf("Using UploadImage is deprecated. Please use UploadToNewDisk instead.") return o.UploadToNewDisk( sto...
[ -0.519622266292572, 0.501706063747406, 0.5907317996025085, 0.04707938805222511, -0.25992488861083984, -0.014135776087641716, -0.4297846853733063, -0.45691972970962524, -0.5075143575668335, 0.3951774537563324, 0.8883129954338074, 0.13657496869564056, -0.3466845750808716, 0.5751547813415527,...
func (o *oVirtClient) StartImageUpload( alias string, storageDomainID StorageDomainID, sparse bool, size uint64, reader io.ReadSeekCloser, retries ...RetryStrategy, ) (UploadImageProgress, error) { o.logger.Warningf("Using StartImageUpload is deprecated. Please use StartUploadToNewDisk instead.") return o.Start...
[ -0.4210026264190674, 0.33681049942970276, 0.6130723357200623, 0.10016787052154541, -0.955399215221405, -0.6731972694396973, 0.24991139769554138, -0.23016323149204254, -0.07824677228927612, 0.057281672954559326, -0.015174336731433868, 0.23617011308670044, -0.06735483556985855, -0.1055730953...
func (u *uploadToDiskProgress) transferImage(transfer imageTransfer, transferURL string) error { return retry( fmt.Sprintf( "transferring image for disk %s via HTTP request to %s", u.disk.ID(), transferURL, ), u.client.logger, u.retries, func() error { return u.putRequest(transferURL, transfer) ...
[ -0.9640855193138123, 0.27041202783584595, 0.46007516980171204, 0.71781325340271, 0.33990123867988586, 0.3305688202381134, -0.23893345892429352, -0.6534063220024109, -0.9906998872756958, -0.09966401755809784, 0.5322901010513306, 0.0014231204986572266, -0.7453985810279846, 0.6066194772720337...
func (u *uploadToDiskProgress) putRequest(transferURL string, transfer imageTransfer) error { // We ensure that the reader is at the first byte before attempting a PUT request, otherwise we may upload an // incomplete image. if _, err := u.reader.Seek(0, io.SeekStart); err != nil { return wrap( err, ELocalIO...
[ -1.0440056324005127, 0.2942526936531067, 0.9215380549430847, -0.6160287261009216, 0.4212246537208557, -0.5433556437492371, 0.32305991649627686, -0.4320342540740967, -0.227786123752594, 0.3558049499988556, 0.5904064178466797, 0.17504172027111053, -0.3625723421573639, 0.3998467028141022, 0...
func NewShellTask(name string, cmd string, args []string) *ShellTask { return &ShellTask{name: name, cmd: cmd, args: args} }
[ 0.6499927043914795, -1.0643786191940308, 0.3769884705543518, 0.10981756448745728, -0.9283275604248047, -0.14114663004875183, -1.3275607824325562, 0.2091752290725708, -0.24124638736248016, -0.05522610992193222, -1.504511833190918, 1.0596388578414917, 0.26315775513648987, 0.2160780131816864,...
func NewShellTaskWithUser(name string, user string, cmd string, args []string) *ShellTask { return &ShellTask{name: name, user: user, cmd: cmd, args: args} }
[ 0.6781150698661804, -1.0481137037277222, 0.33108267188072205, 0.9440774321556091, -1.3395957946777344, 0.13571815192699432, -0.7446258068084717, -0.12870639562606812, -0.7371634244918823, -0.37299150228500366, -1.5110148191452026, 0.6880570650100708, 0.3321303129196167, 0.2131689041852951,...
func (s *ShellTask) TaskName() string { return s.name }
[ 0.04568934068083763, -0.4741104543209076, 0.30886515974998474, 0.4048130214214325, -0.8661091923713684, 0.37665659189224243, 0.9913061261177063, 0.5626031756401062, -0.45831099152565, 0.07369363307952881, -0.6534179449081421, 0.5628311634063721, 0.7861104607582092, 0.23384952545166016, -...
func (s *ShellTask) Command(name string, arg ...string) (*exec.Cmd, error) { cmd, err := s.command(name, arg...) if err != nil { util.FileLogger().Warnf("Failed to create command %s. Error: %s", name, err.Error()) return nil, err } cmd.Env = append(cmd.Env, s.userEnv(cmd.Dir)...) return cmd, nil }
[ -0.07043607532978058, -0.44657889008522034, 0.7105067372322083, 0.48115649819374084, 0.2342626303434372, 1.148545503616333, -0.49579229950904846, -0.13905306160449982, 0.10434789210557938, -0.23773901164531708, 0.016682928428053856, 0.8285768032073975, 0.7526081800460815, 0.507544457912445...
func (s *ShellTask) Process(ctx context.Context) (string, error) { var out bytes.Buffer var errOut bytes.Buffer var output string util.FileLogger().Debugf("Starting the command - %s", s.name) cmd, err := s.Command(s.cmd, s.args...) if err != nil { util.FileLogger().Errorf("Command creation for %s failed - %s", ...
[ 0.24616298079490662, -0.3399584889411926, 0.9455532431602478, 0.0458364300429821, -0.6394281387329102, -0.18412846326828003, 0.04183109477162361, -0.44460415840148926, 0.28738629817962646, 0.14006339013576508, -0.034069325774908066, 0.25940045714378357, 0.686934232711792, 0.881105482578277...
func (s *ShellTask) Done() bool { return s.done }
[ 0.033447712659835815, 0.5017948746681213, 0.5811248421669006, 0.5455998778343201, -0.05286780744791031, 0.6512207388877869, -0.34031543135643005, 0.4459777772426605, -0.5033530592918396, -0.20140321552753448, -1.6405935287475586, 0.009149918332695961, 0.32027778029441833, 0.680574059486389...
func (handler *PreflightCheckHandler) getOptions(preflightScriptPath string) []string { provider := handler.provider instanceType := handler.instanceType accessKey := handler.accessKey options := make([]string, 3) options[0] = preflightScriptPath options[1] = "-t" if accessKey.KeyInfo.SkipProvisioning { optio...
[ -0.33156973123550415, -0.4027063548564911, 0.9676702618598938, 0.009254636242985725, 0.7752042412757874, 0.5026455521583557, 0.210026353597641, -0.39525410532951355, -0.04453810676932335, 0.870023787021637, 0.22625651955604553, 0.3642347455024719, -0.0336870513856411, 1.4444184303283691, ...
func NewLogrusFormatter() capnslog.Formatter { logger := logrus.WithFields(logrus.Fields{ "component": "etcd", }) return &logrusFormatter{ logger: logger, } }
[ -0.11908477544784546, -0.8589330911636353, 0.11912290751934052, -0.9381254315376282, -1.065401315689087, -0.6624100208282471, -1.726716160774231, 0.13617709279060364, 0.717230498790741, -1.0186713933944702, -0.5385258197784424, 0.7530520558357239, 0.594257116317749, 0.3249428868293762, 0...
func (s *logrusFormatter) Format(pkg string, l capnslog.LogLevel, _ int, entries ...interface{}) { for _, entry := range entries { str := fmt.Sprint(entry) switch l { case capnslog.CRITICAL: s.logWithPkg(pkg).Fatal(str) case capnslog.ERROR: s.logWithPkg(pkg).Error(str) case capnslog.WARNING: s.logWi...
[ -0.024758819490671158, -0.7768344283103943, 0.527668297290802, -0.10973431169986725, -0.31196558475494385, -0.3084363639354706, -1.0861554145812988, -0.11057613790035248, 0.7754548788070679, -0.8286681175231934, 0.22271431982517242, -0.16778145730495453, 0.9456828832626343, 1.0788066387176...
func (s *logrusFormatter) Flush() { }
[ -0.6669439077377319, -1.1535228490829468, 0.226459339261055, -0.5702739953994751, -0.3708990812301636, 0.31355980038642883, 0.4885745048522949, -0.13801530003547668, -0.1853659301996231, -1.5826271772384644, 0.3648754358291626, 1.862841248512268, -0.4623495936393738, 1.7134629487991333, ...
func Render(expr expreduceapi.Ex) (chart.Chart, error) { graph := chart.Chart{ Width: 360, Height: 220, XAxis: chart.XAxis{ Style: chart.Style{Show: true}, }, YAxis: chart.YAxis{ Style: chart.Style{Show: true}, }, } graphics, ok := atoms.HeadAssertion(expr, "System`Graphics") if !ok { return g...
[ -0.23849399387836456, 0.3930013179779053, 0.6814907193183899, -0.6851779222488403, -1.1866718530654907, -0.07359034568071365, -0.3867391347885132, -0.2511242628097534, 0.7866290211677551, 0.1899988204240799, 0.6679006814956665, 0.8778758645057678, -0.5125712752342224, -0.6369876265525818, ...
func RenderAsPNG(expr expreduceapi.Ex) (string, error) { graph, err := Render(expr) if err != nil { return "", err } buffer := bytes.NewBuffer([]byte{}) err = graph.Render(chart.PNG, buffer) if err != nil { return "", err } return buffer.String(), nil }
[ -0.406758576631546, 0.4273993968963623, 0.38091644644737244, -0.7384036183357239, -1.6174718141555786, -0.17202512919902802, -0.45431116223335266, -0.40023788809776306, 0.3786289691925049, 0.6340175271034241, 0.2334735244512558, -0.18674080073833466, -0.06848086416721344, -0.09981600195169...
func (e *DeleteItemExpectation) ToTable(table string) *DeleteItemExpectation { e.table = &table return e }
[ 1.263629674911499, 0.11000169068574905, 0.5176684856414795, -0.04284906014800072, 0.7935680747032166, 0.09476419538259506, 0.7804369926452637, 1.2510364055633545, 0.8106068968772888, 0.3397338390350342, 0.177612766623497, 0.47926148772239685, 0.39683347940444946, -0.42104730010032654, 0....
func (e *DeleteItemExpectation) WithKeys(keys map[string]*dynamodb.AttributeValue) *DeleteItemExpectation { e.key = keys return e }
[ -0.5240960121154785, -0.04561484605073929, 0.054927051067352295, -1.158407211303711, -0.1496274322271347, -0.24875138700008392, 0.12961818277835846, 1.0198801755905151, 0.09780270606279373, -0.05239126831293106, 0.18111006915569305, 0.18863417208194733, 0.8366767764091492, -0.1340121626853...
func (e *DeleteItemExpectation) WillReturns(res dynamodb.DeleteItemOutput) *DeleteItemExpectation { e.output = &res return e }
[ 0.12793533504009247, -0.27380916476249695, 0.12617021799087524, -0.016315443441271782, -0.2251960188150406, 0.01149365957826376, 0.4783783257007599, 0.2826694846153259, 0.5592900514602661, -1.1299989223480225, 0.49267998337745667, 0.20971833169460297, -0.6977254748344421, -0.89567530155181...
func (e *MockDynamoDB) DeleteItem(input *dynamodb.DeleteItemInput) (*dynamodb.DeleteItemOutput, error) { if len(e.dynaMock.DeleteItemExpect) > 0 { x := e.dynaMock.DeleteItemExpect[0] //get first element of expectation if x.table != nil { if *x.table != *input.TableName { return &dynamodb.DeleteItemOutput{}...
[ -0.48746997117996216, -0.09253044426441193, 0.5917962789535522, 0.5161341428756714, -0.07217894494533539, 0.7962153553962708, 0.9164028763771057, 0.6613536477088928, 0.07211059331893921, -0.5585983395576477, 0.4794729948043823, -0.1925223022699356, -0.46166083216667175, 0.6738823056221008,...
func (e *MockDynamoDB) DeleteItemWithContext(ctx aws.Context, input *dynamodb.DeleteItemInput, options ...request.Option) (*dynamodb.DeleteItemOutput, error) { if len(e.dynaMock.DeleteItemExpect) > 0 { x := e.dynaMock.DeleteItemExpect[0] //get first element of expectation if x.table != nil { if *x.table != *in...
[ -0.6308292150497437, -0.353839635848999, 0.5688806176185608, 0.4757797420024872, -0.18857817351818085, 0.4969276785850525, 0.18593397736549377, -0.2658177316188812, 0.016752803698182106, -0.3297555446624756, -0.08790888637304306, -0.1822594702243805, -0.4083947241306305, 0.1533506363630294...
func EventFeedPurgeDiagnostic() diagnostics.Diagnostic { return diagnostics.Diagnostic{ Name: "event-feed-purge", Tags: diagnostics.Tags{"event-feed", "purge", "grpc", "skip-for-deep-upgrade"}, Generate: func(t diagnostics.TestContext) error { client, cleanup, err := newPurgeClientFor("event-feed-service") ...
[ 0.576321005821228, 0.2242163121700287, 0.8163532018661499, -0.4300108253955841, 0.7672802209854126, 0.24959619343280792, -0.19429290294647217, 0.3511374890804291, 0.49218568205833435, 0.04182780906558037, 0.15287086367607117, 0.6283277273178101, 0.10141614079475403, 0.14952409267425537, ...
func CompliancePurgeDiagnostic() diagnostics.Diagnostic { return diagnostics.Diagnostic{ Name: "compliance-purge", Tags: diagnostics.Tags{"compliance", "purge", "skip-for-deep-upgrade"}, Generate: func(t diagnostics.TestContext) error { client, cleanup, err := newPurgeClientFor("compliance-service") if err...
[ 0.6903854608535767, 0.24033093452453613, 0.8115590214729309, -0.05549104884266853, 0.6519200205802917, 0.7198860049247742, 0.3374632000923157, 0.2850320041179657, 0.8440309166908264, -0.040107611566782, -0.2980036437511444, 0.12176786363124847, 0.04516645893454552, 0.2494136244058609, 0....
func IngestPurgeDiagnostic() diagnostics.Diagnostic { return diagnostics.Diagnostic{ Name: "ingest-purge", Tags: diagnostics.Tags{"ingest", "purge", "skip-for-deep-upgrade"}, Generate: func(t diagnostics.TestContext) error { client, cleanup, err := newPurgeClientFor("ingest-service") if err != nil { re...
[ 0.32365575432777405, 0.20241999626159668, 0.8976000547409058, -0.15227243304252625, 0.6976604461669922, 0.2874000370502472, -0.4737827181816101, -0.007831321097910404, 1.038679599761963, 0.3391042649745941, 0.2553088068962097, 0.8406099677085876, 0.01587747223675251, 0.13287901878356934, ...
func InitKeys(private_key_path string) (private_key string, public_key string, err error) { if !strings.HasSuffix(private_key_path, ".private") { return "", "", errors.New(fmt.Sprintf("Invalid private key path '%v'.", private_key_path)) } if err = CheckPermissions(private_key_path); err != nil { return "", "", e...
[ -0.6524987816810608, -0.6145421862602234, 0.982162356376648, -0.6945577263832092, 0.4755808711051941, -0.5279711484909058, 0.2643628716468811, -0.3500917851924896, -0.5660276412963867, 1.1189508438110352, 0.3223457932472229, 0.5352169275283813, -1.1393728256225586, 0.610270619392395, 0.8...
func CertificatesExpired(opts Options) error { if opts.Signer.Secret == nil || opts.CABundle == nil { return nil } for _, cert := range opts.Certificates { if cert.Secret == nil { return nil } } rawCA, err := crypto.GetCAFromBytes(opts.Signer.Secret.Data[corev1.TLSCertKey], opts.Signer.Secret.Data[corev...
[ -0.05115277320146561, -0.16730926930904388, 0.6158046722412109, -0.04347622022032738, -0.19739368557929993, -0.4904158115386963, -0.7300719022750854, -0.8262754082679749, 0.03280789405107498, 0.8061174154281616, -0.24698688089847565, -0.21526065468788147, -0.2557694613933563, 0.69557064771...
func buildTargetCertKeyPairSecrets(opts Options) ([]client.Object, error) { var ( res = make([]client.Object, 0) ns = opts.StackNamespace rawCA = opts.Signer.RawCA caBundle = opts.RawCACerts validity = opts.Rotation.TargetCertValidity refresh = opts.Rotation.TargetCertRefresh ) for name, ...
[ -1.5459833145141602, -0.7073508501052856, 0.5435437560081482, 0.7755126953125, 0.25677865743637085, 0.3700839877128601, 0.35849061608314514, -1.0434956550598145, -0.19223643839359283, 0.10776883363723755, -0.06725791096687317, 0.02102632075548172, -0.12400691956281662, -0.10937696695327759...
func setTargetCertKeyPairSecret(s *corev1.Secret, validity time.Duration, signer *crypto.CA, certCreator certificateRotation) error { if s.Annotations == nil { s.Annotations = map[string]string{} } if s.Data == nil { s.Data = map[string][]byte{} } // our annotation is based on our cert validity, so we want to...
[ -0.8860700726509094, -0.4199415445327759, 0.4823037087917328, 0.1422729641199112, -0.7076586484909058, 0.4924513101577759, -0.4711647629737854, 0.15684285759925842, -0.46331706643104553, -0.4750427305698395, -0.5261099338531494, 0.30244624614715576, -0.17312966287136078, -0.118095494806766...
func NewActivityMonitor() *ActivityMonitor { return &ActivityMonitor{} }
[ -0.232161745429039, -1.2168262004852295, -0.3369463384151459, 0.21174392104148865, -0.46004629135131836, -0.8312661051750183, 0.13198469579219818, -0.3782860338687897, 0.4828426241874695, -1.258034348487854, -0.8622128367424011, -0.1572486311197281, -0.7283923625946045, -0.1605533808469772...
func (a *ActivityMonitor) Active() bool { return a.NumActiveRequests() > 0 }
[ -0.959922730922699, -0.7909843921661377, 0.5869770646095276, -0.008665325120091438, -0.21169482171535492, 0.2252194732427597, -0.042019691318273544, -0.4096200466156006, -0.5737913846969604, -0.9115650653839111, 0.4147910177707672, -0.3764280676841736, -0.3546585142612457, -0.0031495073344...
func (a *ActivityMonitor) CountRequest() { atomic.AddUint32(&a.reqCount, 1) }
[ -0.21493059396743774, 0.30344992876052856, 0.385886013507843, 0.22447483241558075, 1.20431387424469, 0.4964646100997925, 0.8716487884521484, -0.2725081741809845, -0.4737469255924225, -0.7284469604492188, 0.5391835570335388, -0.09392230212688446, -0.04131695255637169, 0.891284167766571, 1...
func (a *ActivityMonitor) UncountRequest() { atomic.AddUint32(&a.reqCount, ^uint32(0)) }
[ -0.23339837789535522, 0.13629914820194244, 0.4097740650177002, -0.29671770334243774, 0.7213770747184753, -0.019568217918276787, 1.6542505025863647, -0.051314305514097214, -1.011650800704956, -0.6816993355751038, 0.9725622534751892, -0.02488790452480316, -0.6605154871940613, 0.7673748135566...
func (a *ActivityMonitor) NumActiveRequests() uint32 { return atomic.LoadUint32(&a.reqCount) }
[ 0.016134532168507576, -0.3384001553058624, 0.44404277205467224, -0.016894999891519547, -0.5826818346977234, 0.2266763150691986, -0.1536116600036621, -0.8554056882858276, -0.3524932265281677, -0.7725488543510437, 0.13857020437717438, -0.4474841058254242, 0.0604565255343914, 0.15690194070339...
func GetQueryCmd(queryRoute string) *cobra.Command { // Group clerk queries under a subcommand cmd := &cobra.Command{ Use: types.ModuleName, Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName), DisableFlagParsing: true, SuggestionsMin...
[ 0.40430566668510437, -0.028373217210173607, 0.4422290623188019, -0.3919665813446045, 0.6821241974830627, 0.4508507549762726, 0.46355345845222473, 0.2903432846069336, 0.48965445160865784, -1.291998028755188, 0.5903588533401489, 0.7998341917991638, -0.2976475656032562, 0.772729754447937, -...
func GetStateRecord() *cobra.Command { cmd := &cobra.Command{ Use: "record", Short: "show state record", RunE: func(cmd *cobra.Command, args []string) error { clientCtx := client.GetClientContextFromCmd(cmd) clientCtx, err := client.ReadQueryCommandFlags(clientCtx, cmd.Flags()) if err != nil { ret...
[ 0.575102686882019, 0.05786152556538582, 0.8439387679100037, -0.5924871563911438, 0.10854894667863846, 0.22999735176563263, 0.2836798131465912, -0.2404462844133377, -0.10774724185466766, -0.046134330332279205, 0.45169737935066223, 1.378220558166504, -0.8934276700019836, 0.9379061460494995, ...
func NewGuestUser(guestID null.Int64) *User { if !guestID.Valid { panic("cannot create guest user with null guest ID.") } return &User{ ID: -1 * guestID.Int64, Username: fmt.Sprintf("#Guest%d", guestID.Int64), Guest: true, GuestID: guestID, } }
[ -1.110109806060791, 0.3956177532672882, 0.043985530734062195, 0.798445999622345, -0.41613736748695374, -0.1783256083726883, 0.2563658654689789, -0.25028812885284424, -0.2528608441352844, -0.2629683315753937, -0.7542116641998291, -0.5075797438621521, -0.0034133014269173145, 0.34350791573524...
func (m *GetTxsEventRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil }
[ 0.2844311594963074, 0.5468629002571106, 0.31340938806533813, 1.1369835138320923, 1.1046640872955322, -0.8660495281219482, 1.1600881814956665, 0.22211723029613495, 0.846636950969696, -0.27537134289741516, 0.6356456279754639, -0.9266946315765381, -0.31430578231811523, 0.541752278804779, 1....
func (m *GetTxsEventResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil }
[ 0.7155086994171143, 0.24605701863765717, 0.21054202318191528, 0.6039016246795654, 1.2774839401245117, -0.9922158718109131, 1.5230071544647217, 0.06596430391073227, 1.431375503540039, 0.01489262469112873, 0.05588803067803383, -1.682863712310791, -0.47952064871788025, 0.08488339930772781, ...
func (m *SimulateRequest) GetTx() *Tx { if m != nil { return m.Tx } return nil }
[ 0.3006944954395294, 1.5580987930297852, 0.2572644352912903, 0.8546383380889893, 0.3722051680088043, -0.15864068269729614, -0.0314425528049469, -0.37843888998031616, 0.9462131857872009, -0.932968258857727, -0.006817192770540714, -0.21585628390312195, -0.6014542579650879, -0.5889626741409302...
func NewKeyVaultClient(pl runtime.Pipeline) *KeyVaultClient { client := &KeyVaultClient{ Pl: pl, } return client }
[ 0.938237190246582, -1.1318224668502808, 0.042128149420022964, 0.8532623648643494, -1.6365779638290405, -0.04796481505036354, -0.2866515815258026, -0.4003569781780243, -0.48354339599609375, -0.5694968104362488, -1.3182026147842407, 0.3444380462169647, -0.01832146942615509, -0.74521064758300...
func (client *KeyVaultClient) backupKeyCreateRequest(ctx context.Context, vaultBaseURL string, keyName string, options *KeyVaultClientBackupKeyOptions) (*policy.Request, error) { host := "{vaultBaseUrl}" host = strings.ReplaceAll(host, "{vaultBaseUrl}", vaultBaseURL) urlPath := "/keys/{key-name}/backup" if keyName ...
[ -0.46126842498779297, -0.015854323282837868, 0.6985945105552673, 0.24063317477703094, -0.039876166731119156, -0.11491952836513519, -0.6139360666275024, -0.5494011044502258, -0.41932153701782227, 0.4050480127334595, -0.044401925057172775, 0.35183945298194885, -0.3911342918872833, 0.43273600...
func (client *KeyVaultClient) backupKeyHandleResponse(resp *http.Response) (KeyVaultClientBackupKeyResponse, error) { result := KeyVaultClientBackupKeyResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.BackupKeyResult); err != nil { return KeyVaultClientBackupKeyResponse{}, err } return result, nil }
[ -0.06723721325397491, -1.0598701238632202, 0.21873779594898224, -0.22108477354049683, -0.29701724648475647, -0.35232701897621155, 0.2762658894062042, -0.3852510452270508, 0.6455632448196411, 0.7534863948822021, -1.1873685121536255, -1.059820294380188, -1.2575467824935913, -0.50409287214279...
func (client *KeyVaultClient) createKeyCreateRequest(ctx context.Context, vaultBaseURL string, keyName string, parameters KeyCreateParameters, options *KeyVaultClientCreateKeyOptions) (*policy.Request, error) { host := "{vaultBaseUrl}" host = strings.ReplaceAll(host, "{vaultBaseUrl}", vaultBaseURL) urlPath := "/keys...
[ -0.8502901792526245, -0.42072632908821106, 0.6196302771568298, 0.18894639611244202, -0.17241127789020538, -0.02767832763493061, -0.5600496530532837, -0.6706207990646362, -0.3267800509929657, 0.3667066693305969, 0.05784820392727852, 0.2087527960538864, -0.508785605430603, 0.9827262759208679...
func (client *KeyVaultClient) createKeyHandleResponse(resp *http.Response) (KeyVaultClientCreateKeyResponse, error) { result := KeyVaultClientCreateKeyResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.KeyBundle); err != nil { return KeyVaultClientCreateKeyResponse{}, err } return result, nil }
[ -0.1443193107843399, -1.135037899017334, 0.13069944083690643, -0.0753437951207161, -0.33256614208221436, 0.16613104939460754, 0.3263678252696991, -0.7098053097724915, 0.18350623548030853, 0.44844159483909607, -0.8169182538986206, -1.5038598775863647, -1.3222047090530396, -0.351919263601303...
func (client *KeyVaultClient) decryptCreateRequest(ctx context.Context, vaultBaseURL string, keyName string, keyVersion string, parameters KeyOperationsParameters, options *KeyVaultClientDecryptOptions) (*policy.Request, error) { host := "{vaultBaseUrl}" host = strings.ReplaceAll(host, "{vaultBaseUrl}", vaultBaseURL)...
[ -0.6072250604629517, 0.23586124181747437, 1.0226612091064453, 0.1427743136882782, -0.6400743126869202, -0.33915525674819946, -0.16306695342063904, -0.27602332830429077, -0.6841902136802673, 0.7166603207588196, -0.15547960996627808, 0.2802957594394684, -0.28924834728240967, 0.32336834073066...
func (client *KeyVaultClient) decryptHandleResponse(resp *http.Response) (KeyVaultClientDecryptResponse, error) { result := KeyVaultClientDecryptResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.KeyOperationResult); err != nil { return KeyVaultClientDecryptResponse{}, err } return result, nil }
[ -0.15023264288902283, -0.43188613653182983, 0.3597201406955719, -0.2702777087688446, -0.31387022137641907, -0.4677745997905731, 0.8723393082618713, -0.4983453154563904, 0.2895984947681427, 0.528300940990448, -0.7518715858459473, -1.0858594179153442, -1.119223952293396, -0.7555544972419739,...