text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func FindCustomDomainCondition(conditions []customdomainv1alpha1.CustomDomainCondition, conditionType customdomainv1alpha1.CustomDomainConditionType) *customdomainv1alpha1.CustomDomainCondition {
for i, condition := range conditions {
if condition.Type == conditionType {
return &conditions[i]
}
}
return nil
} | [
0.3934587836265564,
-0.9706560373306274,
0.42019298672676086,
-0.15385541319847107,
-0.9333945512771606,
-0.4039081037044525,
0.7634751796722412,
-0.9901838898658752,
-0.00879720225930214,
0.20134051144123077,
1.0881373882293701,
1.8055394887924194,
-0.9186354875564575,
1.5639914274215698,... |
func (r *CustomDomainReconciler) returnIngressToClusterIngressOperator(reqLogger logr.Logger, instance *customdomainv1alpha1.CustomDomain) (ctrl.Result, error) {
reqLogger.Info(fmt.Sprintf("Removing operator management labels from %s's underlying ingress controller", instance.Name))
ingressName := instance.Name
cus... | [
-0.4520636200904846,
-0.3180612325668335,
0.6455594301223755,
-0.8120496869087219,
-0.8376780152320862,
-0.06984866410493851,
0.5815554857254028,
-0.10324100404977798,
0.06985803693532944,
0.9069833159446716,
0.4665931463241577,
0.5017892718315125,
-1.1280996799468994,
-0.42881494760513306... |
func (r *CustomDomainReconciler) finalizeCustomDomain(reqLogger logr.Logger, instance *customdomainv1alpha1.CustomDomain) error {
reqLogger.Info("Deleting old resources...")
// get and delete the secret in openshift-ingress
ingressSecret := &corev1.Secret{}
err := r.Client.Get(context.TODO(), types.NamespacedName{
... | [
-0.262565553188324,
-0.1209215521812439,
0.8752695918083191,
-0.5952030420303345,
0.12120318412780762,
-0.37621188163757324,
0.11923039704561234,
-0.18426741659641266,
0.47264933586120605,
0.24237045645713806,
0.1469063013792038,
0.9264083504676819,
-0.719574511051178,
0.5069214105606079,
... |
func (r *CustomDomainReconciler) addFinalizer(reqLogger logr.Logger, m *customdomainv1alpha1.CustomDomain) error {
reqLogger.Info("Adding Finalizer for the CustomDomain")
m.SetFinalizers(append(m.GetFinalizers(), customDomainFinalizer))
// Update CR
err := r.Client.Update(context.TODO(), m)
if err != nil {
reqL... | [
-0.9618859887123108,
-0.2970399260520935,
0.4656880497932434,
-0.4665524363517761,
-0.5579320788383484,
-0.1590437889099121,
0.3228536546230316,
0.4892621636390686,
0.39592328667640686,
-1.2406426668167114,
0.08713109791278839,
0.03586572781205177,
-1.4158567190170288,
0.8368720412254333,
... |
func SetCustomDomainStatus(reqLogger logr.Logger, instance *customdomainv1alpha1.CustomDomain, message string, condition customdomainv1alpha1.CustomDomainConditionType, state customdomainv1alpha1.CustomDomainStateType) {
instance.Status.Conditions = SetCustomDomainCondition(
instance.Status.Conditions,
condition,
... | [
-0.3806268572807312,
-0.8093959093093872,
0.347295880317688,
-1.1593705415725708,
-1.0685744285583496,
0.4212312400341034,
0.32221442461013794,
0.71282559633255,
0.25099238753318787,
0.23436714708805084,
-0.7373018264770508,
1.8203767538070679,
-0.23649798333644867,
0.8200085759162903,
0... |
func (r *CustomDomainReconciler) statusUpdate(reqLogger logr.Logger, instance *customdomainv1alpha1.CustomDomain) error {
err := r.Client.Status().Update(context.TODO(), instance)
if err != nil {
reqLogger.Error(err, fmt.Sprintf("Status update for %s failed", instance.Name))
}
//reqLogger.Info(fmt.Sprintf("Status... | [
-0.4113587439060211,
-1.0119380950927734,
0.40173035860061646,
-0.753707230091095,
-0.6027507185935974,
0.4606998860836029,
-0.011744357645511627,
1.0311901569366455,
0.29817309975624084,
0.24585972726345062,
-0.24475957453250885,
0.16667915880680084,
-0.9742311239242554,
-0.14910936355590... |
func contains(list []string, s string) bool {
for _, v := range list {
if v == s {
return true
}
}
return false
} | [
0.3151995837688446,
-0.9520298838615417,
0.09087657183408737,
-0.1721687614917755,
-0.4224032461643219,
-0.18257975578308105,
-1.5845658779144287,
0.5142901539802551,
0.2540506422519684,
0.04043068364262581,
-0.6769790053367615,
0.6652964949607849,
-0.07514753192663193,
0.4513648748397827,... |
func remove(list []string, s string) []string {
for i, v := range list {
if v == s {
list = append(list[:i], list[i+1:]...)
}
}
return list
} | [
-0.15460966527462006,
-0.94331294298172,
0.4338594675064087,
0.18900536000728607,
-0.8980139493942261,
-0.2713090479373932,
-0.6368013620376587,
1.2869778871536255,
1.229672908782959,
1.1366864442825317,
-1.0088480710983276,
0.8212760090827942,
-1.070404052734375,
-0.06486832350492477,
0... |
func randSeq(n int) string {
b := make([]rune, n)
for i := range b {
// #nosec G404
b[i] = letters[rand.Intn(len(letters))]
}
return string(b)
} | [
-1.5899516344070435,
0.26096686720848083,
0.26775696873664856,
-0.868712306022644,
0.007110480219125748,
-0.11679133772850037,
-0.17515690624713898,
-0.7533689737319946,
0.3720918595790863,
0.9725638628005981,
-1.1462312936782837,
-0.15213660895824432,
-0.45694565773010254,
0.0599640943109... |
func GetPlatformType(kclient client.Client) (*configv1.PlatformType, error) {
infra, err := GetInfrastructureObject(kclient)
if err != nil {
return nil, err
}
return &infra.Status.PlatformStatus.Type, nil
} | [
0.21179018914699554,
0.9326351284980774,
0.6666908264160156,
0.7665045261383057,
0.16533979773521423,
0.35814204812049866,
0.3091634213924408,
0.35806530714035034,
-0.5708351135253906,
0.396155446767807,
-0.353611558675766,
0.10995421558618546,
-1.1573975086212158,
1.461974024772644,
1.0... |
func GetInfrastructureObject(kclient client.Client) (*configv1.Infrastructure, error) {
infrastructure := &configv1.Infrastructure{}
if err := kclient.Get(context.TODO(), client.ObjectKey{Name: "cluster"}, infrastructure); err != nil {
return nil, fmt.Errorf("failed to get default infrastructure with name cluster: ... | [
-0.3274471163749695,
0.4221019446849823,
0.4440367817878723,
0.6337138414382935,
0.05009805038571358,
0.06982611864805222,
0.6323851346969604,
-0.7244977951049805,
-1.0080991983413696,
0.1501852571964264,
-0.2425985038280487,
0.46487921476364136,
-0.8152247071266174,
-0.2407235950231552,
... |
func (r *CustomDomainReconciler) GetClusterVersion(kclient client.Client) (string, error) {
versionObject := &configv1.ClusterVersion{}
ns := types.NamespacedName{
Namespace: "",
Name: "version",
}
err := kclient.Get(context.TODO(), ns, versionObject)
if err != nil {
return "", err
}
// handle when t... | [
0.1544043868780136,
-0.3479423522949219,
0.5288879871368408,
0.6377118229866028,
-0.13132286071777344,
-0.41403019428253174,
0.567500650882721,
-0.08571988344192505,
-0.1536349058151245,
0.5968725085258484,
-0.03453078493475914,
0.9569582343101501,
-0.4499885141849518,
0.6367701292037964,
... |
func IsVersionGreaterOrEqualThan(a, b string) bool {
// Convert versions into ${major}.${minor}, for example 4.10.0-rc.4 to 4.10
re := regexp.MustCompile("([0-9]+).([0-9]+)([0-9]?)")
shortVersion := re.FindString(a)
aVersion, err := compare.NewVersion(shortVersion)
if err != nil {
return false
}
bVersion, er... | [
-0.20654131472110748,
-1.095998764038086,
0.6400379538536072,
-0.4883350133895874,
-0.4841969907283783,
0.5374477505683899,
-0.4554027318954468,
-0.29463115334510803,
0.19098171591758728,
0.8549573421478271,
-0.34557586908340454,
0.1486085057258606,
-0.42638257145881653,
-0.290070176124572... |
func (f *Framework) GetPodRestartCount(ns, podName string) (map[string]int32, error) {
pod, err := f.KubeClient.CoreV1().Pods(ns).Get(podName, metav1.GetOptions{})
if err != nil {
return nil, errors.Wrap(err, "failed to retrieve pod to get restart count")
}
restarts := map[string]int32{}
for _, status := range... | [
-0.5985838770866394,
0.22058500349521637,
0.7042368054389954,
-0.7747980356216431,
-0.14420408010482788,
-0.774637758731842,
-0.301162987947464,
-0.05014212429523468,
-0.09754455089569092,
-0.18406902253627777,
-1.2849451303482056,
0.5619885921478271,
-0.20198634266853333,
-0.3503230214118... |
func (f *Framework) WaitForPodReady(pod *v1.Pod, timeout time.Duration) error {
var pollErr error
err := wait.Poll(2*time.Second, timeout, func() (bool, error) {
pod, pollErr := f.KubeClient.CoreV1().Pods(pod.Namespace).Get(pod.Name, metav1.GetOptions{})
if pollErr != nil {
return false, nil
}
if pod.St... | [
-1.1877988576889038,
0.07403287291526794,
0.3944190740585327,
-0.7391433715820312,
-0.30954405665397644,
-0.031884435564279556,
-0.9721065163612366,
-0.37270471453666687,
-0.4323941171169281,
0.7223213315010071,
-0.5084581971168518,
-0.19517630338668823,
0.4124261438846588,
0.3422559201717... |
func PodRunningAndReady(pod v1.Pod) (bool, error) {
switch pod.Status.Phase {
case v1.PodFailed, v1.PodSucceeded:
return false, fmt.Errorf("pod completed")
case v1.PodRunning:
for _, cond := range pod.Status.Conditions {
if cond.Type != v1.PodReady {
continue
}
return cond.Status == v1.ConditionTrue... | [
-1.6764193773269653,
-0.84393310546875,
0.6424170136451721,
-0.15362338721752167,
-0.5324901938438416,
0.1929813176393509,
-0.1373359113931656,
0.4219081699848175,
0.023837881162762642,
1.0206272602081299,
-0.40898123383522034,
-0.125934436917305,
0.17867706716060638,
0.042597439140081406,... |
func NewUpgradeJivaVolumeJob() *cobra.Command {
cmd := &cobra.Command{
Use: "jiva-volume",
Short: "Upgrade Jiva Volume",
Long: jivaVolumeUpgradeCmdHelpText,
Example: `upgrade jiva-volume <spc-name>...`,
Run: func(cmd *cobra.Command, args []string) {
if len(args) == 0 {
util.Fatal("failed to u... | [
-0.4718940854072571,
-1.0173758268356323,
0.47008806467056274,
0.761543869972229,
-0.26310911774635315,
-0.7427949905395508,
-0.0160718634724617,
-0.4557165801525116,
-0.4774821996688843,
0.151827871799469,
0.05186450481414795,
-0.6799052953720093,
0.04222483187913895,
0.11425439268350601,... |
func (u *UpgradeOptions) RunJivaVolumeUpgrade(cmd *cobra.Command, name string) error {
if version.IsCurrentVersionValid(u.fromVersion) && version.IsDesiredVersionValid(u.toVersion) {
klog.Infof("Upgrading JivaVolume %s to %s", name, u.toVersion)
err := upgrade.Exec(u.fromVersion, u.toVersion,
u.resourceKind,
... | [
-1.4759505987167358,
-1.1838185787200928,
0.8146839737892151,
-0.2997199296951294,
0.0025117970071733,
-0.010432841256260872,
-0.046338848769664764,
0.05451415106654167,
-0.18664278090000153,
0.9162644147872925,
0.10512974858283997,
-0.20517145097255707,
0.04911196604371071,
-0.20139594376... |
func (ms MyString) String() string {
return fmt.Sprintf("%s (%d)", ms.str, ms.age)
} | [
-0.8345748782157898,
-1.3572224378585815,
0.27207151055336,
-1.272918462753296,
-1.3448901176452637,
0.4297838509082794,
0.47609642148017883,
-0.7277030944824219,
-0.08948055654764175,
-0.38861799240112305,
-0.13299660384655,
0.9331943988800049,
0.09106863290071487,
0.11013190448284149,
... |
func DoThing(str string, c chan bool) {
wait := rand.Int() % 10
time.Sleep(time.Duration(wait) * time.Second)
mystr := MyString{str, len(str)}
fmt.Printf("Waited %d seconds... Now Println'ing: \n", wait)
fmt.Println(mystr)
// Just pipe something through the channel to say we are done with this goroutine
c <- t... | [
0.2455577552318573,
-0.22241081297397614,
0.663036584854126,
-1.5275845527648926,
0.4772873818874359,
1.0774861574172974,
-0.2925853431224823,
0.2882252633571625,
-0.57200688123703,
-0.21541692316532135,
-0.7796924114227295,
0.8330544829368591,
-0.4261666238307953,
-0.031814031302928925,
... |
func (s *Store) scrubDisk(diskno int, d Disk) {
// We use 0 as capacity for token bucket limiter, which means we'll wait
// for "s.config.ScrubRate" tokens to be refilled every time we call "Take",
// which is fine for our usage here.
tb := tokenbucket.New(0, 0)
for {
// In case of errors, empty disk, etc., don... | [
-0.16491834819316864,
0.2016487419605255,
0.6346608400344849,
-0.12816902995109558,
-0.20674824714660645,
-0.7852384448051453,
1.0149580240249634,
-0.5507504343986511,
0.07801590114831924,
-0.6242155432701111,
0.8205621242523193,
0.41375893354415894,
0.5110260844230652,
0.160073384642601,
... |
func NewSyncStatusUsingGETParams() *SyncStatusUsingGETParams {
return &SyncStatusUsingGETParams{
timeout: cr.DefaultTimeout,
}
} | [
0.710307776927948,
-0.40759140253067017,
0.16362638771533966,
0.3695610463619232,
0.3634204864501953,
-0.5456563234329224,
-0.7690331935882568,
-0.07110490649938583,
-0.4707878828048706,
0.14204947650432587,
-0.7858081459999084,
0.4368496239185333,
0.39205190539360046,
0.6709776520729065,
... |
func NewSyncStatusUsingGETParamsWithTimeout(timeout time.Duration) *SyncStatusUsingGETParams {
return &SyncStatusUsingGETParams{
timeout: timeout,
}
} | [
1.2428503036499023,
-0.5088703632354736,
0.2758304178714752,
0.3899329900741577,
0.2837284803390503,
0.05758729204535484,
-1.5038583278656006,
-0.023972731083631516,
-0.3570489287376404,
0.6764888763427734,
-0.5199321508407593,
0.8923258781433105,
0.6145801544189453,
0.8083271980285645,
... |
func NewSyncStatusUsingGETParamsWithContext(ctx context.Context) *SyncStatusUsingGETParams {
return &SyncStatusUsingGETParams{
Context: ctx,
}
} | [
0.8891220092773438,
-0.4606019854545593,
0.3318374454975128,
0.16901543736457825,
0.21858005225658417,
0.2802521288394928,
-1.4593385457992554,
-0.49736419320106506,
0.11864776164293289,
-0.12845806777477264,
-0.7334168553352356,
0.7740445137023926,
0.5516933798789978,
0.2562309205532074,
... |
func NewSyncStatusUsingGETParamsWithHTTPClient(client *http.Client) *SyncStatusUsingGETParams {
return &SyncStatusUsingGETParams{
HTTPClient: client,
}
} | [
0.800159752368927,
-0.5380707383155823,
0.3479699492454529,
0.30891597270965576,
0.5897901654243469,
0.17816676199436188,
-0.4939650595188141,
-0.1631319373846054,
-0.8727428317070007,
0.04318804293870926,
-0.9603160619735718,
0.7456817626953125,
0.31761932373046875,
0.4270373582839966,
... |
func (o *SyncStatusUsingGETParams) WithDefaults() *SyncStatusUsingGETParams {
o.SetDefaults()
return o
} | [
0.7017571926116943,
0.12933209538459778,
0.08878602087497711,
0.16295737028121948,
0.8690730333328247,
-0.4823063015937805,
-0.9983459711074829,
-0.3925216794013977,
-0.04788617417216301,
-0.5178471803665161,
-0.37885087728500366,
-0.411394327878952,
0.2033420354127884,
0.2590952515602112,... |
func (o *SyncStatusUsingGETParams) SetDefaults() {
// no default values defined for this parameter
} | [
-0.053990207612514496,
0.2737240791320801,
0.13169975578784943,
0.1333969384431839,
1.3422266244888306,
0.03315087780356407,
-0.5737665295600891,
-0.15949387848377228,
-0.7903865575790405,
-0.7173797488212585,
-0.5551214814186096,
0.57288658618927,
-0.4352082908153534,
0.7989069819450378,
... |
func (o *SyncStatusUsingGETParams) WithTimeout(timeout time.Duration) *SyncStatusUsingGETParams {
o.SetTimeout(timeout)
return o
} | [
0.805750846862793,
-0.015167605131864548,
0.3053971827030182,
0.037701454013586044,
0.3099919259548187,
0.38413771986961365,
-0.5908511281013489,
0.13363073766231537,
0.0012079599546268582,
0.5006788372993469,
-0.03423137590289116,
0.9499966502189636,
0.9281541109085083,
0.5981367826461792... |
func (o *SyncStatusUsingGETParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
0.5103964805603027,
0.07046463340520859,
0.2070467472076416,
0.47342562675476074,
0.47242262959480286,
0.6711618304252625,
-0.4149499833583832,
0.61571204662323,
-0.5019235610961914,
0.609114944934845,
-0.05259373039007187,
1.0776867866516113,
0.5761146545410156,
1.1989086866378784,
-0.8... |
func (o *SyncStatusUsingGETParams) WithContext(ctx context.Context) *SyncStatusUsingGETParams {
o.SetContext(ctx)
return o
} | [
0.06488943099975586,
-0.12271656841039658,
0.4697807729244232,
-0.009541994892060757,
0.03788052499294281,
0.44729211926460266,
-0.801776111125946,
-0.484173446893692,
0.40294432640075684,
-0.2120310515165329,
-0.2216857373714447,
0.654879629611969,
0.31233978271484375,
-0.0169789474457502... |
func (o *SyncStatusUsingGETParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-0.2296440601348877,
-0.012889728881418705,
0.19642697274684906,
0.5827717781066895,
0.3686581552028656,
0.5818631649017334,
-0.5678175687789917,
-0.029457172378897667,
0.43646374344825745,
-0.1297202855348587,
-0.21660204231739044,
0.835133969783783,
0.042872488498687744,
0.55140906572341... |
func (o *SyncStatusUsingGETParams) WithHTTPClient(client *http.Client) *SyncStatusUsingGETParams {
o.SetHTTPClient(client)
return o
} | [
0.3101913332939148,
-0.819701075553894,
0.44335708022117615,
-0.07472139596939087,
0.3356357514858246,
0.3479446470737457,
0.10252325236797333,
-0.2843429446220398,
-0.5268450379371643,
-0.33167827129364014,
-0.2905723452568054,
0.6416884064674377,
0.6713148951530457,
-0.18175582587718964,... |
func (o *SyncStatusUsingGETParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
0.5752277970314026,
-0.6045027375221252,
0.29887494444847107,
-0.39909833669662476,
0.03987112641334534,
0.20305106043815613,
0.3118043839931488,
-0.08315788954496384,
-1.0541958808898926,
-0.2342391312122345,
-0.4136381447315216,
1.0300308465957642,
0.004459370393306017,
0.084013618528842... |
func (o *SyncStatusUsingGETParams) WithNamespaceSelfLinkID(namespaceSelfLinkID string) *SyncStatusUsingGETParams {
o.SetNamespaceSelfLinkID(namespaceSelfLinkID)
return o
} | [
0.43089017271995544,
-0.8045042753219604,
0.2277575582265854,
-0.10233958810567856,
-0.7331554889678955,
-0.5458725690841675,
-0.7189157605171204,
-0.05898633226752281,
1.2193516492843628,
-0.23443126678466797,
-0.5263852477073669,
1.195407509803772,
0.36962759494781494,
1.2432597875595093... |
func (o *SyncStatusUsingGETParams) SetNamespaceSelfLinkID(namespaceSelfLinkID string) {
o.NamespaceSelfLinkID = namespaceSelfLinkID
} | [
-0.03965957835316658,
-0.9368200898170471,
0.17921172082424164,
-0.15791988372802734,
-0.6145822405815125,
-0.30362555384635925,
-0.14032220840454102,
0.2431645393371582,
0.8765179514884949,
-0.39219290018081665,
-1.0071091651916504,
1.8742915391921997,
-0.259257972240448,
1.72694802284240... |
func (o *SyncStatusUsingGETParams) WithRequestID(requestID string) *SyncStatusUsingGETParams {
o.SetRequestID(requestID)
return o
} | [
-0.14842261373996735,
-0.7439486980438232,
0.3756345510482788,
0.5024661421775818,
-0.04641539603471756,
0.9641061425209045,
-0.8550009727478027,
-0.058211177587509155,
0.7585735321044922,
0.39749717712402344,
0.6319249272346497,
0.44440600275993347,
0.6010001301765442,
0.6357571482658386,... |
func (o *SyncStatusUsingGETParams) SetRequestID(requestID string) {
o.RequestID = requestID
} | [
-0.6082525849342346,
-0.8384147882461548,
0.29193809628486633,
0.9792730212211609,
0.28822341561317444,
1.0106953382492065,
-0.4393840730190277,
0.4383743107318878,
0.290859192609787,
0.574507474899292,
0.12594009935855865,
0.9474000334739685,
-0.12251636385917664,
1.526058316230774,
-0.... |
func (o *SyncStatusUsingGETParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param namespaceSelfLinkId
if err := r.SetPathParam("namespaceSelfLinkId", o.NamespaceSelfLinkID); err != nil {
return er... | [
-0.7373270988464355,
-0.3001272976398468,
0.7092998623847961,
-0.25709179043769836,
1.2418065071105957,
-0.017332449555397034,
0.8313370943069458,
0.3014003336429596,
-0.5352153182029724,
0.150337815284729,
0.22186997532844543,
0.6699892282485962,
-0.3808290362358093,
0.5676961541175842,
... |
func New(pathfile string) *Pidfile {
file, err := fileutil.OpenFile(pathfile, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, fileutil.DefaultFileMode)
if err != nil {
golog.Warnf("pidfile: failed to open %s (%s)", pathfile, err)
return nil
}
defer file.Close()
pid := strconv.Itoa(os.Getpid())
golog.Infof("start process ... | [
0.9335286021232605,
-1.3987737894058228,
0.44620281457901,
-0.7347686290740967,
-0.46236369013786316,
0.8120230436325073,
0.16001147031784058,
0.35778188705444336,
-1.358006477355957,
-0.084429070353508,
0.40865233540534973,
-0.26959148049354553,
-0.01186930201947689,
-0.4024781584739685,
... |
func FactorBerlekamp(f []int64, char int64) [][]int64 {
n := len(f) - 1
matrix := createMatrix(n)
unit := []int64{0, 1}
// Compute Q - I where I is the unit matrix
// The kth row is x^(kp) mod f. We skip the first row because Q - I is always 0.
for k := 1; k < n; k++ {
t := make([]int64, n)
p := PolynomialM... | [
0.06152549386024475,
0.2602525055408478,
0.8984989523887634,
-0.1589389592409134,
0.057319942861795425,
-0.5960253477096558,
0.36158013343811035,
-0.14383119344711304,
0.5356124639511108,
0.3432168662548065,
-0.5438613295555115,
-0.29124850034713745,
0.013069679029285908,
0.003612691536545... |
func FactorDistinctDegree(f []int64, char int64) []DistinctDegreeFactor {
v := f
unit := []int64{0, 1}
w := unit
d := 0
solutions := make([]DistinctDegreeFactor, PolynomialDegree(f))
numSolutions := 0
// invariant: w = x^p^d mod v
for {
if d+1 > PolynomialDegree(v)/2 {
if len(v) > 1 {
solutions[numSo... | [
-0.10814765095710754,
0.31116393208503723,
0.6368206739425659,
-0.6462053060531616,
-0.33280235528945923,
0.43348100781440735,
0.7022989988327026,
0.06000140681862831,
0.5969520807266235,
0.10253192484378815,
-0.6151748895645142,
0.8746276497840881,
0.038395438343286514,
0.4309889078140259... |
func FactorEqualDegree(r *rand.Rand, f []int64, d int, char int64) []int64 {
const numIterations = 500
for i := 0; i < numIterations; i++ {
factor := factorEqualDegreeAttempt(r, f, d, char)
if factor != nil {
return factor
}
}
panic("No factor after trying a bunch")
} | [
-0.5059720277786255,
-0.027821078896522522,
0.2224411815404892,
-0.04570501670241356,
0.6620657444000244,
-0.5398642420768738,
0.1537378579378128,
-0.387523889541626,
0.1083860695362091,
0.6780871748924255,
-0.4420683681964874,
0.5516254305839539,
-0.48961931467056274,
0.42806383967399597,... |
func HashIsSHA256(hash string) bool {
return len(hash) == 64
} | [
-0.1752496361732483,
-0.13055084645748138,
0.22239051759243011,
0.9060992002487183,
0.47777122259140015,
-0.29022520780563354,
-1.0207010507583618,
0.3914995789527893,
1.1873289346694946,
0.778372585773468,
-0.9043045043945312,
0.16855983436107635,
0.3057718276977539,
0.6971422433853149,
... |
func HashIsSHA1(hash string) bool {
return len(hash) == 40
} | [
-0.46262624859809875,
0.270770788192749,
0.4541046917438507,
0.7259125709533691,
-0.21877393126487732,
0.7311962246894836,
-0.6639654636383057,
0.546993613243103,
0.8399039506912231,
0.45384129881858826,
-0.8090406060218811,
0.3363878130912781,
0.17206595838069916,
0.623916745185852,
-0.... |
func HashIsMD5(hash string) bool {
return len(hash) == 32
} | [
-0.12930960953235626,
0.5182383060455322,
0.38453927636146545,
0.19706396758556366,
-0.7886108160018921,
0.9584978818893433,
-0.7158739566802979,
-0.37165218591690063,
-0.2114340215921402,
-0.47154688835144043,
-1.3642337322235107,
-0.7811336517333984,
-0.7033551931381226,
0.31043553352355... |
func (node *Node) ReadCATIDSet(bfr *bytes.Buffer) (err error) {
rem := bfr.Len() % int(CATID_TYPE_SIZE)
if rem > 0 {
err = node.debug.Error(FmtErrPartialCATIDSet(bfr.Len(), CATID_TYPE_SIZE))
return
}
n := bfr.Len() / int(CATID_TYPE_SIZE)
var id CATID_TYPE
node.parents.set = make([]*CatalogId, n)
for i := 0; ... | [
-0.04226222634315491,
-0.08243747055530548,
0.5415067076683044,
-1.1924982070922852,
-0.07353505492210388,
-0.090420201420784,
-0.019588470458984375,
-1.0144025087356567,
-1.070439100265503,
-0.21218621730804443,
0.67206871509552,
0.8805072903633118,
-0.5185592174530029,
0.51161789894104,
... |
func (node *Node) Pack() []byte {
bfr := new(bytes.Buffer)
// Write CATID
binary.Write(bfr, BIGEND, LBTYPE_CATID)
binary.Write(bfr, BIGEND, node.Id())
// Write Catalog string key
binary.Write(bfr, BIGEND, LBTYPE_CATKEY)
ksz := AsLBUINT(len(node.Name()))
binary.Write(bfr, BIGEND, ksz)
bfr.Write([]byte(node.Nam... | [
-0.505436897277832,
0.15169116854667664,
0.7326316833496094,
-0.9361241459846497,
0.44886672496795654,
0.23546046018600464,
-0.5684974193572998,
-0.7185359597206116,
-0.5908970832824707,
-0.5004130005836487,
-0.18656134605407715,
0.01380098145455122,
-0.13690339028835297,
0.947336375713348... |
func (node *Node) Save(lbase *Logbase) error {
lbase.debug.Basic("Saving %q to logbase %s", node.Name(), lbase.Name())
mcr_id, err := lbase.Put(node.CATID().id, node.Pack(), LBTYPE_KIND)
node.mcr_id = mcr_id
if node.debug.Error(err) != nil {return err}
mcr_name, err := lbase.Put(node.Name(), node.CATID().ToBytes(n... | [
-0.1554763913154602,
-0.3826673924922943,
0.56341552734375,
-1.376662254333496,
0.7735625505447388,
-0.3270326256752014,
-1.1103012561798096,
-0.6857341527938843,
-1.1209157705307007,
0.3465878367424011,
-0.9678905010223389,
0.5764559507369995,
-0.7904986143112183,
0.932752251625061,
1.3... |
func (node *Node) AddParent(parent *Node) *Node {
if parent.NodeType() != LBTYPE_KIND {
node.debug.Error(FmtErrBadType(
"Only a node of LBTYPE_KIND can be a parent, nothing done"))
} else {
node.parents.Add(parent.CATID())
}
return node
} | [
-0.11068476736545563,
0.41798627376556396,
0.6101728677749634,
-0.42340537905693054,
-0.28678175806999207,
0.682695209980011,
-0.781423807144165,
-1.2776517868041992,
-0.36960047483444214,
-0.5525157451629639,
1.3772979974746704,
0.5309831500053406,
-0.6579039096832275,
0.5469822287559509,... |
func (lbase *Logbase) Kind(name string) (*Node, bool, error) {
return lbase.NewNode(name, LBTYPE_KIND, true)
} | [
0.10302382707595825,
0.09030817449092865,
0.7496728301048279,
-0.7986058592796326,
-0.8035570979118347,
0.43415555357933044,
-0.14671216905117035,
-0.6364807486534119,
-0.8224257826805115,
1.0503898859024048,
-0.49826890230178833,
0.7033714056015015,
-0.7590417265892029,
0.1189071685075759... |
func (lbase *Logbase) GetKind(name string) (*Node, bool, error) {
return lbase.NewNode(name, LBTYPE_KIND, false)
} | [
0.08609235286712646,
0.6740846633911133,
0.701294481754303,
-0.2163151353597641,
-0.24416911602020264,
-0.40178853273391724,
-0.29228681325912476,
-0.932075023651123,
-1.050127625465393,
0.6355831027030945,
-0.6702777743339539,
1.1388170719146729,
-1.1129175424575806,
0.15556280314922333,
... |
func (lbase *Logbase) Doc(name string) (*Node, bool, error) {
return lbase.NewNode(name, LBTYPE_DOC, true)
} | [
0.4872124195098877,
0.847635805606842,
0.8697391152381897,
-0.17837797105312347,
-0.8036210536956787,
0.7882393598556519,
-0.4015498459339142,
0.181798055768013,
-0.4400675594806671,
0.3125095069408417,
0.07266822457313538,
-0.11358758807182312,
-0.08190127462148666,
-0.1239345520734787,
... |
func (lbase *Logbase) GetDoc(name string) (*Node, bool, error) {
return lbase.NewNode(name, LBTYPE_DOC, false)
} | [
0.7596076130867004,
0.938194215297699,
0.9334272146224976,
0.09446816146373749,
-0.09556490927934647,
0.11376490443944931,
0.11518088728189468,
-0.44452279806137085,
-0.40740257501602173,
-0.044731128960847855,
0.1860944628715515,
0.3888334035873413,
-0.11265850067138672,
0.176604926586151... |
func (o *ConnectCoreV1PatchNamespacedServiceProxyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewConnectCoreV1PatchNamespacedServiceProxyOK()
if err := result.readResponse(response, consumer, o.formats); err !=... | [
-0.44004034996032715,
-0.6498059630393982,
0.7078725695610046,
0.06039731204509735,
-0.7260379791259766,
-0.2805810868740082,
-0.15330058336257935,
-0.3008374571800232,
0.5739293694496155,
0.11132380366325378,
0.8924534916877747,
-0.5783499479293823,
-1.4468574523925781,
-0.358066797256469... |
func NewConnectCoreV1PatchNamespacedServiceProxyOK() *ConnectCoreV1PatchNamespacedServiceProxyOK {
return &ConnectCoreV1PatchNamespacedServiceProxyOK{}
} | [
-0.5401994585990906,
0.05005449056625366,
0.46071192622184753,
-0.07309652119874954,
-1.8390146493911743,
0.9889843463897705,
-0.02261684648692608,
-0.5368049144744873,
0.572912335395813,
0.45778509974479675,
-0.19587846100330353,
-0.4432636797428131,
-0.3048785626888275,
0.554191052913665... |
func NewConnectCoreV1PatchNamespacedServiceProxyUnauthorized() *ConnectCoreV1PatchNamespacedServiceProxyUnauthorized {
return &ConnectCoreV1PatchNamespacedServiceProxyUnauthorized{}
} | [
-1.1629555225372314,
-0.1825476735830307,
0.6780017018318176,
-0.32113197445869446,
-1.9306116104125977,
0.3070489764213562,
-0.8302565813064575,
-0.25905346870422363,
0.7305780649185181,
-0.34049028158187866,
0.3241225779056549,
0.18613627552986145,
-0.915969729423523,
-0.0873339474201202... |
func NewRelay(config *Config) (*Relay, error) {
relay := &Relay{
config,
&http.Client{
Timeout: time.Second * time.Duration(config.Timeout),
},
}
return relay, nil
} | [
-0.03787878155708313,
-0.1286413073539734,
0.32140955328941345,
0.2843264043331146,
-1.1227312088012695,
0.041672416031360626,
-0.7116147875785828,
0.25609660148620605,
0.09271593391895294,
0.44554293155670166,
-0.8542007207870483,
1.0670166015625,
-0.6555118560791016,
0.35070812702178955,... |
func WithCharset(charset string) CreateDBOpFn {
return func(op *CreateDBOp) {
if "" == charset {
return
}
op.charset = &charset
op.set = true
}
} | [
0.4262695908546448,
0.006920262239873409,
0.3905041217803955,
-0.5228829383850098,
0.1178349107503891,
-0.06911536306142807,
-0.13567405939102173,
-1.0775350332260132,
-0.2270500212907791,
-0.3751741647720337,
-0.9137762188911438,
0.3468071520328522,
0.7628103494644165,
-0.5311722755432129... |
func WithTimeout(timeout int) CreateDBOpFn {
return func(op *CreateDBOp) {
if 0 == timeout {
return
}
op.timeout = &timeout
op.set = true
}
} | [
0.8966084122657776,
0.4666929244995117,
0.46905505657196045,
0.6726669073104858,
-0.003778638783842325,
0.37998273968696594,
0.26571232080459595,
-0.030823854729533195,
0.3338393270969391,
-0.15784254670143127,
-0.8117164969444275,
-0.023572759702801704,
0.7531850934028625,
0.0913590565323... |
func WithInterpolateParams(enable bool) CreateDBOpFn {
return func(op *CreateDBOp) {
if !enable {
return
}
op.interpolateParams = &enable
op.set = true
}
} | [
-0.1460193246603012,
0.18748044967651367,
0.7745068073272705,
-0.047809239476919174,
-0.22827273607254028,
1.293916940689087,
-0.2806464433670044,
0.4196247160434723,
-0.8281910419464111,
0.08893056213855743,
-0.04272248223423958,
0.010576257482171059,
-1.56862211227417,
-0.013546121306717... |
func CreateDBWithArgs(dc *mconn.DBConfig, ops ...CreateDBOpFn) (*sql.DB, error) {
var op CreateDBOp
op.applyOpts(ops...)
dtype := strings.ToLower(dc.Type)
switch dtype {
case "mysql":
{
dsn := fmt.Sprintf("%s:%s@tcp(%s:%d)/", dc.Username, dc.Password, dc.Host, dc.Port)
dsn += op.format()
db, err := sql... | [
0.050722505897283554,
0.8881422281265259,
0.6441851854324341,
0.5093424916267395,
-0.4153597950935364,
0.3106958270072937,
-0.058970119804143906,
-0.7407186031341553,
-0.2618756890296936,
-0.3724634647369385,
0.532151997089386,
-0.008740433491766453,
-0.42052119970321655,
0.405756741762161... |
func CreateDB(dc *mconn.DBConfig) (*sql.DB, error) {
return CreateDBWithArgs(dc)
} | [
0.683273196220398,
0.9741325378417969,
0.17297758162021637,
1.3149852752685547,
-0.29640015959739685,
0.4903734028339386,
-0.051755622029304504,
-0.18154789507389069,
0.0019634179770946503,
-1.1394864320755005,
0.5420912504196167,
-0.441582590341568,
-0.31237801909446716,
0.686328887939453... |
func CloseChatRequest() string {
return "closechat"
} | [
-0.8244234919548035,
-1.4135230779647827,
0.5108821392059326,
0.578676164150238,
-1.2958518266677856,
1.2110273838043213,
-0.5632141828536987,
-0.6508166790008545,
-0.8059896230697632,
0.07641840726137161,
1.0121114253997803,
-0.09127148240804672,
0.10259965062141418,
0.9150065779685974,
... |
func MakeTestKeys(numKeys int) []*rsa.PrivateKey {
testKeys := make([]*rsa.PrivateKey, numKeys)
for i := 0; i < numKeys; i++ {
key, err := rsa.GenerateKey(rand.Reader, 2048)
if err != nil {
log.Fatal(err)
}
testKeys[i] = key
}
return testKeys
} | [
-1.3529274463653564,
-0.2311280518770218,
0.18583299219608307,
-0.053313612937927246,
0.3517233431339264,
-0.2607079744338989,
0.0834687277674675,
-0.7583864331245422,
1.2372575998306274,
0.03196755051612854,
-0.9144160747528076,
-0.1334766298532486,
-1.4073677062988281,
-0.298854291439056... |
func PubKeyHttpHandler(validPublicKeys *[]rsa.PublicKey, validUsernames *[]string) func(w http.ResponseWriter, r *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
pubKey, err := io.ReadAll(r.Body)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
var reqBody ... | [
-0.04237569496035576,
-0.3341754972934723,
0.6827619671821594,
0.7838620543479919,
-0.9598934650421143,
0.5971329808235168,
-0.016525018960237503,
0.7015538215637207,
-0.5759266018867493,
1.0894547700881958,
-0.07182708382606506,
-0.4485904276371002,
-0.723301351070404,
0.43472421169281006... |
func HandleSSHConn(sshListener net.Listener, successAuth *chan bool) {
conn, err := sshListener.Accept()
if err != nil {
log.Fatal(err)
}
defer conn.Close()
// GetSSHConfig is the method we are testing to validate that it
// can use an http request to validate client public key auth
connection, _, _, err := s... | [
0.4387141466140747,
-0.2568497061729431,
0.8332787752151489,
1.0698665380477905,
-0.350373238325119,
0.9433683156967163,
-0.7485525012016296,
0.3063487112522125,
-0.2920292019844055,
-0.7294798493385315,
-0.5772274732589722,
-0.4406411051750183,
0.19022946059703827,
0.973009467124939,
1.... |
func TestAuthenticationKeyRequest(t *testing.T) {
testKeys := MakeTestKeys(3)
// Give sish a temp directory to generate a server ssh host key
dir, err := os.MkdirTemp("", "sish_keys")
if err != nil {
log.Fatal(err)
}
defer os.RemoveAll(dir)
viper.Set("private-keys-directory", dir)
viper.Set("authentication",... | [
-1.0949130058288574,
-0.08986320346593857,
0.651853084564209,
0.3581536114215851,
-0.30951637029647827,
0.40862682461738586,
-0.09935234487056732,
0.21259072422981262,
-0.41760149598121643,
-0.5365003943443298,
-0.09925314038991928,
0.6871255040168762,
-0.6306759119033813,
0.23356346786022... |
func (device *Device) queryBitBoxBase(request *messages.BitBoxBaseRequest) (
*messages.Response, error) {
if *device.product != common.ProductBitBoxBaseStandard {
return nil, errp.New("not supported for this product")
}
return device.query(&messages.Request{
Request: &messages.Request_Bitboxbase{
Bitboxbase:... | [
-1.2891733646392822,
0.34731194376945496,
0.5578088760375977,
0.850349485874176,
0.2973553538322449,
-0.260211706161499,
-0.08829542994499207,
-1.4659159183502197,
0.09083522111177444,
-0.3618576228618622,
-0.26520636677742004,
0.7064962387084961,
-1.128197431564331,
0.16711635887622833,
... |
func (device *Device) BitBoxBaseHeartbeat(
stateCode messages.BitBoxBaseHeartbeatRequest_StateCode,
descriptionCode messages.BitBoxBaseHeartbeatRequest_DescriptionCode,
) error {
request := &messages.BitBoxBaseRequest{
Request: &messages.BitBoxBaseRequest_Heartbeat{
Heartbeat: &messages.BitBoxBaseHeartbeatReque... | [
-0.6641959547996521,
0.7722293734550476,
0.6109795570373535,
0.24011583626270294,
0.6144137978553772,
0.289671927690506,
-0.7482730746269226,
-1.1450351476669312,
0.06631714850664139,
-0.3641229569911957,
0.24441032111644745,
1.0202635526657104,
-1.0967366695404053,
0.29735758900642395,
... |
func (device *Device) BitBoxBaseSetConfig(
statusLedMode messages.BitBoxBaseSetConfigRequest_StatusLedMode,
statusScreenMode messages.BitBoxBaseSetConfigRequest_StatusScreenMode,
ip *[4]uint8,
hostname string,
) error {
if len(hostname) > 64 {
return errp.New("hostname too long")
}
var ipOption *messages.BitBo... | [
-1.553965449333191,
0.3474944233894348,
0.49906396865844727,
0.5179416537284851,
0.01518737617880106,
0.18120501935482025,
-0.2879249155521393,
-0.4222731292247772,
-0.48535898327827454,
0.40675675868988037,
-0.8961946964263916,
0.3613044321537018,
-0.7316853404045105,
0.5999802350997925,
... |
func (client *Client) ModifyDBClusterMigration(request *ModifyDBClusterMigrationRequest) (response *ModifyDBClusterMigrationResponse, err error) {
response = CreateModifyDBClusterMigrationResponse()
err = client.DoAction(request, response)
return
} | [
-1.7031790018081665,
0.3423595130443573,
0.1625838726758957,
0.6909594535827637,
0.6124451756477356,
-0.024746917188167572,
0.8879756331443787,
-0.5102834701538086,
0.1549908071756363,
0.06902211904525757,
-0.8846871852874756,
0.40177851915359497,
-1.4743722677230835,
0.4032739996910095,
... |
func (client *Client) ModifyDBClusterMigrationWithChan(request *ModifyDBClusterMigrationRequest) (<-chan *ModifyDBClusterMigrationResponse, <-chan error) {
responseChan := make(chan *ModifyDBClusterMigrationResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
... | [
-1.246254801750183,
0.17588192224502563,
0.37099239230155945,
0.046005088835954666,
0.40882396697998047,
-0.03429153189063072,
0.41532471776008606,
-0.7802931666374207,
0.20733363926410675,
-0.043066348880529404,
-0.3331928849220276,
0.5541219711303711,
-0.9026818871498108,
0.3588493168354... |
func (client *Client) ModifyDBClusterMigrationWithCallback(request *ModifyDBClusterMigrationRequest, callback func(response *ModifyDBClusterMigrationResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ModifyDBClusterMigrationResponse
var err error
def... | [
-1.0467010736465454,
0.6438706517219543,
0.501740574836731,
0.4194111227989197,
0.23235154151916504,
-0.5530502796173096,
0.6560425162315369,
-0.6981015801429749,
0.8089139461517334,
-0.024882623925805092,
-0.36177122592926025,
-0.3277714252471924,
-0.5263307094573975,
0.798173189163208,
... |
func CreateModifyDBClusterMigrationRequest() (request *ModifyDBClusterMigrationRequest) {
request = &ModifyDBClusterMigrationRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("polardb", "2017-08-01", "ModifyDBClusterMigration", "polardb", "openAPI")
request.Method = requests.POST
return
} | [
-0.8975188732147217,
-0.1329098492860794,
0.3478802740573883,
0.38376495242118835,
0.9290623664855957,
0.018636398017406464,
-0.003410474630072713,
-0.21372763812541962,
-0.2055986374616623,
-0.2995331287384033,
-0.2834760546684265,
0.6746879816055298,
-1.3696130514144897,
0.92888653278350... |
func CreateModifyDBClusterMigrationResponse() (response *ModifyDBClusterMigrationResponse) {
response = &ModifyDBClusterMigrationResponse{
BaseResponse: &responses.BaseResponse{},
}
return
} | [
-0.7905739545822144,
-0.31461870670318604,
-0.19693273305892944,
0.6124851703643799,
1.0715633630752563,
-0.4989323019981384,
0.6975690126419067,
-0.7961558699607849,
0.4356326460838318,
0.3069568872451782,
-0.92010498046875,
-0.29833000898361206,
-1.3387608528137207,
1.0704712867736816,
... |
func NewCommandMessage(aggregateID string, command interface{}) *CommandDescriptor {
return &CommandDescriptor{
id: aggregateID,
command: command,
headers: make(map[string]interface{}),
}
} | [
-0.025063328444957733,
-0.24369628727436066,
0.5241643190383911,
-0.1548529714345932,
0.46107974648475647,
-0.1652652472257614,
-1.2183817625045776,
-0.6977411508560181,
-0.28729647397994995,
0.5675342082977295,
0.7495786547660828,
0.6217997670173645,
-0.08546101301908493,
1.20910954475402... |
func (c *CommandDescriptor) CommandType() string {
return typeOf(c.command)
} | [
0.9441445469856262,
0.5640636086463928,
0.3308050334453583,
0.332334041595459,
1.342110276222229,
0.08150749653577805,
0.060484375804662704,
-0.15401913225650787,
0.8742552995681763,
-0.24075232446193695,
0.9767319560050964,
0.9087896347045898,
-0.42964163422584534,
1.5547960996627808,
-... |
func (c *CommandDescriptor) AggregateID() string {
return c.id
} | [
1.2149020433425903,
0.3363338112831116,
0.3432003855705261,
0.033638451248407364,
1.2287026643753052,
0.382495254278183,
0.1508551985025406,
0.5360727906227112,
0.6917058825492859,
0.012859931215643883,
0.545344889163971,
0.49632528424263,
-0.10098380595445633,
1.0426735877990723,
-0.514... |
func (c *CommandDescriptor) Headers() map[string]interface{} {
return c.headers
} | [
-0.4642893373966217,
-0.6803085207939148,
0.3523012697696686,
-0.2490873783826828,
-0.10494447499513626,
-0.3231291174888611,
-0.5610007047653198,
-0.5186804533004761,
-0.06688189506530762,
-0.4803749620914459,
0.4744579792022705,
0.005805041175335646,
0.30803728103637695,
1.19090414047241... |
func (c *CommandDescriptor) SetHeader(key string, value interface{}) {
c.headers[key] = value
} | [
-0.41829201579093933,
-0.16148827970027924,
0.2663381099700928,
-0.0043572550639510155,
-0.20563599467277527,
0.26931774616241455,
-0.8052361607551575,
-0.06838557124137878,
-0.44832122325897217,
-0.3609077036380768,
0.46826231479644775,
0.3419172763824463,
0.7054869532585144,
0.9282628297... |
func (c *CommandDescriptor) Command() interface{} {
return c.command
} | [
0.32337892055511475,
0.0767403319478035,
0.2819301187992096,
0.2567468285560608,
0.46527421474456787,
0.8348428606987,
0.0010283319279551506,
-0.15694096684455872,
0.9125005602836609,
-1.0044052600860596,
0.6871992945671082,
1.000811219215393,
0.09216872602701187,
1.1466190814971924,
0.2... |
func MessagePoolWait(ctx context.Context, plumbing mpwPlumbing, messageCount uint) ([]*types.SignedMessage, error) {
pending := plumbing.MessagePoolPending()
for len(pending) < int(messageCount) {
// Poll pending again after subscribing in case a message arrived since.
pending = plumbing.MessagePoolPending()
ti... | [
-1.0234071016311646,
-0.3419409394264221,
0.5751917362213135,
-0.7153863310813904,
0.2843891978263855,
0.04549138993024826,
0.5820438861846924,
-1.132303237915039,
-0.2679990231990814,
-0.2079678177833557,
-0.5754519104957581,
0.22855733335018158,
-0.5736492276191711,
0.681357741355896,
... |
func (set AnswerSetIntersection) Size() int { return len(set) } | [
-0.2762688398361206,
0.4795399606227875,
0.19807922840118408,
-1.235061526298523,
-0.18736156821250916,
-0.18566946685314178,
1.0247118473052979,
-0.2981099784374237,
0.6817592978477478,
-0.1661023050546646,
0.3396947979927063,
-0.7225378751754761,
-0.5616005659103394,
-0.6182753443717957,... |
func (set AnswerSetUnion) Size() int { return len(set) } | [
-0.5963323712348938,
0.8189983367919922,
0.19476020336151123,
-1.0625009536743164,
-0.39995792508125305,
0.6306034922599792,
0.9720562100410461,
-0.6179109811782837,
0.6154512763023376,
-0.7889204025268555,
0.1429247111082077,
0.1306716501712799,
-0.32028865814208984,
-0.3350525498390198,
... |
func (set AnswerSetIntersection) Set(i int) AnswerSet { return set[i] } | [
-0.41446971893310547,
-0.2887939214706421,
0.1817590892314911,
-0.8078104257583618,
-0.3903543949127197,
-0.003016298171132803,
1.3064520359039307,
-1.0314741134643555,
0.36737513542175293,
-0.464555025100708,
0.4512880742549896,
-0.8737034797668457,
-0.4166949987411499,
-1.177338480949401... |
func (set AnswerSetUnion) Set(i int) AnswerSet { return set[i] } | [
-0.5354035496711731,
0.14560139179229736,
0.2159901261329651,
-0.6394377946853638,
-0.47824782133102417,
0.7239149212837219,
1.1724650859832764,
-1.3438897132873535,
0.2792428433895111,
-0.8639097809791565,
0.17368033528327942,
-0.19292595982551575,
-0.2252100110054016,
-1.0234795808792114... |
func (set AnswerSetIntersection) Has(x interface{}) bool {
for i := range set {
if !set[i].Has(x) {
return false
}
}
return true
} | [
-0.420769602060318,
0.5049412250518799,
0.34253406524658203,
-0.5497950315475464,
-0.21340447664260864,
-0.24291519820690155,
-0.45576515793800354,
-0.3183421194553375,
-0.03771166875958443,
-0.2545851767063141,
-0.4242936372756958,
-1.0256565809249878,
-0.40592044591903687,
0.331103831529... |
func (set AnswerSetUnion) Has(x interface{}) bool {
for i := range set {
if set[i].Has(x) {
return true
}
}
return false
} | [
-0.39161863923072815,
0.5262283086776733,
0.45184510946273804,
-0.21019747853279114,
-0.41556262969970703,
0.358792781829834,
-0.46523547172546387,
-0.48310184478759766,
-0.030540769919753075,
-0.5179810523986816,
-0.6895079612731934,
-0.36075907945632935,
0.060085803270339966,
0.547194302... |
func (d Direction) Infinity() string { return infty[d] } | [
-1.079304814338684,
-0.3621874451637268,
0.21139152348041534,
-0.014956976287066936,
0.5520869493484497,
0.08261404186487198,
-0.6171471476554871,
-0.1481075882911682,
0.4477190673351288,
-0.016487445682287216,
-0.24836984276771545,
0.3603804409503937,
0.024460231885313988,
0.5280280709266... |
func (set StringSet) Has(x interface{}) bool {
switch x.(type) {
case string:
y := x.(string)
for _, s := range set {
if s == y {
return true
}
}
return false
}
panic(makeErrorMemberType(set, x))
} | [
-0.09625604003667831,
0.06608785688877106,
0.4231410026550293,
-0.7145621180534363,
-0.6009381413459778,
-0.16195936501026154,
-1.3993210792541504,
-1.0062649250030518,
-0.2222503274679184,
-0.261545866727829,
-0.2002853900194168,
0.8097659945487976,
-0.21624374389648438,
0.367450863122940... |
func (r UintBoundedStrictly) String() string { return UintBounded(r).String() } | [
0.8207529783248901,
-0.6683961153030396,
0.273494154214859,
-0.14164578914642334,
0.015073864720761776,
0.7693777084350586,
0.42420104146003723,
-1.5611708164215088,
0.8201974630355835,
-0.4385901391506195,
-0.4543863534927368,
0.32960453629493713,
0.09721513092517853,
-0.11385680735111237... |
func (r IntBoundedStrictly) String() string { return IntBounded(r).String() } | [
0.969764232635498,
-0.8466742634773254,
0.15966930985450745,
-0.157430961728096,
-0.03974335640668869,
0.8268293738365173,
0.5394934415817261,
-2.0438454151153564,
0.33460479974746704,
-0.10825985670089722,
-0.463413804769516,
0.6320445537567139,
-0.2629534900188446,
-0.16322217881679535,
... |
func (r FloatBoundedStrictly) String() string { return FloatBounded(r).String() } | [
1.492632508277893,
-0.5411931872367859,
0.09054043143987656,
-0.0497615821659565,
0.15581460297107697,
0.9476402997970581,
0.45615798234939575,
-1.8500162363052368,
-0.1929139643907547,
-0.18522314727306366,
-0.47858455777168274,
0.6571885943412781,
-0.22014063596725464,
0.1098566725850105... |
func (r StringBoundedStrictly) String() string { return StringBounded(r).String() } | [
1.4297150373458862,
-1.2307218313217163,
0.0305633507668972,
-0.15162692964076996,
-0.0849262997508049,
0.6605955362319946,
0.3676607310771942,
-1.791368842124939,
0.08681229501962662,
-0.17393562197685242,
-0.584457278251648,
1.061134696006775,
-0.21562033891677856,
-0.18495450913906097,
... |
func Min(a int, b int) int {
if a < b {
return a
}
return b
} | [
0.2643585503101349,
-0.27992483973503113,
0.2619839906692505,
-0.31759634613990784,
-0.8185604810714722,
0.35049206018447876,
-1.0774229764938354,
-1.0378872156143188,
-0.4589354693889618,
-0.3035780191421509,
0.7318155765533447,
0.9908784031867981,
-0.13612200319766998,
-0.086799673736095... |
func Max(a int, b int) int {
if a > b {
return a
}
return b
} | [
0.05986974015831947,
0.6010093688964844,
0.29521772265434265,
0.4260044991970062,
-0.3155367076396942,
0.1439594328403473,
-1.203224539756775,
-0.7155284881591797,
-0.6064622402191162,
0.26986467838287354,
0.4747260510921478,
1.3483378887176514,
-0.0224862489849329,
-0.19200706481933594,
... |
func CommonSetup(d Defaults, t *testing.T) *TestEnv {
envLock.Lock()
defer envLock.Unlock()
if baseEnv.Vars.Kubeconfig != "" {
t.Logf("Environment already initialized")
} else {
baseEnv = TestEnv{
Vars: resolveEnvVars(d, t),
}
SubstituteOverlayVars(d.OperatorKustomizeBase, baseEnv.Vars, t)
if t.Failed(... | [
0.1002548560500145,
0.13729992508888245,
0.7592002153396606,
0.2665576934814453,
0.2964541018009186,
0.06570735573768616,
0.4693242311477661,
-0.0853508785367012,
0.3728158473968506,
0.11256840080022812,
0.7687433362007141,
-0.14386282861232758,
-0.9160916805267334,
0.4029723107814789,
-... |
func TestWithCacheName(t *testing.T) {
got := &config{cacheName: ""}
expect := &config{cacheName: "-"}
WithCacheName("-").applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v != expect %+v", got, expect)
}
} | [
0.04806903377175331,
0.5272152423858643,
0.5422298908233643,
0.41976022720336914,
-0.40407827496528625,
0.31271621584892273,
-0.12680213153362274,
-0.1820220947265625,
0.7640513777732849,
0.28713834285736084,
-1.103317379951477,
0.29695597290992737,
0.01400749757885933,
0.8731746673583984,... |
func TestWithLRU(t *testing.T) {
got := &config{cacheType: standard, maxEntries: 0}
expect := &config{cacheType: lru, maxEntries: 666}
WithLRU(666).applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v != expect %+v", got, expect)
}
} | [
0.524732232093811,
0.5565517544746399,
0.35275939106941223,
-0.06399445980787277,
0.07384804636240005,
0.2874531149864197,
-0.29421672224998474,
0.39434680342674255,
0.751493513584137,
-0.1903829425573349,
-0.7487457990646362,
0.5143923759460449,
-0.1792619377374649,
0.4362465441226959,
... |
func TestWithLFU(t *testing.T) {
got := &config{cacheType: standard, maxEntries: 0}
expect := &config{cacheType: lfu, maxEntries: 999}
WithLFU(999).applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v != expect %+v", got, expect)
}
} | [
0.5957838892936707,
0.8286301493644714,
0.3699771463871002,
-0.046531565487384796,
0.503776490688324,
0.021333632990717888,
-0.2871550917625427,
0.6454314589500427,
0.7444086074829102,
-0.7217919826507568,
-0.9710641503334045,
0.398910790681839,
0.24256128072738647,
0.5662279725074768,
0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.