text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func decodeTLV(data []byte) (map[string]string, error) {
result := map[string]string{}
if len(data) == 0 {
return result, errors.New("Data length is 0.")
}
// Ugly, but simplifies flow with the "value, err :=" pattern.
cursor := 0
var fieldType string
var fieldNumber string
var fieldLength int
... | [
-0.6120802760124207,
-0.35150429606437683,
0.7279714941978455,
-0.39461907744407654,
-0.5051530599594116,
-0.6422198414802551,
0.253343790769577,
0.11585583537817001,
-0.14934749901294708,
-0.5234965085983276,
-1.1451587677001953,
-0.4039793610572815,
0.20040033757686615,
0.278957724571228... |
func (Map) Build(vt ValueType, from, to string) *Map {
return &Map{
Type: vt,
From: strings.Split(from, "."),
To: strings.Split(to, "."),
}
} | [
-1.1481785774230957,
-1.699288010597229,
0.4489279091358185,
-0.5273227095603943,
-0.3286339342594147,
-0.0668603852391243,
-0.927003800868988,
-0.25707268714904785,
0.06304934620857239,
-0.7524735927581787,
0.11398181319236755,
1.06974196434021,
0.499767541885376,
-0.940504789352417,
-0... |
func (c Code) Str() string {
return string(c.Chars)
} | [
0.49659839272499084,
-0.05238477885723114,
-0.033163439482450485,
-0.03640173375606537,
-0.5429030060768127,
0.4914739727973938,
0.24086956679821014,
-0.009544998407363892,
-0.06359923630952835,
-0.3886668086051941,
0.10090500861406326,
0.3748317360877991,
0.11687317490577698,
0.2984064817... |
func Ansi(c int) []byte {
return ansi[c].Chars
} | [
0.5497563481330872,
0.07596083730459213,
0.3557668626308441,
-0.5188214182853699,
-1.4027034044265747,
-1.1673685312271118,
-1.1701700687408447,
-0.7499753832817078,
-1.011354684829712,
0.40426012873649597,
-2.082681655883789,
0.12351280450820923,
0.6370270848274231,
-0.30082786083221436,
... |
func Colored(c int, b []byte) []byte {
return concat(ansi[c].Chars, b, ansi[Reset].Chars)
} | [
0.6386914253234863,
0.07919881492853165,
0.2877527177333832,
-0.5328837633132935,
-0.5474910140037537,
0.27949100732803345,
-1.5836607217788696,
-1.082784652709961,
-0.13589441776275635,
0.8980717062950134,
-0.39331910014152527,
1.7688722610473633,
-0.18839816749095917,
-0.1222048252820968... |
func SetCursor(pos int) []byte {
p := []byte(fmt.Sprintf("%d", pos))
return concat(dup(ansi[Cr].Chars), open, p, dir[Rgt])
} | [
-0.8705074787139893,
-0.26766282320022583,
0.3924689292907715,
-0.6725663542747498,
-1.1389758586883545,
-0.2587425112724304,
-0.5172984600067139,
0.13199104368686676,
-0.13094434142112732,
0.07182299345731735,
-0.9884649515151978,
0.40265214443206787,
0.40399810671806335,
0.07142104953527... |
func MoveCursor(pos int, d int) []byte {
p := []byte(fmt.Sprintf("%d", pos))
return concat(open, p, dir[d])
} | [
-1.210758090019226,
-0.6911471486091614,
0.5270211696624756,
-0.2760699689388275,
-1.1649116277694702,
-0.18934199213981628,
-0.46005240082740784,
0.12152566015720367,
-0.07007765024900436,
0.6882022023200989,
-0.18409186601638794,
-0.04029165580868721,
0.5255141258239746,
-0.1341472864151... |
func Deansi(b []byte) []byte {
for _, k := range ansi {
b = bytes.Replace(b, k.Chars, []byte(k.Hint), 99)
}
for m := regCrsr.FindSubmatch(b); len(m) > 0; m = regCrsr.FindSubmatch(b) {
var name string
if bytes.Equal(m[2], dir[Rgt]) {
name = "rgt"
} else {
name = "lft"
}
tag := tag(name, m[1])
b = ... | [
0.3614289164543152,
-0.5566446781158447,
0.6256123185157776,
0.3630247414112091,
-0.35528314113616943,
-0.932574450969696,
-0.17128300666809082,
0.37107715010643005,
-0.0021736882627010345,
0.38036349415779114,
-0.6028885245323181,
0.19687414169311523,
-0.19620677828788757,
0.1172150373458... |
func NewStore(config *goComMgo.Config, logger *log.Logger) (*Client, error) {
client := Client{}
store, err := goComMgo.NewStoreClient(config, logger)
client.StoreClient = store
return &client, err
} | [
0.668777346611023,
-0.02006279118359089,
0.13549141585826874,
0.0521194264292717,
-0.6513484120368958,
0.05197715386748314,
0.38709554076194763,
-0.4009915292263031,
0.12265454232692719,
-0.23259004950523376,
-0.11161475628614426,
0.6568998098373413,
-1.3213900327682495,
0.0137005858123302... |
func mgoConfirmationsCollection(c *Client) *mongo.Collection {
return c.Collection(confirmationsCollection)
} | [
0.14725200831890106,
-0.40071597695350647,
0.30122828483581543,
0.5905099511146545,
-0.1879284381866455,
0.3393138349056244,
0.2727877199649811,
-0.23407821357250214,
-1.2055275440216064,
0.4954134523868561,
-0.1491307020187378,
0.1834777295589447,
0.13821391761302948,
1.5115563869476318,
... |
func (c *Client) UpsertConfirmation(ctx context.Context, confirmation *models.Confirmation) error {
options := options.Update().SetUpsert(true)
update := bson.D{{"$set", confirmation}}
_, err := mgoConfirmationsCollection(c).UpdateOne(ctx, bson.M{"_id": confirmation.Key}, update, options)
return err
} | [
-0.7729992270469666,
0.02652924880385399,
0.47005748748779297,
0.8770303130149841,
0.022379830479621887,
-0.1586182564496994,
0.43262889981269836,
-0.15563789010047913,
-0.3682642877101898,
1.9628816843032837,
-1.0979790687561035,
-0.2350594401359558,
-0.7071915864944458,
0.733265578746795... |
func (c *Client) FindConfirmation(ctx context.Context, confirmation *models.Confirmation) (result *models.Confirmation, err error) {
var query bson.M = bson.M{}
if confirmation.Email != "" {
regexFilter := primitive.Regex{Pattern: fmt.Sprintf("^%s$", regexp.QuoteMeta(confirmation.Email)), Options: "i"}
query["e... | [
0.269601970911026,
-0.025356566533446312,
0.6431976556777954,
1.0897111892700195,
0.07330551743507385,
-0.16096824407577515,
0.43347907066345215,
-0.6639338731765747,
-0.9389588236808777,
1.1986850500106812,
-0.14634934067726135,
-0.504250705242157,
-1.1001083850860596,
1.1383192539215088,... |
func (c *Client) FindConfirmations(ctx context.Context, confirmation *models.Confirmation, statuses []models.Status, types []models.Type) (results []*models.Confirmation, err error) {
var query bson.M = bson.M{}
if confirmation.Email != "" {
regexFilter := primitive.Regex{Pattern: fmt.Sprintf("^%s$", regexp.Quote... | [
-0.0807100459933281,
0.02175421640276909,
0.5924405455589294,
1.3249857425689697,
0.2805993854999542,
-0.0015161916380748153,
0.45369353890419006,
-0.6487192511558533,
-1.5192980766296387,
0.9555410742759705,
-0.17375487089157104,
-0.5243639349937439,
-0.8215330839157104,
1.685042381286621... |
func (c *Client) RemoveConfirmation(ctx context.Context, confirmation *models.Confirmation) error {
if _, err := mgoConfirmationsCollection(c).DeleteOne(ctx, bson.M{"_id": confirmation.Key}); err != nil {
return err
}
return nil
} | [
-0.6752296686172485,
0.2272200882434845,
0.10685546696186066,
0.9215019345283508,
-0.3431946635246277,
-0.04157683998346329,
0.40589457750320435,
0.46542617678642273,
-0.3697778582572937,
1.5936903953552246,
-0.966878354549408,
-0.8139657378196716,
-0.7336943745613098,
0.7237245440483093,
... |
func (c *Client) Update(ctx context.Context, id string, params *razorpay.PaymentUpdateParams) (*razorpay.Payment, error) {
payment := &razorpay.Payment{}
err := c.Call(ctx, http.MethodPatch, "/payments/"+id, params, payment)
return payment, err
} | [
-0.20670156180858612,
-0.6581626534461975,
0.15338335931301117,
-0.10622093081474304,
-0.31330570578575134,
-0.11623506993055344,
-1.1157617568969727,
-1.0023164749145508,
0.8596357703208923,
0.11105375736951828,
0.6498926877975464,
0.5785019993782043,
-1.0632656812667847,
-0.0850983336567... |
func (c *Client) Capture(ctx context.Context, id string, params *razorpay.PaymentCaptureParams) (*razorpay.Payment, error) {
payment := &razorpay.Payment{}
err := c.Call(ctx, http.MethodPost, "/payments/"+id+"/capture", params, payment)
return payment, err
} | [
-0.3422284722328186,
0.08465901762247086,
0.41829952597618103,
0.6537424921989441,
-0.31374499201774597,
-0.5037898421287537,
-0.7881362438201904,
-1.493104338645935,
1.2715798616409302,
-0.0037779929116368294,
0.3378370404243469,
1.088884949684143,
-0.0953342393040657,
0.3730466961860657,... |
func (c *Client) Get(ctx context.Context, id string, params *razorpay.GetParams) (*razorpay.Payment, error) {
if params == nil {
params = &razorpay.GetParams{}
}
payment := &razorpay.Payment{}
err := c.Call(ctx, http.MethodGet, "/payments/"+id, params, payment)
return payment, err
} | [
-0.23916774988174438,
0.03484594076871872,
0.38750290870666504,
-0.2990488111972809,
0.6844204068183899,
-0.5930290222167969,
-0.9407906532287598,
-0.8891273736953735,
0.39116328954696655,
-0.03339935094118118,
0.8905395269393921,
1.304355502128601,
-0.6467960476875305,
0.2873813211917877,... |
func (c *Client) List(ctx context.Context, params *razorpay.PaymentListParams) (*razorpay.PaymentList, error) {
if params == nil {
params = &razorpay.PaymentListParams{}
}
paymentList := &razorpay.PaymentList{}
err := c.Call(ctx, http.MethodGet, "/payments", params, paymentList)
return paymentList, err
} | [
-0.5144996643066406,
0.064779132604599,
0.4890982508659363,
0.34105080366134644,
0.6902363896369934,
-0.7107269167900085,
-0.7887815237045288,
-0.47689348459243774,
0.6309783458709717,
0.29076167941093445,
-0.23812277615070343,
0.5556070804595947,
-0.26473692059516907,
0.8076234459877014,
... |
func (c *Client) GetCard(ctx context.Context, paymentID string) (*razorpay.Card, error) {
card := &razorpay.Card{}
err := c.Call(ctx, http.MethodGet, "/payments/"+paymentID+"/card", nil, card)
return card, err
} | [
0.1876542568206787,
0.5612785816192627,
0.392905056476593,
0.042325086891651154,
0.5675615668296814,
-0.31920817494392395,
-1.1799139976501465,
-0.9336199760437012,
1.130091667175293,
0.0026175458915531635,
0.9397786855697632,
1.1808844804763794,
-0.40737172961235046,
0.27898159623146057,
... |
func (c *Client) CreateRefund(ctx context.Context, paymentID string, params *razorpay.RefundCreateParams) (*razorpay.Refund, error) {
refund := &razorpay.Refund{}
err := c.Call(ctx, http.MethodPost, "/payments/"+paymentID+"/refund", params, refund)
return refund, err
} | [
0.23025742173194885,
-0.009945273399353027,
0.3321864902973175,
0.175899475812912,
0.6704899668693542,
0.1134713739156723,
-0.5678809285163879,
-1.1046981811523438,
-0.05861736834049225,
0.2040093094110489,
-0.06156138703227043,
0.6234793066978455,
-0.9930891394615173,
0.5678011178970337,
... |
func (c *Client) Refunds(ctx context.Context, paymentID string) (*razorpay.RefundList, error) {
refundList := &razorpay.RefundList{}
err := c.Call(ctx, http.MethodGet, "/payments/"+paymentID+"/refunds", nil, refundList)
return refundList, err
} | [
-0.0806238204240799,
0.532742977142334,
0.23334819078445435,
0.3416406214237213,
0.5612541437149048,
-0.29386982321739197,
-1.1320343017578125,
-1.0657161474227905,
1.3983134031295776,
0.07618552446365356,
-0.17103584110736847,
0.5960835814476013,
-1.0497832298278809,
1.1194334030151367,
... |
func Update(ctx context.Context, id string, params *razorpay.PaymentUpdateParams) (*razorpay.Payment, error) {
return getDefaultClient().Update(ctx, id, params)
} | [
0.2915721833705902,
-0.5590655207633972,
0.20071396231651306,
0.3337477743625641,
-0.1557680368423462,
-0.2959604263305664,
-0.9767148494720459,
-0.6031439900398254,
0.5822304487228394,
0.1844586282968521,
0.482072114944458,
0.3965873122215271,
-1.1648000478744507,
0.10802722722291946,
-... |
func Capture(ctx context.Context, id string, params *razorpay.PaymentCaptureParams) (*razorpay.Payment, error) {
return getDefaultClient().Capture(ctx, id, params)
} | [
0.4198301136493683,
0.006857284344732761,
0.37319597601890564,
0.8703832030296326,
-0.24328719079494476,
-0.7119772434234619,
-0.8034566640853882,
-1.275080680847168,
1.1138476133346558,
0.18821100890636444,
0.46523866057395935,
1.0111932754516602,
0.26758578419685364,
0.5512998700141907,
... |
func Get(ctx context.Context, id string, params *razorpay.GetParams) (*razorpay.Payment, error) {
return getDefaultClient().Get(ctx, id, params)
} | [
0.4792076349258423,
0.19638195633888245,
0.3238518238067627,
0.03175663203001022,
0.7765242457389832,
-0.7167948484420776,
-0.8303022980690002,
-0.4425831139087677,
0.30196043848991394,
0.04372864216566086,
0.6537732481956482,
1.284949779510498,
-0.6380686163902283,
0.03054932691156864,
... |
func List(ctx context.Context, params *razorpay.PaymentListParams) (*razorpay.PaymentList, error) {
return getDefaultClient().List(ctx, params)
} | [
0.32479527592658997,
-0.0018408006289973855,
0.2728300392627716,
0.576132595539093,
0.7201075553894043,
-0.4483933448791504,
-0.5402979850769043,
-0.3086980879306793,
0.26327672600746155,
0.43867748975753784,
-0.41233035922050476,
0.5181543231010437,
-0.1889667958021164,
0.7386314868927002... |
func GetCard(ctx context.Context, paymentID string) (*razorpay.Card, error) {
return getDefaultClient().GetCard(ctx, paymentID)
} | [
0.7790791392326355,
0.9279059171676636,
0.23263218998908997,
0.32381901144981384,
0.6251014471054077,
-0.31959182024002075,
-0.8925028443336487,
-0.9755277633666992,
1.2612707614898682,
-0.049592651426792145,
0.8846871852874756,
1.256418228149414,
-0.29607513546943665,
0.19021102786064148,... |
func CreateRefund(ctx context.Context, paymentID string, params *razorpay.RefundCreateParams) (*razorpay.Refund, error) {
return getDefaultClient().CreateRefund(ctx, paymentID, params)
} | [
0.7093032598495483,
0.0028601393569260836,
0.27093392610549927,
0.2207280397415161,
0.821494460105896,
0.1510878950357437,
-0.41293415427207947,
-0.8606667518615723,
-0.15726126730442047,
0.16042453050613403,
-0.012374913319945335,
0.6178691983222961,
-0.6758188605308533,
0.565234899520874... |
func Refunds(ctx context.Context, paymentID string) (*razorpay.RefundList, error) {
return getDefaultClient().Refunds(ctx, paymentID)
} | [
0.7242763042449951,
0.6954366564750671,
0.1231040209531784,
0.34326428174972534,
0.5291298031806946,
-0.24081876873970032,
-1.0247888565063477,
-1.1701550483703613,
1.3294692039489746,
0.09232044219970703,
-0.04060342162847519,
0.5994386076927185,
-1.107668399810791,
0.8644082546234131,
... |
func NewClient(apiKey string, apiSecret string, apiBackend razorpay.Backend) *Client {
return &Client{razorpay.NewClient(apiKey, apiSecret, apiBackend)}
} | [
1.052497148513794,
-0.43319469690322876,
0.30068886280059814,
0.028983119875192642,
-0.3303755223751068,
-0.3760799169540405,
-0.954894483089447,
-0.4489624798297882,
0.35645076632499695,
0.31016263365745544,
0.32770559191703796,
0.31175047159194946,
-0.26217183470726013,
-1.03458130359649... |
func (l *loopOutSwapSuggestion) amount() btcutil.Amount {
return l.OutRequest.Amount
} | [
-1.0466965436935425,
-0.999377429485321,
0.3800124228000641,
-0.32393398880958557,
-0.4461422264575958,
0.8101465702056885,
0.8015051484107971,
0.332762748003006,
0.17109957337379456,
0.6506327986717224,
1.028140902519226,
1.002334475517273,
-0.03831690922379494,
0.8095283508300781,
0.10... |
func (l *loopOutSwapSuggestion) fees() btcutil.Amount {
return worstCaseOutFees(
l.OutRequest.MaxPrepayRoutingFee, l.OutRequest.MaxSwapRoutingFee,
l.OutRequest.MaxSwapFee, l.OutRequest.MaxMinerFee,
)
} | [
-0.7366642355918884,
0.39675769209861755,
0.4389253854751587,
-0.7842509746551514,
-0.07107478380203247,
-0.1778404414653778,
0.07071738690137863,
0.24424315989017487,
0.031408824026584625,
-0.19350749254226685,
1.0442566871643066,
0.6324043273925781,
-0.23798663914203644,
0.61855202913284... |
func (l *loopOutSwapSuggestion) channels() []lnwire.ShortChannelID {
channels := make(
[]lnwire.ShortChannelID, len(l.OutRequest.OutgoingChanSet),
)
for i, id := range l.OutRequest.OutgoingChanSet {
channels[i] = lnwire.NewShortChanIDFromInt(id)
}
return channels
} | [
-1.4073567390441895,
-0.7135048508644104,
0.2585146129131317,
-1.2660188674926758,
-0.038822535425424576,
0.21713362634181976,
-0.2778131663799286,
-0.38886207342147827,
0.4296666383743286,
-0.11993478238582611,
0.14394940435886383,
1.1769133806228638,
-0.3730575740337372,
0.28324514627456... |
func (l *loopOutSwapSuggestion) peers(
knownChans map[uint64]route.Vertex) []route.Vertex {
peers := make(map[route.Vertex]struct{}, len(knownChans))
for _, channel := range l.OutRequest.OutgoingChanSet {
peer, ok := knownChans[channel]
if !ok {
log.Warnf("peer for channel: %v unknown", channel)
}
peer... | [
-1.5779907703399658,
-0.4763778746128082,
0.37617722153663635,
-0.9415554404258728,
-0.10626309365034103,
-0.0760129764676094,
-0.5114040374755859,
0.3524802625179291,
-0.06335320323705673,
0.8256556987762451,
-0.0058052027598023415,
0.15319213271141052,
-0.5115704536437988,
0.563529312610... |
func doAuthRequest() (*Auth, error) {
// create request
auth_payload := strings.NewReader("grant_type=client_credentials&scope=" + AUTH_SCOPE)
client := &http.Client{}
req, err := http.NewRequest(API_METHOD, API_BASE_URL+"/oauth2/v2.0/token", auth_payload)
if err != nil {
fmt.Println(err)
return nil, err
}... | [
-0.7407371401786804,
-0.9827573895454407,
0.8501362204551697,
-0.230741947889328,
0.11357185989618301,
-0.6027033925056458,
-0.0772620141506195,
-0.6857766509056091,
-0.1618153601884842,
-0.022741803899407387,
0.02012912929058075,
1.3049309253692627,
0.1855919063091278,
-0.4178814589977264... |
func doDataRequest(token string) ([]byte, error) {
// create JSON payload
data_payload := `{
"data": {
"exportProducts": {
"export_by_range": {
"start": 1
}
}
}
}
`
// create client
client := &http.Client{}
req, err := http.NewRequest(API_METHOD, API_BASE_URL+"/products", strings.... | [
-1.0129363536834717,
0.4103042483329773,
1.1033940315246582,
-0.6606050133705139,
0.7714311480522156,
-0.32951757311820984,
-0.8635511994361877,
-0.9343459606170654,
0.25878778100013733,
0.3184260427951813,
-0.16372349858283997,
1.3391987085342407,
0.030277632176876068,
0.09363733232021332... |
func NewCustomerRepository(db *gorm.DB) customerDomain.Repository {
return &repository{
db: db,
}
} | [
0.5531821250915527,
-0.1379454880952835,
0.019861748442053795,
-0.23378592729568481,
-1.056470274925232,
-0.7950544357299805,
-0.06408398598432541,
0.3766299784183502,
-0.14967431128025055,
-0.7442005276679993,
-0.29253095388412476,
0.24812713265419006,
-0.32880380749702454,
0.778254687786... |
func (r *repository) Create(c *customerDomain.Customer) error {
err := r.db.Table(c.TableName()).Create(c).Error
if err != nil {
return err
}
return nil
} | [
0.7447572946548462,
1.0735119581222534,
0.06820882111787796,
0.8733296990394592,
0.7249420285224915,
0.35508793592453003,
0.18429069221019745,
-0.382004052400589,
-1.4520022869110107,
0.0026068929582834244,
0.04224129393696785,
-0.5960370302200317,
-0.2562323212623596,
1.0033516883850098,
... |
func Swe7_swedish_ci_RuneWeight(r rune) int32 {
weight, ok := swe7_swedish_ci_Weights[r]
if ok {
return weight
} else {
return 2147483647
}
} | [
0.8460466861724854,
0.11076481640338898,
0.5129741430282593,
-0.2139255851507187,
-0.884016215801239,
-0.5939344167709351,
0.7960600256919861,
0.13187317550182343,
-0.02249319665133953,
1.0172964334487915,
0.240608811378479,
-0.43832266330718994,
-1.3799086809158325,
0.39576900005340576,
... |
func NewBasicAuthorizationProvider() *basicAuthorizationProvider {
return &basicAuthorizationProvider{}
} | [
0.1876208633184433,
0.3874801695346832,
-0.17369049787521362,
0.991409957408905,
-1.106257438659668,
-0.011181971989572048,
-0.4660208523273468,
-0.7017097473144531,
-0.11969100683927536,
0.1006719321012497,
-0.4957066774368286,
-0.46738532185554504,
-0.5464832186698914,
-0.732211828231811... |
func (u basicAuthorizationProvider) Name() string {
return "BasicAuthorizationProvider"
} | [
-0.40216121077537537,
0.17287908494472504,
0.2547621726989746,
0.6300207376480103,
-1.2198683023452759,
0.5012625455856323,
-0.3524102568626404,
-0.10826101154088974,
0.5508201122283936,
1.6508680582046509,
-0.6103581786155701,
0.08766572922468185,
0.20100481808185577,
-0.6175829172134399,... |
func (u basicAuthorizationProvider) Matches(ctx context.Context) bool {
credentials, err := LoadFromContext(ctx)
if err != nil {
return false
}
return credentials.Type() == BasicCredentialType
} | [
-0.5741177797317505,
0.4197043478488922,
0.29225030541419983,
0.8530227541923523,
-0.013534248806536198,
0.501754641532898,
-1.0817772150039673,
-0.5825647711753845,
0.819900393486023,
-0.03180880844593048,
-0.1773170530796051,
0.0972306877374649,
-1.0011224746704102,
-0.67836993932724,
... |
func (u basicAuthorizationProvider) GetAuthorization(ctx context.Context) (string, error) {
credentials, err := LoadFromContext(ctx)
if err != nil {
return "", err
}
basicCredentials, ok := credentials.Get().(*BasicCredentials)
if !ok {
return "", errors.New("failed to cast credentials to basic credentials ty... | [
-0.5833985805511475,
0.1950494945049286,
0.5521522164344788,
0.912051796913147,
-0.29714125394821167,
-0.5022826194763184,
-0.5150234699249268,
-0.76193767786026,
0.6747279167175293,
1.2070766687393188,
-0.23144318163394928,
0.3486476540565491,
-0.24249914288520813,
-0.48719435930252075,
... |
func NewMonitorTestResultRepository(db *gorm.DB) repository.MonitorTestResultRepository {
return &MonitorTestResultRepository{db}
} | [
0.3928169012069702,
-0.6441170573234558,
-0.059167925268411636,
-0.18295283615589142,
0.15338315069675446,
-0.8027698993682861,
0.45573943853378296,
-0.40345969796180725,
0.9263725280761719,
-0.31618836522102356,
-0.19098711013793945,
-0.8224095106124878,
-0.5143222212791443,
0.47047773003... |
func CopyAnnotationsFromMeta(src *metav1.ObjectMeta) map[string]string {
annotations := make(map[string]string)
// copy all annotations except those with "configreflector" prefix
if src.Annotations[AnnotationReflectAnnotations] != "" {
for key, value := range src.Annotations {
if strings.HasPrefix(key, Prefix)... | [
-0.6674192547798157,
-0.49631252884864807,
0.513179361820221,
0.09420177340507507,
-1.3092654943466187,
-0.08598250895738602,
0.11452843248844147,
-0.17621470987796783,
0.4689130187034607,
1.204682469367981,
-0.11077086627483368,
0.5400443077087402,
0.2731548249721527,
0.5398272275924683,
... |
func CopyLabelsFromMeta(src *metav1.ObjectMeta) map[string]string {
labels := make(map[string]string)
// copy all labels from source ConfigMap
if src.Annotations[AnnotationReflectLabels] != "" {
for key, value := range src.Labels {
labels[key] = value
}
}
labels[LabelSourceName] = src.Name
labels[LabelSo... | [
-1.0364080667495728,
-0.21745988726615906,
0.5038140416145325,
-0.36678358912467957,
-1.2187490463256836,
0.6641021966934204,
-0.48781055212020874,
-0.3549726605415344,
0.49216166138648987,
1.3702365159988403,
-0.24365724623203278,
0.14632149040699005,
0.3704872727394104,
0.620552718639373... |
func GetReflectNamespaceList(reflectNamespaces string) []string {
if reflectNamespaces == "" {
return make([]string, 0)
}
namespaces := strings.Split(reflectNamespaces, ",")
for i := range namespaces {
namespaces[i] = strings.TrimSpace(namespaces[i])
}
return namespaces
} | [
-0.9210684299468994,
0.16302727162837982,
0.4167792499065399,
-0.10267776250839233,
-0.2376944124698639,
0.4878063201904297,
-0.4550696313381195,
-0.12593145668506622,
1.8193519115447998,
0.7221516370773315,
-0.6725776791572571,
0.6027553677558899,
-0.5478144884109497,
0.9727055430412292,
... |
func StringSliceContains(haystack []string, needle string) bool {
for _, str := range haystack {
if str == needle {
return true
}
}
return false
} | [
0.0896015465259552,
-1.2737655639648438,
0.17642110586166382,
-0.3241484463214874,
0.41250017285346985,
-0.6835758090019226,
-0.7866191267967224,
-0.5898348093032837,
-0.46275416016578674,
0.6407406330108643,
0.029261991381645203,
0.9286801218986511,
0.03156454488635063,
0.1928544491529464... |
func HasControllerAnnotations(meta metav1.Object) bool {
return meta.GetAnnotations()[AnnotationReflectNamespaces] != ""
} | [
1.1302398443222046,
0.012450536713004112,
0.33957114815711975,
-0.19753646850585938,
0.23801681399345398,
-0.04790513962507248,
0.559482753276825,
-0.014134164899587631,
0.3915175199508667,
-0.09037721902132034,
-0.5647463798522949,
-0.264131635427475,
0.13866320252418518,
1.65720558166503... |
func HasSourceLabels(meta metav1.Object) bool {
labels := meta.GetLabels()
return labels[LabelSourceName] != "" && labels[LabelSourceNamespace] != ""
} | [
-0.4859691560268402,
0.0706348791718483,
0.34757205843925476,
-1.0754857063293457,
-0.34750285744667053,
0.33314794301986694,
-0.3768209218978882,
-0.033749986439943314,
0.5715416073799133,
0.8033074140548706,
-0.512986421585083,
-0.4397091269493103,
0.04084637388586998,
1.0157349109649658... |
func DeleteSourceLabels(meta *metav1.ObjectMeta) {
delete(meta.Labels, LabelSourceName)
delete(meta.Labels, LabelSourceNamespace)
} | [
-0.4475119411945343,
-0.4277566075325012,
0.10184617340564728,
-0.740264892578125,
-0.37710538506507874,
0.8217354416847229,
0.14807836711406708,
-0.1250331848859787,
0.22786833345890045,
0.8190591335296631,
-0.41438278555870056,
0.06829651445150375,
-0.06349830329418182,
0.103405572474002... |
func Solve(input string) (string, string) {
lines := c.SplitByNewline(input)
bots := make([]*nanobot, len(lines))
largestRadius, largestIndex := math.MinInt32, 0
for i, l := range lines {
bots[i] = newNanobot(l)
if bots[i].radius > largestRadius {
largestRadius = bots[i].radius
largestIndex = i
}
}
re... | [
0.2793261706829071,
0.11824346333742142,
0.6070359945297241,
-0.24908939003944397,
0.02740362659096718,
-0.2567669153213501,
-0.21932779252529144,
-0.8469513058662415,
-0.658510148525238,
0.07281820476055145,
-0.4750998020172119,
-0.7004196047782898,
-0.30703890323638916,
0.416237026453018... |
func TimePreferenceSelf(q qstif.Q, seq0to5, paramSetIdx int, preflight bool) (string, []string, error) {
zeroTo15 := q.Version()
aOrB := "a"
if paramSetIdx > 0 {
aOrB = "b"
}
questionID := fmt.Sprintf("q2_seq%v", seq0to5+1)
return timePreferenceSelf(
q,
seq0to5, // visible question seq 1...6 on the ques... | [
-1.1745789051055908,
-0.3895484209060669,
0.5796515941619873,
-0.07025366276502609,
-1.0135992765426636,
-0.041983265429735184,
0.32544001936912537,
-1.1174954175949097,
0.10791461169719696,
1.6798782348632812,
-0.6555275321006775,
0.041909392923116684,
-0.064217209815979,
0.71520113945007... |
func TimePreferenceSelfStatic(q qstif.Q, seq0to5, paramSetIdx int, preflight bool) (string, []string, error) {
s, inputs, err := TimePreferenceSelf(
q,
seq0to5, // visible question seq 1...6 on the questionnaire
paramSetIdx,
preflight,
)
s = strings.ReplaceAll(s, `Bitte jeweils EIN Kreuz setzen`, " ... | [
-0.8445285558700562,
-0.31652581691741943,
0.674812376499176,
-0.000686436309479177,
-0.8921491503715515,
0.06193894147872925,
-0.061946991831064224,
-0.7193247675895691,
-0.401812344789505,
1.4161397218704224,
-0.3930436372756958,
0.35016581416130066,
0.1922769695520401,
0.757354259490966... |
func NewHyperflexServerFirmwareVersionEntryAllOf(classId string, objectType string) *HyperflexServerFirmwareVersionEntryAllOf {
this := HyperflexServerFirmwareVersionEntryAllOf{}
this.ClassId = classId
this.ObjectType = objectType
var serverPlatform string = "M5"
this.ServerPlatform = &serverPlatform
return &this... | [
0.6851859092712402,
-0.7121312022209167,
0.26493969559669495,
1.0854142904281616,
-0.6083651185035706,
-0.1449204981327057,
0.623075544834137,
0.5851598381996155,
0.2646070122718811,
0.33228394389152527,
-1.0049779415130615,
0.47366562485694885,
-0.8998157978057861,
1.0276939868927002,
0... |
func NewHyperflexServerFirmwareVersionEntryAllOfWithDefaults() *HyperflexServerFirmwareVersionEntryAllOf {
this := HyperflexServerFirmwareVersionEntryAllOf{}
var classId string = "hyperflex.ServerFirmwareVersionEntry"
this.ClassId = classId
var objectType string = "hyperflex.ServerFirmwareVersionEntry"
this.Object... | [
0.6605663299560547,
-0.24656839668750763,
0.027219258248806,
0.753105878829956,
0.22927238047122955,
-0.4034363925457001,
-0.27136266231536865,
0.5061801075935364,
0.199705570936203,
-0.09779366850852966,
-1.0572795867919922,
-0.5446564555168152,
-0.8728134036064148,
0.8391727209091187,
... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) GetClassId() string {
if o == nil {
var ret string
return ret
}
return o.ClassId
} | [
0.5892903804779053,
-0.35231316089630127,
-0.22242534160614014,
0.8988897800445557,
0.31040114164352417,
0.8096686601638794,
0.3505555987358093,
0.2585635483264923,
1.2134270668029785,
-0.5932019948959351,
0.4580131769180298,
-0.30932316184043884,
-0.7037525177001953,
0.7012941241264343,
... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) GetClassIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ClassId, true
} | [
-0.4800211489200592,
0.28722745180130005,
0.5232691168785095,
0.9917072057723999,
0.5530550479888916,
0.6495044231414795,
0.5822358131408691,
0.7186166048049927,
0.6421328186988831,
-0.07390666007995605,
-0.8975844383239746,
-0.6412968039512634,
-0.15140508115291595,
0.8809628486633301,
... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) SetClassId(v string) {
o.ClassId = v
} | [
0.46464914083480835,
-0.5380706787109375,
-0.10337255895137787,
0.48164623975753784,
-0.38843122124671936,
0.6733062267303467,
0.22133100032806396,
0.8226665258407593,
0.8696216344833374,
0.4442107081413269,
0.03476450592279434,
0.45623260736465454,
-0.604030191898346,
0.9361515641212463,
... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) GetObjectType() string {
if o == nil {
var ret string
return ret
}
return o.ObjectType
} | [
0.3377992510795593,
0.33857041597366333,
-0.2375403344631195,
0.11629613488912582,
0.7424285411834717,
0.4411017894744873,
-0.018616246059536934,
-0.1910414695739746,
0.17459000647068024,
0.02066907100379467,
-0.20438483357429504,
-0.977089524269104,
-1.0975176095962524,
-0.119422785937786... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) GetObjectTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ObjectType, true
} | [
-0.3133460283279419,
0.1902349591255188,
0.5417239665985107,
-0.2055267095565796,
0.2789759039878845,
0.23696939647197723,
0.035351064056158066,
0.3415414094924927,
-0.30043140053749084,
1.8354227542877197,
-1.3763043880462646,
-1.5124096870422363,
0.1371646523475647,
0.0538594052195549,
... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) SetObjectType(v string) {
o.ObjectType = v
} | [
0.3480440676212311,
0.05079331994056702,
-0.056690242141485214,
-0.24807357788085938,
0.02675449848175049,
0.5480332374572754,
-0.05853936821222305,
-0.10902006924152374,
-0.2221909761428833,
0.7271239161491394,
-0.6352502107620239,
-0.3413044512271881,
-0.649021565914154,
0.12637850642204... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) GetConstraint() HyperflexAppSettingConstraint {
if o == nil || o.Constraint.Get() == nil {
var ret HyperflexAppSettingConstraint
return ret
}
return *o.Constraint.Get()
} | [
0.7293445467948914,
0.20176200568675995,
0.1877215951681137,
1.2282801866531372,
0.427131712436676,
-0.9962577819824219,
0.777705192565918,
-0.15697753429412842,
0.777577817440033,
-0.3696041405200958,
0.03078708052635193,
-0.8870426416397095,
-1.0312637090682983,
0.20053215324878693,
0.... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) GetConstraintOk() (*HyperflexAppSettingConstraint, bool) {
if o == nil {
return nil, false
}
return o.Constraint.Get(), o.Constraint.IsSet()
} | [
0.361750990152359,
-0.5984396934509277,
0.5575947165489197,
1.1170130968093872,
0.037743229418992996,
0.2921196520328522,
0.8418598175048828,
0.8868597149848938,
-0.06926484405994415,
1.1965994834899902,
-0.7705549597740173,
-0.45625972747802734,
-0.03444847837090492,
-0.002455095527693629... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) HasConstraint() bool {
if o != nil && o.Constraint.IsSet() {
return true
}
return false
} | [
0.6037428975105286,
0.054535362869501114,
0.19582143425941467,
0.43098029494285583,
0.549744188785553,
-0.620927095413208,
0.28229987621307373,
0.6552310585975647,
0.23736678063869476,
-0.4658849239349365,
-0.7923853993415833,
-0.734915018081665,
-0.3432655930519104,
-0.05671822279691696,
... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) SetConstraint(v HyperflexAppSettingConstraint) {
o.Constraint.Set(&v)
} | [
0.5279247760772705,
0.3015364706516266,
0.11139322817325592,
0.9653449654579163,
0.1495763659477234,
-0.14206331968307495,
0.22203117609024048,
-0.11620355397462845,
-0.09095833450555801,
0.42205938696861267,
-0.06428283452987671,
0.08886410295963287,
-0.5279410481452942,
0.002904894761741... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) SetConstraintNil() {
o.Constraint.Set(nil)
} | [
0.46884697675704956,
-0.720154881477356,
0.3290904462337494,
0.6658901572227478,
-0.5626680850982666,
-0.4314142167568207,
0.6868603825569153,
0.6990913152694702,
0.1225573718547821,
0.8416747450828552,
-0.8310847282409668,
-0.052322909235954285,
-0.2587413191795349,
0.11925236135721207,
... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) UnsetConstraint() {
o.Constraint.Unset()
} | [
0.21799741685390472,
0.34812822937965393,
0.03836677968502045,
-0.034068237990140915,
-0.1314288228750229,
-0.8725612163543701,
0.7992674708366394,
0.6144092082977295,
-0.7499901652336121,
0.4075475037097931,
-0.4517785906791687,
0.23208065330982208,
-0.5837895274162292,
0.0632175430655479... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) GetServerPlatform() string {
if o == nil || o.ServerPlatform == nil {
var ret string
return ret
}
return *o.ServerPlatform
} | [
0.456794798374176,
-0.30036991834640503,
0.022017521783709526,
0.5411510467529297,
-0.7258388996124268,
-0.47974395751953125,
0.6156879663467407,
-0.7695207595825195,
1.2329093217849731,
-0.3916531801223755,
-0.8298649787902832,
-0.8583948612213135,
-1.7592252492904663,
0.9195411801338196,... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) GetServerPlatformOk() (*string, bool) {
if o == nil || o.ServerPlatform == nil {
return nil, false
}
return o.ServerPlatform, true
} | [
0.4577191472053528,
-0.002575080841779709,
0.2672358751296997,
0.8659340143203735,
-1.0810391902923584,
0.06903422623872757,
1.1225908994674683,
0.17718909680843353,
0.10531938076019287,
1.1389870643615723,
-1.5025700330734253,
-0.4737350344657898,
-0.6168365478515625,
0.7154368162155151,
... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) HasServerPlatform() bool {
if o != nil && o.ServerPlatform != nil {
return true
}
return false
} | [
0.6205405592918396,
-0.17035739123821259,
0.009173122234642506,
0.22617347538471222,
-0.24062612652778625,
-0.7867030501365662,
0.405970960855484,
-0.3080623149871826,
0.7195774912834167,
-0.5130497217178345,
-1.423925518989563,
-0.6909301280975342,
-1.2066137790679932,
0.8275840282440186,... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) SetServerPlatform(v string) {
o.ServerPlatform = &v
} | [
0.9794894456863403,
-0.6766219139099121,
-0.2970027029514313,
0.05841515585780144,
-0.9792179465293884,
-0.5152727961540222,
0.12852241098880768,
-0.8447082042694092,
0.7731684446334839,
-0.12511557340621948,
-1.050549030303955,
0.6944985389709473,
-1.3929729461669922,
0.03314986079931259,... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) GetVersion() string {
if o == nil || o.Version == nil {
var ret string
return ret
}
return *o.Version
} | [
0.7048447132110596,
-0.09203783422708511,
-0.16541682183742523,
1.4153629541397095,
0.42194876074790955,
-0.3518502712249756,
1.2798101902008057,
-0.16105803847312927,
0.9440159201622009,
-0.2531544864177704,
-0.5164024829864502,
-1.7505464553833008,
-0.8650837540626526,
1.020142912864685,... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) GetVersionOk() (*string, bool) {
if o == nil || o.Version == nil {
return nil, false
}
return o.Version, true
} | [
0.1343451589345932,
-0.31973010301589966,
0.11603017151355743,
1.1728144884109497,
0.05169898271560669,
0.2624124586582184,
0.9082855582237244,
0.5272051692008972,
0.0003497014695312828,
1.3632607460021973,
-1.251295566558838,
-1.2017366886138916,
0.047879766672849655,
0.709165632724762,
... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) HasVersion() bool {
if o != nil && o.Version != nil {
return true
}
return false
} | [
0.5861222743988037,
-0.2111293375492096,
-0.10376577079296112,
1.2927049398422241,
0.6894242167472839,
-0.24714548885822296,
0.7152834534645081,
0.9454997777938843,
0.3452244997024536,
-0.267508327960968,
-0.8434054255485535,
-1.639373779296875,
-0.6528429985046387,
0.6906208992004395,
0... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) SetVersion(v string) {
o.Version = &v
} | [
0.8389794826507568,
-0.5071178674697876,
-0.2725578546524048,
1.2187213897705078,
-0.4247124493122101,
-0.21970325708389282,
0.09906066954135895,
-0.031006842851638794,
0.14117088913917542,
0.0360693484544754,
-0.5116539597511292,
0.1200120821595192,
-0.7906758785247803,
0.4639174640178680... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) GetServerFirmwareVersion() HyperflexServerFirmwareVersionRelationship {
if o == nil || o.ServerFirmwareVersion == nil {
var ret HyperflexServerFirmwareVersionRelationship
return ret
}
return *o.ServerFirmwareVersion
} | [
0.8557505011558533,
0.23702417314052582,
0.0038748448714613914,
1.336354374885559,
-0.5523504018783569,
-1.034517765045166,
0.7253168225288391,
-0.2384476512670517,
0.6138924360275269,
-0.07299792021512985,
-1.0855319499969482,
-0.6453114748001099,
-1.0494688749313354,
1.478459358215332,
... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) GetServerFirmwareVersionOk() (*HyperflexServerFirmwareVersionRelationship, bool) {
if o == nil || o.ServerFirmwareVersion == nil {
return nil, false
}
return o.ServerFirmwareVersion, true
} | [
0.38197389245033264,
0.12282051891088486,
-0.03310432285070419,
1.2387338876724243,
-0.49706611037254333,
-0.5685257911682129,
1.1128411293029785,
0.23530566692352295,
-0.02331632375717163,
1.1941484212875366,
-1.2801464796066284,
-0.9758081436157227,
0.1114201545715332,
1.6050325632095337... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) HasServerFirmwareVersion() bool {
if o != nil && o.ServerFirmwareVersion != nil {
return true
}
return false
} | [
0.5414525866508484,
0.36513152718544006,
-0.17757336795330048,
0.8413271307945251,
-0.08244536072015762,
-1.4527299404144287,
0.43224164843559265,
0.15769758820533752,
0.02431621588766575,
-0.18416887521743774,
-1.3270237445831299,
-1.0215833187103271,
-0.2076544612646103,
1.96027886867523... |
func (o *HyperflexServerFirmwareVersionEntryAllOf) SetServerFirmwareVersion(v HyperflexServerFirmwareVersionRelationship) {
o.ServerFirmwareVersion = &v
} | [
0.7292288541793823,
0.002800566842779517,
-0.08807475864887238,
0.8651873469352722,
-0.1694008857011795,
-0.5089033246040344,
0.6708142161369324,
-0.16107594966888428,
0.18464049696922302,
0.09784752875566483,
-1.050352931022644,
0.003820200217887759,
-0.44053274393081665,
1.17656981945037... |
func (ls *Libstore) GarbageCollector() {
for {
time.Sleep(12*time.Second)
now := time.Now().UnixNano()
<- ls.leaseM
leases := ls.leaseMap //don't want to be accessing leaseMap in a loop while blocking other processes
ls.leaseM <- 1
for key, lease := range leases {
if now >= lease.RequestLeaseTime ||
... | [
-0.06697516143321991,
-0.17193767428398132,
0.5386659502983093,
-0.5581077337265015,
-0.7427041530609131,
0.7137733101844788,
-0.4683089852333069,
-0.3872215151786804,
0.5008454918861389,
-0.3347584903240204,
0.7082565426826477,
0.16304810345172882,
-0.352996826171875,
0.9099569916725159,
... |
func GetHost() string {
return Config().Hostname
} | [
0.4144079387187958,
0.14322270452976227,
0.3421418070793152,
1.3096768856048584,
0.2823798656463623,
0.5942922830581665,
0.010387304238975048,
0.5688250660896301,
-0.4603198766708374,
0.3263566792011261,
-0.023642415180802345,
0.3108593821525574,
-0.32233041524887085,
-0.4466607868671417,
... |
func GetAPIUrl(service string) string {
port := Config().Rabbit.Port
apiURL := fmt.Sprintf("http://%s:%s/api/%s", Config().Rabbit.Host, strconv.Itoa(port), service)
return apiURL
} | [
-0.2604181468486786,
-0.49943724274635315,
0.6258550882339478,
0.0771501362323761,
-0.10146401077508926,
0.09913183003664017,
-0.6596845984458923,
0.42192792892456055,
-0.7059499621391296,
0.6342278718948364,
-0.2589613199234009,
0.9385908246040344,
-0.3453529477119446,
-0.0876021310687065... |
func (client *Client) ListDatabaseAccessPoint(request *ListDatabaseAccessPointRequest) (response *ListDatabaseAccessPointResponse, err error) {
response = CreateListDatabaseAccessPointResponse()
err = client.DoAction(request, response)
return
} | [
-0.25473546981811523,
-0.09234650433063507,
0.5675382614135742,
0.24111957848072052,
-0.25447821617126465,
-0.6183207631111145,
0.7574275135993958,
-0.07109542936086655,
0.6103423237800598,
0.5188345313072205,
-0.051450517028570175,
0.98443603515625,
-0.5420102477073669,
-0.078671783208847... |
func (client *Client) ListDatabaseAccessPointWithChan(request *ListDatabaseAccessPointRequest) (<-chan *ListDatabaseAccessPointResponse, <-chan error) {
responseChan := make(chan *ListDatabaseAccessPointResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defe... | [
-0.3470623791217804,
-0.30496853590011597,
0.4552449584007263,
-0.40504294633865356,
-0.3504151403903961,
-0.2614145874977112,
0.41620907187461853,
-0.5931349396705627,
0.618887722492218,
0.27950581908226013,
0.29787009954452515,
1.4507447481155396,
-0.40853217244148254,
0.0701538771390914... |
func (client *Client) ListDatabaseAccessPointWithCallback(request *ListDatabaseAccessPointRequest, callback func(response *ListDatabaseAccessPointResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ListDatabaseAccessPointResponse
var err error
defer c... | [
-0.15173354744911194,
-0.0944925919175148,
0.5668507814407349,
-0.24344639480113983,
-0.6215435266494751,
-0.6649966835975647,
0.6924008727073669,
-0.3692757189273834,
1.3023957014083862,
0.3657349646091461,
0.3541514575481415,
0.4562639892101288,
-0.035385578870773315,
0.13909505307674408... |
func CreateListDatabaseAccessPointRequest() (request *ListDatabaseAccessPointRequest) {
request = &ListDatabaseAccessPointRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("dg", "2019-03-27", "ListDatabaseAccessPoint", "dg", "openAPI")
request.Method = requests.POST
return
} | [
-0.04023994505405426,
-0.2467479705810547,
0.6641610264778137,
-0.42616352438926697,
0.2051396369934082,
-0.20392189919948578,
-0.02780487947165966,
0.45490163564682007,
0.39007166028022766,
0.1158176138997078,
0.2634114623069763,
0.7487472891807556,
-0.44733726978302,
0.7027092576026917,
... |
func CreateListDatabaseAccessPointResponse() (response *ListDatabaseAccessPointResponse) {
response = &ListDatabaseAccessPointResponse{
BaseResponse: &responses.BaseResponse{},
}
return
} | [
0.5802412629127502,
-0.9039050936698914,
0.3377198874950409,
-0.6063739657402039,
0.5514640212059021,
-0.5788613557815552,
0.6383322477340698,
0.017388872802257538,
1.0911349058151245,
0.09797640889883041,
-0.5412375926971436,
-0.6661978960037231,
-0.3962770402431488,
0.3384361267089844,
... |
func (c *Client) appendCourse(courses []models.Course) {
if c.Courses == nil {
c.Courses = make(map[string]models.Course)
}
for _, v := range courses {
c.Courses[v.Cid] = v
}
} | [
-0.8600601553916931,
0.033323001116514206,
0.4049731492996216,
-0.3006421625614166,
0.8736280202865601,
0.9250184297561646,
-0.9766892194747925,
-0.20314069092273712,
0.795752763748169,
0.14159733057022095,
0.226185142993927,
-0.5855969786643982,
-0.39432448148727417,
0.6914914846420288,
... |
func Available(port string) bool {
ln, err := net.Listen("tcp", ":"+port)
if err != nil {
return false
}
err = ln.Close()
// post completion notnil
if err != nil {
_, _ = fmt.Fprintf(os.Stderr, "Couldn't stop listening on ports %q: %s", port, err)
return false //os.Exit(1)
}
return true
} | [
-0.44327402114868164,
-0.44809070229530334,
0.7069061398506165,
-0.5183613300323486,
-0.547827959060669,
1.1276636123657227,
0.14384081959724426,
0.5858796834945679,
-0.6775136590003967,
0.9562150239944458,
0.3862323462963104,
-0.41398873925209045,
-0.11368780583143234,
0.39533737301826477... |
func (trz TimeRfc1123z) String() string { return time.Time(trz).Format(time.RFC1123Z) } | [
0.001260410062968731,
-0.6462597250938416,
0.20761364698410034,
-0.09709403663873672,
-0.0004316193808335811,
0.008135530166327953,
0.027334051206707954,
-0.4704703092575073,
-0.09625941514968872,
0.4056376516819,
-0.1776096075773239,
-0.012509580701589584,
-0.05346112698316574,
0.46287134... |
func (trz TimeRfc1123z) Time() time.Time { return time.Time(trz) } | [
-0.15752066671848297,
-0.18133138120174408,
0.1031995564699173,
0.5067775845527649,
0.2888927757740021,
-0.3520805537700653,
0.7032463550567627,
0.07629126310348511,
0.14271585643291473,
-0.04286136105656624,
-0.6301718950271606,
-0.9536453485488892,
-0.08349046856164932,
1.219850182533264... |
func (trz TimeRfc1123z) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(time.Time(trz).Format(time.RFC1123Z), start)
} | [
0.15620699524879456,
0.416207492351532,
0.21504585444927216,
0.7875469326972961,
-0.516133189201355,
-0.42568978667259216,
-0.5327276587486267,
1.1225022077560425,
0.7093740105628967,
-0.19657836854457855,
0.016854407265782356,
0.04942787438631058,
0.0770893394947052,
0.8393498659133911,
... |
func (trz TimeRfc1123z) MarshalXMLAttr(name xml.Name) (attr xml.Attr, err error) {
attr = xml.Attr{Name: name, Value: time.Time(trz).Format(time.RFC1123Z)}
return
} | [
-0.048321932554244995,
-0.12362882494926453,
0.4120522141456604,
-0.07713419944047928,
-1.2773656845092773,
-0.41041862964630127,
-0.70737624168396,
0.527538537979126,
0.3628430664539337,
-0.09698226302862167,
0.46894317865371704,
-0.4231822192668915,
0.22489376366138458,
1.194239735603332... |
func (trz *TimeRfc1123z) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error) {
var t time.Time
var s string
if err = d.DecodeElement(&s, &start); err != nil {
return
}
if t, err = time.ParseInLocation(time.RFC1123Z, s, time.Local); err != nil {
return err
}
*trz = TimeRfc1123z(t)
return
} | [
-0.36199039220809937,
0.6201443076133728,
0.38700780272483826,
-0.4366912543773651,
-0.695111095905304,
-0.9835744500160217,
0.2694958746433258,
0.73880535364151,
-0.0601029172539711,
0.05176125839352608,
-0.1431288719177246,
-0.2190498560667038,
-0.4041474461555481,
0.22211860120296478,
... |
func (trz *TimeRfc1123z) UnmarshalXMLAttr(attr xml.Attr) (err error) {
var parse time.Time
if parse, err = time.ParseInLocation(time.RFC1123Z, attr.Value, time.Local); err != nil {
return
}
*trz = TimeRfc1123z(parse)
return
} | [
-0.0908888578414917,
-0.1507733017206192,
0.4067087471485138,
-0.790922999382019,
-0.8987441658973694,
-1.0136172771453857,
0.2972474992275238,
0.361371785402298,
0.22364667057991028,
0.023725319653749466,
0.6666831970214844,
-0.4937044084072113,
0.1813022941350937,
0.9206883907318115,
0... |
func GenerateCode() string {
code, _ := uuid.NewRandom()
return code.String()
} | [
-0.5391690731048584,
-0.03206784278154373,
0.38612258434295654,
0.15453001856803894,
0.24340403079986572,
0.6640292406082153,
-0.4314296245574951,
1.2659956216812134,
0.45762166380882263,
0.09453428536653519,
0.14465127885341644,
-0.5722208023071289,
-0.36255571246147156,
-0.00382806803099... |
func Run(
endpoint string,
isValidCrawlLink IsValidCrawlLinkFunction,
connectToDB ConnectToDBFunction,
addEdgesIfDoNotExist AddEdgeFunction,
getNewNode GetNewNodeFunction,
filterPage FilterPageFunction,
) {
// first connect to db
if err := connectToDB(); err != nil {
logFatal("Could not connect do db: %v", er... | [
-0.2510644495487213,
0.3432348072528839,
0.8576106429100037,
0.25627100467681885,
0.9963290095329285,
-0.09915834665298462,
1.1533979177474976,
0.5563069581985474,
-0.6751212477684021,
0.4420875906944275,
0.1740572601556778,
0.22201089560985565,
-0.08099162578582764,
0.1347532868385315,
... |
func Crawl(
endpoint string,
approximateMaxNodes int32,
parallelism int,
msDelay int,
isValidCrawlLink IsValidCrawlLinkFunction,
addEdgesIfDoNotExist AddEdgeFunction,
filterPage FilterPageFunction,
) {
// Instantiate default collector
c := colly.NewCollector(
colly.Async(true),
colly.CacheDir("/tmp/crawler... | [
-0.30994611978530884,
0.6574960947036743,
0.955664336681366,
0.39922216534614563,
0.5116164684295654,
-0.47357192635536194,
0.5660379528999329,
0.1455644965171814,
-0.07776124775409698,
0.07307709008455276,
0.3447042405605316,
-0.20377835631370544,
0.5705336928367615,
-0.18834200501441956,... |
func CreateFeaturizedDatasetID(datasetID string) string {
return fmt.Sprintf("%s-featurized", datasetID)
} | [
0.5270460844039917,
-0.07491032034158707,
-0.13374486565589905,
-0.944636881351471,
-0.7632682919502258,
-0.03612527251243591,
-1.2472838163375854,
0.17277905344963074,
0.07372862845659256,
-0.268453449010849,
-0.11919929087162018,
1.2992305755615234,
0.3011282980442047,
0.6199283003807068... |
func FeaturizeDataset(originalSchemaFile string, schemaFile string, dataset string, metaStorage api.MetadataStorage, config *IngestTaskConfig) (string, string, error) {
envConfig, err := env.LoadConfig()
if err != nil {
return "", "", err
}
// load the metadata from the metadata storage
ds, err := metaStorage.F... | [
0.07606979459524155,
0.3575300872325897,
0.6229848265647888,
-0.2543112635612488,
-0.444926381111145,
-0.4442595839500427,
-0.259897381067276,
0.7093010544776917,
-0.5632761120796204,
0.10685878992080688,
-0.25032755732536316,
1.0671765804290771,
0.30585822463035583,
0.5489421486854553,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.