text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func checkCompilerFlag(flag string, languages []string, tc toolchain) string {
for _, lang := range languages {
if tc.checkFlagIsSupported(lang, flag) {
return flag
}
}
return ""
} | [
0.14297543466091156,
0.19210834801197052,
0.2418377548456192,
0.14431127905845642,
-0.4351928234100342,
0.10615531355142593,
-0.46511584520339966,
0.6960386037826538,
-1.4368951320648193,
0.31300750374794006,
-0.1334351748228073,
-0.09624961763620377,
-1.2034523487091064,
1.716785669326782... |
func applyLateTemplates(mctx blueprint.BaseModuleContext) {
m, ok := mctx.Module().(featurable)
if !ok {
// Features and templates not supported by this module type
return
}
propfnmap := make(map[string]template.FuncMap)
// Set up {{match_srcs}} and {{add_if_supported}} handling
nonCompiledSources := setup... | [
0.09643194079399109,
0.07953767478466034,
0.8161648511886597,
-0.2150557041168213,
-0.6081255078315735,
0.06640330702066422,
-0.16748934984207153,
0.45529142022132874,
0.578494668006897,
-0.6042757630348206,
-0.0060950992628932,
-0.5830872654914856,
-0.38254329562187195,
0.7594684362411499... |
func lateTemplateMutator(mctx blueprint.TopDownMutatorContext) {
module := mctx.Module()
if e, ok := module.(enableable); ok {
if isEnabled(e) {
applyLateTemplates(mctx)
}
}
} | [
-0.2877182364463806,
-0.6986889839172363,
0.7220134735107422,
-0.028574485331773758,
-0.9641028046607971,
0.0415581613779068,
0.07931849360466003,
0.9181320071220398,
1.6359429359436035,
0.544485330581665,
-0.4106791317462921,
-0.6397019028663635,
-1.0603474378585815,
0.4415896534919739,
... |
func TestUpdateDeviceProfile(t *testing.T) {
p := models.DeviceProfile{
Id: "1234",
Name: "Test name for device profile",
}
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
if r.Method != http.MethodPut {
t.Errorf("expected http meth... | [
-0.5683407187461853,
0.541146993637085,
0.5960178971290588,
-0.553340494632721,
0.23193931579589844,
0.23812264204025269,
0.754831850528717,
-0.999294638633728,
-0.11581418663263321,
0.0690474808216095,
-1.0826672315597534,
-0.42759284377098083,
-1.151681900024414,
-0.9297237992286682,
0... |
func genHash2(resp io.ReadCloser) (i uint32){
// Calculate a hash based on the URL'd file contents.
// Don't use encode / decode machinery from an existing
// package (JPEG / PNG / etc.) because we don't reliably
// know the file format AKA image type. We only know
// that we have a file as a starting point - spe... | [
0.7765714526176453,
-0.7303964495658875,
0.9098379015922546,
-0.10475064069032669,
-0.6918794512748718,
0.42161470651626587,
0.8523650169372559,
-0.11968660354614258,
-0.5076757073402405,
-0.8140065670013428,
-0.6291370987892151,
-0.1845298409461975,
-0.49809014797210693,
0.110464379191398... |
func NewDownlinkDataNotificationDelay(delay time.Duration) *IE {
// TS29.244 8.2.28 Downlink Data Notification Delay
// Delay Value in integer multiples of 50 millisecs, or zero
return newUint8ValIE(DownlinkDataNotificationDelay, uint8(delay/50000000))
} | [
-0.8576123118400574,
0.17257840931415558,
0.11323750764131546,
-0.4414868652820587,
-0.4808497428894043,
0.24663040041923523,
0.5381321907043457,
0.26155492663383484,
0.30859893560409546,
-1.1573430299758911,
-0.00014591070066671818,
0.6709468364715576,
-0.1437111347913742,
0.2988730967044... |
func (i *IE) DownlinkDataNotificationDelay() (time.Duration, error) {
if i.Type != DownlinkDataNotificationDelay {
return 0, &InvalidTypeError{Type: i.Type}
}
return time.Duration(int64(i.Payload[0]) * 50000000), nil
} | [
-0.5672430992126465,
0.4777524471282959,
0.35647574067115784,
-0.4006354510784149,
0.2636377513408661,
-0.1434652954339981,
0.6626781821250916,
-0.2445790022611618,
0.5924310684204102,
-0.7441228032112122,
-0.20785115659236908,
0.5337406992912292,
-0.25977179408073425,
0.7184346318244934,
... |
func pollConn(s *discordgo.Session) {
c := config.Get()
for {
time.Sleep(10 * time.Second)
found := false
guilds, err := s.UserGuilds()
for _, g := range guilds {
if g.ID == c.Guild {
found = true
break
}
}
if !found {
log.Warningf("Could not find membership matching guild ID. %s", c.Gui... | [
0.30079975724220276,
-0.2905724048614502,
0.6770653128623962,
-0.03486492484807968,
0.456540584564209,
-0.35641375184059143,
-0.758297324180603,
-0.3583865165710449,
0.17164678871631622,
0.3909163475036621,
-0.0016533148009330034,
0.542892575263977,
-0.27502015233039856,
0.992195725440979,... |
func Get() *discordgo.Session {
return &session
} | [
-0.559581995010376,
0.3085094094276428,
0.12145353853702545,
-0.80821692943573,
0.3030126988887787,
-0.5564717650413513,
-0.037532441318035126,
-0.9166344404220581,
0.09970606863498688,
-0.42614471912384033,
-0.31120410561561584,
1.6453495025634766,
-0.6104979515075684,
-0.754515528678894,... |
func Init(logger *logging.Logger) *discordgo.Session {
//var err error
// set the config reference
log = logger
log.Debug("Registering message handler")
// type discordgo.Session (not a ref)
session = discordgo.Session{
OnMessageCreate: handler.MessageHandler,
}
go loginFlow(&session)
time.Sleep(1 * time.... | [
0.019459625706076622,
-0.06854475289583206,
0.3648553490638733,
-0.7846525311470032,
-0.23899754881858826,
0.4549296796321869,
-0.2180705964565277,
-0.4771858751773834,
-0.15747664868831635,
-0.5350621342658997,
0.06246514990925789,
0.7949933409690857,
-0.8052579760551453,
0.97859638929367... |
func TestHandler(t *testing.T) {
indexdInfo := new(IndexdInfo)
if err := json.Unmarshal([]byte(makeImageConfigString()), indexdInfo); err != nil {
t.Fatal(err)
}
assert.Equal(t, indexdInfo.URL, "http://indexd-service/")
assert.Equal(t, indexdInfo.Username, "test")
assert.Equal(t, indexdInfo.Password, "test")
... | [
-0.4416520595550537,
-0.3083166182041168,
0.33072593808174133,
-0.20447690784931183,
-0.05548601225018501,
0.7888582348823547,
0.6056748628616333,
0.006369184702634811,
-0.1814686357975006,
-1.098982572555542,
-0.5176313519477844,
-0.5153887271881104,
-0.35758423805236816,
-0.5293788313865... |
func TestGetConfigInfoUsingIndexdAndMDSCreds(t *testing.T) {
jsonConfigInfo :=
`
{
"url": "http://indexd-service/index",
"username": "mr happy cat",
"password": "whiskers",
"metadataService": {
"url": "http://revproxy-service/mds",
"username": "mr friendly cat",
"password": "paws"
}
}
`
err :=... | [
-0.26842057704925537,
-0.10512322187423706,
0.6349759697914124,
-0.22344925999641418,
0.05570501834154129,
0.4986077547073364,
-0.4058576822280884,
0.29761603474617004,
-0.7543125152587891,
-0.6821930408477783,
-0.15460753440856934,
0.5726550221443176,
0.1143258586525917,
0.436318933963775... |
func TestGetConfigInfoWithoutIndexdOrMDSCreds(t *testing.T) {
defer func() {
if r := recover(); r == nil {
t.Errorf("Expecting getConfigInfo to panic since Indexd and Metadata Service creds were not present in CONFIG_FILE")
}
}()
jsonConfigInfo :=
`
{}
`
err := os.Setenv("CONFIG_FILE", jsonConfigInfo)
... | [
0.301974892616272,
0.1549428552389145,
0.3895258903503418,
-0.025121035054326057,
0.357589453458786,
0.766520082950592,
-0.04916318506002426,
-0.5174900889396667,
-1.246215581893921,
-0.6647224426269531,
0.055322520434856415,
0.5410810708999634,
0.4933924078941345,
0.6793001890182495,
1.... |
func TestGetConfigInfoWithoutMDSCreds(t *testing.T) {
defer func() {
if r := recover(); r == nil {
t.Errorf("Expecting getConfigInfo to panic since Metadata Service creds were not present in CONFIG_FILE")
}
}()
jsonConfigInfo :=
`
{
"url": "http://indexd-service/index",
"username": "mr happy cat",
"... | [
0.3646966218948364,
0.36662960052490234,
0.4712393283843994,
-0.1715364009141922,
0.02371411956846714,
0.7838003635406494,
-0.4056287109851837,
-0.46394047141075134,
-1.33103346824646,
-0.5542516112327576,
-0.09857919067144394,
0.45508265495300293,
0.33463409543037415,
0.5468155741691589,
... |
func TestGetConfigInfoWithoutIndexdCreds(t *testing.T) {
defer func() {
if r := recover(); r == nil {
t.Errorf("Expecting getConfigInfo to panic since Indexd creds were not present in CONFIG_FILE")
}
}()
jsonConfigInfo :=
`
{
"metadataService": {
"url": "http://revproxy-service/mds",
"username": "... | [
0.3371799886226654,
0.2162230908870697,
0.47100454568862915,
-0.10645852237939835,
0.22107359766960144,
0.7321069836616516,
-0.1448127180337906,
-0.04724821820855141,
-1.2744214534759521,
-0.7162065505981445,
-0.23385943472385406,
0.48009610176086426,
0.06484247744083405,
0.232559010386466... |
func TestGetConfigInfoUsingExtraServiceInfo(t *testing.T) {
jsonConfigInfo :=
`
{
"url": "http://indexd-service/index",
"username": "mr happy cat",
"password": "whiskers",
"metadataService": {
"url": "http://revproxy-service/mds",
"username": "mr friendly cat",
"password": "paws",
"extra": "Alwa... | [
-0.27532628178596497,
-0.005921478383243084,
0.6379837393760681,
-0.3064936101436615,
-0.23939934372901917,
0.2530280649662018,
-0.4948454797267914,
0.3797031044960022,
-0.8664533495903015,
-0.643284797668457,
-0.47730937600135803,
0.36595118045806885,
0.5336703658103943,
0.592869222164154... |
func Add(mgr manager.Manager) error {
return add(mgr, newReconciler(mgr))
} | [
-0.24057555198669434,
0.12229465693235397,
0.46777674555778503,
-0.6655282378196716,
0.4479011595249176,
-0.17455056309700012,
-0.48020607233047485,
0.6828829646110535,
0.19666412472724915,
-0.7739230394363403,
0.224630668759346,
0.617239773273468,
-1.010264277458191,
1.3228338956832886,
... |
func newReconciler(mgr manager.Manager) reconcile.Reconciler {
return &ReconcileApiCurioDeployment{
client: mgr.GetClient(),
scheme: mgr.GetScheme(),
config: mgr.GetConfig(),
box: packr.NewBox("../../../res"),
}
} | [
-0.49047115445137024,
-0.8860828876495361,
0.4639003574848175,
-0.7161720395088196,
-0.3994704484939575,
-0.2622288167476654,
0.18174462020397186,
0.8931830525398254,
0.090789794921875,
-0.08340633660554886,
0.7953340411186218,
-0.41202351450920105,
-0.4600246548652649,
0.2879842221736908,... |
func add(mgr manager.Manager, r reconcile.Reconciler) error {
// Create a new controller
opts := controller.Options{Reconciler: r}
c, err := controller.New("apicuriodeployment-controller", mgr, opts)
if err != nil {
return err
}
// Watch for changes to primary resource ApicurioDeployment
err = c.Watch(&source... | [
-0.38569313287734985,
-0.5683658123016357,
0.6316037178039551,
-0.7667173743247986,
0.7886391878128052,
-0.021970340982079506,
0.09464581310749054,
0.9429253339767456,
0.2320834845304489,
0.24457263946533203,
0.507129430770874,
0.3018099069595337,
-0.5476139187812805,
0.790581464767456,
... |
func (o *MicrosoftGraphUsageDetails) GetLastAccessedDateTime() time.Time {
if o == nil || o.LastAccessedDateTime == nil {
var ret time.Time
return ret
}
return *o.LastAccessedDateTime
} | [
0.007577951997518539,
0.563004195690155,
0.6524450778961182,
-0.8959227204322815,
-0.5408101677894592,
-0.6509195566177368,
0.35903337597846985,
-0.07016115635633469,
0.6260039806365967,
-0.7665438055992126,
0.2656795084476471,
-0.8348851203918457,
0.11773466318845749,
1.2728474140167236,
... |
func (o *MicrosoftGraphUsageDetails) GetLastAccessedDateTimeOk() (time.Time, bool) {
if o == nil || o.LastAccessedDateTime == nil {
var ret time.Time
return ret, false
}
return *o.LastAccessedDateTime, true
} | [
-0.25598496198654175,
0.08515473455190659,
0.6786315441131592,
-0.9213892817497253,
-0.3569173812866211,
-0.46491846442222595,
0.7046971321105957,
0.45858892798423767,
-0.011419165879487991,
-0.09617260843515396,
-0.7871434092521667,
-0.8119939565658569,
0.9629215598106384,
1.3970638513565... |
func (o *MicrosoftGraphUsageDetails) HasLastAccessedDateTime() bool {
if o != nil && o.LastAccessedDateTime != nil {
return true
}
return false
} | [
0.3767332434654236,
0.510635256767273,
0.8641239404678345,
-1.5274838209152222,
0.2017168551683426,
-0.9491874575614929,
-0.011501836590468884,
0.8520514369010925,
0.024586010724306107,
-0.8313549757003784,
-0.5152707695960999,
-0.5233845710754395,
1.27009117603302,
1.382035732269287,
-0... |
func (o *MicrosoftGraphUsageDetails) SetLastAccessedDateTime(v time.Time) {
o.LastAccessedDateTime = &v
} | [
-0.2699030935764313,
0.5434525012969971,
0.17171019315719604,
-1.6143856048583984,
-0.5677069425582886,
-0.6303499341011047,
0.024662842974066734,
-0.37547728419303894,
0.3495478928089142,
-0.19071704149246216,
-0.11301413178443909,
0.1848810613155365,
0.5449678897857666,
0.861209094524383... |
func (o *MicrosoftGraphUsageDetails) SetLastAccessedDateTimeExplicitNull(b bool) {
o.LastAccessedDateTime = nil
o.isExplicitNullLastAccessedDateTime = b
} | [
0.06711077690124512,
-0.16501368582248688,
0.5187652111053467,
-1.2090785503387451,
-0.39962518215179443,
-0.09354031831026077,
0.3854129910469055,
0.8943134546279907,
0.905461311340332,
-0.07919944077730179,
-0.2750145196914673,
0.2600249648094177,
1.0658807754516602,
0.717994749546051,
... |
func (o *MicrosoftGraphUsageDetails) GetLastModifiedDateTime() time.Time {
if o == nil || o.LastModifiedDateTime == nil {
var ret time.Time
return ret
}
return *o.LastModifiedDateTime
} | [
-0.6557503342628479,
0.8874226212501526,
0.517991304397583,
-0.2389303743839264,
-0.03427055850625038,
-0.7443245053291321,
-0.11545178294181824,
0.4391971826553345,
0.6301349997520447,
-0.5278151631355286,
-0.6499846577644348,
-1.3294920921325684,
-1.2128812074661255,
1.1281869411468506,
... |
func (o *MicrosoftGraphUsageDetails) GetLastModifiedDateTimeOk() (time.Time, bool) {
if o == nil || o.LastModifiedDateTime == nil {
var ret time.Time
return ret, false
}
return *o.LastModifiedDateTime, true
} | [
-0.9680607914924622,
0.14593003690242767,
0.5501085519790649,
-0.29957690834999084,
-0.2131882756948471,
-0.22077421844005585,
0.32470038533210754,
0.6007144451141357,
-0.1491246074438095,
0.33069783449172974,
-1.4296977519989014,
-1.1954354047775269,
-0.2979729473590851,
1.432592630386352... |
func (o *MicrosoftGraphUsageDetails) HasLastModifiedDateTime() bool {
if o != nil && o.LastModifiedDateTime != nil {
return true
}
return false
} | [
-0.4893935024738312,
0.6544778943061829,
0.7655620574951172,
-0.8775832056999207,
0.8258490562438965,
-0.8306279182434082,
-0.4270925521850586,
1.2084201574325562,
-0.0428144671022892,
-0.47218072414398193,
-1.2399473190307617,
-0.791933000087738,
-0.11573834717273712,
1.2176445722579956,
... |
func (o *MicrosoftGraphUsageDetails) SetLastModifiedDateTime(v time.Time) {
o.LastModifiedDateTime = &v
} | [
-0.7915317416191101,
0.9423046112060547,
0.14407961070537567,
-0.9493098258972168,
0.05101713910698891,
-0.4716731607913971,
-0.35664647817611694,
-0.060919713228940964,
0.44940662384033203,
0.2513537108898163,
-0.7052954435348511,
0.07198391854763031,
-0.8033677935600281,
0.54534584283828... |
func (o *MicrosoftGraphUsageDetails) SetLastModifiedDateTimeExplicitNull(b bool) {
o.LastModifiedDateTime = nil
o.isExplicitNullLastModifiedDateTime = b
} | [
-0.5063082575798035,
-0.08006320893764496,
0.5326993465423584,
-0.864408552646637,
0.12547340989112854,
-0.0029115360230207443,
-0.008464821614325047,
1.3772631883621216,
0.870887815952301,
0.37742725014686584,
-0.9613445997238159,
0.19190342724323273,
0.07547302544116974,
0.86883831024169... |
func (o MicrosoftGraphUsageDetails) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.LastAccessedDateTime == nil {
if o.isExplicitNullLastAccessedDateTime {
toSerialize["lastAccessedDateTime"] = o.LastAccessedDateTime
}
} else {
toSerialize["lastAccessedDateTime"] = o.LastAccesse... | [
0.054748356342315674,
-0.12492308765649796,
0.8127485513687134,
-1.1237993240356445,
0.23424430191516876,
-1.0068320035934448,
0.5521015524864197,
-0.6106797456741333,
0.5215507745742798,
0.5345017313957214,
0.2562773823738098,
1.1116949319839478,
-0.02992960438132286,
0.11883564293384552,... |
func NewTrackController(service *goa.Service, ep sarama.AsyncProducer, ps model.PropertyStorage) *TrackController {
return &TrackController{
Controller: service.NewController("TrackController"),
EventProducer: ep,
PropertyStorage: ps,
}
} | [
0.15590888261795044,
0.39611348509788513,
0.4714492857456207,
0.30374589562416077,
-0.16895000636577606,
-0.12104831635951996,
0.1972355991601944,
-0.5508374571800232,
-0.08013298362493515,
0.271709144115448,
0.08814804255962372,
0.5121227502822876,
0.46220457553863525,
-0.0410805046558380... |
func (c *TrackController) Commerce(ctx *app.CommerceTrackContext) error {
_, ok, err := c.PropertyStorage.Get(ctx.Payload.System.PropertyToken.String())
if err != nil {
return err
}
if !ok {
return ctx.NotFound()
}
tags := map[string]string{
"step": ctx.Payload.Step,
}
values := map[string]interface{}{}
... | [
0.315093457698822,
-0.10242415219545364,
0.8579314947128296,
-0.4570971429347992,
0.40074461698532104,
0.136220782995224,
0.10352866351604462,
-1.2382341623306274,
-0.2824157476425171,
0.8206040263175964,
0.8255689740180969,
0.1558695286512375,
0.4320445656776428,
0.42596736550331116,
-0... |
func (c *TrackController) Event(ctx *app.EventTrackContext) error {
_, ok, err := c.PropertyStorage.Get(ctx.Payload.System.PropertyToken.String())
if err != nil {
return err
}
if !ok {
return ctx.NotFound()
}
tags := map[string]string{
"category": ctx.Payload.Category,
"action": ctx.Payload.Action,
}
... | [
0.7136657238006592,
0.8598832488059998,
0.7763234376907349,
0.1337285041809082,
-0.3426359295845032,
0.5855818390846252,
-0.27373039722442627,
-0.5807467103004456,
-0.8634446859359741,
0.36566248536109924,
-0.2057703584432602,
-0.06326062977313995,
0.22113452851772308,
0.7454285621643066,
... |
func (c *TrackController) Pageview(ctx *app.PageviewTrackContext) error {
_, ok, err := c.PropertyStorage.Get(ctx.Payload.System.PropertyToken.String())
if err != nil {
return err
}
if !ok {
return ctx.NotFound()
}
tags := map[string]string{
"category": model.CategoryPageview,
}
values := map[string]inte... | [
-0.09984218329191208,
0.33364301919937134,
0.9556376934051514,
0.14369024336338043,
-0.19243374466896057,
0.4826372563838959,
-0.49939462542533875,
-0.8546502590179443,
-0.5895957946777344,
0.7218621373176575,
0.7907379269599915,
-0.1113647073507309,
-0.137741819024086,
0.7353379726409912,... |
func (c *TrackController) pushInternal(system *app.System, user *app.User,
measurement string, tags map[string]string, fields map[string]interface{}) error {
fields["token"] = system.PropertyToken
if user != nil {
if user.IPAddress != nil {
fields["ip"] = *user.IPAddress
}
if user.URL != nil {
fields["u... | [
0.23086346685886383,
-0.1255573034286499,
0.769846498966217,
-0.26563963294029236,
-0.5360729098320007,
0.3585970103740692,
-0.5150836110115051,
-0.5588179230690002,
-0.47833406925201416,
0.45798128843307495,
-0.16534093022346497,
0.3126009702682495,
-0.07034888118505478,
0.825731635093689... |
func Context() context.Context {
return contextFunc.Load().(func() context.Context)()
} | [
0.387164831161499,
-0.45225635170936584,
0.28804489970207214,
-0.015504339709877968,
-0.12098297476768494,
-0.28622323274612427,
0.31917595863342285,
-0.45826107263565063,
0.795981764793396,
-0.6798845529556274,
-0.45621371269226074,
0.7632541656494141,
0.7813960313796997,
-0.5094650983810... |
func TestConcurrentSaveLoadState(t *testing.T) {
t.Run("verify save state concurrent", func(t *testing.T) {
// clear the state file first
state := NewExecutorState(0)
state.Save()
state.EnableReload()
iterationsNum := 200
var waitGroup sync.WaitGroup
waitGroup.Add(iterationsNum)
c := make(chan int, ite... | [
0.29352983832359314,
0.4963458776473999,
0.7150084376335144,
-0.42809349298477173,
0.920570969581604,
0.22009697556495667,
0.8969516158103943,
-0.007221015635877848,
-0.3559727370738983,
0.09941376000642776,
-0.9533014893531799,
-0.4622096121311188,
-0.7700201272964478,
0.16193123161792755... |
func New(config *api.Config, mountpoint, token, root string) (*VaultFS, error) {
client, err := api.NewClient(config)
if err != nil {
return nil, err
}
client.SetToken(token)
return &VaultFS{
Client: client,
root: root,
mountpoint: mountpoint,
}, nil
} | [
0.5855170488357544,
-0.5369939208030701,
0.2030649483203888,
0.41103243827819824,
0.07599756121635437,
-0.8666754961013794,
-1.0383639335632324,
-0.35033461451530457,
-1.115280270576477,
-0.6732276082038879,
0.33586356043815613,
0.4438030421733856,
0.0669872835278511,
-0.29115864634513855,... |
func (v *VaultFS) Mount() error {
var err error
v.conn, err = fuse.Mount(
v.mountpoint,
fuse.FSName("vault"),
fuse.VolumeName("vault"),
)
logrus.Debug("created conn")
if err != nil {
return err
}
logrus.Debug("starting to serve")
return fs.Serve(v.conn, v)
} | [
0.19226086139678955,
-0.43845728039741516,
0.35552355647087097,
0.4225619435310364,
0.6790675520896912,
-0.8644050359725952,
-1.1314438581466675,
-0.21118947863578796,
-0.653340220451355,
-0.7410380244255066,
0.8339858055114746,
0.04221377521753311,
-0.5543438792228699,
-0.1374804079532623... |
func (v *VaultFS) Root() (fs.Node, error) {
logrus.Debug("returning root")
return NewRoot(v.root, v.Logical()), nil
} | [
0.7557644248008728,
-0.35535746812820435,
0.2334005981683731,
0.5895576477050781,
0.25910598039627075,
-0.17170952260494232,
-0.7744803428649902,
-0.3810269832611084,
0.6369472146034241,
-0.2978152632713318,
0.8691108822822571,
1.5409938097000122,
-0.026587191969156265,
-0.1933613419532776... |
func NewMemstoreProjectsServer(
ctx context.Context,
l logger.Logger,
e engine.ProjectRulesRetriever,
eventServiceClient automate_event.EventServiceClient,
configManager *config.Manager,
) (api.ProjectsServer, error) {
return NewProjectsServer(ctx, l, memstore.New(), e, eventServiceClient, configManager)
} | [
0.10664976388216019,
-0.19412901997566223,
0.09481867402791977,
-0.47196677327156067,
-0.3870928883552551,
0.21554109454154968,
0.28897979855537415,
-0.027710869908332825,
0.30676209926605225,
-0.2173267900943756,
-0.6839259266853333,
0.5877177119255066,
-1.2543734312057495,
0.138857901096... |
func NewPostgresProjectsServer(
ctx context.Context,
l logger.Logger,
migrationsConfig migration.Config,
dataMigrationsConfig datamigration.Config,
e engine.ProjectRulesRetriever,
eventServiceClient automate_event.EventServiceClient,
configManager *config.Manager,
) (api.ProjectsServer, error) {
s, err := post... | [
-0.6287203431129456,
-0.3170027434825897,
0.12641748785972595,
-0.4098574221134186,
-0.25914430618286133,
-0.07328811287879944,
-0.014673007652163506,
0.18002775311470032,
-0.7609899044036865,
0.21064066886901855,
-0.6488693952560425,
0.3524424731731415,
-1.3408465385437012,
0.106751210987... |
func fromStorageProject(p *storage.Project) (*api.Project, error) {
return &api.Project{
Id: p.ID,
Name: p.Name,
Type: typeFromInternal(p.Type),
Projects: p.Projects,
}, nil
} | [
-0.1294638067483902,
-0.7458876371383667,
0.10942216217517853,
0.5089495778083801,
0.1006709486246109,
0.04516085982322693,
-0.6732789278030396,
-0.8794529438018799,
0.050149861723184586,
0.2507343292236328,
0.2712879776954651,
0.19476687908172607,
-0.16086526215076447,
-1.0521485805511475... |
func rulesToProjectRules(rules []engine.Rule) ([]*api.ProjectRule, error) {
conditions := make([]*api.Condition, len(rules))
for j, rule := range rules {
conditionType, exists := api.ProjectRuleConditionTypes_value[rule.Type]
if !exists {
return []*api.ProjectRule{}, errors.New(fmt.Sprintf("Condition type %s i... | [
-1.0993731021881104,
0.3727318048477173,
0.2726149260997772,
-0.4811592698097229,
1.0881472826004028,
1.0430735349655151,
-0.712881326675415,
0.4707423448562622,
-0.26568830013275146,
1.2363851070404053,
0.768398106098175,
-0.01363642793148756,
-0.8964061737060547,
0.0621190071105957,
-0... |
func (s Solution) Problem7(n int) int {
return findNthPrime(n)
} | [
-0.29951924085617065,
1.3084101676940918,
0.5305862426757812,
0.38346514105796814,
-0.12107862532138824,
-0.10837765038013458,
0.5574049949645996,
-0.3810736835002899,
0.2822894752025604,
0.1781502664089203,
0.16908490657806396,
-0.8583272695541382,
-0.21591722965240479,
1.1514918804168701... |
func SyslogHeader() string {
//Fetch process name, pid and hostname
processName := path.Base(os.Args[0])
pid := strconv.Itoa(os.Getpid())
hostname, err := os.Hostname()
if err != nil {
//This is a non-fatal error and hence we just print a message
fmt.Printf("rlog initialization error: could not fetch machine ... | [
0.683578372001648,
-0.9869271516799927,
0.9641111493110657,
-0.18529896438121796,
-0.6627072691917419,
0.2926858067512512,
-0.608816385269165,
0.7474752068519592,
-0.6156055331230164,
0.4723368287086487,
-0.49426940083503723,
0.45596951246261597,
-0.21578964591026306,
0.19391770660877228,
... |
func FormatMessage(rawRlogMsg *RlogMsg, prefix string, removeNewlines bool) string {
logMsg := rawRlogMsg.Msg
trace := rawRlogMsg.StackTrace
if removeNewlines {
//Replace newlines by #012 and remove indentations
logMsg = ReplaceNewlines(logMsg)
}
//Print the log message and stack trace if appropriate
res := ... | [
1.022560954093933,
-0.39862358570098877,
0.9214556813240051,
-0.36815065145492554,
-0.29810625314712524,
-0.5481618046760559,
-0.6215143203735352,
0.31833428144454956,
0.6227068901062012,
0.062479130923748016,
1.3273847103118896,
0.051396045833826065,
-0.42468535900115967,
1.40170896053314... |
func ReplaceNewlines(msg string) string {
return tabsNewlines.ReplaceAllString(msg, "#012")
} | [
1.011839747428894,
-0.7528681755065918,
0.2619219422340393,
-0.5993117094039917,
-0.7441715598106384,
0.055098794400691986,
-0.6102057099342346,
0.38309478759765625,
-0.21011899411678314,
0.12939105927944183,
-0.5991753339767456,
-0.17793980240821838,
-0.11448968201875687,
1.05225026607513... |
func NewDatabase(
o *DbOptions,
oa *AppOptions,
l log.Logger,
) (db.Session, error) {
var db *sqlx.DB
var err error
timeout := 15 * time.Second
deadline := time.Now().Add(timeout)
mode := oa.Mode
// register database driver proxy to log sql expresion
proxyName := fmt.Sprintf("%s-proxy", o.Code)
once.Do(func... | [
-0.3114343583583832,
0.24061240255832672,
1.0234946012496948,
0.3394719362258911,
0.12293223291635513,
-0.4766659140586853,
-0.1793394833803177,
-0.5164621472358704,
0.5205816626548767,
0.29296600818634033,
-0.024472039192914963,
0.06910960376262665,
-1.0004942417144775,
0.4488896429538727... |
func NewJSONProtocol() *JSONProtocol {
return &JSONProtocol{
types: make(map[string]reflect.Type),
names: make(map[reflect.Type]string),
}
} | [
-0.8013174533843994,
-0.8924018144607544,
0.3666493892669678,
-0.8861082792282104,
-1.7636983394622803,
-0.48173314332962036,
-0.6240764260292053,
-1.364883542060852,
-0.24041232466697693,
0.12417880445718765,
-1.5648130178451538,
0.5483707189559937,
-0.6512354016304016,
-0.802851855754852... |
func (p *JSONProtocol) Register(msg interface{}) {
t := reflect.TypeOf(msg)
if t.Kind() == reflect.Ptr {
t = t.Elem()
}
name := t.PkgPath() + "/" + t.Name()
p.types[name] = t
p.names[t] = name
} | [
-1.3790136575698853,
0.6087393164634705,
0.5435004234313965,
-0.9375585317611694,
0.3942631483078003,
-0.09221432358026505,
0.251498818397522,
-1.1992255449295044,
-0.33177223801612854,
-0.060271505266427994,
-1.0468394756317139,
0.6499859690666199,
-0.6813168525695801,
0.8766658902168274,... |
func (p *JSONProtocol) RegisterWithName(msg interface{}, msgName string) {
t := reflect.TypeOf(msg)
if t.Kind() == reflect.Ptr {
t = t.Elem()
}
if msgName == "" {
msgName = t.PkgPath() + "/" + t.Name()
}
p.types[msgName] = t
p.names[t] = msgName
} | [
-0.8922978043556213,
0.5761654376983643,
0.6883459687232971,
-1.2074236869812012,
0.12884487211704254,
-0.9297659397125244,
-0.00881205964833498,
-1.3017818927764893,
-0.07078342884778976,
0.6602901816368103,
-1.30205500125885,
0.3334939777851105,
-0.7504222393035889,
0.8364790081977844,
... |
func (c *JSONCodec) ReceiveMsg() (network.PackInf, error) {
var msg jsonIn
err := c.decoder.Decode(&msg)
if err != nil {
return nil, err
}
var body interface{}
if msg.Head != "" {
if t, ok := c.p.types[msg.Head]; ok {
body = reflect.New(t).Interface()
}
}
json.Unmarshal(msg.Body, body)
pack := new(net... | [
-0.2925522029399872,
0.04074511677026749,
0.750025749206543,
-0.9256002306938171,
-0.6646512746810913,
-0.44664856791496277,
-0.7810796499252319,
-0.16606062650680542,
-0.041003428399562836,
-0.39722806215286255,
-0.40276142954826355,
0.03175034746527672,
-0.7011114954948425,
0.91910099983... |
func (c *JSONCodec) SendMsg(pack network.PackInf) (int, error) {
msg := pack.GetPackBody()
t := reflect.TypeOf(msg)
if t.Kind() == reflect.Ptr {
t = t.Elem()
}
var out jsonMsg
if name, ok := c.p.names[t]; ok {
out.Head = name
} else {
return 0, errors.New("unregisted json msg")
}
out.Body = msg
err := c... | [
-1.2175666093826294,
0.5979353785514832,
0.7982262969017029,
-0.0509246364235878,
-0.730900764465332,
-0.9201206564903259,
0.26752638816833496,
-0.08749105036258698,
0.043462809175252914,
0.4488547146320343,
-0.7091081142425537,
0.5333274006843567,
-0.426618367433548,
1.541182279586792,
... |
func (c *JSONCodec) SendRawMsg(data []byte) (int, error) {
if c.conn == nil {
return 0, ErrFixHeadConnIsNull
}
if data != nil {
_, err := c.conn.Write(data)
return len(data), err
}
return 0, ErrFixHeadUnknownMsgInterface
} | [
-0.912735104560852,
0.6001130938529968,
1.0978535413742065,
-0.608610987663269,
-0.8427800536155701,
-0.9620972275733948,
-0.0019220566609874368,
-0.26139527559280396,
0.03863637521862984,
-0.24224936962127686,
-1.4521679878234863,
-0.13777050375938416,
-0.09351945668458939,
1.371584057807... |
func Tx(ctx context.Context, db *sqlx.DB, opts *sqltx.Options, fn TXFn) (err error) {
return sqltx.TxHandler(ctx, &sqlxDB{db}, opts, func(tx sqltx.TXer) error {
return fn(tx.(*sqlx.Tx))
})
} | [
0.0219954252243042,
0.7829884886741638,
0.41932374238967896,
-0.10245286673307419,
-0.16178856790065765,
-0.17799575626850128,
-0.8636597394943237,
0.5324946045875549,
0.5087751150131226,
-0.1595531553030014,
-0.2902901768684387,
-0.2018728256225586,
0.7224403023719788,
-1.352866291999817,... |
func AuthHandler(w http.ResponseWriter, r *http.Request) {
/* Print to stdout */
fmt.Println("Start AuthHandler")
/* defer will run the line at the very end of the scope (i.e the function) */
defer fmt.Println("End AuthHandler")
/* Reading the body of the request, r */
reqBody, _ := ioutil.ReadAll(r.Body)
in := ... | [
-0.5486541986465454,
-0.36520472168922424,
0.8404240012168884,
0.5775414109230042,
-0.2304157018661499,
0.20169661939144135,
1.135765552520752,
0.13419795036315918,
0.11139710992574692,
0.157018780708313,
-0.1751168817281723,
0.20031742751598358,
-0.6206308603286743,
0.40590155124664307,
... |
func (db *DB) View(fn func(tx *Tx) error) error { return db.Read(fn) } | [
-0.24075329303741455,
0.7366995811462402,
0.1307307481765747,
-1.2185697555541992,
-0.7166593074798584,
-0.9138056635856628,
-0.020929308608174324,
0.0920383632183075,
-0.7163494825363159,
-1.1901811361312866,
0.8078198432922363,
0.2458740770816803,
0.5399738550186157,
-0.8796675801277161,... |
func (db *DB) Get(key string, bucket ...string) Value {
db.mux.RLock()
defer db.mux.RUnlock()
b := &db.root
for _, bn := range bucket {
if b = b.Buckets[bn]; b == nil {
return nil
}
}
return b.Get(key)
} | [
-0.4173576533794403,
0.2728630602359772,
0.6081945896148682,
0.5300832390785217,
0.16322004795074463,
-0.2122836858034134,
-0.9958066940307617,
-0.7570841312408447,
-1.6001241207122803,
-0.1936236470937729,
-0.3126128017902374,
0.20112282037734985,
-0.42234867811203003,
0.3769708573818207,... |
func (db *DB) Set(key string, val []byte, bucket ...string) error {
return db.Update(func(tx *Tx) error {
b := tx.tmpBucket
for _, bn := range bucket {
b = b.Bucket(bn)
}
b.Set(key, val)
return nil
})
} | [
-0.5548362731933594,
0.7685670852661133,
0.43877974152565,
0.00835020188242197,
-0.274067223072052,
0.3503953814506531,
-0.6598564982414246,
-1.0054723024368286,
-1.2904237508773804,
0.7114773392677307,
-1.0803533792495728,
-1.1226195096969604,
-0.17515772581100464,
0.6628995537757874,
-... |
func (db *DB) Compact() error {
db.mux.Lock()
f, err := ioutil.TempFile(filepath.Dir(db.f.Name()), "jdb-compact")
defer func() {
db.mux.Unlock()
if err != nil {
f.Close()
os.Remove(f.Name())
}
}()
if err != nil {
return err
}
cp := db.opts.Backend()
if err = cp.Init(f, f); err != nil {
retur... | [
0.6175007224082947,
-0.02916676737368107,
1.1459109783172607,
-0.46694129705429077,
-0.4862322211265564,
0.1341402679681778,
0.8866601586341858,
-0.33671343326568604,
-0.6830338835716248,
0.35638943314552307,
0.23715047538280487,
0.6040282845497131,
0.4163513481616974,
0.5539814829826355,
... |
func (m *AlertMannager) gzipBase64(message interface{}) string {
var gzipBuf bytes.Buffer
messageJsonByte, err := json.Marshal(message)
if err != nil {
log.Println(err)
}
gzipWriter := gzip.NewWriter(&gzipBuf)
defer gzipWriter.Close()
gzipWriter.Write(messageJsonByte)
gzipWriter.Close()
messageGzip... | [
0.3376772105693817,
-0.5354105830192566,
0.5534850358963013,
0.47557196021080017,
0.2789327800273895,
0.09905418008565903,
-0.1004379540681839,
-0.8126638531684875,
0.03041139245033264,
0.805953323841095,
0.08742000162601471,
0.7344020009040833,
-1.2295235395431519,
0.6859457492828369,
0... |
func (m *AlertMannager) unGzipBase64(message string) interface{} {
var messageStruct interface{}
gzipByte, err := base64.URLEncoding.DecodeString(message)
if err != nil {
log.Println(err)
}
reader := bytes.NewReader(gzipByte)
gzipReader, _ := gzip.NewReader(reader)
defer gzipReader.Close()
jsonByte, ... | [
-0.48032188415527344,
-0.620352566242218,
0.7275700569152832,
-0.33102476596832275,
-0.7292042970657349,
-0.23253662884235382,
0.07090970128774643,
0.24986803531646729,
-0.2664211094379425,
0.42523193359375,
-0.32049325108528137,
0.257870078086853,
-1.4669296741485596,
-0.09938112646341324... |
func getCertificateFromLibraryById(client *Client, id string, additionalHeader map[string]string) (*Certificate, error) {
endpoint, err := getEndpointByVersion(client)
if err != nil {
return nil, err
}
minimumApiVersion, err := client.checkOpenApiEndpointCompatibility(endpoint)
if err != nil {
return nil, err
... | [
0.240216925740242,
-1.2933297157287598,
0.2536165714263916,
-0.17222556471824646,
-0.6872715950012207,
0.00953336339443922,
-0.6039021015167236,
-0.37868866324424744,
0.15217441320419312,
0.2809205949306488,
-0.4749670624732971,
-0.3341820240020752,
-1.3773088455200195,
0.07560529559850693... |
func (client *Client) GetCertificateFromLibraryById(id string) (*Certificate, error) {
return getCertificateFromLibraryById(client, id, nil)
} | [
0.7182894945144653,
-0.8758588433265686,
-0.1112806499004364,
-0.013845863752067089,
-0.3249800503253937,
-0.3445183038711548,
-0.27073806524276733,
-0.5021626353263855,
-0.09380707889795303,
0.012476878240704536,
-0.7099534869194031,
-0.7420690655708313,
-1.377570629119873,
0.675569236278... |
func (adminOrg *AdminOrg) GetCertificateFromLibraryById(id string) (*Certificate, error) {
tenantContext, err := adminOrg.getTenantContext()
if err != nil {
return nil, err
}
return getCertificateFromLibraryById(adminOrg.client, id, getTenantContextHeader(tenantContext))
} | [
0.6116678714752197,
-0.7563630938529968,
-0.018616462126374245,
-0.18226151168346405,
-0.2677198052406311,
-0.07088156044483185,
-0.31372085213661194,
-0.8284921050071716,
0.2007351517677307,
0.4477745294570923,
-0.39997440576553345,
-0.11487914621829987,
-1.3173538446426392,
0.57660382986... |
func addCertificateToLibrary(client *Client, certificateConfig *types.CertificateLibraryItem,
additionalHeader map[string]string) (*Certificate, error) {
endpoint := types.OpenApiPathVersion1_0_0 + types.OpenApiEndpointSSLCertificateLibrary
apiVersion, err := client.checkOpenApiEndpointCompatibility(endpoint)
if er... | [
-0.9177756309509277,
-1.1562737226486206,
0.5568588376045227,
-0.5649505853652954,
-0.20630699396133423,
0.5253502130508423,
-0.17285577952861786,
0.25042396783828735,
0.24277713894844055,
0.20464791357517242,
-0.2761871814727783,
-0.5790494680404663,
-1.2723381519317627,
0.132491677999496... |
func (adminOrg *AdminOrg) AddCertificateToLibrary(certificateConfig *types.CertificateLibraryItem) (*Certificate, error) {
tenantContext, err := adminOrg.getTenantContext()
if err != nil {
return nil, err
}
return addCertificateToLibrary(adminOrg.client, certificateConfig, getTenantContextHeader(tenantContext))
} | [
-0.5437625646591187,
-0.47372931241989136,
0.43249258399009705,
-0.19509024918079376,
0.08420097827911377,
0.8156448006629944,
0.2532494366168976,
-0.09954310208559036,
0.17024537920951843,
0.49318617582321167,
-0.054193880409002304,
-0.42226240038871765,
-0.9731053113937378,
0.40584272146... |
func (client *Client) AddCertificateToLibrary(certificateConfig *types.CertificateLibraryItem) (*Certificate, error) {
return addCertificateToLibrary(client, certificateConfig, nil)
} | [
-0.7613924741744995,
-0.43574661016464233,
0.34404799342155457,
-0.12011311203241348,
0.0005932339117862284,
0.8225409984588623,
0.35200607776641846,
0.3585362136363983,
0.06578876078128815,
-0.16303648054599762,
-0.2936020791530609,
-0.8588685989379883,
-0.9667883515357971,
0.599103212356... |
func getAllCertificateFromLibrary(client *Client, queryParameters url.Values, additionalHeader map[string]string) ([]*Certificate, error) {
endpoint := types.OpenApiPathVersion1_0_0 + types.OpenApiEndpointSSLCertificateLibrary
apiVersion, err := client.getOpenApiHighestElevatedVersion(endpoint)
if err != nil {
ret... | [
-0.18694968521595,
-1.1931310892105103,
0.5133700966835022,
0.6126481294631958,
-0.4175845980644226,
0.3867606520652771,
-0.7484100461006165,
0.017015837132930756,
0.15855592489242554,
0.11387571692466736,
-0.1522531658411026,
0.19477824866771698,
-0.6177118420600891,
0.48246780037879944,
... |
func (client *Client) GetAllCertificatesFromLibrary(queryParameters url.Values) ([]*Certificate, error) {
return getAllCertificateFromLibrary(client, queryParameters, nil)
} | [
-0.2228829264640808,
-0.4951260983943939,
0.1439308077096939,
0.9378936886787415,
-0.4154171049594879,
-0.12811975181102753,
0.01590605080127716,
-0.09002550691366196,
-0.2764906883239746,
-0.2574399709701538,
-0.32817885279655457,
-0.2596396207809448,
-1.4183671474456787,
1.11995387077331... |
func (adminOrg *AdminOrg) GetAllCertificatesFromLibrary(queryParameters url.Values) ([]*Certificate, error) {
tenantContext, err := adminOrg.getTenantContext()
if err != nil {
return nil, err
}
return getAllCertificateFromLibrary(adminOrg.client, queryParameters, getTenantContextHeader(tenantContext))
} | [
-0.05984223634004593,
-0.5390337705612183,
0.23548266291618347,
0.7283491492271423,
-0.2360687106847763,
0.11021988838911057,
-0.09076742082834244,
-0.5419045090675354,
-0.056736160069704056,
0.1098640039563179,
-0.20871011912822723,
0.2995537221431732,
-1.3885016441345215,
0.9604539275169... |
func getCertificateFromLibraryByName(client *Client, name string, additionalHeader map[string]string) (*Certificate, error) {
slowSearch, params := shouldDoSlowSearch("alias", name)
var foundCertificates []*Certificate
certificates, err := getAllCertificateFromLibrary(client, params, additionalHeader)
if err != ni... | [
0.4020766615867615,
-0.7827001214027405,
0.6077002286911011,
0.03465074300765991,
-0.6160386800765991,
-0.5804879665374756,
-0.19374018907546997,
-0.5610565543174744,
-0.2807193994522095,
0.6927212476730347,
-0.31214097142219543,
-0.765855610370636,
-0.8800477981567383,
0.772236704826355,
... |
func (client *Client) GetCertificateFromLibraryByName(name string) (*Certificate, error) {
return getCertificateFromLibraryByName(client, name, nil)
} | [
0.5286933183670044,
-0.7782113552093506,
0.15901602804660797,
-0.012442502193152905,
-0.7266101241111755,
-0.6013619303703308,
-0.1085793524980545,
-0.5855918526649475,
-0.5665708780288696,
0.5211216807365417,
-0.9075090885162354,
-1.0299354791641235,
-1.4655331373214722,
0.537765026092529... |
func (adminOrg *AdminOrg) GetCertificateFromLibraryByName(name string) (*Certificate, error) {
tenantContext, err := adminOrg.getTenantContext()
if err != nil {
return nil, err
}
return getCertificateFromLibraryByName(adminOrg.client, name, getTenantContextHeader(tenantContext))
} | [
0.4701470732688904,
-0.6154972910881042,
0.20075765252113342,
-0.1427186280488968,
-0.49124377965927124,
-0.22984358668327332,
-0.21822084486484528,
-0.8972449898719788,
-0.19354616105556488,
0.8900732398033142,
-0.6098852157592773,
-0.3779146671295166,
-1.3845913410186768,
0.3415836989879... |
func (certificate *Certificate) Update() (*Certificate, error) {
endpoint, err := getEndpointByVersion(certificate.client)
if err != nil {
return nil, err
}
minimumApiVersion, err := certificate.client.checkOpenApiEndpointCompatibility(endpoint)
if err != nil {
return nil, err
}
if certificate.CertificateLi... | [
-0.4566449224948883,
-1.0918636322021484,
0.5015506148338318,
0.07454673200845718,
-0.8798395991325378,
0.12561623752117157,
-0.8115376830101013,
0.318977952003479,
0.2909435033798218,
0.311399906873703,
-0.08485186100006104,
-0.40866541862487793,
-1.5857511758804321,
-0.8234314918518066,
... |
func (certificate *Certificate) Delete() error {
endpoint, err := getEndpointByVersion(certificate.client)
if err != nil {
return err
}
minimumApiVersion, err := certificate.client.checkOpenApiEndpointCompatibility(endpoint)
if err != nil {
return err
}
if certificate.CertificateLibrary.Id == "" {
return ... | [
0.0692610815167427,
-0.28598347306251526,
0.7709969282150269,
0.49755042791366577,
0.3482604920864105,
0.32486286759376526,
-0.2631659507751465,
0.6137212514877319,
0.06887311488389969,
0.5186595916748047,
-0.30472949147224426,
-0.12184161692857742,
-1.5528308153152466,
-0.1637743264436721... |
func testEval(input string) object.Object {
l := lexer.New(input)
p := parser.New(l)
program := p.ParseProgram()
env := object.NewEnvironment()
return Eval(program, env)
} | [
0.7199010848999023,
-1.1419386863708496,
0.7296919226646423,
-0.2937886416912079,
-0.8370994329452515,
1.2465115785598755,
-0.0564127117395401,
0.14063481986522675,
-0.10808594524860382,
-0.7335371375083923,
-0.49066412448883057,
0.5582582950592041,
-0.764790415763855,
-0.28829601407051086... |
func (s UpdateConfigurationInput) String() string {
return awsutil.Prettify(s)
} | [
-0.3637308180332184,
-0.34545695781707764,
0.1692233830690384,
-0.2858707904815674,
-1.0569090843200684,
0.9555869102478027,
0.6862366795539856,
-0.40964141488075256,
0.2588767111301422,
0.615881621837616,
0.07832802087068558,
0.09272310137748718,
0.02340446040034294,
-0.4016282856464386,
... |
func (s *UpdateConfigurationInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "UpdateConfigurationInput"}
if s.ConfigurationId == nil {
invalidParams.Add(aws.NewErrParamRequired("ConfigurationId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
} | [
-1.1460720300674438,
0.13016612827777863,
0.5377221703529358,
0.48831090331077576,
-0.43496939539909363,
0.31703636050224304,
0.251422643661499,
0.18600207567214966,
-0.08981488645076752,
0.8665210008621216,
0.5445340275764465,
-0.7403554916381836,
-0.9457591772079468,
0.9055315852165222,
... |
func (s UpdateConfigurationInput) MarshalFields(e protocol.FieldEncoder) error {
e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue("application/json"), protocol.Metadata{})
if s.Data != nil {
v := *s.Data
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "data", protocol.Quo... | [
-0.44360554218292236,
0.05479494109749794,
0.46708568930625916,
-0.8519218564033508,
-0.23776142299175262,
0.4505213499069214,
0.08193700760602951,
0.16627690196037292,
-0.0605122447013855,
0.5491781234741211,
-0.3331686854362488,
-0.16024872660636902,
-0.7002785801887512,
-0.1453537046909... |
func (s UpdateConfigurationOutput) String() string {
return awsutil.Prettify(s)
} | [
0.2703092694282532,
-0.7406341433525085,
0.20356020331382751,
-0.31490540504455566,
-1.311910629272461,
0.11140566319227219,
0.6760371327400208,
-0.3865203559398651,
-0.18885155022144318,
0.3915456235408783,
0.17513979971408844,
-0.16625086963176727,
0.32926735281944275,
-0.459792375564575... |
func (s UpdateConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error {
if s.Arn != nil {
v := *s.Arn
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "arn", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.Created != nil {
v := *s.Created
metadata ... | [
-0.23318880796432495,
-0.35177525877952576,
0.5302046537399292,
-0.9435976147651672,
0.07589226216077805,
0.038047075271606445,
-0.18601834774017334,
0.10639434307813644,
-0.08095228672027588,
0.07386873662471771,
-0.4245773255825043,
0.06287653744220734,
-0.24395963549613953,
-0.128327697... |
func (r UpdateConfigurationRequest) Send(ctx context.Context) (*UpdateConfigurationResponse, error) {
r.Request.SetContext(ctx)
err := r.Request.Send()
if err != nil {
return nil, err
}
resp := &UpdateConfigurationResponse{
UpdateConfigurationOutput: r.Request.Data.(*UpdateConfigurationOutput),
response: ... | [
-1.7790172100067139,
-0.3347375690937042,
0.4479592442512512,
0.29976025223731995,
-0.5298731327056885,
-0.4460532069206238,
0.29384222626686096,
-0.6735775470733643,
0.5068845152854919,
0.3485165238380432,
-0.634037435054779,
0.31620097160339355,
-0.33215081691741943,
-0.01998615078628063... |
func (r *UpdateConfigurationResponse) SDKResponseMetdata() *aws.Response {
return r.response
} | [
-0.9135540127754211,
-0.5377210378646851,
0.37412288784980774,
-0.10203135013580322,
-0.787090539932251,
0.20238234102725983,
-0.19678664207458496,
-0.04381908103823662,
0.9558931589126587,
0.6501703858375549,
-0.5435664057731628,
-0.9386616349220276,
0.005782575346529484,
-0.9891579747200... |
func (v *visitor) VisitLetStatementTree(ctx *parser.LetStatementTreeContext) interface{} {
hasError := false
children := []map[string]interface{}{}
children = append(children, childNode(ctx.LET().GetText(), terminalColor))
if ctx.LetIdent() != nil {
node := v.Visit(ctx.LetIdent())
if n, ok := node.(*visitResp... | [
-0.8481080532073975,
-0.9617445468902588,
1.0053972005844116,
-1.1702078580856323,
-0.7838571071624756,
0.26590821146965027,
0.019619256258010864,
-0.34858545660972595,
0.385464072227478,
1.1216320991516113,
0.3418028950691223,
-0.3218035101890564,
-0.2135397046804428,
1.123488426208496,
... |
func (e *Error) Equals(b *Error) bool {
switch {
case e == nil || b == nil:
return false
case e == b:
return true
case e.Code != b.Code:
return false
case e.Msg != b.Msg:
return false
case (e.Time == nil && b.Time != nil) || (e.Time != nil && b.Time == nil):
return false
case e.Time != nil && b.Time !=... | [
-1.2081717252731323,
-0.4647696316242218,
0.6110620498657227,
-0.1173698902130127,
0.77323317527771,
-0.563926637172699,
-1.166953444480896,
-0.10904345661401749,
0.5627166032791138,
0.389038622379303,
-0.7610967755317688,
0.6439483761787415,
-0.2547122538089752,
0.8068010807037354,
0.10... |
func (s *Supplier) UnmarshalJSON(data []byte) error {
// the value is just a string presented as a slice of bytes
supplierStr := string(data)
supplierStr = strings.Trim(supplierStr, "\"")
if supplierStr == "NOASSERTION" {
s.Supplier = supplierStr
return nil
}
supplierFields := strings.SplitN(supplierStr, ":... | [
-0.6518151164054871,
-0.11869821697473526,
0.49863895773887634,
-1.1743316650390625,
-1.3827868700027466,
-0.7802069187164307,
0.06403946876525879,
0.8638691306114197,
0.28757673501968384,
0.3486695885658264,
-0.7485138773918152,
0.7127028703689575,
-0.4516535699367523,
0.37126046419143677... |
func (s Supplier) MarshalJSON() ([]byte, error) {
if s.Supplier == "NOASSERTION" {
return json.Marshal(s.Supplier)
} else if s.SupplierType != "" && s.Supplier != "" {
return json.Marshal(fmt.Sprintf("%s: %s", s.SupplierType, s.Supplier))
}
return []byte{}, fmt.Errorf("failed to marshal invalid Supplier: %+v",... | [
-0.6391682624816895,
-0.42222893238067627,
0.27756574749946594,
0.2428760677576065,
-1.067966103553772,
-0.5078358054161072,
-0.08785541355609894,
0.8325691819190979,
0.9339178204536438,
0.23666426539421082,
-0.5223878622055054,
1.4869879484176636,
-0.11925085633993149,
1.0760236978530884,... |
func (o *Originator) UnmarshalJSON(data []byte) error {
// the value is just a string presented as a slice of bytes
originatorStr := string(data)
originatorStr = strings.Trim(originatorStr, "\"")
if originatorStr == "NOASSERTION" {
o.Originator = originatorStr
return nil
}
originatorFields := strings.SplitN... | [
-0.3207722306251526,
-0.31910696625709534,
0.5773348808288574,
-1.1554763317108154,
-1.5544625520706177,
-0.4574197828769684,
0.19015902280807495,
1.4760942459106445,
0.3196941316127777,
0.10513807088136673,
0.1698656678199768,
0.6007710099220276,
-0.641143262386322,
0.10348290950059891,
... |
func (o Originator) MarshalJSON() ([]byte, error) {
if o.Originator == "NOASSERTION" {
return json.Marshal(o.Originator)
} else if o.Originator != "" {
return json.Marshal(fmt.Sprintf("%s: %s", o.OriginatorType, o.Originator))
}
return []byte{}, nil
} | [
-0.1679801493883133,
-0.4804724454879761,
0.2971232831478119,
-0.16400329768657684,
-1.1020877361297607,
-0.13840900361537933,
0.3771325647830963,
1.2747563123703003,
0.7310017347335815,
0.06908389180898666,
0.2531733512878418,
1.5322624444961548,
-0.26854610443115234,
1.0780447721481323,
... |
func (mt *RankdbBackupStatus) Validate() (err error) {
if mt.Storage == "" {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "storage"))
}
if mt.URI == "" {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "uri"))
}
return
} | [
0.2791544497013092,
-0.09284985810518265,
0.453989177942276,
0.3738675117492676,
0.3210340440273285,
0.3445145785808563,
0.0011722478084266186,
0.16165399551391602,
-0.65403151512146,
0.06628897041082382,
0.19089391827583313,
-0.5180668234825134,
-0.4243869185447693,
0.2217787653207779,
... |
func (mt *RankdbBackupStatusFull) Validate() (err error) {
if mt.Storage == "" {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "storage"))
}
if mt.URI == "" {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "uri"))
}
return
} | [
0.7236254811286926,
0.04798885062336922,
0.6572640538215637,
0.5974502563476562,
-0.06355651468038559,
0.44903653860092163,
-0.053713057190179825,
0.33555176854133606,
-0.5155831575393677,
0.5147925615310669,
-0.07643937319517136,
-1.0287070274353027,
-0.08722857385873795,
0.35424602031707... |
func (mt *RankdbBackupStatusTiny) Validate() (err error) {
if mt.URI == "" {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "uri"))
}
return
} | [
0.1555618941783905,
0.2827337682247162,
0.6704196333885193,
0.722425639629364,
0.8294318318367004,
0.12827862799167633,
0.3712719678878784,
-0.46288779377937317,
-0.5662055015563965,
-0.3644118010997772,
0.32765939831733704,
-0.9820701479911804,
-0.7472298741340637,
-0.15593884885311127,
... |
func (mt *RankdbCallback) Validate() (err error) {
if mt.ID == "" {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "id"))
}
if mt.CallbackURL == "" {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "callback_url"))
}
return
} | [
-0.12203921377658844,
-0.08995980024337769,
0.3676251471042633,
0.16213780641555786,
0.7668059468269348,
0.39681339263916016,
0.16249167919158936,
-0.4494454860687256,
-0.04811268672347069,
-0.315445214509964,
0.33471420407295227,
-0.2080504298210144,
-1.2538015842437744,
1.229676604270935... |
func (mt *RankdbElement) Validate() (err error) {
if mt.ListID == "" {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "list_id"))
}
if mt.Payload == nil {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "payload"))
}
if mt.ID < 0 {
err = goa.MergeErrors(err, goa.InvalidRa... | [
-0.4796455204486847,
-0.22714853286743164,
0.7550562620162964,
0.3644500970840454,
0.1547018438577652,
0.30169612169265747,
0.4024137258529663,
-0.7013643383979797,
-0.12857170403003693,
-0.05448860302567482,
0.19372451305389404,
-0.12361110746860504,
-0.5914298892021179,
0.874881088733673... |
func (mt *RankdbElementFull) Validate() (err error) {
if mt.ListID == "" {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "list_id"))
}
if mt.Payload == nil {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "payload"))
}
if mt.ID < 0 {
err = goa.MergeErrors(err, goa.Inval... | [
-0.24668291211128235,
-0.32195669412612915,
0.8536666035652161,
0.09408842027187347,
-0.11515363305807114,
0.6544929146766663,
0.27174127101898193,
-0.7189552783966064,
-0.2162202149629593,
0.29571008682250977,
-0.09734459966421127,
-0.1033724844455719,
-0.3081248104572296,
0.8641721010208... |
func (mt *RankdbElementFullUpdate) Validate() (err error) {
if mt.ListID == "" {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "list_id"))
}
if mt.Payload == nil {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "payload"))
}
if mt.ID < 0 {
err = goa.MergeErrors(err, goa... | [
-0.20060010254383087,
-0.3618876338005066,
0.7945234775543213,
-0.08945507556200027,
-0.6385812759399414,
0.20759442448616028,
0.33433476090431213,
-0.6031684279441833,
-0.2922658920288086,
0.17524071037769318,
0.17720246315002441,
-0.04436081275343895,
-0.4315418601036072,
0.7498621940612... |
func (mt *RankdbElementTiny) Validate() (err error) {
if mt.Payload == nil {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "payload"))
}
if mt.ID < 0 {
err = goa.MergeErrors(err, goa.InvalidRangeError(`response.id`, mt.ID, 0, true))
}
if mt.Score < 0 {
err = goa.MergeErrors(err, goa.Inval... | [
-0.6210020184516907,
-0.2582438588142395,
0.6176722645759583,
-0.2254907190799713,
0.8080649971961975,
0.16896966099739075,
0.09897033870220184,
-1.4168457984924316,
-0.2917381525039673,
-0.06482722610235214,
0.06852959096431732,
-0.1349981278181076,
-1.0201420783996582,
0.3957670032978058... |
func (mt RankdbElementCollection) Validate() (err error) {
for _, e := range mt {
if e != nil {
if err2 := e.Validate(); err2 != nil {
err = goa.MergeErrors(err, err2)
}
}
}
return
} | [
-0.9656295776367188,
-0.2858628034591675,
0.6107417941093445,
0.8633713126182556,
1.0209002494812012,
0.7356764078140259,
0.6908558011054993,
-0.4935217499732971,
-0.9929806590080261,
0.26473262906074524,
0.5414490103721619,
-0.2499278038740158,
-0.937142550945282,
1.9990485906600952,
-0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.