text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (hp *hdfsProvider) ListObjects(bck *meta.Bck, msg *apc.LsoMsg, lst *cmn.LsoResult) (int, error) { var ( h = cmn.BackendHelpers.HDFS idx int ) msg.PageSize = calcPageSize(msg.PageSize, hp.MaxPageSize()) err := hp.c.Walk(bck.Props.Extra.HDFS.RefDirectory, func(path string, fi os.FileInfo, err error) error...
[ 0.10930868983268738, -0.46882688999176025, 0.911063551902771, -0.5851650238037109, 0.22906623780727386, -0.7931138277053833, 0.32303929328918457, -0.12245155870914459, 0.40380021929740906, -0.37416645884513855, 0.10840730369091034, 0.29490745067596436, -0.4337644875049591, 0.48604935407638...
func skipDir(fi os.FileInfo) error { if fi.IsDir() { return filepath.SkipDir } return nil }
[ 0.08553200215101242, 0.08354535698890686, 0.37060487270355225, 0.8861097097396851, -0.5312305092811584, 1.22394859790802, 1.226090908050537, 0.18224485218524933, -0.3999883532524109, -1.1353408098220825, 0.8427079319953918, -0.7838728427886963, 0.13556146621704102, 1.1799923181533813, -0...
func (*hdfsProvider) ListBuckets(cmn.QueryBcks) (buckets cmn.Bcks, errCode int, err error) { debug.Assert(false) return }
[ -0.024577099829912186, 0.07104866951704025, 0.3375434875488281, 0.29904690384864807, 0.6667683124542236, -0.1749073714017868, 0.02958107553422451, -0.6992277503013611, 0.5839341878890991, -0.6080302000045776, 0.08771109580993652, -0.06598012149333954, -1.2398688793182373, -0.24443186819553...
func (hp *hdfsProvider) HeadObj(_ ctx, lom *cluster.LOM) (oa *cmn.ObjAttrs, errCode int, err error) { var ( fr *hdfs.FileReader filePath = filepath.Join(lom.Bck().Props.Extra.HDFS.RefDirectory, lom.ObjName) ) if fr, err = hp.c.Open(filePath); err != nil { errCode, err = hdfsErrorToAISError(err) return ...
[ -0.2591302692890167, -1.0540006160736084, 0.5823865532875061, -0.5081671476364136, -0.20455831289291382, 0.1638612449169159, 0.887792706489563, -0.23659123480319977, 0.3983461558818817, -0.2696826756000519, 0.42658594250679016, 0.3543034791946411, 0.06310788542032242, -0.32344621419906616,...
func (hp *hdfsProvider) GetObj(ctx context.Context, lom *cluster.LOM, owt cmn.OWT) (errCode int, err error) { reader, _, errCode, err := hp.GetObjReader(ctx, lom) if err != nil { return errCode, err } params := cluster.AllocPutObjParams() { params.WorkTag = fs.WorkfileColdget params.Reader = reader params....
[ -0.3759598433971405, 0.016130050644278526, 0.6694851517677307, -0.046042121946811676, 0.2954535484313965, 0.551105260848999, 1.0913105010986328, -0.22914622724056244, -0.22587312757968903, -0.5540522933006287, 0.3500204086303711, 0.4428881108760834, -0.143238827586174, -0.33795949816703796...
func (hp *hdfsProvider) GetObjReader(ctx context.Context, lom *cluster.LOM) (r io.ReadCloser, expectedCksm *cos.Cksum, errCode int, err error) { filePath := filepath.Join(lom.Bck().Props.Extra.HDFS.RefDirectory, lom.ObjName) fr, err := hp.c.Open(filePath) if err != nil { errCode, err = hdfsErrorToAISError(err) ...
[ 0.08764650672674179, -0.44622617959976196, 0.7539408802986145, -0.13581813871860504, -0.3116151690483093, 0.3986199200153351, 0.5368756055831909, 0.18579187989234924, 0.11243625730276108, -0.7822058200836182, 0.7329943776130676, 0.7246723175048828, -0.18115609884262085, 0.2141360640525818,...
func (hp *hdfsProvider) PutObj(r io.ReadCloser, lom *cluster.LOM) (errCode int, err error) { filePath := filepath.Join(lom.Bck().Props.Extra.HDFS.RefDirectory, lom.ObjName) fw, err := hp.c.Create(filePath) if err != nil { if !os.IsNotExist(err) { goto finish } // Create any missing directories. if err = ...
[ -0.13929890096187592, -0.0439673513174057, 0.9356259703636169, -0.05849042162299156, 0.07916752249002457, 0.44467148184776306, 1.5633734464645386, -0.1577574759721756, -0.0833512395620346, -0.04098381847143173, 0.2674039304256439, -0.05405959114432335, -0.3902827799320221, -0.0332839712500...
func (hp *hdfsProvider) DeleteObj(lom *cluster.LOM) (errCode int, err error) { filePath := filepath.Join(lom.Bck().Props.Extra.HDFS.RefDirectory, lom.ObjName) if err := hp.c.Remove(filePath); err != nil { errCode, err = hdfsErrorToAISError(err) return errCode, err } if verbose { nlog.Infof("[delete_object] %s...
[ 0.4701716899871826, -0.6223596334457397, 0.6390522718429565, -0.02189800515770912, 0.25654280185699463, 0.4065946936607361, 1.2733455896377563, 0.4497113525867462, 0.20240172743797302, -0.7835319638252258, 0.7131554484367371, 0.14315006136894226, -0.15672056376934052, 0.30621933937072754, ...
func pgPartitionedDml(w io.Writer, db string) error { // db := "projects/my-project/instances/my-instance/databases/my-database" ctx := context.Background() client, err := spanner.NewClient(ctx, db) if err != nil { return err } defer client.Close() // Spanner PostgreSQL has the same transaction limits as norm...
[ 0.016857538372278214, 0.24815112352371216, 0.8601022958755493, -0.6225138306617737, -0.30506405234336853, 0.7319110631942749, 0.5090124011039734, -0.07471908628940582, -0.5874972939491272, -0.22098985314369202, 0.29606977105140686, -0.7105064392089844, -0.846505880355835, -0.04051940888166...
func TestPostIndexRequestUnmarshalJSON(t *testing.T) { tests := []struct { json string expected postIndexRequest err string }{ {json: `{"options": {}}`, expected: postIndexRequest{Options: IndexOptions{}}}, {json: `{"options": 4}`, err: "options is not map[string]interface{}"}, {json: `{"option":...
[ -1.0699163675308228, -0.21487149596214294, 0.8846295475959778, -0.6329507827758789, 0.14774943888187408, 0.3121062219142914, 0.7077464461326599, -0.7145181894302368, -0.14850670099258423, -0.26327428221702576, -0.3482449948787689, 0.0054242308251559734, -0.4821512997150421, -0.658440411090...
func TestPostFrameRequestUnmarshalJSON(t *testing.T) { tests := []struct { json string expected postFrameRequest err string }{ {json: `{"options": {}}`, expected: postFrameRequest{Options: FrameOptions{}}}, {json: `{"options": 4}`, err: "options is not map[string]interface{}"}, {json: `{"option":...
[ -0.9639586210250854, 0.3435620069503784, 1.26954185962677, -0.23381750285625458, 0.11834389716386795, 0.21562092006206512, 0.24058961868286133, -0.8124005794525146, 0.08174051344394684, 0.1636868119239807, -0.42542290687561035, -0.1608697474002838, -0.3866278827190399, 0.03175576403737068,...
func ReadPresetJSON() (res string, err error) { efPath, _ := os.Executable() dir := filepath.Dir(efPath) json := filepath.Join(dir, "preset.json") b, err := ioutil.ReadFile(json) if err != nil { return } res = string(b) return }
[ -0.4333043694496155, -0.3166249394416809, 0.8386063575744629, -1.009514331817627, -0.43630707263946533, 0.12647129595279694, 0.7080775499343872, -0.4916746914386749, -0.5932298898696899, 0.8213781714439392, 0.01462610810995102, 0.848940908908844, 0.18694081902503967, -0.410776823759079, ...
func ParsePresetJSON(str string) (res Preset, err error) { var c Preset err = jsonc.Unmarshal([]byte(str), &c) if err != nil { return } res = c return }
[ -0.19441063702106476, -0.32377877831459045, 0.4075196385383606, -1.0095181465148926, -1.482238531112671, -0.597316324710846, 0.6238102912902832, -0.8510284423828125, 0.09772085398435593, 0.4462330639362335, -0.32324421405792236, 0.4996483325958252, -0.3726661205291748, -0.6536272764205933,...
func ReadParsePreset() (conf Preset, err error) { json, err := ReadPresetJSON() if err != nil { return } conf, err = ParsePresetJSON(json) return }
[ -0.3169598877429962, -0.3202629089355469, 0.6424432396888733, -0.5409303307533264, -0.8190264105796814, -0.7325594425201416, -0.21326224505901337, -0.30547720193862915, -0.5839825868606567, 0.104568250477314, -0.09182810038328171, 0.6917310953140259, 0.0293736532330513, -0.5518795251846313...
func (c *Cmds) Compile() { var cmp compiler cmp.compile(c.parseTree) c.prog = cmp.prog() return }
[ 0.9876192808151245, -1.1181881427764893, 0.2163279801607132, -0.19829967617988586, 0.8033316135406494, -0.09152945876121521, -0.1947731226682663, -0.016470283269882202, -0.721952497959137, -1.3541295528411865, 0.3777066469192505, 0.5710214972496033, -0.017717860639095306, 1.112487316131591...
func (c *Cmds) TraceExecutionTo(w io.Writer) { c.trace = w }
[ 0.34885212779045105, -0.07990676164627075, 0.22911758720874786, -0.4716984033584595, 1.2541595697402954, 0.12331564724445343, 2.063903331756592, -0.5349501371383667, -0.15104596316814423, -0.4416966140270233, -0.3897412419319153, 0.3720158338546753, 0.796391487121582, 0.08441274613142014, ...
func DropDisabledFields(resSpec *api.ResourceQuotaSpec, oldResSpec *api.ResourceQuotaSpec) { if !utilfeature.DefaultFeatureGate.Enabled(features.ResourceQuotaScopeSelectors) && !resourceQuotaScopeSelectorInUse(oldResSpec) { resSpec.ScopeSelector = nil } }
[ -0.06596063822507858, 0.11475596576929092, 0.3856637477874756, -0.5027517080307007, 0.5884541869163513, 0.5595886707305908, 0.17661963403224945, 0.10596507787704468, 0.42201852798461914, 0.8093283176422119, -0.11566425859928131, -0.1384975016117096, -0.7636012434959412, -0.1075590923428535...
func NewValidateDesignOK() *ValidateDesignOK { return &ValidateDesignOK{} }
[ 0.088991679251194, -0.1970157027244568, 0.051093749701976776, 1.2824348211288452, -0.8153532147407532, -0.0014309713151305914, 0.7824051976203918, 0.519108235836029, 0.41145560145378113, -0.966443657875061, -1.288582444190979, -0.37399181723594666, 1.2121766805648804, 0.39140281081199646, ...
func (o *ValidateDesignOK) WithPayload(payload string) *ValidateDesignOK { o.Payload = payload return o }
[ 0.5272169709205627, 0.47483205795288086, -0.10975689440965652, 0.6359942555427551, -0.671367347240448, 0.03648243844509125, -0.27517810463905334, -0.20672985911369324, 0.7246416807174683, -0.813058614730835, -0.40903225541114807, -1.0993748903274536, 1.2563481330871582, 0.12173034250736237...
func (o *ValidateDesignOK) SetPayload(payload string) { o.Payload = payload }
[ 0.21681034564971924, 0.7311545014381409, -0.03348755091428757, 0.7681617736816406, -0.3363209068775177, 0.39537960290908813, -0.3280666172504425, -0.13069309294223785, 0.669388473033905, -0.8112578392028809, -0.5953763127326965, -1.119178295135498, 0.3038742244243622, 0.47095760703086853, ...
func (o *ValidateDesignOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.WriteHeader(200) payload := o.Payload if err := producer.Produce(rw, payload); err != nil { panic(err) // let the recovery middleware deal with this } }
[ -0.5006198287010193, 0.07821306586265564, 0.15055355429649353, 0.7769315242767334, 0.72246915102005, -0.4057701826095581, 0.1475350260734558, -0.009442141279578209, 0.7008287906646729, -0.05361763760447502, -0.17256151139736176, -0.8822202682495117, -0.017609255388379097, -0.12720215320587...
func NewValidateDesignUnauthorized() *ValidateDesignUnauthorized { return &ValidateDesignUnauthorized{} }
[ -0.42143481969833374, 0.1003439798951149, 0.0554913766682148, 1.1977237462997437, -1.1248340606689453, -0.32466989755630493, 0.05417032167315483, 0.43097570538520813, 0.8075615167617798, -1.7536168098449707, -0.5217348337173462, 0.899598240852356, 1.0539900064468384, -0.3769078850746155, ...
func (o *ValidateDesignUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses rw.WriteHeader(401) }
[ -0.8594122529029846, -0.27069804072380066, 0.24213850498199463, 0.785969078540802, 0.536056399345398, -0.3479290008544922, 0.44494062662124634, 0.22261996567249298, 0.5879086852073669, -0.6546332240104675, -0.12234272062778473, 0.05064978450536728, -0.28604984283447266, -0.3055006861686706...
func NewValidateDesignForbidden() *ValidateDesignForbidden { return &ValidateDesignForbidden{} }
[ 0.6324194073677063, 0.37242889404296875, -0.036642350256443024, 1.1936973333358765, -1.0514200925827026, 0.39193612337112427, 0.4286494851112366, -0.7374410629272461, 0.3195483982563019, -1.4513026475906372, -0.37323373556137085, 0.416659414768219, 0.7104468941688538, -0.19476161897182465,...
func (o *ValidateDesignForbidden) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses rw.WriteHeader(403) }
[ -0.2881312370300293, -0.07063373923301697, 0.2570992708206177, 0.5424245595932007, 0.5925560593605042, -0.027749517932534218, 0.6261903047561646, -0.8822782635688782, 0.4506760239601135, -0.5923694968223572, 0.34249934554100037, -0.005989931523799896, -0.6737933158874512, -0.30199909210205...
func (o *ValidateDesignInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses rw.WriteHeader(500) }
[ -0.9651415944099426, -0.5641713738441467, 0.14413733780384064, 0.4748356342315674, 0.5792251229286194, -0.38364458084106445, 0.716293215751648, -0.41329532861709595, 0.4655399024486542, -0.4810754358768463, 0.2841620147228241, 0.02131699025630951, -1.006370186805725, 0.35295557975769043, ...
func NewTLSConfig() *tls.Config { return &tls.Config{ InsecureSkipVerify: false, MinVersion: tls.VersionTLS12, } }
[ 0.9770464897155762, 0.4626215100288391, 0.22688749432563782, -0.7208210825920105, -1.6650335788726807, 0.6992044448852539, -1.4879567623138428, 0.04186917096376419, -0.0854884535074234, 0.5989494323730469, -1.2114579677581787, 0.23145318031311035, 0.11473485827445984, 0.6239494681358337, ...
func NewServerTLSConfig(certFile, keyFile string) (*tls.Config, error) { tlsCert, err := tls.LoadX509KeyPair(certFile, keyFile) if err != nil { return nil, fmt.Errorf("failed to load keypair: %s", err) } tlsConfig := NewTLSConfig() tlsConfig.Certificates = []tls.Certificate{tlsCert} return tlsConfig, nil }
[ 0.827244222164154, 0.05793432891368866, 0.44016119837760925, -0.38658884167671204, -1.3615586757659912, -0.09380114078521729, -0.9227997660636902, 0.5447550415992737, -1.064713478088379, 1.3861892223358154, -1.5127439498901367, -0.10444141179323196, -0.27950918674468994, 0.8322746157646179...
func WithCipherSuites(ciphers []string) ConfigOption { return func(c *tls.Config) { var configuredCiphers []uint16 for _, c := range ciphers { cipher, ok := cipherMap[c] if !ok { continue } configuredCiphers = append(configuredCiphers, cipher) } c.CipherSuites = configuredCiphers if len(c.Cip...
[ 0.28594693541526794, -0.24911344051361084, 0.5436843633651733, 0.0753096491098404, -0.905698299407959, 0.5316440463066101, 0.3879103660583496, -0.1908227801322937, 1.3737967014312744, 0.8040992021560669, -0.6072297096252441, -0.559436559677124, -0.776618242263794, 0.4604925513267517, -0....
func NewClientMutualTLSConfig( certFile string, keyFile string, caCertFile string, serverName string, ) (*tls.Config, error) { return newMutualTLSConfig( certFile, keyFile, caCertFile, serverName, true, ) }
[ 0.11507251113653183, -0.07986125349998474, 0.25156834721565247, 0.200001522898674, -2.357983112335205, 0.3676275610923767, -0.6736865043640137, 0.8391264081001282, -1.4535008668899536, 0.3965023159980774, -0.991876482963562, 0.2018907219171524, 0.5912177562713623, 0.9914087057113647, 0.1...
func NewServerMutualTLSConfig( certFile string, keyFile string, caCertFile string, opts ...ConfigOption, ) (*tls.Config, error) { tlsConfig, err := newMutualTLSConfig( certFile, keyFile, caCertFile, "", false, ) if err != nil { return nil, err } tlsConfig.CipherSuites = defaultServerCipherSuites ...
[ -0.0857834666967392, 0.05404555797576904, 0.4888749420642853, 0.7067777514457703, -1.7029685974121094, 0.2934405207633972, -0.2955884635448456, 0.9516961574554443, -0.6859831809997559, 1.0808640718460083, -1.0627379417419434, 0.3749968707561493, -0.030799148604273796, 1.394595980644226, ...
func NewClientCredentials( certFile string, keyFile string, caCertFile string, serverName string, ) (credentials.TransportCredentials, error) { tlsConfig, err := NewClientMutualTLSConfig( certFile, keyFile, caCertFile, serverName, ) if err != nil { return nil, err } return credentials.NewTLS(tlsConf...
[ 0.3597101867198944, -0.5046376585960388, 0.17618034780025482, 0.3746539056301117, -1.6528249979019165, 0.25672459602355957, 0.0032190692145377398, 0.0062501137144863605, -1.2495657205581665, 0.553269624710083, -0.9492738246917725, 0.10808739811182022, -0.4746638238430023, 0.161854058504104...
func NewServerCredentials( certFile string, keyFile string, caCertFile string, opts ...ConfigOption, ) (credentials.TransportCredentials, error) { tlsConfig, err := NewServerMutualTLSConfig( certFile, keyFile, caCertFile, opts..., ) if err != nil { return nil, err } return credentials.NewTLS(tlsConf...
[ 0.12716947495937347, -0.2903349697589874, 0.31383833289146423, 1.4084655046463013, -1.3862862586975098, 0.4521138668060303, -0.11981968581676483, 0.8199437260627747, -0.9708856344223022, 1.1517460346221924, -1.4437501430511475, 0.5149561166763306, -0.748606264591217, 0.9078711867332458, ...
func NewOnboarder( keptnHandler Handler, namespaceManager namespacemanager.INamespaceManager, chartStorer types.IChartStorer, chartGenerator helm.ChartGenerator, chartPackager types.IChartPackager) Onboarder { return &onboarder{ Handler: keptnHandler, namespaceManager: namespaceManager, chartStore...
[ 0.253667950630188, -0.4377169907093048, 0.4775743782520294, 0.0794685110449791, -1.8137321472167969, -0.1826496571302414, -0.07501672953367233, -0.6573563814163208, -0.5457705855369568, -1.0438942909240723, -0.45045480132102966, -0.013021375983953476, -0.4680459797382355, 1.915220499038696...
func (o *onboarder) OnboardGeneratedChart(helmManifest string, event keptnv2.EventData, strategy keptnevents.DeploymentStrategy) (*chart.Chart, error) { helmChartName := helm.GetChartName(event.Service, true) var generatedChart *chart.Chart var err error if strategy == keptnevents.Duplicate { o.getKeptnHandler...
[ 0.2906838357448578, -0.0422869436442852, 1.035718560218811, -0.1792571246623993, -0.6151476502418518, 0.45760178565979004, 0.13534609973430634, -0.8036622405052185, 0.35529202222824097, -0.07620751112699509, 0.38529878854751587, 0.8101314306259155, 0.5033361911773682, 1.266921877861023, ...
func numberOfSubstrings(s string) int { // calculate number of sub strings don't contain all a, b, c. // First kind are those with length less than 3. // Second kind is counted using 2 runners. i, j, n := 0, 0, len(s) mask := 0 invalids := n + (n - 1) // sub strings of 1 and 2 chars var lastSeen [3]int for ; j ...
[ 0.777984619140625, 0.5394688248634338, 0.5993618965148926, -0.03123699314892292, -1.0450053215026855, -0.06463457643985748, 1.6154372692108154, -0.27131661772727966, 0.6985372304916382, 0.032250575721263885, -0.6717875599861145, 0.3793507516384125, 0.1981690675020218, -0.6021575927734375, ...
func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []interface{...
[ 0.14725250005722046, 0.6910733580589294, 0.5809780955314636, -0.29196903109550476, 0.33346015214920044, -0.7090944051742554, 0.6415702700614929, -0.8463073968887329, 0.4296681880950928, -0.034080762416124344, -0.6116713881492615, -0.2798752188682556, -0.060984861105680466, 0.64111709594726...
func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []interface{}{ (*TwoOneofs...
[ -0.6714969873428345, 0.5454462766647339, 0.5878053903579712, -0.33890053629875183, 0.33999574184417725, -0.9253897070884705, 0.4917853772640228, -1.3624643087387085, -0.06193600967526436, -0.5950415730476379, -0.7740949988365173, -0.17312370240688324, -0.10449805110692978, 0.61827558279037...
func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []interface{}{ (*C...
[ -0.2514408528804779, 0.2750444710254669, 0.48125502467155457, -0.602553129196167, 0.08490854501724243, -1.288568377494812, 0.6319022178649902, -1.1286993026733398, 0.4793354272842407, -0.45915424823760986, -0.539746880531311, 0.2894108295440674, -0.5022891163825989, 0.6172148585319519, 0...
func NewService(args []string, p person.Service, ns serializer.Serializer) error { cli := service{args, p, ns} if err := cli.checkArgs(); err != nil { return err } if err := cli.runArgs(); err != nil { return err } return nil }
[ 0.043577566742897034, 0.07361089438199997, 0.5139012932777405, 0.7047840356826782, -0.21431532502174377, 0.16858260333538055, -0.46415773034095764, -0.32433781027793884, -0.4723677933216095, -0.13653627038002014, 0.19502875208854675, 0.744217038154602, -0.4065558910369873, 0.93723469972610...
func (s service) checkArgs() error { if len(s.args) < 1 { return errors.New("no file added as a command line argument") } if s.args[0] == "" { return errors.New("filename cannot be empty") } return nil }
[ 0.24141274392604828, 0.4319547712802887, 0.5454252362251282, -0.0219490434974432, 1.0549942255020142, 0.3001846671104431, -0.3044196665287018, 0.45419004559516907, -0.80796217918396, 0.7016116976737976, 1.0892198085784912, 0.7561883926391602, -0.9424727559089661, 1.3881698846817017, -0.1...
func (s service) runArgs() error { // only arg at the moment is to read in the file // In the future make this a switch statement, parse flags and then call the other functions as required. // container for storing the names after scans names := []person.Names{} filename := "./sorted-names-list.txt" // open the...
[ -0.5135239958763123, -0.20692653954029083, 0.6372286081314087, -0.3341645896434784, -0.19453288614749908, 0.791111171245575, 0.17339755594730377, 0.2654859721660614, -1.1399911642074585, -0.36396417021751404, 0.5969673991203308, 0.736145555973053, -0.5858186483383179, 1.309166431427002, ...
func (s service) openFile(names *[]person.Names) error { f, err := os.Open(s.args[0]) if err != nil { return errors.New("error opening the file") } defer f.Close() // Read in line by line scanner := bufio.NewScanner(f) scanner.Split(bufio.ScanLines) for scanner.Scan() { // send to get decoded p := &pers...
[ -0.863353431224823, -0.0680147111415863, 0.6105515956878662, -0.6054064631462097, -0.09774745255708694, 0.15630999207496643, -0.438935786485672, 0.8300169110298157, -1.1240229606628418, -0.6838438510894775, 0.035084545612335205, -0.05749228969216347, -0.7727736234664917, 0.3008472323417663...
func newRevokeCmd(f cmdutil.Factory, out io.Writer, errOut io.Writer) *cobra.Command { options := &leOptions{} cmd := &cobra.Command{ Use: "revoke", Short: "Revoke a Let's Encrypt certificate", Long: "Revoke a Let's Encrypt certificate", Run: func(cmd *cobra.Command, args []string) { options.Cmd = cmd ...
[ 0.41024309396743774, -0.9350922703742981, 0.6003037691116333, -0.33997637033462524, -0.12825928628444672, -0.23008354008197784, 1.0561673641204834, 0.6190165877342224, -0.08527745306491852, -0.5740405321121216, 0.17019174993038177, 0.538955569267273, 0.10206262022256851, 0.2456467002630233...
func InitRestfulAPIServices(listenPort int) { router := mux.NewRouter().StrictSlash(true) router.HandleFunc("/", home) router.HandleFunc("/getCustomerList/", getCustomerList).Methods("GET") router.HandleFunc("/getCustomerListWithProduct/", getCustomerListWithProduct).Methods("GET") router.HandleFunc("/getCustomer...
[ 0.24806179106235504, -0.8689692616462708, 0.8349583148956299, -0.10459476709365845, 0.18706022202968597, -0.27251845598220825, 0.6206682920455933, -0.0901203528046608, -0.40812984108924866, -0.5243538618087769, -0.6829907894134521, -0.1703295111656189, -0.3667619526386261, 0.41049379110336...
func CommitmentToCID(commitment []byte, code FilecoinMultihashCode) (cid.Cid, error) { if !ValidFilecoinMultihash(code) { return cid.Cid{}, ErrIncorrectHash } mh := rawMultiHash(uint64(code), commitment) return cid.NewCidV1(FilecoinCodecType, mh), nil }
[ 0.4103177487850189, -0.6462923884391785, 0.4665678143501282, 0.031450219452381134, 0.35658469796180725, 0.5862441062927246, 0.15424588322639465, 1.1248102188110352, -0.05044781044125557, 1.1798573732376099, 0.4092555344104767, -0.16078665852546692, -0.5081375241279602, 0.6865843534469604, ...
func CIDToCommitment(c cid.Cid) ([]byte, FilecoinMultihashCode, error) { if c.Type() != FilecoinCodecType { return nil, FC_UNDEFINED, ErrIncorrectCodec } mh := c.Hash() decoded, err := multihash.Decode([]byte(mh)) if err != nil { return nil, FC_UNDEFINED, xerrors.Errorf("Error decoding data commitment hash: %w...
[ 0.279636025428772, -0.6175302863121033, 0.634970486164093, -0.35161393880844116, 0.35136136412620544, -0.24933739006519318, -0.17315270006656647, 0.6763449311256409, -0.1021786704659462, 0.6837731599807739, -0.26752668619155884, -0.5090598464012146, -0.4424172043800354, 0.6930853128433228,...
func DataCommitmentV1ToCID(commD []byte) cid.Cid { c, _ := CommitmentToCID(commD, FC_UNSEALED_V1) return c }
[ 0.5000987648963928, -0.9920668601989746, 0.3386388123035431, -0.7587213516235352, 0.46617990732192993, 0.040982816368341446, 0.6922823190689087, 0.526676595211029, 0.4961908757686615, 0.7488541603088379, 0.49319666624069214, 0.5098397731781006, -0.7021469473838806, -0.17402870953083038, ...
func CIDToDataCommitmentV1(c cid.Cid) ([]byte, error) { commD, hash, err := CIDToCommitment(c) if err != nil { return nil, err } if hash != FC_UNSEALED_V1 { return nil, ErrIncorrectHash } return commD, nil }
[ -0.25106504559516907, -0.09277120232582092, 0.5155684947967529, -0.3132916986942291, 0.6451840996742249, -0.37107282876968384, 0.5306397676467896, 0.7081834077835083, 0.06562328338623047, 0.2223304659128189, -0.09872282296419144, 0.42489954829216003, -0.44151899218559265, 0.467714637517929...
func ReplicaCommitmentV1ToCID(commR []byte) cid.Cid { c, _ := CommitmentToCID(commR, FC_SEALED_V1) return c }
[ 0.3799404203891754, -1.038835883140564, 0.4230636656284332, -0.43789249658584595, -0.21370132267475128, 0.4676257073879242, 0.9916335940361023, 0.6224368810653687, 0.19825632870197296, 1.7668802738189697, 0.28261038661003113, 1.0086028575897217, -0.745226263999939, -0.4554961025714874, -...
func CIDToReplicaCommitmentV1(c cid.Cid) ([]byte, error) { commR, hash, err := CIDToCommitment(c) if err != nil { return nil, err } if hash != FC_SEALED_V1 { return nil, ErrIncorrectHash } return commR, nil }
[ -0.31150296330451965, -0.08502636849880219, 0.5428786873817444, -0.38232263922691345, -0.17145830392837524, -0.34766724705696106, 0.6147063374519348, 1.0060409307479858, 0.5337238311767578, 1.166290521621704, 0.2984594702720642, 0.11798115819692612, -1.2198419570922852, -0.1821880936622619...
func PieceCommitmentV1ToCID(commP []byte) cid.Cid { return DataCommitmentV1ToCID(commP) }
[ 0.8058902621269226, -1.1765180826187134, 0.2153473049402237, -0.623607337474823, -0.06663785129785538, 0.6183768510818481, 0.9104794859886169, 0.19576390087604523, 0.4905439019203186, 1.415026068687439, 0.17626741528511047, 0.8365387916564941, -1.507271409034729, -0.3135184049606323, -1....
func CIDToPieceCommitmentV1(c cid.Cid) ([]byte, error) { return CIDToDataCommitmentV1(c) }
[ -0.5028742551803589, -0.27435505390167236, 0.39108526706695557, -0.8756585121154785, -0.1474568247795105, -0.34312310814857483, 0.7223243713378906, 0.482092946767807, -0.2815237045288086, 1.4054107666015625, 0.22312353551387787, 0.31356820464134216, -0.5894477963447571, -0.6423199772834778...
func ValidFilecoinMultihash(code FilecoinMultihashCode) bool { _, ok := FilecoinMultihashNames[code] return ok }
[ 0.2442038208246231, 0.44611674547195435, 0.47135865688323975, 0.10315007716417313, -0.5573862791061401, 0.3858626186847687, -0.30778762698173523, 0.11946383863687515, -0.578334391117096, 0.09520061314105988, -0.3067767024040222, -0.7374942302703857, -0.24008885025978088, 1.1165902614593506...
func (c *InitCommand) Run(args []string) int { fs := c.Command.defaultFlagSet("gcloudInit") fs.Parse(args) dbFile, err := c.Command.DbFile() if err != nil { log.Fatalf("Failed to obtain database filename: %v\n", err) } err = cache.CreateOrUpdateDatabase(&dbFile) if err != nil { log.Fatalf("Failed to create ...
[ -0.7502555847167969, 0.8385301232337952, 0.9341892600059509, -0.08582353591918945, 0.9262977838516235, 0.651869535446167, 0.7876277565956116, 0.17122876644134521, -1.1737474203109741, 0.23831646144390106, -0.41466304659843445, 0.16070568561553955, -1.3660236597061157, 0.9847663640975952, ...
func looksLikeUnexpectedTLS(size int32) bool { var sizeBytes [4]byte binary.BigEndian.PutUint32(sizeBytes[:], uint32(size)) if sizeBytes[0] != tlsAlertByte { return false } version := int(sizeBytes[1])<<8 | int(sizeBytes[2]) return version <= tls.VersionTLS13 && version >= tls.VersionTLS10 }
[ -0.22658486664295197, -0.02021738700568676, 0.5148378014564514, -1.207115888595581, -1.5756278038024902, 0.7617954015731812, -0.8428500294685364, -0.8246191143989563, 1.061579704284668, 0.621445894241333, -0.28237807750701904, 0.7562546730041504, -0.5570477843284607, 0.15579000115394592, ...
func StSigVerificationGasConsumer( meter sdk.GasMeter, sig []byte, pubkey crypto.PubKey, params authtypes.Params, ) error { switch pubkey := pubkey.(type) { case ed25519.PubKeyEd25519: meter.ConsumeGas(params.SigVerifyCostED25519, "ante verify: ed25519") return registertypes.ErrED25519InvalidPubKey case secp25...
[ 0.38230785727500916, 0.12351886928081512, 0.3645123243331909, 0.904018759727478, -0.31088289618492126, -0.31145232915878296, -0.10582608729600906, 0.10442326962947845, -0.586933434009552, 0.69627445936203, -0.5431402325630188, 0.545462965965271, 0.1733916997909546, 1.0929362773895264, 0....
func consumeMultisignatureVerificationGas(meter sdk.GasMeter, sig multisig.Multisignature, pubkey multisig.PubKeyMultisigThreshold, params authtypes.Params) { size := sig.BitArray.Size() sigIndex := 0 for i := 0; i < size; i++ { if sig.BitArray.GetIndex(i) { err := StSigVerificationGasConsumer(meter, sig.Sigs...
[ 0.11147858202457428, 0.19326969981193542, 0.3620188236236572, 1.0169204473495483, 0.11922046542167664, -0.5799069404602051, -0.07437105476856232, -0.0684443935751915, -0.4590388834476471, 0.7180072665214539, -0.42710208892822266, 0.3462856709957123, -0.7072201371192932, 1.5068227052688599,...
func (c App) Index() revel.Result { return c.Render() }
[ 0.8771204352378845, 0.2809169292449951, 0.2590844929218292, -0.03369131684303284, 0.2831724286079407, 0.3553026616573334, 0.3233715891838074, 0.17314095795154572, -0.28214025497436523, -0.4016626179218292, 0.30267590284347534, -0.21536549925804138, -0.11081985384225845, -0.3385090529918670...
func logStackOnRecover(panicReason interface{}, httpWriter http.ResponseWriter) { var buffer bytes.Buffer buffer.WriteString(fmt.Sprintf("recover from panic situation: - %v\r\n", panicReason)) for i := 2; ; i += 1 { _, file, line, ok := runtime.Caller(i) if !ok { break } buffer.WriteString(fmt.Sprintf(" ...
[ 0.21252655982971191, -0.5295634865760803, 0.7605908513069153, 0.17882023751735687, 0.03778277337551117, -0.26319295167922974, 0.051751118153333664, -0.3019837439060211, -0.6636373996734619, -0.3913690447807312, -0.19157321751117706, 0.24420778453350067, 0.5210115313529968, 0.53457748889923...
func readData(s string) []string { lines := make([]string, 0) data := strings.NewReader(s) scanner := bufio.NewScanner(data) for scanner.Scan() { line := strings.TrimSpace(scanner.Text()) lines = append(lines, line) } if err := scanner.Err(); err != nil { log.Fatalln(err) } return lines }
[ 0.06395290046930313, -0.885569155216217, 0.6870912313461304, -0.4026820957660675, -0.09482315182685852, 0.544464647769928, -0.8308574557304382, 0.35144126415252686, 0.15290771424770355, -0.6605824828147888, 0.40537551045417786, 0.7299690842628479, 0.2633391320705414, 0.1840270459651947, ...
func closuresAndScope() { New := func() (Count func()) { n := 0 return func() { n++ fmt.Println(n) } } f1, f2 := New(), New() f1() f1() f2() f1() }
[ -0.902433454990387, -0.6654186248779297, 0.669223427772522, 0.13110467791557312, -0.14265985786914825, -0.7234196066856384, 1.223695158958435, -0.2806546092033386, -0.30354881286621094, -0.95549476146698, -0.14880307018756866, 0.023932097479701042, 0.9330058097839355, 0.5603336691856384, ...
func higherOrderFunction() { fruits := []string{"Orange", "Apple", "Strawberry", "Pineapple"} transformed := mapForEach(fruits, func(it string) int { return len(it) }) fmt.Println(transformed) }
[ 0.528033971786499, -0.8448507785797119, 0.6190528869628906, -0.10685903578996658, 0.44468069076538086, -0.6846328377723694, -0.2469010353088379, 0.8706007599830627, -0.054463379085063934, -0.5846289396286011, -1.3973071575164795, 0.7504497170448303, 0.7075451016426086, -0.31174832582473755...
func NewActivity(metadata *activity.Metadata) activity.Activity { return &AZBLOB{metadata: metadata, log: log} }
[ 0.9718170166015625, -0.9376299977302551, 0.34952372312545776, 1.144288420677185, 0.3231945335865021, 0.49732303619384766, 0.07835608720779419, -0.6517252326011658, 0.05220634490251541, 0.1441083401441574, 0.391459196805954, 0.4040917158126831, -0.5217844843864441, -0.48927220702171326, 0...
func Map(src config.Cfg) { cfg.Map(src) }
[ -0.7720240950584412, 0.6865260004997253, 0.2715407907962799, 0.618165135383606, -0.9116289019584656, 0.7805752158164978, 0.28587639331817627, 0.693280041217804, 0.6548516750335693, 0.7612268328666687, -1.0913563966751099, 0.033788345754146576, 0.9195725917816162, 0.9441275000572205, 0.34...
func Read(filename string) error { return cfg.Read(filename) }
[ -0.5034194588661194, 0.22561787068843842, 0.3507305085659027, 0.08638890087604523, -0.4149867594242096, 0.7970895171165466, 0.15722711384296417, 0.4702756106853485, -1.463662028312683, -0.20256105065345764, 0.019471198320388794, 0.043904032558202744, -0.4819100797176361, 0.3860510587692261...
func ReadFile(file io.ReadSeeker) error { return cfg.ReadFile(file) }
[ 0.07173939049243927, 1.0658674240112305, 0.15415409207344055, 0.5160287618637085, 0.11141373962163925, 0.6325817108154297, 1.2077867984771729, 0.22252553701400757, -1.3738012313842773, -0.46045365929603577, 0.15733814239501953, -0.47977110743522644, 0.5739595293998718, 1.2968066930770874, ...
func HasSection(name string) bool { return cfg.HasSection(name) }
[ -0.18090872466564178, 0.29651060700416565, 0.40234336256980896, 0.02589345909655094, -0.4026283919811249, -0.29812857508659363, 0.046199049800634384, 0.6007051467895508, -0.8594219088554382, -0.17689870297908783, -0.5053569078445435, -1.475257158279419, 0.7993878126144409, 1.15263772010803...
func Section(name string) *config.Section { return cfg.Section(name) }
[ -0.24431867897510529, -0.12105435132980347, 0.016362126916646957, 0.12262298911809921, -0.9223409295082092, -0.2933955490589142, 0.18755069375038147, -0.5187564492225647, -0.28304556012153625, 0.02943306416273117, -0.1475314050912857, 0.05684485286474228, 0.9863293766975403, 0.163195088505...
func Sections() []string { return cfg.Sections() }
[ -0.4281698763370514, -0.23844365775585175, 0.10722370445728302, 0.21159890294075012, 0.16034835577011108, 0.820767343044281, -0.15294882655143738, -0.5356540679931641, 0.2427041083574295, 0.02722764015197754, 0.16804565489292145, -0.3805212378501892, 0.2332649827003479, 1.124029278755188, ...
func HasOption(section, option string) bool { return cfg.HasOption(section, option) }
[ 0.8781108260154724, -0.058852098882198334, 0.32799509167671204, 1.0831425189971924, 0.288797527551651, -0.7000666260719299, -0.14325682818889618, 0.9098066687583923, -0.1723988652229309, 0.9787987470626831, -0.22069641947746277, -0.7182201743125916, 0.4058316648006439, 0.7110816836357117, ...
func Options(section string) []string { return cfg.Options(section) }
[ -0.8322645425796509, 0.0751786157488823, 0.22989213466644287, 0.08371604979038239, 0.6132218241691589, -0.1157560870051384, -0.7556614875793457, -0.4337533116340637, 0.10086337476968765, 1.1990102529525757, -0.20891225337982178, -0.23787334561347961, 0.4404379427433014, 0.9129034280776978,...
func Set(section, option, value string) { cfg.Set(section, option, value) }
[ 0.36251091957092285, -0.33929044008255005, 0.1913234442472458, -0.20257481932640076, -0.4305122494697571, 0.3494517207145691, -0.34677767753601074, 0.24034827947616577, -0.9733359813690186, 0.745268702507019, -0.39327776432037354, 0.0391990952193737, 0.49429699778556824, 0.614378809928894,...
func Update(section, option, value string) { cfg.Update(section, option, value) }
[ 0.1884811967611313, -0.5358222126960754, 0.19067543745040894, -0.04987373948097229, -0.9703494310379028, 0.3258191645145416, -0.5106561183929443, 0.4071396291255951, -0.5223645567893982, 0.6326935887336731, -0.2589787244796753, -0.33782729506492615, -0.1977696418762207, 0.5043312907218933,...
func GetRaw(section, option string) string { return cfg.GetRaw(section, option) }
[ -0.01299898512661457, 0.8256126046180725, 0.5933082699775696, 0.32728445529937744, -1.0885660648345947, -0.3166879713535309, -0.3404887020587921, -0.3798134922981262, -0.16536875069141388, 0.004507915582507849, 0.464523047208786, 0.5627422332763672, 0.8983914852142334, 0.05981450900435448,...
func Get(section, option string) string { return cfg.Get(section, option) }
[ -0.18104110658168793, -0.590231716632843, 0.3238944709300995, -0.1740197390317917, -0.15959960222244263, -0.5313344597816467, -0.8638427257537842, -0.07260419428348541, -0.8096849322319031, 1.0636229515075684, 0.37458691000938416, 0.36689114570617676, 0.1803618222475052, -0.376158118247985...
func GetBool(section, option string) bool { return cfg.GetBool(section, option) }
[ 0.8106606602668762, 0.3560127019882202, 0.3310399353504181, 1.3227671384811401, 0.5790848731994629, -0.13671180605888367, -0.031880930066108704, 0.6670811772346497, -0.45330458879470825, 0.7595656514167786, -0.15509076416492462, 0.4088748097419739, 0.22821949422359467, -0.31034308671951294...
func GetFloat32(section, option string) float32 { return cfg.GetFloat32(section, option) }
[ 1.2668694257736206, 0.8079885840415955, 0.4443778395652771, 0.20955710113048553, 0.8250305652618408, 0.22571490705013275, -0.060300614684820175, -0.6068949699401855, -0.6573803424835205, -0.3957318961620331, 0.17867927253246307, 0.48376724123954773, -0.15568792819976807, 0.8248918652534485...
func GetFloat64(section, option string) float64 { return cfg.GetFloat64(section, option) }
[ 0.19301532208919525, 0.4885302484035492, 0.3821156620979309, 1.180078148841858, 1.2204166650772095, -1.098464012145996, 0.07606790214776993, -0.07848802208900452, -0.6349546909332275, -0.19654585421085358, 0.42335978150367737, -0.24657393991947174, -0.31890952587127686, 0.9786742329597473,...
func GetInt(section, option string) int { return cfg.GetInt(section, option) }
[ 0.41639313101768494, 0.613743007183075, 0.3753369450569153, -0.22494953870773315, 0.3560214042663574, -0.7959794998168945, 0.17011871933937073, -0.36931943893432617, -0.9884421229362488, 0.8748053312301636, -0.13202157616615295, -0.13757210969924927, -0.4504008889198303, 0.2403168380260467...
func GetInt8(section, option string) int8 { return cfg.GetInt8(section, option) }
[ -0.3451631963253021, 0.5825883150100708, 0.1059713363647461, 1.120802640914917, 0.38897520303726196, -0.24028153717517853, 0.5486739873886108, 0.23154114186763763, -0.01895974390208721, 0.7423405647277832, 0.19946220517158508, 0.49155393242836, -1.7020797729492188, 0.3940913677215576, 1....
func GetInt16(section, option string) int16 { return cfg.GetInt16(section, option) }
[ 0.7616588473320007, 0.5913116931915283, 0.2665744423866272, 0.536432147026062, 0.8705314993858337, -0.8502928614616394, 0.20171840488910675, -0.05993836000561714, -0.7581079602241516, 0.372427374124527, -0.3072604537010193, 0.5284122228622437, -0.6790462136268616, -0.0018680935027077794, ...
func GetInt32(section, option string) int32 { return cfg.GetInt32(section, option) }
[ 0.5779922604560852, 0.6855930089950562, 0.31368833780288696, 0.1440211832523346, 0.6717190742492676, 0.0728457048535347, 0.04268014058470726, -0.6022627353668213, -0.7121686339378357, 0.27113980054855347, 0.06485360860824585, 0.3359983265399933, -0.5638986825942993, 0.06067243218421936, ...
func GetInt64(section, option string) int64 { return cfg.GetInt64(section, option) }
[ -0.38460788130760193, 0.6460311412811279, 0.2846922278404236, 1.2183066606521606, 0.7631949782371521, -1.310863971710205, 0.36986464262008667, 0.008400456048548222, -0.5619247555732727, 0.6478356122970581, 0.12397997826337814, -0.19933512806892395, -0.6908584833145142, 0.5226362943649292, ...
func GetUint(section, option string) uint { return cfg.GetUint(section, option) }
[ -0.138606458902359, 0.0647052675485611, 0.4625476598739624, -0.31430870294570923, 0.43777933716773987, -0.7301802039146423, 0.17034626007080078, 0.6389716267585754, 0.3404841125011444, -0.22816745936870575, -0.29203706979751587, 0.37571918964385986, 0.16616128385066986, -0.0964747741818428...
func GetUint8(section, option string) uint8 { return cfg.GetUint8(section, option) }
[ -0.3514241576194763, 0.2771105468273163, 0.1976802945137024, 0.6331173181533813, 0.2632368803024292, -0.2514427602291107, 0.08943453431129456, 1.0153985023498535, 0.4809657037258148, 0.5112568140029907, 0.2999809980392456, 0.21127334237098694, -0.4432141184806824, 0.49201443791389465, 1....
func GetUint16(section, option string) uint16 { return cfg.GetUint16(section, option) }
[ 0.7558885216712952, 0.5433789491653442, 0.33861514925956726, 0.2834042012691498, 0.894422173500061, -0.7880319356918335, -0.1278422325849533, 0.7843932509422302, 0.00853100698441267, 0.17432153224945068, -0.15511023998260498, -0.0552714467048645, 0.2619136571884155, 0.18712961673736572, ...
func GetUint32(section, option string) uint32 { return cfg.GetUint32(section, option) }
[ 0.3565808832645416, 0.6780683398246765, 0.3322465121746063, -0.127615287899971, 0.5540053248405457, -0.011463177390396595, -0.35103484988212585, 0.13068750500679016, -0.18270309269428253, 0.12603013217449188, 0.3407583236694336, -0.05901961773633957, 0.36812257766723633, 0.1535257697105407...
func GetUint64(section, option string) uint64 { return cfg.GetUint64(section, option) }
[ -0.45140892267227173, 0.3370203375816345, 0.37896662950515747, 0.8199574947357178, 0.7366726398468018, -1.069087266921997, -0.10656169801950455, 0.7353516221046448, 0.07810820639133453, 0.11304445564746857, 0.3531697690486908, -0.5345463156700134, 0.3308766782283783, 0.565937340259552, -...
func (bc *BaseCluster) SSH(m Machine, cmd string) ([]byte, []byte, error) { var stdout bytes.Buffer var stderr bytes.Buffer client, err := bc.SSHClient(m.IP()) if err != nil { return nil, nil, err } defer client.Close() session, err := client.NewSession() if err != nil { return nil, nil, err } defer sess...
[ 0.21008282899856567, -0.0030338296201080084, 0.7621191740036011, 0.3189341723918915, -0.8797465562820435, 0.31853580474853516, -0.5091558694839478, -0.5169386863708496, -0.49073928594589233, -0.2604002356529236, -0.07618619501590729, 1.3216078281402588, -0.6315394639968872, 0.0010282110888...
func (bc *BaseCluster) Destroy() { for _, m := range bc.Machines() { bc.numMachines-- m.Destroy() } }
[ -0.02373417094349861, 0.10723412036895752, 0.1988719403743744, -0.0337381437420845, 1.372965693473816, 0.6288625597953796, 0.6806743144989014, -0.07657559961080551, -0.8785067200660706, -0.03352497145533562, 0.01986371912062168, 0.07022319734096527, -1.2053898572921753, 1.1501269340515137,...
func getContext() context.Context { return context.TODO() }
[ 0.4195246696472168, 0.611023485660553, 0.5752473473548889, 0.8509895205497742, 0.6009186506271362, -0.23754768073558807, -0.09394218027591705, -0.421766072511673, 1.5023406744003296, -1.0914629697799683, -0.3677801489830017, 0.6422929167747498, 0.47649645805358887, -0.480507493019104, -0...
func imageIsParent(store storage.Store, topLayer string) (bool, error) { children, err := getChildren(store, topLayer) if err != nil { return false, err } return len(children) > 0, nil }
[ -0.8155278563499451, -0.2732972204685211, 0.6732037663459778, -0.4397355616092682, -0.24501155316829681, -0.1841912567615509, 0.3388890027999878, -0.5332557559013367, 0.22698035836219788, 0.6555647253990173, -0.07737340033054352, -0.297838419675827, -0.5168735980987549, 0.5280700325965881,...
func getParent(store storage.Store, topLayer string) (*storage.Image, error) { images, err := store.Images() if err != nil { return nil, errors.Wrapf(err, "unable to retrieve images from store") } layer, err := store.Layer(topLayer) if err != nil { return nil, errors.Wrapf(err, "unable to retrieve layers from ...
[ 0.24670572578907013, -0.2069186121225357, 0.5978176593780518, -0.09397151321172714, -0.5950398445129395, -0.3459809720516205, 0.6146076321601868, -0.7963318824768066, -0.04403158277273178, -0.030360503122210503, 0.6051822304725647, 0.7612826228141785, -0.3415464758872986, 0.501029610633850...
func getChildren(store storage.Store, topLayer string) ([]string, error) { var children []string images, err := store.Images() if err != nil { return nil, errors.Wrapf(err, "unable to retrieve images from store") } layers, err := store.Layers() if err != nil { return nil, errors.Wrapf(err, "unable to retrieve...
[ -0.2822466194629669, -0.003331230254843831, 0.4131643772125244, 0.01697276346385479, -0.1684906780719757, -0.1894102543592453, 0.14321468770503998, -0.8828949928283691, 0.4526153802871704, -0.10294628888368607, -0.36247485876083374, 0.792627215385437, 0.21319854259490967, 1.143557786941528...
func getImageOfTopLayer(images []storage.Image, layer string) []string { var matches []string for _, img := range images { if img.TopLayer == layer { matches = append(matches, img.ID) } } return matches }
[ -0.9274584054946899, -0.7403565645217896, 0.5827022790908813, 0.3746245801448822, 0.033147893846035004, -0.437360018491745, -0.3767552971839905, -0.5078456997871399, -0.31824782490730286, 0.8813960552215576, 0.1476626694202423, 0.05493471771478653, -0.2590812146663666, 0.5550708770751953, ...
func Fuzz_open_channel(data []byte) int { // Prefix with MsgOpenChannel. data = prefixWithMsgType(data, lnwire.MsgOpenChannel) // Create an empty message so that the FuzzHarness func can check // if the max payload constraint is violated. emptyMsg := lnwire.OpenChannel{} // We have to do this here instead of in...
[ -0.052995819598436356, 0.33803850412368774, 0.8318953514099121, -0.540047824382782, 0.08639790117740631, -0.5190741419792175, 0.9362511038780212, 0.10145986825227737, 0.30551233887672424, -0.6678388714790344, 0.1272219866514206, 0.798852801322937, -1.228553056716919, 0.3252911865711212, ...
func NewPostgresDatabase() (*PostgresDatabase, error) { pdb := &PostgresDatabase{} conf, err := parsePostgresConfig() if err != nil { return nil, err } pdb.conf = conf psqlInfo := fmt.Sprintf("host=%s port=%d user=%s password=%s dbname=%s sslmode=disable", conf.host, conf.port, conf.user, conf.password, conf....
[ -0.2928101122379303, -0.7911068797111511, 0.7756863236427307, 0.2573486268520355, -0.4671615660190582, 0.36869868636131287, -0.362999826669693, 0.4078565835952759, -1.1577454805374146, -0.26215341687202454, -0.7404825091362, 0.057048797607421875, -1.308167815208435, 0.8467138409614563, -...
func (d *PostgresDatabase) Stop() error { err := d.db.Close() return err }
[ -1.3388804197311401, 0.4164268970489502, 0.15710510313510895, -0.09460322558879852, -0.1722240447998047, 0.9733896255493164, -0.011647016741335392, 0.19624707102775574, -1.178109049797058, 0.520673930644989, 0.39486128091812134, 0.373055100440979, -0.7327117919921875, 0.1823284924030304, ...
func (d *PostgresDatabase) Store(u model.User) error { opMetric.WithLabelValues("store-user").Inc() ostart := time.Now() defer opDuration.WithLabelValues("store-user").Observe(time.Since(ostart).Seconds()) dob, err := time.Parse("2006-01-02", u.DOB) if err != nil { opErrMetric.WithLabelValues("store-user").Inc...
[ 0.019212553277611732, 0.7326617240905762, 0.7613555788993835, 0.4991600513458252, -0.302857905626297, 0.6208759546279907, 1.2229729890823364, 0.06605666875839233, 0.6275270581245422, -0.044783998280763626, 0.41817355155944824, 0.01248947810381651, -0.6388525366783142, 0.6090049743652344, ...