text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (c *jsiiProxy_CfnWaitCondition) AddDeletionOverride(path *string) {
_jsii_.InvokeVoid(
c,
"addDeletionOverride",
[]interface{}{path},
)
} | [
0.6243850588798523,
0.8459886312484741,
0.6667473316192627,
0.33668822050094604,
-0.0031926538795232773,
0.005247201770544052,
0.3711000084877014,
0.16616129875183105,
0.7267263531684875,
-0.827641487121582,
-0.18431560695171356,
0.5119754076004028,
-0.1569640338420868,
-0.2124876677989959... |
func (c *jsiiProxy_CfnWaitCondition) AddDependsOn(target awscdk.CfnResource) {
_jsii_.InvokeVoid(
c,
"addDependsOn",
[]interface{}{target},
)
} | [
-1.1825263500213623,
0.3267246186733246,
0.428288072347641,
-0.1794097125530243,
0.21326491236686707,
0.0016952472506090999,
0.8324106931686401,
0.1726422905921936,
0.0012346997391432524,
-1.0839422941207886,
-0.9807695746421814,
-0.0808902457356453,
0.15813814103603363,
0.4187440276145935... |
func (c *jsiiProxy_CfnWaitCondition) AddMetadata(key *string, value interface{}) {
_jsii_.InvokeVoid(
c,
"addMetadata",
[]interface{}{key, value},
)
} | [
-0.7503000497817993,
1.2205384969711304,
0.4398549199104309,
0.3569982051849365,
0.537447988986969,
0.5047215819358826,
-0.2680443227291107,
-0.3357921838760376,
-0.5130376219749451,
0.11744231730699539,
-0.2492499202489853,
0.5198239088058472,
-0.164590984582901,
-0.09713629633188248,
-... |
func (c *jsiiProxy_CfnWaitCondition) AddPropertyDeletionOverride(propertyPath *string) {
_jsii_.InvokeVoid(
c,
"addPropertyDeletionOverride",
[]interface{}{propertyPath},
)
} | [
0.7178770899772644,
0.28186532855033875,
0.7621992230415344,
0.6025018095970154,
0.22034306824207306,
0.2382170855998993,
0.1120428815484047,
-0.005108805373311043,
1.0209344625473022,
-0.99834805727005,
0.31202057003974915,
0.32118237018585205,
-0.37796810269355774,
-0.85066819190979,
-... |
func (c *jsiiProxy_CfnWaitCondition) AddPropertyOverride(propertyPath *string, value interface{}) {
_jsii_.InvokeVoid(
c,
"addPropertyOverride",
[]interface{}{propertyPath, value},
)
} | [
-0.6151012182235718,
0.8550869822502136,
0.6925866007804871,
0.5171586871147156,
0.18139971792697906,
0.10296749323606491,
-0.038030289113521576,
-0.5681552290916443,
0.2949044704437256,
-1.5543979406356812,
-0.13325674831867218,
-0.6348779201507568,
-0.69134521484375,
-0.9453854560852051,... |
func (c *jsiiProxy_CfnWaitCondition) ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) {
_jsii_.InvokeVoid(
c,
"applyRemovalPolicy",
[]interface{}{policy, options},
)
} | [
0.012585620395839214,
0.5521530508995056,
0.6487385034561157,
-0.29129576683044434,
0.11637488007545471,
0.6726589202880859,
0.26319175958633423,
0.8319383859634399,
0.9073765873908997,
-0.6956108212471008,
-0.21265612542629242,
-0.29710519313812256,
-0.5764337182044983,
-0.360791653394699... |
func (c *jsiiProxy_CfnWaitCondition) GetAtt(attributeName *string) awscdk.Reference {
var returns awscdk.Reference
_jsii_.Invoke(
c,
"getAtt",
[]interface{}{attributeName},
&returns,
)
return returns
} | [
-0.19154714047908783,
0.6606701612472534,
0.3828575611114502,
-0.89628666639328,
-0.1210581511259079,
-0.5628335475921631,
0.7623401284217834,
-1.3591744899749756,
-0.25092780590057373,
-0.7215657830238342,
0.8281035423278809,
0.9896347522735596,
0.6143741607666016,
-0.5502035617828369,
... |
func (c *jsiiProxy_CfnWaitCondition) GetMetadata(key *string) interface{} {
var returns interface{}
_jsii_.Invoke(
c,
"getMetadata",
[]interface{}{key},
&returns,
)
return returns
} | [
-0.7040014266967773,
1.363246202468872,
0.5158262848854065,
0.6650517582893372,
0.2035396695137024,
-0.5018114447593689,
0.29742512106895447,
-0.9812226295471191,
-0.29599523544311523,
0.23543693125247955,
-0.24433688819408417,
0.7528879642486572,
-0.08358759433031082,
-0.19918511807918549... |
func (c *jsiiProxy_CfnWaitCondition) Inspect(inspector awscdk.TreeInspector) {
_jsii_.InvokeVoid(
c,
"inspect",
[]interface{}{inspector},
)
} | [
-0.38397303223609924,
0.7508260607719421,
0.4639934301376343,
-0.6398453116416931,
0.19542136788368225,
-0.6132158041000366,
1.1673563718795776,
-0.05960526689887047,
-1.2874677181243896,
-0.1859058439731598,
-0.3537125587463379,
0.049049124121665955,
0.34166041016578674,
0.036496881395578... |
func (c *jsiiProxy_CfnWaitCondition) OverrideLogicalId(newLogicalId *string) {
_jsii_.InvokeVoid(
c,
"overrideLogicalId",
[]interface{}{newLogicalId},
)
} | [
0.6317523717880249,
0.2702719569206238,
0.5764068365097046,
-0.13302820920944214,
-0.09475119411945343,
-0.20903000235557556,
0.24270445108413696,
0.33579277992248535,
0.06937938183546066,
-0.5236989259719849,
-0.6194552183151245,
0.8725809454917908,
-0.4731743335723877,
-0.514148056507110... |
func (c *jsiiProxy_CfnWaitCondition) ShouldSynthesize() *bool {
var returns *bool
_jsii_.Invoke(
c,
"shouldSynthesize",
nil, // no parameters
&returns,
)
return returns
} | [
-0.3711644411087036,
1.9444555044174194,
0.5773162841796875,
0.15448631346225739,
0.08858045190572739,
-0.6895778179168701,
0.7922409772872925,
0.0119889872148633,
-0.5903996825218201,
-0.9974982142448425,
-1.018810510635376,
-0.6249248385429382,
-0.6166314482688904,
-0.2662547826766968,
... |
func (c *jsiiProxy_CfnWaitCondition) ToString() *string {
var returns *string
_jsii_.Invoke(
c,
"toString",
nil, // no parameters
&returns,
)
return returns
} | [
0.1918209344148636,
0.7719253897666931,
0.5139836072921753,
-0.26962876319885254,
0.5958463549613953,
-0.32208946347236633,
1.1101254224777222,
-0.8625320196151733,
-0.8085443377494812,
-0.2758381962776184,
-0.15181587636470795,
-0.3474791347980499,
0.07781007140874863,
-1.2305668592453003... |
func NewCfnWaitConditionHandle(scope constructs.Construct, id *string) CfnWaitConditionHandle {
_init_.Initialize()
j := jsiiProxy_CfnWaitConditionHandle{}
_jsii_.Create(
"aws-cdk-lib.aws_cloudformation.CfnWaitConditionHandle",
[]interface{}{scope, id},
&j,
)
return &j
} | [
0.11289967596530914,
-0.32932189106941223,
0.0019884079229086637,
-0.2799783945083618,
-0.2143564522266388,
0.1040574461221695,
0.6490040421485901,
-0.098904088139534,
-1.1494097709655762,
-1.0795522928237915,
-0.27076905965805054,
-0.6527727246284485,
0.3308703899383545,
-0.45370218157768... |
func NewCfnWaitConditionHandle_Override(c CfnWaitConditionHandle, scope constructs.Construct, id *string) {
_init_.Initialize()
_jsii_.Create(
"aws-cdk-lib.aws_cloudformation.CfnWaitConditionHandle",
[]interface{}{scope, id},
c,
)
} | [
0.08027515560388565,
-0.2223929464817047,
0.04425373673439026,
-0.1568889319896698,
0.22876030206680298,
-0.07718949019908905,
0.4520862102508545,
0.17980659008026123,
-1.012026309967041,
-1.5665535926818848,
-0.3236813247203827,
-0.9376847147941589,
0.1645505428314209,
-0.555927038192749,... |
func CfnWaitConditionHandle_IsCfnElement(x interface{}) *bool {
_init_.Initialize()
var returns *bool
_jsii_.StaticInvoke(
"aws-cdk-lib.aws_cloudformation.CfnWaitConditionHandle",
"isCfnElement",
[]interface{}{x},
&returns,
)
return returns
} | [
-0.2888771891593933,
0.5750674605369568,
0.33937621116638184,
0.6634600162506104,
-0.1597621887922287,
0.5928880572319031,
0.6583715081214905,
-0.24088649451732635,
-0.0712558701634407,
-0.6369186043739319,
-0.6557733416557312,
-0.06262621283531189,
-0.2968783676624298,
0.42121827602386475... |
func CfnWaitConditionHandle_IsCfnResource(construct constructs.IConstruct) *bool {
_init_.Initialize()
var returns *bool
_jsii_.StaticInvoke(
"aws-cdk-lib.aws_cloudformation.CfnWaitConditionHandle",
"isCfnResource",
[]interface{}{construct},
&returns,
)
return returns
} | [
-0.3813786804676056,
0.06873984634876251,
0.22806259989738464,
0.19533909857273102,
0.05548086017370224,
-0.11448731273412704,
0.9611236453056335,
0.16082780063152313,
-0.7421087622642517,
-0.98859703540802,
-0.517309308052063,
-0.9437911510467529,
-0.23236730694770813,
0.1251622438430786,... |
func CfnWaitConditionHandle_IsConstruct(x interface{}) *bool {
_init_.Initialize()
var returns *bool
_jsii_.StaticInvoke(
"aws-cdk-lib.aws_cloudformation.CfnWaitConditionHandle",
"isConstruct",
[]interface{}{x},
&returns,
)
return returns
} | [
-0.4168106019496918,
-0.0914878100156784,
0.43880748748779297,
0.4245099127292633,
-0.1596912145614624,
0.8253008127212524,
0.7140887379646301,
-0.4612586200237274,
-0.6820948123931885,
-0.586618959903717,
-0.3015501797199249,
-0.3956798017024994,
0.2839263677597046,
-0.16739396750926971,
... |
func (c *jsiiProxy_CfnWaitConditionHandle) AddDeletionOverride(path *string) {
_jsii_.InvokeVoid(
c,
"addDeletionOverride",
[]interface{}{path},
)
} | [
0.7069376707077026,
0.6050388813018799,
0.6533259153366089,
0.36802905797958374,
-0.027593696489930153,
0.14225901663303375,
0.5421258211135864,
0.19544576108455658,
0.5673108696937561,
-0.8094794750213623,
-0.1764208972454071,
0.4290727376937866,
-0.18721766769886017,
-0.3728892207145691,... |
func (c *jsiiProxy_CfnWaitConditionHandle) AddDependsOn(target awscdk.CfnResource) {
_jsii_.InvokeVoid(
c,
"addDependsOn",
[]interface{}{target},
)
} | [
-1.1138423681259155,
0.11760465055704117,
0.4038560688495636,
-0.1311175674200058,
0.23878152668476105,
0.20211896300315857,
0.9530696272850037,
0.21337532997131348,
-0.13533636927604675,
-1.1189547777175903,
-0.8874730467796326,
-0.09947464615106583,
0.08626748621463776,
0.244001552462577... |
func (c *jsiiProxy_CfnWaitConditionHandle) AddMetadata(key *string, value interface{}) {
_jsii_.InvokeVoid(
c,
"addMetadata",
[]interface{}{key, value},
)
} | [
-0.6487952470779419,
0.9866757988929749,
0.41653674840927124,
0.35447150468826294,
0.5339214205741882,
0.7342201471328735,
-0.08832860738039017,
-0.1791079193353653,
-0.6602239608764648,
0.0953744426369667,
-0.12243590503931046,
0.38817691802978516,
-0.16234959661960602,
-0.227121978998184... |
func (c *jsiiProxy_CfnWaitConditionHandle) AddPropertyDeletionOverride(propertyPath *string) {
_jsii_.InvokeVoid(
c,
"addPropertyDeletionOverride",
[]interface{}{propertyPath},
)
} | [
0.7523882389068604,
0.14570112526416779,
0.750464916229248,
0.6001558303833008,
0.24817503988742828,
0.32851311564445496,
0.220502570271492,
0.058092422783374786,
0.8841825127601624,
-0.98411625623703,
0.35126760601997375,
0.2387644350528717,
-0.4138656556606293,
-0.9741626381874084,
-0.... |
func (c *jsiiProxy_CfnWaitConditionHandle) AddPropertyOverride(propertyPath *string, value interface{}) {
_jsii_.InvokeVoid(
c,
"addPropertyOverride",
[]interface{}{propertyPath, value},
)
} | [
-0.5617685317993164,
0.6755383610725403,
0.6678511500358582,
0.4737263023853302,
0.24924612045288086,
0.23953969776630402,
0.06259785592556,
-0.4612724781036377,
0.1459103673696518,
-1.544715166091919,
-0.06381848454475403,
-0.7274351119995117,
-0.7497223019599915,
-1.0802052021026611,
-... |
func (c *jsiiProxy_CfnWaitConditionHandle) ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) {
_jsii_.InvokeVoid(
c,
"applyRemovalPolicy",
[]interface{}{policy, options},
)
} | [
0.004671340808272362,
0.4225558638572693,
0.6260696649551392,
-0.2562111020088196,
0.15571439266204834,
0.7681512832641602,
0.31882593035697937,
0.8257015943527222,
0.856155514717102,
-0.6932534575462341,
-0.19906537234783173,
-0.34091752767562866,
-0.6416832804679871,
-0.3466647267341614,... |
func (c *jsiiProxy_CfnWaitConditionHandle) GetAtt(attributeName *string) awscdk.Reference {
var returns awscdk.Reference
_jsii_.Invoke(
c,
"getAtt",
[]interface{}{attributeName},
&returns,
)
return returns
} | [
-0.04216977581381798,
0.4581161141395569,
0.354216992855072,
-0.8798409700393677,
-0.089056096971035,
-0.3180966079235077,
0.8536580204963684,
-1.262670636177063,
-0.359221875667572,
-0.7107627987861633,
0.9975352883338928,
0.8775634765625,
0.5886393189430237,
-0.6790342330932617,
-0.049... |
func (c *jsiiProxy_CfnWaitConditionHandle) GetMetadata(key *string) interface{} {
var returns interface{}
_jsii_.Invoke(
c,
"getMetadata",
[]interface{}{key},
&returns,
)
return returns
} | [
-0.5877928137779236,
1.1301627159118652,
0.49143463373184204,
0.6216863393783569,
0.23295041918754578,
-0.2501705586910248,
0.3976772129535675,
-0.8031335473060608,
-0.4397311210632324,
0.19089359045028687,
-0.12339194864034653,
0.6282397508621216,
-0.14174552261829376,
-0.3835349380970001... |
func (c *jsiiProxy_CfnWaitConditionHandle) Inspect(inspector awscdk.TreeInspector) {
_jsii_.InvokeVoid(
c,
"inspect",
[]interface{}{inspector},
)
} | [
-0.23444433510303497,
0.48972710967063904,
0.4232841730117798,
-0.5870528817176819,
0.3354106545448303,
-0.13287466764450073,
1.3615857362747192,
-0.05637827515602112,
-1.4693087339401245,
-0.34804391860961914,
-0.09407023340463638,
-0.08267483860254288,
0.29490551352500916,
-0.26866143941... |
func (c *jsiiProxy_CfnWaitConditionHandle) OverrideLogicalId(newLogicalId *string) {
_jsii_.InvokeVoid(
c,
"overrideLogicalId",
[]interface{}{newLogicalId},
)
} | [
0.6969323754310608,
0.05835781618952751,
0.5502769351005554,
-0.11475422978401184,
-0.04647500813007355,
-0.03282288834452629,
0.3700549006462097,
0.341269314289093,
-0.03927446901798248,
-0.5650028586387634,
-0.49083682894706726,
0.7740310430526733,
-0.5295482873916626,
-0.651878714561462... |
func (c *jsiiProxy_CfnWaitConditionHandle) ShouldSynthesize() *bool {
var returns *bool
_jsii_.Invoke(
c,
"shouldSynthesize",
nil, // no parameters
&returns,
)
return returns
} | [
-0.265841543674469,
1.6985901594161987,
0.5402852296829224,
0.19204996526241302,
0.07244153320789337,
-0.5204869508743286,
0.9394509792327881,
0.060088060796260834,
-0.6955219507217407,
-0.9476839303970337,
-0.9311192035675049,
-0.7726215720176697,
-0.5717350840568542,
-0.3758230209350586,... |
func (c *jsiiProxy_CfnWaitConditionHandle) ToString() *string {
var returns *string
_jsii_.Invoke(
c,
"toString",
nil, // no parameters
&returns,
)
return returns
} | [
0.49948933720588684,
0.41949763894081116,
0.47504788637161255,
-0.27639782428741455,
0.695936381816864,
0.29134443402290344,
1.2990795373916626,
-0.8260995149612427,
-0.9252775311470032,
-0.5533599853515625,
0.100221648812294,
-0.467472106218338,
-0.12280885875225067,
-1.4483169317245483,
... |
func NewKey(str string) Key {
b := bytes.NewBufferString(``)
return &key{str, parseUnquoted(b, str, str, []interface{}{})}
} | [
0.6002954840660095,
-0.3661879897117615,
0.34567752480506897,
0.3870251774787903,
-0.7858344912528992,
-0.1465664952993393,
-0.4312366247177124,
0.07279171049594879,
-0.12286017835140228,
0.19434906542301178,
-0.6228453516960144,
0.6275877356529236,
-1.1212892532348633,
-0.4385271966457367... |
func Multiply(n1 int, n2 int) {
fmt.Println(n1 * n2)
} | [
-1.32156503200531,
-0.12272515892982483,
0.549309253692627,
1.1111563444137573,
0.026659345254302025,
0.4256424307823181,
-0.695735514163971,
-1.3014894723892212,
-0.8483119010925293,
-0.45944151282310486,
-0.36793261766433716,
0.5757372379302979,
-0.21632075309753418,
0.40190839767456055,... |
func NewExample(db *db.DB) *Example {
return &Example{
db: db,
}
} | [
0.6962708830833435,
0.5845233798027039,
-0.10236071795225143,
0.7313452959060669,
-1.7079840898513794,
0.5437549948692322,
-1.1597535610198975,
0.28744271397590637,
0.3027990460395813,
0.9299336075782776,
-1.0401718616485596,
0.5313676595687866,
-0.32828831672668457,
0.6969394683837891,
... |
func Duration(str string) time.Duration {
dur, err := time.ParseDuration(str)
if err != nil {
panic(err)
}
return dur
} | [
0.41219383478164673,
-0.6166269183158875,
0.02452780492603779,
0.3079732358455658,
-0.8398390412330627,
0.09776382148265839,
0.28074178099632263,
0.037892233580350876,
0.3690187335014343,
0.4121455252170563,
-0.18071047961711884,
0.21967758238315582,
0.007744374684989452,
-0.53423434495925... |
func (orgVdcNet *OpenApiOrgVdcNetwork) GetOpenApiOrgVdcNetworkDhcp() (*OpenApiOrgVdcNetworkDhcp, error) {
if orgVdcNet == nil || orgVdcNet.client == nil {
return nil, fmt.Errorf("error - Org VDC network and client cannot be nil")
}
client := orgVdcNet.client
endpoint := types.OpenApiPathVersion1_0_0 + types.Open... | [
-0.644088625907898,
-0.1878337860107422,
0.9248290061950684,
-0.4338349401950836,
0.3960264325141907,
0.0747695192694664,
-0.13985927402973175,
-0.5918700695037842,
0.22403575479984283,
-0.21406370401382446,
0.6858072876930237,
-0.5911455154418945,
-0.7247940301895142,
-0.9839996099472046,... |
func (vdc *Vdc) GetOpenApiOrgVdcNetworkDhcp(orgNetworkId string) (*OpenApiOrgVdcNetworkDhcp, error) {
client := vdc.client
// Inject Vdc ID filter to perform filtering on server side
params := url.Values{}
queryParameters := queryParameterFilterAnd("orgVdc.id=="+vdc.Vdc.ID, params)
endpoint := types.OpenApiPathV... | [
-0.49318841099739075,
0.030874930322170258,
0.8673154711723328,
-0.4903337359428406,
0.2377769649028778,
-0.01388684194535017,
-0.21744666993618011,
-0.9439700245857239,
0.24485789239406586,
0.10522150248289108,
0.6341795325279236,
-0.33090150356292725,
-0.8067561984062195,
-0.627154290676... |
func (vdc *Vdc) UpdateOpenApiOrgVdcNetworkDhcp(orgNetworkId string, orgVdcNetworkDhcpConfig *types.OpenApiOrgVdcNetworkDhcp) (*OpenApiOrgVdcNetworkDhcp, error) {
return updateOrgNetworkDhcp(vdc.client, orgNetworkId, orgVdcNetworkDhcpConfig)
} | [
-0.5384806990623474,
-0.6935902833938599,
0.4441324472427368,
-0.34530505537986755,
0.1412542164325714,
0.3914879858493805,
0.0040246774442493916,
-0.5470229387283325,
0.33835914731025696,
0.4054679870605469,
0.3533410429954529,
-0.648128867149353,
-0.6469820141792297,
-0.7895509004592896,... |
func (vdc *Vdc) DeleteOpenApiOrgVdcNetworkDhcp(orgNetworkId string) error {
endpoint := types.OpenApiPathVersion1_0_0 + types.OpenApiEndpointOrgVdcNetworksDhcp
apiVersion, err := vdc.client.getOpenApiHighestElevatedVersion(endpoint)
if err != nil {
return err
}
if orgNetworkId == "" {
return fmt.Errorf("canno... | [
-0.14752398431301117,
-0.4113816022872925,
0.27726513147354126,
-0.28122028708457947,
0.3018203675746918,
0.35529443621635437,
-0.057614076882600784,
-0.7504570484161377,
0.06968905031681061,
0.3284520208835602,
0.038056135177612305,
-0.6321948170661926,
-1.1101219654083252,
-0.30676677823... |
func (orgVdcNet *OpenApiOrgVdcNetwork) DeletNetworkDhcp() error {
endpoint := types.OpenApiPathVersion1_0_0 + types.OpenApiEndpointOrgVdcNetworksDhcp
apiVersion, err := orgVdcNet.client.getOpenApiHighestElevatedVersion(endpoint)
if err != nil {
return err
}
if orgVdcNet.OpenApiOrgVdcNetwork.ID == "" {
return ... | [
-0.3759571611881256,
-0.41513532400131226,
0.4978073239326477,
-0.4267912805080414,
0.5809776186943054,
0.23509880900382996,
-0.04945094510912895,
-0.8837144374847412,
-0.13208337128162384,
0.16044311225414276,
0.008671657182276249,
-0.348712295293808,
-0.782995343208313,
-0.65542298555374... |
func main() {
other.Hail()
} | [
1.061384677886963,
0.5582045912742615,
0.4142608642578125,
1.9785155057907104,
0.35133665800094604,
0.80675208568573,
0.5190753936767578,
-0.9782800674438477,
-0.20030969381332397,
-0.4810684323310852,
-0.4889551103115082,
0.17861855030059814,
0.15914848446846008,
0.7720357775688171,
0.6... |
func commonChars(A []string) int {
cnt := [26]int{}
for i := range cnt {
cnt[i] = math.MaxUint16
}
cntInWord := [26]int{}
for _, word := range A {
for _, char := range []byte(word) { // compiler trick - here we will not allocate new memory
cntInWord[char-'a']++
}
for i := 0; i < 26; i++ {
if cntInWo... | [
0.31046223640441895,
-0.24740713834762573,
0.9553288221359253,
-0.8340418338775635,
-0.03857463598251343,
-0.4800695776939392,
1.1832438707351685,
-0.012629472650587559,
-0.11179028451442719,
0.7292868494987488,
0.30681711435317993,
0.15786825120449066,
-0.9003667831420898,
0.4495002329349... |
func (mock *SearchItemServiceMock) IncrementCountCalls() []struct {
Item *wsproto.SearchItem
} {
var calls []struct {
Item *wsproto.SearchItem
}
lockSearchItemServiceMockIncrementCount.RLock()
calls = mock.calls.IncrementCount
lockSearchItemServiceMockIncrementCount.RUnlock()
return calls
} | [
-0.4548240900039673,
0.16736620664596558,
0.42396971583366394,
1.2366763353347778,
0.6150705814361572,
-0.09198356419801712,
0.7252636551856995,
-0.9157164096832275,
0.43598052859306335,
-0.29466015100479126,
-0.37323081493377686,
-0.39221033453941345,
-0.7680193781852722,
0.04557056352496... |
func (mock *SearchItemServiceMock) WordExistsCalls() []struct {
SearchTerm string
Items []*wsproto.SearchItem
Increment bool
} {
var calls []struct {
SearchTerm string
Items []*wsproto.SearchItem
Increment bool
}
lockSearchItemServiceMockWordExists.RLock()
calls = mock.calls.WordExists
lockSea... | [
-0.4010736346244812,
0.14996209740638733,
0.5137704014778137,
0.582226574420929,
0.6184638142585754,
0.3217957019805908,
-0.08303576707839966,
-1.030959129333496,
0.45361247658729553,
0.41210687160491943,
-0.3835899829864502,
0.020062798634171486,
-1.0708481073379517,
0.5986452102661133,
... |
func (builder *builder) build(context *cli.Context, p *Project) error {
return builder.buildFunc(builder, context, p)
} | [
-0.6213427782058716,
0.5126039981842041,
0.03952040150761604,
0.7985014319419861,
0.3578593134880066,
0.4669366478919983,
0.3612738847732544,
0.30952712893486023,
-0.44177675247192383,
-0.8534117341041565,
-0.02733321487903595,
0.625139057636261,
0.26416534185409546,
-0.19002608954906464,
... |
func withGradleStaticCompilation(p *Project, build procedure) procedure {
buildFile := filepath.Join(p.Path, "build.gradle")
return withFileRestoration(buildFile, func() error {
// Append extra configuration to build.gradle
from, err := os.Open(pathExtraBuildGradle)
if err != nil {
return err
}
to, err... | [
0.45299533009529114,
-0.4652896821498871,
0.8862119913101196,
-0.42321330308914185,
-0.40795382857322693,
0.8552567362785339,
0.2602173388004303,
-0.13690949976444244,
-0.4779747724533081,
0.7895085215568542,
-0.05476746708154678,
-0.18753503262996674,
0.022498719394207,
-0.045453414320945... |
func withFileRestoration(filePath string, build procedure) procedure {
return func() error {
backup := filePath + ".bak"
// Backup original file
_, err := shutil.Copy(filePath, backup, false)
if err != nil {
return err
}
// Execute build function
err = build()
// Restore file once done
_, err2 ... | [
0.8221588134765625,
-0.3350183963775635,
0.6323411464691162,
0.01829618588089943,
-0.8067408800125122,
-0.32366371154785156,
0.58719801902771,
0.6515255570411682,
0.0662756934762001,
0.08656447380781174,
0.07843515276908875,
-1.2961926460266113,
0.6050206422805786,
-1.4548882246017456,
-... |
func withCleanup(argPath string, build procedure) procedure {
return func() error {
// Record files names before build
f, err := os.Open(argPath)
if err != nil {
return err
}
files, err := f.Readdirnames(-1)
if err != nil {
return err
}
if err = f.Close(); err != nil {
return err
}
oldF... | [
0.6022584438323975,
-1.2888010740280151,
1.2922440767288208,
-0.24427933990955353,
-0.15693214535713196,
0.04809490218758583,
0.9038389921188354,
-0.018834693357348442,
0.32863524556159973,
1.150648593902588,
0.196066752076149,
-0.4024966359138489,
0.281893789768219,
-0.2714996337890625,
... |
func buildGradle(builder *builder, c *cli.Context, p *Project, build procedure) error {
if p.isGroovy() {
// For Groovy projects, first try a static compilation as it allows FindSecBugs to find more vulnerabilites
log.Infof("Building %s project at %s with static compilation.\n", builder.name, p.Path)
err := wit... | [
0.12565617263317108,
0.5186732411384583,
0.6543974876403809,
0.2556855380535126,
0.6880664825439453,
0.6399635076522827,
-0.2513696253299713,
0.15472909808158875,
-0.3656759560108185,
0.3581969439983368,
0.3710590898990631,
0.15161477029323578,
-0.5093320608139038,
-0.040867879986763,
0.... |
func buildGeneric(builder *builder, c *cli.Context, p *Project, build procedure) error {
log.Infof("Building %s project at %s.\n", builder.name, p.Path)
if err := withCleanup(p.Path, build)(); err != nil {
log.Errorf("Project couldn't be built: %s\n", err.Error())
return err
}
log.Info("Project built.")
retur... | [
-0.5661178231239319,
0.4612673223018646,
0.46546095609664917,
0.4933490455150604,
0.5216577649116516,
0.958143413066864,
-0.5305311679840088,
0.3209618628025055,
-1.104671597480774,
0.24832044541835785,
0.6080155372619629,
0.5239964127540588,
0.18336476385593414,
-0.5938008427619934,
-0.... |
func deleteEmpty(strs []string) []string {
r := make([]string, 0, len(strs))
for _, str := range strs {
if str != "" {
r = append(r, str)
}
}
return r
} | [
-0.07230793684720993,
-0.9029066562652588,
0.7864754796028137,
-0.27834731340408325,
1.1316231489181519,
-0.03305766358971596,
-0.9298712015151978,
-0.2560914158821106,
0.41600286960601807,
1.178505301475525,
0.4874228537082672,
1.1610565185546875,
-0.1312912106513977,
0.27070850133895874,... |
func HasBuilder(info os.FileInfo) bool {
for _, b := range builders {
if b.canBuild(info) {
return true
}
}
return false
} | [
0.41110387444496155,
-0.25010132789611816,
0.48796793818473816,
1.0098557472229004,
-0.26238003373146057,
0.7155137062072754,
0.15944628417491913,
1.399637222290039,
-0.636461079120636,
-1.2661288976669312,
-0.3594382107257843,
-0.558638334274292,
-0.2604149580001831,
1.9477057456970215,
... |
func bestBuilder(infos []os.FileInfo) *builder {
bestBuilder := math.MaxInt32
// Run each Builders' detection on every files
for _, f := range infos {
for i, b := range builders {
if b.canBuild(f) && i < bestBuilder {
// Remember the best builder we found
bestBuilder = i
}
}
}
if bestBuilder !=... | [
0.6216176748275757,
-0.8644762635231018,
0.6120997071266174,
0.92876797914505,
-0.6045655012130737,
0.4625318944454193,
0.0852963775396347,
0.7051463723182678,
0.034602437168359756,
-1.7583123445510864,
0.13284890353679657,
-0.03874551132321358,
-0.6452476978302002,
1.0124561786651611,
-... |
func BeginBlocker(ctx sdk.Context, ccsKeeper ccstorage.Keeper) {
if ctx.BlockHeight() > 1 {
for _, event := range ctx.EventManager().Events() {
if event.Type == types.MintEventType {
// found mint event.
for _, attr := range event.Attributes {
if bytes.Equal(attr.Key, []byte(sdk.AttributeKeyAmount)) ... | [
-0.0434001125395298,
-0.05752428621053696,
1.0900821685791016,
0.12347256392240524,
-0.6995660066604614,
-0.4706166684627533,
0.43483966588974,
-0.9695233702659607,
-0.33377090096473694,
0.5969892144203186,
0.12752000987529755,
-0.06201687455177307,
0.11211278289556503,
0.9839566349983215,... |
func fiat_p224_addcarryx_u32(x uint32, y uint32, carry fiat_p224_uint1) (uint32, fiat_p224_uint1) {
var sum uint32
var carryOut uint32
sum, carryOut = bits.Add32(x, y, uint32(carry))
return sum, fiat_p224_uint1(carryOut)
} | [
0.03226197510957718,
0.46063098311424255,
1.0067652463912964,
0.35710608959198,
0.002471572021022439,
0.5014262795448303,
-1.1543092727661133,
-0.9832485914230347,
-0.5855219960212708,
-1.1555622816085815,
-0.2727801501750946,
-0.013373257592320442,
0.32874739170074463,
0.2831754684448242,... |
func fiat_p224_subborrowx_u32(x uint32, y uint32, carry fiat_p224_uint1) (uint32, fiat_p224_uint1) {
var sum uint32
var carryOut uint32
sum, carryOut = bits.Sub32(x, y, uint32(carry))
return sum, fiat_p224_uint1(carryOut)
} | [
0.224472314119339,
0.6522065997123718,
0.8554173707962036,
0.7271658182144165,
-0.6013824939727783,
0.30004242062568665,
-1.0152041912078857,
-0.7048168778419495,
-0.5240727663040161,
-0.8929204940795898,
-0.47614848613739014,
-0.024509040638804436,
0.020119071006774902,
-0.180162638425827... |
func fiat_p224_cmovznz_u32(out1 *uint32, arg1 fiat_p224_uint1, arg2 uint32, arg3 uint32) {
var x1 uint32 = (uint32(arg1) * 0xffffffff)
var x2 uint32 = ((x1 & arg3) | ((^x1) & arg2))
*out1 = x2
} | [
-0.40764108300209045,
0.3020971119403839,
0.47316935658454895,
0.9986619353294373,
-0.5483571887016296,
-0.0998750850558281,
0.15998663008213043,
-0.025795526802539825,
-0.7548975348472595,
-0.7283455729484558,
-0.3096503019332886,
0.2501588463783264,
0.016803277656435966,
0.45095431804656... |
func fiat_p224_cmovznz_u1(out1 *fiat_p224_uint1, arg1 fiat_p224_uint1, arg2 fiat_p224_uint1, arg3 fiat_p224_uint1) {
var x1 fiat_p224_uint1 = ((arg1 & arg3) | ((^arg1) & arg2))
*out1 = x1
} | [
-0.7843969464302063,
-0.35032761096954346,
0.5228326320648193,
1.4321116209030151,
-0.2615620195865631,
-0.13010798394680023,
0.7636564373970032,
1.1095566749572754,
-0.7343222498893738,
-0.32760798931121826,
-0.21059605479240417,
0.24734482169151306,
0.1367529183626175,
-0.044156972318887... |
func fiat_p224_selectznz(out1 *[7]uint32, arg1 fiat_p224_uint1, arg2 *[7]uint32, arg3 *[7]uint32) {
var x1 uint32
fiat_p224_cmovznz_u32(&x1, arg1, (arg2[0]), (arg3[0]))
var x2 uint32
fiat_p224_cmovznz_u32(&x2, arg1, (arg2[1]), (arg3[1]))
var x3 uint32
fiat_p224_cmovznz_u32(&x3, arg1, (arg2[2]), (arg3[2]))
... | [
-0.41477352380752563,
-0.7027679085731506,
0.6158924102783203,
0.4975490868091583,
-0.34004974365234375,
-1.079458236694336,
0.8529784679412842,
-0.22926650941371918,
-0.139879509806633,
0.058712270110845566,
-0.6950086951255798,
0.2111470252275467,
-0.15061892569065094,
0.0521793328225612... |
func (c *Server) ConsumerStart() error {
con, err := c.Rabbit.Connection()
if err != nil {
return err
}
go c.ClosedConnectionListener(con.NotifyClose(make(chan *amqp.Error)))
channel, err := con.Channel()
if err != nil {
return err
}
if err := c.DeclareCreate(channel); err != nil {
return err
}
if er... | [
-0.27694764733314514,
-0.2107619196176529,
0.6569889187812805,
-0.4210074543952942,
1.2625312805175781,
-0.12179655581712723,
-0.312814861536026,
-0.6090187430381775,
-0.5920934677124023,
0.9243432879447937,
0.0033355935011059046,
0.7196855545043945,
-0.20453321933746338,
0.542115867137908... |
func (c *Server) consume(channel *amqp.Channel, id int) {
msgs, err := channel.Consume(
c.Config.QueueName,
fmt.Sprintf("%s (%d/%d)", c.Config.ConsumerName, id, c.Config.ConsumerCount),
false,
false,
false,
false,
nil,
)
if err != nil {
log.Println(fmt.Sprintf("CRITICAL: Unable to start consumer (%d/... | [
0.14788173139095306,
-0.6689764261245728,
0.6313632726669312,
-0.3689395785331726,
0.5868659019470215,
-0.30738845467567444,
-0.10316826403141022,
-0.4918234348297119,
-0.4880378246307373,
1.2519758939743042,
-0.10337280482053757,
0.6286025047302246,
-0.3241528570652008,
1.0402532815933228... |
func (g *Game) TankCenter() intersect.Point { return g.tank } | [
0.09512791037559509,
-0.98260098695755,
0.5347440838813782,
-0.5479456186294556,
0.8476524353027344,
0.8404256701469421,
-0.046753477305173874,
-0.35680750012397766,
-0.5744427442550659,
0.30176493525505066,
0.8115249276161194,
-0.508746862411499,
0.10187813639640808,
0.3900880515575409,
... |
func (g *Game) TargetCenter() intersect.Point { return g.target } | [
0.01740914396941662,
-0.682903528213501,
0.505372166633606,
-0.09613411128520966,
0.8848986029624939,
0.8366683125495911,
0.44342631101608276,
0.22199200093746185,
0.21885918080806732,
0.794647216796875,
1.115283489227295,
0.22126483917236328,
0.23453989624977112,
-0.43944522738456726,
-... |
func (g *Game) Bullets() []intersect.Point { return g.bullets } | [
-0.550370454788208,
-0.6588906049728394,
0.4278920888900757,
0.8629252314567566,
0.7582253813743591,
1.5467555522918701,
-0.6504431366920471,
-0.6146493554115295,
0.5288056135177612,
0.3391769230365753,
-0.29720357060432434,
0.3883476257324219,
-0.6315739154815674,
0.037328049540519714,
... |
func (g *Game) Smoke() []intersect.Point {
// TODO: This is an inefficient allocation/copy; fix?
p := make([]intersect.Point, len(g.smoke))
for i, s := range g.smoke {
p[i] = s.position
}
return p
} | [
-1.2656508684158325,
-0.4343201518058777,
0.6431981325149536,
0.5088642835617065,
0.43269553780555725,
-0.04308320954442024,
-0.035855844616889954,
0.2989937663078308,
0.3200148642063141,
0.8978254199028015,
0.1226080134510994,
0.03266894817352295,
-0.2528716027736664,
-0.06996019184589386... |
func (g *Game) ProcessInput(i Input) {
g.tankDir = i.TankDir
if i.Fire {
g.bullets = append(g.bullets, g.tank)
}
} | [
-1.3043828010559082,
-0.1400069147348404,
0.430630087852478,
-0.4552866816520691,
0.3242606818675995,
0.7206558585166931,
0.14034612476825714,
-0.5828885436058044,
0.321737140417099,
-0.18804436922073364,
-0.49353426694869995,
0.21662035584449768,
-0.573589563369751,
0.6935228705406189,
... |
func (g *Game) AdvanceSimulation(msSinceStart float64) {
ticksSinceStart := int(msSinceStart / TimeStepMS)
// advance physics simulation until we are "caught up"
// see https://gafferongames.com/post/fix_your_timestep/
for g.simTicks < ticksSinceStart {
g.SimulateTimeStep()
}
} | [
0.04280540347099304,
0.8193735480308533,
0.5359287858009338,
-0.30454012751579285,
-0.6703031659126282,
-0.21730639040470123,
-0.06071503832936287,
-0.8033783435821533,
-0.23294752836227417,
0.0602208636701107,
0.04638233408331871,
-0.43253540992736816,
-0.30702683329582214,
0.522586524486... |
func newChoiceBuilder(choiceDef *ChoiceDef) ChoiceBuilder {
return &chosenBuilder{
choiceDef: choiceDef,
}
} | [
-0.3644021153450012,
-0.32300910353660583,
0.1952187716960907,
1.2089215517044067,
-0.7378127574920654,
0.22897133231163025,
-0.20715796947479248,
0.43255987763404846,
0.8197115659713745,
0.1552252471446991,
-0.615152895450592,
0.41222333908081055,
-0.771236002445221,
0.8684707880020142,
... |
func newChoiceTrueBuilder(choiceDef *ChoiceDef) ChoiceTrueBuilder {
return &choiceTrueBuilder{
choiceDef: choiceDef,
}
} | [
-0.21528299152851105,
-0.2757142186164856,
0.3261474370956421,
0.8939455151557922,
-0.31215667724609375,
0.6180334687232971,
-0.470685750246048,
0.7532017230987549,
0.2177577167749405,
0.8713575601577759,
-1.211740255355835,
0.4068457782268524,
-0.8841534852981567,
0.14465884864330292,
-... |
func newChoiceFalseBuilder(choiceDef *ChoiceDef) ChoiceFalseBuilder {
return &choiceFalseBuilder{
choiceDef: choiceDef,
}
} | [
-0.5002068281173706,
-0.2979293465614319,
0.29739657044410706,
1.4217593669891357,
0.021877670660614967,
0.7400417923927307,
-0.4326522946357727,
0.19901134073734283,
0.37868788838386536,
0.094946950674057,
-0.9198274612426758,
0.05434831604361534,
-0.9299671053886414,
0.8142589926719666,
... |
func New(bitCapacity int) *Ring {
return &Ring{
bitmap: make([]uint64, pow2BitCapacity(bitCapacity)/64),
lowestMarked: -1,
highestMarked: -1,
lowestPending: -1,
highestPending: -1,
lowestComplete: -1,
highestComplete: -1,
}
} | [
-0.8810478448867798,
-0.16992922127246857,
0.4649512469768524,
-0.28078344464302063,
0.12234815210103989,
-0.5601087808609009,
1.0637389421463013,
-1.0546427965164185,
-0.24562916159629822,
0.6219728589057922,
0.13794536888599396,
-0.0032665205653756857,
0.09185203164815903,
0.614897012710... |
func (r *Ring) Reset(bitCapacity int) {
r.resetBitmap(bitCapacity)
r.lowestMarked = -1
r.highestMarked = -1
r.lowestPending = -1
r.highestPending = -1
r.lowestComplete = -1
r.highestComplete = -1
} | [
-1.1937282085418701,
0.048124589025974274,
0.3197208642959595,
-0.23933398723602295,
1.0122374296188354,
-0.1452631950378418,
1.8422060012817383,
-1.1511199474334717,
-0.6159195899963379,
0.4581697881221771,
-0.34751930832862854,
0.27080845832824707,
-0.7538664937019348,
0.0269364956766366... |
func (r *Ring) LowestMarkedOffset() int { return r.lowestMarked } | [
0.8687666058540344,
-0.8261153101921082,
0.37230026721954346,
-1.3345363140106201,
0.36588358879089355,
1.0161186456680298,
1.0326297283172607,
-0.3559967875480652,
0.09037409722805023,
-1.0370335578918457,
0.11355524510145187,
0.907155454158783,
-1.3107357025146484,
0.14371445775032043,
... |
func (r *Ring) HighestMarkedOffset() int { return r.highestMarked } | [
0.5360996723175049,
-0.31937548518180847,
0.5462698936462402,
0.06504835933446884,
0.3235217332839966,
1.1872544288635254,
1.0630149841308594,
0.4167729318141937,
0.02404310368001461,
-0.3005206882953644,
-0.20862552523612976,
0.4161287844181061,
-0.2953513562679291,
0.3583393692970276,
... |
func (r *Ring) LowestPendingOffset() int { return r.lowestPending } | [
0.8158032298088074,
-1.232700228691101,
0.30271410942077637,
-1.3876487016677856,
-0.7331827282905579,
1.0822218656539917,
-0.0657547190785408,
-0.30171388387680054,
-0.7565112113952637,
-0.6750466227531433,
0.2306116819381714,
-0.5351096391677856,
-1.3577817678451538,
-0.17216168344020844... |
func (r *Ring) HighestPendingOffset() int {
if r.highestPending >= 0 {
return r.highestPending
}
r.highestPending = r.findHighestPending()
return r.highestPending
} | [
0.3393292725086212,
-0.548852801322937,
0.6665151119232178,
0.0712183341383934,
-1.0051640272140503,
1.0114606618881226,
-0.034439947456121445,
0.6001996397972107,
-0.8779304027557373,
0.2478944957256317,
0.3442205786705017,
-0.8788271546363831,
-0.6585490703582764,
0.2338734120130539,
0... |
func (r *Ring) LowestCompleteOffset() int {
if r.lowestComplete >= 0 {
return r.lowestComplete
}
r.lowestComplete = r.findLowestComplete()
return r.lowestComplete
} | [
1.0909196138381958,
-1.429265022277832,
0.33945193886756897,
-1.623537302017212,
-0.05131885036826134,
0.21109220385551453,
0.9256582856178284,
-0.6509056091308594,
-0.2381984442472458,
-0.3773832619190216,
-0.34116214513778687,
-0.4235004186630249,
-1.2890516519546509,
0.24517813324928284... |
func (r *Ring) HighestCompleteOffset() int { return r.highestComplete } | [
0.8143351674079895,
-1.2445318698883057,
0.291152685880661,
-0.42035192251205444,
0.014159773476421833,
0.8608912229537964,
1.097219467163086,
0.10630962252616882,
-0.5015930533409119,
0.014256535097956657,
-0.5804786682128906,
-0.5354709625244141,
-0.04390103369951248,
0.04487983137369156... |
func (r *Ring) CommittableOffset() int {
if r.lowestPending < 0 {
return r.highestMarked
}
return r.lowestPending - 1
} | [
-0.3974708318710327,
-0.4880377948284149,
0.4475635588169098,
-0.07294808328151703,
0.005435058381408453,
1.3495476245880127,
1.2013689279556274,
-0.14231382310390472,
-0.9641605615615845,
0.8382339477539062,
0.4317165017127991,
0.20570670068264008,
-1.0435680150985718,
0.04025476798415184... |
func (r *Ring) CommittableCount() int { return r.numCommittable } | [
0.11258399486541748,
-0.2648686170578003,
0.49181875586509705,
0.2897579073905945,
0.20914600789546967,
1.2020455598831177,
1.4549894332885742,
0.1319849193096161,
-0.8626434803009033,
1.2136244773864746,
-0.4476029872894287,
0.003288003383204341,
-0.6503925323486328,
0.5750965476036072,
... |
func (r *Ring) PendingRangeSize() int {
if r.lowestPending < 0 {
return 0
}
return r.highestMarked + 1 - r.lowestPending
} | [
-0.9663994312286377,
0.04750453308224678,
0.3989081084728241,
-0.4133929908275604,
0.014703460969030857,
0.27136167883872986,
0.11832831054925919,
-0.18281984329223633,
-0.3990198075771332,
-0.14551471173763275,
-0.2559051215648651,
-0.5192737579345703,
-0.6718084216117859,
0.9547597169876... |
func (r *Ring) CompleteRangeSize() int {
if r.lowestPending < 0 || r.highestComplete < 0 {
return 0
}
return r.highestComplete + 1 - r.lowestPending
} | [
-0.4782579243183136,
-0.40192148089408875,
0.5900426506996155,
0.027577156201004982,
-0.31501275300979614,
0.1835571825504303,
0.7425432205200195,
-0.35676413774490356,
-0.56427001953125,
0.4146464467048645,
-0.4237315356731415,
-0.8986009955406189,
-0.8153553009033203,
0.5107447504997253,... |
func (r *Ring) MarkPending(offset int) {
if offset > r.highestMarked {
r.highestMarked = offset
}
if r.lowestMarked >= 0 {
if r.highestPending < offset {
r.highestPending = offset
}
if r.lowestPending < 0 || r.lowestPending > offset {
r.lowestPending = offset
}
return
}
r.lowestMarked = offset
r... | [
-0.9311477541923523,
-0.8949968814849854,
0.8389647006988525,
-0.954300582408905,
-0.12239139527082443,
0.9677155613899231,
0.052083324640989304,
-0.3009573519229889,
0.12142527848482132,
-0.2203117460012436,
-0.29224807024002075,
0.2686547636985779,
0.17495137453079224,
0.643396258354187,... |
func (r *Ring) MarkComplete(offset int) {
rel := offset - r.lowestPending
if rel < 0 {
return // already committed
}
var pos uint
if uint(rel) < r.bitCapacity() {
pos = r.wrapForward(r.tailBit + uint(rel))
if getBit(r.bitmap, pos) {
return // already marked
}
} else {
r.resize(rel+1, r.CompleteRangeS... | [
-0.39308032393455505,
0.005793557036668062,
0.6701657176017761,
-0.5131888389587402,
0.011079469695687294,
-0.5496081709861755,
1.2328263521194458,
-0.7379778623580933,
-0.036951713263988495,
0.2248656451702118,
-0.047452330589294434,
0.2976049482822418,
-0.2931424081325531,
0.589972853660... |
func (r *Ring) wrapForward(bitPosition uint) uint {
return bitPosition & (r.bitCapacity() - 1)
} | [
-0.8548544049263,
0.3232581317424774,
0.3844131529331207,
-1.0588352680206299,
-0.04157933592796326,
0.8551326990127563,
0.5598407983779907,
-1.3673574924468994,
-0.1561800092458725,
-0.4557251036167145,
0.5050193071365356,
0.2647213935852051,
0.051958534866571426,
0.2288009077310562,
0.... |
func (r *Ring) wrapBack1(bitPosition uint) uint {
bitCap := r.bitCapacity()
return (bitCap + bitPosition - 1) & (bitCap - 1)
} | [
-0.9023838043212891,
-0.036857035011053085,
0.909600555896759,
0.4695481061935425,
-0.06668316572904587,
0.3174501061439514,
0.8420045375823975,
-0.9413191080093384,
0.34318527579307556,
1.0037310123443604,
0.4265897870063782,
0.7052462100982666,
-0.9239283204078674,
-0.266721248626709,
... |
func (w *WorkerStore) waitTtl() {
for {
select {
case id := <-w.done_chan:
go func(id int) {
defer w.mx.Unlock()
defer delete(w.workingdone, id)
time.Sleep(time.Millisecond * time.Duration(w.workingdone[id].TTL*1000))
w.mx.Lock()
}(id)
}
}
} | [
-0.16253387928009033,
0.021388407796621323,
0.42441800236701965,
-0.8847018480300903,
0.19745349884033203,
-0.051354143768548965,
0.20462550222873688,
-0.6405520439147949,
-0.29785430431365967,
0.519789457321167,
-1.1535242795944214,
-0.346058189868927,
-0.22012215852737427,
-0.46277076005... |
func (w *WorkerStore) executeWorker(id int) {
worker := w.workingdone[id]
worker.StartTime = time.Now().UTC().Format(time.RFC3339Nano)
worker.Status = Working
for i := 0; i < int(worker.N); i++ {
worker.CurrIter += 1
time.Sleep(time.Millisecond * time.Duration(worker.I*1000))
worker.N1 += worker.D
}
worker.... | [
-1.320995569229126,
-0.08477473258972168,
0.4984661936759949,
-0.6181087493896484,
0.68255215883255,
0.35290077328681946,
-0.04950076341629028,
0.13457176089286804,
-0.4199809730052948,
0.522335410118103,
-1.095629096031189,
-0.3510740399360657,
-0.27160221338272095,
0.6729281544685364,
... |
func (w *WorkerStore) StartWorkers() {
defer close(w.done_chan)
defer close(w.max_working)
go w.waitTtl()
for {
if len(w.scheduled) > 0 {
w.max_working <- true
w.mx.Lock()
for i := range w.scheduled {
w.scheduled[i].NumInQueue = uint(i)
}
w.workingdone[w.next_id] = &w.scheduled[0]
go w.execu... | [
-0.8886497020721436,
-0.14898258447647095,
0.2144429236650467,
-0.3616417944431305,
0.20250993967056274,
-0.312051922082901,
0.032216060906648636,
0.7747166156768799,
-0.627652108669281,
0.016440846025943756,
-0.5456941723823547,
0.2404807060956955,
-0.6391286849975586,
0.19180631637573242... |
func Anagrams(words []string) int {
m := make(map[string]int)
for _, w := range words {
sorted := SortString(w)
m[sorted]++
}
count := 0
for _, i := range m {
if i == 1 {
count++
}
}
return count
} | [
0.13733342289924622,
0.45075708627700806,
0.6474523544311523,
0.030661996454000473,
-1.5370219945907593,
-0.08086450397968292,
0.6447784304618835,
-0.21985651552677155,
0.3305371403694153,
0.756719172000885,
0.27142491936683655,
0.4775169789791107,
-0.515272319316864,
1.0788094997406006,
... |
func SortString(s string) string {
r := []rune(s)
sort.Sort(sortChars(r))
return string(r)
} | [
0.09812392294406891,
-0.4154858887195587,
0.11180586367845535,
-0.6578352451324463,
-0.764655590057373,
0.05583561584353447,
-0.16908572614192963,
-0.7730032801628113,
-0.01291119959205389,
-0.11798238009214401,
0.07025579363107681,
0.6714975237846375,
0.07627317309379578,
-1.0795495510101... |
func main() {
c := AnagramsReader(os.Stdin)
fmt.Println(c)
} | [
0.9460378885269165,
-0.017816849052906036,
0.5181230306625366,
-0.07283931225538254,
-1.1375041007995605,
0.7956186532974243,
0.3341422975063324,
-0.21601000428199768,
-0.5778555870056152,
0.23240184783935547,
-0.02774304524064064,
0.48828914761543274,
-0.19851376116275787,
-0.579729616641... |
func AnagramsReader(r io.Reader) int {
bufR := bufio.NewReader(r)
n := ReadConstraintN(bufR)
words := make([]string, n)
for i := 0; i < n; i++ {
line, err := bufR.ReadBytes('\n')
if err != nil {
panic(err)
}
words[i] = string(line)
}
return Anagrams(words)
} | [
0.4806613326072693,
0.6017597317695618,
0.5860527157783508,
-0.7694634795188904,
-2.066925525665283,
-0.5721371173858643,
-0.14768648147583008,
-0.12821067869663239,
-0.24915729463100433,
0.7911803126335144,
-0.15898635983467102,
-0.09968199580907822,
-0.5800625085830688,
-0.06510227173566... |
func ReadConstraintN(r *bufio.Reader) int {
line, err := r.ReadBytes('\n')
if err != nil {
panic(err)
}
s := strings.Split(string(line), " ")
i, err := strconv.Atoi(s[0])
if err != nil {
panic(err)
}
return i
} | [
0.13495396077632904,
-0.7404203414916992,
0.879226565361023,
-0.45055994391441345,
-0.7020759582519531,
-0.2863759696483612,
0.23892588913440704,
0.6170567870140076,
-1.2691729068756104,
-0.12047607451677322,
-0.1874643713235855,
0.2558135986328125,
-0.45443639159202576,
-0.879864811897277... |
func (a *createEventAction) SetBuilderOnTriggers(triggers []actions.Trigger) {
a.builder.SetTriggers(triggers)
for _, t := range triggers {
a.setBuilder(t)
}
} | [
-0.2270546704530716,
-0.3765002489089966,
0.23153117299079895,
0.8404662013053894,
0.7102518081665039,
0.06652277708053589,
1.077310562133789,
0.7698020935058594,
0.526840329170227,
-0.7440866827964783,
-1.1697965860366821,
-0.15681609511375427,
-0.4209594428539276,
0.6617688536643982,
-... |
func LowerFirstRune(s string) string {
if s == "" {
return ""
}
r, n := utf8.DecodeRuneInString(s)
return string(unicode.ToLower(r)) + s[n:]
} | [
1.5267874002456665,
-0.42111432552337646,
0.3714621663093567,
-0.8149824738502502,
0.6585251688957214,
-0.9078812599182129,
-0.7644497156143188,
0.2108449637889862,
-0.1115623340010643,
-0.7222431302070618,
0.8567359447479248,
0.4571760594844818,
-1.1064131259918213,
0.3206123411655426,
... |
func PurgeCache(appName string) error {
err := common.VerifyAppName(appName)
if err != nil {
return err
}
cacheDir := strings.Join([]string{common.MustGetEnv("DOKKU_ROOT"), appName, "cache"}, "/")
cacheHostDir := strings.Join([]string{common.MustGetEnv("DOKKU_HOST_ROOT"), appName, "cache"}, "/")
dokkuGlobalRun... | [
-0.13715200126171112,
1.2382482290267944,
0.8919854164123535,
0.9267870783805847,
0.7589499950408936,
-0.05193161219358444,
0.6824056506156921,
-0.3484327793121338,
0.2544258236885071,
0.3094275891780853,
0.449665904045105,
0.3982338011264801,
-0.3361723721027374,
0.8799762725830078,
0.5... |
func newRedirectServer(cfg *Config, logger *zap.Logger) *Server {
copiedCfg := *cfg
copiedCfg.TLS.Enabled = false
redirectPort := cfg.HTTPSListenPort
if cfg.AdvertisedHTTPSListenPort != 0 {
redirectPort = cfg.AdvertisedHTTPSListenPort
}
return &Server{
cfg: &copiedCfg,
Server: &http.Server{
ReadTimeout:... | [
-1.0048828125,
-1.0183155536651611,
0.7027496099472046,
-0.28878381848335266,
-0.36856788396835327,
0.9848824739456177,
0.3676557242870331,
-0.11789845675230026,
0.5839738845825195,
-0.2681620121002197,
-0.08997981995344162,
0.945003092288971,
-0.6820294857025146,
0.6116844415664673,
0.5... |
func RegisterCommands(app *cobra.Command, c *client.Client) {
var command, sub *cobra.Command
command = &cobra.Command{
Use: "create",
Short: `create action`,
}
tmp1 := new(CreateBookCommand)
sub = &cobra.Command{
Use: `book ["/books"]`,
Short: ``,
Long: `
Payload example:
{
"author": "Impedit f... | [
0.5557955503463745,
0.2980583906173706,
0.6562439203262329,
0.6913201212882996,
1.1586909294128418,
0.46139901876449585,
0.25111034512519836,
-0.3725239634513855,
-0.7515207529067993,
-0.7736479640007019,
-0.2680799961090088,
0.20853422582149506,
-0.13794301450252533,
0.5467249751091003,
... |
func (cmd *CreateBookCommand) Run(c *client.Client, args []string) error {
var path string
if len(args) > 0 {
path = args[0]
} else {
path = "/books"
}
var payload client.BookPayload
if cmd.Payload != "" {
err := json.Unmarshal([]byte(cmd.Payload), &payload)
if err != nil {
return fmt.Errorf("failed to... | [
-1.1581759452819824,
-0.5063948035240173,
0.7276487946510315,
0.06561243534088135,
0.35996782779693604,
1.0977994203567505,
0.7460885643959045,
-0.21513937413692474,
-1.2523047924041748,
0.06599855422973633,
-0.07667116820812225,
0.14221324026584625,
-1.1377533674240112,
0.6051231026649475... |
func (cmd *CreateBookCommand) RegisterFlags(cc *cobra.Command, c *client.Client) {
cc.Flags().StringVar(&cmd.Payload, "payload", "", "Request body encoded in JSON")
cc.Flags().StringVar(&cmd.ContentType, "content", "", "Request content type override, e.g. 'application/x-www-form-urlencoded'")
} | [
-0.28196123242378235,
0.38492268323898315,
0.3746716380119324,
-0.08823206275701523,
1.4020527601242065,
0.7493011355400085,
-0.677898108959198,
-0.33882418274879456,
-1.5100724697113037,
-0.8841350674629211,
-0.5075409412384033,
0.5048553347587585,
-1.224599838256836,
1.4770193099975586,
... |
func (cmd *DeleteBookCommand) Run(c *client.Client, args []string) error {
var path string
if len(args) > 0 {
path = args[0]
} else {
path = fmt.Sprintf("/books/%v", url.QueryEscape(cmd.Name))
}
logger := goa.NewLogger(log.New(os.Stderr, "", log.LstdFlags))
ctx := goa.WithLogger(context.Background(), logger)
... | [
-1.2495266199111938,
-0.6459094285964966,
0.5644991993904114,
0.4387723505496979,
0.19121861457824707,
0.845923662185669,
0.7459238767623901,
0.13884961605072021,
-0.8681321740150452,
-0.0901775062084198,
0.2544311583042145,
0.5771293640136719,
-1.2756078243255615,
0.6218404769897461,
-0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.