text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (v *DocumentSubjectUpdate) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonDe066f3DecodeGithubComStudtoolDocumentsServiceModels3(l, v)
} | [
0.4541478157043457,
-0.058242280036211014,
0.32053545117378235,
-1.2184938192367554,
-0.8033876419067383,
-0.5381714701652527,
0.004575429484248161,
-0.252002090215683,
0.11615310609340668,
-0.11468740552663803,
-0.3381551206111908,
0.05372343212366104,
-0.3519287109375,
0.2811249196529388... |
func (v DocumentInfo) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonDe066f3EncodeGithubComStudtoolDocumentsServiceModels4(&w, v)
return w.Buffer.BuildBytes(), w.Error
} | [
-0.08746808022260666,
-0.030456116423010826,
0.09244673699140549,
-0.38687554001808167,
-0.6542823314666748,
-0.18986830115318298,
0.6818079948425293,
-0.5651841163635254,
-0.53658127784729,
-0.07606040686368942,
-0.9259248971939087,
0.02665342576801777,
-0.6553635001182556,
0.725230395793... |
func (v DocumentInfo) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonDe066f3EncodeGithubComStudtoolDocumentsServiceModels4(w, v)
} | [
-0.016608282923698425,
-0.0966128259897232,
0.2445201575756073,
-0.7910925149917603,
-0.43794795870780945,
-0.5546649098396301,
0.574385404586792,
-1.218561053276062,
-0.21567359566688538,
-0.25874418020248413,
-1.2106382846832275,
-0.02960093878209591,
0.011316273361444473,
1.255826592445... |
func (v *DocumentInfo) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonDe066f3DecodeGithubComStudtoolDocumentsServiceModels4(&r, v)
return r.Error()
} | [
0.13770100474357605,
0.06741314381361008,
0.22014811635017395,
-1.422682285308838,
-0.93471360206604,
-0.12389076501131058,
0.3778061270713806,
-0.3485194742679596,
-0.6492236852645874,
-0.13917258381843567,
-0.6564686894416809,
-0.3561391532421112,
-0.641986608505249,
0.7655416131019592,
... |
func (v *DocumentInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonDe066f3DecodeGithubComStudtoolDocumentsServiceModels4(l, v)
} | [
0.45137664675712585,
-0.0769745334982872,
0.31696316599845886,
-1.3081098794937134,
-0.42156240344047546,
-0.9125932455062866,
0.5693747997283936,
-0.4066462814807892,
-0.43926379084587097,
-0.23605430126190186,
-1.0741004943847656,
-0.38157472014427185,
0.0028331151697784662,
1.0475479364... |
func New(log *logrus.Logger, db *mongo.Database) User {
return User{
log: log,
mDB: db,
}
} | [
0.16196662187576294,
-0.7488362193107605,
0.07640653103590012,
0.3093090057373047,
-0.5833926796913147,
0.16134044528007507,
-0.15026669204235077,
0.03339448571205139,
-0.2997748851776123,
-0.25519198179244995,
-0.45800328254699707,
0.5824823975563049,
0.6132925748825073,
0.536866307258606... |
func CreateLedger(lctx *LedgerCtx, genesisCfg []byte) (*Ledger, error) {
return newLedger(lctx, true, genesisCfg)
} | [
0.3453271687030792,
-0.23267696797847748,
0.2846278250217438,
-0.0328117199242115,
0.14883895218372345,
0.9999289512634277,
-0.7481468319892883,
0.6554082036018372,
-0.6821385622024536,
-0.3616867959499359,
-0.2652663588523865,
-0.414360910654068,
-0.1947966068983078,
1.5723545551300049,
... |
func OpenLedger(lctx *LedgerCtx) (*Ledger, error) {
return newLedger(lctx, false, nil)
} | [
-0.30429965257644653,
0.1223180815577507,
0.34522703289985657,
-0.6781743764877319,
-1.220794677734375,
0.41512438654899597,
-0.5207769870758057,
0.571397602558136,
0.6589855551719666,
-0.9730163216590881,
-0.2233203500509262,
0.4172019362449646,
-0.08187548816204071,
1.0939432382583618,
... |
func (l *Ledger) Close() {
l.baseDB.Close()
} | [
0.4810574948787689,
-0.03312104567885399,
0.25195786356925964,
0.23567286133766174,
0.609695553779602,
1.9325100183486938,
0.2873392105102539,
-0.03149545192718506,
-1.1183351278305054,
-0.2619037926197052,
0.5324985384941101,
0.3148425221443176,
-1.0791397094726562,
1.6598743200302124,
... |
func (l *Ledger) GetMeta() *pb.LedgerMeta {
return l.meta
} | [
0.9333983659744263,
0.13569125533103943,
0.45789703726768494,
1.1769304275512695,
1.2229974269866943,
0.959040641784668,
-0.060873281210660934,
0.10490359365940094,
-0.21261589229106903,
-1.0335891246795654,
0.6317342519760132,
0.9154515862464905,
-0.36691924929618835,
0.4813750982284546,
... |
func (l *Ledger) GetLDB() kvdb.Database {
return l.baseDB
} | [
0.9280452132225037,
0.22490018606185913,
0.6194960474967957,
0.8200127482414246,
0.536403238773346,
1.3032528162002563,
-1.246363878250122,
-0.20902933180332184,
0.3847288191318512,
-0.45595693588256836,
0.47030872106552124,
0.7859946489334106,
-1.0146862268447876,
0.9357272386550903,
-0... |
func (l *Ledger) FormatRootBlock(txList []*pb.Transaction) (*pb.InternalBlock, error) {
l.xlog.Info("begin format genesis block")
block := &pb.InternalBlock{Version: RootBlockVersion}
block.Transactions = txList
block.TxCount = int32(len(txList))
block.MerkleTree = MakeMerkleTree(txList)
if len(block.MerkleTree) ... | [
0.09369270503520966,
-0.4454396069049835,
0.7297810316085815,
0.6376218199729919,
-0.6479597687721252,
0.24853120744228363,
0.12038442492485046,
-0.2532126307487488,
-0.058241043239831924,
0.13055457174777985,
0.662288248538971,
0.6329849362373352,
-0.8356733322143555,
1.4747314453125,
0... |
func (l *Ledger) FormatBlock(txList []*pb.Transaction,
proposer []byte, ecdsaPk *ecdsa.PrivateKey, /*矿工的公钥私钥*/
timestamp int64, curTerm int64, curBlockNum int64,
preHash []byte, utxoTotal *big.Int) (*pb.InternalBlock, error) {
return l.formatBlock(txList, proposer, ecdsaPk, timestamp, curTerm, curBlockNum, preHash,... | [
-0.7769067287445068,
1.027104139328003,
0.6476276516914368,
0.2317369431257248,
-0.2185913473367691,
-0.1080390065908432,
0.329224169254303,
0.13316276669502258,
0.030603665858507156,
-0.35159212350845337,
0.07648351788520813,
0.08181027323007584,
-0.42837056517601013,
0.6424511671066284,
... |
func (l *Ledger) FormatMinerBlock(txList []*pb.Transaction,
proposer []byte, ecdsaPk *ecdsa.PrivateKey, /*矿工的公钥私钥*/
timestamp int64, curTerm int64, curBlockNum int64,
preHash []byte, targetBits int32, utxoTotal *big.Int,
qc *pb.QuorumCert, failedTxs map[string]string, blockHeight int64) (*pb.InternalBlock, error) {... | [
-0.3633745610713959,
0.16235734522342682,
0.5695050954818726,
-0.10305147618055344,
-0.11149823665618896,
0.1445717066526413,
-0.5165097117424011,
-0.8949224948883057,
0.00805788952857256,
0.13802489638328552,
0.3541724979877472,
0.6158481240272522,
-0.5710006952285767,
0.4511067569255829,... |
func (l *Ledger) FormatFakeBlock(txList []*pb.Transaction,
proposer []byte, ecdsaPk *ecdsa.PrivateKey, /*矿工的公钥私钥*/
timestamp int64, curTerm int64, curBlockNum int64,
preHash []byte, utxoTotal *big.Int, blockHeight int64) (*pb.InternalBlock, error) {
return l.formatBlock(txList, proposer, ecdsaPk, timestamp, curTerm... | [
-0.4479237496852875,
0.8831678628921509,
0.473370760679245,
-0.062282830476760864,
-0.13321436941623688,
-0.33265501260757446,
0.15787120163440704,
-0.2019250988960266,
0.023868022486567497,
0.41124582290649414,
-0.4803568720817566,
0.019116586074233055,
-0.6595796942710876,
1.197934269905... |
func (l *Ledger) IsValidTx(idx int, tx *pb.Transaction, block *pb.InternalBlock) bool {
if tx.Coinbase { //检查系统奖励交易的合法性
if len(tx.TxOutputs) < 1 {
l.xlog.Warn("invalid length of coinbase tx outputs, when ConfirmBlock", "len", len(tx.TxOutputs))
return false
}
//交易奖励的金额是否符合策略?
awardTarget := l.GenesisBloc... | [
-0.18815012276172638,
-0.3300161063671112,
1.0522109270095825,
0.32729169726371765,
-0.8513397574424744,
-0.047503694891929626,
-0.21179774403572083,
-0.2612486183643341,
-0.23546048998832703,
0.5207522511482239,
-0.12220632284879684,
0.076779805123806,
-0.910760760307312,
0.55586427450180... |
func (l *Ledger) UpdateBlockChainData(txid string, ptxid string, publickey string, sign string, height int64) error {
if txid == "" || ptxid == "" {
return fmt.Errorf("invalid update blockchaindata requests")
}
l.mutex.Lock()
defer l.mutex.Unlock()
l.xlog.Info("ledger UpdateBlockChainData", "tx", txid, "ptxid"... | [
-0.46348315477371216,
-0.20430365204811096,
0.735031008720398,
0.20500493049621582,
-0.24939247965812683,
0.1851484477519989,
-0.5694912075996399,
-0.25164371728897095,
-1.0568077564239502,
0.6966485381126404,
-0.9747859835624695,
0.8372081518173218,
-0.4730195105075836,
0.2170784622430801... |
func (l *Ledger) ConfirmBlock(block *pb.InternalBlock, isRoot bool) ConfirmStatus {
l.mutex.Lock()
defer l.mutex.Unlock()
blkTimer := timer.NewXTimer()
l.xlog.Info("start to confirm block", "blockid", utils.F(block.Blockid), "txCount", len(block.Transactions))
var confirmStatus ConfirmStatus
dummyTransactions := ... | [
-0.07229478657245636,
0.2747553884983063,
1.2889349460601807,
1.3716156482696533,
-0.09865549206733704,
0.6870880722999573,
1.0063841342926025,
-0.20243795216083527,
-0.3182236850261688,
0.014865933917462826,
-0.591097891330719,
0.45873725414276123,
-0.31575828790664673,
1.0518213510513306... |
func (l *Ledger) ExistBlock(blockid []byte) bool {
exist, _ := l.blocksTable.Has(blockid)
return exist
} | [
-0.4425695240497589,
0.5186191201210022,
0.6876215934753418,
0.029852507635951042,
0.6016052961349487,
0.6629073023796082,
-0.059151314198970795,
0.058726344257593155,
-0.4545692801475525,
1.229103922843933,
-0.5276592373847961,
-0.36810827255249023,
-0.9111114144325256,
1.2290486097335815... |
func (l *Ledger) QueryBlock(blockid []byte) (*pb.InternalBlock, error) {
blkInCache, exist := l.blockCache.Get(string(blockid))
if exist {
l.xlog.Debug("hit queryblock cache", "blkid", utils.F(blockid))
return blkInCache.(*pb.InternalBlock), nil
}
blk, err := l.queryBlock(blockid, true)
if err != nil {
retur... | [
-0.18577875196933746,
0.6432056427001953,
0.9070043563842773,
-0.19944071769714355,
-0.34006696939468384,
0.1534244567155838,
-0.07106999307870865,
-0.6356171369552612,
0.8059738874435425,
-0.383911669254303,
0.17631398141384125,
0.2084730565547943,
-1.1936099529266357,
0.24948503077030182... |
func (l *Ledger) QueryBlockHeader(blockid []byte) (*pb.InternalBlock, error) {
return l.queryBlock(blockid, false)
} | [
-0.5233520865440369,
0.444372296333313,
0.46772560477256775,
0.5379261374473572,
-0.3435811996459961,
-0.2490173876285553,
-0.27888697385787964,
-1.3168485164642334,
-0.02130787819623947,
-0.0785582885146141,
0.12074218690395355,
-0.15617574751377106,
-1.6667242050170898,
0.128833442926406... |
func (l *Ledger) HasTransaction(txid []byte) (bool, error) {
table := l.ConfirmedTable
return table.Has(txid)
} | [
0.424166202545166,
0.7301038503646851,
0.5903600454330444,
0.29983389377593994,
0.27013829350471497,
-0.5364959239959717,
-0.0795537531375885,
0.7632431983947754,
0.08736945688724518,
0.7608035802841187,
-1.6020842790603638,
-0.5210472345352173,
-0.20711563527584076,
0.7905564308166504,
... |
func (l *Ledger) QueryTransaction(txid []byte) (*pb.Transaction, error) {
table := l.ConfirmedTable
pbTxBuf, kvErr := table.Get(txid)
if kvErr != nil {
if def.NormalizedKVError(kvErr) == def.ErrKVNotFound {
return nil, ErrTxNotFound
}
return nil, kvErr
}
realTx := &pb.Transaction{}
parserErr := proto.Unm... | [
0.4065450429916382,
0.22024787962436676,
0.47478267550468445,
0.10809850692749023,
-0.24392908811569214,
-0.3249075412750244,
-0.34064605832099915,
-0.442687451839447,
0.7393121719360352,
0.14762581884860992,
-0.5559674501419067,
-0.24970808625221252,
-0.8658046126365662,
-0.16700340807437... |
func (l *Ledger) IsTxInTrunk(txid []byte) bool {
var blk *pb.InternalBlock
var err error
table := l.ConfirmedTable
pbTxBuf, kvErr := table.Get(txid)
if kvErr != nil {
return false
}
realTx := &pb.Transaction{}
pbErr := proto.Unmarshal(pbTxBuf, realTx)
if pbErr != nil {
l.xlog.Warn("IsTxInTrunk error", "txi... | [
-0.527715265750885,
0.5310518741607666,
0.9504024386405945,
-0.6281411051750183,
-0.3254947364330292,
-0.30189093947410583,
0.11372629553079605,
0.06065759062767029,
-0.10840342938899994,
0.3845820128917694,
0.027731595560908318,
-0.032229065895080566,
-1.5567501783370972,
0.17071406543254... |
func (l *Ledger) FindUndoAndTodoBlocks(curBlockid []byte, destBlockid []byte) ([]*pb.InternalBlock, []*pb.InternalBlock, error) {
l.mutex.RLock()
defer l.mutex.RUnlock()
undoBlocks := []*pb.InternalBlock{}
todoBlocks := []*pb.InternalBlock{}
if bytes.Equal(destBlockid, curBlockid) { //原地踏步的情况...
return undoBlock... | [
-0.36004212498664856,
-0.5995660424232483,
1.1694631576538086,
0.10499048978090286,
-0.4770461916923523,
-0.2336168885231018,
0.8731648921966553,
-0.19386160373687744,
0.21974341571331024,
1.0355517864227295,
-0.19757717847824097,
-0.10331740230321884,
-0.13216787576675415,
0.6062111258506... |
func (l *Ledger) Dump() ([][]string, error) {
l.mutex.RLock()
defer l.mutex.RUnlock()
it := l.baseDB.NewIteratorWithPrefix([]byte(pb.BlocksTablePrefix))
defer it.Release()
blocks := make([][]string, l.meta.TrunkHeight+1)
for it.Next() {
block := &pb.InternalBlock{}
parserErr := proto.Unmarshal(it.Value(), blo... | [
-0.4506252110004425,
0.10346255451440811,
0.6826579570770264,
-0.4179164469242096,
0.002044401131570339,
0.05217619985342026,
0.15421780943870544,
-0.5998028516769409,
-0.7031415700912476,
0.594984233379364,
-0.5108310580253601,
-0.17202603816986084,
-0.5675220489501953,
0.5682597756385803... |
func (l *Ledger) GetGenesisBlock() *GenesisBlock {
if l.GenesisBlock != nil {
return l.GenesisBlock
}
return nil
} | [
0.13888496160507202,
0.9039208292961121,
0.6996893882751465,
1.2891278266906738,
0.30145761370658875,
0.4437076449394226,
-0.1951732337474823,
0.10119757801294327,
-0.44975265860557556,
-0.7018154859542847,
0.13713175058364868,
0.4510897994041443,
-0.37140145897865295,
0.661442756652832,
... |
func (l *Ledger) GetIrreversibleSlideWindow() int64 {
defaultIrreversibleSlideWindow := l.GenesisBlock.GetConfig().GetIrreversibleSlideWindow()
return defaultIrreversibleSlideWindow
} | [
0.3692992925643921,
0.24499252438545227,
0.3869097828865051,
1.0531905889511108,
0.27032917737960815,
0.23436720669269562,
1.5743685960769653,
0.460339218378067,
-1.5256211757659912,
-0.7219277024269104,
-0.3954247236251831,
1.298593282699585,
-1.013498306274414,
0.4993867874145508,
0.17... |
func (l *Ledger) GetMaxBlockSize() int64 {
defaultBlockSize := l.GenesisBlock.GetConfig().GetMaxBlockSizeInByte()
return defaultBlockSize
} | [
0.4152945876121521,
0.43002015352249146,
0.7121073007583618,
1.4488065242767334,
-0.17592598497867584,
-0.10885295271873474,
-0.3488479554653168,
0.5374529361724854,
-0.6651210784912109,
-0.21782396733760834,
-0.769943118095398,
0.34995365142822266,
-1.3118577003479004,
1.505475401878357,
... |
func (l *Ledger) GetNewAccountResourceAmount() int64 {
defaultNewAccountResourceAmount := l.GenesisBlock.GetConfig().GetNewAccountResourceAmount()
return defaultNewAccountResourceAmount
} | [
0.21233989298343658,
-0.6753689050674438,
0.19057497382164001,
0.17676058411598206,
-0.5418989062309265,
-0.4389880895614624,
0.9007369875907898,
0.045405689626932144,
0.0016601176466792822,
-0.41911399364471436,
-0.2557212710380554,
0.23194052278995514,
-0.5446092486381531,
0.618087232112... |
func (l *Ledger) SavePendingBlock(block *pb.InternalBlock) error {
l.xlog.Debug("begin save pending block", "blockid", utils.F(block.Blockid), "tx_count", len(block.Transactions))
blockBuf, pbErr := proto.Marshal(block)
if pbErr != nil {
l.xlog.Warn("save pending block fail, because marshal block fail", "pbErr", p... | [
-0.6067988872528076,
-0.5092262625694275,
0.7555971145629883,
-0.773841381072998,
0.0012454811949282885,
0.48678815364837646,
-0.022782012820243835,
0.16124770045280457,
0.052618466317653656,
0.14766912162303925,
-1.0204527378082275,
-0.7030199766159058,
-1.3004794120788574,
0.959915339946... |
func (l *Ledger) GetPendingBlock(blockID []byte) (*pb.InternalBlock, error) {
l.xlog.Debug("get pending block", "bockid", utils.F(blockID))
blockBuf, ldbErr := l.pendingTable.Get(blockID)
if ldbErr != nil {
if def.NormalizedKVError(ldbErr) != def.ErrKVNotFound { //其他kv错误
l.xlog.Warn("get pending block fail", "e... | [
-0.3482183516025543,
-0.3756423890590668,
1.058391809463501,
-0.05326118692755699,
-0.4150502681732178,
-0.2423504889011383,
-0.05444548651576042,
-0.08242344111204147,
-0.2657879590988159,
0.06596828252077103,
0.4506085216999054,
0.6506980061531067,
-1.0398026704788208,
0.7307639122009277... |
func (l *Ledger) QueryBlockByHeight(height int64) (*pb.InternalBlock, error) {
sHeight := []byte(fmt.Sprintf("%020d", height))
blockID, kvErr := l.heightTable.Get(sHeight)
if kvErr != nil {
if def.NormalizedKVError(kvErr) == def.ErrKVNotFound {
return nil, ErrBlockNotExist
}
return nil, kvErr
}
return l.Q... | [
0.2808800935745239,
0.06974134594202042,
0.6876543760299683,
1.0093672275543213,
-0.5472270250320435,
-0.174772247672081,
0.18210946023464203,
-1.0026739835739136,
-0.45529454946517944,
0.030942261219024658,
-0.49024513363838196,
0.05606392025947571,
-1.0924253463745117,
0.744334876537323,... |
func (l *Ledger) GetBaseDB() kvdb.Database {
return l.baseDB
} | [
0.3808848261833191,
0.029752125963568687,
0.41784918308258057,
1.5160576105117798,
0.15353524684906006,
1.234460473060608,
-0.36881327629089355,
0.11502990871667862,
0.2679007351398468,
-0.27296701073646545,
0.5538461804389954,
1.0200356245040894,
-1.3212372064590454,
0.5514466762542725,
... |
func (l *Ledger) Truncate(utxovmLastID []byte) error {
l.xlog.Info("start truncate ledger", "blockid", utils.F(utxovmLastID))
// 获取账本锁
l.mutex.Lock()
defer l.mutex.Unlock()
batchWrite := l.baseDB.NewBatch()
newMeta := proto.Clone(l.meta).(*pb.LedgerMeta)
newMeta.TipBlockid = utxovmLastID
// 获取裁剪目标区块信息
block... | [
0.05615003779530525,
-0.15896587073802948,
1.1719063520431519,
0.47675856947898865,
0.7098953723907471,
0.24025394022464752,
0.6997518539428711,
-0.578866183757782,
-0.5805951356887817,
0.698707640171051,
0.1687619388103485,
0.03659563511610031,
-0.33915019035339355,
-0.3524162173271179,
... |
func (l *Ledger) QueryBlockByTxid(txid []byte) (*pb.InternalBlock, error) {
if exit, _ := l.HasTransaction(txid); !exit {
return nil, ErrTxNotConfirmed
}
tx, err := l.QueryTransaction(txid)
if err != nil {
return nil, err
}
return l.queryBlock(tx.GetBlockid(), false)
} | [
0.600424587726593,
0.42456233501434326,
0.7429572939872742,
-0.17884545028209686,
-0.6260539889335632,
-0.0031595572363585234,
-0.6851240396499634,
-0.9937618374824524,
-0.2927336096763611,
0.3060626983642578,
0.04131929203867912,
0.0982578843832016,
-0.8130147457122803,
0.4265342056751251... |
func Mount(r *mux.Router, path string, handler http.Handler) {
r.PathPrefix(path).Handler(
http.StripPrefix(
strings.TrimSuffix(path, "/"),
AddSlashForRoot(handler),
),
)
} | [
0.4220634400844574,
-0.6709046959877014,
0.5261549949645996,
-0.09826968610286713,
-1.4150909185409546,
0.3698139488697052,
-0.3271450698375702,
-0.19788599014282227,
0.056172534823417664,
-0.37417563796043396,
-0.009411726146936417,
0.9522939920425415,
0.16465432941913605,
0.1337205320596... |
func AddSlashForRoot(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// @TODO MAYBE ENSURE SUFFIX DOESN'T ALREADY EXIST?
if r.URL.Path == "" {
r.URL.Path = "/"
}
next.ServeHTTP(w, r)
})
} | [
0.9314872026443481,
-0.16734251379966736,
0.5849390029907227,
0.3602842688560486,
-0.2263602912425995,
0.2104211151599884,
0.21857130527496338,
0.2242535948753357,
-0.24507218599319458,
-1.6509983539581299,
-0.1188429743051529,
0.4501859247684479,
0.5354620814323425,
1.3154014348983765,
... |
func NewStandardInfraConfig(ctx *pulumi.Context,
name string, args *StandardInfraConfigArgs, opts ...pulumi.ResourceOption) (*StandardInfraConfig, error) {
if args == nil {
args = &StandardInfraConfigArgs{}
}
args.ApiVersion = pulumi.StringPtr("admin.enmasse.io/v1beta1")
args.Kind = pulumi.StringPtr("StandardInf... | [
0.3241833746433258,
0.43219056725502014,
0.47117432951927185,
0.08837602287530899,
-0.11322233825922012,
0.10663434118032455,
-0.18200722336769104,
1.1281800270080566,
-0.7862483859062195,
0.5846543312072754,
-1.0838292837142944,
0.3251174986362457,
-1.117016315460205,
0.018861955031752586... |
func GetStandardInfraConfig(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *StandardInfraConfigState, opts ...pulumi.ResourceOption) (*StandardInfraConfig, error) {
var resource StandardInfraConfig
err := ctx.ReadResource("kubernetes:admin.enmasse.io/v1beta1:StandardInfraConfig", name, id, state, &resour... | [
0.5804833173751831,
0.2997240722179413,
0.4648842215538025,
0.18869876861572266,
-0.47249120473861694,
0.1934504359960556,
-0.0353538915514946,
0.8088937997817993,
-0.13906681537628174,
0.08463196456432343,
-0.7217587232589722,
0.9033536314964294,
-0.9373682737350464,
-0.6259826421737671,
... |
func UpdateDatesDialog(ctx context.Context, logger log.Logger, client bot.Client, repository model.Repository, channelID string, userID string, triggerID string) error {
var (
dateLayout = "02/01/2006 15:04:05"
initValue = ""
identificationValue = ""
endValue = ""
)
inc, err :=... | [
0.029002543538808823,
-0.3008476495742798,
0.8137602210044861,
-0.5335276126861572,
-0.3410559892654419,
0.41043487191200256,
0.2188011109828949,
-0.07467164099216461,
0.0201843474060297,
0.18741987645626068,
-0.41181647777557373,
0.8519192934036255,
0.011490890756249428,
-0.04685499519109... |
func UpdateDatesByDialog(ctx context.Context, client bot.Client, logger log.Logger, repository model.Repository, incidentDetails bot.DialogSubmission) error {
logger.Info(
ctx,
"command/close.CloseIncidentByDialog INFO",
log.NewValue("incident_close_details", incidentDetails),
)
var (
dateLayout ... | [
0.12007587403059006,
-1.1163560152053833,
0.8553097248077393,
-0.3978109657764435,
-0.80573970079422,
0.5866435170173645,
0.4309384524822235,
0.35565385222435,
0.03079753741621971,
0.15683826804161072,
-0.245138481259346,
0.406533420085907,
-0.46557191014289856,
0.3740750551223755,
0.460... |
func IsTypeErr(err error) bool {
if err == nil {
return false
}
return strings.HasPrefix(err.Error(), "Expected type")
} | [
-1.1304278373718262,
-0.39680787920951843,
0.18129099905490875,
0.3539549708366394,
-0.31434381008148193,
-0.4187406003475189,
-0.4553990960121155,
-0.19253887236118317,
1.2514570951461792,
0.6740459203720093,
-0.2792185842990875,
0.15466175973415375,
-0.6838840246200562,
0.971900522708892... |
func Nth(n int) (int, bool) {
// Split off trivial edge cases
if n == 0 {
return 0, false
} else if n == 1 {
// In particular, avoid even numbers in the sieve.
return 2, true
}
// Build the sieve array incrementally. Start with this size as a guess.
sieveLength := estimateInitialSize(n)
// Assume that al... | [
-0.5657163262367249,
0.6654523611068726,
0.7939302921295166,
0.049719370901584625,
0.025645941495895386,
0.3879198431968689,
1.0353907346725464,
0.3786563277244568,
0.7283073663711548,
0.5843923687934875,
-1.0669838190078735,
-0.2853403389453888,
-0.7195747494697571,
0.7592769265174866,
... |
func sieveOdd(composites []bool, n int) int {
// Assume that 2 is already covered.
foundPrimes := 1
for p := 3; p < len(composites); p += 2 {
if composites[p] {
continue
}
foundPrimes++
// Sieve on multiples of primes, starting from p^2
for i := p; i*p < len(composites); i++ {
composites[i*p] = tr... | [
-0.9387026429176331,
0.2662521302700043,
0.8387018442153931,
-0.4512062966823578,
-0.03749131038784981,
0.865105152130127,
0.39062100648880005,
0.5817282795906067,
0.447256475687027,
0.6622607707977295,
-0.7534031867980957,
-0.14342716336250305,
-0.9660177230834961,
0.5418376326560974,
0... |
func findNthPrime(composites []bool, n int) int {
// Assume that 2 is already covered.
count := 1
// Skip indexes 0 and 1, as they are not primes. Odd numbers only.
for i := 3; i < len(composites); i += 2 {
if !composites[i] {
count++
}
if count == n {
return i
}
}
return 0
} | [
-0.9838622808456421,
0.12884145975112915,
0.6234632134437561,
0.12121853232383728,
0.16848772764205933,
0.6740434765815735,
0.13060298562049866,
-0.4328296184539795,
-0.23734772205352783,
0.38493549823760986,
-0.048624999821186066,
-0.8829498291015625,
-1.6831793785095215,
0.79444253444671... |
func NewGitRepositoryResponseList() *GitRepositoryResponseList {
this := GitRepositoryResponseList{}
return &this
} | [
-0.2353714108467102,
-0.5429608821868896,
0.03227127343416214,
-1.3713935613632202,
0.3284405469894409,
-0.3000395894050598,
0.0982746109366417,
-0.31187206506729126,
0.19723346829414368,
-0.5116815567016602,
-0.8320674300193787,
-1.166036605834961,
-0.538425862789154,
-0.14546476304531097... |
func NewGitRepositoryResponseListWithDefaults() *GitRepositoryResponseList {
this := GitRepositoryResponseList{}
return &this
} | [
-0.1859186589717865,
0.15950672328472137,
0.09995129704475403,
-0.8788482546806335,
1.3149064779281616,
-0.402085542678833,
-0.5496374368667603,
-0.2576020359992981,
0.18174663186073303,
-0.596904456615448,
-1.121977686882019,
-1.9451072216033936,
-0.920512855052948,
0.022426556795835495,
... |
func (o *GitRepositoryResponseList) GetResults() []GitRepositoryResponse {
if o == nil || o.Results == nil {
var ret []GitRepositoryResponse
return ret
}
return *o.Results
} | [
-0.3422979414463043,
0.912897527217865,
-0.05044014751911163,
-0.17697207629680634,
1.17184579372406,
-1.1285152435302734,
0.08261774480342865,
-0.6961573362350464,
0.8312044739723206,
-0.9344537854194641,
-0.2546338737010956,
-1.6690316200256348,
-1.0874974727630615,
1.1109600067138672,
... |
func (o *GitRepositoryResponseList) GetResultsOk() (*[]GitRepositoryResponse, bool) {
if o == nil || o.Results == nil {
return nil, false
}
return o.Results, true
} | [
-0.17751966416835785,
1.3621487617492676,
0.19339728355407715,
0.09655929356813431,
1.2049603462219238,
-0.9549463987350464,
0.5189776420593262,
-0.10041151195764542,
-0.34527724981307983,
-0.36403584480285645,
-0.7702449560165405,
-1.5699323415756226,
0.0631549060344696,
0.487378239631652... |
func (o *GitRepositoryResponseList) HasResults() bool {
if o != nil && o.Results != nil {
return true
}
return false
} | [
0.43151283264160156,
0.9997822642326355,
-0.2723468542098999,
-0.32559946179389954,
1.27702796459198,
-0.6359525918960571,
-0.13818185031414032,
-0.26229923963546753,
-0.09495170414447784,
-1.4067050218582153,
-0.5475347638130188,
-1.2961186170578003,
-0.3226027488708496,
0.718152165412902... |
func (o *GitRepositoryResponseList) SetResults(v []GitRepositoryResponse) {
o.Results = &v
} | [
-0.6723963022232056,
0.17650805413722992,
-0.36010313034057617,
-0.820196807384491,
0.5446540713310242,
-0.50630784034729,
-0.8628625273704529,
-1.3717422485351562,
0.3038846254348755,
-0.3999038636684418,
-0.057940494269132614,
-0.6530462503433228,
-0.44976386427879333,
0.3785139620304107... |
func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
} | [
0.8741579055786133,
-0.631639301776886,
0.8534528017044067,
1.2026909589767456,
0.42606523633003235,
0.8930875062942505,
-0.11484168469905853,
0.11600733548402786,
-0.7203778028488159,
-0.3646620810031891,
0.6552295088768005,
0.16867855191230774,
-0.38348233699798584,
0.8589836955070496,
... |
func _gpurl(link, partname string, strict bool) {
res, err := parseURL(link, partname)
handleError(err)
if res != "" {
fmt.Println(res)
} else if strict {
handleError(fmt.Errorf("%s is empty and strict checking is enabled", partname))
}
} | [
-0.07739239186048508,
-0.10113231837749481,
0.676051139831543,
-0.15864375233650208,
-0.0741184651851654,
0.4383683502674103,
-0.4812157452106476,
-0.010705522261559963,
-1.3411775827407837,
0.15270815789699554,
0.7956018447875977,
0.11514013260602951,
-0.9552022814750671,
-0.4497217833995... |
func (c *CLI) Run(optArgs []string) {
color.Green("Welcome to the Ogen cli")
for {
var t string
if len(optArgs) == 0 {
t = prompt.Input("> ", completer, prompt.OptionCompletionWordSeparator(" "), ctrlCKeybind, ctrlDKeybind)
} else {
t = strings.Join(optArgs, " ")
optArgs[0] = "exit"
}
args := stri... | [
-0.14246906340122223,
-0.46325889229774475,
1.1354093551635742,
-0.36389264464378357,
0.38160112500190735,
0.09015512466430664,
-0.06651701033115387,
-1.3879714012145996,
-1.3706458806991577,
0.39761412143707275,
-0.08737580478191376,
0.16885808110237122,
-1.0305578708648682,
0.33861517906... |
func (b Board) compute_new_state() Board {
nb := make_board(grid_size)
for i := range b {
for j := range b[i] {
num := b.num_neighbours(i, j)
// Is the cell alive next round?
if b[i][j] && num == 2 || num == 3 {
nb[i][j] = true
}
}
}
return nb
} | [
-0.2718517482280731,
0.1966991126537323,
0.6887111663818359,
0.8237947821617126,
-0.3508225083351135,
-0.14425469934940338,
-0.01776992902159691,
0.9639952182769775,
0.16775117814540863,
1.018712043762207,
-0.08842124789953232,
-0.4369243383407593,
-0.4307350218296051,
-0.41224098205566406... |
func (board Board) draw() {
clear()
// There is a 2 layer buffer in all directions, don't draw this
for i := 2; i < board_size; i++ {
for j := 2; j < board_size; j++ {
if board[i][j] {
fmt.Print("x")
} else {
fmt.Print("-")
}
}
fmt.Print("\n")
}
} | [
0.5108448266983032,
0.6858731508255005,
0.8713555335998535,
0.047200530767440796,
0.2393687516450882,
0.8208537697792053,
-0.005299190524965525,
0.17956462502479553,
0.09631051123142242,
-0.4718365967273712,
0.03376535326242447,
1.105858325958252,
-0.18953099846839905,
0.8651595115661621,
... |
func (board Board) add_glider(x int, y int) {
board[x][y+2] = true
board[x+1][y] = true
board[x+1][y+2] = true
board[x+2][y+1] = true
board[x+2][y+2] = true
} | [
0.22343285381793976,
1.081663966178894,
0.8305051922798157,
-0.7473399639129639,
-0.5191910266876221,
0.7485929131507874,
-0.7485859990119934,
0.3566511273384094,
-0.13611146807670593,
0.39516741037368774,
-0.7100694179534912,
0.27301788330078125,
-0.38151976466178894,
0.554734468460083,
... |
func (board Board) add_lwss(x int, y int) {
board[x][y+1] = true
board[x][y+4] = true
board[x+1][y] = true
board[x+2][y] = true
board[x+2][y+4] = true
board[x+3][y] = true
board[x+3][y+1] = true
board[x+3][y+2] = true
board[x+3][y+3] = true
} | [
0.2895685136318207,
0.657070517539978,
0.8923242688179016,
-1.8388285636901855,
-0.8549548983573914,
0.6563959717750549,
-1.0675207376480103,
-0.8299621939659119,
1.3186265230178833,
0.02585756778717041,
-0.7525861859321594,
0.15825749933719635,
-0.5108950138092041,
0.34989455342292786,
... |
func (c *Client) GetCertificate(ctx context.Context, params *GetCertificateInput, optFns ...func(*Options)) (*GetCertificateOutput, error) {
if params == nil {
params = &GetCertificateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetCertificate", params, optFns, addOperationGetCertificateMiddlewares)... | [
0.02918419986963272,
1.0403972864151,
0.5779116749763489,
1.1418260335922241,
0.9297487139701843,
-1.314493179321289,
0.40527456998825073,
-1.4348936080932617,
0.2981649935245514,
-0.4096185863018036,
0.1692342609167099,
1.1890391111373901,
-1.0597068071365356,
-0.7950029373168945,
-0.46... |
func TestTeamInviteStubbing(t *testing.T) {
tc := SetupTest(t, "team", 1)
defer tc.Cleanup()
_, err := kbtest.CreateAndSignupFakeUser("team", tc.G)
require.NoError(t, err)
tc2 := SetupTest(t, "team", 1)
defer tc2.Cleanup()
user2, err := kbtest.CreateAndSignupFakeUser("team", tc2.G)
require.NoError(t, err)
te... | [
0.030529187992215157,
0.7330407500267029,
1.0310100317001343,
0.14055649936199188,
0.4062923491001129,
0.4746537506580353,
-0.10323251783847809,
0.09299574047327042,
-0.5255864262580872,
0.5895745754241943,
-0.8549105525016785,
0.9760399460792542,
0.21966679394245148,
-0.07838120311498642,... |
func (e *Envelope) MarshalDONTUSE() ([]byte, error) {
out := bytes.Buffer{}
var err error
writeBytes := func(data []byte) {
if err != nil {
return
}
_, err = out.Write(data)
}
writeUvarint := func(num uint64) {
buf := make([]byte, binary.MaxVarintLen64)
writeBytes(buf[0:binary.PutUvarint(buf, num)... | [
-0.3870839774608612,
-0.12101737409830093,
1.2074462175369263,
-0.3274571895599365,
0.2612534761428833,
-0.03896939381957054,
-0.01475788839161396,
-0.40486788749694824,
-0.3066871464252472,
0.3274030387401581,
-0.2581000030040741,
0.5419601798057556,
-0.291512131690979,
0.4189718067646026... |
func getbit(a []uint64, x int) uint64 {
return (a[(x)/64] >> uint64((x)%64)) & 1
} | [
-0.30564433336257935,
0.8164074420928955,
0.3898228108882904,
0.9478488564491272,
-0.006974908988922834,
0.12847866117954254,
-0.21165348589420319,
-0.8509225249290466,
0.6342817544937134,
0.22151625156402588,
0.6739618182182312,
0.7621675729751587,
0.44248515367507935,
-0.1495512425899505... |
func dbl(in uint32, e int32) uint64 {
// sample uniformly from [-1, 0, 0, 1]
// Hence, 0 is sampled with twice the probability of 1
e = (((e >> 1) & 1) - (int32(e & 1)))
return uint64((uint64(in) << uint64(1)) - uint64(e))
} | [
-0.43471038341522217,
0.33736908435821533,
0.548787534236908,
-0.3848816156387329,
-0.49502357840538025,
0.9201472997665405,
-0.24077807366847992,
-0.08806925266981125,
0.7242527604103088,
0.5742080807685852,
0.12340935319662094,
-0.05151927471160889,
-0.5060498714447021,
-0.46170800924301... |
func (o *OwnerWrapper) UnmarshalJSON(data []byte) error {
type Alias OwnerWrapper
aux := &struct {
T string
*Alias
}{
Alias: (*Alias)(o),
}
if err := json.Unmarshal(data, &aux); err != nil {
return err
}
if d, err := time.ParseDuration(aux.T); err != nil {
return err
} else {
o.T = d
}
return nil
... | [
-1.3019061088562012,
0.5201727747917175,
0.5464940071105957,
-0.6445032954216003,
-1.0154367685317993,
0.3993396759033203,
0.26611343026161194,
0.3713171184062958,
-0.19144682586193085,
0.684939444065094,
0.013925140723586082,
0.6440728306770325,
0.9648826718330383,
0.456807017326355,
1.... |
func TestOwner_YAML_Unmarshal(t *testing.T) {
assert := asst.New(t)
var wrapper OwnerWrapper
testutil.ReadYAMLTo(t, "testdata/owner.yml", &wrapper)
t.Log(wrapper.S)
t.Log(wrapper.CamelCase)
t.Log(wrapper.XXX)
t.Log(wrapper.Owner.Name)
assert.Equal(OwnerType_ORG, wrapper.Owner.Type)
} | [
-0.4665255546569824,
-0.454192191362381,
0.7054616808891296,
-0.023902200162410736,
0.04595823585987091,
0.18494439125061035,
0.6524195671081543,
0.3040197491645813,
0.6423162221908569,
-0.8552576303482056,
-0.12376579642295837,
0.8785395622253418,
1.3702573776245117,
-0.37405019998550415,... |
func TestOwnerType_UnmarshalJSON(t *testing.T) {
assert := asst.New(t)
// use https://github.com/ghodss/yaml
b := testutil.ReadFixture(t, "testdata/owner.yml")
var wrapper OwnerWrapper
err := jyaml.Unmarshal(b, &wrapper)
assert.Nil(err)
assert.Equal("camelallsmall", wrapper.CamelCase)
// FIXED: error unmarshal... | [
-0.5582842826843262,
-0.11196648329496384,
0.8074066042900085,
-0.5932902693748474,
0.14487235248088837,
0.32647576928138733,
0.35527944564819336,
-0.6262463927268982,
-0.008483575657010078,
0.034395281225442886,
-0.3961753845214844,
0.7495496273040771,
0.747775137424469,
0.003256825031712... |
func (Sample) Fields() []ent.Field {
return nil
} | [
0.0749039575457573,
0.3627854287624359,
0.2019849568605423,
-0.9148374795913696,
0.09424386918544769,
0.6272106170654297,
0.07097279280424118,
-0.019935429096221924,
0.6303858757019043,
-0.9467940330505371,
-0.930334210395813,
-0.125023752450943,
-0.8151971697807312,
-0.27337712049484253,
... |
func (Sample) Edges() []ent.Edge {
return nil
} | [
-0.40238630771636963,
-0.48011207580566406,
0.30909499526023865,
-0.33169665932655334,
-0.03154730796813965,
0.20984934270381927,
-0.7153820395469666,
0.35285937786102295,
0.7618170380592346,
-0.5411478281021118,
-0.008256749249994755,
0.47538527846336365,
-0.599929690361023,
0.05570325255... |
func NewAttachment(fallback, pretext, title, titleLink, text, color, footer string) *Attachment {
return &Attachment{
fallback,
pretext,
title,
titleLink,
text,
color,
footer,
}
} | [
0.046734560281038284,
-0.45729804039001465,
0.04605724290013313,
0.22509509325027466,
-1.7100893259048462,
-0.3790411353111267,
0.3091509938240051,
-0.2824709713459015,
-0.14046436548233032,
-0.41977253556251526,
0.1742742657661438,
0.4668020009994507,
-0.8069430589675903,
0.35191869735717... |
func NewEncoder(writer io.Writer) *Encoder {
bufwrite, ok := writer.(*bufio.Writer)
if !ok {
bufwrite = bufio.NewWriter(writer)
}
p := &Encoder{
writer: bufwrite,
}
return p
} | [
0.35489949584007263,
-0.36349210143089294,
-0.24435065686702728,
0.10779856145381927,
-0.8941575288772583,
0.08568219095468521,
0.33761873841285706,
-0.523671567440033,
0.06312640011310577,
-0.3032499849796295,
-0.20965476334095,
-0.4089180529117584,
-0.44992464780807495,
0.624146401882171... |
func (w *Encoder) Encode(r Reply) error {
err := w.encodeData(r)
if err != nil {
return err
}
return w.writer.Flush()
} | [
0.00911087915301323,
0.7714005708694458,
0.3768157958984375,
-0.2884801924228668,
-0.22044384479522705,
-0.13763684034347534,
0.2202993780374527,
-0.827276885509491,
0.49697840213775635,
0.185450941324234,
-0.09511274844408035,
1.068302869796753,
-1.0560976266860962,
0.05765928328037262,
... |
func NewCompanyCompanyRepositoryV1DeleteByIDDeleteParams() *CompanyCompanyRepositoryV1DeleteByIDDeleteParams {
var ()
return &CompanyCompanyRepositoryV1DeleteByIDDeleteParams{
timeout: cr.DefaultTimeout,
}
} | [
-0.12175728380680084,
-0.5052631497383118,
0.5115663409233093,
0.6738014817237854,
-0.4195208251476288,
-0.11953823268413544,
-0.27922797203063965,
-0.024838220328092575,
-0.02663041464984417,
0.5971593260765076,
-0.5593125224113464,
-0.649513840675354,
-0.42983898520469666,
0.941026449203... |
func NewCompanyCompanyRepositoryV1DeleteByIDDeleteParamsWithTimeout(timeout time.Duration) *CompanyCompanyRepositoryV1DeleteByIDDeleteParams {
var ()
return &CompanyCompanyRepositoryV1DeleteByIDDeleteParams{
timeout: timeout,
}
} | [
0.6752364039421082,
-0.29446545243263245,
0.524947464466095,
0.7074092626571655,
-0.2027892917394638,
0.2858425974845886,
-0.7604416608810425,
0.029846513643860817,
0.012485409155488014,
1.1463426351547241,
-0.47741520404815674,
-0.12718018889427185,
-0.22989049553871155,
0.979223251342773... |
func NewCompanyCompanyRepositoryV1DeleteByIDDeleteParamsWithContext(ctx context.Context) *CompanyCompanyRepositoryV1DeleteByIDDeleteParams {
var ()
return &CompanyCompanyRepositoryV1DeleteByIDDeleteParams{
Context: ctx,
}
} | [
-0.08736923336982727,
-0.3027470111846924,
0.8278040289878845,
0.3370090126991272,
-0.01063594687730074,
0.28845012187957764,
-0.4754963517189026,
-0.5520276427268982,
0.4684745967388153,
0.6682578325271606,
-0.3921673595905304,
-0.4590745270252228,
-0.3023985028266907,
0.18460337817668915... |
func NewCompanyCompanyRepositoryV1DeleteByIDDeleteParamsWithHTTPClient(client *http.Client) *CompanyCompanyRepositoryV1DeleteByIDDeleteParams {
var ()
return &CompanyCompanyRepositoryV1DeleteByIDDeleteParams{
HTTPClient: client,
}
} | [
-0.033251382410526276,
-0.5486200451850891,
0.4763071835041046,
0.5700133442878723,
0.31803372502326965,
0.42053014039993286,
-0.15888023376464844,
-0.06645889580249786,
-0.30647170543670654,
0.19589431583881378,
-0.3524631857872009,
-0.3041711747646332,
-0.38747769594192505,
0.13898907601... |
func (o *CompanyCompanyRepositoryV1DeleteByIDDeleteParams) WithTimeout(timeout time.Duration) *CompanyCompanyRepositoryV1DeleteByIDDeleteParams {
o.SetTimeout(timeout)
return o
} | [
0.6088298559188843,
-0.12826350331306458,
0.3016737699508667,
0.3723340630531311,
-0.23184002935886383,
-0.47500768303871155,
-0.12892693281173706,
0.20117917656898499,
0.6934614181518555,
0.8147672414779663,
0.055011820048093796,
-0.31827235221862793,
0.2657110095024109,
0.554821968078613... |
func (o *CompanyCompanyRepositoryV1DeleteByIDDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
0.49685096740722656,
0.05971939489245415,
0.13066504895687103,
0.6644027233123779,
0.27996355295181274,
0.1386697143316269,
-0.03573046624660492,
0.5047836303710938,
0.2803519070148468,
0.9472368359565735,
0.0647568553686142,
0.03332117572426796,
-0.23904889822006226,
0.515475869178772,
... |
func (o *CompanyCompanyRepositoryV1DeleteByIDDeleteParams) WithContext(ctx context.Context) *CompanyCompanyRepositoryV1DeleteByIDDeleteParams {
o.SetContext(ctx)
return o
} | [
-0.2981036901473999,
-0.21485337615013123,
0.565143883228302,
0.12398885190486908,
-0.3042947053909302,
-0.3556368350982666,
-0.24684755504131317,
-0.2931109666824341,
0.916819155216217,
0.1496376395225525,
-0.021569421514868736,
-0.39546746015548706,
-0.4283876419067383,
-0.22411875426769... |
func (o *CompanyCompanyRepositoryV1DeleteByIDDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-0.3091878890991211,
-0.021010538563132286,
0.39172670245170593,
0.7626944184303284,
0.16697081923484802,
0.2470099925994873,
-0.23933179676532745,
-0.18719960749149323,
0.8033693432807922,
0.5965052247047424,
-0.1318102478981018,
-0.07927241921424866,
-0.5149565935134888,
-0.0494137480854... |
func (o *CompanyCompanyRepositoryV1DeleteByIDDeleteParams) WithHTTPClient(client *http.Client) *CompanyCompanyRepositoryV1DeleteByIDDeleteParams {
o.SetHTTPClient(client)
return o
} | [
0.025986772030591965,
-1.1107959747314453,
0.3863866925239563,
-0.030364349484443665,
0.23484185338020325,
-0.3027414381504059,
0.2962970435619354,
-0.13014744222164154,
0.004434855189174414,
-0.26940253376960754,
-0.11686104536056519,
-0.24939100444316864,
0.11393857002258301,
-0.40349856... |
func (o *CompanyCompanyRepositoryV1DeleteByIDDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
0.3453771770000458,
-0.5720422863960266,
0.11887407302856445,
-0.12390869855880737,
0.015309512615203857,
-0.21883895993232727,
0.2681909203529358,
-0.013294503092765808,
-0.5498936772346497,
0.18688061833381653,
-0.20065182447433472,
-0.09244856238365173,
-0.18898379802703857,
-0.51783859... |
func (o *CompanyCompanyRepositoryV1DeleteByIDDeleteParams) WithCompanyID(companyID int64) *CompanyCompanyRepositoryV1DeleteByIDDeleteParams {
o.SetCompanyID(companyID)
return o
} | [
0.2794713079929352,
-0.9278841018676758,
0.2580529451370239,
0.31047970056533813,
0.2580367624759674,
0.04991869628429413,
0.10083881765604019,
0.13561087846755981,
0.5121781826019287,
1.1442474126815796,
0.12519115209579468,
-0.7635567784309387,
-0.36766111850738525,
0.9966414570808411,
... |
func (o *CompanyCompanyRepositoryV1DeleteByIDDeleteParams) SetCompanyID(companyID int64) {
o.CompanyID = companyID
} | [
-0.22345919907093048,
-0.7351555228233337,
-0.03813765197992325,
0.9321691989898682,
0.3098720908164978,
0.6413418650627136,
-0.07205553352832794,
0.48808860778808594,
0.22978709638118744,
1.3288791179656982,
0.03287532180547714,
-0.23539870977401733,
-0.5630280375480652,
1.612593173980713... |
func (o *CompanyCompanyRepositoryV1DeleteByIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param companyId
if err := r.SetPathParam("companyId", swag.FormatInt64(o.CompanyID)); err != nil {... | [
-0.7770103812217712,
-0.24520091712474823,
0.655550479888916,
-0.1553632616996765,
1.083875298500061,
-0.5163484811782837,
0.9673768877983093,
0.1664964258670807,
0.2281073033809662,
0.47327959537506104,
0.5134317874908447,
-0.004047395195811987,
-0.7900758385658264,
0.09929700195789337,
... |
func acceptableNames(path string) []string {
m := regexp.MustCompile(`^github\.com/Azure/ARO-RP/pkg/api/(v[^/]*[0-9])$`).FindStringSubmatch(path)
if m != nil {
return []string{m[1]}
}
m = regexp.MustCompile(`^github\.com/Azure/ARO-RP/pkg/client/services/redhatopenshift/mgmt/([^/]+)/redhatopenshift$`).FindStringS... | [
0.23258788883686066,
-0.5425142645835876,
0.8736282587051392,
-0.45669421553611755,
-0.1935221403837204,
0.7243643403053284,
-0.12389945983886719,
-0.32387086749076843,
0.3453831970691681,
0.11852987855672836,
0.2946633994579315,
0.3286518156528473,
0.4783385396003723,
0.9000005722045898,
... |
func NewCreateScopedUserRoleSpacesParams() *CreateScopedUserRoleSpacesParams {
var ()
return &CreateScopedUserRoleSpacesParams{
timeout: cr.DefaultTimeout,
}
} | [
0.5357829928398132,
-0.24296842515468597,
-0.05438297614455223,
0.5164265036582947,
0.2570893168449402,
0.7703372240066528,
0.48110800981521606,
-0.17276984453201294,
0.601170003414154,
-0.1645541936159134,
-0.44218960404396057,
0.7740726470947266,
-0.3181626498699188,
0.8529312610626221,
... |
func NewCreateScopedUserRoleSpacesParamsWithTimeout(timeout time.Duration) *CreateScopedUserRoleSpacesParams {
var ()
return &CreateScopedUserRoleSpacesParams{
timeout: timeout,
}
} | [
0.8845916390419006,
-0.14619673788547516,
0.07709439843893051,
0.323862224817276,
-0.05102398619055748,
1.2634906768798828,
-0.32165661454200745,
-0.29969266057014465,
0.6881418228149414,
0.7740140557289124,
-0.3425626754760742,
0.9821482300758362,
-0.2710769474506378,
0.8574127554893494,
... |
func NewCreateScopedUserRoleSpacesParamsWithContext(ctx context.Context) *CreateScopedUserRoleSpacesParams {
var ()
return &CreateScopedUserRoleSpacesParams{
Context: ctx,
}
} | [
0.28008127212524414,
0.11644068360328674,
0.030872872099280357,
0.08349783718585968,
-0.13749000430107117,
1.2683699131011963,
-0.08221903443336487,
-0.9296517372131348,
1.0600087642669678,
0.07886526733636856,
-0.39968904852867126,
0.599428117275238,
-0.4976178705692291,
0.137427300214767... |
func NewCreateScopedUserRoleSpacesParamsWithHTTPClient(client *http.Client) *CreateScopedUserRoleSpacesParams {
var ()
return &CreateScopedUserRoleSpacesParams{
HTTPClient: client,
}
} | [
0.2998872399330139,
-0.39375701546669006,
-0.07606861740350723,
-0.17267252504825592,
0.43934327363967896,
1.277919054031372,
0.3679826855659485,
-0.13195866346359253,
0.5696907639503479,
-0.0874088704586029,
-0.7346075177192688,
0.571858286857605,
-0.08994761854410172,
0.1804879754781723,... |
func (o *CreateScopedUserRoleSpacesParams) WithTimeout(timeout time.Duration) *CreateScopedUserRoleSpacesParams {
o.SetTimeout(timeout)
return o
} | [
0.6411612033843994,
0.40106281638145447,
0.16487255692481995,
-0.06964666396379471,
-0.1558614820241928,
0.7168444395065308,
-0.032433751970529556,
-0.4901500940322876,
0.9428882598876953,
0.29365819692611694,
-0.00595488166436553,
0.45007842779159546,
0.6101762056350708,
0.855720520019531... |
func (o *CreateScopedUserRoleSpacesParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
0.42237573862075806,
0.4163796603679657,
0.042840439826250076,
-0.04660097882151604,
0.33808496594429016,
1.1710054874420166,
-0.2160128951072693,
-0.268711656332016,
0.3535991311073303,
0.24121567606925964,
-0.14713747799396515,
1.2056269645690918,
-0.04408421367406845,
0.950482189655304,... |
func (o *CreateScopedUserRoleSpacesParams) WithContext(ctx context.Context) *CreateScopedUserRoleSpacesParams {
o.SetContext(ctx)
return o
} | [
-0.02659914270043373,
0.6200437545776367,
0.15212783217430115,
-0.07235825806856155,
-0.22931620478630066,
0.6422012448310852,
-0.08872877061367035,
-1.0060378313064575,
1.148228406906128,
-0.3285595774650574,
0.0651286393404007,
0.3746919631958008,
-0.23217496275901794,
0.2077010273933410... |
func (o *CreateScopedUserRoleSpacesParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-0.07470489293336868,
0.6855311989784241,
-0.06394875049591064,
0.3744959533214569,
0.34125518798828125,
0.937598466873169,
-0.06958732008934021,
-0.8270514607429504,
0.9362280964851379,
-0.46364372968673706,
-0.2035883218050003,
1.0340834856033325,
-0.6266568899154663,
0.5335418581962585,... |
func (o *CreateScopedUserRoleSpacesParams) WithHTTPClient(client *http.Client) *CreateScopedUserRoleSpacesParams {
o.SetHTTPClient(client)
return o
} | [
0.21390515565872192,
-0.44143036007881165,
0.13781964778900146,
-0.5658435225486755,
0.04702816531062126,
0.5706327557563782,
0.5750561952590942,
-0.56377112865448,
0.4737549126148224,
-0.5853508710861206,
-0.2705833315849304,
0.22927002608776093,
0.6943024396896362,
-0.014163190498948097,... |
func (o *CreateScopedUserRoleSpacesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
0.39934423565864563,
-0.14351017773151398,
-0.011880372650921345,
-0.8074018359184265,
0.21079696714878082,
0.3984154760837555,
0.5250186920166016,
-0.5332311987876892,
0.005789197050035,
-0.5576463341712952,
-0.5154899954795837,
1.1571897268295288,
-0.05984813719987869,
0.0340938717126846... |
func (o *CreateScopedUserRoleSpacesParams) WithScopedUserRoleResource(scopedUserRoleResource *models.ScopedUserRoleResource) *CreateScopedUserRoleSpacesParams {
o.SetScopedUserRoleResource(scopedUserRoleResource)
return o
} | [
-0.22369176149368286,
0.44984325766563416,
0.1835097074508667,
-0.9130592942237854,
-0.3595544099807739,
0.356507271528244,
0.17053073644638062,
0.2308017462491989,
0.8588436245918274,
-0.32069307565689087,
-0.3404865264892578,
0.2396967113018036,
0.3864867687225342,
-0.28918442130088806,
... |
func (o *CreateScopedUserRoleSpacesParams) SetScopedUserRoleResource(scopedUserRoleResource *models.ScopedUserRoleResource) {
o.ScopedUserRoleResource = scopedUserRoleResource
} | [
-0.6316370368003845,
0.34256213903427124,
0.1132151260972023,
-0.9963585734367371,
-0.10351546853780746,
0.4526510238647461,
0.42539122700691223,
0.4385516941547394,
0.5024625062942505,
-0.11486637592315674,
-0.6056654453277588,
0.6940121650695801,
-0.14351826906204224,
-0.2917851805686950... |
func (o *CreateScopedUserRoleSpacesParams) WithBaseSpaceID(baseSpaceID string) *CreateScopedUserRoleSpacesParams {
o.SetBaseSpaceID(baseSpaceID)
return o
} | [
0.754953920841217,
-0.9597587585449219,
-0.09100394695997238,
-0.14727704226970673,
-0.11257690191268921,
0.7637537717819214,
-0.16890014708042145,
-0.2397293597459793,
1.604816198348999,
0.14925774931907654,
0.29606345295906067,
0.8446276783943176,
0.027024535462260246,
0.9679266214370728... |
func (o *CreateScopedUserRoleSpacesParams) SetBaseSpaceID(baseSpaceID string) {
o.BaseSpaceID = baseSpaceID
} | [
0.2564711570739746,
-1.2836424112319946,
-0.2009691745042801,
-0.03918503597378731,
0.16067278385162354,
1.1089966297149658,
-0.05651852861046791,
-0.1083989143371582,
1.07498300075531,
-0.1403922587633133,
-0.1591147631406784,
1.8154655694961548,
-0.7940650582313538,
1.199689269065857,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.