text
stringlengths
11
6.3k
embedding
listlengths
768
768
func boring4(msg string, waitForIt chan bool) <-chan Message { // Returns receive-only channel of strings. c := make(chan Message) go func() { // We launch the goroutine from inside the function. for i := 0; ; i++ { c <- Message{fmt.Sprintf("%s: %d", msg, i), waitForIt} time.Sleep(time.Duration(rand.Intn(2e3)...
[ -0.4772425591945648, 0.6044889688491821, 0.5969230532646179, -0.9382694363594055, 0.5264759063720703, 0.11785009503364563, 0.08755877614021301, -0.7652422785758972, -0.9597910642623901, -0.48835504055023193, 0.21178101003170013, 0.21488580107688904, -1.2883026599884033, 0.281533420085907, ...
func boring6(msg string, quit chan bool) <-chan string { // Returns receive-only channel of strings. c := make(chan string) go func() { // We launch the goroutine from inside the function. for i := 0; ; i++ { select { case c <- fmt.Sprintf("%s %d", msg, i): } //time.Sleep(time.Duration(rand.Intn(1e3))...
[ -0.027915215119719505, 1.0143325328826904, 0.4340014159679413, -0.5897013545036316, 0.3383674919605255, -0.2594049274921417, 0.4228534996509552, -1.3167625665664673, -0.00702696992084384, 0.043202195316553116, 0.05008409172296524, 0.8152375817298889, -0.8589568734169006, 0.0957305654883384...
func (a *PullRequestsApiService) GetPullRequestById(ctx context.Context, pullRequestId int32, project string, apiVersion string) (GitPullRequest, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte l...
[ -0.6862993240356445, -0.6905623078346252, 0.5392304062843323, -0.9242054224014282, -0.5201537013053894, -0.36760544776916504, -0.8539859652519226, -0.45634570717811584, -0.2799255847930908, 0.8850526213645935, 0.03437650948762894, 0.8295895457267761, -1.1788887977600098, 0.3725940883159637...
func (a *PullRequestsApiService) Update(ctx context.Context, body GitPullRequest, repositoryId string, pullRequestId int32, project string, apiVersion string) (GitPullRequest, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Patch") localVarPostBody interface{} localVarFileName string ...
[ -0.7743241190910339, -0.9954172968864441, 0.545218825340271, -1.095010757446289, -0.47518274188041687, 0.19009307026863098, -0.6472432017326355, 0.422935426235199, 0.15761250257492065, 0.8991024494171143, 0.1815638691186905, 0.4649898111820221, -1.248331904411316, -0.11118791252374649, -...
func (r *AWSECSTaskDefinition_VolumeFrom) AWSCloudFormationType() string { return "AWS::ECS::TaskDefinition.VolumeFrom" }
[ 1.0792315006256104, 0.002683787839487195, 0.3499440550804138, 0.2917415201663971, 0.29027584195137024, 0.2272702008485794, -0.2511654496192932, 0.10433187335729599, -0.08685813099145889, -0.09855691343545914, 0.09354227036237717, 0.06112838536500931, 0.948944091796875, 0.3462371826171875, ...
func (m Poll) Modes(mode string) FieldRestricter { switch mode { case "A": return m.see case "B": return m.modeB case "D": return m.modeD } return nil }
[ -0.35872507095336914, 0.3054928481578827, 0.4038379192352295, -1.1834231615066528, -0.1392495185136795, 0.620476484298706, -0.6082215309143066, -1.1039656400680542, 0.4472202658653259, -0.03642451763153076, 0.15004359185695648, -1.0802494287490845, -1.0720056295394897, -1.0503933429718018,...
func expandAutoscalingDimension(autoscale v1.ElasticsearchTopologyAutoscalingTF, model *models.TopologySize, size, sizeResource types.String) error { if size.ValueString() != "" { val, err := deploymentsize.ParseGb(size.ValueString()) if err != nil { return err } model.Value = &val if model.Resource == n...
[ 0.10305764526128769, -0.07295949757099152, 0.5037341117858887, -0.505743682384491, -0.785401463508606, 0.2963419556617737, 0.08482782542705536, 0.031759366393089294, -0.04999493807554245, 0.50055330991745, -0.020816553384065628, 0.04789670184254646, 0.31796956062316895, -0.0158716980367898...
func (d *Dog) Says() string { return "Woof" }
[ -0.35791340470314026, -0.24859929084777832, 0.3988000452518463, -1.4533576965332031, 0.0020658308640122414, 0.9337924122810364, -1.043514609336853, -0.7503897547721863, 0.4755561649799347, -0.6029758453369141, 0.18094587326049805, 0.8526740670204163, -0.2030928134918213, 0.9640315175056458...
func (d *Dog) NumberOfLegs() int { return 4 }
[ 0.6032178401947021, 0.9545670747756958, 0.4576347768306732, -0.5274390578269958, -0.20433661341667175, 0.34018674492836, -0.3590752184391022, -0.4354684054851532, -0.5676389336585999, -0.5335595011711121, -0.3657565712928772, -0.44578567147254944, -0.07453617453575134, 0.8768330216407776, ...
func (d *Gorilla) Says() string { return "Ugh" }
[ -1.0106165409088135, 0.08499667793512344, 0.3942836821079254, -1.049049735069275, 0.43389958143234253, 0.7277056574821472, -0.709395170211792, -0.5659691095352173, 0.45452404022216797, -0.44929367303848267, -0.19967372715473175, 0.40164715051651, -0.7162182927131653, 0.9026228785514832, ...
func (d *Gorilla) NumberOfLegs() int { return 2 }
[ -0.07083187252283096, 0.9670975804328918, 0.5483517050743103, -0.06186922267079353, -0.2413467913866043, 0.2955918312072754, 0.2804208993911743, -0.04754549637436867, -0.7816832065582275, -0.47457489371299744, -0.6545613408088684, -0.1436724215745926, 0.030868537724018097, 1.01841604709625...
func NewAPI(client *scw.Client) *API { return &API{ client: client, } }
[ 0.9615089893341064, -0.35752707719802856, -0.10595826059579849, 0.7856253385543823, -1.4065394401550293, 0.48035404086112976, -0.5302373170852661, 0.07422792911529541, -0.11461872607469559, -0.08302420377731323, -0.33921903371810913, 0.3665463626384735, -0.09095785021781921, -0.45749753713...
func (s *API) Regions() []scw.Region { return []scw.Region{scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw} }
[ -0.25364139676094055, -0.28555652499198914, 0.04629402607679367, -0.4035796523094177, 0.23253017663955688, 0.6861565113067627, -0.16345705091953278, -0.028513453900814056, 1.1217560768127441, -1.1303657293319702, -0.17796437442302704, 1.329383373260498, -0.05987548828125, 0.793720245361328...
func (s *API) ListNamespaces(req *ListNamespacesRequest, opts ...scw.RequestOption) (*ListNamespacesResponse, error) { var err error if req.Region == "" { defaultRegion, _ := s.client.GetDefaultRegion() req.Region = defaultRegion } defaultPageSize, exist := s.client.GetDefaultPageSize() if (req.PageSize == n...
[ -0.5148372054100037, 0.34916064143180847, 0.9041972756385803, -0.742929995059967, -0.20483830571174622, -0.10245972871780396, -0.08456674218177795, -1.0175718069076538, 1.1658873558044434, 0.8360527753829956, -0.20849628746509552, 1.1406716108322144, -0.7744205594062805, 0.9984673261642456...
func (s *API) GetNamespace(req *GetNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error) { var err error if req.Region == "" { defaultRegion, _ := s.client.GetDefaultRegion() req.Region = defaultRegion } if fmt.Sprint(req.Region) == "" { return nil, errors.New("field Region cannot be empty in req...
[ -0.735043466091156, 0.4277297854423523, 0.6480627655982971, -0.013613478280603886, 0.6612594723701477, -0.3842034637928009, -0.4556629955768585, -1.1075717210769653, 1.2462540864944458, 0.3045055866241455, 0.14223049581050873, 1.3368380069732666, -1.246702790260315, 0.8463380932807922, 0...
func (s *API) CreateNamespace(req *CreateNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error) { var err error defaultProjectID, exist := s.client.GetDefaultProjectID() if exist && req.OrganizationID == nil && req.ProjectID == nil { req.ProjectID = &defaultProjectID } defaultOrganizationID, exist :=...
[ -0.8004341125488281, 0.21024885773658752, 0.7382412552833557, 0.015672296285629272, 0.6967536807060242, 0.43422001600265503, 0.16292844712734222, -0.7353449463844299, 0.921400249004364, 0.4564005136489868, -0.2733387351036072, 0.6523369550704956, -1.346083402633667, 1.056960940361023, 0....
func (s *API) UpdateNamespace(req *UpdateNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error) { var err error if req.Region == "" { defaultRegion, _ := s.client.GetDefaultRegion() req.Region = defaultRegion } if fmt.Sprint(req.Region) == "" { return nil, errors.New("field Region cannot be empty ...
[ -1.453522801399231, -0.3234712779521942, 0.5972518920898438, -0.49602144956588745, -0.23062442243099213, 0.07511598616838455, -0.30352914333343506, -0.8304337859153748, 1.425864338874817, 0.759212076663971, -0.32270798087120056, 0.9896912574768066, -1.3792064189910889, 0.7366992831230164, ...
func (s *API) DeleteNamespace(req *DeleteNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error) { var err error if req.Region == "" { defaultRegion, _ := s.client.GetDefaultRegion() req.Region = defaultRegion } if fmt.Sprint(req.Region) == "" { return nil, errors.New("field Region cannot be empty ...
[ -0.8599691390991211, -0.02016443759202957, 0.4979401230812073, -0.321143239736557, 0.30553358793258667, -0.2548358142375946, -0.4350283443927765, -0.9851108193397522, 1.4865226745605469, 0.14935137331485748, -0.17008307576179504, 0.970824122428894, -1.0838544368743896, 1.0490353107452393, ...
func (s *API) ListImages(req *ListImagesRequest, opts ...scw.RequestOption) (*ListImagesResponse, error) { var err error if req.Region == "" { defaultRegion, _ := s.client.GetDefaultRegion() req.Region = defaultRegion } defaultPageSize, exist := s.client.GetDefaultPageSize() if (req.PageSize == nil || *req.P...
[ -1.0104687213897705, 0.3581574857234955, 0.7611347436904907, -0.7389405369758606, 0.5573166608810425, -0.7197780013084412, -0.38098564743995667, -0.6260340213775635, 0.7210190892219543, 0.9051153659820557, 0.2656113803386688, 1.0025554895401, -0.5293304920196533, 0.7139074206352234, -0.8...
func (s *API) GetImage(req *GetImageRequest, opts ...scw.RequestOption) (*Image, error) { var err error if req.Region == "" { defaultRegion, _ := s.client.GetDefaultRegion() req.Region = defaultRegion } if fmt.Sprint(req.Region) == "" { return nil, errors.New("field Region cannot be empty in request") } ...
[ -1.0469778776168823, 0.541950523853302, 0.6355203986167908, -0.030943606048822403, 0.9077597260475159, -0.12025073915719986, -0.2924036979675293, -0.32829803228378296, 0.13202403485774994, 0.7465547323226929, 0.72739177942276, 1.0074920654296875, -1.1922457218170166, 0.7440491914749146, ...
func (s *API) UpdateImage(req *UpdateImageRequest, opts ...scw.RequestOption) (*Image, error) { var err error if req.Region == "" { defaultRegion, _ := s.client.GetDefaultRegion() req.Region = defaultRegion } if fmt.Sprint(req.Region) == "" { return nil, errors.New("field Region cannot be empty in request")...
[ -1.548719048500061, -0.3096262216567993, 0.5674651265144348, -0.3742625117301941, 0.027747629210352898, 0.32501375675201416, -0.12940868735313416, -0.012582199648022652, 0.24012377858161926, 1.0581382513046265, 0.33467403054237366, 0.8157561421394348, -1.1571344137191772, 0.720989763736724...
func (s *API) DeleteImage(req *DeleteImageRequest, opts ...scw.RequestOption) (*Image, error) { var err error if req.Region == "" { defaultRegion, _ := s.client.GetDefaultRegion() req.Region = defaultRegion } if fmt.Sprint(req.Region) == "" { return nil, errors.New("field Region cannot be empty in request")...
[ -0.9927061796188354, 0.04512985795736313, 0.5839930176734924, -0.23953740298748016, 0.5290526151657104, 0.04438097029924393, -0.2447589933872223, -0.20031991600990295, 0.12003082782030106, 0.6178693771362305, 0.5273008346557617, 0.7477433085441589, -1.055269718170166, 0.9506826400756836, ...
func (s *API) ListTags(req *ListTagsRequest, opts ...scw.RequestOption) (*ListTagsResponse, error) { var err error if req.Region == "" { defaultRegion, _ := s.client.GetDefaultRegion() req.Region = defaultRegion } defaultPageSize, exist := s.client.GetDefaultPageSize() if (req.PageSize == nil || *req.PageSiz...
[ -0.8004663586616516, 0.28717201948165894, 0.7628033757209778, -0.789877712726593, 0.4578201472759247, -0.8987136483192444, -0.5630090236663818, -0.8800498247146606, 0.3708854615688324, 1.0935051441192627, 0.015432378277182579, 1.2565343379974365, -0.36794769763946533, 1.2683393955230713, ...
func (s *API) GetTag(req *GetTagRequest, opts ...scw.RequestOption) (*Tag, error) { var err error if req.Region == "" { defaultRegion, _ := s.client.GetDefaultRegion() req.Region = defaultRegion } if fmt.Sprint(req.Region) == "" { return nil, errors.New("field Region cannot be empty in request") } if fmt...
[ -0.3039189279079437, 0.2809169292449951, 0.5541185736656189, 0.055490318685770035, 1.2055366039276123, 0.09254467487335205, -0.32841530442237854, -0.47972002625465393, -0.11440092325210571, 0.4250093698501587, 0.13342276215553284, 1.3517193794250488, -0.945349931716919, 0.8308470845222473,...
func (s *API) DeleteTag(req *DeleteTagRequest, opts ...scw.RequestOption) (*Tag, error) { var err error if req.Region == "" { defaultRegion, _ := s.client.GetDefaultRegion() req.Region = defaultRegion } query := url.Values{} parameter.AddToQuery(query, "force", req.Force) if fmt.Sprint(req.Region) == "" { ...
[ -0.3741656541824341, 0.17015962302684784, 0.5337146520614624, -0.30274680256843567, 0.7632817625999451, 0.11993210762739182, -0.100545234978199, -0.35116979479789734, 0.09673989564180374, 0.3507176339626312, -0.05915093794465065, 1.2819035053253174, -0.7028045654296875, 0.9989418983459473,...
func (r *ListNamespacesResponse) UnsafeGetTotalCount() uint32 { return r.TotalCount }
[ 0.6903383731842041, 0.11479726433753967, 0.4349547028541565, -0.5356775522232056, 0.09242932498455048, 0.05795775353908539, -0.20381636917591095, -0.9808324575424194, 1.4048526287078857, -0.27238014340400696, -1.0494742393493652, 0.0832853838801384, -0.2608816921710968, -0.2231252491474151...
func (r *ListNamespacesResponse) UnsafeAppend(res interface{}) (uint32, error) { results, ok := res.(*ListNamespacesResponse) if !ok { return 0, errors.New("%T type cannot be appended to type %T", res, r) } r.Namespaces = append(r.Namespaces, results.Namespaces...) r.TotalCount += uint32(len(results.Namespaces)...
[ -0.2981250286102295, 0.44261178374290466, 0.5435560345649719, -0.29883846640586853, -0.7460002899169922, 0.08054663240909576, -0.3648233711719513, -1.1702244281768799, 1.688597321510315, 0.33372730016708374, -0.9738882780075073, -0.28074201941490173, -0.47607100009918213, 1.122060418128967...
func (r *ListImagesResponse) UnsafeGetTotalCount() uint32 { return r.TotalCount }
[ 0.49220824241638184, -0.053158052265644073, 0.4700813889503479, -0.848601222038269, 0.570529580116272, -0.5206791758537292, 0.2971028983592987, -0.3706057667732239, 0.9748970866203308, -0.04950984567403793, -1.0116904973983765, -0.18930819630622864, 0.022529633715748787, -0.380244076251983...
func (r *ListImagesResponse) UnsafeAppend(res interface{}) (uint32, error) { results, ok := res.(*ListImagesResponse) if !ok { return 0, errors.New("%T type cannot be appended to type %T", res, r) } r.Images = append(r.Images, results.Images...) r.TotalCount += uint32(len(results.Images)) return uint32(len(res...
[ -0.5507445931434631, 0.11573491245508194, 0.5608198642730713, -0.623336911201477, 0.043552886694669724, -0.5559917092323303, 0.001172996824607253, -0.792040228843689, 0.9545993208885193, 0.3973487317562103, -0.8601529598236084, -0.5277603268623352, -0.31919679045677185, 0.852721095085144, ...
func (r *ListTagsResponse) UnsafeGetTotalCount() uint32 { return r.TotalCount }
[ 0.951333224773407, 0.0852556973695755, 0.6088453531265259, -0.6429230570793152, 0.5781830549240112, -0.5850411057472229, -0.43339723348617554, -0.6887496709823608, 0.4610072374343872, -0.16872663795948029, -1.3270100355148315, -0.030950991436839104, -0.07164625823497772, -0.394843548536300...
func (r *ListTagsResponse) UnsafeAppend(res interface{}) (uint32, error) { results, ok := res.(*ListTagsResponse) if !ok { return 0, errors.New("%T type cannot be appended to type %T", res, r) } r.Tags = append(r.Tags, results.Tags...) r.TotalCount += uint32(len(results.Tags)) return uint32(len(results.Tags)),...
[ 0.003254230599850416, 0.44272199273109436, 0.625971257686615, -0.519022524356842, -0.05664568766951561, -0.5884073972702026, -0.6683520078659058, -1.066494345664978, 0.4136943519115448, 0.2935468852519989, -1.287198781967163, -0.22464963793754578, -0.33777400851249695, 0.8891847729682922, ...
func Load(s *sessions.Session) { // Load the DataTables javascripts s.LoadJavaScript(settings.UrlBulldozerResources+"libs/kepler/js/vendors/datatables/jquery.dataTables.min.js", ` $.extend( $.fn.dataTable.defaults, { "searching": true, "ordering": true, "paging": true, "lengthChange": true, "info": true, ...
[ -0.5453959107398987, -0.02932843565940857, 0.8821525573730469, -0.49094533920288086, -0.6194380521774292, -0.4975263774394989, 0.059151746332645416, -0.4449217915534973, 0.19983211159706116, 0.19144243001937866, -1.1575584411621094, 0.43487748503685, 0.37318333983421326, -0.024544466286897...
func (o *ImportEventSourceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewImportEventSourceOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result...
[ -0.07723190635442734, -0.0016999992076307535, 0.6880711317062378, 0.00954297836869955, -0.006260067690163851, -1.1023749113082886, 0.48948314785957336, -0.15285749733448029, 0.8192943930625916, 0.6011989712715149, -0.3064902424812317, -0.6863434910774231, -1.0464258193969727, -0.1956064701...
func NewImportEventSourceOK() *ImportEventSourceOK { return &ImportEventSourceOK{} }
[ 0.3969824016094208, 0.24742448329925537, 0.5186875462532043, 0.24132463335990906, -0.4464506506919861, 0.3071659803390503, 0.9682448506355286, 0.8265188932418823, 0.2261609584093094, 1.6071513891220093, -1.243235468864441, -1.2142021656036377, -0.43572619557380676, 0.11999595165252686, -...
func NewImportEventSourceDefault(code int) *ImportEventSourceDefault { return &ImportEventSourceDefault{ _statusCode: code, } }
[ -0.032233309000730515, 0.8392734527587891, 0.3182514011859894, -0.47756195068359375, 0.29401543736457825, 0.2441481053829193, 0.21431264281272888, 0.3680729568004608, 0.8887758255004883, 0.4460315704345703, -1.9269263744354248, -0.6443140506744385, -1.3752093315124512, -0.07898060977458954...
func (o *ImportEventSourceDefault) Code() int { return o._statusCode }
[ 0.20557978749275208, 0.9576290845870972, 0.40655630826950073, 0.044697340577840805, 0.3376868665218353, -0.036716245114803314, 0.3930821120738983, 1.072409749031067, 0.5819656848907471, 0.0847657173871994, -1.342673659324646, -0.41085124015808105, -0.4036060869693756, 0.13084569573402405, ...
func ClusterInnerMapName(family IPFamily, clusterID uint32) string { return ClusterOuterMapName(family) + "_" + strconv.FormatUint(uint64(clusterID), 10) }
[ -0.9728731513023376, -1.1551071405410767, 0.4841121733188629, -0.7066819667816162, -0.912270724773407, 0.33644524216651917, -0.47244179248809814, -0.15671494603157043, 0.19979006052017212, -0.3244946300983429, 0.48821356892585754, 0.40561431646347046, 0.10385458916425705, -0.67384219169616...
func NewPerClusterNATMaps(ipv4, ipv6 bool) *perClusterNATMaps { return newPerClusterNATMaps(ipv4, ipv6, maxEntries()) }
[ -0.36193332076072693, -0.48057225346565247, 0.27734461426734924, 0.007759033236652613, -0.2643831670284271, -0.32687848806381226, 0.2359081208705902, -0.7979269027709961, -0.40575316548347473, -0.8279732465744019, -0.2673134505748749, -1.29697585105896, -1.2061182260513306, -0.985934436321...
func GetClusterNATMap(clusterID uint32, family IPFamily) (*Map, error) { maps := NewPerClusterNATMaps(family == IPv4, family == IPv6) return maps.getClusterNATMap(clusterID, family) }
[ -0.9996365308761597, -0.031406696885824203, 0.3990258276462555, -0.13296730816364288, -0.13106206059455872, -0.7477741241455078, 0.23816367983818054, -0.540333092212677, -0.36945369839668274, -0.7518635988235474, -0.4277607500553131, -0.08958623558282852, -0.5156620740890503, -0.5066865682...
func CleanupPerClusterNATMaps(ipv4, ipv6 bool) error { maps := NewPerClusterNATMaps(ipv4, ipv6) return maps.cleanup() }
[ -0.1844750940799713, -0.9454867839813232, 0.3824494779109955, 0.037715621292591095, -0.1730927675962448, 0.11868762969970703, 0.38361039757728577, -0.6829749345779419, -0.1489405632019043, -0.5507268309593201, 0.029209494590759277, -1.397818922996521, -0.8959831595420837, -0.23607391119003...
func (g HeadBucketInput) String() string { return helper.Prettify(g) }
[ -0.1621338129043579, -0.8696650266647339, 0.31633850932121277, -0.7043976783752441, -0.9095782041549683, 0.9563190340995789, 0.6870050430297852, -1.9345072507858276, -0.2105361372232437, -0.24768133461475372, -0.3033355176448822, 0.8496720790863037, -0.012995962984859943, -0.48477333784103...
func (d HeadBucketOutput) String() string { return helper.Prettify(d) }
[ 0.3531208038330078, -1.1569960117340088, 0.2137642651796341, -0.8951258063316345, -1.3820053339004517, 0.1620684117078781, 0.38012754917144775, -1.9254916906356812, -0.548137366771698, -0.43680697679519653, 0.11972543597221375, 0.30551886558532715, 0.5512794256210327, -0.42132678627967834,...
func ConnectToServer() net.Conn { var ipAddr string flag.StringVar(&ipAddr, "a", "127.0.0.1", "Specify ip address. Default is localhost") flag.Parse() var ip = fmt.Sprint(ipAddr, ":8642") // Connect to server conn, err := net.Dial("tcp", ip) if err != nil { panic(err) } return conn }
[ -0.8055804371833801, -0.6488083600997925, 0.687146782875061, -0.09683359414339066, 0.04407729580998421, 0.43341168761253357, 0.0947813168168068, 0.06325583159923553, -0.4718131721019745, 0.6268793344497681, -0.3067759871482849, -0.5565071105957031, -0.2296934276819229, 0.030144628137350082...
func sanitizeArtifactName(name string) string { return disallowedArtifactNameChar.ReplaceAllString(name, "-") }
[ 0.5207837224006653, -0.7605488300323486, 0.32674095034599304, -0.35490918159484863, -1.0508023500442505, 0.17802883684635162, -0.10283336788415909, -0.11651641130447388, 0.5324499011039734, 0.4676949977874756, -0.5647996068000793, 0.30597493052482605, 0.051979921758174896, -1.2665027379989...
func WaitUntilSwingStoreExportStarted() error { operationDetails := activeOperation if operationDetails == nil { return nil } // Block until the active operation has started, saving the result. // The operation's goroutine only produces a value in case of an error, // and closes the channel once the export has ...
[ 0.38826268911361694, -0.5035675764083862, 0.6283443570137024, -0.1558019071817398, -0.719219446182251, -0.6019598841667175, 0.6062056422233582, -0.6078450679779053, 0.6425984501838684, -0.42023801803588867, -0.2645621597766876, -0.16402654349803925, -0.39467063546180725, -0.527165055274963...
func WaitUntilSwingStoreExportDone() error { operationDetails := activeOperation if operationDetails == nil { return nil } // Block until the active export has completed. // The export operation's goroutine only produces a value in case of an error, // and closes the channel once the export has completed or fai...
[ 0.5731871128082275, -0.07133942097425461, 0.4823116660118103, 0.1211719885468483, -0.5539405941963196, -0.060862913727760315, 0.5523493885993958, -0.5696046948432922, 0.3060023784637451, -0.061209749430418015, -0.14081744849681854, -0.2000332921743393, -0.4386880099773407, -0.0756703242659...
func checkNotActive() error { operationDetails := activeOperation if operationDetails != nil { select { case <-operationDetails.exportDone: // nil-out any stale operation activeOperation = nil default: if operationDetails.isRestore { return fmt.Errorf("restore operation already in progress for heig...
[ 0.6263599991798401, -0.1716875284910202, 0.5956246852874756, 0.5783458948135376, -0.13608913123607635, -0.2867027223110199, 0.9267435073852539, -0.6743404865264893, -0.15359750390052795, 0.5033063292503357, 0.6381726861000061, -0.18922871351242065, -0.6661475300788879, -0.04020343348383903...
func NewSwingStoreExportsHandler(logger log.Logger, blockingSend func(action vm.Jsonable, mustNotBeInited bool) (string, error)) *SwingStoreExportsHandler { return &SwingStoreExportsHandler{ logger: logger.With("module", fmt.Sprintf("x/%s", types.ModuleName), "submodule", "SwingStoreExportsHandler"), blockin...
[ 0.7427328824996948, -0.07036831229925156, 0.07573898136615753, 0.5064129829406738, -1.156977891921997, 0.2413155436515808, 0.020926961675286293, -1.0996328592300415, 0.017287230119109154, 0.29229626059532166, -0.5081550478935242, -0.0804939866065979, -0.9356015920639038, 0.3974390327930450...
func (exportsHandler SwingStoreExportsHandler) InitiateExport(blockHeight uint64, eventHandler SwingStoreExportEventHandler, exportOptions SwingStoreExportOptions) error { err := checkNotActive() if err != nil { return err } var logger log.Logger if blockHeight != 0 { logger = exportsHandler.logger.With("heig...
[ 0.840663492679596, -0.2271256297826767, 0.8395568132400513, 0.6857064366340637, -0.12692055106163025, -0.6982969045639038, 1.3521121740341187, -0.5701792240142822, 0.25635966658592224, 0.18028834462165833, -0.60307776927948, 0.17361687123775482, -0.5366122722625732, 0.1078556478023529, 0...
func (exportsHandler SwingStoreExportsHandler) retrieveExport(onExportRetrieved func(provider SwingStoreExportProvider) error) (err error) { operationDetails := activeOperation if operationDetails == nil { // shouldn't happen, but return an error if it does return errors.New("no active swing-store export operatio...
[ 0.38085561990737915, -0.1754397451877594, 0.6907146573066711, 0.7353007197380066, -0.7103505730628967, -0.8759286403656006, 0.8729257583618164, -0.334511935710907, 1.0865541696548462, -0.4888383150100708, -0.1665506660938263, 0.054571278393268585, -0.5403990149497986, -0.0884946808218956, ...
func OpenSwingStoreExportDirectory(exportDir string) (SwingStoreExportProvider, error) { rawManifest, err := os.ReadFile(filepath.Join(exportDir, ExportManifestFilename)) if err != nil { return SwingStoreExportProvider{}, err } var manifest exportManifest err = json.Unmarshal(rawManifest, &manifest) if err != ...
[ 0.005370575003325939, -0.5954921841621399, 0.730261504650116, -0.21295014023780823, -1.2699637413024902, -0.41122332215309143, 0.31630510091781616, -0.6880810856819153, 1.090024471282959, -0.109075166285038, 0.43197017908096313, 0.4261897802352905, 0.0011082664132118225, -0.647890090942382...
func (exportsHandler SwingStoreExportsHandler) RestoreExport(provider SwingStoreExportProvider, restoreOptions SwingStoreRestoreOptions) error { err := checkNotActive() if err != nil { return err } blockHeight := provider.BlockHeight // We technically don't need to create an active operation here since both /...
[ 0.6018187403678894, 0.06784609705209732, 0.6929721236228943, 0.6716319918632507, -0.2910846471786499, -0.39443495869636536, 1.1723331212997437, -0.5187475085258484, 0.8466435670852661, -0.04390007629990578, -0.027976980432868004, 0.05742013826966286, -0.5672577619552612, -0.613004088401794...
func WriteSwingStoreExportToDirectory(provider SwingStoreExportProvider, exportDir string) error { manifest := exportManifest{ BlockHeight: provider.BlockHeight, } exportDataReader, err := provider.GetExportDataReader() if err != nil { return err } if exportDataReader != nil { defer exportDataReader.Close...
[ -0.11294340342283249, -0.5328152775764465, 0.7092494964599609, 0.3765319585800171, -0.2313052862882614, -0.18661539256572723, 0.982571542263031, -0.8288373351097107, 0.7493895888328552, 0.167098730802536, -0.2792239785194397, 0.16286447644233704, 0.5344288945198059, -0.2617988586425781, ...
func NewMockLikeRepository(ctrl *gomock.Controller) *MockLikeRepository { mock := &MockLikeRepository{ctrl: ctrl} mock.recorder = &MockLikeRepositoryMockRecorder{mock} return mock }
[ -0.5222970247268677, -0.009074361063539982, 0.32751864194869995, -0.3874565064907074, -0.3969764709472656, 0.029261169955134392, 0.08731086552143097, -0.2804313004016876, 0.3516812324523926, -0.2040938436985016, -0.6740009188652039, 0.0016357970889657736, -0.9643990993499756, 0.66096520423...
func (m *MockLikeRepository) EXPECT() *MockLikeRepositoryMockRecorder { return m.recorder }
[ -0.26295503973960876, 0.3848649263381958, 0.2757614552974701, -0.5699858069419861, 0.10421456396579742, 0.6365748047828674, -0.14233087003231049, -0.012499062344431877, 0.08282501995563507, -0.009244803339242935, 0.3908688724040985, 0.6980213522911072, -1.2272025346755981, 0.64366608858108...
func (m *MockLikeRepository) Create(ctx context.Context, postID int, userReferenceID string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Create", ctx, postID, userReferenceID) ret0, _ := ret[0].(error) return ret0 }
[ -0.016669506207108498, 0.5172221064567566, 0.07513875514268875, 0.4740464687347412, 1.4079371690750122, 1.0007411241531372, 0.5912060141563416, -0.8656449913978577, -0.9756964445114136, 0.1982448846101761, 0.04005113244056702, -0.6099262833595276, -0.6646847128868103, 1.0342055559158325, ...
func (mr *MockLikeRepositoryMockRecorder) Create(ctx, postID, userReferenceID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockLikeRepository)(nil).Create), ctx, postID, userReferenceID) }
[ 0.03248613327741623, 0.8766101598739624, 0.11940840631723404, 0.5033718347549438, 0.3007674515247345, 1.1500900983810425, -0.6712194085121155, -1.682310700416565, 0.021313071250915527, 0.7790512442588806, 0.7397518754005432, 0.04338373616337776, -0.6617892980575562, 1.6911672353744507, 0...
func (m *MockLikeRepository) Delete(ctx context.Context, postID int, userReferenceID string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Delete", ctx, postID, userReferenceID) ret0, _ := ret[0].(error) return ret0 }
[ 0.3187095820903778, 0.477958083152771, 0.44700387120246887, 0.49294620752334595, 1.2405928373336792, 0.6787254810333252, 0.5523882508277893, -0.4251866042613983, 0.07229658216238022, -0.0009224871173501015, 0.20505429804325104, 0.09598499536514282, -0.9680739641189575, 0.7540832161903381, ...
func (mr *MockLikeRepositoryMockRecorder) Delete(ctx, postID, userReferenceID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockLikeRepository)(nil).Delete), ctx, postID, userReferenceID) }
[ 0.2570646107196808, 0.981096088886261, 0.35516512393951416, 0.42851176857948303, 0.19679561257362366, 0.7851550579071045, -0.4508885145187378, -1.301294207572937, 0.9964357018470764, 0.6059635281562805, 0.8616881966590881, 0.7189143896102905, -0.9623311161994934, 1.1940524578094482, 0.04...
func MarshalOrPanic(pb proto.Message) []byte { data, err := proto.Marshal(pb) if err != nil { panic(err) } return data }
[ 0.9640899300575256, 0.2863772511482239, 0.41907840967178345, 0.30384522676467896, -0.5217456817626953, 1.0772504806518555, -0.836564302444458, -0.41133058071136475, 0.34416648745536804, -0.31987589597702026, 0.6437737345695496, 0.5008296966552734, -0.7850757241249084, -0.051577821373939514...
func Solve(s string, part Part) int { ns, err := utils.IntFields(&s) if err != nil { panic("Bad input") } // fmt.Println("Got input") // fmt.Println(ns) seen := map[string]bool{} var foundLoop *Loop cycle := 0 for { lIndex := findLargestIndex(ns) // fmt.Printf("Memory bank with most blocks at index: ...
[ 0.30885061621665955, 0.44497397541999817, 0.9407349824905396, -0.1348096877336502, -1.1450140476226807, -0.24742384254932404, 0.840054452419281, -0.9674367904663086, -0.41788560152053833, 0.39679065346717834, -0.511075496673584, -0.12322068214416504, -1.2172974348068237, 0.3790667057037353...
func SendExampleTask(client *cogman.Session) error { log.Printf("========================================>") task, err := exampleTasks.GetAdditionTask(234, 435, util.TaskPriorityHigh, 3) if err != nil { return err } if err := client.SendTask(*task); err != nil { return err } log.Print("====================...
[ 0.03386550769209862, 0.12937262654304504, 1.0497714281082153, 0.7443546652793884, 0.13817259669303894, -0.15720318257808685, 0.39660078287124634, -0.044697728008031845, -0.13125033676624298, 0.6163607835769653, -1.400187611579895, 0.7290108799934387, 0.5966808199882507, 0.9664697647094727,...
func (c *Client) PatchTransactionPaymentsIDSubmissionsSubmissionIDTasksTaskID() *PatchTransactionPaymentsIDSubmissionsSubmissionIDTasksTaskIDRequest { var () return &PatchTransactionPaymentsIDSubmissionsSubmissionIDTasksTaskIDRequest{ PaymentSubmissionTaskAmendment: models.PaymentSubmissionTaskAmendmentWithDefault...
[ 0.7050430774688721, -0.6580802202224731, 0.2335631251335144, -0.4102656841278076, -1.1607236862182617, 0.759696900844574, -0.34956222772598267, -0.19657666981220245, 0.17245778441429138, 0.4899525046348572, 0.41431674361228943, 0.7432333827018738, 0.7924405932426453, 0.22106416523456573, ...
func (o *PatchTransactionPaymentsIDSubmissionsSubmissionIDTasksTaskIDRequest) WithContext(ctx context.Context) *PatchTransactionPaymentsIDSubmissionsSubmissionIDTasksTaskIDRequest { o.Context = ctx return o }
[ 0.4338590204715729, 0.09425616264343262, 0.479071706533432, -0.11454906314611435, -1.0012733936309814, 0.4148161709308624, -0.7302601933479309, -0.3751513361930847, 0.4513607323169708, 0.24384181201457977, 0.11328942328691483, 0.5767323970794678, 0.555997908115387, -0.047085464000701904, ...
func (o *PatchTransactionPaymentsIDSubmissionsSubmissionIDTasksTaskIDRequest) WithHTTPClient(client *http.Client) *PatchTransactionPaymentsIDSubmissionsSubmissionIDTasksTaskIDRequest { o.HTTPClient = client return o }
[ 0.5809405446052551, -0.3226534128189087, 0.3686194121837616, -0.23821741342544556, -0.8947756290435791, 0.21516373753547668, -0.03837299346923828, -0.30434438586235046, -0.20058859884738922, -0.1676335334777832, 0.18135063350200653, 0.3258730173110962, 1.1471716165542603, -0.18201178312301...
func (o *PatchTransactionPaymentsIDSubmissionsSubmissionIDTasksTaskIDRequest) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error // ISBODYPARAM if o.PaymentSubmissionTaskAmendment != nil { if err := r.SetBodyParam(...
[ -0.2717341184616089, -0.23712074756622314, 0.9037739634513855, -0.5755783915519714, -0.004405294079333544, 0.05881744250655174, 0.5590776801109314, 0.31304502487182617, -0.4865211844444275, 0.29950860142707825, 0.2653578817844391, 0.5410815477371216, 0.3329890966415405, 0.554151177406311, ...
func (c *SSTCPConn) avoidServerFilter(b []byte) (outData []byte) { if c.coldStart && len(b) > 0 { c.ltwMutex.Lock() defer c.ltwMutex.Unlock() if c.leftToWrite == nil { if loc := c.IFilter.FindIndex(b); loc != nil { c.leftToWrite = b[loc[0]:] b = b[:loc[0]] // timeout handler go func() { t...
[ -0.1198558658361435, 0.039793550968170166, 0.8397326469421387, -0.2634445130825043, -0.7961038947105408, 0.24400661885738373, 0.9937331080436707, -0.5601084232330322, 0.126803919672966, 0.6948787569999695, -0.728281557559967, 0.334909051656723, -1.72097647190094, 1.1263563632965088, 0.17...
func NewMocksubnetIDsGetter(ctrl *gomock.Controller) *MocksubnetIDsGetter { mock := &MocksubnetIDsGetter{ctrl: ctrl} mock.recorder = &MocksubnetIDsGetterMockRecorder{mock} return mock }
[ 0.03171253949403763, 0.1643824726343155, -0.09326756745576859, 0.36414262652397156, -0.8992227911949158, 0.09902632236480713, -0.9897030591964722, -0.06043585389852524, -0.08135195821523666, -0.36914756894111633, -0.7112789750099182, 1.0794527530670166, 0.04980519413948059, 0.9221119284629...
func (m *MocksubnetIDsGetter) EXPECT() *MocksubnetIDsGetterMockRecorder { return m.recorder }
[ 0.28679707646369934, 0.5616790056228638, 0.1968311071395874, 0.2404760867357254, -0.08462110906839371, 0.19449469447135925, -0.6643019318580627, 0.35362958908081055, 0.15555477142333984, -0.5769400596618652, 0.33712032437324524, 2.028938055038452, -0.17323368787765503, 0.8605555295944214, ...
func (m *MocksubnetIDsGetter) SubnetIDs(filters ...ec2.Filter) ([]string, error) { m.ctrl.T.Helper() varargs := []interface{}{} for _, a := range filters { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubnetIDs", varargs...) ret0, _ := ret[0].([]string) ret1, _ := ret[1].(error) return ret0, ret1 }
[ 0.3045177757740021, 0.21934516727924347, -0.044874779880046844, -0.23595663905143738, 0.31111881136894226, 0.8314481377601624, 0.23354774713516235, -0.4628201723098755, -0.7395260334014893, -0.2906284034252167, -0.5390035510063171, 0.46934571862220764, -0.7921856045722961, 0.27090111374855...
func (mr *MocksubnetIDsGetterMockRecorder) SubnetIDs(filters ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubnetIDs", reflect.TypeOf((*MocksubnetIDsGetter)(nil).SubnetIDs), filters...) }
[ 0.42361563444137573, 1.2161920070648193, -0.05070826783776283, -0.14182713627815247, -0.28289252519607544, 0.15513524413108826, -1.1044374704360962, -0.8346028327941895, 0.9432443976402283, 0.4830220937728882, 0.18196342885494232, 1.3050477504730225, -0.5029883980751038, 0.5982153415679932...
func NewMockloader(ctrl *gomock.Controller) *Mockloader { mock := &Mockloader{ctrl: ctrl} mock.recorder = &MockloaderMockRecorder{mock} return mock }
[ -0.09985733032226562, 0.16979898512363434, 0.45710620284080505, 0.6447146534919739, 0.08693819493055344, 0.09152574837207794, -0.11097102612257004, -0.8437654972076416, 0.08553934842348099, 0.02371351234614849, -1.0830999612808228, -0.29013165831565857, -0.4224540591239929, 1.7615789175033...
func (m *Mockloader) EXPECT() *MockloaderMockRecorder { return m.recorder }
[ 0.02938069961965084, -0.15685854852199554, 0.4017688035964966, 0.3062400221824646, 0.08326490223407745, 0.37032410502433777, -0.3184759318828583, 0.202994242310524, -0.0645800456404686, -0.30369704961776733, 0.6164995431900024, 0.8302116394042969, -0.8606988191604614, 1.3931200504302979, ...
func (m *Mockloader) load() error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "load") ret0, _ := ret[0].(error) return ret0 }
[ -0.6228232979774475, 0.22186101973056793, 0.22887974977493286, 0.17081092298030853, 0.9716209173202515, 0.4406500458717346, 0.8631051182746887, -0.5738362669944763, -1.222867488861084, 0.061998236924409866, -0.772630512714386, -0.8428946733474731, -1.120812177658081, 0.6717038750648499, ...
func (mr *MockloaderMockRecorder) load() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "load", reflect.TypeOf((*Mockloader)(nil).load)) }
[ -0.27026692032814026, 0.5750069618225098, 0.20127998292446136, 0.09036045521497726, -0.4966404438018799, 0.3706730008125305, -0.0996287390589714, -1.2071911096572876, 0.30909326672554016, 0.37532952427864075, 0.1909649670124054, 0.2374485731124878, -1.3856098651885986, 1.4204660654067993, ...
func isSpace(c byte) bool { return c == space }
[ 1.339444637298584, -0.42587560415267944, 0.173414409160614, 0.7005763649940491, 0.3191341459751129, 0.25892579555511475, -0.10221893340349197, 0.23455609381198883, 1.7354795932769775, 0.24917854368686676, -0.9528387784957886, 0.4367806017398834, -1.0425387620925903, 0.621920645236969, -0...
func isBlank(c byte) bool { return c == underscore }
[ -0.6197981238365173, -0.22594670951366425, 0.46100741624832153, -0.1066468134522438, 0.485510915517807, 0.20899756252765656, -0.572478711605072, -0.797145664691925, 0.6263871192932129, 1.0684808492660522, -1.3415523767471313, 0.47884225845336914, 0.17897985875606537, 0.24623751640319824, ...
func isNumber(c byte) bool { if _, err := asciiToNumber(c); err != nil { return false } return true }
[ 0.05686631426215172, 0.00370533624663949, 0.4569476246833801, 0.6149164438247681, 0.07761813700199127, -0.08302396535873413, -0.013541335240006447, 0.3135274052619934, 0.5662011504173279, -0.06577413529157639, -1.8952913284301758, -0.002064000116661191, -0.5389506220817566, 0.7044616341590...
func asciiToNumber(c byte) (uint8, error) { if c < one || c > nine { return uint8(c), ErrParseInvalidNumber } return uint8(c) - zero, nil }
[ 0.06785496324300766, -0.5360566973686218, 0.3805762827396393, -0.7847734689712524, -0.10861430317163467, -0.2703036963939667, 0.3195435404777527, 0.6137182116508484, 0.3045854866504669, 0.06841201335191727, -1.4275181293487549, 0.08106542378664017, -0.10070336610078812, 0.07814221829175949...
func isEvenNumber(i int) bool { return i%2 == 0 }
[ -1.3946475982666016, 0.05399581417441368, 0.4007810056209564, 0.37214726209640503, -0.06071573868393898, 0.22955919802188873, -0.03707902133464813, 0.2982786297798157, 0.6163935661315918, -0.158866286277771, -1.176772117614746, -0.17491023242473602, -0.0052752806805074215, 0.88542175292968...
func puzzleScanSplit(data []byte, atEOF bool) (advance int, token []byte, err error) { // based on scanlines, we will validate each line at a time advance, token, err = bufio.ScanLines(data, atEOF) if err == nil && token != nil { if len(token) != maxInputRowLength { // line length is incorrect, error err = E...
[ -0.31930777430534363, -0.4974272549152374, 0.7222191691398621, 0.0833674967288971, -0.9861854314804077, 0.2034367471933365, 0.20986604690551758, 0.04499804973602295, 0.20882482826709747, -0.22910189628601074, 0.11715147644281387, -0.4197089374065399, -0.8152856826782227, 0.7297919988632202...
func (c *CephNFSController) upCephNFS(n cephv1.CephNFS, oldActive int) error { if err := validateGanesha(c.context, n); err != nil { return err } logger.Infof("Starting cephNFS %s(%d-%d)", n.Name, oldActive, n.Spec.Server.Active-1) for i := oldActive; i < n.Spec.Server.Active; i++ { name := k8sutil.IndexToN...
[ -0.8416410088539124, -0.8099086880683899, 0.7576274275779724, -0.22321894764900208, 0.14821580052375793, -0.49595439434051514, 0.2089877724647522, -0.019890565425157547, 0.49494460225105286, 1.3244115114212036, -0.06801722198724747, -0.45636358857154846, 0.06029099225997925, 0.569357872009...
func (c *CephNFSController) addRADOSConfigFile(n cephv1.CephNFS, name string) error { nodeID := getNFSNodeID(n, name) config := getGaneshaConfigObject(nodeID) err := c.context.Executor.ExecuteCommand(false, "", "rados", "--pool", n.Spec.RADOS.Pool, "--namespace", n.Spec.RADOS.Namespace, "stat", config) if err == ni...
[ -0.24594317376613617, 0.4097822606563568, 0.610586404800415, -0.5161047577857971, 0.8633913397789001, 0.3893889784812927, -0.6174675226211548, -0.6660163998603821, -0.617072582244873, -0.13566796481609344, -0.4706917107105255, -1.0316171646118164, -0.10702899098396301, 0.8567110896110535, ...
func (c *CephNFSController) downCephNFS(n cephv1.CephNFS, newActive int) error { for i := n.Spec.Server.Active - 1; i >= newActive; i-- { name := k8sutil.IndexToName(i) // Remove from grace db c.removeServerFromDatabase(n, name) // Delete the mds deployment k8sutil.DeleteDeployment(c.context.Clientset, n.N...
[ -0.2771078050136566, -0.525566816329956, 0.6701282262802124, -0.41855713725090027, 0.21596089005470276, -0.4268040657043457, 0.7007396817207336, -0.10058968514204025, 0.3553566634654999, 0.24926698207855225, 0.4314228892326355, -0.20996703207492828, -1.3191124200820923, 0.5039486289024353,...
func (s *_default) RegisterListeners(fn ...func()) { s.listeners = append(s.listeners, fn...) }
[ -0.4081733524799347, 0.9177992939949036, 0.2241443544626236, 0.6083825826644897, 1.5361279249191284, -0.3390599489212036, -1.2087725400924683, -0.21418476104736328, -1.0816518068313599, -1.0957204103469849, -1.1026967763900757, 0.12786081433296204, -0.2348373830318451, -0.054688710719347, ...
func (s *_default) StartListening() (_ error) { for _, before := range s.beforeStart { before() } log.Info("Default subscriber start listening!!") for _, listener := range s.listeners { go listener() } return }
[ 0.6009147763252258, -0.012724422849714756, 0.281685471534729, 0.680897057056427, 1.1767939329147339, -0.10113371908664703, -0.05014170706272125, 0.6738138794898987, -0.8679917454719543, -0.2612955570220947, -0.3106786012649536, 0.7048996090888977, -0.47001126408576965, 0.6476772427558899, ...
func (s *State) AdvanceUpdate(ua UpdateAdvancement) (err error) { w, err := s.LoadWallet(ua.WalletID) if err != nil { return } for i := range w.Sector.ActiveUpdates { if w.Sector.ActiveUpdates[i].Event.UpdateIndex == ua.UpdateIndex { w.Sector.ActiveUpdates[i].Confirmations[ua.SiblingIndex] = true break ...
[ 0.3051856458187103, -1.1136869192123413, 1.0352946519851685, -0.37908628582954407, -0.2098853588104248, 0.27241915464401245, -0.21653224527835846, 0.040115393698215485, 0.8300360441207886, 0.6420853137969971, 0.1658555567264557, -0.2525777518749237, -0.23530973494052887, 0.5034307837486267...
func (su *SectorUpdate) Hash() siacrypto.Hash { fullSet := make([]byte, siacrypto.HashSize*int(QuorumSize)) for i := range su.HashSet { copy(fullSet[i*siacrypto.HashSize:], su.HashSet[i][:]) } return siacrypto.HashBytes(fullSet) }
[ 1.3186694383621216, -0.1346147507429123, 0.45721983909606934, -0.02378660999238491, -0.4476495087146759, 0.14723631739616394, 0.03593328595161438, -0.41247373819351196, 0.42463219165802, -0.1585640162229538, 0.30952197313308716, 0.4733060896396637, -0.5373867750167847, -0.41412317752838135...
func (s *State) InsertSectorUpdate(w *Wallet, su SectorUpdate) (err error) { // Check that the values in the update are legal. if su.Atoms > AtomsPerSector { err = errors.New("Sector allocates too many atoms") return } if su.K > MaxK { err = errors.New("Sector has a K exceeding the Max K") return } if su....
[ 0.03916414827108383, -0.4230668544769287, 0.6830719709396362, -0.44304031133651733, -0.22795158624649048, 0.20224756002426147, -0.010735929012298584, 0.4715210795402527, 0.5653020739555359, 0.358517587184906, -0.2611963152885437, -0.29087692499160767, -0.6339236497879028, -0.37091368436813...
func (a *DisconnectAdvice) JSONString() (string, error) { a.mu.RLock() if a.jsonified != "" { a.mu.RUnlock() return a.jsonified, nil } a.mu.RUnlock() a.mu.Lock() defer a.mu.Unlock() b, err := json.Marshal(a) if err != nil { return "", err } a.jsonified = string(b) return a.jsonified, nil }
[ -1.094299554824829, -0.15710392594337463, 0.4265281856060028, -0.685827374458313, -0.8211733102798462, -0.5056206583976746, -0.113296739757061, -1.1883207559585571, 0.8479342460632324, 0.34473827481269836, 0.6638900637626648, 0.2959119379520416, -0.4100801944732666, -0.12838783860206604, ...
func Repeat(s string, count int) string { // TODO: handle when count < 0 var repeated string for i := 0; i < count; i++ { repeated += s } return repeated }
[ 0.16194745898246765, -0.3199557662010193, 0.4367227554321289, 0.09408769756555557, -0.5480977296829224, 0.1539979875087738, -0.0022194739431142807, -0.4333055317401886, -0.5935086011886597, -0.06509330123662949, -0.026492301374673843, -0.11380698531866074, -0.16421428322792053, -1.19026494...
func (c CallCode) String() string { return "+" + strconv.FormatInt(int64(c), 10) }
[ 0.2562144100666046, 0.30761826038360596, 0.5429977178573608, -0.8945668339729309, -0.3910229504108429, 0.7753429412841797, 0.06424839049577713, -0.4537103474140167, 0.5592188835144043, 0.016744831576943398, 0.38932254910469055, 0.3818592131137848, 0.18562109768390656, 0.6610062718391418, ...
func (c CallCode) Type() string { return TypeCallCode }
[ -0.19668184220790863, 0.2954743504524231, 0.3309287428855896, 0.166513592004776, 0.21593692898750305, 0.9901890158653259, 0.24192050099372864, -1.2559458017349243, 0.7236919403076172, 0.31884539127349854, 0.25860536098480225, 0.6918429136276245, -0.8536699414253235, 1.0683938264846802, 1...
func TotalCallCodes() int { return 263 }
[ -0.07960917055606842, 0.03881549462676048, 0.5411423444747925, -0.35101059079170227, 0.07931002229452133, -0.007615584880113602, 0.05031457543373108, -0.39195576310157776, 1.334336280822754, 0.30990520119667053, -0.7046880125999451, -0.9093754291534424, -0.5963560938835144, 0.0228906702250...
func AllCallCodes() []CallCode { return []CallCode{ CallCodeUnknown, CallCode1, CallCode7, CallCode20, CallCode27, CallCode30, CallCode31, CallCode32, CallCode33, CallCode34, CallCode36, CallCode38, CallCode39, CallCode40, CallCode41, CallCode43, CallCode44, CallCode45, CallCode46...
[ -0.11101414263248444, -0.3756711781024933, 0.9904608726501465, 0.7214149236679077, -0.615813136100769, -0.23914015293121338, 0.11251707375049591, -0.14695151150226593, 0.5565758347511292, -0.3932286500930786, -0.488635778427124, -0.05424511060118675, -0.7991770505905151, 0.6061568856239319...
func AllCallCodesInfo() []*CallCodeInfo { all := AllCallCodes() codes := make([]*CallCodeInfo, 0, len(all)) for _, v := range all { codes = append(codes, v.Info()) } return codes }
[ 0.3504800796508789, -0.45334771275520325, 0.4383212625980377, 0.25041213631629944, -0.4905434250831604, 0.05034126713871956, -1.1770380735397339, -0.5594391226768494, 0.07210507988929749, -0.26452744007110596, -0.5664030313491821, -0.0784684494137764, -0.2326883226633072, 1.517956733703613...
func (c CallCode) Countries() []CountryCode { //nolint:gocyclo switch c { case CallCode1: return []CountryCode{ATF, CAN, UMI, USA} case CallCode1808: return []CountryCode{USA} case CallCode1242: return []CountryCode{BHS} case CallCode1246: return []CountryCode{BRB} case CallCode1264: return []CountryCod...
[ -0.3833148181438446, 0.18253576755523682, 0.6491045355796814, 0.1750660538673401, -0.6533384323120117, 0.6793021559715271, -0.05085522308945656, -0.38375750184059143, 0.7394192814826965, -0.23957592248916626, 0.20357513427734375, 0.6699703931808472, -0.43283477425575256, 1.0043270587921143...
func (c CallCode) IsValid() bool { return c.Countries()[0] != Unknown }
[ 0.2280515730381012, 0.08356276899576187, 0.42874398827552795, 0.2058698534965515, 0.4263317286968231, 1.2627160549163818, -0.8528107404708862, -0.10576014220714569, 0.8774689435958862, -0.5653862953186035, 0.19905276596546173, 0.6137866377830505, -0.6869809627532959, 0.47614747285842896, ...
func (c *CallCodeInfo) Type() string { return TypeCallCodeInfo }
[ 0.025807689875364304, -0.18836115300655365, 0.37367045879364014, 0.07914900779724121, 0.08937259763479233, 0.9350354075431824, -0.06900453567504883, -1.5472127199172974, 0.022569123655557632, -0.241178959608078, 0.07012789696455002, 0.15476062893867493, -0.9312410354614258, 0.8659557104110...
func (p *ResourcePool) Available() reflow.Resources { p.mu.Lock() defer p.mu.Unlock() var reserved reflow.Resources for _, alloc := range p.allocs { if !AllocExpired(alloc) { reserved.Add(reserved, alloc.Resources()) } } var avail reflow.Resources avail.Sub(p.resources, reserved) return avail }
[ -0.3553715646266937, -0.44903454184532166, 0.5671615600585938, -0.1594492644071579, -0.2883426249027252, 0.8822022676467896, -0.07769330590963364, 0.23005148768424988, 0.6211956739425659, 1.3636105060577393, 0.7310503721237183, -0.0646873489022255, -0.48129358887672424, 0.3094882369041443,...