text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (s *CallerIDsService) GetCallerIDs(params GetCallerIDsParams) (*GetCallerIDsReturn, *structure.VError, error) {
req, err := s.client.NewRequest("POST", "GetCallerIDs", params)
if err != nil {
return nil, nil, err
}
response := &GetCallerIDsReturn{}
verr, err := s.client.MakeResponse(req, response)
if verr ... | [
-1.5758775472640991,
0.5046485066413879,
0.654863178730011,
0.44906479120254517,
0.40476182103157043,
0.14107348024845123,
-0.38200366497039795,
-0.8743646740913391,
0.4668036699295044,
0.1438213735818863,
-1.1271198987960815,
1.4640214443206787,
-1.9017999172210693,
0.5149689316749573,
... |
func (s *CallerIDsService) VerifyCallerID(params VerifyCallerIDParams) (*VerifyCallerIDReturn, *structure.VError, error) {
req, err := s.client.NewRequest("POST", "VerifyCallerID", params)
if err != nil {
return nil, nil, err
}
response := &VerifyCallerIDReturn{}
verr, err := s.client.MakeResponse(req, response)... | [
-1.2066493034362793,
-0.07428253442049026,
0.5304204225540161,
0.2605913281440735,
0.08746720850467682,
0.2774706780910492,
-0.23661616444587708,
-1.1440590620040894,
0.9912769198417664,
-0.23408761620521545,
-1.1687393188476562,
1.4330205917358398,
-1.3173648118972778,
1.0809829235076904,... |
func (b *PipeBuilder) SetLogger(l logr.Logger) {
b.log = l
} | [
-0.2645399570465088,
0.6087709665298462,
0.07047878950834274,
0.6032546758651733,
0.006769557483494282,
0.17424286901950836,
0.10020680725574493,
1.5308738946914673,
0.3482118248939514,
-0.9730521440505981,
-0.5247389674186707,
-0.33771222829818726,
-0.39556509256362915,
1.9838192462921143... |
func NewMoveGen() *MoveGen {
return &MoveGen{index: 0, state: NewGameState(), mover: NewMove(0), colour: DefaultGameStateColour()}
} | [
-1.1624969244003296,
-0.48371437191963196,
0.4885037839412689,
0.41626882553100586,
-0.43485721945762634,
-0.2713431119918823,
-0.6972183585166931,
-0.17416588962078094,
-0.7169817686080933,
-0.030765051022171974,
-0.4577963948249817,
-0.5191579461097717,
-0.05284735560417175,
0.5740270614... |
func NewMoveGenByState(st *GameState) *MoveGen {
return &MoveGen{index: 0, state: st, mover: NewMove(0), colour: (st.info & 0x10) >> 5}
} | [
-0.8621127605438232,
-0.2756897807121277,
0.4521637558937073,
0.1708795577287674,
-0.7075537443161011,
-0.30136433243751526,
-0.10307551920413971,
-0.6895740032196045,
-0.5154051780700684,
0.1855883151292801,
-0.8183821439743042,
-0.1546630561351776,
0.37192779779434204,
0.0951038524508476... |
func (mg *MoveGen) SetState(st *GameState) {
mg.state = st
// reset any data associated with the old state
mg.Clear()
} | [
-0.6631240844726562,
0.8331922888755798,
0.3863961100578308,
0.16419123113155365,
-0.20265375077724457,
0.13897359371185303,
-0.14512448012828827,
0.4133400022983551,
-0.7531533241271973,
0.3945651054382324,
-0.2916576862335205,
0.8281022906303406,
0.18354393541812897,
0.5496334433555603,
... |
func (mg *MoveGen) Clear() {
mg.index = 0
} | [
-1.0711501836776733,
0.6730188131332397,
0.3704017698764801,
-0.0809575691819191,
0.2391653060913086,
0.8937047123908997,
0.25418728590011597,
-0.2957829535007477,
-0.8112034201622009,
0.024255892261862755,
0.3834013044834137,
1.0185270309448242,
0.3121960461139679,
0.4393482506275177,
-... |
func (mg *MoveGen) Size() uint {
return mg.index
} | [
-1.1963891983032227,
0.6810902953147888,
0.5120011568069458,
-0.5251417756080627,
-0.09165826439857483,
0.4364430904388428,
1.0162620544433594,
0.012319188565015793,
-0.3993605971336365,
-0.27610060572624207,
-0.41440290212631226,
0.2481449991464615,
-0.45324018597602844,
-0.00393449654802... |
func (mg *MoveGen) AddMove(move uint16) {
mg.moves[mg.index] = move
mg.index++
} | [
-1.091374397277832,
1.0535532236099243,
0.5467909574508667,
0.08585549890995026,
0.8464417457580566,
0.14190609753131866,
-0.6629872918128967,
-0.006199377588927746,
-0.33156895637512207,
-0.9268285036087036,
0.01746516302227974,
0.0027969409711658955,
-0.8910803198814392,
0.46341690421104... |
func (mg *MoveGen) SetMove(move uint16, index int) {
mg.moves[index] = move
} | [
-0.7513946890830994,
0.7316193580627441,
0.2931433618068695,
0.08380262553691864,
0.6138244867324829,
-0.15929530560970306,
-0.40023523569107056,
-0.1008467748761177,
-0.6077921390533447,
0.014708695001900196,
-0.3949308693408966,
0.05086139217019081,
-0.6775850057601929,
0.011571536771953... |
func (mg *MoveGen) GetMove(index uint) uint16 {
return mg.moves[index]
} | [
-0.3916410207748413,
1.044897437095642,
0.37247541546821594,
0.11683401465415955,
1.0196081399917603,
-0.7920179963111877,
-0.006787585560232401,
-0.8999572992324829,
-0.3571423292160034,
-0.43935197591781616,
0.2671319544315338,
-0.21459604799747467,
-0.8279865384101868,
-0.20284679532051... |
func (mg *MoveGen) GenerateMoves() {
if mg.isWhite() { // if the active player is white
} else { // generate moves for the black player
}
mg.GeneratePawnMoves()
mg.GenerateKnightMoves()
} | [
-0.9590843319892883,
0.9290986657142639,
0.6772449016571045,
0.8094965815544128,
0.7779080271720886,
0.46144288778305054,
0.10933733731508255,
-0.04001408815383911,
0.005930228158831596,
0.6907244324684143,
0.21549218893051147,
-0.6571711301803589,
-0.5663277506828308,
0.9803693294525146,
... |
func (mg *MoveGen) generatePawnSinglePush() uint64 {
pawns := mg.state.pieces[mg.colour*6]
var to uint64
if mg.isWhite() {
to = (pawns << 8) &^ mg.state.colours[0] // ~(this->state.taken)
} else {
to = (pawns >> 8) &^ mg.state.colours[1] // ~(this->state.taken)
}
cache := to
// remove promotion pieces
to ... | [
-0.6029343605041504,
1.0634160041809082,
0.8313048481941223,
-0.09940879046916962,
-0.5043185949325562,
0.130589559674263,
0.0659196749329567,
0.12977366149425507,
0.9014182686805725,
1.1920300722122192,
-0.5145914554595947,
0.5148324370384216,
-0.18969902396202087,
0.09738102555274963,
... |
func (mg *MoveGen) generatePawnDoublePush(pawns uint64) uint64 {
var to uint64
if mg.isWhite() {
to = ((pawns & 0xff0000) << 8) &^ mg.state.colours[0] // ~(this->state.taken)
} else {
to = ((pawns & 0xff0000000000) >> 8) &^ mg.state.colours[1] // ~(this->state.taken)
}
var attackDirection int
if mg.isWhite(... | [
-0.9910467863082886,
0.5326988697052002,
1.004940390586853,
0.1280193328857422,
-0.6015182137489319,
0.29824408888816833,
0.07348686456680298,
-0.8802086114883423,
0.5394379496574402,
1.0389512777328491,
-1.0345778465270996,
0.17362043261528015,
0.10931805521249771,
0.09460464864969254,
... |
func (mg *MoveGen) generatePawnLeftAttack(pawns uint64) uint64 {
area := uint64(0x7f7f7f7f7f7f7f7f)
var attacks uint64
var attackDirection int
if mg.isWhite() {
attackDirection = 9 // promotions
attacks = (pawns & area) << 9
attacks &= mg.state.colours[0] // TODO: en passant
} else {
attackDirection = -7 /... | [
-0.538959801197052,
0.2802613079547882,
0.7652164697647095,
-0.2353183925151825,
-0.27543172240257263,
-0.029077840968966484,
-0.17421357333660126,
-0.594300389289856,
1.074369192123413,
0.6962612271308899,
-0.5722211599349976,
0.013706468045711517,
-0.4079218804836273,
0.6175629496574402,... |
func (mg *MoveGen) generatePawnRightAttack(pawns uint64) uint64 {
area := uint64(0xfefefefefefe00)
var attacks uint64 // TODO: en passant
var attackDirection int
if mg.isWhite() {
attackDirection = -7 // promotions
attacks = (pawns & area) << 7
attacks &= mg.state.colours[0]
} else {
attackDirection = 9 //... | [
-0.7127529382705688,
0.4588656723499298,
0.8667169809341431,
0.11467541009187698,
-0.6248078942298889,
-0.31528452038764954,
-0.14926496148109436,
-0.6695956587791443,
0.4655735194683075,
0.5112224817276001,
-0.2670634388923645,
0.2833751142024994,
-0.3719254732131958,
0.5270887613296509,
... |
func (mg *MoveGen) generatePromotions(from int, pawns uint64) uint64 {
promotions := pawns & 0xff000000000000ff
// single push has a FROM of 1. since this is an offset.
var flag uint8
if from != 8 && from != -8 {
flag = 12 // 0b1100
} else {
flag = 8 // 0b1000
}
for i := LSB(promotions); i != 64; i = NLSB(... | [
-0.9130200147628784,
1.02214515209198,
0.8840030431747437,
0.12268870323896408,
-0.2700919210910797,
0.12446321547031403,
-0.3888986110687256,
-0.4650140404701233,
0.395645409822464,
1.0962849855422974,
-0.37626025080680847,
0.17571642994880676,
-0.6397749781608582,
0.20081892609596252,
... |
func (c Base) GetProvider() string {
return c.Provider
} | [
0.4073277413845062,
0.16890382766723633,
0.18627990782260895,
0.6421396732330322,
-0.07730141282081604,
1.1119530200958252,
0.1992722600698471,
-0.19644859433174133,
-0.022954178974032402,
-0.42845624685287476,
0.054079148918390274,
-0.27259334921836853,
-0.43544989824295044,
0.58159416913... |
func (g *GhostParser) ParseReleases() []data.Release {
rel := data.Release{}
se := g.doc.Find("table").Eq(10)
se.Find("tr").Each(func(b int, sb *goquery.Selection) {
sb.Find("td").Each(func(c int, sc *goquery.Selection) {
if c == 2 {
rel = data.Release{}
g.getUrlAndTagAndName(&rel, sc)
if rel.Name ... | [
-0.4859350621700287,
-0.5389291048049927,
0.5123990178108215,
-0.6341868042945862,
-0.05875029042363167,
0.04001661390066147,
0.027344821020960808,
-0.3930695056915283,
-0.10769841074943542,
0.7771367430686951,
-0.1932051032781601,
-0.07240460813045502,
-0.4215797185897827,
1.2147088050842... |
func (v *visitor) VisitExpressionTree(ctx *parser.ExpressionTreeContext) interface{} {
hasError := false
children := []map[string]interface{}{}
node := v.Visit(ctx.AdditionExpression(0))
if n, ok := node.(*visitResponse); ok {
if n.hasFailed() {
hasError = true
}
children = append(children, n.info())
} e... | [
-0.4942162334918976,
-0.49596357345581055,
1.0112626552581787,
-0.8174395561218262,
-0.4037764370441437,
-0.539188027381897,
0.7881593704223633,
-0.9328699707984924,
0.5450940728187561,
0.600835382938385,
0.29249829053878784,
-0.3190174400806427,
-0.49209824204444885,
1.156840443611145,
... |
func (o *JenkinsJenkins_connectOptions) Run() error {
log.Logger().Infof("Congratulations generating %s", o.Cmd.Use)
return nil
} | [
-0.3471753001213074,
-0.4442628026008606,
0.5861517190933228,
0.06714419275522232,
0.680445671081543,
0.19942140579223633,
1.2855980396270752,
-0.4084397852420807,
-0.6293277144432068,
0.4731517434120178,
-0.09191855788230896,
0.11360318213701248,
-0.6818556785583496,
0.44795867800712585,
... |
func (o *Echo) String() string {
return fmt.Sprintf("test.Echo<%s>", o.ID)
} | [
0.6366402506828308,
-1.0199742317199707,
0.1874522566795349,
0.12167780846357346,
-0.45287349820137024,
0.7283316254615784,
0.1885184794664383,
-1.2039326429367065,
0.2575801610946655,
0.040676917880773544,
-0.13147541880607605,
0.7291562557220459,
-0.32833850383758545,
-0.5331760048866272... |
func (o *Echo) GetTopicName() datamodel.TopicNameType {
return EchoTopic
} | [
0.20784810185432434,
0.3735527992248535,
0.4158123731613159,
1.0347373485565186,
-0.3962844908237457,
0.573152482509613,
0.15000171959400177,
-0.5860719680786133,
-0.23386424779891968,
0.03284735232591629,
0.2995937764644623,
-0.1731286495923996,
0.2082042396068573,
-0.20288576185703278,
... |
func (o *Echo) GetStreamName() string {
return ""
} | [
0.040592193603515625,
-0.14918671548366547,
0.8487053513526917,
1.2498561143875122,
-0.7620580792427063,
-0.13718722760677338,
0.5984767079353333,
-0.45728418231010437,
0.14499163627624512,
-0.4372338056564331,
-0.04346613958477974,
0.35234251618385315,
-0.5502213835716248,
1.2862415313720... |
func (o *Echo) GetTableName() string {
return EchoTable.String()
} | [
0.5052882432937622,
-0.3744203448295593,
0.6343711614608765,
1.4542185068130493,
-0.7358946800231934,
0.009670864790678024,
0.09699247032403946,
-0.33748865127563477,
-0.915080726146698,
-0.06579088419675827,
0.0856366977095604,
0.5365882515907288,
0.05910620093345642,
0.6769034266471863,
... |
func (o *Echo) GetModelName() datamodel.ModelNameType {
return EchoModelName
} | [
-0.33212971687316895,
-0.008597219362854958,
0.6496840715408325,
1.1855367422103882,
0.0673731192946434,
0.5325049757957458,
-0.22412830591201782,
-0.20836783945560455,
0.5360146164894104,
0.14858026802539825,
-0.7241607308387756,
0.27459847927093506,
0.16246746480464935,
0.756072103977203... |
func NewEchoID(ID string) string {
return hash.Values(ID, "name")
} | [
0.24134226143360138,
-0.4479418396949768,
0.16361218690872192,
-1.087252140045166,
-0.7347331643104553,
0.4087120294570923,
-2.0386598110198975,
0.27896007895469666,
-0.2991155982017517,
0.6942821741104126,
-1.4996598958969116,
-0.4079023599624634,
0.897945761680603,
0.05993783101439476,
... |
func (o *Echo) GetID() string {
return o.ID
} | [
1.0342979431152344,
-0.5863645672798157,
0.5129073262214661,
0.9885123372077942,
0.3436971604824066,
1.3535209894180298,
0.4982447028160095,
-0.6679227948188782,
1.092456579208374,
-0.4139842391014099,
-0.6786489486694336,
0.4733228087425232,
-0.49381330609321594,
0.1778099089860916,
0.6... |
func (o *Echo) GetTopicKey() string {
var i interface{} = o.ID
if s, ok := i.(string); ok {
return s
}
return fmt.Sprintf("%v", i)
} | [
-1.0627914667129517,
0.1509658694267273,
0.7117517590522766,
-0.40388184785842896,
-0.28309503197669983,
-0.2506563663482666,
0.03142085671424866,
-0.8000994324684143,
-0.07729712873697281,
0.5966639518737793,
0.274289608001709,
0.027571048587560654,
-0.1259896457195282,
-0.012977534905076... |
func (o *Echo) GetTimestamp() time.Time {
var dt interface{} = o.UpdatedAt
switch v := dt.(type) {
case int64:
return datetime.DateFromEpoch(v).UTC()
case string:
tv, err := datetime.ISODateToTime(v)
if err != nil {
panic(err)
}
return tv.UTC()
case time.Time:
return v.UTC()
}
panic("not sure how ... | [
-0.5634738802909851,
0.5028986930847168,
0.7122070789337158,
0.8323671221733093,
-0.028637295588850975,
0.6626933813095093,
-0.7883391380310059,
-1.0012589693069458,
0.39227941632270813,
-0.2555540204048157,
0.44428008794784546,
-0.031055549159646034,
-0.08579542487859726,
0.24745331704616... |
func (o *Echo) IsMaterialized() bool {
return false
} | [
-0.669937252998352,
-0.7394521832466125,
0.5588992834091187,
0.14476968348026276,
0.034839026629924774,
0.4489845633506775,
-0.2672707438468933,
-0.14293840527534485,
0.9345142841339111,
-0.5062141418457031,
-0.5202704071998596,
0.013370263390243053,
-0.9880976676940918,
1.5296456813812256... |
func (o *Echo) GetModelMaterializeConfig() *datamodel.ModelMaterializeConfig {
return nil
} | [
-0.10516092926263809,
0.12043951451778412,
0.386033833026886,
-0.24814553558826447,
-0.07181765884160995,
0.23181113600730896,
-0.7126302719116211,
-0.33035388588905334,
-0.3716271221637726,
-0.6843802332878113,
-0.8711150884628296,
-0.3212924897670746,
-0.7715723514556885,
1.7983889579772... |
func (o *Echo) IsEvented() bool {
return true
} | [
0.6254178285598755,
-0.4920129179954529,
0.6390287280082703,
0.5756619572639465,
0.49241510033607483,
0.36345434188842773,
0.4096730649471283,
1.0429433584213257,
0.7086928486824036,
-1.02451491355896,
-1.0175960063934326,
0.5227301716804504,
-0.3722422420978546,
0.5408499836921692,
-0.6... |
func (o *Echo) IsMutable() bool {
return true
} | [
-0.5413622856140137,
-0.5743874311447144,
0.7922764420509338,
1.7717682123184204,
-0.015265054069459438,
0.542060136795044,
-0.12269645184278488,
-0.040747418999671936,
0.26541417837142944,
0.4175570011138916,
-0.9981268644332886,
0.6002746820449829,
-0.8435695767402649,
0.933996319770813,... |
func (o *Echo) SetEventHeaders(kv map[string]string) {
kv["model"] = EchoModelName.String()
} | [
-0.504330575466156,
-0.9083347320556641,
0.4858393371105194,
0.2828220725059509,
-0.13454550504684448,
0.33023911714553833,
-0.7581865787506104,
-0.5483924150466919,
-0.5517508387565613,
0.9032067060470581,
-1.3607758283615112,
-0.3953585624694824,
0.03363332152366638,
0.44279733300209045,... |
func (o *Echo) GetTopicConfig() *datamodel.ModelTopicConfig {
retention, err := time.ParseDuration("1m0s")
if err != nil {
panic("Invalid topic retention duration provided: 1m0s. " + err.Error())
}
ttl, err := time.ParseDuration("0s")
if err != nil {
ttl = 0
}
if ttl == 0 && retention != 0 {
ttl = retenti... | [
0.16422255337238312,
0.3115774095058441,
0.47025057673454285,
-0.36822065711021423,
-0.4657141864299774,
-0.023379463702440262,
-0.7005316615104675,
-0.040912941098213196,
-0.39248260855674744,
0.4800984859466553,
-0.6405875086784363,
0.0020416947081685066,
0.20676204562187195,
0.374673753... |
func (o *Echo) Clone() datamodel.Model {
c := new(Echo)
c.FromMap(o.ToMap())
return c
} | [
0.6596006751060486,
-0.7438868880271912,
0.6298530101776123,
1.0280612707138062,
-1.097196102142334,
1.2157107591629028,
-0.18362857401371002,
-0.7466868758201599,
-0.05185776576399803,
-0.33201864361763,
-0.5822762846946716,
0.43541058897972107,
0.11137869209051132,
-0.9154359698295593,
... |
func (o *Echo) Anon() datamodel.Model {
return o
} | [
-0.24282513558864594,
-0.513414204120636,
0.25460872054100037,
0.5908998250961304,
-1.2838566303253174,
0.9800357818603516,
0.16081517934799194,
0.2560500204563141,
-0.31678617000579834,
-0.5549916625022888,
-1.5418847799301147,
0.4468693733215332,
0.0741662085056305,
-0.11451047658920288,... |
func (o *Echo) MarshalJSON() ([]byte, error) {
return json.Marshal(o.ToMap())
} | [
0.01676192320883274,
-0.3990480303764343,
0.479240745306015,
0.4375118613243103,
-1.262426495552063,
-0.09003846347332001,
-0.3096068203449249,
0.39630213379859924,
0.8067042827606201,
-0.06374546885490417,
-0.7944105267524719,
1.1896507740020752,
0.18984819948673248,
0.4713781177997589,
... |
func (o *Echo) UnmarshalJSON(data []byte) error {
kv := make(map[string]interface{})
if err := json.Unmarshal(data, &kv); err != nil {
return err
}
o.FromMap(kv)
if idstr, ok := kv["id"].(string); ok {
o.ID = idstr
}
return nil
} | [
-0.5912380814552307,
-0.1480838805437088,
0.7102009057998657,
-0.6951896548271179,
-1.207065224647522,
0.223288893699646,
-0.6892275214195251,
0.04282660037279129,
0.007329022511839867,
0.04651829972863197,
-0.9357500672340393,
0.08810393512248993,
-0.085683174431324,
-0.018889660015702248... |
func (o *Echo) Stringify() string {
return pjson.Stringify(o)
} | [
-0.5171722173690796,
-0.062039654701948166,
0.4808006286621094,
-0.3559947609901428,
-0.02366507612168789,
0.27504831552505493,
-1.0241823196411133,
-0.690015435218811,
-0.2894522249698639,
0.3622214198112488,
-1.1915115118026733,
0.6155692338943481,
0.004509871359914541,
0.006038556806743... |
func (o *Echo) IsEqual(other *Echo) bool {
return o.GetID() == other.GetID()
} | [
-0.14949338138103485,
-0.6197315454483032,
0.76895672082901,
0.9817488193511963,
0.5733687281608582,
0.1567789614200592,
-0.2949219346046448,
-1.08332359790802,
0.44333940744400024,
0.46138980984687805,
-1.4418805837631226,
0.8903883099555969,
-0.5041982531547546,
0.5317584872245789,
-0.... |
func (o *Echo) ToMap() map[string]interface{} {
o.setDefaults(false)
return map[string]interface{}{
"id": toEchoObject(o.ID, false),
"message": toEchoObject(o.Message, true),
"updated_ts": toEchoObject(o.UpdatedAt, false),
}
} | [
-1.2248919010162354,
-0.6248771548271179,
0.7820681929588318,
0.22675688564777374,
-0.25250276923179626,
0.3659779131412506,
-0.5790699124336243,
-0.3311026394367218,
0.8051508069038391,
0.48571154475212097,
-0.7228500843048096,
-0.06609896570444107,
0.958927571773529,
-0.3095080554485321,... |
func (o *Echo) FromMap(kv map[string]interface{}) {
o.ID = ""
// if coming from db
if id, ok := kv["_id"]; ok && id != "" {
kv["id"] = id
}
if val, ok := kv["id"].(string); ok {
o.ID = val
} else {
if val, ok := kv["id"]; ok {
if val == nil {
o.ID = ""
} else {
if m, ok := val.(map[string]i... | [
-0.5534573793411255,
-0.27678653597831726,
0.9012301564216614,
0.08380350470542908,
-0.9085106253623962,
-0.07237233966588974,
-0.9251519441604614,
0.02757730707526207,
0.14890646934509277,
0.350411981344223,
0.17443500459194183,
0.008240677416324615,
0.3345876634120941,
0.8640135526657104... |
func (e *EchoSendEvent) Key() string {
if e.key == "" {
return e.Echo.GetID()
}
return e.key
} | [
0.031313419342041016,
-0.21559910476207733,
0.6324219703674316,
0.5781368613243103,
0.5461069345474243,
0.8799816370010376,
-0.16758272051811218,
-0.2504720389842987,
0.6506550908088684,
0.6447058320045471,
0.030805381014943123,
-0.030004024505615234,
-0.5722823739051819,
0.579730987548828... |
func (e *EchoSendEvent) Object() datamodel.StreamedModel {
return e.Echo
} | [
-0.047293659299612045,
-0.651890754699707,
0.60978764295578,
0.13431748747825623,
-0.5698561072349548,
1.5969514846801758,
0.3146055340766907,
-0.6031484603881836,
0.10581841319799423,
-0.19587887823581696,
-0.9154390692710876,
0.7764521837234497,
1.248353362083435,
0.6194174885749817,
-... |
func (e *EchoSendEvent) Headers() map[string]string {
return e.headers
} | [
-0.7362422943115234,
-1.053682804107666,
0.6225266456604004,
0.2693600654602051,
-0.25325140357017517,
0.15014655888080597,
-0.7867273688316345,
-0.5480704307556152,
0.33595386147499084,
0.23687642812728882,
-0.28991132974624634,
-0.19853475689888,
0.5240414142608643,
0.6834027767181396,
... |
func (e *EchoSendEvent) Timestamp() time.Time {
return e.time
} | [
0.7285820841789246,
-0.05530061572790146,
0.4699380099773407,
0.4428289830684662,
1.2023189067840576,
0.6674780249595642,
0.674048125743866,
0.028796127066016197,
0.6170547008514404,
0.3919042944908142,
-0.6274521350860596,
-0.026782453060150146,
0.6530890464782715,
0.2021784484386444,
0... |
func WithEchoSendEventKey(key string) EchoSendEventOpts {
return func(o *EchoSendEvent) {
o.key = key
}
} | [
-0.7022148966789246,
-0.61422199010849,
0.4753434956073761,
0.3337939381599426,
0.04361177980899811,
-0.07045411318540573,
-0.3158053755760193,
-0.4308706223964691,
-0.10579410195350647,
1.2959502935409546,
-0.5227694511413574,
-0.49619659781455994,
1.2956347465515137,
0.6586945056915283,
... |
func WithEchoSendEventTimestamp(tv time.Time) EchoSendEventOpts {
return func(o *EchoSendEvent) {
o.time = tv
}
} | [
-0.06740972399711609,
-0.8206472992897034,
0.6367272138595581,
0.14173203706741333,
0.15882056951522827,
0.35245686769485474,
-0.3306383490562439,
-0.8174053430557251,
0.5657681822776794,
0.25795772671699524,
-0.6312928199768066,
-0.6606543064117432,
1.5916014909744263,
0.4156148135662079,... |
func WithEchoSendEventHeader(key, value string) EchoSendEventOpts {
return func(o *EchoSendEvent) {
if o.headers == nil {
o.headers = make(map[string]string)
}
o.headers[key] = value
}
} | [
-0.46903809905052185,
-0.9792166352272034,
0.8223361372947693,
0.1814037561416626,
-0.3069695830345154,
-0.12094351649284363,
-0.657941997051239,
-0.5432618856430054,
0.15707632899284363,
0.47401124238967896,
-0.2693103849887848,
-0.9370620250701904,
1.1646627187728882,
0.1523926854133606,... |
func NewEchoSendEvent(o *Echo, opts ...EchoSendEventOpts) *EchoSendEvent {
res := &EchoSendEvent{
Echo: o,
}
if len(opts) > 0 {
for _, opt := range opts {
opt(res)
}
}
return res
} | [
-0.2637753188610077,
-0.29548943042755127,
0.3922933340072632,
0.670588493347168,
-0.655566930770874,
0.08558939397335052,
-0.43959757685661316,
-0.2199348360300064,
0.1564980298280716,
-0.044393207877874374,
-0.6099764704704285,
0.4582391381263733,
0.11186597496271133,
0.26678720116615295... |
func (hdlr *prochdlr) memInfo() (*MemoryInfo, error) {
counters := winapi.ProcessMemoryCountersEx{}
size := uint32(unsafe.Sizeof(counters))
err := winapi.GetProcessMemoryInfo(hdlr.handler, &counters, size)
if err != nil {
return nil, errors.Wrap(err, "get process memory info")
}
minfo := MemoryInfo{
... | [
0.05945736542344093,
-0.6433821320533752,
0.4879401922225952,
-0.5988553166389465,
-0.46163511276245117,
0.1672009974718094,
-0.04249667748808861,
-0.7921187877655029,
-0.35352569818496704,
-0.6497206091880798,
-0.2746591866016388,
0.16325227916240692,
-0.2604958713054657,
0.22433188557624... |
func fetchTopics(topic string) (*github.TopicsSearchResult, error) {
client := github.NewClient(nil)
topics, _, err := client.Search.Topics(context.Background(), topic, nil)
return topics, err
} | [
0.6019211411476135,
0.6357589364051819,
0.11677874624729156,
0.0970061793923378,
0.2928313612937927,
0.506353497505188,
-0.8960446715354919,
-1.0497263669967651,
0.0951983854174614,
0.48610445857048035,
0.03199366107583046,
-0.007047947030514479,
-0.7090324759483337,
-0.011332988739013672,... |
func (p PgTest) createTemplateDB() error {
//https://github.com/golang-migrate/migrate/issues/226
_, err := p.masterConnection.Exec(fmt.Sprintf("drop database if exists %s;", p.config.TemplateDBName))
if err != nil {
return errors.Wrapf(err, "failed to drop database %s", p.config.TemplateDBName)
}
_, err = p.ma... | [
-0.43106815218925476,
0.5173238515853882,
0.6029794812202454,
0.1502579301595688,
0.647811770439148,
0.38318729400634766,
0.2048514038324356,
0.3398010730743408,
-0.09934642910957336,
0.37927114963531494,
-0.3831093907356262,
-0.22008231282234192,
-1.1034371852874756,
1.1568288803100586,
... |
func (p PgTest) migrateOnTemplate() error {
//copy the master config & change db name
dbConfig := *p.config.MasterConfig
dbConfig.Db = p.config.TemplateDBName
gm, err := migrate.New(p.config.MigrationsPath, dbConfig.ConnectionString())
if err != nil {
return errors.Wrap(err, "failed to connect to DB from go-Migr... | [
-0.4267873167991638,
0.24897751212120056,
0.8745285272598267,
0.2316025048494339,
-0.2742055356502533,
0.4422202408313751,
0.12473168224096298,
0.4354069232940674,
-0.23993965983390808,
0.5379786491394043,
-0.7799541354179382,
-0.6218149065971375,
-1.3360778093338013,
0.5627540349960327,
... |
func (p PgTest) SetupChild(name string) (*PgConfig, error) {
if name == "" && regexp.MustCompile(`^[A-Za-z0-9\-_]+$`).MatchString(name) {
return nil, errors.New("invalid test db name. try something like \"test_user-unique\"")
}
cConfig := *p.config.MasterConfig
cConfig.Db = name
cConfigPtr := &cConfig
err := p... | [
-0.02814757265150547,
0.2219323217868805,
1.110314965248108,
-0.8902226686477661,
-0.7143617272377014,
0.48639971017837524,
0.3642726540565491,
0.06877261400222778,
-0.09400178492069244,
0.6162611842155457,
-1.115296483039856,
-0.888874888420105,
-0.78990638256073,
0.5850514769554138,
0.... |
func (c *ClusterManager) Init(zl instances.ZoneLister, pp backends.ProbeProvider) {
c.instancePool.Init(zl)
c.backendPool.Init(pp)
// TODO: Initialize other members as needed.
} | [
-0.6075072288513184,
-0.019153285771608353,
0.2068258374929428,
0.30589333176612854,
0.5245987772941589,
0.8288220763206482,
0.27429547905921936,
0.0735311508178711,
0.026555301621556282,
0.5679670572280884,
-0.052068326622247696,
1.0621386766433716,
-1.029344081878662,
0.33671316504478455... |
func (c *ClusterManager) IsHealthy() (err error) {
// TODO: Expand on this, for now we just want to detect when the GCE client
// is broken.
_, err = c.backendPool.List()
// If this container is scheduled on a node without compute/rw it is
// effectively useless, but it is healthy. Reporting it as unhealthy
// w... | [
-0.19746604561805725,
0.37992334365844727,
0.6617905497550964,
0.24629950523376465,
1.767504334449768,
-1.0714247226715088,
-0.6304222345352173,
-1.5454883575439453,
-0.16870267689228058,
-0.0077932788990437984,
0.37783417105674744,
1.2165292501449585,
-0.39498043060302734,
0.2530963122844... |
func (c *ClusterManager) Checkpoint(lb *loadbalancers.L7RuntimeInfo, nodeNames []string, backendServicePorts []backends.ServicePort, namedPorts []backends.ServicePort, endpointPorts []string) ([]*compute.InstanceGroup, error) {
glog.V(4).Infof("Checkpoint(%v lb, %v nodeNames, %v backendServicePorts, %v namedPorts, %v ... | [
-0.24611222743988037,
0.7560683488845825,
0.683391809463501,
0.003379885805770755,
0.6495815515518188,
0.40796664357185364,
0.12269049882888794,
-1.0303280353546143,
-0.7712903022766113,
0.9062944054603577,
0.7629375457763672,
0.4354044795036316,
-1.0962921380996704,
0.1873505562543869,
... |
func (c *ClusterManager) GC(lbNames []string, nodePorts []backends.ServicePort) error {
// On GC:
// * Loadbalancers need to get deleted before backends.
// * Backends are refcounted in a shared pool.
// * We always want to GC backends even if there was an error in GCing
// loadbalancers, because the next Sync c... | [
0.5926728844642639,
0.04508456215262413,
0.7336675524711609,
-0.4509105384349823,
0.7577086091041565,
0.19446098804473877,
0.42356768250465393,
-1.0636894702911377,
-0.20948415994644165,
0.4276021420955658,
1.2637449502944946,
0.7309168577194214,
-0.6490479707717896,
0.5536608695983887,
... |
func NewClusterManager(
cloud *gce.GCECloud,
namer *utils.Namer,
defaultBackendNodePort backends.ServicePort,
defaultHealthCheckPath string) (*ClusterManager, error) {
// Names are fundamental to the cluster, the uid allocator makes sure names don't collide.
cluster := ClusterManager{ClusterNamer: namer}
// No... | [
-0.032794877886772156,
-0.1920412927865982,
0.6667253971099854,
-0.2743408977985382,
0.6899689435958862,
0.0641980692744255,
-0.12919306755065918,
-0.8009815812110901,
0.2678493559360504,
-0.1809900850057602,
0.4621752202510834,
0.3307950794696808,
-0.556623637676239,
0.7601103782653809,
... |
func GetUser(id int64) (*User, error) {
user := User{}
err := meddler.QueryRow(db, &user, userFindIdStmt, id)
return &user, err
} | [
-0.6227883696556091,
0.6093577146530151,
0.2322404533624649,
1.129831314086914,
-0.29511287808418274,
-0.48320406675338745,
0.9375467896461487,
-1.1150225400924683,
0.6644726395606995,
-0.5806089639663696,
-0.3188195824623108,
-0.008719217032194138,
0.21566157042980194,
0.150363028049469,
... |
func GetUserEmail(email string) (*User, error) {
user := User{}
err := meddler.QueryRow(db, &user, userFindEmailStmt, email)
return &user, err
} | [
-0.30178606510162354,
1.089893102645874,
0.18831293284893036,
0.9756035804748535,
-0.12275686115026474,
-0.3452110290527344,
0.7682034373283386,
-0.6381285786628723,
-0.010801988653838634,
-0.18045103549957275,
-0.288252592086792,
0.5029392838478088,
-0.3094433844089508,
-0.768498957157135... |
func GetPassEmail(email string) ([]byte, error) {
user, err := GetUserEmail(email)
if err != nil {
return nil, err
}
return []byte(user.Password), nil
} | [
-0.7995687127113342,
0.13600106537342072,
0.6763038635253906,
1.4413069486618042,
0.11193054914474487,
-0.3926038444042206,
0.10617097467184067,
-0.32742270827293396,
-0.17145609855651855,
0.5435462594032288,
-0.8456012010574341,
0.8998897671699524,
-0.6105408668518066,
-0.4023930728435516... |
func SaveUser(user *User) error {
if user.ID == 0 {
user.Created = time.Now().UTC()
}
user.Updated = time.Now().UTC()
return meddler.Save(db, userTable, user)
} | [
-1.1341745853424072,
-0.10459143668413162,
0.3786243498325348,
1.4801280498504639,
0.19673006236553192,
0.8559834361076355,
0.5980584621429443,
0.6241579651832581,
-0.05672101303935051,
-0.29923924803733826,
-1.049930214881897,
-0.9807292222976685,
-0.2706253230571747,
1.9934014081954956,
... |
func DeleteUser(id int64) error {
db.Exec("DELETE FROM members WHERE user_id = ?", id)
db.Exec("DELETE FROM users WHERE id = ?", id)
// TODO delete all projects
return nil
} | [
-0.0657791793346405,
0.13009265065193176,
0.4567091763019562,
1.28425133228302,
0.6329637169837952,
0.4511849880218506,
0.5468758344650269,
0.22951354086399078,
0.08055642992258072,
-0.9782320261001587,
-0.49631842970848083,
-0.36629605293273926,
-0.02860311046242714,
0.996574878692627,
... |
func ListUsers() ([]*User, error) {
var users []*User
err := meddler.QueryAll(db, &users, userStmt)
return users, err
} | [
-0.8278868198394775,
-0.4251549243927002,
-0.25216206908226013,
0.4554652273654938,
0.3061140775680542,
-0.09045219421386719,
-0.7507704496383667,
-0.06460577994585037,
0.13830330967903137,
-0.01696879416704178,
0.12554767727851868,
0.8454837799072266,
-0.6750829815864563,
0.87932813167572... |
func ListUsersRange(limit, offset int) ([]*User, error) {
var users []*User
err := meddler.QueryAll(db, &users, userStmt)
return users, err
} | [
-0.8667318224906921,
-0.5585557222366333,
0.09548600018024445,
-0.05385694280266762,
-0.5309785008430481,
0.5749142169952393,
-1.0317634344100952,
0.11072064191102982,
-0.07294277101755142,
0.38204246759414673,
0.03389934077858925,
1.1020454168319702,
-0.6317284107208252,
0.594383239746093... |
func main() {
var configPath string
flag.StringVar(&configPath, "config", "./config/config.yaml", "stripe key")
flag.Parse()
appConfig, err := config.ReadConfig(configPath)
if err != nil {
log.Fatal(err)
}
db, err := storage.StartDB(storage.GetConnString(appConfig.Database))
if err != nil {
log.Fatal(er... | [
0.7518505454063416,
0.1433083713054657,
1.1235023736953735,
0.8968766331672668,
0.3304561972618103,
1.1544660329818726,
0.6640781164169312,
0.5539877414703369,
-0.5087113976478577,
0.5280710458755493,
-0.6947739124298096,
-0.2533111870288849,
0.6023536324501038,
0.37731146812438965,
0.25... |
func newAppendBlobClient(url url.URL, p pipeline.Pipeline) appendBlobClient {
return appendBlobClient{newManagementClient(url, p)}
} | [
0.05350284278392792,
-0.8322330117225647,
0.2442958801984787,
-0.09963596612215042,
-0.5942264199256897,
0.3581671118736267,
-0.25522592663764954,
0.3012223243713379,
-0.22027525305747986,
0.0821271687746048,
-0.3747703731060028,
0.4826531708240509,
-0.8448772430419922,
0.10978252440690994... |
func (client appendBlobClient) AppendBlock(ctx context.Context, body io.ReadSeeker, contentLength int64, timeout *int32, transactionalContentMD5 []byte, transactionalContentCrc64 []byte, leaseID *string, maxSize *int64, appendPosition *int64, encryptionKey *string, encryptionKeySha256 *string, encryptionAlgorithm Encry... | [
-0.49567216634750366,
0.8803325295448303,
1.1049824953079224,
0.173577681183815,
-0.38449496030807495,
0.017105095088481903,
0.16373991966247559,
-0.4484473466873169,
0.42379236221313477,
0.26504063606262207,
-0.4742980897426605,
0.20785175263881683,
-1.0578863620758057,
0.8322897553443909... |
func (client appendBlobClient) appendBlockPreparer(body io.ReadSeeker, contentLength int64, timeout *int32, transactionalContentMD5 []byte, transactionalContentCrc64 []byte, leaseID *string, maxSize *int64, appendPosition *int64, encryptionKey *string, encryptionKeySha256 *string, encryptionAlgorithm EncryptionAlgorith... | [
0.036915022879838943,
0.27854976058006287,
1.0435712337493896,
-0.6128726005554199,
-0.8056997060775757,
-0.7040964365005493,
-0.49120229482650757,
-0.12174394726753235,
-0.21222983300685883,
0.906000554561615,
-0.21085599064826965,
-0.06737887859344482,
-0.738227903842926,
0.6527524590492... |
func (client appendBlobClient) appendBlockResponder(resp pipeline.Response) (pipeline.Response, error) {
err := validateResponse(resp, http.StatusOK, http.StatusCreated)
if resp == nil {
return nil, err
}
io.Copy(ioutil.Discard, resp.Response().Body)
resp.Response().Body.Close()
return &AppendBlobAppendBlockRes... | [
0.15176981687545776,
-0.6117298603057861,
0.9134933352470398,
-0.5530732274055481,
-0.7696418762207031,
-0.8028336763381958,
0.1384630650281906,
-0.29018089175224304,
0.8372117280960083,
0.20761819183826447,
-0.6178865432739258,
-1.0970690250396729,
-0.8404098749160767,
0.6818493008613586,... |
func (client appendBlobClient) AppendBlockFromURL(ctx context.Context, sourceURL string, contentLength int64, sourceRange *string, sourceContentMD5 []byte, sourceContentcrc64 []byte, timeout *int32, transactionalContentMD5 []byte, encryptionKey *string, encryptionKeySha256 *string, encryptionAlgorithm EncryptionAlgorit... | [
-0.43125128746032715,
0.09465725719928741,
0.7353036999702454,
0.28832876682281494,
-0.9077798128128052,
0.06861177831888199,
0.3145889639854431,
-0.19485074281692505,
0.18110711872577667,
-0.018639646470546722,
-0.7617325782775879,
-0.1277935653924942,
-0.9895424842834473,
0.5589852333068... |
func (client appendBlobClient) appendBlockFromURLPreparer(sourceURL string, contentLength int64, sourceRange *string, sourceContentMD5 []byte, sourceContentcrc64 []byte, timeout *int32, transactionalContentMD5 []byte, encryptionKey *string, encryptionKeySha256 *string, encryptionAlgorithm EncryptionAlgorithmType, encry... | [
-0.42776933312416077,
-0.08631303906440735,
0.8911854028701782,
-0.5645583868026733,
-1.36968195438385,
-0.15009534358978271,
-0.3624677062034607,
0.33774709701538086,
0.18634159862995148,
0.6325465440750122,
-0.2816171944141388,
-0.04762861505150795,
-0.8247004747390747,
0.567014634609222... |
func (client appendBlobClient) appendBlockFromURLResponder(resp pipeline.Response) (pipeline.Response, error) {
err := validateResponse(resp, http.StatusOK, http.StatusCreated)
if resp == nil {
return nil, err
}
io.Copy(ioutil.Discard, resp.Response().Body)
resp.Response().Body.Close()
return &AppendBlobAppendB... | [
0.1456453651189804,
-1.3042693138122559,
0.8262054324150085,
-0.2475416511297226,
-1.0525562763214111,
-0.000821030989754945,
0.057465456426143646,
-0.09855890274047852,
1.0004137754440308,
-0.3985823094844818,
-0.6535448431968689,
-0.9178493022918701,
-0.546428382396698,
0.942476749420166... |
func (client appendBlobClient) Create(ctx context.Context, contentLength int64, timeout *int32, blobContentType *string, blobContentEncoding *string, blobContentLanguage *string, blobContentMD5 []byte, blobCacheControl *string, metadata map[string]string, leaseID *string, blobContentDisposition *string, encryptionKey *... | [
0.33902761340141296,
0.3727791905403137,
0.946136474609375,
0.06949809938669205,
-0.14068572223186493,
0.86246258020401,
-0.23630304634571075,
-0.7449054718017578,
-0.21813702583312988,
0.3640531599521637,
-0.4012826681137085,
-0.5464367866516113,
-1.4376192092895508,
1.0605593919754028,
... |
func (client appendBlobClient) createPreparer(contentLength int64, timeout *int32, blobContentType *string, blobContentEncoding *string, blobContentLanguage *string, blobContentMD5 []byte, blobCacheControl *string, metadata map[string]string, leaseID *string, blobContentDisposition *string, encryptionKey *string, encry... | [
0.3305223286151886,
-0.4319840371608734,
1.0161088705062866,
-0.5195695757865906,
-0.36840495467185974,
-0.17365066707134247,
-0.9721015095710754,
-0.3903012275695801,
-0.4879187345504761,
0.9066186547279358,
-0.05714390054345131,
0.02208588644862175,
-1.201622486114502,
0.4799824059009552... |
func (client appendBlobClient) createResponder(resp pipeline.Response) (pipeline.Response, error) {
err := validateResponse(resp, http.StatusOK, http.StatusCreated)
if resp == nil {
return nil, err
}
io.Copy(ioutil.Discard, resp.Response().Body)
resp.Response().Body.Close()
return &AppendBlobCreateResponse{rawR... | [
0.22702333331108093,
-0.8602741360664368,
0.6972594857215881,
-0.28975939750671387,
-0.14044615626335144,
-0.006042883265763521,
-0.33571383357048035,
-0.49200674891471863,
0.4773016571998596,
0.010173180140554905,
-0.32748112082481384,
-1.2504353523254395,
-1.0007312297821045,
0.594539701... |
func (client appendBlobClient) Seal(ctx context.Context, timeout *int32, requestID *string, leaseID *string, ifModifiedSince *time.Time, ifUnmodifiedSince *time.Time, ifMatch *ETag, ifNoneMatch *ETag, appendPosition *int64) (*AppendBlobSealResponse, error) {
if err := validate([]validation{
{targetValue: timeout,
... | [
-0.5367823243141174,
0.32738199830055237,
0.7600415349006653,
-0.15910299122333527,
-0.3218168616294861,
0.525606632232666,
-0.2186122089624405,
-0.3052120506763458,
0.6772028803825378,
0.16172055900096893,
-0.0038187832105904818,
0.8250277042388916,
-0.9164985418319702,
0.4491587579250335... |
func (client appendBlobClient) sealPreparer(timeout *int32, requestID *string, leaseID *string, ifModifiedSince *time.Time, ifUnmodifiedSince *time.Time, ifMatch *ETag, ifNoneMatch *ETag, appendPosition *int64) (pipeline.Request, error) {
req, err := pipeline.NewRequest("PUT", client.url, nil)
if err != nil {
retur... | [
-0.22832411527633667,
-0.21504101157188416,
0.883671760559082,
-0.9968369603157043,
-0.8095661997795105,
-0.542387068271637,
-0.6038786768913269,
-0.20475216209888458,
0.036168452352285385,
0.5192965865135193,
0.31722378730773926,
0.351933091878891,
-0.560790479183197,
0.7303507924079895,
... |
func (client appendBlobClient) sealResponder(resp pipeline.Response) (pipeline.Response, error) {
err := validateResponse(resp, http.StatusOK)
if resp == nil {
return nil, err
}
io.Copy(ioutil.Discard, resp.Response().Body)
resp.Response().Body.Close()
return &AppendBlobSealResponse{rawResponse: resp.Response()... | [
-0.00044596774387173355,
-1.320076823234558,
0.8258825540542603,
-0.7896149754524231,
-0.7726737856864929,
-0.1994033306837082,
0.23543299734592438,
-0.68255215883255,
1.3955166339874268,
0.01217728853225708,
-0.5541577339172363,
-0.6862787008285522,
-0.918918251991272,
0.29559871554374695... |
func (*Document) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Document_OneofMarshaler, _Document_OneofUnmarshaler, _Document_OneofSizer, []interface{}{
(*Document_Cont... | [
-0.22268809378147125,
0.6901377439498901,
0.5135906338691711,
-0.38264209032058716,
0.23024864494800568,
-0.6436594724655151,
0.8982681632041931,
-1.3128221035003662,
0.08274409919977188,
-0.4993521273136139,
-0.2698677182197571,
-0.12627801299095154,
-0.5478933453559875,
0.723908185958862... |
func (*Websocket_datagram) ReadDatagram(c net.Conn) (Websocket_datagram, error) {
var rcv_len int
var err error
var buf []byte
var currbits uint16
var retDG Websocket_datagram
/*
Indicates that this is the final fragment in a message. The first
fragment MAY also be the final fragment.
*/
var fin bool
var... | [
0.005756401922553778,
0.23775358498096466,
1.1530659198760986,
-0.42589184641838074,
-0.35861968994140625,
-0.43564900755882263,
1.2575112581253052,
-0.6758557558059692,
0.43553876876831055,
0.14488109946250916,
0.123428113758564,
0.4625759720802307,
-0.6172582507133484,
-0.316680818796157... |
func SendStruct(i interface{}, c net.Conn, timeout time.Time, error_channel chan error) error {
const length_of_int = 4
var b []byte
var err error
var length uint32
var recvlength int
var content_lenbuf []byte
var client_lenbuf []byte
var errbuf []byte
if i == nil {
error_channel <- errors.New(ERRMSG_NILPTR... | [
-0.16299653053283691,
0.10647475719451904,
1.0121020078659058,
-0.6046490669250488,
-0.307005375623703,
0.025867994874715805,
0.6513261795043945,
-0.7447559237480164,
0.08777337521314621,
0.29465252161026,
-0.9379165172576904,
0.0019437362207099795,
0.16363656520843506,
0.5245181918144226,... |
func ReceiveStruct(i interface{}, c net.Conn, timeout time.Time, error_channel chan error) error {
const length_of_int = 4
var intbuf []byte = make([]byte, length_of_int)
var contentlength int
var contentbuf []byte
var recvlength int
var err error
//COMPLIMENTARY: Receive length of JSON object to make buffer
... | [
0.1860756129026413,
-0.3022397756576538,
0.9953535199165344,
-1.301133632659912,
-0.43275684118270874,
0.3558245897293091,
0.2315562218427658,
-0.7187054753303528,
0.054807428270578384,
-0.2859613299369812,
-0.39183926582336426,
-0.2677689492702484,
0.05850838124752045,
-0.3404064476490021... |
func CreateSecretForMongoDB(spec *redhatcomv1alpha1.FruitsCatalogGSpec, namespace string) *corev1.Secret {
return &corev1.Secret{
TypeMeta: metav1.TypeMeta{
Kind: "Secret",
APIVersion: "v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: spec.AppName + "-mongodb-connection",
Namespace: namespace,... | [
0.17083771526813507,
-0.42650049924850464,
0.44514647126197815,
-0.05036419630050659,
0.37743937969207764,
-0.04256902635097504,
-1.4093921184539795,
-0.4596621096134186,
-0.1367914229631424,
0.7456056475639343,
-0.9140703678131104,
0.5599536299705505,
0.2022203952074051,
0.586114227771759... |
func CreatePersistentVolumeClaimMongoDB(spec *redhatcomv1alpha1.FruitsCatalogGSpec, namespace string) *corev1.PersistentVolumeClaim {
claim := &corev1.PersistentVolumeClaim{
TypeMeta: metav1.TypeMeta{
Kind: "PersistentVolumeClaim",
APIVersion: "v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: spe... | [
0.5664207935333252,
-0.5264715552330017,
0.6872562170028687,
0.2640667259693146,
-0.14782795310020447,
0.57623291015625,
-1.31332528591156,
0.9107692241668701,
0.5393653512001038,
0.5510329008102417,
0.4056152403354645,
0.17961083352565765,
-1.0174437761306763,
0.45855793356895447,
1.030... |
func CreateDeploymentForMongoDB(spec *redhatcomv1alpha1.FruitsCatalogGSpec, namespace string) *appsv1.Deployment {
deployment := &appsv1.Deployment{
TypeMeta: metav1.TypeMeta{
Kind: "Deployment",
APIVersion: "apps/v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: spec.AppName + "-mongodb",
Name... | [
0.08215836435556412,
-0.1747298687696457,
0.7464528679847717,
0.09021677076816559,
0.8014364838600159,
-0.014561744406819344,
-0.47684717178344727,
-0.03728794679045677,
0.1602933555841446,
1.0220634937286377,
-0.16412895917892456,
-0.12621253728866577,
0.3978787660598755,
0.30275020003318... |
func CreateServiceForMongoDB(spec *redhatcomv1alpha1.FruitsCatalogGSpec, namespace string) *corev1.Service {
return &corev1.Service{
TypeMeta: metav1.TypeMeta{
Kind: "Service",
APIVersion: "v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: spec.AppName + "-mongodb",
Namespace: namespace,
Lab... | [
0.039605531841516495,
-0.04798314347863197,
0.36158329248428345,
0.028657987713813782,
0.9154609441757202,
0.20236168801784515,
-0.4659363627433777,
-0.4917272627353668,
-0.024992888793349266,
0.613767147064209,
0.14810271561145782,
0.36379966139793396,
-0.7892084717750549,
0.5833471417427... |
func (s *FakeSI) FindTableOrVindex(tablename sqlparser.TableName) (*vindexes.Table, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error) {
table, ok := s.Tables[sqlparser.String(tablename)]
if ok {
return table, nil, "", 0, nil, nil
}
return nil, s.VindexTables[sqlparser.String(tablename)], "",... | [
-0.5388814806938171,
-0.5796659588813782,
0.39016255736351013,
0.4502180516719818,
-0.5401804447174072,
-0.7179930806159973,
0.34393012523651123,
-0.4601086974143982,
0.24270370602607727,
0.3254798948764801,
-0.12266987562179565,
-0.3522590398788452,
-0.4387822151184082,
1.0050761699676514... |
func readClaimsFromFile(filename string) ([]claim, error) {
f, err := os.Open(filename)
if err != nil {
log.Fatal(err)
return nil, err
}
defer func() {
if err = f.Close(); err != nil {
log.Fatal(err)
}
}()
s := bufio.NewScanner(f)
totalArea := 0
claims := make([]claim, 0)
for s.Scan() {
line := ... | [
0.725785493850708,
-0.8660718202590942,
0.6180064678192139,
-0.63758784532547,
-0.2893316149711609,
0.7377558946609497,
-0.03852863609790802,
0.46848711371421814,
-0.43020564317703247,
-0.12921282649040222,
0.5554172992706299,
0.16724799573421478,
0.2518235445022583,
0.3930143415927887,
... |
func (et EventTopic) IsValid() bool {
switch et {
case AddLiquidity, RemoveLiquidity, TokenPurchase, CoinPurchase:
return true
}
return false
} | [
1.0666192770004272,
-0.6510904431343079,
0.4444783627986908,
0.29570645093917847,
0.518315315246582,
1.3076967000961304,
-0.7210111618041992,
-0.15321588516235352,
0.7144528031349182,
0.1544773280620575,
0.9144563674926758,
0.03633569926023483,
-0.4102625846862793,
-0.3801519274711609,
-... |
func JoinTopicsWithQuotes(topics ...EventTopic) string {
if len(topics) == 0 {
return ""
}
strs := make([]string, len(topics))
for i, topic := range topics {
strs[i] = string(topic)
}
return "'" + strings.Join(strs, "','") + "'"
} | [
0.7962526082992554,
-1.0018911361694336,
0.6106514930725098,
-0.07002110034227371,
0.5446641445159912,
0.7696127891540527,
-0.8694999814033508,
-0.7808142304420471,
-0.4370681047439575,
0.3513670861721039,
1.015730857849121,
-0.5395538806915283,
-0.8262699842453003,
0.09019666165113449,
... |
func (o AccountThrottleSettingOutput) BurstLimit() pulumi.IntPtrOutput {
return o.ApplyT(func(v AccountThrottleSetting) *int { return v.BurstLimit }).(pulumi.IntPtrOutput)
} | [
1.198559045791626,
1.018510103225708,
0.6153684854507446,
0.17715086042881012,
0.06040544807910919,
0.8002065420150757,
0.5514367818832397,
-0.33937451243400574,
1.1497433185577393,
0.01701447181403637,
-1.0408953428268433,
0.8055869936943054,
-0.15510040521621704,
-1.8859715461730957,
0... |
func (o AccountThrottleSettingOutput) RateLimit() pulumi.Float64PtrOutput {
return o.ApplyT(func(v AccountThrottleSetting) *float64 { return v.RateLimit }).(pulumi.Float64PtrOutput)
} | [
1.2360047101974487,
0.9070520401000977,
0.43024295568466187,
-0.2066672444343567,
1.0481411218643188,
0.32883793115615845,
0.037125907838344574,
-0.15434594452381134,
0.7544193267822266,
0.20637290179729462,
0.17555437982082367,
0.7825321555137634,
-0.22307978570461273,
-1.864250659942627,... |
func (o DocumentationPartLocationOutput) Method() pulumi.StringPtrOutput {
return o.ApplyT(func(v DocumentationPartLocation) *string { return v.Method }).(pulumi.StringPtrOutput)
} | [
0.16401629149913788,
0.03330684453248978,
0.37909266352653503,
-0.9870823621749878,
-0.24451994895935059,
0.4350926876068115,
0.8598867654800415,
0.023489559069275856,
0.39206066727638245,
-0.30394667387008667,
0.9347546100616455,
0.05486763268709183,
0.47535204887390137,
-1.41925919055938... |
func (o DocumentationPartLocationOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v DocumentationPartLocation) *string { return v.Name }).(pulumi.StringPtrOutput)
} | [
0.11533671617507935,
-0.91085284948349,
0.36978965997695923,
-0.7073342204093933,
-0.9072755575180054,
0.8879908919334412,
0.5981283783912659,
0.235819011926651,
0.4627542793750763,
0.3842726945877075,
0.11689088493585587,
-0.06809133291244507,
0.3492174446582794,
-1.3286229372024536,
-0... |
func (o DocumentationPartLocationOutput) Path() pulumi.StringPtrOutput {
return o.ApplyT(func(v DocumentationPartLocation) *string { return v.Path }).(pulumi.StringPtrOutput)
} | [
0.6446963548660278,
-0.49990078806877136,
0.13308057188987732,
-0.24171535670757294,
-0.2882562577724457,
1.3834402561187744,
1.1911569833755493,
0.35703203082084656,
0.6209511756896973,
-0.5406984686851501,
0.5719015002250671,
-0.20213817059993744,
-0.14804625511169434,
-1.656379103660583... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.