text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (d *differ) establishCorrespondence(old *types.Named, new types.Type) bool { oldname := old.Obj() oldc := d.correspondMap[oldname] if oldc == nil { // For now, assume the types don't correspond unless they are from the old // and new packages, respectively. // // This is too conservative. For instance, ...
[ -0.05868250131607056, -0.5116760730743408, 0.954447329044342, -0.9433930516242981, 0.3168064057826996, -0.015448838472366333, 0.40585148334503174, -0.33117371797561646, -0.03351443633437157, 0.6670485734939575, -0.3470063805580139, -0.03810298815369606, -0.7174860239028931, 1.1295659542083...
func HashString(text []byte) ([]byte, error) { hashedPassword, err := bcrypt.GenerateFromPassword(text, bcrypt.DefaultCost) if err != nil { return nil, err } return hashedPassword, nil }
[ 0.8488813638687134, 0.2954201102256775, 0.3815717101097107, 0.48218992352485657, -0.474126935005188, 0.5862399339675903, -0.8146095275878906, 0.22458209097385406, 0.012972631491720676, 0.6874147057533264, -1.0272356271743774, -0.342804491519928, -1.030816674232483, -0.433597594499588, -0...
func HashMatch(hashedText []byte, text []byte) bool { err := bcrypt.CompareHashAndPassword(hashedText, text) if err != nil { return false } return true }
[ 1.609147548675537, 0.01824304088950157, 0.6888793706893921, 0.5771765112876892, -0.07562139630317688, 0.8943068385124207, -0.8581498861312866, 1.2096948623657227, -0.2064356952905655, 0.39910829067230225, -0.34096214175224304, -0.6004593372344971, -1.4848541021347046, 0.2522360682487488, ...
func decrypt(key, text []byte) ([]byte, error) { block, err := aes.NewCipher(key) if err != nil { return nil, err } if len(text) < aes.BlockSize { return nil, errors.New("ciphertext is too short.") } iv := text[:aes.BlockSize] text = text[aes.BlockSize:] cfb := cipher.NewCBCDecrypter(block, iv) cfb.CryptB...
[ 0.675977885723114, 0.8897207379341125, 0.6260496973991394, 0.7317261099815369, -0.819715142250061, -0.5185256600379944, -0.6975862383842468, -0.09816940128803253, 0.47291651368141174, 0.7341341972351074, -0.5232289433479309, 0.17575007677078247, -1.1019349098205566, -0.2990271747112274, ...
func GetDiamondStore(stores context2.Stores) storage.Store { return getVMetaStore(stores) }
[ 0.02089710906147957, 0.5588262677192688, 0.10282673686742783, 0.5746314525604248, -0.5511081218719482, 0.015323780477046967, -0.5142261981964111, 0.31544938683509827, 1.3954912424087524, -0.9240112900733948, 0.45852768421173096, 0.36290714144706726, 0.05798392742872238, -0.6266054511070251...
func GetDiamond(repo, diamondID string, stores context2.Stores, opts ...DiamondOption) (model.DiamondDescriptor, error) { var err error getOpts := []DiamondOption{ DiamondDescriptor( model.NewDiamondDescriptor(model.DiamondID(diamondID)), ), } getOpts = append(getOpts, opts...) d := NewDiamond(repo, store...
[ -0.41899028420448303, 0.24093610048294067, 0.6858478784561157, -0.2911972999572754, 0.3168756663799286, -0.10076174885034561, -0.21806876361370087, 0.17862679064273834, 0.56419438123703, -0.536090612411499, 0.23647163808345795, 1.3191472291946411, -0.12595947086811066, 0.27777379751205444,...
func DiamondExists(repo, diamondID string, stores context2.Stores) error { exists, err := GetDiamondStore(stores).Has(context.Background(), model.GetArchivePathToInitialDiamond(repo, diamondID)) if err != nil { return errors.New("failed to retrieve diamond from store").Wrap(err) } if !exists { return errors.New...
[ -0.35164254903793335, -0.6122864484786987, 0.3340452015399933, -0.21390999853610992, 0.9305040240287781, 0.35158926248550415, -0.19233012199401855, 0.3538176119327545, 0.3794114589691162, 0.555555522441864, -0.1656266301870346, 0.43632256984710693, 0.04342281445860863, -0.13603077828884125...
func diamondReady(repo, diamondID string, stores context2.Stores) error { diamond, err := GetDiamond(repo, diamondID, stores) if err != nil { return err } switch diamond.State { case model.DiamondInitialized: return nil default: if !diamond.State.IsValid() { return errors.New("diamond is not ready").Wrap...
[ -0.7530962228775024, -0.0690963864326477, 0.5233377814292908, -0.24711191654205322, 0.16061341762542725, 0.14636114239692688, -0.5780024528503418, 0.14587238430976868, 0.9108219146728516, 0.8370088338851929, -0.6589282751083374, 1.0548264980316162, 0.9404345750808716, 0.6148994565010071, ...
func CreateDiamond(repo string, stores context2.Stores, opts ...DiamondOption) (model.DiamondDescriptor, error) { var err error d := NewDiamond(repo, stores, opts...) defer func(t0 time.Time) { if d.MetricsEnabled() { d.m.Usage.UsedAll(t0, "CreateDiamond")(err) } }(time.Now()) if d.DiamondDescriptor.Diamo...
[ -0.344480961561203, -0.3185757100582123, 0.6032850742340088, -0.3425658047199249, 0.26517435908317566, 0.586618959903717, -0.12460504472255707, -0.07809717208147049, 0.03712727129459381, 0.2995436191558838, -0.32246577739715576, 0.556450366973877, -0.565466046333313, 0.6918221712112427, ...
func valueOrDefault(value, def string) string { if value != "" { return value } return def }
[ 0.6256736516952515, 0.3305990695953369, 0.31783217191696167, -0.2607383728027344, 0.8039604425430298, -0.4213138222694397, -1.1308259963989258, 0.2369375228881836, 0.4172392189502716, 0.750160813331604, 0.45871248841285706, 0.6561347246170044, -0.22238320112228394, 0.16517245769500732, -...
func outgoingLength(r *http.Request) int64 { if r.Body == nil || r.Body == http.NoBody { return 0 } if r.ContentLength != 0 { return r.ContentLength } return -1 }
[ -0.9863876104354858, 0.2531279921531677, 0.6493831276893616, -0.0723600909113884, -0.46440622210502625, 0.8012183308601379, 0.15895986557006836, 0.10984913259744644, 0.417401522397995, 0.24713613092899323, 0.7370571494102478, 0.2107575535774231, -0.713253915309906, 1.460310459136963, 0.2...
func removeZone(host string) string { if !strings.HasPrefix(host, "[") { return host } i := strings.LastIndex(host, "]") if i < 0 { return host } j := strings.LastIndex(host[:i], "%") if j < 0 { return host } return host[:j] + host[i:] }
[ -0.7111623287200928, -0.14900530874729156, 0.7503728866577148, 0.6516764163970947, -0.6626091003417969, -0.27833595871925354, 0.8293964862823486, 0.37027692794799805, 0.21374565362930298, 0.8280691504478455, -0.20409080386161804, -0.22076749801635742, -1.7097785472869873, -1.22501981258392...
func write(req *http.Request, w io.Writer, usingProxy bool, extraHeaders http.Header, waitForContinue func() bool) (err error) { trace := httptrace.ContextClientTrace(req.Context()) if trace != nil && trace.WroteRequest != nil { defer func() { trace.WroteRequest(httptrace.WroteRequestInfo{ Err: err, }) ...
[ -0.6350093483924866, 0.145283043384552, 0.6703298687934875, 0.4226471781730652, 0.28213801980018616, -0.7445417046546936, 0.5984615683555603, 0.04127197712659836, -0.373372882604599, -0.414411723613739, 0.4719252288341522, -0.4452063739299774, 0.10440224409103394, -0.03358852490782738, -...
func parseRequestLine(line string) (method, requestURI, proto string, ok bool) { s1 := strings.Index(line, " ") s2 := strings.Index(line[s1+1:], " ") if s1 < 0 || s2 < 0 { return } s2 += s1 + 1 return line[:s1], line[s1+1 : s2], line[s2+1:], true }
[ -1.043669581413269, -0.27230384945869446, 0.7336851954460144, 1.2437117099761963, -0.2438793033361435, -0.6965036392211914, -0.18254615366458893, -0.5393616557121277, -0.58247971534729, -0.75199955701828, 0.056419942528009415, -0.20961140096187592, -0.9371688365936279, -0.45399612188339233...
func get(h http.Header, key string) string { if v := h[key]; len(v) > 0 { return v[0] } return "" }
[ -0.41254669427871704, -0.2936820983886719, 0.592444896697998, -0.051721371710300446, -0.11483944952487946, -0.40318527817726135, -1.9332386255264282, -0.2787655293941498, -0.7890164256095886, 0.8829028010368347, 0.542680561542511, 0.699313759803772, -0.7008649110794067, -0.1818350851535797...
func requestMethodUsuallyLacksBody(method string) bool { switch method { case "GET", "HEAD", "DELETE", "OPTIONS", "PROPFIND", "SEARCH": return true } return false }
[ -1.1764647960662842, 1.079626441001892, 0.5344988107681274, 0.6998534202575684, 0.66542649269104, -0.11064950376749039, -0.20890243351459503, -1.1188551187515259, 0.30712467432022095, -0.579088568687439, 0.18611031770706177, 0.6087818741798401, -0.5274675488471985, 0.8510714769363403, -0...
func NewIncidentTeamResponseAttributes() *IncidentTeamResponseAttributes { this := IncidentTeamResponseAttributes{} return &this }
[ 0.47472381591796875, -1.3403127193450928, 0.13645431399345398, 0.3384802043437958, 0.22135016322135925, -0.1433619260787964, 0.970268726348877, -0.3940468430519104, 0.038582541048526764, 0.1396988034248352, 0.24954840540885925, -1.0902290344238281, -1.0109816789627075, -1.7885870933532715,...
func NewIncidentTeamResponseAttributesWithDefaults() *IncidentTeamResponseAttributes { this := IncidentTeamResponseAttributes{} return &this }
[ 0.5118805766105652, -0.6704414486885071, 0.31261175870895386, 0.10072524845600128, 1.2779346704483032, -0.05916551500558853, 0.19654351472854614, -0.32509928941726685, 0.15500439703464508, -0.0465044341981411, -0.31678876280784607, -2.114359140396118, -0.6303791403770447, -1.70681762695312...
func (o *IncidentTeamResponseAttributes) GetCreated() time.Time { if o == nil || o.Created == nil { var ret time.Time return ret } return *o.Created }
[ 1.0945582389831543, 0.1913016438484192, 0.18422454595565796, 1.1347347497940063, 0.9485710859298706, -0.3622629642486572, 0.5875891447067261, -0.10596325248479843, 0.33536428213119507, -1.156410574913025, -0.3171214163303375, -0.9477811455726624, -0.09713532775640488, 0.8905999064445496, ...
func (o *IncidentTeamResponseAttributes) GetCreatedOk() (*time.Time, bool) { if o == nil || o.Created == nil { return nil, false } return o.Created, true }
[ 0.2919809818267822, -0.1959175020456314, 0.14544960856437683, 0.31686681509017944, 0.38394272327423096, 0.5486776828765869, 0.8743470907211304, 0.32012999057769775, -0.22642770409584045, -0.43017125129699707, -0.6721055507659912, -0.3903964161872864, 0.7716144323348999, 0.4700407087802887,...
func (o *IncidentTeamResponseAttributes) HasCreated() bool { return o != nil && o.Created != nil }
[ 1.4966015815734863, 0.24474065005779266, 0.012937868013978004, -0.04804423451423645, 1.843030571937561, -0.10659056156873703, -0.3598996698856354, 0.543724000453949, -0.3062540888786316, -1.651572823524475, -0.582786500453949, -1.441382646560669, 0.9488951563835144, -0.3413167893886566, ...
func (o *IncidentTeamResponseAttributes) SetCreated(v time.Time) { o.Created = &v }
[ 0.6681810021400452, -0.05361258238554001, -0.028402015566825867, 0.4394823908805847, 0.27651676535606384, 0.3165450096130371, -0.6436601281166077, -1.2242765426635742, -0.1855033040046692, -0.2649640738964081, -0.2621784806251526, -0.04818832501769066, 1.0581454038619995, -0.39395457506179...
func (o *IncidentTeamResponseAttributes) GetModified() time.Time { if o == nil || o.Modified == nil { var ret time.Time return ret } return *o.Modified }
[ 0.06485242396593094, -0.23721352219581604, 0.19950419664382935, 0.49763286113739014, 0.5994488000869751, -0.5958324670791626, 0.4861545264720917, 0.22291694581508636, 0.5506674647331238, -0.9284489750862122, -0.4039360284805298, -0.749357283115387, -0.41455912590026855, 0.8463490009307861,...
func (o *IncidentTeamResponseAttributes) GetModifiedOk() (*time.Time, bool) { if o == nil || o.Modified == nil { return nil, false } return o.Modified, true }
[ -0.17161285877227783, -0.5642195343971252, 0.3566511869430542, 0.33535563945770264, 0.06912485510110855, 0.24618452787399292, 0.70211261510849, 1.003386378288269, 0.048667583614587784, 0.03538120165467262, -0.6505063772201538, 0.06680305302143097, 0.32110515236854553, 0.6947243809700012, ...
func (o *IncidentTeamResponseAttributes) HasModified() bool { return o != nil && o.Modified != nil }
[ 0.1650567501783371, -0.2639962434768677, 0.08159051835536957, -0.5403704643249512, 1.4568884372711182, -0.17584474384784698, -0.2903740108013153, 0.9564819931983948, 0.09368903189897537, -0.9965633749961853, -0.8573952317237854, -0.9330098032951355, 0.3901868164539337, -0.32060644030570984...
func (o *IncidentTeamResponseAttributes) SetModified(v time.Time) { o.Modified = &v }
[ -0.4162557125091553, -0.2221677005290985, 0.10266872495412827, -0.22103868424892426, 0.4049384891986847, 0.24437107145786285, -0.5634293556213379, -0.6763826608657837, 0.0006089701200835407, -0.04922882094979286, -0.26132190227508545, 0.08538923412561417, 0.44715431332588196, -0.2383583933...
func (o *IncidentTeamResponseAttributes) GetName() string { if o == nil || o.Name == nil { var ret string return ret } return *o.Name }
[ 0.41310590505599976, 0.21023938059806824, 0.03502456098794937, 0.7312182188034058, 0.020557185634970665, -1.018578052520752, 0.6751545071601868, -0.5864290595054626, 0.3485218584537506, 0.10255991667509079, -0.2958735525608063, -2.103221893310547, -0.40165698528289795, 0.04482121020555496,...
func (o *IncidentTeamResponseAttributes) GetNameOk() (*string, bool) { if o == nil || o.Name == nil { return nil, false } return o.Name, true }
[ 0.03917841613292694, -0.1821098029613495, 0.432030588388443, 0.2931284010410309, -0.2059176117181778, 0.15614312887191772, 0.19684794545173645, -0.4230700731277466, -0.09539543092250824, 1.0552036762237549, -1.06771719455719, -1.333903431892395, 0.32433512806892395, 0.08081654459238052, ...
func (o *IncidentTeamResponseAttributes) HasName() bool { return o != nil && o.Name != nil }
[ 0.45511215925216675, -0.18836194276809692, 0.0985443964600563, 0.02054281160235405, 0.3492544889450073, -0.6028750538825989, 0.08831403404474258, -0.2543044090270996, 0.16647084057331085, 0.40102139115333557, -0.6212735176086426, -1.9569509029388428, 0.09928856790065765, -0.611989259719848...
func (o *IncidentTeamResponseAttributes) SetName(v string) { o.Name = &v }
[ 0.01936427131295204, -0.2171994298696518, -0.12863898277282715, -0.24055972695350647, -0.8460737466812134, -0.6207629442214966, -0.2870313823223114, -1.140871524810791, -0.2613102197647095, 0.6980457305908203, -0.3188793957233429, -0.38655945658683777, -0.06954354047775269, -1.339157342910...
func (o IncidentTeamResponseAttributes) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.UnparsedObject != nil { return json.Marshal(o.UnparsedObject) } if o.Created != nil { if o.Created.Nanosecond() == 0 { toSerialize["created"] = o.Created.Format("2006-01-02T15:04:05Z07:00") ...
[ 0.5752806067466736, -1.4103418588638306, 0.6546353101730347, -1.090270757675171, -0.2829204499721527, -0.2711181640625, 0.7726269364356995, -0.641494631767273, 0.06299080699682236, 0.3065166175365448, -0.2698945105075836, 0.15310588479042053, 0.02627578377723694, -1.0002919435501099, 0.1...
func (o *IncidentTeamResponseAttributes) UnmarshalJSON(bytes []byte) (err error) { all := struct { Created *time.Time `json:"created,omitempty"` Modified *time.Time `json:"modified,omitempty"` Name *string `json:"name,omitempty"` }{} if err = json.Unmarshal(bytes, &all); err != nil { return json.Unma...
[ 0.002493730280548334, -1.0662363767623901, 0.6143847107887268, -1.741507887840271, -0.5989559292793274, -0.2298600673675537, 0.5542760491371155, -0.22948789596557617, 0.054448746144771576, 0.5350000262260437, -0.39195767045021057, -0.4218945801258087, -0.05774196609854698, -1.2542520761489...
func NewVersionInfo() VersionInfo { ver := VersionInfo{ Version: "dev", BuildDate: BuildDate, GitCommit: GitCommit, GitState: "", } if Version != "" { ver.Version = Version ver.GitState = "clean" } if GitState != "" { ver.GitState = GitState } return ver }
[ 0.5856689214706421, -1.00288724899292, -0.05848934128880501, -0.227765291929245, -0.5898839235305786, 0.6769635081291199, -0.5714738368988037, -0.2544078528881073, -0.3583565056324005, 0.2032550871372223, -1.129744052886963, -0.3185208737850189, -0.000847675371915102, 0.8290400505065918, ...
func (*FibonacciRequest) Descriptor() ([]byte, []int) { return file_proto_fibonacci_proto_rawDescGZIP(), []int{0} }
[ -0.08785825222730637, -0.08990339189767838, 0.16395314037799835, 0.15634100139141083, 0.16037194430828094, -0.7526823878288269, 0.3099184036254883, -0.2578866183757782, -0.563757598400116, -0.2253578156232834, 0.0521743968129158, 0.4708270728588104, -0.6487979292869568, 1.0742199420928955,...
func (*FibonacciResponse) Descriptor() ([]byte, []int) { return file_proto_fibonacci_proto_rawDescGZIP(), []int{1} }
[ 0.6926570534706116, -0.4012824296951294, -0.28123846650123596, -0.18228235840797424, 0.29693707823753357, -1.3285679817199707, 0.8898557424545288, -0.4518609344959259, -0.3316207528114319, 0.09394052624702454, -0.9446528553962708, -0.5970586538314819, -1.4032187461853027, 0.058720063418149...
func migrationStateBlocked(state MigrationState) bool { return state.NextMigration < rewardsMigrationIndex }
[ -0.6938406229019165, 1.2086886167526245, 0.6594123840332031, 0.05974317342042923, -0.959646463394165, 0.3891547620296478, -0.7586003541946411, -1.2118628025054932, 0.4051266312599182, 0.402936190366745, -0.606769859790802, -0.20402561128139496, 0.2241716831922531, -0.682094395160675, -0....
func needsMigration(state MigrationState) bool { return state.NextMigration < len(migrations) }
[ -1.4733754396438599, 0.9909728765487671, 0.39428964257240295, 0.19011151790618896, -0.9413378834724426, -0.04701220616698265, -0.21216103434562683, 0.14895974099636078, -0.009183177724480629, 0.009768379852175713, -0.953482449054718, -0.918742835521698, -0.1133788526058197, 0.7305248379707...
func upsertMigrationStateTx(tx *sql.Tx, state *MigrationState, incrementNextMigration bool) (err error) { if incrementNextMigration { state.NextMigration++ } migrationStateJSON := encoding.EncodeJSON(state) _, err = tx.Exec(setMetastateUpsert, migrationMetastateKey, migrationStateJSON) return err }
[ -1.2219228744506836, 0.4107263386249542, 0.688600480556488, -0.5455811619758606, -0.9512659311294556, 0.18426400423049927, -0.739415168762207, -0.4014405906200409, 0.34042030572891235, 0.4383082091808319, -1.206220030784607, -0.29959556460380554, 0.2607746124267578, -0.41376468539237976, ...
func upsertMigrationState(db *IndexerDb, state *MigrationState, incrementNextMigration bool) (err error) { if incrementNextMigration { state.NextMigration++ } migrationStateJSON := encoding.EncodeJSON(state) _, err = db.db.Exec(setMetastateUpsert, migrationMetastateKey, migrationStateJSON) return err }
[ -1.4169881343841553, 0.5228196382522583, 0.699618399143219, -0.24581600725650787, -0.6752466559410095, 0.08036521077156067, -0.23923063278198242, -0.16470889747142792, 0.2823427617549896, 0.7618395686149597, -1.2039532661437988, -0.3598535358905792, -0.25044459104537964, 0.0381783992052078...
func (db *IndexerDb) markMigrationsAsDone() (err error) { state := MigrationState{ NextMigration: len(migrations), } migrationStateJSON := encoding.EncodeJSON(state) return db.setMetastate(nil, migrationMetastateKey, string(migrationStateJSON)) }
[ -1.113508939743042, 0.37751221656799316, 0.20339557528495789, 0.30394139885902405, 0.4912234842777252, -0.6895922422409058, -0.23821663856506348, -0.4266299903392792, -0.025056112557649612, 0.526543915271759, -0.8435500264167786, 0.07033336162567139, -0.018794534727931023, 1.31702530384063...
func (db *IndexerDb) hasTotalRewardsSupport() bool { // It will never revert back to false, so return it if cached true. if hasRewardsSupport { return hasRewardsSupport } // If this is the read/write instance, check the migration status directly if s := db.migration.GetStatus(); !s.IsZero() { hasRewardsSuppor...
[ -0.4818897247314453, 0.7441620826721191, 0.7799938917160034, -0.6970103979110718, -0.5194622874259949, -0.4965892732143402, -0.16084927320480347, 0.4669422507286072, 0.4428488612174988, 0.5216847062110901, -0.5859508514404297, -0.4278152585029602, -0.008015299215912819, 0.1295730322599411,...
func (db *IndexerDb) processAccount(account *generated.Account) { if !db.hasTotalRewardsSupport() { account.Rewards = 0 } }
[ -0.10339684039354324, 0.8419443368911743, 0.45539358258247375, -0.07471970468759537, 0.5287038087844849, -0.3274528384208679, 1.380924105644226, 0.7722453474998474, 0.9764348268508911, 0.35957130789756775, 0.4759937524795532, -0.10441087931394577, -0.49553024768829346, 0.448699414730072, ...
func m3acfgFixAsyncInner(db *IndexerDb, state *MigrationState, assetIds []int64) (next int, err error) { lastlog := time.Now() tx, err := db.db.BeginTx(context.Background(), &serializable) if err != nil { db.log.WithError(err).Errorf("acfg fix tx begin") return -1, err } defer tx.Rollback() // ignored if .Comm...
[ -0.43773722648620605, 0.8332521915435791, 0.8853908181190491, -0.22687427699565887, -0.5544499158859253, -0.6883338689804077, 0.3354634940624237, -0.8018418550491333, -0.633935272693634, 1.3927342891693115, -0.3491957187652588, -0.1393468976020813, -0.13677099347114563, 0.11517565697431564...
func m6RewardsAndDatesPart1(db *IndexerDb, state *MigrationState) error { // Cache the round in the migration metastate round, err := db.GetMaxRoundAccounted() if err == idb.ErrorNotInitialized { // Shouldn't end up in the migration if this were the case. round = 0 } else if err != nil { db.log.WithError(err)...
[ 0.19137123227119446, 0.08169715106487274, 0.8164965510368347, -0.6151966452598572, 0.025012101978063583, -0.6115714311599731, 0.10671820491552353, -0.02457340806722641, 0.6379956007003784, 0.4889822006225586, 0.162545844912529, -0.22364220023155212, 0.7081584334373474, -0.05459786951541900...
func updateClose(value uint32, cc createClose) createClose { res := cc if !res.closedValid { res.closedValid = true res.closed = uint32(value) } if !res.deletedValid { res.deletedValid = true res.deleted = true } return res }
[ -0.4284886121749878, -0.3252691626548767, 0.7387436032295227, 0.1355697065591812, -0.7396445870399475, 0.3126809597015381, -0.12084432691335678, -0.6342372894287109, -0.12062077969312668, -0.041033271700143814, 0.5100409388542175, -0.43535956740379333, -1.4719644784927368, 0.39433243870735...
func updateCreate(value uint32, cc createClose) createClose { res := cc res.createdValid = true res.created = uint32(value) if !res.deletedValid { res.deletedValid = true res.deleted = false } return res }
[ -0.30994531512260437, -0.25157245993614197, 0.5503519773483276, 0.5083931684494019, -0.6295382380485535, 0.7289344668388367, -0.4639539420604706, -0.881312906742096, -0.5076051354408264, -0.23065994679927826, 0.08484753966331482, -0.6775251030921936, -1.2001953125, 0.61263507604599, 0.37...
func updateAccountData(address types.Address, round uint32, assetID uint32, stxn types.SignedTxnWithAD, accountData *m7AccountData, assetDataMap map[uint32]createClose) { // Transactions are ordered most recent to oldest, so this makes sure created is set to the // oldest transaction. accountData.account.createdVali...
[ 0.30201637744903564, -0.7147741913795471, 0.6264147758483887, -0.8600609302520752, -0.2667545974254608, 0.1707209050655365, 0.7310720682144165, -0.38188305497169495, 0.7333435416221619, -0.19271619617938995, 0.6803579926490784, 0.35457634925842285, 0.5396028161048889, 0.17634670436382294, ...
func m7RewardsAndDatesPart2UpdateAccounts(db *IndexerDb, accountData []addressAccountData, assetDataMap map[uint32]createClose, txnID txnID, state *MigrationState) error { // Make sure round accounting doesn't interfere with updating these accounts. db.accountingLock.Lock() defer db.accountingLock.Unlock() // Open...
[ 0.039310719817876816, -0.2437819093465805, 0.9796363115310669, -0.2181583046913147, -0.03221062570810318, -0.04578976333141327, 0.5462315082550049, -0.7629045248031616, -0.18631099164485931, 0.30982261896133423, 0.7198403477668762, -0.23952990770339966, 0.27967947721481323, 0.3781363368034...
func getAccountsWithoutTxnData(db *IndexerDb, maxRound uint32, specialAccounts idb.SpecialAccounts, accountsFirstUsed map[sdk_types.Address]txnID) ([]addressAccountData, error) { // Query accounts. res := []addressAccountData{} options := idb.AccountQueryOptions{} options.IncludeDeleted = true db.log.Print("quer...
[ 0.02200649306178093, -0.09431356191635132, 0.7391025424003601, -0.2574824094772339, -0.4118916690349579, -0.5353759527206421, 0.2774991989135742, -0.15320824086666107, 0.91251540184021, -0.1875811517238617, 1.2375391721725464, 0.41180846095085144, 0.19180543720722198, 0.3413299024105072, ...
func m7RewardsAndDatesPart2(db *IndexerDb, state *MigrationState) error { db.log.Print("m7 account cumulative rewards migration starting") // Skip the work if all accounts have previously been updated. if (state.PointerRound == nil) || (*state.PointerRound != 0) || (*state.PointerIntra != 0) { maxRound := uint32(...
[ 0.5603488683700562, -0.24123910069465637, 0.8843876719474792, -0.14710427820682526, -0.2578960955142975, -0.46052873134613037, 0.7152031660079956, -0.15579171478748322, 0.24974298477172852, -0.007625030353665352, 0.4098812937736511, 0.039023831486701965, 0.8385434150695801, 0.5525209307670...
func sqlMigration(db *IndexerDb, state *MigrationState, sqlLines []string) error { db.accountingLock.Lock() defer db.accountingLock.Unlock() nextState := *state nextState.NextMigration++ f := func(ctx context.Context, tx *sql.Tx) error { defer tx.Rollback() for _, cmd := range sqlLines { _, err := tx.Exe...
[ -0.3200792074203491, 0.28453221917152405, 0.7611942887306213, 0.1682095229625702, -0.4460819959640503, -0.3942517638206482, -0.41034701466560364, -0.28129640221595764, 0.18128694593906403, 0.9905404448509216, -0.12232665717601776, -0.733433723449707, 0.35554268956184387, -0.107521541416645...
func (mtxid *txidFiuxpMigrationContext) asyncTxidFixup() (err error) { db := mtxid.db state := mtxid.state db.log.Println("txid fixup migration starting") txns := db.YieldTxns(context.Background(), uint64(state.NextRound)) batch := make([]idb.TxnRow, 15000) txInBatch := 0 roundsInBatch := 0 prevBatchRound := ui...
[ -0.03085213340818882, -0.2201605588197708, 0.9980312585830688, -0.8975836038589478, 0.02823006547987461, -0.586071252822876, 0.6902779936790466, 0.06433802843093872, 0.33303481340408325, 0.961967408657074, 0.03022267110645771, -0.23794811964035034, -0.044164177030324936, 0.1735431253910064...
func m4accountIndices(db *IndexerDb, state *MigrationState) error { sqlLines := []string{ "CREATE INDEX IF NOT EXISTS account_asset_by_addr ON account_asset ( addr )", "CREATE INDEX IF NOT EXISTS asset_by_creator_addr ON asset ( creator_addr )", "CREATE INDEX IF NOT EXISTS app_by_creator ON app ( creator )", "...
[ -0.5648325681686401, -0.25096574425697327, 0.4446428120136261, 0.26266905665397644, 0.22319012880325317, -0.11216183751821518, 0.8193320035934448, -0.14184017479419708, 0.3953026831150055, 0.11306117475032806, 0.48906224966049194, -0.16996929049491882, 0.35123762488365173, 0.21687385439872...
func m5MarkTxnJSONSplit(db *IndexerDb, state *MigrationState) error { sqlLines := []string{ `INSERT INTO metastate (k,v) SELECT 'm5MarkTxnJSONSplit', m.v FROM metastate m WHERE m.k = 'state'`, } return sqlMigration(db, state, sqlLines) }
[ -0.8349271416664124, 0.4650806784629822, 0.36112484335899353, -0.6265589594841003, 0.06590933352708817, -0.5917078852653503, 0.10310853272676468, -0.2890996038913727, 0.3213164210319519, 0.9952729344367981, -0.6754541397094727, -0.5178319811820984, 0.03413037210702896, -0.1573900580406189,...
func m9TxnJSONEncoding(db *IndexerDb, state *MigrationState) (err error) { db.log.Infof("txn json fixup migration starting") row := db.db.QueryRow(`SELECT (v -> 'account_round')::bigint FROM metastate WHERE k = 'm7MarkTxnJSONSplit'`) var lastRound int64 err = row.Scan(&lastRound) if err == sql.ErrNoRows { // Ind...
[ -0.29968005418777466, 0.40350374579429626, 0.7690789103507996, -0.5528920888900757, -0.7013814449310303, -1.3830660581588745, 0.7742032408714294, -0.30908918380737305, 0.4850081205368042, 0.559126615524292, -0.3258307874202728, -0.053098343312740326, 0.07779265940189362, -0.067733444273471...
func updateFrozenState(db *IndexerDb, assetID uint64, closedAt *uint64, creator, freeze, holder types.Address) error { // Semi-blocking migration. // Hold accountingLock for the duration of the Transaction search + account_asset update. db.accountingLock.Lock() defer db.accountingLock.Unlock() minRound := uint64(...
[ -0.7181265950202942, 0.14530953764915466, 0.26832517981529236, -0.017084313556551933, -0.7420234084129333, -0.6209352612495422, 0.30308473110198975, -0.9469608068466187, -0.04984012991189957, 0.30875834822654724, 0.12447960674762726, -0.16707390546798706, -0.4409632980823517, -0.0235374290...
func updateBatch(db *IndexerDb, updateQuery string, data [][]interface{}) error { db.accountingLock.Lock() defer db.accountingLock.Unlock() tx, err := db.db.Begin() if err != nil { return err } defer tx.Rollback() // ignored if .Commit() first update, err := tx.Prepare(updateQuery) if err != nil { return ...
[ -0.5888559818267822, 0.11721816658973694, 0.906918466091156, 0.5528019070625305, -0.13994598388671875, 0.0962241068482399, -0.0085565485060215, -0.14617517590522766, 0.07510031759738922, 0.5066217184066772, 0.7001504898071289, 0.24713678658008575, -0.4805193841457367, 0.3522544503211975, ...
func FixFreezeLookupMigration(db *IndexerDb, state *MigrationState) error { // Technically with this query no transactions are needed, and the accounting state doesn't need to be locked. updateQuery := "INSERT INTO txn_participation (addr, round, intra) VALUES ($1, $2, $3) ON CONFLICT DO NOTHING" query := fmt.Sprint...
[ -0.3220277726650238, 0.21875162422657013, 0.9425438642501831, -0.3576589822769165, -0.33862319588661194, -0.5046497583389282, 1.4742385149002075, -0.29108014702796936, 0.3013208210468292, 0.7595922350883484, 0.12146951258182526, -0.3141978681087494, -0.6534310579299927, 0.34779027104377747...
func ClearAccountDataMigration(db *IndexerDb, state *MigrationState) error { // Clear account_data column for deleted accounts. query := "UPDATE account SET account_data = NULL WHERE deleted = true;" if _, err := db.db.Exec(query); err != nil { return fmt.Errorf("error clearing deleted accounts: %v", err) } // ...
[ -0.3580736815929413, 0.5553070902824402, 0.5481346845626831, -0.0769733116030693, -0.29484477639198303, -0.03606440871953964, 1.0361589193344116, -0.27209705114364624, 0.6572702527046204, 0.6843344569206238, 0.22633692622184753, 0.3552466928958893, 0.8868682384490967, -0.3669435381889343, ...
func MakeDeletedNotNullMigration(db *IndexerDb, state *MigrationState) error { queries := []string{ "UPDATE account SET deleted = false WHERE deleted is NULL", "ALTER TABLE account ALTER COLUMN deleted SET NOT NULL", "UPDATE account_asset SET deleted = false WHERE deleted is NULL", "ALTER TABLE account_asset A...
[ 1.066847324371338, -0.2649984657764435, 0.686682403087616, 0.27748969197273254, -0.4379291534423828, -0.39402493834495544, 0.09553968906402588, -0.4705011248588562, 1.547620415687561, -0.5149043798446655, -0.266978919506073, -0.3581055700778961, 0.6570919752120972, 0.25519290566444397, -...
func (*MetricsCollection) XXX_OneofWrappers() []interface{} { return []interface{}{ (*MetricsCollection_NetworkDevice)(nil), (*MetricsCollection_Task)(nil), } }
[ -0.8330135345458984, 0.748642086982727, 0.3691712021827698, 0.15356191992759705, 0.5622886419296265, 0.47706159949302673, 1.3374497890472412, -1.040669322013855, 0.3744891881942749, -0.06670334190130234, 0.09970615059137344, -0.16067349910736084, 0.1714531034231186, 1.0392029285430908, 0...
func (*MetricsData) XXX_OneofWrappers() []interface{} { return []interface{}{ (*MetricsData_BoolValue)(nil), (*MetricsData_StringValue)(nil), (*MetricsData_Int64Value)(nil), (*MetricsData_DoubleValue)(nil), (*MetricsData_DistributionValue)(nil), } }
[ -0.7549847364425659, 0.49211984872817993, 0.39450520277023315, 0.02744215913116932, 0.3539046347141266, 0.8990996479988098, -0.018890658393502235, -0.5996629595756531, 0.45549190044403076, -0.148024782538414, 0.332001268863678, 0.5045864582061768, 0.12839995324611664, 0.757279098033905, ...
func (*MetricsData_MetricField) XXX_OneofWrappers() []interface{} { return []interface{}{ (*MetricsData_MetricField_StringValue)(nil), (*MetricsData_MetricField_Int64Value)(nil), (*MetricsData_MetricField_BoolValue)(nil), } }
[ -0.97221839427948, 0.6901993751525879, 0.3598296642303467, -0.2525850236415863, 0.7079817056655884, 0.9975645542144775, 0.3891930878162384, -0.7241197824478149, 0.07319086790084839, 0.3859042227268219, 0.19934901595115662, 0.1632615178823471, -0.14905856549739838, 0.31706881523132324, 0....
func (*MetricsData_Distribution) XXX_OneofWrappers() []interface{} { return []interface{}{ (*MetricsData_Distribution_LinearBuckets)(nil), (*MetricsData_Distribution_ExponentialBuckets)(nil), (*MetricsData_Distribution_ExplicitBuckets)(nil), } }
[ -0.6391996145248413, 0.391391396522522, 0.2814481556415558, 0.05039827153086662, 0.7440235614776611, 0.631588339805603, 0.0796579122543335, -0.31428053975105286, 0.459415465593338, -0.5202462673187256, 0.08366743475198746, 0.38933661580085754, 0.678796112537384, 0.4719880223274231, 0.507...
func dqrt13(scale, m, n int, a *mat.Matrix, iseed []int) (float64, []int) { var bignum, norma, one, smlnum float64 var j int var err error dummy := vf(1) one = 1.0 if m <= 0 || n <= 0 { return norma, iseed } // benign matrix for j = 1; j <= n; j++ { golapack.Dlarnv(2, &iseed, m, a.Off(0, j-1).Vecto...
[ 0.12685450911521912, -0.22922292351722717, 0.5847348570823669, -0.508898138999939, -0.2366729974746704, -0.4640279710292816, -0.13424380123615265, -0.31168225407600403, 0.5290573239326477, 1.0525554418563843, 0.5668047070503235, 0.1694474071264267, -0.6951456069946289, 0.04614778235554695,...
func InsertionSortSwap(a []int) { for i := 1; i < len(a); i++ { k := i for k > 0 && a[k] < a[k-1] { a[k], a[k-1] = a[k-1], a[k] k-- } } }
[ -0.9754927754402161, 0.6067022681236267, 0.6458746194839478, -0.487714558839798, -0.5665822625160217, 0.5130980610847473, 1.1624870300292969, 0.7703303694725037, 0.13866743445396423, 0.4014418423175812, 0.3389348089694977, 0.2803857624530792, -0.6679677963256836, 0.5309404134750366, -0.2...
func InsertionSortSwapOnce(a []int) { for i := 1; i < len(a); i++ { v := a[i] k := i for k > 0 && v < a[k-1] { a[k] = a[k-1] k-- } a[k] = v } }
[ -0.8884239792823792, 1.0396208763122559, 0.8600562810897827, -0.4973129630088806, -0.4492376744747162, -0.07924015074968338, 1.2320533990859985, 1.0216213464736938, 0.2852559983730316, 0.8126480579376221, 0.295491486787796, -0.07745082676410675, -1.0465974807739258, 0.4964144825935364, -...
func InsertionSortShift(a []int) { for i := 1; i < len(a); i++ { k := i temp := a[i] for k > 0 && a[i] < a[k-1] { k-- } for m := i; m > k; m-- { a[m] = a[m-1] } a[k] = temp } }
[ -0.3380799889564514, 0.32559844851493835, 0.6345163583755493, -0.03166961297392845, -0.6675979495048523, 0.8369430303573608, 1.1969571113586426, 0.19723285734653473, 0.025978131219744682, 0.5824820399284363, 0.3412269055843353, 0.2498384416103363, -0.8975018858909607, 0.9328881502151489, ...
func ReadImports(proj *report.Project, filePath string) error { imports := make(map[string]int) err := filepath.Walk(filePath, func(path string, info os.FileInfo, err error) error { if err != nil { return err } if info.IsDir() { fset := token.NewFileSet() projAST, err := parser.ParseDir(fset,...
[ -0.09785395115613937, 0.020100004971027374, 0.8426694869995117, -0.334945946931839, 0.28753775358200073, 0.6517866849899292, 0.9320366382598877, 0.015977846458554268, -0.7063800692558289, 0.6752959489822388, -0.12064364552497864, -0.44943156838417053, -0.605101466178894, 1.0245871543884277...
func main() { defer interrupts.WaitForGracefulShutdown() o := gatherOptions(flag.NewFlagSet(os.Args[0], flag.ExitOnError), os.Args[1:]...) if err := o.Validate(); err != nil { logrus.WithError(err).Fatal("Invalid options") } if o.jsonLog { logrus.SetFormatter(logrusutil.CreateDefaultFormatter()) } control...
[ 0.6960164904594421, -0.15109069645404816, 0.921059787273407, -0.05668742209672928, 0.7216165661811829, 0.5049842596054077, 0.6681291460990906, 0.549647867679596, -0.7988788485527039, -0.37241727113723755, -0.04878951609134674, 0.15249405801296234, 0.29786333441734314, 0.8680171966552734, ...
func SetAPI(url string, secretParam string) { BaseUrl = url secret = secretParam }
[ -0.3690994679927826, -0.6360699534416199, 0.32706567645072937, 1.1124686002731323, 0.08045940101146698, 0.20156769454479218, -1.0162829160690308, 1.0732712745666504, -0.7264294028282166, -0.14149126410484314, -1.359147310256958, 0.5422777533531189, 0.08079740405082703, 0.3354552388191223, ...
func CreateMeeting(meetingRoom *dataStructs.MeetingRoom) (string, error) { if meetingRoom.Name_ == "" { return "", errors.New("meeting name cannot be empty") } if meetingRoom.MeetingID_ == "" { return "", errors.New("meeting ID cannot be empty") } if meetingRoom.AttendeePW_ == "" { return "", errors.New("a...
[ -0.8665364980697632, -0.34238889813423157, 0.9072777032852173, -0.15118858218193054, -0.5052552819252014, 0.14680132269859314, -0.9069026708602905, -0.02837231196463108, -0.40030160546302795, 1.0228257179260254, 0.33200696110725403, 0.25689423084259033, -0.6838054656982422, 1.0020983219146...
func GetJoinURL(participants *dataStructs.Participants) (string, error) { if err := participants.IsValid(); err != nil { return "", err } fullName := "fullName=" + url.QueryEscape(participants.FullName_) meetingID := "&meetingID=" + url.QueryEscape(participants.MeetingID_) password := "&password=" + url.QueryEs...
[ -0.2508505582809448, -0.30345165729522705, 1.0082460641860962, 0.3078394830226898, -0.6416719555854797, 0.11282876878976822, -0.10950379818677902, 0.17295466363430023, -0.4266775846481323, 0.424125611782074, 0.011181212030351162, -0.5582025647163391, -0.9651208519935608, 0.3824753761291504...
func IsMeetingRunning(meetingID string) (bool, error) { checksum := helpers.GetChecksum("isMeetingRunning" + "meetingID=" + meetingID + secret) getURL := BaseUrl + "isMeetingRunning?" + "meetingID=" + meetingID + "&checksum=" + checksum response, err := helpers.HttpGet(getURL) if err != nil { return false, err }...
[ -0.976368248462677, -0.19814641773700714, 0.6236713528633118, 0.3749483525753021, -0.1787712723016739, -0.00830894149839878, -1.2656869888305664, 0.6274317502975464, -0.13705715537071228, 0.490262895822525, 0.21196909248828888, 0.6364925503730774, -1.3188250064849854, 0.5365398526191711, ...
func EndMeeting(meetingId string, modPw string) (string, error) { meetingID := "meetingID=" + url.QueryEscape(meetingId) modPW := "&password=" + url.QueryEscape(modPw) param := meetingID + modPW checksum := helpers.GetChecksum("end" + param + secret) getURL := BaseUrl + "end?" + param + "&checksum=" + checksum ...
[ -0.9201402068138123, -0.049585338681936264, 0.799390971660614, -0.3444155752658844, -0.44367513060569763, 0.24105893075466156, -1.2604131698608398, 0.19235825538635254, -0.12577643990516663, 1.0267869234085083, 0.7449681758880615, 0.6051732301712036, -1.3180947303771973, 1.0879673957824707...
func GetMeetingInfo(meetingId string, modPw string, responseXML *dataStructs.GetMeetingInfoResponse) (string, error) { meetingID := "meetingID=" + url.QueryEscape(meetingId) modPW := "&password=" + url.QueryEscape(modPw) param := meetingID + modPW checksum := helpers.GetChecksum("getMeetingInfo" + param + secret) ...
[ -0.3655233085155487, -0.3792404532432556, 0.94730144739151, 0.28642794489860535, -0.5122020244598389, 0.15195342898368835, -1.2355473041534424, -0.3966279625892639, 0.08689208328723907, 0.23857048153877258, 0.43096524477005005, 0.5465487241744995, -0.9460833072662354, 0.7457032203674316, ...
func GetMeetings() (dataStructs.GetMeetingsResponse, error) { checksum := helpers.GetChecksum("getMeetings" + secret) getURL := BaseUrl + "getMeetings?" + "&checksum=" + checksum response, err := helpers.HttpGet(getURL) if err != nil { return dataStructs.GetMeetingsResponse{}, err } var XMLResp dataStructs.Get...
[ -0.8106884956359863, 0.40274447202682495, 0.8494114279747009, 0.11848213523626328, -0.10568834096193314, -0.7568074464797974, -0.8027893900871277, -0.7545042037963867, 0.5633437037467957, -0.027070628479123116, 0.17401212453842163, 0.17057670652866364, -1.0896958112716675, 0.25294464826583...
func GetRecordings(meetingId string, recordId string, metachannelid string) (dataStructs.GetRecordingsResponse, string, error) { meetingID := "meetingID=" + url.QueryEscape(meetingId) recordid := "&recordID=" + url.QueryEscape(recordId) var param string switch { case metachannelid != "": metaChannelId := "meta_c...
[ -0.6799972057342529, 0.9270145297050476, 1.0891544818878174, 0.16518159210681915, -0.3232754170894623, -0.4934838116168976, -0.7461497783660889, -0.27860209345817566, 0.32961297035217285, 0.6082334518432617, 0.20006297528743744, 0.48150888085365295, -0.8132070302963257, 0.9037602543830872,...
func BenchmarkStreamPipeline(b *testing.B) { b.ReportAllocs() numbers := gen(1_000_000) for i := 0; i < b.N; i++ { for _, num := range numbers { sMultiply(sAdd(sMultiply(num, 2), 1), 2) } } }
[ 0.3027755320072174, 1.1020599603652954, 0.4926220178604126, 0.2646508812904358, 1.0335332155227661, -0.5426447987556458, 1.3808844089508057, 0.13276918232440948, -0.32010993361473083, -0.06238533928990364, -0.4050619304180145, 0.24289000034332275, 0.11413214355707169, 1.2924867868423462, ...
func BenchmarkBatchPipeline(b *testing.B) { numbers := gen(1_000_000) b.ReportAllocs() for i := 0; i < b.N; i++ { for range bMultiply(bAdd(bMultiply(numbers, 2), 1), 2) { } } }
[ 0.4964136481285095, 0.45085495710372925, 0.4825996160507202, 0.045932210981845856, 1.229627013206482, -0.07263302057981491, 0.4720926880836487, 0.30317482352256775, -0.8484498858451843, -0.26793065667152405, -0.18604905903339386, 0.1830866038799286, 0.4972766041755676, 1.2212625741958618, ...
func (*GetServiceARequest) Descriptor() ([]byte, []int) { return file_protos_svca_service_proto_rawDescGZIP(), []int{0} }
[ -0.48932403326034546, 0.5763924717903137, 0.9048447608947754, 0.8680315613746643, -0.09370031207799911, -0.5036258101463318, 0.971291184425354, 0.08330093324184418, -0.0019048342946916819, -0.6026158928871155, -0.19992195069789886, 0.8897135853767395, -0.06065930426120758, 1.02652788162231...
func (*GetServiceAResponse) Descriptor() ([]byte, []int) { return file_protos_svca_service_proto_rawDescGZIP(), []int{1} }
[ -0.21185000240802765, 0.46217456459999084, 0.5292162895202637, 0.8323508501052856, -0.0043915086425840855, -0.7828948497772217, 1.1056890487670898, -0.007933142594993114, 0.09555750340223312, -0.6980092525482178, -0.6862718462944031, 0.19640298187732697, -1.1740946769714355, 0.113944172859...
func (*ServiceAResponse) Descriptor() ([]byte, []int) { return file_protos_svca_service_proto_rawDescGZIP(), []int{2} }
[ -0.21844802796840668, 0.22077666223049164, 0.31467539072036743, 0.1671607345342636, -0.11785683780908585, -0.7472000122070312, 0.5955421328544617, -0.459806352853775, -0.02328130416572094, -0.6167108416557312, -0.23222686350345612, 0.01314833015203476, -0.7849318385124207, 0.41320157051086...
func (*Logging) Descriptor() ([]byte, []int) { return file_google_api_logging_proto_rawDescGZIP(), []int{0} }
[ -0.8636559844017029, 0.7290331721305847, 0.5312970876693726, -0.14368127286434174, -0.46761971712112427, 0.27245426177978516, 0.3982884883880615, -0.04011409729719162, -0.10370206087827682, -0.21739493310451508, -0.5153316259384155, -0.036964692175388336, 0.3564903140068054, 0.390670835971...
func (*Logging_LoggingDestination) Descriptor() ([]byte, []int) { return file_google_api_logging_proto_rawDescGZIP(), []int{0, 0} }
[ -1.0982722043991089, 0.4862239360809326, 0.17478595674037933, -0.4919445216655731, -0.5000383853912354, 0.001892983797006309, -0.20211161673069, 0.0486106239259243, 0.04873938858509064, -0.39770472049713135, -0.5207741260528564, 0.19899266958236694, 0.13266627490520477, -0.1016336753964424...
func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router, cdc *codec.Codec, storeName string) { r.HandleFunc(fmt.Sprintf("/%s/buy_card_scheme", storeName), buyCardSchemeHandler(cdc, cliCtx)).Methods(http.MethodPost) r.HandleFunc(fmt.Sprintf("/%s/save_card_content", storeName), saveCardContentHandler(cdc, cliCtx))...
[ -0.7365737557411194, 0.5254817008972168, 0.6783488392829895, 0.18372726440429688, 0.3587610721588135, -0.1825564056634903, 0.4854698181152344, -0.03301771730184555, 0.026541531085968018, -0.4914776086807251, -0.35645830631256104, -0.6003205180168152, 0.5138766765594482, 0.07417216897010803...
func (b *Blob) Copy(sourceBlob string, options *CopyOptions) error { copyID, err := b.StartCopy(sourceBlob, options) if err != nil { return err } return b.WaitForCopy(copyID) }
[ 0.24845349788665771, -0.4634595513343811, 0.319397509098053, 1.6195605993270874, -0.5999076962471008, 1.0727565288543701, 0.4303193688392639, -0.23250579833984375, -0.05486951023340225, 0.7289353013038635, -0.5839625597000122, -0.3817645013332367, -0.7826124429702759, -0.47966116666793823,...
func (b *Blob) StartCopy(sourceBlob string, options *CopyOptions) (string, error) { params := url.Values{} headers := b.Container.bsc.client.getStandardHeaders() headers["x-ms-copy-source"] = sourceBlob headers = b.Container.bsc.client.addMetadataToHeaders(headers, b.Metadata) if options != nil { params = addTi...
[ -0.3720805048942566, 0.11833269894123077, 1.2277560234069824, 0.4584420323371887, -0.5208814740180969, -0.2743319869041443, 0.26537466049194336, -0.0778125450015068, -0.215413898229599, 0.6264042854309082, 0.06553276628255844, 0.569880485534668, -0.41266483068466187, -0.3618831932544708, ...
func (b *Blob) AbortCopy(copyID string, options *AbortCopyOptions) error { params := url.Values{ "comp": {"copy"}, "copyid": {copyID}, } headers := b.Container.bsc.client.getStandardHeaders() headers["x-ms-copy-action"] = "abort" if options != nil { params = addTimeout(params, options.Timeout) headers =...
[ -0.5851346850395203, -0.4721565544605255, 0.7585451006889343, 0.13652874529361725, -0.9513570666313171, 0.0781412348151207, 0.1297788769006729, -0.9457581639289856, 0.34090322256088257, 1.1091424226760864, 0.5398452281951904, 0.39735355973243713, -0.9972098469734192, -0.4966718256473541, ...
func (b *Blob) WaitForCopy(copyID string) error { for { err := b.GetProperties(nil) if err != nil { return err } if b.Properties.CopyID != copyID { return errBlobCopyIDMismatch } switch b.Properties.CopyStatus { case blobCopyStatusSuccess: return nil case blobCopyStatusPending: continue ...
[ 0.1446983516216278, -0.8057940602302551, 0.6118630766868591, 0.21217286586761475, -0.5787394642829895, 0.17451165616512299, -0.37431299686431885, -0.4789610505104065, -0.12155069410800934, 0.19364745914936066, 0.2140166461467743, -0.3793177306652069, -0.07804112136363983, 0.075690008699893...
func (b *Blob) IncrementalCopyBlob(sourceBlobURL string, snapshotTime time.Time, options *IncrementalCopyOptions) (string, error) { params := url.Values{"comp": {"incrementalcopy"}} // need formatting to 7 decimal places so it's friendly to Windows and *nix snapshotTimeFormatted := snapshotTime.Format("2006-01-02T1...
[ -0.48642876744270325, 0.389083594083786, 1.019016981124878, 0.1353713721036911, -1.234735131263733, 0.1439037024974823, 0.11965320259332657, -0.14993759989738464, 0.13748173415660858, 0.7482814788818359, -0.2589217722415924, 0.32363003492355347, -0.16281171143054962, -0.7709967494010925, ...
func (n *Node) Attr(ctx context.Context, a *fuse.Attr) error { n.log.Attr(ctx, a) if rawnd, ok := n.Nd.(*mdag.RawNode); ok { a.Mode = 0444 a.Size = uint64(len(rawnd.RawData())) a.Blocks = 1 return nil } if n.cached == nil { if err := n.loadData(); err != nil { return fmt.Errorf("readonly: loadData() f...
[ -0.4733056128025055, -0.4250470995903015, 0.5776714086532593, -1.349751591682434, -0.6022043824195862, -0.3743644952774048, 0.6643730401992798, 0.07209106534719467, -0.022212479263544083, -0.6709664463996887, 0.4408622086048126, 1.0793328285217285, 1.3041422367095947, 0.8363487720489502, ...
func (n *Node) Lookup(ctx context.Context, name string) (fs.Node, error) { n.log.Lookup(ctx, name) link, _, err := uio.ResolveUnixfsOnce(ctx, n.Ipfs.DAG, n.Nd, []string{name}) switch err { case os.ErrNotExist, mdag.ErrLinkNotFound: // todo: make this error more versatile. return nil, fuse.ENOENT default: n.l...
[ -0.43799734115600586, 0.4341244399547577, 0.7348299026489258, -0.8744286298751831, 0.006146854255348444, -0.8281731009483337, -0.017769038677215576, 0.20141363143920898, 0.44649121165275574, -0.5202130675315857, 0.5841559171676636, 0.34039220213890076, 0.042732711881399155, -0.952696442604...
func (n *Node) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error) { n.log.Debug("Node ReadDir") dir, err := uio.NewDirectoryFromNode(n.Ipfs.DAG, n.Nd) if err != nil { return nil, err } var entries []fuse.Dirent err = dir.ForEachLink(ctx, func(lnk *ipld.Link) error { name := lnk.Name if len(name) == 0 {...
[ -0.6506326794624329, -0.6460500955581665, 0.742551863193512, -0.17377625405788422, -0.014907573349773884, -0.03536712005734444, -0.19344347715377808, 0.39312058687210083, -0.3860653340816498, -0.47539329528808594, 0.5321013331413269, 0.8060147166252136, 0.8187383413314819, 0.52573722600936...
func SendPostRequest(url, endpoint, jsonStr string) (int, error) { req, err := http.NewRequest(http.MethodPost, fmt.Sprintf("%s%s", url, endpoint), bytes.NewBuffer([]byte(jsonStr))) resp, err := http.DefaultClient.Do(req) if err != nil { return 0, err } defer resp.Body.Close() return resp.StatusCode, nil }
[ -0.8242322206497192, 0.09280508756637573, 1.0499114990234375, -0.3094939887523651, -0.4557276666164398, -0.4711475968360901, -0.7362384796142578, -0.2353832870721817, -0.7735796570777893, 0.5143190622329712, -0.6664813756942749, -0.18422825634479523, -0.8777949213981628, 0.1791743338108062...
func SendDelRequest(url, endpoint, key string) (int, error) { req, err := http.NewRequest(http.MethodDelete, fmt.Sprintf("%s%s/%s", url, endpoint, key), nil) if err != nil { return 0, err } resp, err := http.DefaultClient.Do(req) if err != nil { return 0, err } defer resp.Body.Close() return resp.StatusCo...
[ -0.6536421775817871, 0.3817586302757263, 1.0203527212142944, 0.07096616178750992, -0.04313284531235695, -0.41106921434402466, -0.46261292695999146, 0.279144823551178, -0.08346042782068253, 0.6685692071914673, -0.10414045304059982, 0.5848827362060547, -1.1803765296936035, -0.514273285865783...
func SendPutRequest(url, endpoint, key, jsonStr string) (int, error) { req, err := http.NewRequest(http.MethodPut, fmt.Sprintf("%s%s/%s", url, endpoint, key), bytes.NewBuffer([]byte(jsonStr))) if err != nil { return 0, err } resp, err := http.DefaultClient.Do(req) if err != nil { return 0, err } defer resp....
[ -1.5742919445037842, 0.2662346661090851, 0.9261074662208557, -0.8480997681617737, -0.6385278701782227, -0.6544483304023743, -0.043422143906354904, -0.3024646043777466, -0.6973567008972168, 1.0879327058792114, -0.43583422899246216, 0.41188833117485046, -1.1595103740692139, -0.40713402628898...
func Add(mgr manager.Manager) error { return add(mgr, newReconciler(mgr)) }
[ -0.24057555198669434, 0.12229465693235397, 0.46777674555778503, -0.6655282378196716, 0.4479011595249176, -0.17455056309700012, -0.48020607233047485, 0.6828829646110535, 0.19666412472724915, -0.7739230394363403, 0.224630668759346, 0.617239773273468, -1.010264277458191, 1.3228338956832886, ...
func add(mgr manager.Manager, r reconcile.Reconciler) error { // Create a new controller c, err := controller.New("mutatingwebhook-controller", mgr, controller.Options{Reconciler: r}) if err != nil { return err } // Watch secret err = c.Watch(&source.Kind{Type: &corev1.Secret{}}, &handler.EnqueueRequestsFromMa...
[ 0.24458785355091095, -0.33906233310699463, 0.7372164130210876, 0.01209380105137825, 0.2562181353569031, -0.2742045819759369, 0.37592554092407227, 0.02774694561958313, 0.3845753073692322, 0.2086988091468811, -0.10107998549938202, 0.4930271506309509, 0.2183888852596283, 1.3303388357162476, ...
func (r *reconciler) Reconcile(request reconcile.Request) (reconcile.Result, error) { logger := log.WithValues("WebhookConfig", request.Name) logger.Info("reconciling MutatingWebhookConfiguration") // get current webhook config currentConfig := &v1beta1.MutatingWebhookConfiguration{} err := r.Client.Get(context.TO...
[ -0.33375826478004456, -0.47428229451179504, 0.8145949840545654, 0.6834667921066284, 0.367103636264801, -0.05360504984855652, 0.13853001594543457, -0.4670732617378235, -0.26214495301246643, 0.7042934894561768, 0.1423492133617401, 0.1779417097568512, -0.8399216532707214, 0.9165037870407104, ...