text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (r resourceFactory) getResourceDataOKExists(schemaDefinitionPropertyName string, resourceLocalData *schema.ResourceData) (interface{}, bool) {
resourceSchema, _ := r.openAPIResource.getResourceSchema()
schemaDefinitionProperty, err := resourceSchema.getProperty(schemaDefinitionPropertyName)
if err != nil {
re... | [
-0.34416359663009644,
-0.9263581037521362,
0.6666197776794434,
-0.7154588103294373,
-0.3145279288291931,
0.3056568205356598,
-0.2734569311141968,
1.1041830778121948,
-0.3779394328594208,
-0.2892500162124634,
-0.3336336314678192,
0.02879198081791401,
0.45567959547042847,
-0.3517946302890777... |
func (r resourceFactory) setResourceDataProperty(schemaDefinitionPropertyName string, value interface{}, resourceLocalData *schema.ResourceData) error {
resourceSchema, _ := r.openAPIResource.getResourceSchema()
schemaDefinitionProperty, err := resourceSchema.getProperty(schemaDefinitionPropertyName)
if err != nil {... | [
-0.18619969487190247,
-0.9318384528160095,
0.40882155299186707,
-0.774198591709137,
-0.45450979471206665,
0.8268266320228577,
-0.13328473269939423,
0.44451868534088135,
0.06709758192300797,
-0.07538814842700958,
-0.14298157393932343,
0.008855815976858139,
0.06977763772010803,
-0.3230933547... |
func fibRecur(n int) int {
if n == 0 {
return 0
}
if n <= 2 {
return 1
}
return fibRecur(n-1) + fibRecur(n-2)
} | [
-0.29044684767723083,
0.264730304479599,
0.4368516802787781,
0.3691217303276062,
-0.3928339183330536,
-0.5330776572227478,
0.10600941628217697,
-0.2202567160129547,
0.01871555671095848,
-0.5244187116622925,
-0.18964874744415283,
0.2554525136947632,
-0.009313042275607586,
1.5275766849517822... |
func SendResourceNotFound(c *gin.Context) {
SendMessages(c, http.StatusNotFound, "The specified resource was not found.")
} | [
-0.22628673911094666,
-0.9215862154960632,
0.06902468949556351,
0.24047070741653442,
0.21850892901420593,
0.5961783528327942,
0.7326650619506836,
-0.4467236399650574,
0.03670581430196762,
0.37268802523612976,
-0.14080440998077393,
0.4787403345108032,
0.6200962066650391,
0.7873166799545288,... |
func SendValidationMessages(c *gin.Context, errors *validator.StructErrors, object interface{}) {
var fields []string
for fieldName := range errors.Errors {
field, _ := reflect.TypeOf(object).Elem().FieldByName(fieldName)
fields = append(fields, field.Tag.Get("json"))
}
c.JSON(http.StatusBadRequest, gin.H{
... | [
-1.6486042737960815,
-0.26542916893959045,
0.6458340883255005,
0.8617256283760071,
0.29137173295021057,
-0.06129693612456322,
-0.13896989822387695,
-1.3980951309204102,
-0.3284851014614105,
1.0127041339874268,
-1.275754451751709,
0.26652640104293823,
0.4436575174331665,
0.7222940325737,
... |
func SendInvalidInputMessages(c *gin.Context, messages ...string) {
SendMessages(c, http.StatusBadRequest, messages...)
} | [
-1.426579475402832,
-0.7706129550933838,
0.29659005999565125,
1.0218387842178345,
0.3427093029022217,
1.2498810291290283,
0.3564012348651886,
-0.8450298309326172,
-0.006248580291867256,
-0.7644249796867371,
-0.06953536719083786,
0.19583772122859955,
-1.2995648384094238,
0.9871111512184143,... |
func SendMessages(c *gin.Context, code int, messages ...string) {
status := "success"
if code != http.StatusOK {
status = "error"
}
c.JSON(code, gin.H{
"status": status,
"messages": messages,
})
} | [
-1.1234139204025269,
0.2957606613636017,
0.50871741771698,
0.4812483787536621,
0.5718258619308472,
0.18783991038799286,
-0.04087192192673683,
-0.6586440801620483,
-0.41319558024406433,
0.8474467992782593,
-0.5300214886665344,
-0.6590109467506409,
-0.14578840136528015,
0.7005294561386108,
... |
func SendSingleResource(c *gin.Context, name string, instance interface{}) {
c.JSON(200, gin.H{
"status": "success",
name: instance,
})
} | [
-0.6945057511329651,
-0.3324834406375885,
0.5961814522743225,
-0.3957611322402954,
-0.6591883897781372,
0.44573265314102173,
0.26878416538238525,
-0.043099623173475266,
0.4544292986392975,
0.9127441048622131,
-1.12356698513031,
0.23326405882835388,
-0.00887769553810358,
0.6886791586875916,... |
func (l *logStashFormatter) Format(entry *log.Entry) ([]byte, error) {
return []byte(
fmt.Sprintf("%s - fees_service - %s - %s",
entry.Time.Format(l.TimestampFormat),
strings.ToUpper(entry.Level.String()),
entry.Message),
), nil
} | [
0.6397117972373962,
-0.03374355658888817,
0.48198649287223816,
-0.7179573774337769,
-0.20607228577136993,
-0.8117163777351379,
-0.5067042112350464,
-0.8549542427062988,
0.18297778069972992,
-0.011660357937216759,
0.5280413031578064,
0.7009211778640747,
0.8584898114204407,
1.309053540229797... |
func init() {
logger = &log.Logger{
Out: os.Stdout,
Level: log.DebugLevel,
Formatter: &logStashFormatter{log.TextFormatter{
TimestampFormat: "2006-01-02 15:04:05",
FullTimestamp: true},
},
}
} | [
0.8469409942626953,
-1.1401447057724,
0.7708329558372498,
-0.46113744378089905,
-0.35401082038879395,
-0.15232793986797333,
-0.5535938143730164,
0.10184862464666367,
-0.2622182369232178,
-0.5596888661384583,
-0.4192981421947479,
0.34847474098205566,
1.2089760303497314,
1.1174852848052979,
... |
func (c *Config) BindAddress() string {
return c.Address
} | [
0.18541377782821655,
-1.4934030771255493,
0.5518696308135986,
0.27214890718460083,
0.30399999022483826,
0.7736308574676514,
0.17716948688030243,
1.1710264682769775,
0.6528878808021545,
-0.6441769599914551,
-0.05859767645597458,
0.9476832151412964,
-0.5481047630310059,
0.6215031743049622,
... |
func (c *Config) DataDSN() string {
return c.DSN
} | [
-0.12268780171871185,
-0.24415962398052216,
0.23044350743293762,
-0.40290990471839905,
-0.08566415309906006,
-0.22113129496574402,
-0.9631309509277344,
0.7622758150100708,
0.2937958538532257,
-1.49666428565979,
-1.7363933324813843,
1.0459901094436646,
0.9441575407981873,
0.1431942731142044... |
func (cli *ChainClient) DeployContract(contract []byte, opts *TransactOpts) (contractAddr *types.Address, err error) {
if len(contract) == 0 {
return nil, fmt.Errorf("can't deploy empty contract")
}
from, err := cli.privateKey.PublicKey().Address()
if err != nil {
return nil, err
}
td := &pb.TransactionData... | [
-0.33028608560562134,
0.15226009488105774,
1.1105741262435913,
-0.20887471735477448,
-0.12576159834861755,
-0.25752726197242737,
-0.34952661395072937,
-0.2634925842285156,
-0.07861332595348358,
0.8116077780723572,
-0.03559310734272003,
0.6634256839752197,
-1.3336639404296875,
-0.6728746294... |
func (cli *ChainClient) InvokeContract(vmType pb.TransactionData_VMType, address *types.Address, method string,
opts *TransactOpts, args ...*pb.Arg) (*pb.Receipt, error) {
pk := cli.privateKey
if opts != nil {
if opts.PrivKey != nil {
pk = opts.PrivKey
addr, _ := pk.PublicKey().Address()
opts.From = addr.... | [
0.09361102432012558,
0.40374645590782166,
1.282475471496582,
-0.4047583043575287,
-0.4083832800388336,
-0.32863545417785645,
-0.7547737956047058,
-0.2045072317123413,
-0.36337947845458984,
0.5235775113105774,
0.2792954444885254,
1.3045862913131714,
-0.575143575668335,
-0.16430476307868958,... |
func NewPrintConnector()(*PrintConnector) {
m := &PrintConnector{
Entity: *NewEntity(),
}
return m
} | [
-0.4834584891796112,
-1.0549994707107544,
0.3774740695953369,
0.09804898500442505,
-0.8838953971862793,
-0.670474648475647,
-0.7618757486343384,
0.061992205679416656,
0.14739561080932617,
-0.36836615204811096,
0.3210207521915436,
0.4684160649776459,
0.21007095277309418,
0.6218290328979492,... |
func CreatePrintConnectorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewPrintConnector(), nil
} | [
0.2371424287557602,
-1.1294735670089722,
0.6625785827636719,
-0.2124718427658081,
-1.0422096252441406,
0.18899472057819366,
-0.08029300719499588,
-0.023360850289463997,
0.3444470465183258,
-0.6038195490837097,
0.6704022884368896,
0.6099560856819153,
-0.11792389303445816,
0.4348373115062713... |
func (m *PrintConnector) GetAppVersion()(*string) {
val, err := m.GetBackingStore().Get("appVersion")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
} | [
0.5958397388458252,
-0.19728802144527435,
0.2282954901456833,
1.000738501548767,
-0.030337322503328323,
0.36482304334640503,
0.2302989959716797,
-0.5878400802612305,
0.37583035230636597,
-0.5541200637817383,
0.6167137026786804,
-0.8622603416442871,
-0.4967935383319855,
0.08010733872652054,... |
func (m *PrintConnector) GetDisplayName()(*string) {
val, err := m.GetBackingStore().Get("displayName")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
} | [
0.3904248774051666,
-0.33227959275245667,
0.6484751105308533,
0.9485947489738464,
-0.10057710111141205,
-0.011797395534813404,
-0.07018239051103592,
-0.32042980194091797,
0.4201820194721222,
-0.35544493794441223,
0.6867344379425049,
-0.6165412068367004,
-0.7003571391105652,
0.0010732506634... |
func (m *PrintConnector) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := m.Entity.GetFieldDeserializers()
res["appVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
... | [
0.10006901621818542,
-0.25554919242858887,
0.7552905678749084,
-0.9643623232841492,
-0.3309398293495178,
-0.48393791913986206,
0.26146161556243896,
-0.2698591649532318,
-0.8866464495658875,
-0.9932070374488831,
-0.5301021933555603,
0.3169409930706024,
-0.8870641589164734,
0.539418816566467... |
func (m *PrintConnector) GetFullyQualifiedDomainName()(*string) {
val, err := m.GetBackingStore().Get("fullyQualifiedDomainName")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
} | [
-0.14792367815971375,
0.3326846957206726,
0.0849757120013237,
0.9693277478218079,
-0.266987144947052,
-0.033428966999053955,
-0.6500073671340942,
-0.06326178461313248,
-0.17916996777057648,
-1.0411971807479858,
-0.35624629259109497,
-0.008673442527651787,
-0.17519915103912354,
0.6555571556... |
func (m *PrintConnector) GetLocation()(PrinterLocationable) {
val, err := m.GetBackingStore().Get("location")
if err != nil {
panic(err)
}
if val != nil {
return val.(PrinterLocationable)
}
return nil
} | [
0.1804792284965515,
-0.527022659778595,
0.2785879075527191,
0.8711797595024109,
0.4477439224720001,
0.23084807395935059,
0.9310264587402344,
-0.33971065282821655,
0.14124009013175964,
-0.302478164434433,
0.8623179793357849,
-0.5196545720100403,
-0.9067848324775696,
-0.6125435829162598,
0... |
func (m *PrintConnector) GetOperatingSystem()(*string) {
val, err := m.GetBackingStore().Get("operatingSystem")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
} | [
-0.5981414318084717,
0.0919373482465744,
0.11029116064310074,
0.4054644703865051,
0.23079638183116913,
0.3417902886867523,
-0.11109240353107452,
-0.9660953879356384,
0.32336917519569397,
-0.876764714717865,
1.1942638158798218,
-0.47444090247154236,
-0.7456755042076111,
-0.6811352968215942,... |
func (m *PrintConnector) GetRegisteredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
val, err := m.GetBackingStore().Get("registeredDateTime")
if err != nil {
panic(err)
}
if val != nil {
return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fe... | [
0.017857398837804794,
0.8368582129478455,
0.7452664971351624,
0.22632236778736115,
0.7022691965103149,
-0.17584532499313354,
0.26574233174324036,
0.3303917646408081,
-0.1439923793077469,
-0.6066081523895264,
-0.35673269629478455,
0.17952068150043488,
-0.9409374594688416,
0.1697337627410888... |
func (m *PrintConnector) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
err := m.Entity.Serialize(writer)
if err != nil {
return err
}
{
err = writer.WriteStringValue("appVersion", m.GetAppVersion())
if err != nil ... | [
-0.7605695724487305,
-0.2163141369819641,
0.7311907410621643,
-0.2516889274120331,
0.11616409569978714,
-0.38692164421081543,
0.13622629642486572,
-0.42355483770370483,
-0.30509650707244873,
-0.22869402170181274,
0.14427120983600616,
0.08400874584913254,
-0.5911835432052612,
0.891087114810... |
func (m *PrintConnector) SetAppVersion(value *string)() {
err := m.GetBackingStore().Set("appVersion", value)
if err != nil {
panic(err)
}
} | [
0.29020559787750244,
-0.17516495287418365,
0.243704155087471,
0.8017138838768005,
-0.2641122341156006,
0.5938127040863037,
0.2932303547859192,
-0.2447187751531601,
-0.42866554856300354,
-0.49149948358535767,
0.01049790158867836,
-1.3094186782836914,
-0.21541398763656616,
0.5756587386131287... |
func (m *PrintConnector) SetDisplayName(value *string)() {
err := m.GetBackingStore().Set("displayName", value)
if err != nil {
panic(err)
}
} | [
-0.17223301529884338,
-0.2738538384437561,
0.40145576000213623,
0.8502781987190247,
-0.5317440629005432,
0.5134729146957397,
0.15901969373226166,
-0.495254784822464,
0.056935835629701614,
-0.026644689962267876,
-0.0645819753408432,
-1.2973369359970093,
-0.47806403040885925,
0.2816640436649... |
func (m *PrintConnector) SetFullyQualifiedDomainName(value *string)() {
err := m.GetBackingStore().Set("fullyQualifiedDomainName", value)
if err != nil {
panic(err)
}
} | [
-0.648349940776825,
0.3877060115337372,
0.02062329463660717,
0.6669909358024597,
-0.1848301738500595,
-0.22498995065689087,
-0.23901806771755219,
-0.22499211132526398,
-0.5358747243881226,
-0.6220155358314514,
-0.7060592770576477,
-0.5110112428665161,
0.04821333661675453,
0.858793258666992... |
func (m *PrintConnector) SetLocation(value PrinterLocationable)() {
err := m.GetBackingStore().Set("location", value)
if err != nil {
panic(err)
}
} | [
-0.20028626918792725,
-0.19159837067127228,
-0.13481822609901428,
0.7990468144416809,
0.1480017900466919,
0.9062022566795349,
0.8911799788475037,
-0.04104771092534065,
-0.19966034591197968,
-0.2601727843284607,
0.4076908826828003,
-1.0738979578018188,
-0.4455622434616089,
-0.13924258947372... |
func (m *PrintConnector) SetOperatingSystem(value *string)() {
err := m.GetBackingStore().Set("operatingSystem", value)
if err != nil {
panic(err)
}
} | [
-0.9229223728179932,
0.2865695357322693,
-0.02638028748333454,
0.4026855230331421,
0.03295518085360527,
0.7232859134674072,
0.2685023248195648,
-0.8800423741340637,
-0.22267954051494598,
-0.7593169808387756,
0.5805777311325073,
-0.8003125190734863,
-0.5100629329681396,
-0.093023881316185,
... |
func (m *PrintConnector) SetRegisteredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
err := m.GetBackingStore().Set("registeredDateTime", value)
if err != nil {
panic(err)
}
} | [
-0.570468008518219,
0.6801972985267639,
0.4549151062965393,
0.19011493027210236,
0.2615116834640503,
0.03487195819616318,
0.5847031474113464,
0.07200642675161362,
-0.6760629415512085,
-0.21647270023822784,
-0.9093221426010132,
-0.2360624372959137,
-0.37286657094955444,
0.4559060335159302,
... |
func newCmdCertsConfig() *cobra.Command {
cmd := &cobra.Command{
Use: "config",
Short: "Certs config",
Aliases: []string{"cfg"},
RunE: func(cmd *cobra.Command, args []string) error {
klog.Info("args is %v", args)
return nil
},
Args: cobra.NoArgs,
}
cmd.AddCommand(newCmdCertsConfigDefault())
... | [
0.6053658723831177,
-0.018770188093185425,
0.4966355860233307,
0.25366640090942383,
-0.3144136369228363,
-0.4704257547855377,
0.3441784083843231,
0.11424528062343597,
-0.3692348599433899,
0.16478894650936127,
-0.10059037804603577,
-0.48333150148391724,
0.011409119702875614,
1.6063995361328... |
func NewDowngradeCommand() *cobra.Command {
dc := &cobra.Command{
Use: "downgrade <TARGET_VERSION>",
Short: "Downgrade related commands",
}
dc.AddCommand(NewDowngradeValidateCommand())
dc.AddCommand(NewDowngradeEnableCommand())
dc.AddCommand(NewDowngradeCancelCommand())
return dc
} | [
-0.0788872018456459,
-0.7109330892562866,
0.7082691192626953,
0.49046170711517334,
0.4730989933013916,
-0.9251112341880798,
0.1762361228466034,
0.5242060422897339,
0.4524080157279968,
-1.1921507120132446,
-0.056701187044382095,
0.7913596034049988,
-0.5572726130485535,
0.6789771318435669,
... |
func NewDowngradeValidateCommand() *cobra.Command {
cc := &cobra.Command{
Use: "validate <TARGET_VERSION>",
Short: "Validate downgrade capability before starting downgrade",
Run: downgradeValidateCommandFunc,
}
return cc
} | [
0.14370174705982208,
-0.9617500901222229,
0.4430249035358429,
0.8495916724205017,
0.17427518963813782,
0.034750211983919144,
0.34119969606399536,
0.13783368468284607,
-0.17154811322689056,
-1.0949959754943848,
0.6773175597190857,
1.204777717590332,
-0.7287542223930359,
0.063792884349823,
... |
func NewDowngradeEnableCommand() *cobra.Command {
cc := &cobra.Command{
Use: "enable <TARGET_VERSION>",
Short: "Start a downgrade action to cluster",
Run: downgradeEnableCommandFunc,
}
return cc
} | [
0.48422205448150635,
-0.8794140219688416,
0.2735769748687744,
0.4907055199146271,
0.19333909451961517,
-0.19800949096679688,
0.37435007095336914,
1.07012939453125,
0.1467995047569275,
-0.17759259045124054,
-0.08025751262903214,
1.2768809795379639,
-1.439298152923584,
0.04449079930782318,
... |
func NewDowngradeCancelCommand() *cobra.Command {
cc := &cobra.Command{
Use: "cancel",
Short: "Cancel the ongoing downgrade action to cluster",
Run: downgradeCancelCommandFunc,
}
return cc
} | [
0.8448869585990906,
-1.215064525604248,
0.4670324921607971,
0.8444121479988098,
-0.3872106671333313,
0.02210857905447483,
0.45113471150398254,
0.7588931322097778,
-0.31855517625808716,
-0.32857686281204224,
0.397409588098526,
0.6607630252838135,
-0.5139033198356628,
0.13159330189228058,
... |
func downgradeValidateCommandFunc(cmd *cobra.Command, args []string) {
if len(args) < 1 {
cobrautl.ExitWithError(cobrautl.ExitBadArgs, errors.New("TARGET_VERSION not provided"))
}
if len(args) > 1 {
cobrautl.ExitWithError(cobrautl.ExitBadArgs, errors.New("too many arguments"))
}
targetVersion := args[0]
if l... | [
0.194614440202713,
-1.0183632373809814,
0.7480005025863647,
0.3722535967826843,
0.28609851002693176,
0.5002910494804382,
0.7610275745391846,
0.5330485105514526,
-0.41753265261650085,
-0.4775860607624054,
0.6651928424835205,
1.4110666513442993,
-0.6507439017295837,
0.09034572541713715,
-0... |
func downgradeEnableCommandFunc(cmd *cobra.Command, args []string) {
if len(args) < 1 {
cobrautl.ExitWithError(cobrautl.ExitBadArgs, errors.New("TARGET_VERSION not provided"))
}
if len(args) > 1 {
cobrautl.ExitWithError(cobrautl.ExitBadArgs, errors.New("too many arguments"))
}
targetVersion := args[0]
if len... | [
0.5638594627380371,
-0.711309015750885,
0.7973710298538208,
0.13140572607517242,
0.1407766342163086,
0.601140022277832,
1.1171822547912598,
1.2383465766906738,
-0.48311448097229004,
0.20115166902542114,
0.34839802980422974,
1.435178279876709,
-1.372804880142212,
0.017731916159391403,
0.1... |
func downgradeCancelCommandFunc(cmd *cobra.Command, args []string) {
ctx, cancel := commandCtx(cmd)
cli := mustClientFromCmd(cmd)
resp, err := cli.Downgrade(ctx, clientv3.DowngradeCancel, "")
cancel()
if err != nil {
cobrautl.ExitWithError(cobrautl.ExitError, err)
}
display.DowngradeCancel(*resp)
} | [
1.6364209651947021,
-1.1780633926391602,
0.5989639163017273,
0.5538116693496704,
-0.08342255651950836,
0.6444341540336609,
0.9672635197639465,
1.2791048288345337,
-0.3403956890106201,
-0.32258886098861694,
0.8814183473587036,
0.7946489453315735,
-0.5008324384689331,
0.2066442221403122,
0... |
func (ic i3conf) AddToConfig(flds []string) {
var key, value = "", ""
if s.HasPrefix(flds[1], "--") {
key = flds[2]
value = s.Join(flds[3:], " ")
} else {
key = flds[1]
value = s.Join(flds[2:], " ")
}
// TODO? Use a string builder?
arK := s.Split(key, "+")
for i := 0; i < cap(arK); i++ {
if s.HasPrefix... | [
-0.7559448480606079,
-0.1333966851234436,
0.6026642918586731,
-0.6561622023582458,
-0.34373849630355835,
-0.0169387087225914,
-0.3064757287502289,
0.6311414241790771,
-0.22701416909694672,
1.0584079027175903,
-0.3553786277770996,
0.12680742144584656,
-0.23143330216407776,
-0.36531212925910... |
func ParseConfig(f *os.File) i3conf {
mod := ModKeys[DefaultModKey]
v := make(map[string]string)
m := make(map[string]string)
ic := i3conf{path: f.Name(), modifier: mod, variables: v, conf: m}
scanner := bufio.NewScanner(f)
for scanner.Scan() {
line := scanner.Text()
flds := s.Fields(scanner.Text())
if l... | [
-0.021550484001636505,
-0.2724769115447998,
0.4131183922290802,
-0.46061205863952637,
-0.9324421286582947,
0.09987705945968628,
0.26404768228530884,
0.747467577457428,
-0.7649152874946594,
0.5112648606300354,
-0.2752303183078766,
-0.3746189475059509,
-0.26754143834114075,
0.019604472443461... |
func FindConfigFile() *os.File {
for i := 0; i < cap(PossiblePaths); i++ {
if _, err := os.Stat(PossiblePaths[i]); os.IsNotExist(err) {
continue
}
f, err := os.Open(PossiblePaths[i])
if err != nil {
log.Fatal(err)
}
return f
}
log.Fatal(errors.New("No config file was found at the usual locations."... | [
-0.04998821020126343,
-0.07639510184526443,
0.4494388699531555,
0.43017223477363586,
0.45169058442115784,
0.14982524514198303,
0.720197319984436,
0.22654496133327484,
-1.7338346242904663,
0.09029631316661835,
0.7543221712112427,
-1.1762332916259766,
-0.5637877583503723,
1.093449354171753,
... |
func NewBus(pub message.Publisher, pulses pulse.Accessor, jc jet.Coordinator) *Bus {
return &Bus{
timeout: time.Second * 20,
pub: pub,
replies: make(map[string]*lockedReply),
pulses: pulses,
coordinator: jc,
}
} | [
0.33755728602409363,
-0.2937910854816437,
0.19566109776496887,
0.1600079983472824,
-0.8573257327079773,
0.5551193356513977,
-0.1565065085887909,
-0.48971426486968994,
0.27997225522994995,
-0.2381693422794342,
0.3582799434661865,
1.0285989046096802,
-0.7611372470855713,
-0.4655696153640747,... |
func (b *Bus) SendRole(
ctx context.Context, msg *message.Message, role insolar.DynamicRole, object insolar.Reference,
) (<-chan *message.Message, func()) {
handleError := func(err error) (<-chan *message.Message, func()) {
inslogger.FromContext(ctx).Error(errors.Wrap(err, "failed to send message"))
res := make(c... | [
-0.7087544202804565,
0.1368180811405182,
0.811922013759613,
0.06249529495835304,
1.0804975032806396,
-0.6837030649185181,
0.6947592496871948,
-0.36313125491142273,
0.12267235666513443,
0.2098212093114853,
0.8086598515510559,
0.815784752368927,
-0.4669901430606842,
0.2841949164867401,
1.1... |
func (b *Bus) SendTarget(
ctx context.Context, msg *message.Message, target insolar.Reference,
) (<-chan *message.Message, func()) {
id := watermill.NewUUID()
middleware.SetCorrelationID(id, msg)
msg.Metadata.Set(MetaTraceID, inslogger.TraceID(ctx))
msg.Metadata.Set(MetaReceiver, target.String())
reply := &lock... | [
-0.49680840969085693,
0.14389526844024658,
0.63092041015625,
-0.4579974114894867,
0.2291375696659088,
-0.5414955615997314,
0.3008301854133606,
-0.9881002902984619,
0.17208796739578247,
0.5009717345237732,
0.8036101460456848,
0.83514404296875,
-1.2445180416107178,
-0.25131675601005554,
-0... |
func (b *Bus) Reply(ctx context.Context, origin, reply *message.Message) {
id := middleware.MessageCorrelationID(origin)
middleware.SetCorrelationID(id, reply)
originSender := origin.Metadata.Get(MetaSender)
if originSender == "" {
inslogger.FromContext(ctx).Error("failed to send reply (no sender)")
return
}
... | [
-0.22424279153347015,
0.10546945035457611,
0.36003392934799194,
0.10688291490077972,
0.019277309998869896,
0.7585000395774841,
-0.23722374439239502,
1.1464170217514038,
0.23257185518741608,
0.5649957060813904,
0.22247961163520813,
1.666506290435791,
-1.147133469581604,
0.7981715202331543,
... |
func (b *Bus) IncomingMessageRouter(h message.HandlerFunc) message.HandlerFunc {
return func(msg *message.Message) ([]*message.Message, error) {
id := middleware.MessageCorrelationID(msg)
b.repliesMutex.RLock()
reply, ok := b.replies[id]
if !ok {
b.repliesMutex.RUnlock()
return h(msg)
}
reply.wg.Ad... | [
-0.28348761796951294,
-0.02314244955778122,
0.6644927263259888,
-0.39931198954582214,
-0.22461451590061188,
-0.11435949057340622,
0.6059721112251282,
-0.21775676310062408,
-0.24562068283557892,
0.451867938041687,
0.18467146158218384,
0.26009657979011536,
-1.4032551050186157,
1.244219183921... |
func (a *WebhooksApiService) RepositoriesUsernameRepoSlugHooksGet(ctx context.Context, username string, repoSlug string) (PaginatedWebhookSubscriptions, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
... | [
-0.7661812901496887,
0.015771564096212387,
0.8353644609451294,
-1.0114918947219849,
-0.09146267920732498,
-0.6525114178657532,
-0.07031185179948807,
-0.11020860075950623,
-1.0296928882598877,
0.8776843547821045,
0.32078996300697327,
0.5802267789840698,
-0.6039242148399353,
0.33747026324272... |
func (a *WebhooksApiService) RepositoriesUsernameRepoSlugHooksUidDelete(ctx context.Context, username string, repoSlug string, uid string) (*http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
//... | [
-0.2838045060634613,
-0.6078896522521973,
0.7021863460540771,
-0.735160768032074,
-0.1596624106168747,
-0.021032536402344704,
0.3584435284137726,
-0.07077283412218094,
-0.280473530292511,
0.47878342866897583,
0.3299992084503174,
0.6940005421638489,
-0.9593948721885681,
0.21821607649326324,... |
func (a *WebhooksApiService) RepositoriesUsernameRepoSlugHooksUidGet(ctx context.Context, username string, repoSlug string, uid string) (WebhookSubscription, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []... | [
-0.31371983885765076,
-0.3590354025363922,
0.7072300314903259,
-1.2150968313217163,
-0.21350693702697754,
-0.3027346432209015,
-0.06775771826505661,
-0.17530465126037598,
-0.6422370076179504,
0.408767968416214,
-0.021993255242705345,
0.834044873714447,
-0.6966931819915771,
-0.0687892735004... |
func (a *WebhooksApiService) RepositoriesUsernameRepoSlugHooksUidPut(ctx context.Context, username string, repoSlug string, uid string) (WebhookSubscription, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []... | [
-0.4127587676048279,
-0.38810667395591736,
0.7460433840751648,
-0.8924885392189026,
-0.47956132888793945,
0.07130283117294312,
0.556073009967804,
0.0750252828001976,
-0.4451686143875122,
0.3121659755706787,
-0.3421187698841095,
0.6856110692024231,
-0.8435463309288025,
-0.14576587080955505,... |
func (a *WebhooksApiService) TeamsUsernameHooksGet(ctx context.Context, username string) (PaginatedWebhookSubscriptions, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarReturnValue PaginatedW... | [
-0.9601312875747681,
-0.07990042865276337,
0.8918233513832092,
-0.9543077349662781,
-0.6503381133079529,
-0.48182398080825806,
0.029467249289155006,
-0.5343656539916992,
-1.0948173999786377,
0.8614689111709595,
0.1464853137731552,
0.4928153157234192,
-0.31994208693504333,
-0.07662312686443... |
func (a *WebhooksApiService) TeamsUsernameHooksPost(ctx context.Context, username string) (WebhookSubscription, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarReturnValue WebhookSubscriptio... | [
-0.6041173934936523,
-0.16685448586940765,
0.6456411480903625,
-0.37867650389671326,
-0.9271863698959351,
-0.32681623101234436,
0.17297643423080444,
-0.43051379919052124,
-0.5204885601997375,
0.5212947726249695,
-0.306417852640152,
-0.05332639068365097,
-0.6693537831306458,
-0.407112181186... |
func (a *WebhooksApiService) TeamsUsernameHooksUidDelete(ctx context.Context, username string, uid string) (*http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
... | [
-0.911620557308197,
-0.39489397406578064,
0.7080171704292297,
-0.4736963212490082,
-0.6598196625709534,
0.21467719972133636,
0.3024319112300873,
-0.056996893137693405,
-0.04708095267415047,
0.5214830636978149,
0.18829238414764404,
0.707857072353363,
-0.7923955321311951,
-0.3882375359535217... |
func (a *WebhooksApiService) TeamsUsernameHooksUidGet(ctx context.Context, username string, uid string) (WebhookSubscription, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarReturnValue Webho... | [
-0.8131648898124695,
-0.16570132970809937,
0.7320838570594788,
-1.0952816009521484,
-0.6470596790313721,
-0.052586305886507034,
0.03396686166524887,
-0.4888240098953247,
-0.6664144992828369,
0.528251051902771,
-0.2202923744916916,
0.8520116806030273,
-0.8196831345558167,
-0.726687371730804... |
func (a *WebhooksApiService) TeamsUsernameHooksUidPut(ctx context.Context, username string, uid string) (WebhookSubscription, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarReturnValue Webho... | [
-0.8425431251525879,
-0.24445703625679016,
0.7439224720001221,
-0.8404899835586548,
-0.864766538143158,
0.27506303787231445,
0.5823162198066711,
-0.10668005049228668,
-0.49742937088012695,
0.5329878330230713,
-0.4586805999279022,
0.6296778917312622,
-0.9435619711875916,
-0.6974422931671143... |
func (a *WebhooksApiService) UsersUsernameHooksGet(ctx context.Context, username string) (PaginatedWebhookSubscriptions, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarReturnValue PaginatedW... | [
-1.1864407062530518,
-0.2780020534992218,
0.8468634486198425,
-0.5244989395141602,
-0.817678689956665,
-0.6258707046508789,
0.1518576592206955,
-0.3754535913467407,
-0.7919826507568359,
0.7503458857536316,
0.3398509621620178,
0.7408027648925781,
-0.4130036532878876,
0.28961464762687683,
... |
func (a *WebhooksApiService) UsersUsernameHooksPost(ctx context.Context, username string) (WebhookSubscription, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarReturnValue WebhookSubscriptio... | [
-0.8154905438423157,
-0.2855384051799774,
0.6651648879051208,
-0.013951725326478481,
-1.019592046737671,
-0.4920414686203003,
0.26355472207069397,
-0.34498926997184753,
-0.27752745151519775,
0.46065863966941833,
-0.15361331403255463,
0.21174784004688263,
-0.7865666747093201,
-0.05890327692... |
func (a *WebhooksApiService) UsersUsernameHooksUidDelete(ctx context.Context, username string, uid string) (*http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Delete")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
... | [
-1.1269129514694214,
-0.5259252786636353,
0.7588058710098267,
-0.23824019730091095,
-0.6846848130226135,
0.10176927596330643,
0.38433247804641724,
0.046937908977270126,
0.11921840906143188,
0.5256640315055847,
0.3222307562828064,
0.9198662042617798,
-0.9083086252212524,
-0.1736057549715042... |
func (a *WebhooksApiService) UsersUsernameHooksUidGet(ctx context.Context, username string, uid string) (WebhookSubscription, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarReturnValue Webho... | [
-1.0729272365570068,
-0.29276493191719055,
0.7233205437660217,
-0.8061180710792542,
-0.745471715927124,
-0.1876409947872162,
0.11624588817358017,
-0.3275432586669922,
-0.488799124956131,
0.5158465504646301,
-0.016211584210395813,
1.0720373392105103,
-0.8861804604530334,
-0.4225659668445587... |
func (a *WebhooksApiService) UsersUsernameHooksUidPut(ctx context.Context, username string, uid string) (WebhookSubscription, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarReturnValue Webho... | [
-1.07234525680542,
-0.3738165497779846,
0.7476525902748108,
-0.5672006011009216,
-0.9151432514190674,
0.1561717391014099,
0.7066935896873474,
0.04134830832481384,
-0.3066774606704712,
0.5076377987861633,
-0.2906578779220581,
0.8338102102279663,
-1.099988341331482,
-0.4283992350101471,
0.... |
func (d DicomService) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "etag", d.Etag)
populate(objectMap, "id", d.ID)
populate(objectMap, "identity", d.Identity)
populate(objectMap, "location", d.Location)
populate(objectMap, "name", d.Name)
populate(objectMap, "prop... | [
-0.7871317267417908,
-0.4472780227661133,
0.13438794016838074,
-0.7289102673530579,
-0.3084048628807068,
-0.6756913065910339,
0.2139219492673874,
-0.0008048214949667454,
0.29028332233428955,
0.009220277890563011,
-0.5739838480949402,
0.42836475372314453,
-0.04916485771536827,
1.08871459960... |
func (d DicomServiceAuthenticationConfiguration) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "audiences", d.Audiences)
populate(objectMap, "authority", d.Authority)
return json.Marshal(objectMap)
} | [
-1.2284637689590454,
0.1261553019285202,
0.03583862632513046,
-0.5387564301490784,
-0.8571488857269287,
-0.5583066940307617,
0.8774852156639099,
0.5712014436721802,
0.5085501670837402,
0.7817127108573914,
-0.4825356602668762,
0.1046372577548027,
0.46887215971946716,
0.4042355418205261,
0... |
func (d DicomServicePatchResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "identity", d.Identity)
populate(objectMap, "tags", d.Tags)
return json.Marshal(objectMap)
} | [
0.06509585678577423,
0.21074120700359344,
0.25002607703208923,
-0.14647191762924194,
-0.633445143699646,
-0.5794110894203186,
0.25278711318969727,
0.4486260414123535,
-0.00435371370986104,
0.4139091372489929,
-0.6584529876708984,
-0.22727851569652557,
-0.038582462817430496,
0.6571351289749... |
func (d DicomServiceProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "authenticationConfiguration", d.AuthenticationConfiguration)
populate(objectMap, "privateEndpointConnections", d.PrivateEndpointConnections)
populate(objectMap, "provisioningState", d.Provi... | [
-0.9003440141677856,
-0.4675505757331848,
0.075971819460392,
-0.23021437227725983,
-0.6358462572097778,
-0.45221325755119324,
0.00245839380659163,
0.23205921053886414,
0.04082143306732178,
0.22764141857624054,
-0.37976211309432983,
0.2225315123796463,
-0.4570581614971161,
0.399495393037796... |
func (f FhirService) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "etag", f.Etag)
populate(objectMap, "id", f.ID)
populate(objectMap, "identity", f.Identity)
populate(objectMap, "kind", f.Kind)
populate(objectMap, "location", f.Location)
populate(objectMap, "name"... | [
-0.3889233469963074,
-0.9941376447677612,
0.03345557674765587,
-1.0950340032577515,
-0.15719261765480042,
-0.7111914753913879,
-0.08977770805358887,
-0.1583946794271469,
-0.20439870655536652,
-0.6182977557182312,
-0.7959166765213013,
0.7153714299201965,
-0.10946329683065414,
1.189671158790... |
func (f FhirServiceAcrConfiguration) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "loginServers", f.LoginServers)
populate(objectMap, "ociArtifacts", f.OciArtifacts)
return json.Marshal(objectMap)
} | [
-0.1119704321026802,
-0.12660600244998932,
0.12739695608615875,
-0.9585459232330322,
-0.2086014598608017,
-1.004433274269104,
0.6395272016525269,
0.04412775859236717,
0.11499857157468796,
0.04966294765472412,
-0.3472791612148285,
0.47930407524108887,
0.4625930190086365,
0.5254029631614685,... |
func (f FhirServiceCorsConfiguration) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "allowCredentials", f.AllowCredentials)
populate(objectMap, "headers", f.Headers)
populate(objectMap, "maxAge", f.MaxAge)
populate(objectMap, "methods", f.Methods)
populate(objectMap... | [
-0.6852287650108337,
-0.4722546935081482,
0.03054342418909073,
-0.7530183792114258,
-0.02514788880944252,
-0.45792829990386963,
0.33247098326683044,
-0.009540101513266563,
-0.2653951346874237,
-0.11567531526088715,
-0.7133106589317322,
0.1617419421672821,
-0.018805449828505516,
0.913459658... |
func (f FhirServicePatchResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "identity", f.Identity)
populate(objectMap, "tags", f.Tags)
return json.Marshal(objectMap)
} | [
0.22053217887878418,
-0.4794408679008484,
0.2492254227399826,
-0.4097053110599518,
-0.4063095450401306,
-0.5905122756958008,
0.007417159620672464,
0.27552327513694763,
-0.213623508810997,
-0.013418552465736866,
-0.865515410900116,
-0.06489671766757965,
0.013094726018607616,
0.7701594829559... |
func (f FhirServiceProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "accessPolicies", f.AccessPolicies)
populate(objectMap, "acrConfiguration", f.AcrConfiguration)
populate(objectMap, "authenticationConfiguration", f.AuthenticationConfiguration)
populate(obj... | [
-0.15637224912643433,
-0.910912036895752,
0.25794628262519836,
-0.8019211888313293,
-0.2719910740852356,
-0.396185964345932,
0.3202197253704071,
0.09574936330318451,
-0.015535403043031693,
-0.287265419960022,
-0.44227904081344604,
0.4759463369846344,
-0.3761081397533417,
0.4089068770408630... |
func (i IotConnector) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "etag", i.Etag)
populate(objectMap, "id", i.ID)
populate(objectMap, "identity", i.Identity)
populate(objectMap, "location", i.Location)
populate(objectMap, "name", i.Name)
populate(objectMap, "prop... | [
-1.4408538341522217,
-1.2957561016082764,
0.3396793603897095,
-1.4195091724395752,
-0.14044377207756042,
-0.3599468171596527,
-0.016995303332805634,
0.07427286356687546,
-0.4068853557109833,
0.1327511966228485,
-0.531265139579773,
-0.09813213348388672,
-0.235600546002388,
-0.26543879508972... |
func (i IotConnectorPatchResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "identity", i.Identity)
populate(objectMap, "tags", i.Tags)
return json.Marshal(objectMap)
} | [
-0.5795824527740479,
-1.147849202156067,
-0.021741371601819992,
-1.1233538389205933,
-0.31456655263900757,
-0.1260717660188675,
-0.171700119972229,
0.5710858702659607,
0.22146710753440857,
0.21758276224136353,
-0.21308709681034088,
-0.4028184115886688,
0.15477265417575836,
-0.4051485955715... |
func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "groupId", p.GroupID)
populate(objectMap, "requiredMembers", p.RequiredMembers)
populate(objectMap, "requiredZoneNames", p.RequiredZoneNames)
return json.Marshal(objectMap)
} | [
-0.16435855627059937,
-1.3479235172271729,
-0.1302729845046997,
-0.597709059715271,
0.02510901726782322,
0.00712855439633131,
0.7505621314048767,
0.07543884217739105,
0.38821741938591003,
-0.27030375599861145,
-0.6816648244857788,
0.44393447041511536,
-1.167048692703247,
0.8875736594200134... |
func (r ResourceTags) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "tags", r.Tags)
return json.Marshal(objectMap)
} | [
0.019132966175675392,
-0.09912077337503433,
-0.015079994685947895,
-0.7388864159584045,
0.051626645028591156,
-0.7093459963798523,
-0.1502867192029953,
-0.2838827073574066,
-0.002934624906629324,
0.4278267025947571,
-1.2497469186782837,
-0.5707448124885559,
-0.7593520283699036,
1.471189141... |
func (r ResourceVersionPolicyConfiguration) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "default", r.Default)
populate(objectMap, "resourceTypeOverrides", r.ResourceTypeOverrides)
return json.Marshal(objectMap)
} | [
-0.3077761232852936,
-1.0000282526016235,
-0.1539299488067627,
-0.6224631667137146,
-0.34088584780693054,
-0.08783835172653198,
-0.13211162388324738,
-0.1848960965871811,
0.34336355328559875,
0.708803653717041,
-1.048514723777771,
-0.8019588589668274,
-0.6909841299057007,
0.548101007938385... |
func (s ServiceAcrConfigurationInfo) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "loginServers", s.LoginServers)
populate(objectMap, "ociArtifacts", s.OciArtifacts)
return json.Marshal(objectMap)
} | [
0.2571776509284973,
-0.39659997820854187,
0.13210396468639374,
-0.2596493065357208,
-0.4597015976905823,
-0.7016564607620239,
0.7764118313789368,
-0.2501349151134491,
-0.13063320517539978,
-0.0354735441505909,
-0.2609565854072571,
0.9835528135299683,
0.9089969396591187,
0.3757905662059784,... |
func (s ServiceCorsConfigurationInfo) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "allowCredentials", s.AllowCredentials)
populate(objectMap, "headers", s.Headers)
populate(objectMap, "maxAge", s.MaxAge)
populate(objectMap, "methods", s.Methods)
populate(objectMap... | [
-0.2075498104095459,
-0.3847036063671112,
0.22551104426383972,
-0.4166853427886963,
-0.8714349865913391,
-0.49010297656059265,
0.5732221007347107,
-0.03476542979478836,
-1.3567639589309692,
0.2347434014081955,
-0.9239195585250854,
0.28051602840423584,
0.21382693946361542,
0.89730304479599,... |
func (s ServiceManagedIdentityIdentity) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "principalId", s.PrincipalID)
populate(objectMap, "tenantId", s.TenantID)
populate(objectMap, "type", s.Type)
populate(objectMap, "userAssignedIdentities", s.UserAssignedIdentities)... | [
-0.48308542370796204,
-1.1119370460510254,
0.21089035272598267,
-0.11513789743185043,
0.446362167596817,
0.31278666853904724,
0.41508159041404724,
0.038775913417339325,
0.17603638768196106,
0.7164561748504639,
-0.9901198744773865,
0.682299017906189,
-0.2989329695701599,
0.967199981212616,
... |
func (s ServicesDescription) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "etag", s.Etag)
populate(objectMap, "id", s.ID)
populate(objectMap, "identity", s.Identity)
populate(objectMap, "kind", s.Kind)
populate(objectMap, "location", s.Location)
populate(objectMap... | [
-0.00769172003492713,
-0.08859629929065704,
0.07864906638860703,
-1.11491858959198,
-0.17121724784374237,
-0.06929554790258408,
-0.02890964224934578,
0.06230933219194412,
-0.2581394910812378,
0.17034277319908142,
-0.46828925609588623,
0.9106384515762329,
-0.01785394363105297,
1.29416036605... |
func (s ServicesPatchDescription) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "properties", s.Properties)
populate(objectMap, "tags", s.Tags)
return json.Marshal(objectMap)
} | [
0.5263736248016357,
-0.26297855377197266,
0.2646188735961914,
-0.848592221736908,
-0.8365697860717773,
0.13599935173988342,
-0.07971598207950592,
0.5619105696678162,
0.18323545157909393,
-0.07653596997261047,
-0.610316276550293,
1.311502456665039,
0.3372558355331421,
0.7881331443786621,
... |
func (s ServicesProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "accessPolicies", s.AccessPolicies)
populate(objectMap, "acrConfiguration", s.AcrConfiguration)
populate(objectMap, "authenticationConfiguration", s.AuthenticationConfiguration)
populate(object... | [
-0.7246972322463989,
-0.49693578481674194,
0.09924963116645813,
-0.92340087890625,
-0.547359049320221,
-0.050029292702674866,
0.3502374589443207,
-0.3789796233177185,
-0.4255598187446594,
-0.34897294640541077,
-0.17304082214832306,
0.5320994853973389,
-0.35344618558883667,
0.58455812931060... |
func (s ServicesResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "etag", s.Etag)
populate(objectMap, "id", s.ID)
populate(objectMap, "identity", s.Identity)
populate(objectMap, "kind", s.Kind)
populate(objectMap, "location", s.Location)
populate(objectMap, "... | [
-0.7885314226150513,
-0.6204230189323425,
-0.1826091855764389,
-1.1353188753128052,
-0.34318986535072327,
-0.341897189617157,
0.24419008195400238,
-0.21640540659427643,
-0.4621160328388214,
-0.2001502364873886,
-0.29749780893325806,
-0.07631496340036392,
0.200003981590271,
1.26786911487579... |
func (s SystemData) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt)
populate(objectMap, "createdBy", s.CreatedBy)
populate(objectMap, "createdByType", s.CreatedByType)
populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedA... | [
-0.4863624572753906,
-0.35697829723358154,
0.1718127429485321,
-0.1411493718624115,
0.03165467455983162,
-0.07588071376085281,
0.49373671412467957,
-0.21870233118534088,
0.41720229387283325,
-0.2928508222103119,
-0.8718380928039551,
0.5806438326835632,
-0.3668156862258911,
1.38253426551818... |
func (s *SystemData) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", s, err)
}
for key, val := range rawMsg {
var err error
switch key {
case "createdAt":
err = unpopulateTimeRFC3... | [
-0.8221868872642517,
0.16771923005580902,
0.58311527967453,
-0.933609664440155,
-0.4408452808856964,
-0.39055335521698,
0.606326162815094,
-0.4381240904331207,
-0.30237308144569397,
0.10529588907957077,
-0.3926326334476471,
0.10867638140916824,
-0.3338429927825928,
1.3880584239959717,
0.... |
func (t TaggedResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "etag", t.Etag)
populate(objectMap, "id", t.ID)
populate(objectMap, "location", t.Location)
populate(objectMap, "name", t.Name)
populate(objectMap, "tags", t.Tags)
populate(objectMap, "type", t.T... | [
-0.30092620849609375,
-1.0738739967346191,
0.12581881880760193,
-1.1690610647201538,
-0.002102270722389221,
-0.19051314890384674,
-0.010100487619638443,
0.5433927178382874,
-0.6449418067932129,
0.4411243498325348,
-1.2606834173202515,
-0.23194356262683868,
0.24975746870040894,
1.0778967142... |
func (w Workspace) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "etag", w.Etag)
populate(objectMap, "id", w.ID)
populate(objectMap, "location", w.Location)
populate(objectMap, "name", w.Name)
populate(objectMap, "properties", w.Properties)
populate(objectMap, "sys... | [
-0.7432290315628052,
-0.5991483330726624,
0.22014324367046356,
-0.8115078806877136,
0.03333555907011032,
-0.5508579015731812,
0.24056057631969452,
-0.4469521939754486,
0.7115244269371033,
-0.12740974128246307,
-1.1000279188156128,
0.7754735946655273,
-0.5277015566825867,
1.2380768060684204... |
func (w WorkspacePatchResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "tags", w.Tags)
return json.Marshal(objectMap)
} | [
0.16405120491981506,
-0.7255704402923584,
0.011453990824520588,
-0.7330318093299866,
-0.9287034273147583,
-0.3385181725025177,
-0.010173429735004902,
0.1981230527162552,
0.6111423969268799,
0.39596137404441833,
-0.5205846428871155,
0.25051435828208923,
-0.2012711763381958,
0.81974780559539... |
func (w WorkspaceProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
populate(objectMap, "privateEndpointConnections", w.PrivateEndpointConnections)
populate(objectMap, "provisioningState", w.ProvisioningState)
populate(objectMap, "publicNetworkAccess", w.PublicNetworkAccess)
retu... | [
-0.6100003123283386,
-0.976673424243927,
-0.008552826009690762,
-0.2506054639816284,
-0.34601742029190063,
-0.07247956842184067,
0.12324933707714081,
-0.25346988439559937,
0.2881593108177185,
-0.024451086297631264,
-0.7785385847091675,
0.7644460797309875,
-0.7687684893608093,
0.38563317060... |
func calcID(n *ast.MsgNode) uint64 {
var buf bytes.Buffer
writeFingerprint(&buf, n, false)
var fp = fingerprint(buf.Bytes())
if n.Meaning != "" {
var topbit uint64
if fp&(1<<63) > 0 {
topbit = 1
}
fp = (fp << 1) + topbit + fingerprint([]byte(n.Meaning))
}
return fp & 0x7fffffffffffffff
} | [
0.40726223587989807,
0.21678438782691956,
0.4378754794597626,
-0.3193635940551758,
-0.291864275932312,
0.38961660861968994,
0.6148454546928406,
0.46472403407096863,
0.3362937569618225,
0.3218027651309967,
0.6192382574081421,
-0.1776096373796463,
-0.709311306476593,
0.3121953010559082,
0.... |
func writeFingerprint(buf *bytes.Buffer, part ast.Node, braces bool) {
switch part := part.(type) {
case *ast.MsgNode:
for _, part := range part.Body.Children() {
writeFingerprint(buf, part, braces)
}
case *ast.RawTextNode:
buf.Write(part.Text)
case *ast.MsgPlaceholderNode:
if braces {
buf.WriteString... | [
0.10851779580116272,
-0.16667290031909943,
0.8129177093505859,
-0.15291662514209747,
0.3006007969379425,
0.3539435565471649,
0.1475280225276947,
-0.1678309142589569,
-0.6043977737426758,
-0.017256760969758034,
-0.3038735091686249,
-0.16282540559768677,
-0.7290746569633484,
0.45154267549514... |
func fingerprint(str []byte) uint64 {
var hi = hash32(str, 0, len(str), 0)
var lo = hash32(str, 0, len(str), 102072)
if (hi == 0) && (lo == 0 || lo == 1) {
// Turn 0/1 into another fingerprint
hi ^= 0x130f9bef
lo ^= 0x94a0a928
}
return (uint64(hi) << 32) | uint64(lo&0xffffffff)
} | [
0.5545274019241333,
-0.04859258234500885,
0.4711330235004425,
0.790361225605011,
-0.16576841473579407,
0.2623555064201355,
0.6182370185852051,
0.12511582672595978,
0.5372014045715332,
-0.20925596356391907,
-0.09589026868343353,
-0.2422744184732437,
-1.1770097017288208,
0.6129682064056396,
... |
func GetKnownClassifierModels() map[string]ImageClassifierDesc {
return knownImageClassifiers
} | [
-2.032670497894287,
-0.8253227472305298,
0.30169087648391724,
0.2119552344083786,
0.45853590965270996,
0.23072247207164764,
-0.14683730900287628,
0.5224279761314392,
-0.40379172563552856,
-0.07794994115829468,
-1.4238300323486328,
-0.3915911614894867,
1.5071619749069214,
0.7692171931266785... |
func Hash(msg string, nonce uint64) uint64 {
hasher := sha256.New()
hasher.Write([]byte(fmt.Sprintf("%s %d", msg, nonce)))
return binary.BigEndian.Uint64(hasher.Sum(nil))
} | [
1.0273998975753784,
0.6270669102668762,
0.6434546113014221,
0.4083808958530426,
0.2966320812702179,
0.10460930317640305,
0.042989641427993774,
0.3351210653781891,
-0.27324360609054565,
-0.2736855149269104,
0.08020626753568649,
1.0481914281845093,
-0.876180112361908,
0.7893716096878052,
0... |
func New(opts ...AgentOption) *Agent {
a := spawn()
for _, o := range opts {
o.apply(a)
}
a.start()
return a
} | [
-0.3863460421562195,
-1.1240917444229126,
0.358164519071579,
0.7183290719985962,
0.0857241153717041,
-0.20759224891662598,
-0.1961137354373932,
-0.10434024780988693,
0.21799947321414948,
0.153915673494339,
-0.032573916018009186,
0.4645484983921051,
0.2428024262189865,
-0.08957201987504959,... |
func WithGetFile(f GetFileFunc, opts ...AgentOption) *Agent {
return New(append([]AgentOption{f}, opts...)...)
} | [
1.2479556798934937,
-0.6311428546905518,
0.4629541039466858,
-0.03975925222039223,
0.2266828864812851,
-0.5825334191322327,
-0.3039844036102295,
-0.08025963604450226,
-0.11509817093610764,
0.29413360357284546,
0.08594825118780136,
-0.5628645420074463,
0.7827968597412109,
-0.491247534751892... |
func (a *Agent) WaitReady() {
a.statusLock.RLock()
defer a.statusLock.RUnlock()
for {
if a.status == 1 {
return
}
a.statusCond.Wait()
}
} | [
0.03564351052045822,
0.10545455664396286,
0.4242817759513855,
0.4580566883087158,
0.6526921391487122,
0.0568566620349884,
-0.1226636990904808,
0.35683828592300415,
-0.4338696002960205,
-0.060961104929447174,
-0.004841464105993509,
0.11960572749376297,
0.391409307718277,
0.8856754899024963,... |
func (a *Agent) RpcSend(ctx context.Context, id string, endpoint string, data []byte) error {
p := a.GetPeer(id)
if p == nil {
return errors.New("failed to find peer")
}
_, _, err := p.ssh.SendRequest("rpc/"+endpoint, false, data)
if err != nil {
log.Printf("[fleet] failed sending RPC packet to peer %s: %s", ... | [
-0.4541867673397064,
0.09901133179664612,
0.4734228849411011,
-0.5591763854026794,
0.37378430366516113,
0.5939003229141235,
-1.220429539680481,
-1.0287573337554932,
-0.3800511062145233,
0.45754820108413696,
0.058323804289102554,
0.3689909279346466,
-1.0368843078613281,
0.39848366379737854,... |
func (a *Agent) GetPeersCount() uint32 {
return atomic.LoadUint32(&a.peersCount)
} | [
0.201004296541214,
0.4125244617462158,
0.37029749155044556,
-0.649016261100769,
0.23692117631435394,
-0.23217405378818512,
0.07448481023311615,
-0.35756415128707886,
-0.45294418931007385,
-0.2993150055408478,
-0.48754438757896423,
0.15913857519626617,
-1.0537528991699219,
0.407259881496429... |
func (a *Agent) Settings() (map[string]any, error) {
if a.settings == nil {
a.settingsUpdated = time.Now()
err := a.updateSettings()
if err != nil {
return nil, err
}
// update done
return a.settings, nil
}
if time.Since(a.settingsUpdated) > 24*time.Hour {
a.settingsUpdated = time.Now()
go a.updat... | [
-1.303122639656067,
-0.4522967040538788,
0.5844230651855469,
0.10052002221345901,
-0.22211797535419464,
-0.8407383561134338,
-0.6308971047401428,
-1.0602325201034546,
0.15454185009002686,
0.884257972240448,
-0.02529274672269821,
-1.0325376987457275,
-0.3257397711277008,
0.6019360423088074,... |
func gmpInit(ctx phpv.Context, args []*phpv.ZVal) (*phpv.ZVal, error) {
var num *phpv.ZVal
var base *phpv.ZInt
_, err := core.Expand(ctx, args, &num, &base)
if err != nil {
return nil, err
}
var i *big.Int
switch num.GetType() {
case phpv.ZtNull, phpv.ZtBool, phpv.ZtInt, phpv.ZtFloat:
num, err = num.As(c... | [
-0.7102697491645813,
-0.19904443621635437,
0.9021031260490417,
-0.4982143044471741,
-0.5956293940544128,
0.030585652217268944,
0.10366613417863846,
-0.14852078258991241,
-0.12966588139533997,
0.06503933668136597,
0.2598492205142975,
-0.020844629034399986,
-0.767844021320343,
0.095149703323... |
func PostCourses(w http.ResponseWriter, r *http.Request) {
var response string
user := r.Header.Get("X-User")
resF := database.GetFacultyUser(user)
if resF.ID == 0 {
response = "Access denied."
w.WriteHeader(http.StatusBadRequest)
} else if !resF.Admin {
response = "Insuffient rights."
w.WriteHeader(http... | [
-0.8857131600379944,
0.14567850530147552,
0.9431322813034058,
0.24394972622394562,
0.40138450264930725,
0.54950350522995,
0.3959767520427704,
-1.0667709112167358,
0.0813354104757309,
-0.11162637174129486,
0.15908388793468475,
-0.545261025428772,
-0.3003501892089844,
0.20645281672477722,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.