text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (w Wrapper) OnRestoreDeletedMessages(f RestoreDeletedMessagesHandler) {
w.longpoll.EventNew(14, func(i []interface{}) error {
var event RestoreDeletedMessages
if err := event.parse(i); err != nil {
return err
}
f(event)
return nil
})
} | [
1.1201317310333252,
-0.47210246324539185,
0.36512887477874756,
-0.7098078727722168,
-0.24570362269878387,
-0.132280170917511,
-0.4191662073135376,
-0.18954449892044067,
1.0247838497161865,
-0.8777981996536255,
-0.6426759958267212,
0.2554154396057129,
-0.5896584987640381,
-0.579585909843444... |
func (w Wrapper) OnChatInfoChange(f ChatInfoChangeHandler) {
w.longpoll.EventNew(52, func(i []interface{}) error {
var event ChatInfoChange
if err := event.parse(i); err != nil {
return err
}
f(event)
return nil
})
} | [
-0.046241749078035355,
-0.7437798976898193,
0.4230964183807373,
-0.27098098397254944,
-0.726658046245575,
0.9089726805686951,
-0.4674862325191498,
-0.43431973457336426,
-0.8029250502586365,
0.5188287496566772,
-0.7231585383415222,
-0.19345606863498688,
0.8031978011131287,
1.047879338264465... |
func (w Wrapper) OnUserTyping(f UserTypingHandler) {
w.longpoll.EventNew(61, func(i []interface{}) error {
var event UserTyping
if err := event.parse(i); err != nil {
return err
}
f(event)
return nil
})
} | [
0.04533237963914871,
0.032856475561857224,
0.6702036261558533,
0.3224727511405945,
-1.0264480113983154,
0.30780670046806335,
0.9097628593444824,
0.36927783489227295,
0.39470067620277405,
0.9298585057258606,
-1.3850369453430176,
-0.49111729860305786,
0.8495271801948547,
-0.00673019001260399... |
func (w Wrapper) OnUserTypingChat(f UserTypingChatHandler) {
w.longpoll.EventNew(62, func(i []interface{}) error {
var event UserTypingChat
if err := event.parse(i); err != nil {
return err
}
f(event)
return nil
})
} | [
0.2554367482662201,
-0.4293909966945648,
0.6130081415176392,
-0.08682569116353989,
-1.1450926065444946,
0.612574577331543,
0.8681567907333374,
0.11873563379049301,
-0.2420419454574585,
0.6238715648651123,
-0.8704983592033386,
-0.5693457722663879,
0.9337257146835327,
0.10855128616094589,
... |
func (w Wrapper) OnUsersTyping(f UsersTypingHandler) {
w.longpoll.EventNew(63, func(i []interface{}) error {
var event UsersTyping
if err := event.parse(i); err != nil {
return err
}
f(event)
return nil
})
} | [
-0.09751689434051514,
0.10991525650024414,
0.5718411207199097,
0.21420696377754211,
-1.1032943725585938,
0.5569747090339661,
0.4314422309398651,
0.02652471512556076,
0.045013487339019775,
1.171339750289917,
-0.8197912573814392,
-0.43170154094696045,
0.9706152081489563,
0.18197084963321686,... |
func (w Wrapper) OnUsersRecordingAudioMessage(f UsersRecordingAudioMessageHandler) {
w.longpoll.EventNew(64, func(i []interface{}) error {
var event UsersRecordingAudioMessage
if err := event.parse(i); err != nil {
return err
}
f(event)
return nil
})
} | [
-0.1359158456325531,
0.5453815460205078,
0.5287001729011536,
0.05397890508174896,
0.14956970512866974,
0.34633389115333557,
-0.14284303784370422,
-0.1038597822189331,
0.040232378989458084,
0.8634389042854309,
-0.13908234238624573,
0.21315471827983856,
0.31833183765411377,
0.187723249197006... |
func (w Wrapper) OnUserCall(f UserCallHandler) {
w.longpoll.EventNew(70, func(i []interface{}) error {
var event UserCall
if err := event.parse(i); err != nil {
return err
}
f(event)
return nil
})
} | [
0.08461733907461166,
0.26873329281806946,
0.8048661351203918,
0.22744719684123993,
-1.023841381072998,
1.1428102254867554,
0.07923319935798645,
0.01161955762654543,
0.4606989920139313,
0.45863521099090576,
-0.7421402931213379,
-0.37875795364379883,
0.9704605340957642,
0.17095816135406494,
... |
func (w Wrapper) OnCounterChange(f CounterChangeHandler) {
w.longpoll.EventNew(80, func(i []interface{}) error {
var event CounterChange
if err := event.parse(i); err != nil {
return err
}
f(event)
return nil
})
} | [
0.21168136596679688,
-0.037371065467596054,
0.6919991970062256,
0.15373702347278595,
-0.26120835542678833,
1.316322684288025,
0.2619587182998657,
0.2596549689769745,
-0.7950782179832458,
0.3003042936325073,
-0.29041382670402527,
-0.329856276512146,
0.7129754424095154,
2.0760152339935303,
... |
func (w Wrapper) OnNotificationSettingsChange(f NotificationSettingsChangeHandler) {
w.longpoll.EventNew(114, func(i []interface{}) error {
var event NotificationSettingsChange
if w.longpoll.Mode&longpoll.ExtendedEvents != 0 {
if err := event.parseMode8(i); err != nil {
return err
}
} else {
if err ... | [
0.04790988564491272,
0.8041372895240784,
0.3433705270290375,
0.33014586567878723,
-0.5524943470954895,
0.6854123473167419,
0.06626886129379272,
-1.1146894693374634,
-0.7142235636711121,
1.2217211723327637,
-0.46664974093437195,
-0.26984474062919617,
0.4255470931529999,
1.0385007858276367,
... |
func (tree *BinaryTree) Add(value int) {
if tree.root == nil {
tree.root = &(node{Value: value})
} else {
tree.root.add(value)
}
} | [
-0.7909640669822693,
0.3276509940624237,
0.5631533265113831,
-0.2321099191904068,
-0.37279587984085083,
0.6562419533729553,
-0.22085317969322205,
-0.1131378635764122,
0.6538470387458801,
-0.18007725477218628,
-0.1506013572216034,
0.9035625457763672,
-0.5777105689048767,
1.9293172359466553,... |
func (m *manager) migrateStorageAccounts(ctx context.Context) error {
resourceGroup := stringutils.LastTokenByte(m.doc.OpenShiftCluster.Properties.ClusterProfile.ResourceGroupID, '/')
if len(m.doc.OpenShiftCluster.Properties.WorkerProfiles) == 0 {
m.log.Error("skipping migrateStorageAccounts due to missing WorkerPr... | [
-0.41297435760498047,
-0.6151318550109863,
0.5604203343391418,
0.15828022360801697,
0.6301273107528687,
-0.41585657000541687,
1.2487707138061523,
-0.4417792558670044,
0.3160870373249054,
0.7588070034980774,
0.20888212323188782,
0.35705918073654175,
-0.24372462928295135,
-0.0683702155947685... |
func (c *ServiceConfig) GetConnectTimeout() time.Duration {
if c != nil && c.ConnectTimeout != 0 {
return c.ConnectTimeout
}
return DefaultConnectTimeout
} | [
0.8011180758476257,
0.25057607889175415,
0.48612043261528015,
0.36584770679473877,
0.6387686133384705,
-0.08777579665184021,
0.13080723583698273,
0.5765171051025391,
-0.5580211877822876,
1.1744714975357056,
0.5746880173683167,
-0.557945728302002,
-0.869432270526886,
0.7951266765594482,
0... |
func (c *ServiceConfig) GetRetries() int {
if c != nil && c.Retries != 0 {
return c.Retries
}
return DefaultRetries
} | [
0.6069457530975342,
1.1644554138183594,
0.3689081072807312,
0.30876490473747253,
1.390279769897461,
-0.38260984420776367,
0.061632703989744186,
0.5670250654220581,
0.165796160697937,
-0.5628945231437683,
-0.6053272485733032,
-0.21959808468818665,
-1.2645158767700195,
0.7067509889602661,
... |
func (c *ServiceConfig) GetFailCost() int {
if c != nil && c.FailCost != 0 {
return c.FailCost
}
return DefaultFailCost
} | [
0.46074050664901733,
0.6693392992019653,
0.3664774000644684,
0.13064520061016083,
0.15499189496040344,
-0.39334240555763245,
-0.5212650299072266,
-0.11766213923692703,
0.02202661894261837,
0.08783134073019028,
-0.3335762023925781,
-0.001411464181728661,
-1.0309706926345825,
1.6949001550674... |
func (c *ServiceConfig) GetSoftFailCost() int {
if c != nil && c.SoftFailCost != 0 {
return c.SoftFailCost
}
return DefaultSoftFailCost
} | [
0.5058762431144714,
0.6297270059585571,
0.4844984710216522,
0.6166434288024902,
-0.4973199665546417,
-0.1538056880235672,
-0.24185135960578918,
0.210004985332489,
0.21745936572551727,
-0.06377477943897247,
-0.6417302489280701,
0.15340574085712433,
-0.3529222011566162,
1.894052267074585,
... |
func (c *ServiceConfig) GetNetNetwork() string {
if c != nil && c.NetNetwork != "" {
return c.NetNetwork
}
return "tcp"
} | [
-0.38425347208976746,
0.8531941771507263,
0.4660077691078186,
0.5728288888931274,
0.8515069484710693,
-0.13210788369178772,
-0.07670050114393234,
-0.284371018409729,
-0.20743471384048462,
0.23033246397972107,
-0.027439558878540993,
-0.27545225620269775,
-0.22321215271949768,
1.099165558815... |
func (c *ServiceConfig) GetUnixNetwork() string {
if c != nil && c.UnixNetwork != "" {
return c.UnixNetwork
}
return "unix"
} | [
-0.022021876648068428,
0.535589337348938,
0.510410487651825,
0.6086137890815735,
0.4441389739513397,
-0.08151300251483917,
-0.7473898530006409,
0.8532527685165405,
0.13905756175518036,
-0.7790924310684204,
-0.4234676957130432,
-0.03697580471634865,
-0.20835478603839874,
0.3620106875896454,... |
func BconfConfig(conf bconf.Bconf) *ServiceConfig {
srv := &ServiceConfig{}
srv.Service = conf.Get("service").String("")
if conf.Get("connect_timeout").Valid() {
srv.ConnectTimeout = time.Duration(conf.Get("connect_timeout").Int(0)) * time.Millisecond
}
srv.Retries = conf.Get("retries").Int(DefaultRetries)
sw... | [
0.19727282226085663,
0.05894151329994202,
0.6127143502235413,
-0.40266063809394836,
-0.6183706521987915,
-0.352075457572937,
0.08215365558862686,
0.5764843225479126,
-0.992672860622406,
0.5208036303520203,
-0.8168120980262756,
0.37112438678741455,
-0.4387672245502472,
0.7444568276405334,
... |
func fileFilterSingleton() *FileFilter {
return fileFilter
} | [
0.24145910143852234,
-1.1399891376495361,
0.1824343055486679,
-0.07717432826757431,
-0.33350229263305664,
-0.6909124255180359,
-0.045881208032369614,
0.10443074256181717,
-0.3441450595855713,
-0.8404518961906433,
-0.5397197604179382,
0.873748779296875,
-0.10310494154691696,
0.7884393334388... |
func (filter *FileFilter) filter(entries []*Entry) []*Entry {
return entries // NOP
} | [
0.09342243522405624,
-0.47151777148246765,
0.29408010840415955,
0.2166726291179657,
0.050005439668893814,
0.5317609310150146,
-0.0020773739088326693,
0.33457866311073303,
-0.4100634455680847,
-0.2656552791595459,
0.14417745172977448,
0.6822531819343567,
-0.3748975396156311,
0.9172691702842... |
func CombineDelay(delays ...DelayTypeFunc) DelayTypeFunc {
const maxInt64 = uint64(math.MaxInt64)
return func(n uint, err error, config *Config) time.Duration {
var total uint64
for _, delay := range delays {
total += uint64(delay(n, err, config))
if total > maxInt64 {
total = maxInt64
}
}
retu... | [
0.1912045031785965,
0.6864572167396545,
0.595725953578949,
0.9062911868095398,
0.17246770858764648,
0.18981684744358063,
0.09133325517177582,
-0.41924482583999634,
0.30671751499176025,
-0.6598063111305237,
-0.15922380983829498,
-0.21914802491664886,
0.9662387371063232,
0.19660715758800507,... |
func BackOffDelay(n uint, _ error, config *Config) time.Duration {
// 1 << 63 would overflow signed int64 (time.Duration), thus 62.
const max uint = 62
if config.maxBackOffN == 0 {
if config.delay <= 0 {
config.delay = 1
}
config.maxBackOffN = max - uint(math.Floor(math.Log2(float64(config.delay))))
}
... | [
-0.17694520950317383,
0.7316444516181946,
0.6406038403511047,
0.38608333468437195,
-0.6731512546539307,
0.08933603763580322,
0.16998983919620514,
0.23523539304733276,
0.5357159972190857,
-0.3319225609302521,
-0.11399564146995544,
-0.13960321247577667,
0.32701534032821655,
0.068744033575057... |
func RandomDelay(_ uint, _ error, config *Config) time.Duration {
return time.Duration(rand.Int63n(int64(config.maxJitter)))
} | [
-0.2400151640176773,
0.24608416855335236,
0.3082837164402008,
-0.13944044709205627,
-1.0515462160110474,
0.8085471987724304,
-0.07946798205375671,
-0.09457781910896301,
0.9513125419616699,
0.16739144921302795,
-0.69563889503479,
-0.05569767579436302,
0.5863529443740845,
0.5742349028587341,... |
func InputDialog(opt ...interface{}) string {
b, _ := gtk.BuilderNewFromFile("glade/input-dialog.glade")
d := GetDialog(b, "input_dialog")
entry := GetEntry(b, "input_entry")
for i, v := range(opt) {
if i % 2 == 0 {
key := v.(string)
switch key {
case "title"... | [
-0.03139158710837364,
-0.26552098989486694,
0.7348549962043762,
0.022406361997127533,
-0.38407808542251587,
0.4397576153278351,
0.17988915741443634,
-0.13304628431797028,
-0.11833006888628006,
0.8085026741027832,
-0.31758973002433777,
0.20266543328762054,
-0.1590382307767868,
-0.5397298932... |
func (p Profile) Selfie() *attribute.ImageAttribute {
return p.GetImageAttribute(AttrConstSelfie)
} | [
-0.27349916100502014,
-0.6728453040122986,
0.4976080060005188,
0.013826710171997547,
-0.37817317247390747,
-0.3625187575817108,
1.0246776342391968,
-0.044931333512067795,
-0.20865866541862488,
0.21143096685409546,
0.2708609700202942,
-0.40139004588127136,
-0.3233529031276703,
-0.5324038863... |
func (p Profile) GivenNames() *attribute.StringAttribute {
return p.GetStringAttribute(AttrConstGivenNames)
} | [
0.08631758391857147,
0.05283689126372337,
0.3942452371120453,
-1.3066176176071167,
-0.4838140308856964,
0.19598369300365448,
0.09146762639284134,
-0.5584224462509155,
0.17643597722053528,
-1.0507488250732422,
-0.40441733598709106,
-0.2969886064529419,
-0.19626542925834656,
0.17637407779693... |
func (p Profile) FamilyName() *attribute.StringAttribute {
return p.GetStringAttribute(AttrConstFamilyName)
} | [
0.010188142769038677,
-0.33427467942237854,
0.4077008366584778,
0.58824223279953,
-0.5708312392234802,
0.12806017696857452,
0.3847285211086273,
0.2507067620754242,
-0.2870867848396301,
-0.28366410732269287,
0.6701027750968933,
-0.1391788274049759,
0.27755823731422424,
-0.28436335921287537,... |
func (p Profile) FullName() *attribute.StringAttribute {
return p.GetStringAttribute(AttrConstFullName)
} | [
0.9800045490264893,
-0.5839089155197144,
0.5532510280609131,
0.10117056965827942,
-0.7402393817901611,
0.1404315084218979,
0.4138820767402649,
0.49085769057273865,
0.16864271461963654,
0.0379537008702755,
-0.12771902978420258,
-0.30439046025276184,
0.1952553689479828,
-1.0066019296646118,
... |
func (p Profile) MobileNumber() *attribute.StringAttribute {
return p.GetStringAttribute(AttrConstMobileNumber)
} | [
0.03525884449481964,
-0.853437602519989,
0.19606532156467438,
0.45527520775794983,
-0.3758438527584076,
0.00947105884552002,
0.799902081489563,
1.379171371459961,
0.6900157928466797,
-0.811192512512207,
0.25854378938674927,
-0.052784454077482224,
0.1441446989774704,
-0.0076752640306949615,... |
func (p Profile) EmailAddress() *attribute.StringAttribute {
return p.GetStringAttribute(AttrConstEmailAddress)
} | [
0.3967052400112152,
-0.5474863648414612,
0.4405179023742676,
-0.4783218502998352,
0.010661647655069828,
0.5373990535736084,
0.8500480651855469,
1.1264865398406982,
0.626284658908844,
0.4426168203353882,
-0.15862753987312317,
0.8397523164749146,
-0.5162312984466553,
-1.1908987760543823,
-... |
func (p Profile) DateOfBirth() (*attribute.TimeAttribute, error) {
for _, a := range p.attributeSlice {
if a.Name == AttrConstDateOfBirth {
return attribute.NewTime(a)
}
}
return nil, nil
} | [
0.49983900785446167,
-0.16967235505580902,
0.295708030462265,
0.732161819934845,
-0.08917399495840073,
0.14060872793197632,
0.4514806568622589,
-0.9036031365394592,
0.32014885544776917,
0.6574528217315674,
-0.27397987246513367,
-0.5451629757881165,
-0.46020957827568054,
0.31491151452064514... |
func (p Profile) Address() *attribute.StringAttribute {
return p.GetStringAttribute(AttrConstAddress)
} | [
0.31531786918640137,
-1.1511298418045044,
0.45415249466896057,
-0.1314409077167511,
-0.3325272798538208,
0.7279896140098572,
0.7509979009628296,
0.7514525055885315,
1.3405016660690308,
-0.014243251644074917,
0.9034477472305298,
0.399436354637146,
-0.416983962059021,
-0.6626871824264526,
... |
func (p Profile) Gender() *attribute.StringAttribute {
return p.GetStringAttribute(AttrConstGender)
} | [
0.03092029318213463,
0.09961986541748047,
0.4313797652721405,
0.6241613626480103,
0.39012250304222107,
1.4056440591812134,
0.37425434589385986,
0.3747656047344208,
-0.6859857439994812,
-0.7690856456756592,
-0.2053285390138626,
0.32005593180656433,
0.14347624778747559,
0.2315884679555893,
... |
func (p Profile) Nationality() *attribute.StringAttribute {
return p.GetStringAttribute(AttrConstNationality)
} | [
0.3199712336063385,
-0.7836170792579651,
0.42099639773368835,
0.7989503145217896,
0.43183791637420654,
0.28264671564102173,
0.8607467412948608,
0.4202495813369751,
-0.08121466636657715,
0.0856623649597168,
0.2704713046550751,
0.02231123298406601,
-0.051816198974847794,
-0.744301974773407,
... |
func (p Profile) DocumentImages() (*attribute.ImageSliceAttribute, error) {
for _, a := range p.attributeSlice {
if a.Name == AttrConstDocumentImages {
return attribute.NewImageSlice(a)
}
}
return nil, nil
} | [
-0.5870118737220764,
-0.020609213039278984,
0.21999086439609528,
0.5165193676948547,
-0.3333963453769684,
-0.15540504455566406,
0.3910857141017914,
-0.15248322486877441,
-0.3235756456851959,
0.7127503156661987,
0.5876718163490295,
-0.22729431092739105,
-0.7455052137374878,
0.70286113023757... |
func (p Profile) DocumentDetails() (*attribute.DocumentDetailsAttribute, error) {
for _, a := range p.attributeSlice {
if a.Name == AttrConstDocumentDetails {
return attribute.NewDocumentDetails(a)
}
}
return nil, nil
} | [
0.522316575050354,
0.054748427122831345,
0.27267754077911377,
0.13909021019935608,
-0.43307578563690186,
0.3197031319141388,
0.10474973171949387,
-0.7574232816696167,
0.052582431584596634,
0.35201209783554077,
0.48140406608581543,
0.08397801965475082,
-0.6993879079818726,
0.239692538976669... |
func (p Profile) AgeVerifications() (out []AgeVerification, err error) {
ageUnderString := strings.Replace(AttrConstAgeUnder, "%d", "", -1)
ageOverString := strings.Replace(AttrConstAgeOver, "%d", "", -1)
for _, a := range p.attributeSlice {
if strings.HasPrefix(a.Name, ageUnderString) ||
strings.HasPrefix(a.N... | [
-0.7233768701553345,
-0.14809606969356537,
0.4064613878726959,
0.28394758701324463,
-0.48877888917922974,
0.657654881477356,
0.1689959317445755,
-0.5729868412017822,
-0.5014786720275879,
0.4337567687034607,
-0.35380226373672485,
0.08175510913133621,
-0.12053927034139633,
1.4167948961257935... |
func newAwsSesReceiptRuleSets(c *TrussleV1Client, namespace string) *awsSesReceiptRuleSets {
return &awsSesReceiptRuleSets{
client: c.RESTClient(),
ns: namespace,
}
} | [
0.404512882232666,
0.3697887361049652,
0.17108578979969025,
-1.2936351299285889,
-1.2612757682800293,
-0.08712282031774521,
0.2859668433666229,
-0.23351295292377472,
0.567315936088562,
0.27133646607398987,
0.023083705455064774,
0.46958398818969727,
0.7724388837814331,
-0.8822604417800903,
... |
func (c *awsSesReceiptRuleSets) Get(name string, options meta_v1.GetOptions) (result *v1.AwsSesReceiptRuleSet, err error) {
result = &v1.AwsSesReceiptRuleSet{}
err = c.client.Get().
Namespace(c.ns).
Resource("awssesreceiptrulesets").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into... | [
-0.27017053961753845,
0.5688625574111938,
0.4091278612613678,
-1.7872730493545532,
-0.03771191090345383,
-0.5711624622344971,
-0.17726510763168335,
0.03840353339910507,
0.35882896184921265,
0.9770717620849609,
0.18799862265586853,
0.7113052606582642,
0.2692667543888092,
-0.9632956981658936... |
func (c *awsSesReceiptRuleSets) List(opts meta_v1.ListOptions) (result *v1.AwsSesReceiptRuleSetList, err error) {
result = &v1.AwsSesReceiptRuleSetList{}
err = c.client.Get().
Namespace(c.ns).
Resource("awssesreceiptrulesets").
VersionedParams(&opts, scheme.ParameterCodec).
Do().
Into(result)
return
} | [
0.06888385117053986,
0.24571697413921356,
0.34881529211997986,
-1.2295138835906982,
0.21694684028625488,
-0.16129019856452942,
0.13943342864513397,
0.6291022896766663,
0.6639492511749268,
1.0144808292388916,
-0.19861383736133575,
0.4871959686279297,
0.5748821496963501,
-0.7365869879722595,... |
func (c *awsSesReceiptRuleSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("awssesreceiptrulesets").
VersionedParams(&opts, scheme.ParameterCodec).
Watch()
} | [
0.24856580793857574,
0.06542196124792099,
0.35578492283821106,
-1.1127506494522095,
-0.15384724736213684,
0.26495328545570374,
0.34177258610725403,
0.25461679697036743,
0.6534909009933472,
0.05339319258928299,
-0.11963612586259842,
1.1986325979232788,
0.85981684923172,
-0.5898030400276184,... |
func (c *awsSesReceiptRuleSets) Create(awsSesReceiptRuleSet *v1.AwsSesReceiptRuleSet) (result *v1.AwsSesReceiptRuleSet, err error) {
result = &v1.AwsSesReceiptRuleSet{}
err = c.client.Post().
Namespace(c.ns).
Resource("awssesreceiptrulesets").
Body(awsSesReceiptRuleSet).
Do().
Into(result)
return
} | [
-0.3376457095146179,
0.45087721943855286,
0.31105750799179077,
-1.3428213596343994,
0.0450609028339386,
0.12997448444366455,
-0.3370889723300934,
-0.47275421023368835,
0.3895690441131592,
0.7688813209533691,
0.1912183314561844,
-0.25066009163856506,
0.4400736093521118,
-0.5550789833068848,... |
func (c *awsSesReceiptRuleSets) Update(awsSesReceiptRuleSet *v1.AwsSesReceiptRuleSet) (result *v1.AwsSesReceiptRuleSet, err error) {
result = &v1.AwsSesReceiptRuleSet{}
err = c.client.Put().
Namespace(c.ns).
Resource("awssesreceiptrulesets").
Name(awsSesReceiptRuleSet.Name).
Body(awsSesReceiptRuleSet).
Do()... | [
-0.449899822473526,
-0.28679752349853516,
0.14933478832244873,
-1.98593270778656,
-0.5226768255233765,
-0.053341906517744064,
-0.16292361915111542,
0.11375758796930313,
0.7412171363830566,
1.157441258430481,
0.008101499639451504,
-0.12338181585073471,
0.49714475870132446,
-0.81569361686706... |
func (c *awsSesReceiptRuleSets) Delete(name string, options *meta_v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("awssesreceiptrulesets").
Name(name).
Body(options).
Do().
Error()
} | [
0.5216054916381836,
0.6835318803787231,
0.4033043682575226,
-1.0320194959640503,
-0.05660616233944893,
0.05266701802611351,
0.060952574014663696,
0.1265939325094223,
0.7231383919715881,
1.1410949230194092,
0.23023056983947754,
0.23120971024036407,
-0.0295722596347332,
-0.6145293712615967,
... |
func (c *awsSesReceiptRuleSets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("awssesreceiptrulesets").
VersionedParams(&listOptions, scheme.ParameterCodec).
Body(options).
Do().
Error()
} | [
-0.23248291015625,
0.16943633556365967,
0.6720091104507446,
-0.5589597225189209,
0.34307968616485596,
-0.08736453205347061,
0.5238248705863953,
0.321861207485199,
0.4845702350139618,
-0.048720549792051315,
0.3215057849884033,
0.4901438355445862,
0.5656908750534058,
0.2592136859893799,
-0... |
func (c *awsSesReceiptRuleSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.AwsSesReceiptRuleSet, err error) {
result = &v1.AwsSesReceiptRuleSet{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("awssesreceiptrulesets").
SubResource(subresources...).
Name(name).... | [
-0.1640799343585968,
-0.030482051894068718,
0.1648499220609665,
-1.699997901916504,
-0.8587076663970947,
0.8737021088600159,
-0.36728572845458984,
0.29466092586517334,
0.7685544490814209,
0.5164703726768494,
0.28549426794052124,
0.617917001247406,
0.27857309579849243,
-0.7700666785240173,
... |
func simulate(c echo.Context) error {
setInterval(func() {
s1 := rand.NewSource(time.Now().UnixNano())
r1 := rand.New(s1)
newVisitsData := visitsData{
Pages: r1.Intn(100),
Count: r1.Intn(100),
}
client.Trigger("visitorsCount", "addNumber", newVisitsData)
}, 2500, true)
return c.String(http.Sta... | [
-0.6610987782478333,
1.235617756843567,
0.5686413645744324,
0.09848865121603012,
0.06348317116498947,
0.0964493528008461,
0.17641928791999817,
0.05900869891047478,
-0.2136726975440979,
0.22807475924491882,
-0.4500630795955658,
0.30889472365379333,
-0.1740601360797882,
-0.4295715391635895,
... |
func isAdmin(user string) bool {
return user == ROOT1 || user == ROOT2
} | [
-0.2875795364379883,
-0.18682928383350372,
0.3224394917488098,
1.8158069849014282,
-0.8259043097496033,
0.6322562098503113,
-0.27430710196495056,
-1.061478853225708,
0.3735181391239166,
-0.20418314635753632,
0.17597976326942444,
1.2667818069458008,
-0.7020325064659119,
0.3944179117679596,
... |
func downloadHandler(w http.ResponseWriter, r *http.Request) {
session, err := store.Get(r, sessName)
if err != nil {
w.Write([]byte("bad cookie"))
return
}
// authenticate user
if session.Values["logged_in"] != "yes" || !isAdmin(session.Values["andrew"].(string)) {
http.Redirect(w, r, htmlRoot+"/", http.St... | [
0.44596928358078003,
-0.7336299419403076,
0.8260268568992615,
0.045918431133031845,
-0.06483499705791473,
0.40355348587036133,
0.6029393672943115,
-0.13307778537273407,
0.11015071719884872,
-0.1517108827829361,
0.7795238494873047,
-0.08356297016143799,
0.07211608439683914,
0.80365031957626... |
func SelectionSortInt(list []int) {
for i := 0; i < len(list); i++ {
lowestIndex := i
for j := i + 1; j < len(list); j++ {
if list[j] < list[lowestIndex] {
lowestIndex = j
}
}
list[i], list[lowestIndex] = list[lowestIndex], list[i]
}
} | [
-0.8781512975692749,
-0.4898606836795807,
0.5676438808441162,
-0.751853883266449,
-0.16021598875522614,
-0.449064165353775,
0.3041980266571045,
-1.5250879526138306,
0.672157347202301,
0.05144071951508522,
-0.6956435441970825,
0.2755674421787262,
-1.2727280855178833,
0.38309046626091003,
... |
func SelectionSortString(list []string) {
for i := 0; i < len(list); i++ {
lowestIndex := i
for j := i + 1; j < len(list); j++ {
if list[j] < list[lowestIndex] {
lowestIndex = j
}
}
list[i], list[lowestIndex] = list[lowestIndex], list[i]
}
} | [
-0.4514521062374115,
-0.8197599649429321,
0.45110663771629333,
-0.526458203792572,
-0.28468841314315796,
-0.4852133095264435,
0.21106113493442535,
-1.2177485227584839,
0.4464598000049591,
0.21269118785858154,
-0.0706695094704628,
0.7437466979026794,
-0.7920091152191162,
-0.1126124262809753... |
func SelectionSortPerson(people []Person) {
less := func(a, b Person) bool {
if a.Age != b.Age {
return a.Age < b.Age
}
if a.LastName != b.LastName {
return a.LastName < b.LastName
}
return a.FirstName < b.FirstName
}
for i := 0; i < len(people); i++ {
lowestIndex := i
for j := i + 1; j < len(p... | [
-0.9854190945625305,
-1.259392261505127,
0.7585287690162659,
-0.6208543181419373,
-0.5672248005867004,
0.10277600586414337,
0.386043518781662,
-0.7985162138938904,
0.1666039079427719,
-0.18605923652648926,
0.34339240193367004,
0.4870128929615021,
-0.7406924962997437,
0.10435781627893448,
... |
func SelectionSort(list sort.Interface) {
for i := 0; i < list.Len(); i++ {
lowestIndex := i
for j := i + 1; j < list.Len(); j++ {
if list.Less(j, lowestIndex) {
lowestIndex = j
}
}
list.Swap(i, lowestIndex)
}
} | [
-0.8069736361503601,
0.1353837549686432,
0.5872174501419067,
-0.07177746295928955,
-0.15981446206569672,
-0.6575695276260376,
0.3852347433567047,
-0.9431138038635254,
0.8338183164596558,
-0.6326258778572083,
-0.6521046757698059,
0.5367104411125183,
-0.8694028854370117,
0.4008992314338684,
... |
func (d *Activity) Table() string {
return ActivitiesTable
} | [
0.25962555408477783,
-0.4976944327354431,
0.27051594853401184,
0.22370921075344086,
-0.13832104206085205,
0.5455915927886963,
1.0454480648040771,
-0.4284632205963135,
0.1740134358406067,
-0.12001422792673111,
0.7604784369468689,
0.7312766313552856,
0.32369139790534973,
-0.5871475338935852,... |
func (d *Activity) SearchField() string {
return ActivityField.ExteralID
} | [
0.013524823822081089,
0.17645928263664246,
0.43332454562187195,
-0.6602604389190674,
-0.015889812260866165,
1.2752958536148071,
0.0846627801656723,
-0.12379880249500275,
0.6260270476341248,
0.08556453883647919,
-0.14694491028785706,
-0.0036523116286844015,
-1.1623140573501587,
-0.808494567... |
func (d *Activity) GetID() string {
return d.ID
} | [
0.7104204893112183,
-0.44071340560913086,
0.14407938718795776,
0.4884456992149353,
0.5718868970870972,
0.9741603136062622,
0.9695178270339966,
-0.47156885266304016,
1.5195732116699219,
-0.17013533413410187,
0.4685188829898834,
0.727466881275177,
-0.17207688093185425,
-0.22059689462184906,
... |
func (d *Activity) Service() string {
return ActivityService
} | [
-0.7758920788764954,
-1.3008995056152344,
-0.22308315336704254,
0.023307152092456818,
-0.08398313820362091,
0.8068516254425049,
0.7116133570671082,
-1.2059667110443115,
0.8769555687904358,
-0.2531326413154602,
0.035220708698034286,
0.7046459317207336,
-0.1980944722890854,
-0.10149215906858... |
func (d *Activity) KeyVal() string {
return d.ExteralID
} | [
0.4701593518257141,
-0.2527124285697937,
0.19448843598365784,
-0.5016818046569824,
-0.9980340003967285,
0.8655738830566406,
-0.6512407064437866,
-0.14592280983924866,
0.3653910756111145,
-0.23434458673000336,
0.7601365447044373,
1.6544140577316284,
0.20608273148536682,
-0.412637323141098,
... |
func (d *Activity) BRead() error {
return nil
} | [
0.3188062310218811,
-0.3201909065246582,
0.39643532037734985,
0.7269589900970459,
-0.3947179913520813,
0.46760761737823486,
1.05452561378479,
-0.375034362077713,
0.8889980912208557,
-0.5387951135635376,
0.06989531219005585,
1.3885400295257568,
-0.39960554242134094,
1.348992943763733,
-0.... |
func (d *Activity) ARead() error {
return nil
} | [
0.2891308665275574,
-1.0542550086975098,
0.28023383021354675,
-0.1891818791627884,
-0.47931575775146484,
1.2693841457366943,
1.051533579826355,
0.13728444278240204,
1.4197570085525513,
-0.4822729825973511,
1.5251948833465576,
1.131333351135254,
0.4247322678565979,
0.8239328861236572,
0.4... |
func (d *Activity) BCreate() error {
if d.ID == "" {
d.ID = uuid.New().String()
}
d.Created = time.Now()
return nil
} | [
-0.15161646902561188,
0.2076389193534851,
0.4491824209690094,
0.48431411385536194,
1.1183881759643555,
-0.15634854137897491,
-0.4646749794483185,
0.30028682947158813,
-0.5970176458358765,
0.1671595573425293,
-0.03071107715368271,
-0.1906297653913498,
-0.26831331849098206,
0.178307190537452... |
func (d *Activity) ACreate() error {
return nil
} | [
0.2659784257411957,
-0.07275509089231491,
0.3209708333015442,
0.15909725427627563,
-0.3087012469768524,
0.13975362479686737,
0.2698534429073334,
-0.4279137849807739,
0.7471328377723694,
-0.2684403955936432,
1.7116938829421997,
0.8281913995742798,
-0.5180703997612,
0.2329694926738739,
0.0... |
func (d *Activity) BUpdate() error {
return nil
} | [
-0.34162676334381104,
-0.5526474118232727,
0.4017414450645447,
0.2660011649131775,
0.3670724034309387,
-0.19431887567043304,
0.12292172014713287,
-0.6147134900093079,
0.7012842893600464,
-0.6108205914497375,
0.3938148617744446,
0.060198355466127396,
-0.4579300880432129,
-0.1144869327545166... |
func (d *Activity) AUpdate() error {
return nil
} | [
0.1742141991853714,
-1.135292649269104,
0.3126223087310791,
0.09257819503545761,
-0.13788829743862152,
-0.4052783250808716,
0.778681755065918,
-0.2171870321035385,
0.44937536120414734,
-0.20383691787719727,
0.8470875024795532,
0.36633434891700745,
-0.04280807077884674,
-0.08368079364299774... |
func (d *Activity) BDelete() error {
return nil
} | [
0.3837089538574219,
-0.2605583369731903,
0.4904821813106537,
1.191474437713623,
0.8194829225540161,
-0.1467314064502716,
1.1537456512451172,
0.3278116285800934,
1.0946788787841797,
0.6176382899284363,
0.6801272630691528,
0.43421074748039246,
-1.0210883617401123,
0.011743459850549698,
0.3... |
func (d *Activity) ADelete() error {
return nil
} | [
0.7442376613616943,
-0.2454974204301834,
0.1836341917514801,
-0.3227550983428955,
0.26955851912498474,
0.09595099836587906,
0.5355987548828125,
-0.4080132842063904,
0.5788917541503906,
-0.3459927439689636,
1.1316728591918945,
0.3902401030063629,
-0.2539588212966919,
0.3240651488304138,
-... |
func RawActivity(raw json.RawMessage) (*Activity, error) {
m := &Activity{}
if err := json.Unmarshal(raw, m); err != nil {
return nil, errors.InternalWrap(err, "unmarshal document")
}
return m, nil
} | [
-0.4533608555793762,
-0.2019805610179901,
0.3473186194896698,
-0.47531411051750183,
-1.3090324401855469,
-0.5372428894042969,
0.8847602009773254,
-1.2393096685409546,
0.6340301632881165,
-0.24271009862422943,
-0.07720374315977097,
0.2527965307235718,
-0.4047093987464905,
-1.105431437492370... |
func listenPacket(ifi *net.Interface, proto Protocol) (*packetConn, error) {
return nil, ErrNotImplemented
} | [
-0.2636163830757141,
0.04720422253012657,
0.4043114483356476,
-0.3496919274330139,
-0.6007164120674133,
-0.11113610863685608,
0.2502211034297943,
0.4987911581993103,
0.20082391798496246,
-1.56980562210083,
-0.25922733545303345,
0.15074655413627625,
-0.4089014530181885,
0.693691611289978,
... |
func (p *packetConn) ReadFrom(b []byte) (int, net.Addr, error) {
return 0, nil, ErrNotImplemented
} | [
-0.8415325880050659,
-0.9013038873672485,
0.7293708324432373,
0.14598986506462097,
-0.1954268515110016,
0.04094257950782776,
0.04110429063439369,
0.6146121621131897,
0.5117997527122498,
-0.3882511854171753,
-0.31064027547836304,
0.10603373497724533,
0.10659249871969223,
-0.1718856394290924... |
func (p *packetConn) WriteTo(b []byte, addr net.Addr) (int, error) {
return 0, ErrNotImplemented
} | [
-1.285417914390564,
-0.17243783175945282,
0.6390220522880554,
-0.33266326785087585,
0.3285089135169983,
-0.3191268742084503,
0.22354283928871155,
0.9421030282974243,
0.24223683774471283,
-0.12241110950708389,
-1.035643458366394,
0.5213289856910706,
-0.27340418100357056,
0.40834060311317444... |
func (p *packetConn) Close() error {
return ErrNotImplemented
} | [
-0.6250584721565247,
-0.3161700367927551,
0.617959201335907,
-0.057567793875932693,
-0.5934709906578064,
0.6894868612289429,
-0.5371438264846802,
0.3169379234313965,
-0.3504147529602051,
-1.3195778131484985,
-0.6577393412590027,
0.2707727551460266,
-0.4010883867740631,
0.7969506978988647,
... |
func (p *packetConn) LocalAddr() net.Addr {
return nil
} | [
0.6058921217918396,
-0.9238104224205017,
0.36031094193458557,
-0.7579046487808228,
-0.8630642294883728,
0.12635454535484314,
-0.9553670883178711,
0.9223402738571167,
0.48923608660697937,
-1.0508867502212524,
0.3264741003513336,
0.10357058793306351,
-0.6311403512954712,
0.16440646350383759,... |
func (p *packetConn) SetDeadline(t time.Time) error {
return ErrNotImplemented
} | [
-1.0514861345291138,
-0.4384109079837799,
0.6206650733947754,
0.19222138822078705,
0.6954485774040222,
0.27590882778167725,
-0.9001026749610901,
-0.006441383622586727,
-0.41730472445487976,
-0.16720548272132874,
-1.4192336797714233,
0.08084554970264435,
-0.03957526013255119,
0.728523075580... |
func (p *packetConn) SetReadDeadline(t time.Time) error {
return ErrNotImplemented
} | [
-0.9767196774482727,
-0.6568619608879089,
0.6218258142471313,
-0.41934505105018616,
0.04394396021962166,
0.6303088068962097,
-0.5054255723953247,
-0.453119695186615,
-0.13304850459098816,
-0.07850421965122223,
-1.372102975845337,
0.018161002546548843,
0.5311227440834045,
0.5591709613800049... |
func (p *packetConn) SetWriteDeadline(t time.Time) error {
return ErrNotImplemented
} | [
-1.5107848644256592,
-0.9991331696510315,
0.5781924724578857,
-0.30501994490623474,
1.1909009218215942,
0.3955942988395691,
-0.308702677488327,
0.1950310617685318,
-0.3048400282859802,
-0.2650901675224304,
-0.933926522731781,
-0.20939210057258606,
-0.1661788374185562,
0.3224061131477356,
... |
func (a *ClientCredentials) Token() (*oauth2.Token, error) {
var err error
a.c, err = configClientCredentials(a.B)
if err != nil {
return nil, err
}
return a.c.Token(context.TODO())
} | [
-0.21828912198543549,
-0.48864075541496277,
0.2920556664466858,
0.49441224336624146,
-0.1522137075662613,
-0.2579824924468994,
0.8117395043373108,
0.43238121271133423,
-0.38854971528053284,
-1.1437194347381592,
0.035179007798433304,
0.917944610118866,
0.6473774313926697,
-0.174006357789039... |
func (a *ClientCredentials) Client(token *oauth2.Token) *http.Client {
return a.c.Client(context.Background())
} | [
0.49308663606643677,
-0.6458724141120911,
-0.011743998154997826,
-0.09047122299671173,
-0.42395249009132385,
0.2598342001438141,
-0.07039114087820053,
-0.7898430228233337,
-0.1520330011844635,
-0.7570109367370605,
0.14324776828289032,
1.1377233266830444,
0.5423250198364258,
-0.816550672054... |
func LengthOfLastWord(s string) int {
strArr := strings.Split(s, " ")
i := 1
l := 0
for {
if i > len(strArr) {
break
}
if len(strArr[len(strArr)-i]) == 0 {
i++
} else {
l = len(strArr[len(strArr)-i])
break
}
}
return l
} | [
0.21007132530212402,
-0.5432949066162109,
0.8429881930351257,
-0.42662379145622253,
-0.015646545216441154,
-0.019563112407922745,
0.2063659280538559,
0.7413116097450256,
1.1083341836929321,
1.0474956035614014,
-0.6166595816612244,
0.04223611205816269,
-0.8158182501792908,
0.827354669570922... |
func Get(elem interface{}, t interface{}) (val interface{}, ok bool) {
switch t := t.(type) {
case string:
i, ok := getIndex(elem, int64(len(t)))
if !ok {
return nil, false
}
return t[i : i+1], true
case []interface{}:
i, ok := getIndex(elem, int64(len(t)))
if !ok {
return nil, false
}
return t... | [
-0.3352861702442169,
-0.214864581823349,
0.8662078380584717,
-0.2932641804218292,
-0.6738240122795105,
-0.22551579773426056,
-0.3846956491470337,
-0.1449468582868576,
-0.6551335453987122,
0.7371622323989868,
-0.4720267653465271,
0.8617414832115173,
0.1603645533323288,
-0.40175995230674744,... |
func Length(i interface{}) (l int, ok bool) {
switch i := i.(type) {
case string:
return len(i), true
case []interface{}:
return len(i), true
case map[string]interface{}:
return len(i), true
case []int64:
return len(i), true
case []float64:
return len(i), true
case []bool:
return len(i), true
case m... | [
-0.6145970225334167,
-0.09753331542015076,
0.6392925977706909,
-0.6319097876548767,
-0.7036402225494385,
0.4091590344905853,
0.534292995929718,
0.33705028891563416,
0.6973263621330261,
1.3071985244750977,
-0.9334294199943542,
-0.03197656199336052,
-0.17267443239688873,
0.41296735405921936,... |
func New(s Site, name string, metadata map[string]interface{}) *Collection {
return &Collection{
Name: name,
Metadata: metadata,
cfg: s.Config(),
site: s,
}
} | [
-0.12816356122493744,
-0.6134172081947327,
0.2916790544986725,
-0.2629375159740448,
-0.5076426267623901,
0.07680472731590271,
-0.3986627161502838,
-0.25943711400032043,
-0.9665018916130066,
0.33336159586906433,
-0.5983710289001465,
0.5069959163665771,
0.8722708225250244,
0.506587028503418,... |
func (c *Collection) AbsDir() string {
return filepath.Join(c.cfg.SourceDir(), c.PathPrefix())
} | [
0.20645324885845184,
-0.8096750378608704,
0.24980826675891876,
0.08773397654294968,
-0.4801076352596283,
1.3412245512008667,
-0.013865805231034756,
0.009318739175796509,
-0.4548564851284027,
-0.8829421401023865,
0.7072857022285461,
-0.0012345940340310335,
0.38379454612731934,
1.31033909320... |
func (c *Collection) PathPrefix() string { return filepath.FromSlash("_" + c.Name + "/") } | [
0.37763914465904236,
-0.22665180265903473,
0.4321196377277374,
0.27113285660743713,
-0.1737033873796463,
0.9638595581054688,
0.3810952603816986,
0.1379127949476242,
-0.21695385873317719,
0.36289623379707336,
-0.5362508296966553,
-0.47570890188217163,
0.014382175169885159,
0.149318292737007... |
func (c *Collection) IsPostsCollection() bool { return c.Name == postsName } | [
-0.2364100217819214,
0.14138910174369812,
0.3242446184158325,
0.3999919295310974,
-0.668067455291748,
0.4594002068042755,
0.06920073181390762,
-0.9003622531890869,
-0.08329752832651138,
0.21789295971393585,
-0.9748184680938721,
-0.278940886259079,
-0.033751241862773895,
0.8196374177932739,... |
func (c *Collection) Output() bool { return templates.VariableMap(c.Metadata).Bool("output", false) } | [
-0.7993608117103577,
-0.010332648642361164,
0.4782678186893463,
0.21277444064617157,
-0.6405062675476074,
0.08558610826730728,
0.1291225701570511,
-0.1322384625673294,
-0.9371157884597778,
0.6801708340644836,
-0.3306325376033783,
-0.520866334438324,
-0.6705127954483032,
0.3451947569847107,... |
func (c *Collection) Pages() []Page {
return c.pages
} | [
-0.2117997258901596,
-0.5624589323997498,
-0.032768480479717255,
-0.1085784062743187,
0.9642400145530701,
1.1830244064331055,
-0.7388221621513367,
-0.3006289005279541,
0.726520836353302,
-0.5166846513748169,
0.3257770836353302,
0.35999947786331177,
-0.48353466391563416,
0.38589727878570557... |
func (c *Collection) Render() error {
for _, p := range c.Pages() {
err := p.Render()
if err != nil {
return err
}
}
return nil
} | [
-0.11165929585695267,
-0.32352912425994873,
0.3816440999507904,
-0.00876713078469038,
1.3987860679626465,
0.6035141348838806,
-1.0027785301208496,
0.27471724152565,
-0.8459362983703613,
0.12464015185832977,
0.23297153413295746,
-0.7266428470611572,
-0.8810076713562012,
1.0874871015548706,
... |
func (c *Collection) ToLiquid() interface{} {
return liquid.IterationKeyedMap(templates.MergeVariableMaps(
c.Metadata,
map[string]interface{}{
"label": c.Name,
"docs": c.pages,
"files": []string{},
"relative_directory": strings.TrimSuffix(c.PathPrefix(), "/"),
... | [
0.30570921301841736,
-1.1346603631973267,
0.4918898046016693,
-1.7061220407485962,
0.6921197175979614,
1.1041029691696167,
-0.23162542283535004,
-0.6445679664611816,
0.17848199605941772,
0.3844386339187622,
0.117888905107975,
0.6983229517936707,
-0.03836549073457718,
0.1881173551082611,
... |
func (c *Collection) PermalinkPattern() string {
pattern := c.strategy().defaultPermalinkPattern(c.cfg)
return templates.VariableMap(c.Metadata).String("permalink", pattern)
} | [
0.4947618246078491,
-0.12620916962623596,
0.2567608058452606,
-0.4568589925765991,
-0.16576483845710754,
0.6117944121360779,
0.29813331365585327,
1.1539102792739868,
0.3087810277938843,
-0.06578759849071503,
0.37391942739486694,
0.573012113571167,
-0.8186389803886414,
0.2682006061077118,
... |
func Builder(bidderName openrtb_ext.BidderName, config config.Adapter) (adapters.Bidder, error) {
bidder := &DaxAdapter{
endpoint: config.Endpoint,
}
return bidder, nil
} | [
-0.3796791434288025,
-0.8007558584213257,
0.2870613634586334,
0.7839943170547485,
-0.8996031880378723,
0.1381516009569168,
-0.3624550402164459,
0.7156553864479065,
0.4503893256187439,
-0.7830694317817688,
-0.22721713781356812,
0.580553412437439,
0.5336846113204956,
-0.2566896378993988,
0... |
func Init() {
rows, err := db.DB.Query("select * from users")
if err != nil {
log.Println(err)
return
}
defer rows.Close()
for rows.Next() {
var (
id int
username string
createdAt time.Time
)
err := rows.Scan(&id, &username, &createdAt)
if err != nil {
log.Println(err)
continue
... | [
-0.46263208985328674,
0.4127838909626007,
0.690555214881897,
-0.3952922523021698,
0.0336131677031517,
0.4923473000526428,
-0.2001967579126358,
-0.02884741686284542,
-0.6235100030899048,
-0.15153324604034424,
-0.37597182393074036,
0.10636009275913239,
0.33383017778396606,
0.6697818636894226... |
func withTodo(ctx context.Context, todo *types.Todo) context.Context {
return context.WithValue(ctx, todoKey, todo)
} | [
0.4946335554122925,
0.1999453902244568,
0.5307900905609131,
-0.07710713148117065,
-0.8732993006706238,
0.2624588906764984,
-0.5052369236946106,
-0.979171872138977,
0.24604548513889313,
-0.08565302193164825,
0.08109501749277115,
0.41475313901901245,
1.5082824230194092,
-0.10260482132434845,... |
func todoFromContext(ctx context.Context) (*types.Todo, error) {
todo, ok := ctx.Value(todoKey).(*types.Todo)
if !ok {
return nil, errNoTodoFromContext
}
return todo, nil
} | [
0.36176133155822754,
0.36430227756500244,
0.28323328495025635,
0.061134617775678635,
-0.3039819896221161,
-0.2648146450519562,
-0.8147481679916382,
-1.375449299812317,
0.3638542592525482,
-0.01505164336413145,
-0.7066047191619873,
0.07457870990037918,
0.22918975353240967,
-0.12163375318050... |
func NewShareMedicalRecordOK() *ShareMedicalRecordOK {
return &ShareMedicalRecordOK{}
} | [
0.9571488499641418,
0.30422845482826233,
0.15165497362613678,
0.27758556604385376,
-0.6230047345161438,
-0.3798133134841919,
-0.013192045502364635,
0.623546838760376,
-0.6682844758033752,
-0.3487902581691742,
0.39341264963150024,
0.5359387397766113,
0.4537866711616516,
0.41367125511169434,... |
func (o *ShareMedicalRecordOK) WithPayload(payload *models.Credential) *ShareMedicalRecordOK {
o.Payload = payload
return o
} | [
1.3389972448349,
0.5334256291389465,
0.06330174952745438,
-0.2818300724029541,
-0.8638498187065125,
-0.033582888543605804,
0.11939263343811035,
0.16025599837303162,
-0.02053358033299446,
-0.4240928292274475,
0.7802743315696716,
-0.28756019473075867,
0.27672556042671204,
-0.1080850958824157... |
func (o *ShareMedicalRecordOK) SetPayload(payload *models.Credential) {
o.Payload = payload
} | [
1.2462921142578125,
0.644699215888977,
0.06138894334435463,
-0.082318976521492,
-0.5777786374092102,
0.2934587001800537,
0.2636488676071167,
0.42522016167640686,
-0.40644070506095886,
-0.2057301551103592,
0.13331075012683868,
0.24805068969726562,
-0.45608213543891907,
0.25023359060287476,
... |
func (o *ShareMedicalRecordOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
} | [
0.17431342601776123,
-0.0037009455263614655,
0.2780476212501526,
0.4823732376098633,
0.5967750549316406,
-0.5512251257896423,
0.7562623023986816,
0.11831679940223694,
0.1407173126935959,
0.25031110644340515,
0.6190666556358337,
-0.5389876365661621,
-0.3926030993461609,
-0.2189876288175583,... |
func NewShareMedicalRecordBadRequest() *ShareMedicalRecordBadRequest {
return &ShareMedicalRecordBadRequest{}
} | [
0.11639008671045303,
0.23997603356838226,
0.4328908920288086,
0.261394739151001,
-0.8146684765815735,
-0.023039866238832474,
-0.5939826369285583,
-0.05389164760708809,
-0.6843459010124207,
0.065520279109478,
1.1922978162765503,
1.0181914567947388,
-0.19116893410682678,
0.3531012237071991,
... |
func (o *ShareMedicalRecordBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(400)
} | [
-0.07558885961771011,
-0.18606702983379364,
0.40134844183921814,
0.40617600083351135,
0.9746610522270203,
-0.02102634869515896,
0.2883036136627197,
-0.5095329880714417,
-0.0038742513861507177,
0.3233015537261963,
0.7263500690460205,
0.3090333938598633,
-1.4196027517318726,
-0.1251032054424... |
func NewShareMedicalRecordNotFound() *ShareMedicalRecordNotFound {
return &ShareMedicalRecordNotFound{}
} | [
0.9662426114082336,
-1.1186332702636719,
0.04132780060172081,
-0.1622653603553772,
-0.255658358335495,
0.6678406596183777,
0.3895540237426758,
0.20836468040943146,
-0.5364335179328918,
0.08728869259357452,
0.5044158697128296,
0.6556504964828491,
-0.2113036960363388,
0.14704684913158417,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.