text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func FirewallPolicyAssociationToProto(resource *alpha.FirewallPolicyAssociation) *alphapb.ComputeAlphaFirewallPolicyAssociation {
p := &alphapb.ComputeAlphaFirewallPolicyAssociation{}
p.SetName(dcl.ValueOrEmptyString(resource.Name))
p.SetAttachmentTarget(dcl.ValueOrEmptyString(resource.AttachmentTarget))
p.SetFirew... | [
0.576185405254364,
0.27303314208984375,
0.4064604640007019,
-0.7891107201576233,
-0.44773873686790466,
0.08464597165584564,
0.4856215715408325,
-0.7405533790588379,
1.0828981399536133,
-0.012250768952071667,
0.25459495186805725,
-0.06598582118749619,
0.7985761761665344,
0.04014328867197037... |
func (s *FirewallPolicyAssociationServer) applyFirewallPolicyAssociation(ctx context.Context, c *alpha.Client, request *alphapb.ApplyComputeAlphaFirewallPolicyAssociationRequest) (*alphapb.ComputeAlphaFirewallPolicyAssociation, error) {
p := ProtoToFirewallPolicyAssociation(request.GetResource())
res, err := c.ApplyF... | [
-0.5063680410385132,
0.24838033318519592,
0.4869375228881836,
-0.16135430335998535,
-0.3568997085094452,
0.3176597058773041,
0.9906728267669678,
0.14902286231517792,
0.8373669981956482,
0.09500052779912949,
0.13541929423809052,
0.2541804909706116,
0.07772291451692581,
0.9917720556259155,
... |
func (s *FirewallPolicyAssociationServer) ApplyComputeAlphaFirewallPolicyAssociation(ctx context.Context, request *alphapb.ApplyComputeAlphaFirewallPolicyAssociationRequest) (*alphapb.ComputeAlphaFirewallPolicyAssociation, error) {
cl, err := createConfigFirewallPolicyAssociation(ctx, request.GetServiceAccountFile())
... | [
-0.13971763849258423,
0.2905191481113434,
0.5093251466751099,
-0.18006624281406403,
-0.24694950878620148,
0.23678191006183624,
1.3771052360534668,
0.9134809970855713,
0.9088910222053528,
0.2870447337627411,
0.16842873394489288,
0.2558079957962036,
0.11804764717817307,
1.0281230211257935,
... |
func (s *FirewallPolicyAssociationServer) DeleteComputeAlphaFirewallPolicyAssociation(ctx context.Context, request *alphapb.DeleteComputeAlphaFirewallPolicyAssociationRequest) (*emptypb.Empty, error) {
cl, err := createConfigFirewallPolicyAssociation(ctx, request.GetServiceAccountFile())
if err != nil {
return nil... | [
0.3208235502243042,
0.10432412475347519,
0.3515174090862274,
-0.11863426119089127,
-0.3654978275299072,
0.5427475571632385,
1.6421302556991577,
0.4253486692905426,
0.682037353515625,
0.04903707653284073,
0.2372419685125351,
0.1954900622367859,
0.04915986210107803,
0.982170581817627,
0.61... |
func (s *FirewallPolicyAssociationServer) ListComputeAlphaFirewallPolicyAssociation(ctx context.Context, request *alphapb.ListComputeAlphaFirewallPolicyAssociationRequest) (*alphapb.ListComputeAlphaFirewallPolicyAssociationResponse, error) {
cl, err := createConfigFirewallPolicyAssociation(ctx, request.GetServiceAccou... | [
-0.2745680809020996,
0.2542722523212433,
0.45487308502197266,
-0.37659406661987305,
0.04218928515911102,
-0.15495525300502777,
0.7144384980201721,
0.0235484279692173,
0.8860359191894531,
0.7910619974136353,
-0.22205457091331482,
0.4382011294364929,
0.0573151670396328,
1.1956303119659424,
... |
func f11(ctx *Context, l0 int32) int32 {
return ctx.f.F11(ctx, l0)
} | [
-0.46607959270477295,
0.1591002494096756,
0.2061702013015747,
0.10159871727228165,
0.037653665989637375,
0.010144063271582127,
0.420678973197937,
-0.30945003032684326,
-0.17958101630210876,
-1.094086766242981,
0.4683243930339813,
0.28740766644477844,
0.542566180229187,
0.3838881850242615,
... |
func NewClient(opts ...Option) *Client {
cfg := config{log: log.Println, hooks: &hooks{}}
cfg.options(opts...)
client := &Client{config: cfg}
client.init()
return client
} | [
0.411213219165802,
0.004142360296100378,
0.275611937046051,
0.10048519819974899,
-0.4117283523082733,
0.05761399492621422,
0.5876260995864868,
-0.2552168071269989,
0.25953608751296997,
-0.5046037435531616,
-0.09476903080940247,
0.7677217125892639,
-0.6118859052658081,
-0.5294802188873291,
... |
func Open(driverName, dataSourceName string, options ...Option) (*Client, error) {
switch driverName {
case dialect.MySQL, dialect.Postgres, dialect.SQLite:
drv, err := sql.Open(driverName, dataSourceName)
if err != nil {
return nil, err
}
return NewClient(append(options, Driver(drv))...), nil
default:
... | [
-0.5596922636032104,
0.28941434621810913,
0.395405650138855,
-0.4602617025375366,
-0.9996486902236938,
0.03262323513627052,
0.18018895387649536,
0.6113706827163696,
0.09878969192504883,
0.07710020989179611,
-0.014457758516073227,
0.5125634074211121,
-0.6521831750869751,
-1.0689094066619873... |
func (c *Client) Tx(ctx context.Context) (*Tx, error) {
if _, ok := c.driver.(*txDriver); ok {
return nil, fmt.Errorf("ent: cannot start a transaction within a transaction")
}
tx, err := newTx(ctx, c.driver)
if err != nil {
return nil, fmt.Errorf("ent: starting a transaction: %v", err)
}
cfg := config{driver:... | [
-0.05019765347242355,
0.09541476517915726,
0.5416886210441589,
-0.25891008973121643,
-0.015033818781375885,
0.08689165860414505,
-0.20025548338890076,
-0.34027621150016785,
0.5018414855003357,
-0.28441792726516724,
-0.21135561168193817,
0.1752983182668686,
-0.3771993815898895,
-0.911804080... |
func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error) {
if _, ok := c.driver.(*txDriver); ok {
return nil, fmt.Errorf("ent: cannot start a transaction within a transaction")
}
tx, err := c.driver.(*sql.Driver).BeginTx(ctx, opts)
if err != nil {
return nil, fmt.Errorf("ent: starting a t... | [
-0.18276582658290863,
0.26339638233184814,
0.5503016114234924,
-0.4190848469734192,
-0.40792182087898254,
0.007519791834056377,
-0.16590386629104614,
-0.451153963804245,
0.6367106437683105,
0.019667908549308777,
-0.043321993201971054,
0.3270687758922577,
-0.2169092297554016,
-0.30569383502... |
func (c *Client) Debug() *Client {
if c.debug {
return c
}
cfg := config{driver: dialect.Debug(c.driver, c.log), log: c.log, debug: true, hooks: c.hooks}
client := &Client{config: cfg}
client.init()
return client
} | [
0.6120599508285522,
-0.11420778185129166,
0.46461403369903564,
-0.6217109560966492,
0.34291788935661316,
-0.20191572606563568,
0.0781015008687973,
-0.14952635765075684,
0.4963098466396332,
-0.6165934205055237,
0.5381051301956177,
0.2047465741634369,
-0.33716273307800293,
-0.480128288269042... |
func (c *Client) Close() error {
return c.driver.Close()
} | [
-0.23172274231910706,
-0.5853173732757568,
0.2896474599838257,
0.19228193163871765,
-0.03008655272424221,
0.45180943608283997,
0.5137172341346741,
-0.24635106325149536,
-0.36639392375946045,
-0.3214913010597229,
0.7381778359413147,
-0.09062489122152328,
-1.4765299558639526,
0.3733040094375... |
func (c *Client) Use(hooks ...Hook) {
c.Gender.Use(hooks...)
c.Position.Use(hooks...)
c.Title.Use(hooks...)
c.User.Use(hooks...)
} | [
-0.8739444613456726,
-0.20252034068107605,
0.9506791830062866,
0.16653800010681152,
0.25436392426490784,
0.2215864509344101,
0.277650386095047,
-0.6493229866027832,
-0.93607497215271,
-0.3942472040653229,
-0.15613746643066406,
-0.014329681172966957,
-1.0075100660324097,
0.5956628918647766,... |
func NewGenderClient(c config) *GenderClient {
return &GenderClient{config: c}
} | [
-0.595564067363739,
-0.3932889401912689,
0.053701385855674744,
0.36105749011039734,
-0.8699018359184265,
0.9134798049926758,
0.11524388939142227,
0.04804868623614311,
-0.8174831867218018,
0.04818693920969963,
-1.966521143913269,
1.037732720375061,
-0.7457917332649231,
0.5033954381942749,
... |
func (c *GenderClient) Use(hooks ...Hook) {
c.hooks.Gender = append(c.hooks.Gender, hooks...)
} | [
-0.7900122404098511,
0.42571961879730225,
0.7198106646537781,
-0.10312104970216751,
0.8961260914802551,
0.3895381987094879,
-0.1319495290517807,
-0.35522815585136414,
-1.0748109817504883,
-0.3136206567287445,
-0.5506598949432373,
0.9601472020149231,
-1.0505025386810303,
1.1418697834014893,... |
func (c *GenderClient) Create() *GenderCreate {
mutation := newGenderMutation(c.config, OpCreate)
return &GenderCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
-0.2792942225933075,
0.3835487365722656,
0.47909003496170044,
0.6816362142562866,
0.04252880439162254,
0.5506033897399902,
-0.49257200956344604,
-0.09869875013828278,
-0.7196702361106873,
-0.33198535442352295,
-0.6134104132652283,
-0.20962345600128174,
-0.6397671103477478,
0.87972235679626... |
func (c *GenderClient) Update() *GenderUpdate {
mutation := newGenderMutation(c.config, OpUpdate)
return &GenderUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
-0.34116286039352417,
-0.5831043124198914,
0.38319486379623413,
-0.06128235533833504,
-0.7153345942497253,
-0.08957073837518692,
-0.5246885418891907,
0.5012649297714233,
-0.45120900869369507,
0.32550516724586487,
-0.6765094995498657,
0.3582926392555237,
-0.8756991028785706,
-0.412373006343... |
func (c *GenderClient) UpdateOne(ge *Gender) *GenderUpdateOne {
mutation := newGenderMutation(c.config, OpUpdateOne, withGender(ge))
return &GenderUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
-1.5426157712936401,
0.5646703243255615,
0.6813725829124451,
0.6843187808990479,
-0.7567722797393799,
0.38991639018058777,
-0.1472202092409134,
0.71968674659729,
-0.05362552031874657,
0.4800266921520233,
-1.0589655637741089,
0.43050703406333923,
-0.8719480037689209,
-0.15725159645080566,
... |
func (c *GenderClient) UpdateOneID(id int) *GenderUpdateOne {
mutation := newGenderMutation(c.config, OpUpdateOne, withGenderID(id))
return &GenderUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
-1.4650713205337524,
-0.24042010307312012,
0.5620459914207458,
-0.03813410550355911,
-0.9634637236595154,
-0.05318383499979973,
-0.37077194452285767,
0.28264862298965454,
1.0165667533874512,
0.58111971616745,
-0.9590517282485962,
0.3694160580635071,
-1.175381064414978,
0.5199680924415588,
... |
func (c *GenderClient) Delete() *GenderDelete {
mutation := newGenderMutation(c.config, OpDelete)
return &GenderDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
0.4109960198402405,
0.21581672132015228,
0.48867231607437134,
0.3118727207183838,
0.27262288331985474,
0.3202943205833435,
-0.16897563636302948,
0.412967324256897,
0.09767767786979675,
0.24602846801280975,
-0.497201532125473,
0.6526468396186829,
-0.6661375164985657,
-0.2132684886455536,
... |
func (c *GenderClient) DeleteOne(ge *Gender) *GenderDeleteOne {
return c.DeleteOneID(ge.ID)
} | [
-1.0092250108718872,
0.9209717512130737,
0.4547637403011322,
0.3470698595046997,
0.4285154640674591,
0.5651968121528625,
0.3463568091392517,
0.2991236448287964,
-0.3554958403110504,
-0.6120108366012573,
-0.7611467838287354,
0.5625231266021729,
-0.9735586643218994,
1.125266671180725,
-0.1... |
func (c *GenderClient) DeleteOneID(id int) *GenderDeleteOne {
builder := c.Delete().Where(gender.ID(id))
builder.mutation.id = &id
builder.mutation.op = OpDeleteOne
return &GenderDeleteOne{builder}
} | [
-0.7370781898498535,
0.38442176580429077,
0.38518965244293213,
-0.05589130148291588,
-0.10831281542778015,
0.1362113207578659,
-0.0012344428105279803,
0.21392212808132172,
0.8893524408340454,
0.28575485944747925,
-0.6488368511199951,
0.2666400372982025,
-0.6950458288192749,
1.0963139533996... |
func (c *GenderClient) Query() *GenderQuery {
return &GenderQuery{config: c.config}
} | [
0.5497017502784729,
-0.02280690334737301,
0.13631851971149445,
0.021824615076184273,
-0.7640147805213928,
0.25330573320388794,
-0.5359339118003845,
0.3830150067806244,
-0.4061337113380432,
-0.5219228267669678,
0.037168290466070175,
0.8594619631767273,
-0.5907717347145081,
0.626796603202819... |
func (c *GenderClient) Get(ctx context.Context, id int) (*Gender, error) {
return c.Query().Where(gender.ID(id)).Only(ctx)
} | [
-0.5443350076675415,
0.41615012288093567,
0.18885716795921326,
0.04281570389866829,
0.4729984998703003,
0.17354716360569,
-0.8696641325950623,
-0.32843562960624695,
-0.7815799713134766,
-0.5295323729515076,
-0.5850093960762024,
1.4289040565490723,
-0.23706431686878204,
0.4349265992641449,
... |
func (c *GenderClient) GetX(ctx context.Context, id int) *Gender {
ge, err := c.Get(ctx, id)
if err != nil {
panic(err)
}
return ge
} | [
-0.8302009105682373,
1.3316855430603027,
0.3264929950237274,
0.3192909359931946,
-0.42262643575668335,
0.6554619073867798,
-1.3898383378982544,
-0.38061290979385376,
0.3193720877170563,
-0.18564675748348236,
-0.6842064261436462,
1.2870874404907227,
-0.4489773213863373,
-0.12281405925750732... |
func (c *GenderClient) QueryUsers(ge *Gender) *UserQuery {
query := &UserQuery{config: c.config}
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
id := ge.ID
step := sqlgraph.NewStep(
sqlgraph.From(gender.Table, gender.FieldID, id),
sqlgraph.To(user.Table, user.FieldID),
sqlgraph.E... | [
-0.9186538457870483,
0.33555087447166443,
0.4728397727012634,
0.09493522346019745,
-0.7144977450370789,
0.18660175800323486,
0.4661525785923004,
0.009185606613755226,
-0.8206626772880554,
-0.34754833579063416,
-0.03326600417494774,
0.6653685569763184,
0.08269035071134567,
0.225088194012641... |
func (c *GenderClient) Hooks() []Hook {
return c.hooks.Gender
} | [
-0.8201267719268799,
-0.0880398228764534,
0.1134067103266716,
0.12080126255750656,
0.5929563641548157,
1.583457350730896,
-0.1984844207763672,
-0.4198347330093384,
-0.5350322127342224,
-0.1134837195277214,
-0.4573099911212921,
1.1753045320510864,
-0.7490848302841187,
0.009471297264099121,
... |
func NewPositionClient(c config) *PositionClient {
return &PositionClient{config: c}
} | [
-0.2573786675930023,
-0.986015260219574,
-0.1445295512676239,
0.4592478573322296,
-0.65678471326828,
0.1510859876871109,
0.5739672780036926,
0.13351643085479736,
-0.11274678260087967,
0.3893994987010956,
-1.064123511314392,
-0.7232855558395386,
-0.7384047508239746,
-0.23029504716396332,
... |
func (c *PositionClient) Use(hooks ...Hook) {
c.hooks.Position = append(c.hooks.Position, hooks...)
} | [
-0.6644976139068604,
-0.18421858549118042,
0.6945145726203918,
-0.0385747067630291,
1.1969090700149536,
0.05927274376153946,
-0.03406595438718796,
-0.36495643854141235,
-0.6830207705497742,
-0.00001775301461748313,
-0.18090076744556427,
-0.5186758041381836,
-1.3055400848388672,
0.095697790... |
func (c *PositionClient) Create() *PositionCreate {
mutation := newPositionMutation(c.config, OpCreate)
return &PositionCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
-0.09558427333831787,
-0.28636351227760315,
0.42988598346710205,
0.6754550933837891,
0.38187238574028015,
0.3459327518939972,
-0.19859576225280762,
0.017114747315645218,
-0.038165464997291565,
0.08894787728786469,
-0.20845653116703033,
-1.3122649192810059,
-0.8093545436859131,
0.2344837784... |
func (c *PositionClient) Update() *PositionUpdate {
mutation := newPositionMutation(c.config, OpUpdate)
return &PositionUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
-0.08551951497793198,
-1.1586216688156128,
0.35675758123397827,
0.005363672971725464,
-0.4366075098514557,
-0.4003716707229614,
-0.14579808712005615,
0.6035975217819214,
0.46608173847198486,
0.2123626172542572,
-0.26815834641456604,
-0.8785982131958008,
-1.1418561935424805,
-0.863613724708... |
func (c *PositionClient) UpdateOne(po *Position) *PositionUpdateOne {
mutation := newPositionMutation(c.config, OpUpdateOne, withPosition(po))
return &PositionUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
-0.7817894220352173,
-0.1988019347190857,
0.690037727355957,
0.6304213404655457,
-0.3589112460613251,
-0.14839281141757965,
-0.09643140435218811,
0.6032047867774963,
0.4455435574054718,
0.47890952229499817,
-0.9301002621650696,
-0.7509196996688843,
-0.7395562529563904,
-1.1039321422576904,... |
func (c *PositionClient) UpdateOneID(id int) *PositionUpdateOne {
mutation := newPositionMutation(c.config, OpUpdateOne, withPositionID(id))
return &PositionUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
-1.141412377357483,
-0.7883886694908142,
0.5453089475631714,
-0.09942647814750671,
-0.7843174934387207,
-0.3918914496898651,
0.014773035421967506,
0.47502401471138,
1.735274314880371,
0.5435322523117065,
-0.6475927829742432,
-0.8258906602859497,
-1.468331217765808,
0.017546752467751503,
... |
func (c *PositionClient) Delete() *PositionDelete {
mutation := newPositionMutation(c.config, OpDelete)
return &PositionDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
0.6047202944755554,
-0.3591870963573456,
0.39922598004341125,
0.4771738648414612,
0.5464624166488647,
-0.07901282608509064,
0.21354947984218597,
0.5274304151535034,
0.8864478468894958,
0.14570653438568115,
-0.10509371757507324,
-0.6324542760848999,
-0.8543758392333984,
-0.6847307682037354,... |
func (c *PositionClient) DeleteOne(po *Position) *PositionDeleteOne {
return c.DeleteOneID(po.ID)
} | [
-0.10307672619819641,
0.268828809261322,
0.44038471579551697,
0.5251416563987732,
0.800068199634552,
0.004527747631072998,
0.09091106057167053,
-0.08685222268104553,
0.23965056240558624,
-0.4694080948829651,
-0.5436737537384033,
-0.8556287288665771,
-0.9290207624435425,
-0.1520442813634872... |
func (c *PositionClient) DeleteOneID(id int) *PositionDeleteOne {
builder := c.Delete().Where(position.ID(id))
builder.mutation.id = &id
builder.mutation.op = OpDeleteOne
return &PositionDeleteOne{builder}
} | [
-0.3781600594520569,
-0.1153121292591095,
0.3714834749698639,
-0.021039120852947235,
0.13022589683532715,
-0.20014457404613495,
0.13665296137332916,
0.11882484704256058,
1.4800180196762085,
0.16084322333335876,
-0.44497376680374146,
-0.8076383471488953,
-1.0084192752838135,
0.5378908514976... |
func (c *PositionClient) Query() *PositionQuery {
return &PositionQuery{config: c.config}
} | [
0.7878467440605164,
-0.6390254497528076,
0.027674958109855652,
0.24474839866161346,
-0.2782590985298157,
0.03399553522467613,
-0.331547349691391,
0.35014113783836365,
0.3077932298183441,
-0.5706864595413208,
0.36713117361068726,
-0.439950555562973,
-0.6812188625335693,
0.028452320024371147... |
func (c *PositionClient) Get(ctx context.Context, id int) (*Position, error) {
return c.Query().Where(position.ID(id)).Only(ctx)
} | [
-0.4090719223022461,
-0.357001930475235,
0.08471311628818512,
-0.18077151477336884,
0.6620855331420898,
-0.2173604965209961,
-0.6798536777496338,
-0.5371091961860657,
0.3203328549861908,
-0.08221213519573212,
-0.2115820199251175,
-0.33323875069618225,
-0.6847906112670898,
-0.36315962672233... |
func (c *PositionClient) GetX(ctx context.Context, id int) *Position {
po, err := c.Get(ctx, id)
if err != nil {
panic(err)
}
return po
} | [
-0.3272249400615692,
0.7032423615455627,
0.33434298634529114,
0.37222445011138916,
-0.32721084356307983,
0.3441225588321686,
-1.1177412271499634,
-0.7974900603294373,
0.8195788860321045,
-0.30147430300712585,
-0.5626423954963684,
0.3831428289413452,
-0.18163107335567474,
-0.726377367973327... |
func (c *PositionClient) QueryUsers(po *Position) *UserQuery {
query := &UserQuery{config: c.config}
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
id := po.ID
step := sqlgraph.NewStep(
sqlgraph.From(position.Table, position.FieldID, id),
sqlgraph.To(user.Table, user.FieldID),
sq... | [
-0.16504457592964172,
-0.18668749928474426,
0.39385563135147095,
0.012419336475431919,
-0.6806814074516296,
-0.1975974142551422,
0.22712768614292145,
-0.05184195190668106,
-0.28531596064567566,
-0.15355102717876434,
0.27145835757255554,
-0.18278460204601288,
-0.05070178583264351,
-0.615597... |
func (c *PositionClient) Hooks() []Hook {
return c.hooks.Position
} | [
-0.6074113249778748,
-0.6328513026237488,
0.0938979983329773,
0.11263678222894669,
0.8302137851715088,
0.9397246241569519,
0.0023911751341074705,
-0.45862534642219543,
-0.12661631405353546,
-0.05597466602921486,
-0.10374216735363007,
-0.08587289601564407,
-0.9243922829627991,
-0.8469664454... |
func NewTitleClient(c config) *TitleClient {
return &TitleClient{config: c}
} | [
-0.22207847237586975,
-0.3747560977935791,
0.10921653360128403,
-0.0666205957531929,
-1.440108060836792,
0.08089404553174973,
-0.7405892014503479,
-0.2699816823005676,
-0.06909409165382385,
0.22788037359714508,
-1.0812313556671143,
0.6200451850891113,
-0.81939697265625,
-0.7015237808227539... |
func (c *TitleClient) Use(hooks ...Hook) {
c.hooks.Title = append(c.hooks.Title, hooks...)
} | [
-0.17002646625041962,
-0.017714709043502808,
0.8368327021598816,
-0.09856890887022018,
0.12233340740203857,
0.12631507217884064,
-1.0071343183517456,
-0.5299137830734253,
-0.6752603054046631,
0.23019294440746307,
0.20437252521514893,
0.31588467955589294,
-1.0963211059570312,
0.131229132413... |
func (c *TitleClient) Create() *TitleCreate {
mutation := newTitleMutation(c.config, OpCreate)
return &TitleCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
-0.03183607757091522,
-0.04324157536029816,
0.5594750046730042,
0.7095309495925903,
-0.8047094345092773,
0.5456401109695435,
-0.8522734642028809,
-0.07661856710910797,
-0.27827537059783936,
0.15656572580337524,
-0.08903452754020691,
-0.4639992117881775,
-0.6399784088134766,
0.0527947098016... |
func (c *TitleClient) Update() *TitleUpdate {
mutation := newTitleMutation(c.config, OpUpdate)
return &TitleUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
-0.28346380591392517,
-1.1377110481262207,
0.45660150051116943,
0.04493119567632675,
-1.546755313873291,
0.17147362232208252,
-0.9598022103309631,
0.4206523299217224,
0.2395993173122406,
0.5047400593757629,
0.04349912703037262,
0.16797183454036713,
-0.9246517419815063,
-1.0952155590057373,... |
func (c *TitleClient) UpdateOne(t *Title) *TitleUpdateOne {
mutation := newTitleMutation(c.config, OpUpdateOne, withTitle(t))
return &TitleUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
-1.0254697799682617,
-0.09960392862558365,
0.7337818741798401,
0.6656776070594788,
-1.1534006595611572,
0.30462777614593506,
-0.7344010472297668,
0.435496985912323,
0.32482433319091797,
0.8220330476760864,
-0.807586669921875,
-0.0700991228222847,
-0.658871591091156,
-1.199516773223877,
-... |
func (c *TitleClient) UpdateOneID(id int) *TitleUpdateOne {
mutation := newTitleMutation(c.config, OpUpdateOne, withTitleID(id))
return &TitleUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
-1.1915946006774902,
-0.8418148756027222,
0.564812421798706,
0.017857875674962997,
-1.593307375907898,
0.0819549486041069,
-0.5945777297019958,
0.2992211580276489,
1.3965787887573242,
0.760388970375061,
-0.5081905126571655,
0.01092836819589138,
-1.3745664358139038,
-0.07571353763341904,
... |
func (c *TitleClient) Delete() *TitleDelete {
mutation := newTitleMutation(c.config, OpDelete)
return &TitleDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
0.7540760636329651,
-0.39220598340034485,
0.44439899921417236,
0.10232764482498169,
-0.44383320212364197,
0.36839357018470764,
-0.5874538421630859,
0.43204227089881897,
0.6747373342514038,
0.21969695389270782,
0.46846523880958557,
0.5184489488601685,
-0.9266917109489441,
-0.789997160434722... |
func (c *TitleClient) DeleteOne(t *Title) *TitleDeleteOne {
return c.DeleteOneID(t.ID)
} | [
-0.11032897233963013,
0.12192356586456299,
0.5593643188476562,
0.3528400659561157,
-0.011740876361727715,
0.1583179086446762,
-0.47357645630836487,
-0.25864139199256897,
-0.05752462148666382,
-0.26832500100135803,
-0.33967557549476624,
0.05934607982635498,
-1.0915273427963257,
-0.195120736... |
func (c *TitleClient) DeleteOneID(id int) *TitleDeleteOne {
builder := c.Delete().Where(title.ID(id))
builder.mutation.id = &id
builder.mutation.op = OpDeleteOne
return &TitleDeleteOne{builder}
} | [
-0.4059256315231323,
-0.3816184997558594,
0.5100974440574646,
-0.1463063806295395,
-0.8837842345237732,
0.03312462940812111,
-0.40542149543762207,
0.1778659224510193,
1.143868327140808,
0.12461444735527039,
-0.17678187787532806,
0.0672103762626648,
-1.2462966442108154,
0.23705539107322693,... |
func (c *TitleClient) Query() *TitleQuery {
return &TitleQuery{config: c.config}
} | [
0.5180423855781555,
-0.39545467495918274,
0.2385924905538559,
0.237928107380867,
-1.3112612962722778,
0.2908655107021332,
-1.3090829849243164,
0.2393311858177185,
-0.09076729416847229,
-0.3651140034198761,
0.5389611721038818,
0.6442014575004578,
-0.4567590653896332,
-0.1967240273952484,
... |
func (c *TitleClient) Get(ctx context.Context, id int) (*Title, error) {
return c.Query().Where(title.ID(id)).Only(ctx)
} | [
0.03240663930773735,
0.03552500531077385,
0.2799592614173889,
-0.12453610450029373,
-0.04726206138730049,
-0.1296362578868866,
-1.403706431388855,
-0.9792263507843018,
-0.1011800542473793,
0.029807332903146744,
-0.05100581422448158,
0.6283134818077087,
-0.8430436253547668,
-0.8011766672134... |
func (c *TitleClient) GetX(ctx context.Context, id int) *Title {
t, err := c.Get(ctx, id)
if err != nil {
panic(err)
}
return t
} | [
-0.11946791410446167,
0.6446866989135742,
0.3595317006111145,
0.08480217307806015,
-0.8888255953788757,
0.45395123958587646,
-1.775376796722412,
-1.0000280141830444,
0.6493730545043945,
0.24871540069580078,
-0.464824914932251,
1.0325270891189575,
-0.5574052333831787,
-0.8496467471122742,
... |
func (c *TitleClient) QueryUsers(t *Title) *UserQuery {
query := &UserQuery{config: c.config}
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
id := t.ID
step := sqlgraph.NewStep(
sqlgraph.From(title.Table, title.FieldID, id),
sqlgraph.To(user.Table, user.FieldID),
sqlgraph.Edge(sq... | [
-0.46626904606819153,
-0.06778183579444885,
0.5686535239219666,
0.32796311378479004,
-1.06498384475708,
0.092055544257164,
-0.11726731806993484,
-0.1040230393409729,
-0.46820130944252014,
-0.18598096072673798,
0.3878066837787628,
0.5126425623893738,
0.08126523345708847,
-0.8720929622650146... |
func (c *TitleClient) Hooks() []Hook {
return c.hooks.Title
} | [
-0.37496036291122437,
-0.6381101608276367,
0.3018946051597595,
-0.06017402186989784,
-0.2146807312965393,
1.176087498664856,
-1.117881417274475,
-0.6686009764671326,
-0.17236556112766266,
0.017837731167674065,
0.451904833316803,
0.8237847089767456,
-0.7926902174949646,
-0.9684785008430481,... |
func NewUserClient(c config) *UserClient {
return &UserClient{config: c}
} | [
0.01592002436518669,
-0.7718652486801147,
-0.10295403003692627,
0.6275600790977478,
-1.5415393114089966,
0.18220651149749756,
0.6160878539085388,
-0.04691072925925255,
0.35317763686180115,
-0.16143281757831573,
-1.8098084926605225,
0.4299195110797882,
-0.6283130049705505,
-0.50768440961837... |
func (c *UserClient) Use(hooks ...Hook) {
c.hooks.User = append(c.hooks.User, hooks...)
} | [
-0.12002481520175934,
0.319712370634079,
0.6564117074012756,
0.5867082476615906,
0.5329973101615906,
0.2986138164997101,
0.36270850896835327,
-0.4605145752429962,
-0.312344491481781,
-0.5591630339622498,
-0.10021423548460007,
0.4638860821723938,
-1.270277738571167,
-0.04590293765068054,
... |
func (c *UserClient) Create() *UserCreate {
mutation := newUserMutation(c.config, OpCreate)
return &UserCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
0.2754826843738556,
0.23449523746967316,
0.4471127390861511,
1.2249144315719604,
-0.5967762470245361,
0.19333630800247192,
-0.08165477216243744,
-0.22512535750865936,
0.0562874898314476,
-0.274127334356308,
-0.42382681369781494,
-0.49135011434555054,
-0.4985331594944,
-0.16694630682468414,... |
func (c *UserClient) Update() *UserUpdate {
mutation := newUserMutation(c.config, OpUpdate)
return &UserUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
0.26659512519836426,
-0.6731975078582764,
0.46364066004753113,
0.5858889818191528,
-1.2537628412246704,
-0.1893204152584076,
0.11918365210294724,
0.4197969436645508,
0.7606961727142334,
0.04666217789053917,
-0.47424405813217163,
-0.047160666435956955,
-0.8468050360679626,
-1.38017916679382... |
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne {
mutation := newUserMutation(c.config, OpUpdateOne, withUser(u))
return &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
-0.8393116593360901,
0.1391703188419342,
0.6207115054130554,
1.431875228881836,
-1.1541677713394165,
0.2882082164287567,
0.48756736516952515,
0.4019598066806793,
0.7937682271003723,
0.10339026898145676,
-1.0819870233535767,
0.3278062641620636,
-0.7104583382606506,
-0.8722948431968689,
0.... |
func (c *UserClient) UpdateOneID(id int) *UserUpdateOne {
mutation := newUserMutation(c.config, OpUpdateOne, withUserID(id))
return &UserUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
-0.9560592174530029,
-0.5706863403320312,
0.4615853726863861,
0.45317578315734863,
-1.4924360513687134,
0.0689922347664833,
0.1375250518321991,
0.13973070681095123,
1.8160170316696167,
0.36591020226478577,
-0.6926479339599609,
0.12616725265979767,
-1.1354185342788696,
-0.16679510474205017,... |
func (c *UserClient) Delete() *UserDelete {
mutation := newUserMutation(c.config, OpDelete)
return &UserDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}
} | [
0.9353817105293274,
0.16251200437545776,
0.4903795123100281,
0.9569733738899231,
-0.21825751662254333,
-0.03506782278418541,
0.5220925807952881,
0.1080615445971489,
1.0668292045593262,
-0.04846664145588875,
-0.3896743059158325,
0.27319204807281494,
-0.4692056179046631,
-1.153455138206482,
... |
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne {
return c.DeleteOneID(u.ID)
} | [
-0.10733333975076675,
0.4541795551776886,
0.27734488248825073,
1.1166048049926758,
0.28527069091796875,
0.2354050725698471,
0.749838650226593,
-0.27047184109687805,
0.5275601148605347,
-1.0291019678115845,
-0.7648424506187439,
0.3881792426109314,
-0.9376381635665894,
0.2624568045139313,
... |
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne {
builder := c.Delete().Where(user.ID(id))
builder.mutation.id = &id
builder.mutation.op = OpDeleteOne
return &UserDeleteOne{builder}
} | [
-0.19923348724842072,
0.03961148113012314,
0.21976056694984436,
0.48122721910476685,
-0.45865046977996826,
0.3098638355731964,
0.33287474513053894,
-0.05083450675010681,
1.5398280620574951,
-0.001470650895498693,
-0.397713840007782,
0.06997815519571304,
-0.7355836629867554,
0.3856252729892... |
func (c *UserClient) Query() *UserQuery {
return &UserQuery{config: c.config}
} | [
1.000023365020752,
-0.2498757392168045,
0.06427782028913498,
0.6900286078453064,
-1.1521642208099365,
0.0031022464390844107,
-0.15200908482074738,
0.28784114122390747,
0.5447368621826172,
-0.6165443062782288,
-0.04344847798347473,
0.4900245666503906,
-0.4136946499347687,
-0.461124479770660... |
func (c *UserClient) Get(ctx context.Context, id int) (*User, error) {
return c.Query().Where(user.ID(id)).Only(ctx)
} | [
-0.17651048302650452,
0.06839226186275482,
0.19556176662445068,
0.41984617710113525,
0.2917179465293884,
-0.06869881600141525,
-0.5434855818748474,
-0.6348419189453125,
0.0647452175617218,
-0.6997249722480774,
-0.3379647731781006,
0.8204095959663391,
-0.2581911087036133,
-0.805105030536651... |
func (c *UserClient) GetX(ctx context.Context, id int) *User {
u, err := c.Get(ctx, id)
if err != nil {
panic(err)
}
return u
} | [
-0.2765403687953949,
1.1721519231796265,
0.24243846535682678,
0.7071589231491089,
-0.7155205607414246,
0.5789834260940552,
-1.239532232284546,
-0.8016368746757507,
1.1531078815460205,
-0.5264552235603333,
-0.5843989253044128,
1.168231725692749,
-0.3858429193496704,
-0.8505095839500427,
0... |
func (c *UserClient) QueryGender(u *User) *GenderQuery {
query := &GenderQuery{config: c.config}
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
id := u.ID
step := sqlgraph.NewStep(
sqlgraph.From(user.Table, user.FieldID, id),
sqlgraph.To(gender.Table, gender.FieldID),
sqlgraph.Ed... | [
-0.2094791978597641,
0.3734939396381378,
0.5453727841377258,
0.586848795413971,
-0.753506600856781,
0.5978463888168335,
0.5015882849693298,
-0.011313636787235737,
-0.7685794234275818,
-0.841640293598175,
-0.5858108997344971,
0.6756784319877625,
0.2902858853340149,
0.9783661365509033,
-0.... |
func (c *UserClient) QueryPosition(u *User) *PositionQuery {
query := &PositionQuery{config: c.config}
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
id := u.ID
step := sqlgraph.NewStep(
sqlgraph.From(user.Table, user.FieldID, id),
sqlgraph.To(position.Table, position.FieldID),
s... | [
-0.00987369567155838,
-0.41049233078956604,
0.42344018816947937,
0.4097784459590912,
-0.7300283908843994,
-0.11461829394102097,
0.4363515377044678,
-0.14510707557201385,
-0.03973805531859398,
-0.3187180459499359,
0.183334082365036,
-0.9199393391609192,
-0.0020667065400630236,
-0.2798190712... |
func (c *UserClient) QueryTitle(u *User) *TitleQuery {
query := &TitleQuery{config: c.config}
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
id := u.ID
step := sqlgraph.NewStep(
sqlgraph.From(user.Table, user.FieldID, id),
sqlgraph.To(title.Table, title.FieldID),
sqlgraph.Edge(sq... | [
0.07781843841075897,
0.24096137285232544,
0.534211277961731,
0.8548836708068848,
-1.2355186939239502,
-0.022686943411827087,
-0.2447318136692047,
-0.3577323853969574,
-0.022338738664984703,
-0.07222285866737366,
0.02541910856962204,
0.026674658060073853,
-0.11333590745925903,
-0.6537667512... |
func (c *UserClient) Hooks() []Hook {
return c.hooks.User
} | [
-0.18704651296138763,
-0.22168400883674622,
-0.01656944304704666,
0.9336350560188293,
0.18997886776924133,
1.2132556438446045,
0.4173423945903778,
-0.30660581588745117,
0.31610432267189026,
-0.5723458528518677,
-0.026750866323709488,
1.0978953838348389,
-0.7944846153259277,
-1.047258019447... |
func TestClientRouting(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), time.Minute*3)
defer cancel()
l := log.NewLogfmtLogger(log.NewSyncWriter(os.Stderr))
seedSrv, seedNode := makeTestNode(t, log.With(l, "node", "seed"), func(s *grpc.Server) {
kvproto.RegisterKVServer(s, echoKVServer(t... | [
0.11837245523929596,
0.7543481588363647,
0.8754045963287354,
-0.07871334254741669,
0.37992173433303833,
-0.11459481716156006,
0.9260905385017395,
-0.7049472332000732,
-0.3660952150821686,
0.02697197161614895,
0.23028776049613953,
0.5669897794723511,
-0.31122738122940063,
-0.300721436738967... |
func helloGo() {
var ret = 100
fmt.Println(ret)
} | [
0.4526800513267517,
0.23945240676403046,
0.5962854027748108,
0.3354591131210327,
0.3143318295478821,
0.3675599694252014,
0.8975467681884766,
0.5850231051445007,
-1.624323844909668,
-0.0559077262878418,
-0.8634428977966309,
0.5215029716491699,
-0.12983937561511993,
0.2512390613555908,
0.6... |
func floatSum(c float32, d float32) (t1 float32, t2 float32) {
return c + d, c - d
} | [
0.010273011401295662,
0.9576318264007568,
0.6814731359481812,
-0.9150071740150452,
0.026118282228708267,
0.6502277255058289,
1.088472843170166,
-1.1156041622161865,
-0.6212116479873657,
-0.8618987798690796,
-0.8531675338745117,
0.33566513657569885,
0.37821537256240845,
-0.20262549817562103... |
func Elt(sequence types.Sequence, from types.Integer, others ...types.Expr) (types.Expr, error) {
if len(others) > 1 {
return nil, errors.New("elt: too many arguments")
} else if len(others) == 0 {
return sequence.Get(from)
}
to, ok := others[0].(types.Integer)
if !ok {
return nil, errors.New("elt: invalid ... | [
-0.12924771010875702,
-0.05742096155881882,
0.5498948693275452,
-0.36749765276908875,
-0.416759729385376,
0.07309625297784805,
-0.44894617795944214,
-0.09511735290288925,
-0.06125761568546295,
0.5885926485061646,
0.198264479637146,
-0.009331206791102886,
-0.08283473551273346,
-0.6724304556... |
func (c *JobSales) Table_Name() query.TableName {
return JobSales_TableName
} | [
1.291223168373108,
-0.18631000816822052,
0.2643260359764099,
0.6628130674362183,
-0.5097416639328003,
0.3196130096912384,
0.19230766594409943,
0.21257342398166656,
-0.5119098424911499,
-0.3373680114746094,
0.7309955358505249,
-0.22767890989780426,
0.9793630838394165,
-0.2692996859550476,
... |
func (c *JobSales) Table_PrimaryKey() query.Column {
return "JobSalesID"
} | [
1.6797759532928467,
0.06902884691953659,
0.03396954759955406,
0.43681833148002625,
-0.10321027785539627,
0.1911228895187378,
0.5852193832397461,
-0.3990998864173889,
0.17103205621242523,
-0.5166666507720947,
0.9001182317733765,
-0.6051689982414246,
0.9168441295623779,
-0.17857421934604645,... |
func (c *JobSales) Table_InsertColumns() []query.Column {
return []query.Column{"DateCreated", "Content", "ObjectType", "ObjectID"}
} | [
0.18786472082138062,
0.4815591275691986,
0.37226834893226624,
-0.01381591334939003,
0.7816523313522339,
0.3005840480327606,
0.4789069890975952,
-0.7463180422782898,
-0.915752112865448,
-0.29509562253952026,
-0.8003606796264648,
-0.6301592588424683,
0.2044028490781784,
-0.6610506772994995,
... |
func (c *JobSales) Table_UpdateColumns() []query.Column {
return []query.Column{"Content", "ObjectType", "ObjectID"}
} | [
-0.24610669910907745,
-0.7526533007621765,
0.46802929043769836,
0.09946467727422714,
0.36434245109558105,
0.15635843575000763,
0.13465602695941925,
-1.0603920221328735,
-0.6908370852470398,
0.31608515977859497,
-0.6348485946655273,
-0.05165211856365204,
0.490081250667572,
-0.99721997976303... |
func Start() (*Server, error) {
// start the server to listen to events
eventListener, e := net.Listen("tcp", eventAddr)
if e != nil {
log.Fatalf("Could not start the server on port: %s. %s", eventAddr, e.Error())
return nil, e
}
// start the server to listen to client connections
clientListener, e := net.L... | [
0.8042702674865723,
-1.0168877840042114,
0.2611604928970337,
-0.9218865036964417,
0.5735638737678528,
0.19426217675209045,
0.23253339529037476,
0.232153058052063,
-0.13692185282707214,
0.36005711555480957,
-0.09272290766239166,
1.4685652256011963,
-0.22851474583148956,
-0.21198472380638123... |
func AcceptClients(l net.Listener) {
for {
conn, e := l.Accept()
if e != nil {
log.Printf("Failed to accept a client connection with error: %s\n", e.Error())
return
}
go Setup(conn)
}
} | [
-0.03156245872378349,
0.04571325331926346,
0.5765463709831238,
-0.9672680497169495,
-0.08952201902866364,
0.7219606637954712,
0.17803291976451874,
-0.4182417690753937,
-0.7371501326560974,
0.4248126745223999,
0.3604736328125,
0.16978970170021057,
-0.06479290127754211,
1.1073200702667236,
... |
func AcceptEventSource(l net.Listener) {
conn, e := l.Accept()
defer signal()
defer l.Close()
defer conn.Close()
if e != nil {
log.Printf("Failed to accept an event source connection with error: %s\n", e.Error())
return
}
handler := InitEventHandler(conn)
handler.read()
} | [
0.06884496659040451,
0.05487766116857529,
0.40348342061042786,
-1.1671191453933716,
-0.8075675964355469,
0.28330424427986145,
0.09104153513908386,
0.5111962556838989,
-0.9039131999015808,
-0.11882533878087997,
-0.7978058457374573,
-0.8087783455848694,
-0.0560816191136837,
0.874142408370971... |
func signal() {
noEvents = true
} | [
0.32880452275276184,
0.5529839396476746,
0.2405155599117279,
0.1533595472574234,
-0.0667722225189209,
0.7233826518058777,
1.1714192628860474,
0.5609974265098572,
-0.08839070796966553,
-0.43281710147857666,
-1.281723976135254,
0.6101678013801575,
-0.7652314901351929,
0.7084347605705261,
-... |
func handleEvent(e *event) {
switch e.eType {
case Follow:
follow(e)
case Unfollow:
unFollow(e)
case Broadcast:
clients.Range(func(h *ClientHandler) {
h.Write(e)
})
case PrivateMessage:
if h, ok := clients.Get(e.to); ok {
h.Write(e)
}
case StatusUpdate:
updateStatus(e)
default:
log.Panicf("... | [
-0.06029384583234787,
0.33907997608184814,
0.62312912940979,
0.2225399762392044,
0.8420183062553406,
0.9147964715957642,
0.7025962471961975,
-0.29081231355667114,
0.7333003878593445,
0.19577215611934662,
0.221771240234375,
0.30098623037338257,
0.2737594246864319,
0.8078555464744568,
0.51... |
func updateStatus(e *event) {
fMap := followers[e.from]
for _, f := range fMap {
if h, ok := clients.Get(f); ok {
h.Write(e)
}
}
} | [
-0.17753426730632782,
-1.1935454607009888,
0.523664653301239,
0.4097863733768463,
-0.0332021526992321,
0.00704359682276845,
0.39133334159851074,
0.4734690487384796,
-0.2383478730916977,
0.46868380904197693,
-0.46858420968055725,
0.8933839201927185,
-0.15041938424110413,
0.7416369318962097,... |
func follow(e *event) {
fMap, ok := followers[e.to]
if !ok {
fMap = make(map[int]int)
}
fMap[e.from] = e.from
followers[e.to] = fMap
if h, ok := clients.Get(e.to); ok {
h.Write(e)
}
} | [
-0.2498636543750763,
-0.6269080638885498,
0.7103326320648193,
-0.10824881494045258,
-0.312765508890152,
0.4629131257534027,
0.506074070930481,
0.1871868073940277,
-0.0003563136560842395,
-0.49520638585090637,
-0.683444619178772,
0.6442939043045044,
0.28593042492866516,
0.4671506881713867,
... |
func unFollow(e *event) {
if fMap, ok := followers[e.to]; ok {
delete(fMap, e.from)
}
} | [
0.29745087027549744,
-0.20259451866149902,
0.6407946944236755,
-0.16062448918819427,
-0.23945970833301544,
-0.030056297779083252,
0.9904922842979431,
0.622422993183136,
0.18720193207263947,
0.024599265307188034,
0.14645229279994965,
0.07155589014291763,
0.2526724338531494,
0.56600999832153... |
func flushAll() {
clients.Range(func(h *ClientHandler) {
h.Flush()
})
} | [
0.3644827604293823,
-0.21925389766693115,
0.3800422251224518,
0.9795296788215637,
0.30016347765922546,
1.1328297853469849,
0.2454526126384735,
-0.525396466255188,
-0.6054556965827942,
-0.3089281916618347,
-0.13861027359962463,
1.181004524230957,
-0.2983415424823761,
1.2469277381896973,
-... |
func LogWarning(text string) {
fmt.Println("WARNING:", text)
} | [
0.9971372485160828,
-0.10434364527463913,
0.32613372802734375,
0.1933383345603943,
-0.6038291454315186,
0.36981189250946045,
-1.1136088371276855,
0.3317151367664337,
0.196156308054924,
0.07089579105377197,
-0.4724263548851013,
0.8251897692680359,
0.10228796303272247,
0.02310071513056755,
... |
func LogNotice(text string) {
fmt.Println("NOTICE:", text)
} | [
0.7497288584709167,
-0.3904038369655609,
0.4148813486099243,
0.11134368181228638,
0.40574413537979126,
-0.18227821588516235,
-1.1466271877288818,
0.43683844804763794,
-0.5055174231529236,
0.07205860316753387,
-0.46982377767562866,
0.7316617369651794,
0.016156747937202454,
0.110000878572463... |
func LogVerbose(text string) {
fmt.Println("VERBOSE:", text)
} | [
1.0155701637268066,
-0.017172107473015785,
0.5984811782836914,
0.39025527238845825,
0.5512485504150391,
-0.2725628912448883,
-1.5127695798873901,
0.04908573254942894,
-0.5842022895812988,
0.07608987390995026,
-0.6118723750114441,
1.5141745805740356,
-0.8079989552497864,
0.26681098341941833... |
func LogDebug(debug bool, text string) {
if debug {
fmt.Println(Timestamp(), "DEBUG:", text)
}
} | [
0.8987926840782166,
0.09768689423799515,
0.39492475986480713,
0.2862571179866791,
0.25460320711135864,
-0.005079702008515596,
-1.6086565256118774,
0.9737370014190674,
0.4113638997077942,
0.0648638904094696,
-0.5983323454856873,
0.16206708550453186,
-0.2730390429496765,
0.7070033550262451,
... |
func Log(text string, silent bool) {
if !silent {
logWithTimestamp(text)
}
} | [
1.0460351705551147,
0.665604829788208,
0.4191497564315796,
0.6847414374351501,
-1.419039011001587,
0.5004929304122925,
-0.912471354007721,
1.383637547492981,
0.697480320930481,
0.10632815957069397,
-0.4636356234550476,
-0.216207817196846,
-0.2018761932849884,
0.08064247667789459,
-0.0647... |
func logWithTimestamp(text string) {
fmt.Println(Timestamp(), text)
} | [
1.2433350086212158,
-0.7041250467300415,
0.6462069153785706,
-0.0402178131043911,
-0.8695220947265625,
0.11822772771120071,
-1.1176568269729614,
0.10125517100095749,
0.6736515164375305,
0.20916835963726044,
-0.7944773435592651,
0.3255242705345154,
0.42059609293937683,
0.2506488561630249,
... |
func PrintIfNotSilent(text string, silent bool) {
if !silent {
fmt.Print(text)
}
} | [
1.4361008405685425,
-0.696093738079071,
0.17725954949855804,
0.5313489437103271,
-0.6287351846694946,
0.8366788625717163,
-1.1803244352340698,
0.14038747549057007,
-0.6467660069465637,
0.6688228249549866,
0.18455110490322113,
0.3549308478832245,
-1.366576910018921,
-0.011549768969416618,
... |
func uint32ToBitLSBF(w []byte, d []uint8, bit uint8, skip int) {
// Little endian.
x := bit / 8
d = d[x:]
bit -= 8 * x
mask := uint8(1) << bit
for i := range w {
w[i] = ((d[0]&mask)>>bit<<0 |
(d[skip*1]&mask)>>bit<<1 |
(d[skip*2]&mask)>>bit<<2 |
(d[skip*3]&mask)>>bit<<3 |
(d[skip*4]&mask)>>bit<<4 |
... | [
0.0602971650660038,
0.5489428043365479,
0.9302644729614258,
-0.636197030544281,
-0.08724772930145264,
0.6315130591392517,
0.4123569130897522,
-1.0001717805862427,
0.40907594561576843,
-0.061363037675619125,
-0.8082895874977112,
0.07213975489139557,
-0.5277096033096313,
0.35241439938545227,... |
func raster32(s gpiostream.Stream, skip int, clear, set []uint32, mask uint32) error {
if mask == 0 {
return errors.New("bcm283x: mask is 0")
}
if len(clear) == 0 {
return errors.New("bcm283x: clear buffer is empty")
}
if len(set) == 0 {
return errors.New("bcm283x: set buffer is empty")
}
if len(clear) != ... | [
-0.13302373886108398,
0.46972382068634033,
0.6556758880615234,
-0.06798027455806732,
-0.9789214134216309,
0.6290640234947205,
0.18484275043010712,
-1.572624921798706,
0.3021053671836853,
0.4130329489707947,
0.5808771252632141,
0.811464250087738,
-0.9208484888076782,
0.3656313419342041,
0... |
func copyStreamToDMABuf(w gpiostream.Stream, dst []uint32) error {
switch v := w.(type) {
case *gpiostream.BitStream:
if v.LSBF {
return errors.New("TODO(simokawa): handle BitStream.LSBF")
}
// This is big-endian and MSB first.
i := 0
for ; i < len(v.Bits)/4; i++ {
dst[i] = binary.BigEndian.Uint32(v.B... | [
-0.9410395622253418,
0.6234936118125916,
0.8668233156204224,
0.20038673281669617,
-0.22444377839565277,
0.40738776326179504,
0.5674306750297546,
-0.5566854476928711,
0.2649080753326416,
0.3785144090652466,
-0.5106287598609924,
0.9428051710128784,
-0.3770829737186432,
0.5598992109298706,
... |
func TestAdhoc_Edits(t *testing.T) {
testenv.NeedsGo1Point(t, 18)
const files = `
-- a.go --
package foo
const X = 1
-- b.go --
package foo
// import "errors"
const Y = X
`
Run(t, files, func(t *testing.T, env *Env) {
env.OpenFile("b.go")
for i := 0; i < 10; i++ {
env.RegexpReplace("b.go", `// import "... | [
0.4621294438838959,
0.9136518836021423,
0.47642385959625244,
-0.5082604885101318,
1.41798734664917,
0.29121941328048706,
0.912408709526062,
0.3298141360282898,
-0.24080215394496918,
0.6479424238204956,
-0.427924782037735,
0.8498126268386841,
0.5482825636863708,
0.011138580739498138,
0.96... |
func (o *PostAPI24MaintenanceWindowsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPostApi24MaintenanceWindowsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
... | [
-0.02753780037164688,
-1.2936214208602905,
0.5862435698509216,
0.5915761590003967,
-0.23259153962135315,
-0.9639892578125,
-0.5467938184738159,
0.15454505383968353,
0.2873120605945587,
0.03229082003235817,
0.5968953371047974,
-0.5343100428581238,
-1.6280362606048584,
0.37299466133117676,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.