text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (c *VaultController) finalizeAWSRole(awsRClient aws.AWSRoleInterface, awsRole *api.AWSRole) error {
err := awsRClient.DeleteRole(awsRole.RoleName())
if err != nil {
return errors.Wrap(err, "failed to delete aws role")
}
return nil
} | [
0.3970673680305481,
0.18064241111278534,
0.5942829847335815,
-1.3049540519714355,
0.11985977739095688,
0.14570291340351105,
-0.3905523717403412,
-1.2230992317199707,
0.6841065287590027,
0.7445851564407349,
0.507086992263794,
-0.1930815875530243,
-0.01694902405142784,
0.6439387202262878,
... |
func tabSort() ui.Control {
vbox := ui.NewVerticalBox()
vbox.SetPadded(true)
hbox := ui.NewHorizontalBox()
hbox.SetPadded(true)
vbox.Append(hbox, false)
vbox.Disable() // Used to know if control has been already initialised
return tabMakeSort(vbox)
} | [
0.430817186832428,
-0.05444778874516487,
0.5091481804847717,
-0.6433525681495667,
-0.5334961414337158,
0.6800504326820374,
0.16527727246284485,
-0.8126667737960815,
-0.9590411186218262,
-0.5965578556060791,
-0.34780415892601013,
-0.3781571090221405,
-0.3165631890296936,
-0.0268195774406194... |
func testPrint(t *testing.T, flag int, prefix string, pattern string, logLevel int) {
buf := new(bytes.Buffer)
l := lo.New(buf, prefix, flag)
l.SetLevel(logLevel)
l.Printf("hello %d world", 23)
if l.Level() != lo.LevelDebug {
l.Printf("debug: hello %d world", 23)
}
line := buf.String()
line = line[0 : len(... | [
1.1896129846572876,
-0.6385239362716675,
0.8825855255126953,
-0.29104068875312805,
0.30139824748039246,
0.24866832792758942,
-0.07430439442396164,
-0.2822786569595337,
-0.1367408186197281,
-1.155940055847168,
0.19397686421871185,
0.7256170511245728,
-0.473114937543869,
-0.21181124448776245... |
func RangeCommand(c *cmds.Context) {
var offset []byte
var limit int
if len(c.Args) < 1 {
c.WriteError("ELIST must has at least 1 argument, ELIST <STREAM> [<offset> <size>]")
return
}
prefix := c.Args[0]
if len(c.Args) > 1 {
offset = c.Args[1]
}
if len(c.Args) > 2 {
limit, _ = strconv.Atoi(string(c.A... | [
-0.864952027797699,
-0.16643117368221283,
0.8486927151679993,
-0.3282192647457123,
0.2559891939163208,
0.10799869894981384,
-0.2812851369380951,
-0.00884525291621685,
-0.06287091970443726,
0.28667324781417847,
-0.6062860488891602,
0.6620466709136963,
-0.23409195244312286,
0.336566656827926... |
func GaleShapeley(men []Person, women []Person) {
mPrefs := make(map[string]*queue.Queue)
wPrefs := make(map[string]map[string]int)
wEngag := make(map[string]*Person)
freeMen := queue.NewQueue()
for _, man := range men {
// Create a queue of all possible women for a man
mPrefs[man.Name] = queue.NewQueue()
... | [
-0.017524132505059242,
-0.10910496860742569,
0.9333535432815552,
-0.9899106025695801,
-0.3575405180454254,
-0.059478938579559326,
0.03678873926401138,
-0.6767934560775757,
-0.4612845182418823,
0.691698431968689,
-0.16834726929664612,
0.6960776448249817,
-0.33064591884613037,
0.927663803100... |
func (nsc *NovelSiteConfig) Download(u string, gen ebook.IBook) {
theURL, _ := url.Parse(u)
headers := http.Header{
"Referer": []string{fmt.Sprintf("%s://%s", theURL.Scheme, theURL.Host)},
"User-Agent": []string{"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Fire... | [
0.020313117653131485,
0.5886749029159546,
1.1863856315612793,
0.0060254475101828575,
-0.5134668350219727,
0.1617318093776703,
-0.18123672902584076,
0.1313326358795166,
-0.16066168248653412,
0.866564154624939,
0.34168505668640137,
0.15742886066436768,
-1.1391620635986328,
0.3492718935012817... |
func (e *EnrichedEvent) RequestHeaders() http.Header {
requestHeaders := make(http.Header)
for k, v := range e.Transaction.Request.Headers {
requestHeaders.Set(k, v)
}
return requestHeaders
} | [
-1.1270126104354858,
-0.07263021171092987,
0.5545128583908081,
0.8506893515586853,
0.4980972707271576,
-0.17570525407791138,
-0.8849362134933472,
-0.7025535106658936,
0.16319599747657776,
-0.12620405852794647,
0.4887363612651825,
-0.3080286681652069,
-0.5503939986228943,
-0.276381224393844... |
func (e *EnrichedEvent) GetMessage(ruleID int) *types.Message {
ruleIDstr := strconv.Itoa(ruleID)
for _, msg := range e.Transaction.Messages {
if msg.Details.RuleID == ruleIDstr {
return &msg
}
}
return nil
} | [
0.867630124092102,
0.1959606558084488,
0.46072614192962646,
-0.5286914110183716,
1.502185583114624,
-1.0415035486221313,
-0.07957733422517776,
-0.9644597172737122,
0.4054238200187683,
0.8064619898796082,
0.7676525115966797,
0.9288322329521179,
-0.5708709359169006,
0.8379970192909241,
0.2... |
func (st *StatMicMsgBody) ReadFrom(_is *codec.Reader) error {
var err error
var length int32
var have bool
var ty byte
st.resetDefault()
err = _is.Read_int32(&st.Count, 0, true)
if err != nil {
return err
}
err = _is.Read_int32(&st.TimeoutCount, 1, true)
if err != nil {
return err
}
... | [
0.4611271023750305,
-0.4590626060962677,
0.8512251377105713,
-0.27366340160369873,
-0.5955150723457336,
-0.41649970412254333,
0.7208707928657532,
-0.8019466400146484,
-0.306796669960022,
-0.3910481929779053,
0.18035103380680084,
0.2701839208602905,
-0.03979639708995819,
0.29311755299568176... |
func (st *StatMicMsgBody) ReadBlock(_is *codec.Reader, tag byte, require bool) error {
var err error
var have bool
st.resetDefault()
err, have = _is.SkipTo(codec.STRUCT_BEGIN, tag, require)
if err != nil {
return err
}
if !have {
if require {
return fmt.Errorf("require StatMicMsgBody, but not ... | [
-0.25343623757362366,
0.08625742048025131,
1.1302086114883423,
0.4596169888973236,
-0.32359224557876587,
0.14268048107624054,
0.7860884070396423,
-0.8313511610031128,
-0.8893041014671326,
-0.3553609848022461,
0.10970348119735718,
0.7082374095916748,
-0.6786028146743774,
0.7463361620903015,... |
func (st *StatMicMsgBody) WriteTo(_os *codec.Buffer) error {
var err error
err = _os.Write_int32(st.Count, 0)
if err != nil {
return err
}
err = _os.Write_int32(st.TimeoutCount, 1)
if err != nil {
return err
}
err = _os.Write_int32(st.ExecCount, 2)
if err != nil {
return err
}
err... | [
0.0602385550737381,
0.21058934926986694,
0.8256574273109436,
-0.6568312644958496,
0.6165632009506226,
-0.37785255908966064,
0.6636247634887695,
-1.0631749629974365,
-0.6958470344543457,
-0.6945025324821472,
-0.8561766147613525,
0.725191593170166,
-0.3552917540073395,
0.403672456741333,
0... |
func New(ctx context.Context, log logger.Logger, db *db.Store, cache *cache.Cache) (*Store, error) {
s := &Store{
log: log,
cache: cache,
}
// Set configuration
s.setConfig()
var err error
switch s.typeStore {
case "postgres":
fallthrough
default:
s.store, err = postgres.New(ctx, db)
if err != ni... | [
-0.2069067806005478,
-0.1354977935552597,
-0.03222426027059555,
-0.004201328847557306,
-0.790390133857727,
0.5795238614082336,
-0.1390489637851715,
-0.35247141122817993,
0.009824967943131924,
0.12170017510652542,
-0.04798218980431557,
0.47260579466819763,
-0.2814502716064453,
0.50803309679... |
func NewBenchmark(driver *driver.Driver) *Benchmark {
b := new(Benchmark)
b.driver = driver
b.context = driver.Init()
b.loadProgram()
return b
} | [
0.6989277005195618,
-0.3012160658836365,
0.021503157913684845,
0.7335923314094543,
0.38028228282928467,
-0.6071286797523499,
0.10413732379674911,
0.29289525747299194,
0.30488842725753784,
-0.14768819510936737,
-0.6422056555747986,
0.5996279716491699,
-0.7043354511260986,
0.6164255142211914... |
func (b *Benchmark) SetUnifiedMemory() {
b.useUnifiedMemory = true
} | [
0.48257091641426086,
0.7354751229286194,
0.49100735783576965,
-0.14295296370983124,
0.8820088505744934,
0.376977801322937,
1.0443257093429565,
0.03509437292814255,
-0.07415013760328293,
-0.5033465623855591,
-0.8544690608978271,
0.8710276484489441,
-0.5847126245498657,
1.1143884658813477,
... |
func (b *Benchmark) Run() {
for _, gpu := range b.gpus {
b.driver.SelectGPU(b.context, gpu)
b.queues = append(b.queues, b.driver.CreateCommandQueue(b.context))
}
if b.NumIterations == 0 || b.NumIterations > b.NumNodes {
b.NumIterations = b.NumNodes
}
b.initMem()
b.exec()
} | [
-0.07837183773517609,
0.2700191140174866,
0.5729274153709412,
0.887900710105896,
1.0763717889785767,
-0.49177712202072144,
1.233102560043335,
0.028088876977562904,
-0.5162708163261414,
0.109165720641613,
0.025854330509901047,
0.4812718629837036,
-0.42101261019706726,
0.5371742844581604,
... |
func GetBadDriverStatuses(w http.ResponseWriter, r *http.Request) {
statuses := service.FetchBadDriverStatus()
if len(statuses) < 1 {
WriteEmptyArray(w)
return
}
WriteSuccess(w, statuses)
} | [
-1.3136814832687378,
-0.8103164434432983,
0.2474806010723114,
0.3696381151676178,
0.5028114914894104,
-0.33645814657211304,
-1.151377558708191,
-0.34452128410339355,
0.3986580967903137,
-0.5056082010269165,
0.09597963094711304,
0.5173300504684448,
-1.1257272958755493,
0.8852816224098206,
... |
func GetBadDriverStatusById(w http.ResponseWriter, r *http.Request) {
params := mux.Vars(r)
id, _ := strconv.Atoi(params["id"])
status, err := service.FetchBadDriverStatuById(id)
if err != nil {
WriteError(w, 500, "internal server error")
return
}
if status.Id == 0 {
WriteError(w, 404, "not found")
retu... | [
-0.9282111525535583,
-1.126082420349121,
0.34923073649406433,
-0.27688246965408325,
-0.012063881382346153,
-0.34242600202560425,
-1.0513137578964233,
-0.4709230661392212,
0.09079810976982117,
0.10078909993171692,
0.05328880250453949,
0.9923766255378723,
-0.8864894509315491,
0.7867235541343... |
func NewSignerFromFromFile(crypto *cryptoprov.Crypto, caKeyFile string) (crypto.Signer, error) {
cakey, err := ioutil.ReadFile(caKeyFile)
if err != nil {
return nil, errors.WithMessagef(err, "load key file")
}
// remove trailing space and end-of-line
cakey = []byte(strings.TrimSpace(string(cakey)))
return NewS... | [
0.6189918518066406,
-1.2447478771209717,
0.35908618569374084,
0.48011529445648193,
-1.462354063987732,
0.6448863744735718,
-0.0707169771194458,
0.826535701751709,
-1.103667140007019,
0.15204821527004242,
-0.841040313243866,
-0.14265646040439606,
-0.7527804374694824,
1.2598496675491333,
0... |
func NewSignerFromPEM(prov *cryptoprov.Crypto, caKey []byte) (crypto.Signer, error) {
_, pvk, err := prov.LoadPrivateKey(caKey)
if err != nil {
return nil, errors.WithStack(err)
}
signer, supported := pvk.(crypto.Signer)
if !supported {
return nil, errors.Errorf("loaded key of %T type does not support crypto.... | [
0.10750169306993484,
-0.6186975240707397,
0.39356565475463867,
0.9548565149307251,
-1.3681087493896484,
0.028109919279813766,
-0.09324031323194504,
0.09720445424318314,
-0.10644159466028214,
0.41758015751838684,
-0.33849892020225525,
-0.4501955509185791,
-0.7971936464309692,
0.698867559432... |
func MustGetString(cmd *cobra.Command, name string) string {
s, err := cmd.Flags().GetString(name)
if err != nil {
panic(err)
}
return s
} | [
0.5005130767822266,
0.07290546596050262,
0.2847137451171875,
0.0790971890091896,
-0.1594468504190445,
0.8556360006332397,
-1.2419981956481934,
-1.1897783279418945,
-0.3723577857017517,
0.450755774974823,
0.17703628540039062,
0.7030081748962402,
-0.9998031258583069,
0.2289978265762329,
0.... |
func (broker *HEBroker) getBestIP() string {
sys.Logger.Printf("Determinate Best Tunnel Server End......\n")
defer func() {
sys.Logger.Printf("Determinate Best Tunnel Server End: Finish\n")
}()
/*
visit https://tunnelbroker.net/new_tunnel.php
parse ips
*/
ipUrl := "https://tunnelbroker.net/new_tunnel.php"... | [
-1.0270757675170898,
-0.48129042983055115,
1.084154486656189,
0.3790458142757416,
-0.3188905119895935,
-0.6618779301643372,
-0.4403896927833557,
0.0850246325135231,
-0.32380765676498413,
0.31382498145103455,
-0.27033963799476624,
0.06471242755651474,
-0.2594294250011444,
-0.183934167027473... |
func BuildRuntimeEnvVars(runtime EnvRuntime, app *v1alpha1.App) (out []corev1.EnvVar) {
for _, varSet := range getRuntimeEnvVars(runtime) {
variable := varSet.compute(app)
variable.Name = varSet.name
out = append(out, variable)
// Use the variable resolution syntax for aliases so it's immediately
// apparen... | [
-1.1195542812347412,
-0.27653202414512634,
0.4225919842720032,
-0.07840187847614288,
-0.048431407660245895,
0.08902458846569061,
-0.4853975176811218,
0.6933814883232117,
-0.5664210319519043,
0.10150709003210068,
0.05576207861304283,
0.5985938906669617,
0.16523633897304535,
1.21994292736053... |
func RuntimeEnvVarList(runtime EnvRuntime) sets.String {
out := sets.NewString()
for _, varSet := range getRuntimeEnvVars(runtime) {
out.Insert(varSet.name)
out.Insert(varSet.aliases...)
}
return out
} | [
-0.7045976519584656,
-0.3822372257709503,
0.5034279823303223,
-0.6695339679718018,
-0.26694291830062866,
0.6936007142066956,
-0.9549596905708313,
0.3470723628997803,
-0.3494991362094879,
0.8622188568115234,
-0.861701250076294,
0.25351428985595703,
0.41328558325767517,
1.4376071691513062,
... |
func RuntimeEnvVarDocs(runtime EnvRuntime) string {
w := &bytes.Buffer{}
fmt.Fprintln(w, "Kf provides the following runtime environment variables:")
fmt.Fprintln(w, "")
envVars := getRuntimeEnvVars(runtime)
envVars = algorithms.Dedupe(envVars).(runtimeEnvVars)
sort.Sort(envVars)
for _, v := range envVars {
... | [
-0.13621532917022705,
-1.08629310131073,
0.8368697762489319,
-1.4294356107711792,
-0.26785799860954285,
0.3487269878387451,
-0.44000208377838135,
-1.010624647140503,
-0.5047736763954163,
0.317068874835968,
0.3561036288738251,
0.6355323791503906,
0.113347627222538,
0.6892691850662231,
-0.... |
func (bot *Bot) GetStickerSet(name string) (*StickerSet, error) {
dst, err := json.Marshal(&GetStickerSetParameters{Name: name})
if err != nil {
return nil, err
}
resp, err := bot.request(dst, MethodGetStickerSet)
if err != nil {
return nil, err
}
var data StickerSet
err = json.Unmarshal(*resp.Result, &da... | [
-0.30892401933670044,
0.4146178364753723,
0.5078432559967041,
-0.4273068606853485,
-0.6164060831069946,
-0.7903074026107788,
-0.17922130227088928,
-1.6672033071517944,
-0.7684024572372437,
0.19517560303211212,
-0.5572337508201599,
1.079240083694458,
-1.4318393468856812,
0.6803877949714661,... |
func NewI2CAddress(bus i2c.Bus, address uint16) (*Dev, error) {
dev := &Dev{
dev: &i2c.Dev{Bus: bus, Addr: address},
}
err := dev.init()
return dev, err
} | [
-0.41686511039733887,
-1.0322688817977905,
0.49374309182167053,
0.26040807366371155,
-1.0766806602478027,
-0.5177842974662781,
0.6759376525878906,
-0.27092164754867554,
0.40420296788215637,
-0.3625642657279968,
-0.15540391206741333,
1.7432514429092407,
0.05959901958703995,
-0.2674384415149... |
func NewI2C(bus i2c.Bus) (*Dev, error) {
return NewI2CAddress(bus, PCA9685Address)
} | [
-0.00579441012814641,
-1.0229963064193726,
0.39282968640327454,
1.0565298795700073,
-1.4526320695877075,
-0.5679119825363159,
1.4350566864013672,
-0.8847900629043579,
0.24279583990573883,
-0.9822906255722046,
-0.036946482956409454,
0.3859339654445648,
0.05250787362456322,
-0.35480371117591... |
func (d *Dev) SetPwmFreq(freqHz float32) error {
prescaleval := float32(25 * physic.MegaHertz)
prescaleval /= 4096.0 //# 12-bit
prescaleval /= (freqHz * float32(physic.Hertz))
prescaleval -= 1.0
prescale := int(math.Floor(float64(prescaleval + 0.5)))
var oldmode byte
err := d.dev.Tx([]byte{Mode1}, []byte{oldmo... | [
-0.3031599819660187,
0.2352014034986496,
1.0848809480667114,
0.12011411041021347,
-0.6414636373519897,
0.09717172384262085,
0.5686790943145752,
-0.33542847633361816,
-0.23212100565433502,
-0.44931524991989136,
-0.4872066080570221,
-0.1263892501592636,
-0.5355628132820129,
1.250230193138122... |
func (d *Dev) SetAllPwm(on uint16, off uint16) {
d.dev.Write([]byte{AllLedOnL, byte(on) & 0xFF})
d.dev.Write([]byte{AllLedOnH, byte(on >> 8)})
d.dev.Write([]byte{AllLedOffL, byte(off) & 0xFF})
d.dev.Write([]byte{AllLedOffH, byte(off >> 8)})
} | [
0.2944614589214325,
-0.23189058899879456,
0.8729252219200134,
-0.33776190876960754,
-0.11633577197790146,
0.7524957656860352,
-1.100197196006775,
-0.03560705482959747,
0.8544049859046936,
-0.6695310473442078,
-0.44299331307411194,
0.6427316069602966,
-0.26427125930786133,
1.541386008262634... |
func (d *Dev) SetPwm(channel int, on uint16, off uint16) {
d.dev.Write([]byte{Led0OnL + byte(4*channel), byte(on) & 0xFF})
d.dev.Write([]byte{Led0OnH + byte(4*channel), byte(on >> 8)})
d.dev.Write([]byte{Led0OffL + byte(4*channel), byte(off) & 0xFF})
d.dev.Write([]byte{Led0OffH + byte(4*channel), byte(off >> 8)})
} | [
-0.1615089625120163,
0.20822110772132874,
0.9782053232192993,
-1.3635269403457642,
0.5261456370353699,
0.49119627475738525,
-0.3044331967830658,
-0.6171419024467468,
0.6072600483894348,
-0.578914999961853,
-0.5582923293113708,
0.45830485224723816,
-0.6086977124214172,
0.9477216005325317,
... |
func NewMockPhone(ctrl *gomock.Controller) *MockPhone {
mock := &MockPhone{ctrl: ctrl}
mock.recorder = &MockPhoneMockRecorder{mock}
return mock
} | [
-0.09579209983348846,
0.4830191135406494,
0.2672363519668579,
0.6975420117378235,
0.4231565296649933,
0.13429729640483856,
0.09616552293300629,
-0.7320138216018677,
0.8377367258071899,
0.2609902322292328,
-0.6485031843185425,
-0.7427956461906433,
-0.2753213942050934,
1.238448143005371,
0... |
func (m *MockPhone) EXPECT() *MockPhoneMockRecorder {
return m.recorder
} | [
0.04256368428468704,
0.16804619133472443,
0.3369608521461487,
0.4180821180343628,
-0.02016090415418148,
0.5258905291557312,
-0.21796496212482452,
-0.04376445338129997,
0.6137349009513855,
-0.7047221064567566,
0.6644715666770935,
0.17791099846363068,
-0.8952076435089111,
0.602190375328064,
... |
func (m *MockPhone) DingTalk() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DingTalk")
ret0, _ := ret[0].(bool)
return ret0
} | [
-0.6450208425521851,
0.20934195816516876,
0.5526914000511169,
0.31073805689811707,
0.06003880128264427,
0.9203029274940491,
0.03828592970967293,
0.3069469630718231,
-0.7272749543190002,
0.32152217626571655,
-1.2615535259246826,
-1.3576501607894897,
-0.16958089172840118,
0.8892894983291626,... |
func (mr *MockPhoneMockRecorder) DingTalk() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DingTalk", reflect.TypeOf((*MockPhone)(nil).DingTalk))
} | [
-0.3221829831600189,
0.9572200179100037,
0.29803746938705444,
0.3575421869754791,
-0.28392308950424194,
0.9817211031913757,
-0.6843409538269043,
-0.6457938551902771,
0.6528563499450684,
0.5123389363288879,
0.3595007658004761,
0.03937720134854317,
-0.3071584701538086,
1.550187587738037,
-... |
func (m *MockPhone) WeChat() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WeChat")
ret0, _ := ret[0].(bool)
return ret0
} | [
0.017696881666779518,
-0.4471327066421509,
0.2871739864349365,
-0.7020728588104248,
0.40740323066711426,
0.8632490038871765,
0.521258533000946,
-0.19355197250843048,
-0.9448087215423584,
0.13457638025283813,
-0.14154860377311707,
-0.3923634886741638,
-0.352639764547348,
0.64066481590271,
... |
func (mr *MockPhoneMockRecorder) WeChat() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WeChat", reflect.TypeOf((*MockPhone)(nil).WeChat))
} | [
0.41426706314086914,
0.3460982143878937,
0.3198958933353424,
-0.8733591437339783,
0.034561946988105774,
0.6688024997711182,
-0.5314087867736816,
-1.1512067317962646,
0.3253583014011383,
0.686449408531189,
0.7501749396324158,
1.0147712230682373,
-0.41909128427505493,
0.9724658727645874,
-... |
func (m *MockPhone) ZhiHu() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ZhiHu")
ret0, _ := ret[0].(bool)
return ret0
} | [
-0.23266495764255524,
-0.19752533733844757,
0.1964797079563141,
-0.2624557316303253,
0.7069788575172424,
0.5859576463699341,
0.8745225071907043,
0.633489191532135,
-0.6799474358558655,
0.13293065130710602,
-0.8518876433372498,
-0.6700175404548645,
-1.494166374206543,
0.8372946381568909,
... |
func (mr *MockPhoneMockRecorder) ZhiHu() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ZhiHu", reflect.TypeOf((*MockPhone)(nil).ZhiHu))
} | [
0.08884323388338089,
0.679304301738739,
0.2653639614582062,
-0.28043612837791443,
-0.26924586296081543,
0.3489055037498474,
-0.13381938636302948,
-0.43347349762916565,
0.6528105735778809,
0.10146906226873398,
0.300106406211853,
0.8312085866928101,
-1.3280752897262573,
1.3558299541473389,
... |
func doUpdateWorkflow() error {
wf.Configure(aw.TextErrors(true))
log.Print("[update] checking for new version of workflow…")
return wf.CheckForUpdate()
} | [
-0.7842831015586853,
-1.11827552318573,
0.3318348824977875,
0.3911638855934143,
0.07801317423582077,
-0.16161228716373444,
-0.3235631585121155,
-0.5071945190429688,
-0.4682891070842743,
0.7592562437057495,
-0.30609264969825745,
0.087996706366539,
-0.6083253026008606,
0.21433177590370178,
... |
func doUpdateCalendars() error {
var (
acc *Account
err error
)
wf.Configure(aw.TextErrors(true))
log.Print("[update] reloading calendars…")
if len(accounts) == 0 {
log.Print("[update] no Google accounts configured")
}
for _, acc = range accounts {
if err = acc.FetchCalendars(); err != nil {
retur... | [
-0.7358179688453674,
-0.5772790312767029,
0.5989105105400085,
-0.15288107097148895,
-0.1924840360879898,
0.5816104412078857,
0.6820248365402222,
-1.3142197132110596,
0.6607382297515869,
1.02236807346344,
0.1874813735485077,
0.6270328164100647,
0.23162581026554108,
0.14344117045402527,
0.... |
func doUpdateEvents() error {
wf.Configure(aw.TextErrors(true))
var (
name = fmt.Sprintf("events-%s.json", opts.StartTime.Format(timeFormat))
cals []*Calendar
events []*Event
err error
)
log.Printf("[update] fetching events for %s ...", opts.StartTime.Format(timeFormat))
if err := clearOldFiles()... | [
0.2069578617811203,
-0.42951107025146484,
0.9773263931274414,
-0.2511207163333893,
-0.40041622519493103,
0.27789822220802307,
0.27762556076049805,
-0.8022967576980591,
0.05216769501566887,
0.4263501465320587,
0.4087178707122803,
0.42645636200904846,
0.07662879675626755,
0.2763126492500305,... |
func clearOldFiles() error {
var (
cutoff = time.Now().AddDate(0, 0, -14)
dirs = []string{}
)
err := filepath.Walk(wf.CacheDir(), func(path string, fi os.FileInfo, err error) error {
if err != nil {
return err
}
if fi.Name() == "_aw" && fi.IsDir() {
return filepath.SkipDir
}
if fi.IsDir() {
... | [
-0.5012351870536804,
0.536657452583313,
1.1741420030593872,
-0.6009265184402466,
-0.9529838562011719,
0.1880357712507248,
1.3797141313552856,
-0.6771988868713379,
0.6857970356941223,
0.20855769515037537,
0.3412284553050995,
0.15851254761219025,
0.3395395576953888,
0.4630812704563141,
-0.... |
func NewNodeInfoSettingsNetworkBuilder() *NodeInfoSettingsNetworkBuilder {
r := NodeInfoSettingsNetworkBuilder{
&NodeInfoSettingsNetwork{},
}
return &r
} | [
-0.731107234954834,
0.3649230897426605,
-0.28836590051651,
-0.08493831008672714,
-0.20734885334968567,
-0.33657386898994446,
-0.12916052341461182,
-0.8252033591270447,
-0.33797475695610046,
-0.989943265914917,
-0.23740386962890625,
-1.4788569211959839,
-0.0012447114568203688,
0.14330202341... |
func (rb *NodeInfoSettingsNetworkBuilder) Build() NodeInfoSettingsNetwork {
return *rb.v
} | [
-0.7202774286270142,
-0.1931341141462326,
-0.02163567580282688,
0.24307303130626678,
0.4050905406475067,
-0.07962413877248764,
0.3322505056858063,
-1.3862183094024658,
-0.01572190225124359,
-1.0044562816619873,
-0.13388998806476593,
-0.31842660903930664,
-0.5006446242332458,
0.410595655441... |
func (h HTTPHandlerFunc) HandleRequest(c context.Context, fc *fasthttp.RequestCtx) error {
return h(c, fc)
} | [
-0.1635212004184723,
-0.0003235279000364244,
0.36396080255508423,
0.5644317865371704,
0.3905649781227112,
0.48110511898994446,
0.26960933208465576,
0.47499558329582214,
-0.5872690081596375,
-1.1823254823684692,
0.5403141975402832,
-0.29098111391067505,
1.075033187866211,
0.0070390030741691... |
func Handler(handler HTTPHandlerFunc) fasthttp.RequestHandler {
return func(ctx *fasthttp.RequestCtx) {
c, cancel := context.WithCancel(context.Background())
defer cancel()
handler(c, ctx)
}
} | [
1.1639940738677979,
-0.046670589596033096,
0.23455211520195007,
0.9354352951049805,
-0.45852211117744446,
0.7046362161636353,
-0.14411614835262299,
0.6221630573272705,
0.20577768981456757,
-1.278073787689209,
0.3029637932777405,
0.29513418674468994,
0.7203062772750854,
-0.13644853234291077... |
func (h ErrorHandler) HandleRequest(c context.Context, fc *fasthttp.RequestCtx) error {
return errorHandle(HTTPHandlerFunc(h), c, fc)
} | [
-0.2495102733373642,
-0.28191712498664856,
0.370719850063324,
0.4474082887172699,
0.4078249931335449,
0.5381439328193665,
-0.14657175540924072,
0.2566886246204376,
-0.289584755897522,
-1.1346685886383057,
0.8694415092468262,
-0.29024189710617065,
1.074221134185791,
-0.12657010555267334,
... |
func (h LogHandler) HandleRequest(c context.Context, fc *fasthttp.RequestCtx) error {
return logHandle(HTTPHandlerFunc(h), c, fc)
} | [
-0.06502214074134827,
-0.12868356704711914,
0.5125629305839539,
0.17299193143844604,
0.4503396451473236,
0.4987350106239319,
-0.07566103339195251,
0.07253880798816681,
-0.7251033782958984,
-1.1212544441223145,
0.7931658625602722,
-0.12105518579483032,
0.8204366564750671,
-0.238977193832397... |
func Log(handler HTTPHandlerFunc) HTTPHandlerFunc {
return func(c context.Context, fc *fasthttp.RequestCtx) error {
return logHandle(handler, c, fc)
}
} | [
0.355338990688324,
0.6460285782814026,
0.3273111581802368,
0.3937661647796631,
-0.8731409907341003,
0.32285696268081665,
0.5386054515838623,
0.2861149311065674,
0.07341014593839645,
-1.6110005378723145,
-0.39854416251182556,
0.31608617305755615,
1.2494139671325684,
-0.03612815961241722,
... |
func ReadByContentType(ctx *fasthttp.RequestCtx, data interface{}) error {
contentType := ctx.Request.Header.ContentType()
switch {
case bytes.Contains(contentType, []byte(json.ContentType)):
return ReadJSON(ctx, data)
case bytes.Contains(contentType, []byte(proto.ContentType)):
return ReadProtoBuff(ctx, data)
... | [
-0.054499220103025436,
-0.6175935864448547,
0.5817928314208984,
0.4905244708061218,
-0.36806002259254456,
-0.06700460612773895,
-0.16349753737449646,
-1.3245501518249512,
-0.2234189659357071,
0.26041853427886963,
0.7270644307136536,
-0.025969820097088814,
-1.0046310424804688,
0.21368055045... |
func WriteByAccept(ctx *fasthttp.RequestCtx, status int, result interface{}) error {
contentType := ctx.Request.Header.Peek(haki.AcceptHeader)
switch {
case bytes.Contains(contentType, []byte(json.ContentType)):
return JSON(ctx, status, result)
case bytes.Contains(contentType, []byte(proto.ContentType)):
return... | [
-0.43734103441238403,
-0.1129290908575058,
0.7606180906295776,
0.27596187591552734,
-0.3946918845176697,
-0.5867900848388672,
0.45256859064102173,
-0.8277725577354431,
-0.49948808550834656,
0.6487183570861816,
0.03550794720649719,
-0.2850292921066284,
-0.687690794467926,
-0.088178381323814... |
func JSON(ctx *fasthttp.RequestCtx, status int, result interface{}) error {
jsonBytes, err := json.MarshalBytes(result)
if err != nil {
return err
}
ctx.SetBody(jsonBytes)
ctx.SetContentType(json.ContentType)
ctx.SetStatusCode(status)
return nil
} | [
-0.2773301601409912,
-0.4149380624294281,
0.4772774577140808,
-0.20295350253582,
-0.42107364535331726,
-0.2596668004989624,
0.03606555238366127,
-0.49480003118515015,
0.4215180575847626,
-0.32983094453811646,
-0.6673762798309326,
0.8442052602767944,
0.03901210427284241,
0.4893234968185425,... |
func ReadJSON(ctx *fasthttp.RequestCtx, data interface{}) error {
if err := json.UnmarshalBytes(ctx.PostBody(), data); err != nil {
return err
}
return nil
} | [
-0.9941480755805969,
0.26737692952156067,
0.7159063220024109,
-0.20682956278324127,
-0.2138248085975647,
0.2231120467185974,
-0.38992178440093994,
-0.3456704020500183,
-0.2723239064216614,
-0.2343316525220871,
-0.10013219714164734,
0.9112581610679626,
-0.46429333090782166,
0.29899311065673... |
func ProtoBuff(ctx *fasthttp.RequestCtx, status int, result interface{}) error {
protoBytes, err := proto.MarshalBytes(result)
if err != nil {
return err
}
ctx.SetBody(protoBytes)
ctx.SetContentType(proto.ContentType)
ctx.SetStatusCode(status)
return nil
} | [
-0.2038775384426117,
0.6707331538200378,
0.45665138959884644,
0.251670241355896,
0.32894566655158997,
0.9492935538291931,
-0.07375038415193558,
0.06447642296552658,
0.4826465845108032,
-0.9443679451942444,
-0.6581668853759766,
0.1368994414806366,
-0.8887521028518677,
0.3537541925907135,
... |
func ReadProtoBuff(ctx *fasthttp.RequestCtx, data interface{}) error {
if err := proto.UnmarshalBytes(ctx.PostBody(), data); err != nil {
return err
}
return nil
} | [
-0.7145960927009583,
0.5776963829994202,
0.5761700868606567,
0.040450192987918854,
0.06851620227098465,
0.9728261828422546,
-0.35260671377182007,
-0.38903579115867615,
-0.02136090025305748,
-1.1663050651550293,
-0.20599691569805145,
0.32890084385871887,
-1.1679762601852417,
0.1988990902900... |
func Status(ctx *fasthttp.RequestCtx, status int) error {
ctx.SetStatusCode(status)
return nil
} | [
0.16592134535312653,
-0.5558930039405823,
0.24436762928962708,
0.46108537912368774,
-0.145203098654747,
-0.20946551859378815,
-0.11523791402578354,
0.13771210610866547,
0.6548567414283752,
-1.073978304862976,
-0.6817716360092163,
0.25469017028808594,
0.4863465130329132,
0.8302206993103027,... |
func Err(ctx *fasthttp.RequestCtx, err error) error {
//w.WriteHeader(http.StatusInternalServerError)
ctx.Error(err.Error(), fasthttp.StatusInternalServerError)
return err
} | [
-0.748500406742096,
-0.5789588689804077,
0.41596606373786926,
0.8510577082633972,
-0.9179323315620422,
0.532471776008606,
-0.04159124940633774,
0.06782528012990952,
0.3276158273220062,
-1.1616618633270264,
0.7252426147460938,
0.07934200018644333,
0.4745652973651886,
0.6617182493209839,
0... |
func (h BaseHandler) JSON(ctx *fasthttp.RequestCtx, status int, result interface{}) error {
return JSON(ctx, status, result)
} | [
-0.5513696670532227,
-0.8379331231117249,
0.400635302066803,
0.23878833651542664,
-0.7239963412284851,
-0.3343629539012909,
0.35976311564445496,
-0.4666329324245453,
-0.34693968296051025,
-0.7648648619651794,
-0.9129829406738281,
0.06448278576135635,
0.16205281019210815,
0.5478113293647766... |
func (h BaseHandler) Status(ctx *fasthttp.RequestCtx, status int) error {
return Status(ctx, status)
} | [
-0.0593600757420063,
-0.7937061190605164,
0.1322300136089325,
0.16534748673439026,
-0.45547398924827576,
0.12773604691028595,
-0.3177153468132019,
-0.06743387877941132,
0.29037174582481384,
-1.0366653203964233,
-0.7399114370346069,
-0.1878713071346283,
0.19004715979099274,
0.86616313457489... |
func (h BaseHandler) Err(ctx *fasthttp.RequestCtx, err error) error {
return Err(ctx, err)
} | [
0.15467186272144318,
-0.32911211252212524,
0.13632524013519287,
1.251773715019226,
-1.083118200302124,
0.7939512729644775,
-0.6077402830123901,
-0.25693395733833313,
0.057696886360645294,
-1.6509125232696533,
0.4747912287712097,
-0.13629767298698425,
0.4115418791770935,
0.5772848725318909,... |
func HashFunction(buf []byte) uint32 {
var hash uint32 = 5381
for _, b := range buf {
hash = ((hash << 5) + hash) + uint32(b)
}
return hash
} | [
1.117490530014038,
0.3053494691848755,
0.06611840426921844,
0.08040889352560043,
0.05423399806022644,
0.26117920875549316,
0.5707418322563171,
-0.5726357102394104,
-0.00771486759185791,
-0.7129961252212524,
-1.517796516418457,
0.4907335937023163,
-0.6068422794342041,
-0.324432373046875,
... |
func (dqu *DNSBLQueryUpdate) Where(ps ...predicate.DNSBLQuery) *DNSBLQueryUpdate {
dqu.mutation.predicates = append(dqu.mutation.predicates, ps...)
return dqu
} | [
0.13970142602920532,
0.019283270463347435,
0.26862743496894836,
-0.09338510036468506,
-0.48908355832099915,
1.0412871837615967,
-0.6265807747840881,
-0.11997375637292862,
-0.42883604764938354,
-0.8672195076942444,
-0.036729827523231506,
0.8067607283592224,
-0.43127134442329407,
-0.17588122... |
func (dqu *DNSBLQueryUpdate) SetCreatedAt(t time.Time) *DNSBLQueryUpdate {
dqu.mutation.SetCreatedAt(t)
return dqu
} | [
-0.23236492276191711,
-0.0427108108997345,
-0.09512440860271454,
-0.033007025718688965,
0.04783124104142189,
0.9151790142059326,
-0.24632391333580017,
-0.6507713198661804,
-0.09093888849020004,
-0.9912092089653015,
-1.0890803337097168,
-0.6448346376419067,
0.26984521746635437,
0.6433941721... |
func (dqu *DNSBLQueryUpdate) SetNillableCreatedAt(t *time.Time) *DNSBLQueryUpdate {
if t != nil {
dqu.SetCreatedAt(*t)
}
return dqu
} | [
0.38881558179855347,
0.2005353718996048,
0.14145292341709137,
0.08363104611635208,
-0.3376568555831909,
1.1528956890106201,
-0.2609449028968811,
-1.002665638923645,
-0.5635203123092651,
-1.1897022724151611,
-0.9788227081298828,
-0.7302058339118958,
-0.22977760434150696,
0.5135282278060913,... |
func (dqu *DNSBLQueryUpdate) SetUpdatedAt(t time.Time) *DNSBLQueryUpdate {
dqu.mutation.SetUpdatedAt(t)
return dqu
} | [
-0.2793416678905487,
-0.06371760368347168,
0.39856621623039246,
-0.3489803373813629,
-0.10243416577577591,
1.5238242149353027,
-0.29699254035949707,
0.17897765338420868,
0.5463954210281372,
-1.0702600479125977,
-0.5521560907363892,
-0.050338372588157654,
0.470289945602417,
0.40245780348777... |
func (dqu *DNSBLQueryUpdate) AddResponseIDs(ids ...uuid.UUID) *DNSBLQueryUpdate {
dqu.mutation.AddResponseIDs(ids...)
return dqu
} | [
-1.0992002487182617,
-0.4767809808254242,
-0.005958644673228264,
0.18212276697158813,
0.14388501644134521,
0.7500558495521545,
-0.28069156408309937,
-0.4827531576156616,
1.370554804801941,
-0.22345814108848572,
-0.5650903582572937,
-0.6838855147361755,
-0.8420817255973816,
-0.6944517493247... |
func (dqu *DNSBLQueryUpdate) AddResponses(d ...*DNSBLResponse) *DNSBLQueryUpdate {
ids := make([]uuid.UUID, len(d))
for i := range d {
ids[i] = d[i].ID
}
return dqu.AddResponseIDs(ids...)
} | [
-0.6028021574020386,
-0.017195574939250946,
0.42853766679763794,
-0.16148114204406738,
0.9183367490768433,
0.646892249584198,
0.01951644942164421,
-0.8788870573043823,
1.2599236965179443,
-1.1291251182556152,
0.15779829025268555,
-1.1886881589889526,
-0.9263185262680054,
-0.330273211002349... |
func (dqu *DNSBLQueryUpdate) SetIPAddressID(id uuid.UUID) *DNSBLQueryUpdate {
dqu.mutation.SetIPAddressID(id)
return dqu
} | [
-1.5841838121414185,
-0.5256498456001282,
-0.25548261404037476,
-0.356213241815567,
-0.8284909129142761,
0.3559034466743469,
-0.10836777836084366,
0.9281364679336548,
1.4998012781143188,
0.07767295092344284,
-0.8778674006462097,
0.2994673252105713,
0.3368648290634155,
-0.3051987588405609,
... |
func (dqu *DNSBLQueryUpdate) SetIPAddress(i *IP) *DNSBLQueryUpdate {
return dqu.SetIPAddressID(i.ID)
} | [
-1.1451225280761719,
-0.3777996599674225,
0.18667761981487274,
0.5684043765068054,
-0.07783215492963791,
0.21519063413143158,
0.5564780831336975,
0.3149521052837372,
0.7095485329627991,
-0.48173847794532776,
-0.7021095156669617,
-0.22369645535945892,
-0.6091189384460449,
-0.738286375999450... |
func (dqu *DNSBLQueryUpdate) Mutation() *DNSBLQueryMutation {
return dqu.mutation
} | [
-0.3576618731021881,
0.15635541081428528,
0.004216481000185013,
0.23621457815170288,
0.033088915050029755,
1.1061546802520752,
-0.08506201952695847,
-0.3067649304866791,
1.0953412055969238,
-0.5256055593490601,
-0.2660350799560547,
-0.232591450214386,
-0.6508834362030029,
-0.37363830208778... |
func (dqu *DNSBLQueryUpdate) ClearResponses() *DNSBLQueryUpdate {
dqu.mutation.ClearResponses()
return dqu
} | [
0.1985756903886795,
0.1293087750673294,
-0.04707404971122742,
0.14034171402454376,
0.08096980303525925,
0.22093431651592255,
0.057474009692668915,
-1.1626602411270142,
1.5498286485671997,
-0.7331348061561584,
0.13812945783138275,
-0.4355945587158203,
-0.5699681043624878,
-0.777799427509307... |
func (dqu *DNSBLQueryUpdate) RemoveResponseIDs(ids ...uuid.UUID) *DNSBLQueryUpdate {
dqu.mutation.RemoveResponseIDs(ids...)
return dqu
} | [
-0.9965988397598267,
-0.6854467391967773,
-0.13435721397399902,
0.22641028463840485,
-0.5283999443054199,
0.2710314989089966,
0.04392728582024574,
-0.061562445014715195,
1.320446491241455,
0.08344749361276627,
-0.7199987769126892,
-0.7183141112327576,
-1.2885627746582031,
-1.01372230052948... |
func (dqu *DNSBLQueryUpdate) RemoveResponses(d ...*DNSBLResponse) *DNSBLQueryUpdate {
ids := make([]uuid.UUID, len(d))
for i := range d {
ids[i] = d[i].ID
}
return dqu.RemoveResponseIDs(ids...)
} | [
-0.475257933139801,
-0.2689875364303589,
0.4545974135398865,
0.10330196470022202,
0.17443251609802246,
0.12815016508102417,
0.6778526306152344,
-0.6369394659996033,
1.1297426223754883,
-0.6272566914558411,
-0.3886897563934326,
-1.3114793300628662,
-1.336982011795044,
-0.7086820006370544,
... |
func (dqu *DNSBLQueryUpdate) ClearIPAddress() *DNSBLQueryUpdate {
dqu.mutation.ClearIPAddress()
return dqu
} | [
-1.106406569480896,
-0.21523714065551758,
0.001989639364182949,
0.5711351633071899,
-0.6769599914550781,
0.22823739051818848,
0.07592640072107315,
0.017279086634516716,
0.7752685546875,
0.03766576573252678,
-0.3194393813610077,
0.3138309121131897,
-0.14000722765922546,
-1.092055320739746,
... |
func (dqu *DNSBLQueryUpdate) Save(ctx context.Context) (int, error) {
var (
err error
affected int
)
dqu.defaults()
if len(dqu.hooks) == 0 {
if err = dqu.check(); err != nil {
return 0, err
}
affected, err = dqu.sqlSave(ctx)
} else {
var mut Mutator = MutateFunc(func(ctx context.Context, m Muta... | [
-0.7560305595397949,
0.8227967023849487,
0.7671123743057251,
-0.1307438313961029,
0.12263364344835281,
-0.44172120094299316,
0.4815928339958191,
-0.5271178483963013,
-0.6973555684089661,
0.26968926191329956,
-0.7133294939994812,
-0.11468388885259628,
-0.7898802757263184,
-0.066421173512935... |
func (dqu *DNSBLQueryUpdate) SaveX(ctx context.Context) int {
affected, err := dqu.Save(ctx)
if err != nil {
panic(err)
}
return affected
} | [
-0.6833196878433228,
1.6164060831069946,
0.5143226981163025,
0.36179378628730774,
-0.5779798030853271,
1.0509264469146729,
-0.48692092299461365,
0.43563589453697205,
0.839504599571228,
-0.04002237319946289,
-1.4942564964294434,
-0.22926346957683563,
-1.0231698751449585,
-0.2148756682872772... |
func (dqu *DNSBLQueryUpdate) Exec(ctx context.Context) error {
_, err := dqu.Save(ctx)
return err
} | [
-0.1104903295636177,
0.8010764718055725,
0.46364647150039673,
0.3753495216369629,
0.17028506100177765,
1.4044066667556763,
-0.5553089380264282,
-0.0876440480351448,
-0.1250869184732437,
0.1977979689836502,
-0.5697401165962219,
-0.13649378716945648,
-0.6939527988433838,
-0.7640466094017029,... |
func (dqu *DNSBLQueryUpdate) ExecX(ctx context.Context) {
if err := dqu.Exec(ctx); err != nil {
panic(err)
}
} | [
0.4166858196258545,
1.1116787195205688,
0.5056505799293518,
0.41378253698349,
-0.3789762854576111,
1.458338975906372,
-0.8631535172462463,
0.021095434203743935,
0.40933242440223694,
-0.11851594597101212,
-0.32825732231140137,
0.6635996699333191,
-0.21570029854774475,
-0.2822732627391815,
... |
func (dqu *DNSBLQueryUpdate) defaults() {
if _, ok := dqu.mutation.UpdatedAt(); !ok {
v := dnsblquery.UpdateDefaultUpdatedAt()
dqu.mutation.SetUpdatedAt(v)
}
} | [
-0.5255278944969177,
0.6517826318740845,
0.19445161521434784,
0.2214781641960144,
0.5082197785377502,
0.3558378517627716,
-0.9347854852676392,
-0.42711254954338074,
0.20926858484745026,
-0.7440469861030579,
-0.35163944959640503,
-0.06034534424543381,
-0.15465684235095978,
-0.23627445101737... |
func (dqu *DNSBLQueryUpdate) check() error {
if _, ok := dqu.mutation.IPAddressID(); dqu.mutation.IPAddressCleared() && !ok {
return errors.New("ent: clearing a required unique edge \"ip_address\"")
}
return nil
} | [
-0.05172739550471306,
1.1854407787322998,
0.1399187296628952,
-0.14573408663272858,
0.4489732086658478,
0.7433000802993774,
-0.23839439451694489,
0.30180150270462036,
-0.017319288104772568,
0.6869413256645203,
0.9506524205207825,
0.31433531641960144,
-0.3950916826725006,
0.4577966630458832... |
func (dquo *DNSBLQueryUpdateOne) SetCreatedAt(t time.Time) *DNSBLQueryUpdateOne {
dquo.mutation.SetCreatedAt(t)
return dquo
} | [
-0.39373818039894104,
-0.050402481108903885,
-0.06144222617149353,
0.14999057352542877,
-0.056917618960142136,
0.9520077109336853,
-0.13276398181915283,
-0.5700631141662598,
-0.12797865271568298,
-0.8945538997650146,
-1.1787196397781372,
-0.677272617816925,
0.3203839361667633,
0.5570120811... |
func (dquo *DNSBLQueryUpdateOne) SetNillableCreatedAt(t *time.Time) *DNSBLQueryUpdateOne {
if t != nil {
dquo.SetCreatedAt(*t)
}
return dquo
} | [
0.2621752917766571,
0.1730232834815979,
0.2147897183895111,
0.25013837218284607,
-0.4852764904499054,
1.1671652793884277,
-0.21299301087856293,
-0.9404769539833069,
-0.5162915587425232,
-1.1375352144241333,
-1.0148906707763672,
-0.7082290649414062,
-0.08995720744132996,
0.35782942175865173... |
func (dquo *DNSBLQueryUpdateOne) SetUpdatedAt(t time.Time) *DNSBLQueryUpdateOne {
dquo.mutation.SetUpdatedAt(t)
return dquo
} | [
-0.2835434377193451,
-0.04960934445261955,
0.4511348605155945,
-0.18680019676685333,
-0.14283102750778198,
1.552261233329773,
-0.18733645975589752,
0.33476677536964417,
0.5115761756896973,
-0.9718672633171082,
-0.6727311611175537,
-0.06904451549053192,
0.48434311151504517,
0.27599433064460... |
func (dquo *DNSBLQueryUpdateOne) AddResponseIDs(ids ...uuid.UUID) *DNSBLQueryUpdateOne {
dquo.mutation.AddResponseIDs(ids...)
return dquo
} | [
-1.1464539766311646,
-0.5360643267631531,
0.1140093132853508,
0.34588226675987244,
0.1252896636724472,
0.7303112149238586,
-0.1987379640340805,
-0.4641893804073334,
1.353885531425476,
-0.10770493000745773,
-0.5674842000007629,
-0.705389142036438,
-0.760037899017334,
-0.7744380235671997,
... |
func (dquo *DNSBLQueryUpdateOne) AddResponses(d ...*DNSBLResponse) *DNSBLQueryUpdateOne {
ids := make([]uuid.UUID, len(d))
for i := range d {
ids[i] = d[i].ID
}
return dquo.AddResponseIDs(ids...)
} | [
-0.6406869888305664,
0.0785968080163002,
0.5147500038146973,
-0.02711034007370472,
0.9607901573181152,
0.5524506568908691,
0.18999290466308594,
-0.8932170271873474,
1.3172264099121094,
-1.0884147882461548,
0.09562331438064575,
-1.2631622552871704,
-0.9310850501060486,
-0.2984587550163269,
... |
func (dquo *DNSBLQueryUpdateOne) SetIPAddressID(id uuid.UUID) *DNSBLQueryUpdateOne {
dquo.mutation.SetIPAddressID(id)
return dquo
} | [
-1.7621527910232544,
-0.5587652325630188,
-0.19939376413822174,
-0.24783964455127716,
-0.8594141006469727,
0.2903285026550293,
0.002120660152286291,
0.9336790442466736,
1.553261160850525,
0.1602025181055069,
-0.8806859254837036,
0.256509393453598,
0.3515513241291046,
-0.3190504014492035,
... |
func (dquo *DNSBLQueryUpdateOne) SetIPAddress(i *IP) *DNSBLQueryUpdateOne {
return dquo.SetIPAddressID(i.ID)
} | [
-1.178267002105713,
-0.23481442034244537,
0.2901900112628937,
0.7408140897750854,
-0.014364633709192276,
0.17650529742240906,
0.7092658877372742,
0.29747575521469116,
0.7238525748252869,
-0.5939328074455261,
-0.7502741813659668,
-0.3118230104446411,
-0.5382978320121765,
-0.800323486328125,... |
func (dquo *DNSBLQueryUpdateOne) Mutation() *DNSBLQueryMutation {
return dquo.mutation
} | [
-0.5166274905204773,
0.46141424775123596,
0.06733342260122299,
0.5146956443786621,
0.24383661150932312,
1.06034255027771,
0.21018864214420319,
-0.2713175117969513,
1.1930615901947021,
-0.6126843094825745,
-0.38341808319091797,
-0.29510214924812317,
-0.6357181668281555,
-0.3473150134086609,... |
func (dquo *DNSBLQueryUpdateOne) ClearResponses() *DNSBLQueryUpdateOne {
dquo.mutation.ClearResponses()
return dquo
} | [
0.12127836793661118,
0.08689916878938675,
-0.006022648885846138,
0.2979758381843567,
0.06611733138561249,
0.21544216573238373,
0.07864313572645187,
-1.1357603073120117,
1.497770071029663,
-0.622153103351593,
0.11822246760129929,
-0.46690791845321655,
-0.6308435201644897,
-0.766657471656799... |
func (dquo *DNSBLQueryUpdateOne) RemoveResponseIDs(ids ...uuid.UUID) *DNSBLQueryUpdateOne {
dquo.mutation.RemoveResponseIDs(ids...)
return dquo
} | [
-1.0542153120040894,
-0.7367716431617737,
-0.021499481052160263,
0.3939504623413086,
-0.5197809934616089,
0.22513212263584137,
0.1256847232580185,
0.008036244660615921,
1.2685564756393433,
0.2221646010875702,
-0.7519416809082031,
-0.7518139481544495,
-1.1732531785964966,
-1.085791349411010... |
func (dquo *DNSBLQueryUpdateOne) RemoveResponses(d ...*DNSBLResponse) *DNSBLQueryUpdateOne {
ids := make([]uuid.UUID, len(d))
for i := range d {
ids[i] = d[i].ID
}
return dquo.RemoveResponseIDs(ids...)
} | [
-0.5051307082176208,
-0.2018308937549591,
0.5550134778022766,
0.22639153897762299,
0.2357277274131775,
-0.0105025889351964,
0.8060756921768188,
-0.6126359105110168,
1.1756352186203003,
-0.5986313819885254,
-0.4400414228439331,
-1.3725860118865967,
-1.3546879291534424,
-0.6965664029121399,
... |
func (dquo *DNSBLQueryUpdateOne) ClearIPAddress() *DNSBLQueryUpdateOne {
dquo.mutation.ClearIPAddress()
return dquo
} | [
-1.3026576042175293,
-0.25388216972351074,
0.0055557191371917725,
0.7845516204833984,
-0.6897290945053101,
0.24415330588817596,
0.16084842383861542,
-0.023564880713820457,
0.7392791509628296,
0.059051141142845154,
-0.3315827548503876,
0.24003109335899353,
-0.17012950778007507,
-1.142617940... |
func (dquo *DNSBLQueryUpdateOne) Save(ctx context.Context) (*DNSBLQuery, error) {
var (
err error
node *DNSBLQuery
)
dquo.defaults()
if len(dquo.hooks) == 0 {
if err = dquo.check(); err != nil {
return nil, err
}
node, err = dquo.sqlSave(ctx)
} else {
var mut Mutator = MutateFunc(func(ctx context.C... | [
-0.53131502866745,
0.6218070983886719,
0.6008273363113403,
-0.10132168978452682,
0.2928865849971771,
-0.055586498230695724,
0.07081086933612823,
-0.7223482131958008,
-0.5715238451957703,
0.5298170447349548,
-0.34515097737312317,
0.08809559047222137,
-0.5027724504470825,
-0.1203360483050346... |
func (dquo *DNSBLQueryUpdateOne) SaveX(ctx context.Context) *DNSBLQuery {
node, err := dquo.Save(ctx)
if err != nil {
panic(err)
}
return node
} | [
-0.5452337861061096,
1.5689278841018677,
0.39263802766799927,
0.5308862328529358,
-0.5145915746688843,
1.1772561073303223,
-0.7359576225280762,
0.05387962982058525,
1.066024661064148,
-0.02454661950469017,
-1.1813032627105713,
0.139112651348114,
-0.8920350074768066,
-0.30624425411224365,
... |
func (dquo *DNSBLQueryUpdateOne) Exec(ctx context.Context) error {
_, err := dquo.Save(ctx)
return err
} | [
-0.18551334738731384,
0.9369281530380249,
0.538907527923584,
0.7161319851875305,
0.3654196560382843,
1.3124303817749023,
-0.22468042373657227,
-0.05506991595029831,
0.0956231951713562,
0.1232496127486229,
-0.7793871760368347,
-0.26508864760398865,
-0.7414295077323914,
-0.603015661239624,
... |
func (dquo *DNSBLQueryUpdateOne) ExecX(ctx context.Context) {
if err := dquo.Exec(ctx); err != nil {
panic(err)
}
} | [
0.24514509737491608,
1.2802084684371948,
0.6277009844779968,
0.8303634524345398,
-0.21828170120716095,
1.41380774974823,
-0.6405345797538757,
0.06088898330926895,
0.5257009863853455,
-0.11368045210838318,
-0.5211467742919922,
0.5844192504882812,
-0.21356649696826935,
-0.2592954635620117,
... |
func (dquo *DNSBLQueryUpdateOne) defaults() {
if _, ok := dquo.mutation.UpdatedAt(); !ok {
v := dnsblquery.UpdateDefaultUpdatedAt()
dquo.mutation.SetUpdatedAt(v)
}
} | [
-0.6318539381027222,
0.797356903553009,
0.21391849219799042,
0.3741471767425537,
0.5674377083778381,
0.429013729095459,
-0.7433524131774902,
-0.3520863950252533,
0.25958341360092163,
-0.6661460399627686,
-0.5736121535301208,
-0.0788252055644989,
-0.18292048573493958,
-0.20069240033626556,
... |
func (dquo *DNSBLQueryUpdateOne) check() error {
if _, ok := dquo.mutation.IPAddressID(); dquo.mutation.IPAddressCleared() && !ok {
return errors.New("ent: clearing a required unique edge \"ip_address\"")
}
return nil
} | [
-0.23808401823043823,
1.367649793624878,
0.19194069504737854,
0.047670621424913406,
0.5278330445289612,
0.7755886316299438,
-0.10687324404716492,
0.38350710272789,
0.08885306864976883,
0.7855149507522583,
0.876198947429657,
0.24657559394836426,
-0.42040225863456726,
0.4936909079551697,
-... |
func Check(d *certdata.Data) *errors.Errors {
var e = errors.New(nil)
if d.Issuer != nil && !bytes.Equal(d.Cert.RawIssuer, d.Issuer.RawSubject) {
e.Err("Certificate Issuer Distinguished Name field MUST match the Subject DN of the Issuing CA")
return e
}
return e
} | [
0.3579488694667816,
0.5139342546463013,
0.44375917315483093,
-0.08864283561706543,
-0.6967140436172485,
0.756987452507019,
0.3100143074989319,
0.008840025402605534,
0.3549177050590515,
-0.5104024410247803,
0.7040219306945801,
-0.07777848094701767,
0.40063145756721497,
0.20094822347164154,
... |
func (db *RockDB) zIncrSize(ts int64, key []byte, oldh *headerMetaValue, delta int64, wb engine.WriteBatch) (int64, error) {
meta := oldh.UserData
size, err := parseZMetaSize(meta)
if err != nil {
return 0, err
}
size += delta
sk := zEncodeSizeKey(key)
if size <= 0 {
size = 0
wb.Delete(sk)
} else {
wb.P... | [
-0.2983068823814392,
0.3193036913871765,
0.6214359998703003,
-0.14486806094646454,
-0.9359017610549927,
-0.7413720488548279,
-0.08040784299373627,
0.33957362174987793,
-0.41708284616470337,
0.465405136346817,
-0.30482980608940125,
0.5214440822601318,
-1.1676034927368164,
0.5336683392524719... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.