text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (in *RegistrySpec) DeepCopyInto(out *RegistrySpec) {
*out = *in
out.TLS = in.TLS
} | [
1.144938349723816,
0.33651289343833923,
0.2768065631389618,
-0.5826597809791565,
-0.5807325839996338,
0.7178563475608826,
0.2076653689146042,
1.097017526626587,
-0.9767722487449646,
0.7251741290092468,
-0.8159260153770447,
1.1971542835235596,
0.49536433815956116,
-0.6194858551025391,
-0.... |
func (in *RegistrySpec) DeepCopy() *RegistrySpec {
if in == nil {
return nil
}
out := new(RegistrySpec)
in.DeepCopyInto(out)
return out
} | [
0.4887513518333435,
0.7349939346313477,
-0.009335614740848541,
0.18111425638198853,
0.1667792797088623,
0.23971787095069885,
0.4191000461578369,
0.5129554867744446,
0.002793718595057726,
0.5083881616592407,
-0.8204687833786011,
0.5628024339675903,
-0.21613413095474243,
-0.5585641860961914,... |
func (in *RegistryTLSSpec) DeepCopyInto(out *RegistryTLSSpec) {
*out = *in
} | [
1.023606777191162,
0.30688509345054626,
0.19993221759796143,
-0.6455093622207642,
-0.7767332196235657,
0.6498680114746094,
0.5783045291900635,
0.7464352250099182,
-1.23849618434906,
0.18040886521339417,
-0.8926592469215393,
1.1398688554763794,
0.7110759615898132,
0.17665238678455353,
-0.... |
func (in *RegistryTLSSpec) DeepCopy() *RegistryTLSSpec {
if in == nil {
return nil
}
out := new(RegistryTLSSpec)
in.DeepCopyInto(out)
return out
} | [
0.16001464426517487,
0.5189543962478638,
0.009966780431568623,
-0.2971186339855194,
-0.5997157692909241,
0.2587926387786865,
0.7305901646614075,
-0.3219866156578064,
-0.5451010465621948,
0.7325616478919983,
-0.7513979077339172,
0.07283394783735275,
0.31816646456718445,
-0.10126127302646637... |
func (vm *VirtualMachine) GetTemplate(client SkytapClient) (*Template, error) {
if vm.TemplateUrl == "" {
return nil, nil
}
template := &Template{}
_, err := GetSkytapResource(client, vm.TemplateUrl, template)
return template, err
} | [
-0.1640222668647766,
1.0528532266616821,
0.3869669735431671,
0.6373028755187988,
0.11327411234378815,
-0.44510507583618164,
-0.5136871933937073,
-0.057339806109666824,
0.3063560426235199,
-0.14630001783370972,
-0.1625567376613617,
-0.18600578606128693,
-0.8269585967063904,
-0.3631603419780... |
func (vm *VirtualMachine) GetEnvironment(client SkytapClient) (*Environment, error) {
if vm.EnvironmentUrl == "" {
return nil, nil
}
env := &Environment{}
_, err := GetSkytapResource(client, vm.EnvironmentUrl, env)
return env, err
} | [
-0.14386965334415436,
0.49833235144615173,
0.38293173909187317,
0.5598500967025757,
0.471156507730484,
-0.029421938583254814,
0.2773827016353607,
-0.3160111606121063,
0.3299660384654999,
0.38144174218177795,
-0.21130457520484924,
0.2376537173986435,
-0.41791895031929016,
0.1741563677787780... |
func (vm *VirtualMachine) Refresh(client SkytapClient) (RunstateAwareResource, error) {
return GetVirtualMachine(client, vm.Id)
} | [
0.6881062984466553,
-0.23456507921218872,
0.11939644813537598,
0.12024044990539551,
-0.26740628480911255,
0.406657874584198,
-1.0756609439849854,
-0.8636959791183472,
0.09801974147558212,
0.013185578398406506,
0.45005401968955994,
0.7062856554985046,
0.10615848749876022,
0.1327580511569976... |
func (vm *VirtualMachine) WaitUntilReady(client SkytapClient) (*VirtualMachine, error) {
return vm.WaitUntilInState(client, []string{RunStateStop, RunStateStart, RunStatePause}, false)
} | [
-0.16182759404182434,
0.4790731370449066,
0.19512349367141724,
-0.3814474642276764,
0.39900293946266174,
0.727506697177887,
-0.6867047548294067,
-1.1543693542480469,
0.17151068150997162,
0.06323524564504623,
-0.7238807082176208,
-0.1435883641242981,
0.16389517486095428,
-0.2929574251174927... |
func (vm *VirtualMachine) WaitUntilInState(client SkytapClient, desiredStates []string, requireStateChange bool) (*VirtualMachine, error) {
r, err := WaitUntilInState(client, desiredStates, vm, requireStateChange)
v := r.(*VirtualMachine)
return v, err
} | [
-0.787554144859314,
0.20170362293720245,
0.42779722809791565,
-0.3537867069244385,
-0.383943110704422,
0.5368902087211609,
-1.230186939239502,
-0.3639172315597534,
-0.06759181618690491,
0.018419206142425537,
-0.5062136650085449,
-0.1736547201871872,
-0.572440505027771,
-0.8853359818458557,... |
func (vm *VirtualMachine) Suspend(client SkytapClient) (*VirtualMachine, error) {
log.WithFields(log.Fields{"vmId": vm.Id}).Info("Suspending VM")
return vm.ChangeRunstate(client, RunStatePause, RunStatePause)
} | [
-0.08584648370742798,
-0.2890487611293793,
0.28892311453819275,
-0.3584382236003876,
0.37801164388656616,
0.9106963276863098,
-0.0695166289806366,
-0.5438855886459351,
-0.12237171083688736,
0.28303268551826477,
-0.32954591512680054,
0.454864501953125,
-0.8254876732826233,
-0.00808003637939... |
func (vm *VirtualMachine) Start(client SkytapClient) (*VirtualMachine, error) {
log.WithFields(log.Fields{"vmId": vm.Id}).Info("Starting VM")
return vm.ChangeRunstate(client, RunStateStart, RunStateStart)
} | [
-0.06331336498260498,
-0.32546085119247437,
0.13106217980384827,
-0.041263382881879807,
0.4533367156982422,
0.7211166620254517,
-0.819473385810852,
0.007450589444488287,
-0.17820300161838531,
0.6665676832199097,
-0.5279533863067627,
1.4156242609024048,
-0.22533340752124786,
-0.215719804167... |
func (vm *VirtualMachine) Stop(client SkytapClient) (*VirtualMachine, error) {
log.WithFields(log.Fields{"vmId": vm.Id}).Info("Stopping VM")
/*
Need to check current machine state as transitioning from suspended to stopped is not valid.
*/
checkVm, err := GetVirtualMachine(client, vm.Id)
if err != nil {
retu... | [
-0.593620777130127,
-0.06012175232172012,
0.5176882147789001,
-0.24204140901565552,
0.18327990174293518,
0.6954588890075684,
-0.2540408968925476,
-0.6540447473526001,
0.011333110742270947,
1.0284785032272339,
0.0850190669298172,
0.3556534945964813,
-0.636382520198822,
-0.6586585640907288,
... |
func (vm *VirtualMachine) Kill(client SkytapClient) (*VirtualMachine, error) {
log.WithFields(log.Fields{"vmId": vm.Id}).Info("Killing VM")
return vm.ChangeRunstate(client, RunStateKill, RunStateStop)
} | [
-0.14717139303684235,
-0.3822707235813141,
0.3044007420539856,
0.5020725131034851,
0.5084975957870483,
1.0763757228851318,
-1.1477760076522827,
-0.12019550055265427,
0.005050740670412779,
1.2153468132019043,
-0.07087165862321854,
0.3754131495952606,
0.06297841668128967,
-0.7735099792480469... |
func (vm *VirtualMachine) ChangeRunstate(client SkytapClient, runstate string, desiredRunstates ...string) (*VirtualMachine, error) {
log.WithFields(log.Fields{"changeState": runstate, "targetState": desiredRunstates, "vmId": vm.Id}).Info("Changing VM runstate")
ready, err := vm.WaitUntilReady(client)
if err != nil... | [
-0.6385467648506165,
0.24318577349185944,
0.4593817889690399,
-0.15483179688453674,
0.3764481544494629,
0.5155102610588074,
-1.1193302869796753,
-0.1606004387140274,
-0.36142367124557495,
0.39022794365882874,
-0.5077251195907593,
1.4211843013763428,
-0.49830862879753113,
-0.063973307609558... |
func GetVirtualMachineInEnvironment(client SkytapClient, envId string, vmId string) (*VirtualMachine, error) {
vm := &VirtualMachine{}
getVm := func(s *sling.Sling) *sling.Sling {
return s.Get(vmIdInEnvironmentPath(envId, vmId))
}
_, err := RunSkytapRequest(client, true, vm, getVm)
return vm, err
} | [
-0.028899142518639565,
-0.49432575702667236,
0.3845790922641754,
-0.26884400844573975,
0.9384461641311646,
0.5645835995674133,
-0.976638674736023,
-1.1973223686218262,
0.1400901973247528,
0.17536607384681702,
0.06615570187568665,
1.3152539730072021,
-0.6288905143737793,
0.1270252764225006,... |
func GetVirtualMachineInTemplate(client SkytapClient, templateId string, vmId string) (*VirtualMachine, error) {
vm := &VirtualMachine{}
getVm := func(s *sling.Sling) *sling.Sling {
return s.Get(vmIdInTemplatePath(templateId, vmId))
}
_, err := RunSkytapRequest(client, true, vm, getVm)
return vm, err
} | [
0.19049057364463806,
-0.19157570600509644,
0.2641962170600891,
-0.30362221598625183,
0.27747535705566406,
-0.1849958449602127,
-1.0818490982055664,
-0.5970411896705627,
0.1310458481311798,
-0.08443579077720642,
-0.09213367104530334,
0.9068771600723267,
-0.808303952217102,
0.059932742267847... |
func GetVirtualMachine(client SkytapClient, vmId string) (*VirtualMachine, error) {
vm := &VirtualMachine{}
getVm := func(s *sling.Sling) *sling.Sling {
return s.Get(vmIdPath(vmId))
}
_, err := RunSkytapRequest(client, false, vm, getVm)
return vm, err
} | [
0.12013797461986542,
0.08543863892555237,
0.21330970525741577,
-0.14069104194641113,
0.6683698892593384,
0.0240519717335701,
-0.9708279967308044,
-1.0761913061141968,
0.6526896953582764,
-0.2478604018688202,
-0.07109446823596954,
1.215193748474121,
-0.4241008460521698,
0.243330180644989,
... |
func DeleteVirtualMachine(client SkytapClient, vmId string) error {
log.WithFields(log.Fields{"vmId": vmId}).Info("Deleting VM")
deleteVm := func(s *sling.Sling) *sling.Sling { return s.Delete(vmIdPath(vmId)) }
_, err := RunSkytapRequest(client, false, nil, deleteVm)
return err
} | [
0.11809681355953217,
-0.44836679100990295,
0.23045802116394043,
0.15963250398635864,
0.90477055311203,
0.30071312189102173,
-0.6335475444793701,
-0.13256952166557312,
0.9375233054161072,
0.055792588740587234,
0.004336063284426928,
0.8811532855033875,
-0.3338276147842407,
0.8992719650268555... |
func init() {
const (
defaultGridSize = 2
usage = "Grid Size of the lattice"
)
flag.Uint64Var(&gridSize, "gridSize", defaultGridSize, usage)
flag.Uint64Var(&gridSize, "g", defaultGridSize, usage+" (shorthand)")
} | [
0.5474277138710022,
0.6685311794281006,
0.4562252163887024,
-0.17987383902072906,
0.805619478225708,
-0.28197747468948364,
0.18645332753658295,
0.12232180684804916,
-0.5339357852935791,
-0.18910592794418335,
-0.23868006467819214,
0.9209899306297302,
0.24337437748908997,
1.4666920900344849,... |
func ProdFactor(a, b Factorization) Factorization {
var f Factorization
var p PrimeFactor
for _, av := range a {
p.exp = av.exp
p.prime = av.prime
for _, bv := range b {
if av.prime == bv.prime {
p.exp = av.exp + bv.exp
}
}
f = append(f, p)
}
return f
} | [
-0.601052463054657,
-0.24023468792438507,
0.6786819696426392,
-0.009814064018428326,
-0.2820275127887726,
-0.4855620563030243,
0.07974144071340561,
0.04426730424165726,
0.8174512386322021,
0.13817442953586578,
0.45600777864456177,
1.1801872253417969,
0.05688227340579033,
-0.288846224546432... |
func DivFactor(numerator, denominator Factorization) Factorization {
var f Factorization
var p PrimeFactor
for _, nv := range numerator {
p.exp = nv.exp
p.prime = nv.prime
for _, dv := range denominator {
if nv.prime == dv.prime {
if nv.exp < dv.exp {
fmt.Println("ERROR")
os.Exit(1)
}
... | [
-0.5550664663314819,
-0.13915768265724182,
0.5602244734764099,
-0.14528945088386536,
0.15786734223365784,
-0.15117591619491577,
0.032446231693029404,
0.08274053782224655,
0.34874019026756287,
-0.34526363015174866,
0.3987366259098053,
-0.058555763214826584,
-0.3075452148914337,
0.4464632570... |
func SimplifyFactorization(f Factorization) Factorization {
occuringPrimes := FindOccuringPrimes(f)
sortedPrimes := Sort(occuringPrimes)
simplifiedF := CompactFactorization(sortedPrimes, f)
return simplifiedF
} | [
-0.23936010897159576,
1.1433842182159424,
0.4101741909980774,
0.1419823169708252,
-0.4479618966579437,
-0.4774225652217865,
1.0102570056915283,
0.42724135518074036,
0.5261952877044678,
0.3684576451778412,
-0.627147912979126,
-0.5011480450630188,
0.2468147873878479,
0.008656928315758705,
... |
func CompactFactorization(sortedPrimes []uint64, factorization Factorization) Factorization {
var compactedF Factorization
// iterate over all occuring primes (in sored order)
for _, sortedPrime := range sortedPrimes {
var summedExponents uint64
// for each prime iterate over factorization and sum all exponents... | [
0.4988996386528015,
0.07578469812870026,
0.5334696173667908,
-0.3727872967720032,
-0.9624589085578918,
-0.3211558163166046,
0.5619645714759827,
0.6727094650268555,
1.012630581855774,
0.47180330753326416,
-0.025663716718554497,
-0.18006829917430878,
-0.6342793107032776,
0.3780493438243866,
... |
func Sort(a []uint64) []uint64 {
for i := 1; i != len(a); i++ {
j := i
for (j > 0) && (a[j] < a[j-1]) {
a[j], a[j-1] = a[j-1], a[j]
j--
}
}
return a
} | [
-0.571457028388977,
0.23545704782009125,
0.8519945740699768,
0.1626124382019043,
-1.1168410778045654,
0.25971367955207825,
1.1156213283538818,
-0.397480309009552,
0.8443692326545715,
0.31774893403053284,
0.41914165019989014,
0.9646190404891968,
-0.2976481020450592,
0.9950385689735413,
-0... |
func FindOccuringPrimes(f Factorization) []uint64 {
l := len(f)
var occuringPrimes []uint64
var isAlreadyRegistered = false
occuringPrimes = append(occuringPrimes, f[0].prime)
for i := 1; i < l; i++ {
isAlreadyRegistered = false
for j := 0; j < len(occuringPrimes); j++ {
if f[i].prime == occuringPrimes[j] ... | [
-0.4191049635410309,
0.21572035551071167,
0.6070044040679932,
0.008115504868328571,
0.14914652705192566,
-0.2791968286037445,
0.6799935102462769,
0.379474401473999,
0.19369174540042877,
1.0474213361740112,
-0.03557826578617096,
-0.11704779416322708,
-0.40922948718070984,
1.0360852479934692... |
func Factorize(number uint64) Factorization {
var primeFactor = PrimeFactor{2, 0}
var factorization Factorization
// treat even numbers separatly
for number%primeFactor.prime == 0 {
primeFactor.exp++
number = number / primeFactor.prime
}
if primeFactor.exp != 0 {
factorization = append(factorization, prime... | [
-1.0764491558074951,
0.7053379416465759,
0.8273798227310181,
-0.04581037908792496,
-0.2868122160434723,
-0.26619476079940796,
-0.18644191324710846,
0.5050828456878662,
1.210875391960144,
-0.6531879901885986,
-0.5043154954910278,
-0.5502308011054993,
-0.6224173307418823,
1.0095281600952148,... |
func ReverseFactorization(f Factorization) string {
var result []uint8 = []uint8{1}
fmt.Print("\n\n")
for i, v := range f {
prime := Vectorize(strconv.FormatUint(v.prime, 10))
result = Product(result, Pow(prime, v.exp))
DisplayProgressBar(i, len(f)-1, "Calculating... ")
}
fmt.Print("\n\n")
return Stringif... | [
-1.1055092811584473,
0.8187106847763062,
0.5057433843612671,
-0.41581618785858154,
0.09514788538217545,
-0.9544463753700256,
0.8186111450195312,
0.29053062200546265,
-0.6523348689079285,
0.3393236994743347,
0.006290441378951073,
-0.22689908742904663,
-0.7970418930053711,
-0.065189875662326... |
func Pow(base []uint8, exp uint64) []uint8 {
var result []uint8 = base
for i := exp - 1; i != 0; i-- {
result = Product(result, base)
}
return result
} | [
-0.9658849835395813,
-0.001962246373295784,
0.7032997012138367,
1.2804526090621948,
0.48319607973098755,
-0.05238630622625351,
-0.11661769449710846,
0.31842684745788574,
0.5533865094184875,
0.9025803804397583,
-0.24957692623138428,
0.029718616977334023,
-0.820000946521759,
-0.0850604921579... |
func Product(a, b []uint8) []uint8 {
var result []uint8 = a
stringNumberB := Stringify(b)
uintNumberB, err := strconv.ParseUint(stringNumberB, 10, 64)
if err != nil {
panic(err)
}
var i uint64
for i = uintNumberB - 1; i != 0; i-- {
result = Sum(result, a)
}
return result
} | [
-0.8021566867828369,
0.3728955388069153,
0.6885168552398682,
0.435423344373703,
0.5690619349479675,
-0.21236766874790192,
0.13846860826015472,
-0.7234197854995728,
0.8178358674049377,
0.6564868688583374,
-0.29836025834083557,
0.542901873588562,
-0.8998069763183594,
-0.4562320411205292,
0... |
func Sum(a, b []uint8) []uint8 {
switch {
case len(a) < len(b):
a, b = FillSmallerWithZeros(a, b)
case len(b) < len(a):
b, a = FillSmallerWithZeros(b, a)
}
return Addition(a, b)
} | [
0.025220230221748352,
0.2861262559890747,
0.6164386868476868,
-0.03370796516537666,
0.33957982063293457,
-0.20367614924907684,
-0.5223777890205383,
-0.8165852427482605,
1.109083890914917,
0.32850414514541626,
0.23108269274234772,
1.1551789045333862,
-0.32718464732170105,
0.0269366689026355... |
func Addition(a, b []uint8) []uint8 {
var sum uint8 = 0
var carry uint8 = 0
var result []uint8
if len(a) != len(b) {
fmt.Println("ERROR: Addants have no equal length!")
os.Exit(1)
}
for i := 0; i != len(a); i++ {
sum = a[i] + b[i] + carry
if sum >= 10 {
carry = 1
result = append(result, sum%10)
... | [
0.1559210866689682,
-0.40860164165496826,
0.9005414247512817,
-0.0911140963435173,
0.31114688515663147,
0.46425923705101013,
0.06774314492940903,
-0.90163654088974,
0.9348335862159729,
1.0417532920837402,
0.24755610525608063,
0.23305465281009674,
-1.1050611734390259,
0.8235093355178833,
... |
func FillSmallerWithZeros(smaller, bigger []uint8) ([]uint8, []uint8) {
diff := len(bigger) - len(smaller)
for i := 0; i != diff; i++ {
smaller = append(smaller, 0)
}
return smaller, bigger
} | [
0.37073275446891785,
-0.588994562625885,
0.6441689729690552,
0.03451843559741974,
0.3503393530845642,
0.3681508004665375,
-1.1455144882202148,
-0.9985457062721252,
0.4779392182826996,
-0.3506195843219757,
-0.4507865011692047,
0.40435513854026794,
-0.6697081327438354,
1.3876785039901733,
... |
func FactorizedFactorial(n uint64) Factorization {
var f Factorization
var i uint64
for i = 2; i <= n; i++ {
for j := 0; j != len(Factorize(i)); j++ {
f = append(f, Factorize(i)[j])
}
}
return SimplifyFactorization(f)
} | [
-0.3296078145503998,
0.6993390917778015,
0.277984619140625,
0.8415969610214233,
-0.06543439626693726,
-0.8750216364860535,
-0.18055449426174164,
-0.3635130822658539,
0.18654707074165344,
-0.7994865775108337,
-1.2052059173583984,
0.19884291291236877,
-0.08921433985233307,
0.7062385678291321... |
func (f PrimeFactor) String() string {
var expTotal string
var primeTotal string
primeString := strconv.FormatUint(f.prime, 10)
expString := strconv.FormatUint(f.exp, 10)
numberOfPrimeDigits := len(primeString)
numberOfExpDigits := len(expString)
// construct strings
expTotal += strings.Repeat(" ", numberOfPr... | [
-0.21379151940345764,
-0.4596538245677948,
0.620280385017395,
-0.924113929271698,
-0.4772222638130188,
-0.09069687873125076,
0.6307014226913452,
-0.07035154849290848,
0.5545396208763123,
-0.08564498275518417,
0.03755832090973854,
0.1912328451871872,
-0.17498774826526642,
-0.048129111528396... |
func Stringify(number []uint8) string {
length := len(number)
var string_number []byte
var buffer bytes.Buffer
for i := range number {
string_number = append(string_number,
byte(number[length-1-i]+ascii_digit_offset))
}
buffer.Write(string_number)
return buffer.String()
} | [
-0.5009652376174927,
0.23602049052715302,
0.5738760232925415,
-0.7088070511817932,
0.1738506257534027,
0.3765753507614136,
-0.2745511829853058,
-0.2661406397819519,
0.5306627750396729,
0.20103546977043152,
-0.7971678376197815,
0.45380356907844543,
-0.23795771598815918,
-0.09124995768070221... |
func Vectorize(number string) []uint8 {
length := len(number)
var vector_number []uint8
for i := range number {
vector_number = append(vector_number,
uint8(number[length-1-i])-ascii_digit_offset)
}
return vector_number
} | [
-0.6290826201438904,
0.07661181688308716,
0.7686949968338013,
-0.34240806102752686,
0.3553617000579834,
-0.23626360297203064,
-0.04786868393421173,
0.10467573255300522,
0.5329683423042297,
0.7518050074577332,
-0.6713178157806396,
0.9591016173362732,
-0.5952452421188354,
-0.1835119575262069... |
func GeneratePanicMsg(limit uint64) string {
overMaxElements := limit - maxUint64
msg :=
"\nThe numerator is too high: " + strconv.FormatUint(limit, 10) +
"\nThe numerator cannot exceed " + strconv.FormatUint(maxUint64, 10) +
"\nYou are over the limit by " + strconv.FormatUint(overMaxElements, 10)
retur... | [
-0.31300222873687744,
0.5020083785057068,
0.6334339380264282,
-0.5414376258850098,
-0.24071407318115234,
0.6513760089874268,
-0.1904148906469345,
0.1948690265417099,
-0.104252390563488,
-0.11525038629770279,
-0.14369948208332062,
0.09042006731033325,
-0.4114444851875305,
0.2474359273910522... |
func ClearTerminalScreen() {
os.Stdout.Write([]byte("\033[2J"))
os.Stdout.Write([]byte("\033[H"))
os.Stdout.Write([]byte("\n"))
} | [
-0.01476241648197174,
-0.35986658930778503,
0.6075528264045715,
-0.34103500843048096,
-0.09296516329050064,
0.7360202074050903,
-1.024596095085144,
-1.1189361810684204,
-0.5112159848213196,
0.9138710498809814,
0.5940921902656555,
0.7079136967658997,
0.5848795175552368,
0.3438222408294678,
... |
func DisplayProgressBar(current, total int, action string) {
percent := current * 100 / total
//prefix := strconv.FormatUint(percent, 10) + "%"
prefix := strconv.Itoa(percent) + "%"
bar_start := " ["
bar_end := "] "
cols := 50
bar_size := cols - len(prefix+bar_start+bar_end)
amount := int(float32(current) / (f... | [
0.21467268466949463,
-0.3386094570159912,
1.010134220123291,
-0.04819206893444061,
-0.44066447019577026,
0.7426872849464417,
0.9534669518470764,
-0.5942631363868713,
-0.5332860350608826,
0.665530264377594,
0.8765946626663208,
-0.031372711062431335,
-0.47438228130340576,
0.4073166251182556,... |
func DisplayResults(number uint64, length uint64) {
fmt.Println("Longest Collatz sequence under", gridSize, "starts at")
fmt.Println(number)
fmt.Println("and has a length of")
fmt.Println(length)
} | [
1.0495530366897583,
0.06412597745656967,
0.6812021732330322,
-0.8216421604156494,
0.013077376410365105,
0.27655458450317383,
0.4016795754432678,
-0.438529908657074,
0.16095036268234253,
-0.4493255615234375,
-0.2743995189666748,
0.7015860676765442,
-0.46715572476387024,
0.7010799050331116,
... |
func CheckNumberIsOkOrDie(limit uint64) {
if limit > maxUint64 {
panicMsg := GeneratePanicMsg(limit)
panic(panicMsg)
}
} | [
-0.08752258121967316,
1.1943652629852295,
0.4951229989528656,
1.6922200918197632,
0.3168225586414337,
0.6580435037612915,
-0.23245997726917267,
0.6656025052070618,
0.35815975069999695,
0.361463725566864,
0.4879426658153534,
0.1896238476037979,
-0.29201263189315796,
0.3146912753582001,
-0... |
func NewPostV1DevicesParams() *PostV1DevicesParams {
var (
kindDefault = string("chrome")
)
return &PostV1DevicesParams{
Kind: kindDefault,
timeout: cr.DefaultTimeout,
}
} | [
-0.5056199431419373,
0.2047683298587799,
0.007349343970417976,
0.7584713101387024,
-0.5648550987243652,
0.40013960003852844,
-0.1335628777742386,
0.2637917399406433,
-0.41726866364479065,
0.8304415345191956,
-0.4915977120399475,
0.23554541170597076,
-0.9184110760688782,
1.1557295322418213,... |
func NewPostV1DevicesParamsWithTimeout(timeout time.Duration) *PostV1DevicesParams {
var (
kindDefault = string("chrome")
)
return &PostV1DevicesParams{
Kind: kindDefault,
timeout: timeout,
}
} | [
-0.031713519245386124,
0.18928192555904388,
0.16553440690040588,
0.9403201937675476,
-0.7092167139053345,
0.940213680267334,
-0.7304625511169434,
0.21742624044418335,
-0.2248714715242386,
1.5129239559173584,
-0.23797515034675598,
0.46737924218177795,
-0.7041218876838684,
1.0802545547485352... |
func NewPostV1DevicesParamsWithContext(ctx context.Context) *PostV1DevicesParams {
var (
kindDefault = string("chrome")
)
return &PostV1DevicesParams{
Kind: kindDefault,
Context: ctx,
}
} | [
-0.3359588086605072,
0.29509443044662476,
0.20562103390693665,
0.6522833704948425,
-0.4145454168319702,
0.8643763661384583,
-0.755463182926178,
-0.3882276117801666,
0.14048677682876587,
0.8171813488006592,
-0.36333757638931274,
0.20782530307769775,
-0.8269934058189392,
0.6935985088348389,
... |
func NewPostV1DevicesParamsWithHTTPClient(client *http.Client) *PostV1DevicesParams {
var (
kindDefault = string("chrome")
)
return &PostV1DevicesParams{
Kind: kindDefault,
HTTPClient: client,
}
} | [
-0.4010329246520996,
-0.09527961164712906,
0.08657404035329819,
0.659940242767334,
-0.47211870551109314,
1.0416696071624756,
-0.003418149659410119,
-0.12803293764591217,
-0.46765846014022827,
0.6708817481994629,
-0.6333305239677429,
0.4214377701282501,
-0.47287821769714355,
0.8016284704208... |
func (o *PostV1DevicesParams) WithTimeout(timeout time.Duration) *PostV1DevicesParams {
o.SetTimeout(timeout)
return o
} | [
-0.3046998083591461,
0.6418121457099915,
0.34477698802948,
0.7120775580406189,
-0.5473845601081848,
0.5400212407112122,
-0.020996734499931335,
0.12676414847373962,
0.1731184720993042,
1.2016575336456299,
0.2578200399875641,
0.10158473253250122,
-0.2625482678413391,
1.2731873989105225,
-0... |
func (o *PostV1DevicesParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
-0.5122010111808777,
0.7805955410003662,
0.16083073616027832,
0.8615169525146484,
-0.3021540641784668,
0.9682028889656067,
0.05227229371666908,
0.48951518535614014,
-0.2839001715183258,
1.255260944366455,
0.2655498683452606,
0.34258905053138733,
-0.8485839366912842,
1.5241235494613647,
-... |
func (o *PostV1DevicesParams) WithContext(ctx context.Context) *PostV1DevicesParams {
o.SetContext(ctx)
return o
} | [
-0.8038787245750427,
0.6538397669792175,
0.4825742244720459,
0.571093738079071,
-0.4982885718345642,
0.37600475549697876,
-0.14359994232654572,
-0.33108529448509216,
0.4320007860660553,
0.6144328713417053,
0.0779782086610794,
-0.01886303350329399,
-0.7491182088851929,
0.5788837671279907,
... |
func (o *PostV1DevicesParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-0.8328314423561096,
0.8018125295639038,
0.1673412322998047,
0.9265956282615662,
-0.0016937139444053173,
0.6469525694847107,
0.03910455107688904,
-0.00830919947475195,
0.42384618520736694,
0.5903798937797546,
-0.04855014756321907,
0.370256632566452,
-1.1376162767410278,
0.9790428876876831,... |
func (o *PostV1DevicesParams) WithHTTPClient(client *http.Client) *PostV1DevicesParams {
o.SetHTTPClient(client)
return o
} | [
-0.592650830745697,
-0.21408452093601227,
0.4071531891822815,
0.26493656635284424,
-0.3051610291004181,
0.37838488817214966,
0.5832027196884155,
-0.2068917453289032,
-0.35331636667251587,
0.4383346736431122,
-0.0192103311419487,
0.019179539754986763,
0.011998160742223263,
0.645695090293884... |
func (o *PostV1DevicesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
-0.19154414534568787,
0.0882343277335167,
0.1471671611070633,
-0.07348251342773438,
-0.4582799971103668,
0.37481969594955444,
0.7108870148658752,
-0.08097440749406815,
-0.896731972694397,
0.5563077330589294,
-0.20343244075775146,
0.5082100033760071,
-0.6837180852890015,
0.616473376750946,
... |
func (o *PostV1DevicesParams) WithDeviceIdentifier(deviceIdentifier string) *PostV1DevicesParams {
o.SetDeviceIdentifier(deviceIdentifier)
return o
} | [
-0.5743012428283691,
-0.18844963610172272,
0.24866807460784912,
0.3358479142189026,
-0.7968677282333374,
1.0872149467468262,
0.5705454349517822,
0.3342535197734833,
0.7907604575157166,
0.017000531777739525,
-0.7651374340057373,
-0.4370415508747101,
0.31730276346206665,
1.0655736923217773,
... |
func (o *PostV1DevicesParams) SetDeviceIdentifier(deviceIdentifier string) {
o.DeviceIdentifier = deviceIdentifier
} | [
-0.9082584977149963,
-0.39571109414100647,
0.16370069980621338,
0.6107176542282104,
-0.6079992055892944,
1.4035683870315552,
0.7559505105018616,
0.8041056990623474,
0.47793370485305786,
0.08218671381473541,
-1.006697416305542,
-0.02152695506811142,
-0.35091057419776917,
1.4951001405715942,... |
func (o *PostV1DevicesParams) WithKind(kind string) *PostV1DevicesParams {
o.SetKind(kind)
return o
} | [
-0.4741513133049011,
0.40052059292793274,
0.11954700201749802,
0.5144617557525635,
-0.3442765176296234,
0.05930754914879799,
0.2816089391708374,
-0.571378231048584,
-0.45631083846092224,
0.9733898043632507,
0.5018836855888367,
0.14941932260990143,
-0.6103222370147705,
1.1477020978927612,
... |
func (o *PostV1DevicesParams) SetKind(kind string) {
o.Kind = kind
} | [
-0.6193687915802002,
0.5232617259025574,
-0.09537867456674576,
0.953906238079071,
-0.08298463374376297,
0.4156056046485901,
0.40684348344802856,
-0.069565050303936,
-0.7949819564819336,
0.8727707266807556,
0.19976182281970978,
0.6838932037353516,
-1.1179922819137573,
1.4782923460006714,
... |
func (o *PostV1DevicesParams) WithName(name string) *PostV1DevicesParams {
o.SetName(name)
return o
} | [
-1.0103418827056885,
0.33106470108032227,
0.39095261693000793,
0.5313155651092529,
-0.5925440788269043,
-0.08619362860918045,
0.4176955223083496,
-0.16897709667682648,
-0.36565274000167847,
1.3546702861785889,
-0.08141454309225082,
-0.8117666840553284,
-0.467813640832901,
0.944661498069763... |
func (o *PostV1DevicesParams) SetName(name string) {
o.Name = name
} | [
-1.2108235359191895,
0.24715563654899597,
0.17299333214759827,
0.8054097294807434,
-0.5413103699684143,
0.3274637758731842,
0.23522640764713287,
0.06777069717645645,
-0.549096405506134,
1.2232446670532227,
-0.2952522933483124,
-0.4423068165779114,
-0.8652533292770386,
1.5228838920593262,
... |
func (o *PostV1DevicesParams) WithNotificationIdentifier(notificationIdentifier *string) *PostV1DevicesParams {
o.SetNotificationIdentifier(notificationIdentifier)
return o
} | [
0.03207226097583771,
-0.056518442928791046,
0.1742771565914154,
0.7633842825889587,
-0.2753724455833435,
1.1807379722595215,
0.9037200212478638,
-0.14727987349033356,
0.8377722501754761,
0.8612717986106873,
-1.1080093383789062,
-0.7121143937110901,
0.4758720397949219,
0.6233413219451904,
... |
func (o *PostV1DevicesParams) SetNotificationIdentifier(notificationIdentifier *string) {
o.NotificationIdentifier = notificationIdentifier
} | [
-0.41601380705833435,
-0.19578270614147186,
0.0831964835524559,
0.97828608751297,
-0.34983792901039124,
1.6083170175552368,
1.113349199295044,
0.1729164868593216,
0.5795130729675293,
0.7993243932723999,
-1.6048095226287842,
-0.2629707157611847,
-0.13665257394313812,
0.8808501958847046,
-... |
func (o *PostV1DevicesParams) WithSubscribeNotification(subscribeNotification *bool) *PostV1DevicesParams {
o.SetSubscribeNotification(subscribeNotification)
return o
} | [
0.2086445838212967,
0.5832502841949463,
0.3793371617794037,
1.2591253519058228,
-0.44470328092575073,
-0.14983931183815002,
0.1757248044013977,
0.06267476826906204,
0.31104546785354614,
0.574673056602478,
-0.8102785348892212,
-0.14243268966674805,
0.4133456349372864,
0.367568701505661,
-... |
func (o *PostV1DevicesParams) SetSubscribeNotification(subscribeNotification *bool) {
o.SubscribeNotification = subscribeNotification
} | [
-0.24967844784259796,
0.44177302718162537,
0.33438026905059814,
1.3356249332427979,
-0.13526657223701477,
0.27419713139533997,
0.06280876696109772,
-0.11227499693632126,
-0.15508706867694855,
0.46873408555984497,
-1.0873363018035889,
0.493528813123703,
-0.4824305474758148,
0.62962836027145... |
func (o *PostV1DevicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// form param device_identifier
frDeviceIdentifier := o.DeviceIdentifier
fDeviceIdentifier := frDeviceIdentifier
if fDeviceIdentifier... | [
-0.7075480818748474,
-0.020353075116872787,
1.1408579349517822,
0.026459770277142525,
0.31800568103790283,
-0.36787134408950806,
0.6366071701049805,
0.0441112294793129,
-0.5492737293243408,
0.2650476396083832,
-0.26591673493385315,
0.15330180525779724,
-0.18699659407138824,
0.9614270329475... |
func readLines() (lines []string) {
// Avoid a panic accessing os.Args[1]
if len(os.Args) != 2 {
fmt.Fprintln(os.Stderr, "Usage: ./problem024 <file>")
os.Exit(1)
}
// Read data from a file given as a command line argument
data, err := ioutil.ReadFile(os.Args[1])
if err != nil {
fmt.Fprintln(os.Stderr, err)... | [
0.41788461804389954,
-0.2690242826938629,
0.8574739694595337,
-0.08794022351503372,
0.33276721835136414,
0.9164146184921265,
-0.861798107624054,
0.46877411007881165,
-0.674922525882721,
0.04459208622574806,
0.9705918431282043,
0.14088720083236694,
-0.6416908502578735,
-0.19346021115779877,... |
func (sh *ShaderStd) Name() string { return sh.MtlName } | [
0.19366700947284698,
-0.9064765572547913,
0.4550683796405792,
-0.2558940649032593,
-1.3635928630828857,
0.5047833919525146,
0.03857812657952309,
-1.5649385452270508,
0.3775016665458679,
0.40931785106658936,
-0.6885116100311279,
-0.0847695991396904,
0.6202729940414429,
1.0908725261688232,
... |
func (sh *ShaderStd) Def() core.NodeDef { return sh.NodeDef } | [
0.30070579051971436,
0.8016026020050049,
0.35992056131362915,
-0.2647760212421417,
0.06404263526201248,
0.26183733344078064,
0.4793696403503418,
-0.7060881853103638,
-0.1483542025089264,
-0.00045858859084546566,
-0.6376515030860901,
1.4254308938980103,
0.12908543646335602,
0.93506634235382... |
func (sh *ShaderStd) PreRender() error {
switch sh.Spec1FresnelModel {
case "Dielectric":
sh.spec1FresnelModel = fr.DielectricModel
case "Metal":
sh.spec1FresnelModel = fr.ConductorModel
}
return nil
} | [
0.1693849265575409,
0.992297351360321,
0.5263651609420776,
-0.043735794723033905,
0.4919443726539612,
-0.09151144325733185,
-0.3333849012851715,
-0.5396451354026794,
-0.019833771511912346,
-0.6467074751853943,
0.188551664352417,
-0.36070212721824646,
-0.381553590297699,
0.9611871838569641,... |
func (sh *ShaderStd) PostRender() error { return nil } | [
0.10838581621646881,
0.018941957503557205,
0.4133692681789398,
-0.23821206390857697,
-0.7466862797737122,
0.019690442830324173,
-0.10347955673933029,
-0.3659064471721649,
0.2912169098854065,
-1.5825899839401245,
-0.11623146384954453,
-0.845730721950531,
-1.370313286781311,
1.25276362895965... |
func (sh *ShaderStd) Eval(sg *core.ShaderContext) {
//fmt.Printf("%v %v %v %v\n", sg.DdDdx, sg.DdNdx, sg.DdDdy, sg.DdNdy)
/* deltaTx := m.Vec2Scale(sg.Image.PixelDelta[0], sg.Dduvdx)
deltaTy := m.Vec2Scale(sg.Image.PixelDelta[1], sg.Dduvdy)
lod := m.Log2(m.Max(m.Vec2Length(deltaTx), m.Vec2Length(deltaTy)))
//... | [
0.2667725086212158,
-0.4818427562713623,
0.7321085333824158,
-1.711639404296875,
-0.4436054527759552,
0.45030105113983154,
0.8294711709022522,
-0.26594382524490356,
-0.01767643354833126,
-0.2894485294818878,
0.5879067182540894,
0.5014590620994568,
0.22071519494056702,
0.8423146605491638,
... |
func NewBackend(input *NewBackendInput) Backend {
return &backendImpl{
recordDB: input.RecordDB,
}
} | [
0.884874701499939,
-0.3980732262134552,
0.08436824381351471,
0.9050847291946411,
-0.6149032711982727,
0.35059794783592224,
0.40933576226234436,
-0.005120947025716305,
0.14686615765094757,
0.4041857421398163,
-0.14246690273284912,
0.5181851983070374,
-1.0656222105026245,
0.29933515191078186... |
func HashtagIter(dict []string, ht string) []string {
var wl = make([]string, 0)
for i := 0; i < len(ht); i++ {
if len(ht) == 0 {
return wl
} else {
w, pos := hashtag(dict, ht)
wl = append(wl, w)
ht = ht[pos:]
fmt.Println(w, ht, wl)
}
}
fmt.Println("###", wl, ht)
return wl
} | [
-0.1958688497543335,
-0.3560444414615631,
0.6918575763702393,
-0.26687055826187134,
0.011865513399243355,
0.2015380859375,
-0.7116291522979736,
-0.3332708775997162,
-1.3438142538070679,
0.733624279499054,
0.5153114199638367,
-0.5163351893424988,
0.01423940621316433,
1.1592307090759277,
-... |
func NewGraph() *Graph {
return &Graph{
nodes: make(map[int]integerSet),
}
} | [
-0.6747475266456604,
0.5134109854698181,
0.10351810604333878,
0.4736813008785248,
-0.766313910484314,
0.024524318054318428,
0.14837628602981567,
-0.23562563955783844,
0.2871733605861664,
-0.2552937865257263,
0.15624700486660004,
0.1345861405134201,
-0.07686667144298553,
-0.9292289018630981... |
func (g *Graph) AddEdge(n1, n2 int) {
g.AddNode(n1)
g.AddNode(n2)
g.nodes[n1][n2] = true
} | [
-1.1976540088653564,
1.194286823272705,
0.6733059287071228,
0.6388077139854431,
0.5352307558059692,
0.8214300274848938,
-0.4385959506034851,
0.4616534411907196,
-0.9713078141212463,
-0.21790078282356262,
-0.5394427180290222,
0.18707099556922913,
-0.5672168731689453,
0.5259961485862732,
0... |
func (g Graph) TopSort() []int {
if len(g.nodes) == 0 {
return make([]int, 0)
}
visited := make(map[int]bool)
var rank []int
for key := range g.nodes {
if !visited[key] {
rank = g.dfs(key, visited, rank)
}
}
return reverse(rank)
} | [
-1.8866984844207764,
0.8991336822509766,
0.9127618074417114,
-0.527093231678009,
-0.13027478754520416,
-0.395769864320755,
0.47846221923828125,
-0.07297476381063461,
-0.5523815155029297,
0.21236777305603027,
0.17963995039463043,
0.464472234249115,
-0.9820742607116699,
-0.1476791650056839,
... |
func (g Graph) ConnectedComponents() int {
ds := NewDisjointSet()
for node := range g.nodes {
ds.Make(node)
}
for node, neighbors := range g.nodes {
for neighbor := range neighbors {
if ds.Find(node) != ds.Find(neighbor) {
ds.Union(node, neighbor)
}
}
}
return ds.Size()
} | [
-0.20136867463588715,
-0.09386064857244492,
0.6800020337104797,
-1.2954415082931519,
-0.12488065659999847,
0.2621549665927887,
0.5440014004707336,
0.01496902760118246,
-0.14999030530452728,
-0.43306899070739746,
-0.448323130607605,
-0.5069307088851929,
-0.023486660793423653,
-0.39282742142... |
func (g Graph) SpanningTree() {
/* TODO: Kruska algorithm
1. Initialize a Tk wich is a Spanning tree algorithm
2. Put all edges in a min Priority Queue ordered by weight.
3. Create a disjoint ds set ds where each node exists on its own set.
4. For each edge e {v,w}
if ds.Find(v) != ds.Find(w)
add edge v,w ... | [
0.27015507221221924,
0.26306161284446716,
0.4929729104042053,
-0.1986592710018158,
-1.1664478778839111,
0.24118643999099731,
0.0735875740647316,
0.9188365936279297,
0.668751060962677,
0.06038172170519829,
0.22907942533493042,
-0.05966482684016228,
-0.06527657061815262,
0.8520922064781189,
... |
func EmptyGraph[T comparable]() graph.Graph[T] {
return Memory[T](make([]*graph.Edge[T], 0))
} | [
-0.48544928431510925,
0.6829627752304077,
0.37256649136543274,
-0.5584293603897095,
-0.3850056529045105,
0.13930733501911163,
-0.1785474419593811,
-0.4475238621234894,
0.9027096033096313,
1.0166394710540771,
-0.8556914925575256,
0.6266320943832397,
-0.3970111608505249,
-0.9133492708206177,... |
func Of[T comparable](edges []*graph.Edge[T]) Memory[T] {
return Memory[T](edges)
} | [
-0.11901524662971497,
-0.598213791847229,
0.17735818028450012,
-1.2020492553710938,
-0.4361113905906677,
-1.1600253582000732,
-0.2593429386615753,
-0.9863131046295166,
0.7792285680770874,
0.8003485202789307,
0.4060097634792328,
0.8566381335258484,
0.4771761894226074,
-0.5564230680465698,
... |
func (m *CalculatedServiceMetric) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateConditions(formats); err != nil {
res = append(res, err)
}
if err := m.validateDimensionDefinition(formats); err != nil {
res = append(res, err)
}
if err := m.validateEnabled(formats); err != nil... | [
0.5470936894416809,
0.24357762932777405,
0.8274134993553162,
0.0829387679696083,
-0.3030230700969696,
0.5613324046134949,
0.45453065633773804,
-1.3558579683303833,
-1.0937774181365967,
-0.0648878887295723,
0.3778282403945923,
-0.28122416138648987,
-0.07602760195732117,
0.706767201423645,
... |
func Diff(left, right []string) (leftOnly, rightOnly []string) {
return CollectDifferent(left, right, GetAll, GetAll)
} | [
-0.2705407440662384,
-0.6002565622329712,
0.5756020545959473,
0.026857657358050346,
-0.22095608711242676,
0.9598181843757629,
-1.4300650358200073,
-0.22612939774990082,
-0.2597714066505432,
0.6742063164710999,
-0.5518003106117249,
0.9845572113990784,
0.2519855201244354,
1.351112723350525,
... |
func NewLoginWithPaperKey(g *libkb.GlobalContext, username string) *LoginWithPaperKey {
return &LoginWithPaperKey{
Contextified: libkb.NewContextified(g),
username: username,
}
} | [
-0.7943146824836731,
-0.45173728466033936,
0.21421515941619873,
0.6197116374969482,
-1.4568555355072021,
0.6115850210189819,
-0.563198447227478,
-0.7317315340042114,
0.17856250703334808,
0.3746780455112457,
-0.8195555210113525,
-0.005225282162427902,
-0.8785558342933655,
0.5385908484458923... |
func (e *LoginWithPaperKey) Name() string {
return "LoginWithPaperKey"
} | [
-1.196253776550293,
-0.3478444218635559,
0.4840448796749115,
0.3886146545410156,
-0.969490110874176,
0.7786841988563538,
-0.8142780661582947,
-0.2791512906551361,
0.3760780692100525,
1.428516149520874,
-0.7853224873542786,
-0.4008355736732483,
0.13078562915325165,
0.228828564286232,
-0.0... |
func (e *LoginWithPaperKey) Prereqs() Prereqs {
return Prereqs{}
} | [
-0.9157389998435974,
0.4104304909706116,
0.3813953101634979,
0.2022545337677002,
-0.44387316703796387,
0.04903869703412056,
-0.5445737242698669,
-0.3968936800956726,
0.7394101619720459,
-0.7666725516319275,
-0.13394984602928162,
-0.3716262876987457,
-0.43511176109313965,
0.2544384300708771... |
func (e *LoginWithPaperKey) RequiredUIs() []libkb.UIKind {
return []libkb.UIKind{
libkb.LogUIKind,
libkb.SecretUIKind,
}
} | [
-0.86933833360672,
0.12182891368865967,
0.1938711702823639,
0.36725813150405884,
-0.5913923978805542,
0.7911760210990906,
-0.7783722281455994,
-0.0132046053186059,
0.9360677599906921,
-0.58967125415802,
0.29539451003074646,
0.7312401533126831,
-0.6474248766899109,
0.6955131888389587,
0.0... |
func (e *LoginWithPaperKey) SubConsumers() []libkb.UIConsumer {
return []libkb.UIConsumer{}
} | [
0.044603604823350906,
-0.4820052981376648,
0.28019991517066956,
0.6634522676467896,
-0.2750813066959381,
0.14070351421833038,
-0.9756995439529419,
0.5218173861503601,
0.4310508668422699,
0.4139653742313385,
-0.7957363128662109,
0.31550902128219604,
-1.330594539642334,
0.20263202488422394,
... |
func (e *LoginWithPaperKey) Run(m libkb.MetaContext) (err error) {
var me *libkb.User
if e.username == "" {
me, err = libkb.LoadMe(libkb.NewLoadUserArgWithMetaContext(m).WithForceReload())
if err != nil {
return err
}
} else {
me, err = libkb.LoadUser(libkb.NewLoadUserArgWithMetaContext(m).WithForceReload... | [
-0.7836829423904419,
-0.30590733885765076,
0.9477800726890564,
0.5034884810447693,
-0.42618271708488464,
0.05101700499653816,
0.18750354647636414,
-0.19500914216041565,
0.19199569523334503,
0.12149087339639664,
-0.5354244709014893,
0.17326438426971436,
-0.5129484534263611,
0.10388559848070... |
func (m *PaymentServiceItemParam) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateID(formats); err != nil {
res = append(res, err)
}
if err := m.validateKey(formats); err != nil {
res = append(res, err)
}
if err := m.validateOrigin(formats); err != nil {
res = append(res, er... | [
-0.6090978980064392,
0.09594479948282242,
0.6312185525894165,
-0.058432649821043015,
-0.020222047343850136,
0.4130994379520416,
-0.00032047333661466837,
-0.8710794448852539,
-0.7317070960998535,
-0.20988017320632935,
0.6521651744842529,
-0.08382313698530197,
-0.831527054309845,
0.615343570... |
func (m *PaymentServiceItemParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateETag(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateID(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.context... | [
-0.5513386130332947,
-0.07144849747419357,
0.7936106324195862,
-0.40594902634620667,
-0.2195662260055542,
0.6435500979423523,
-0.2249019891023636,
-0.7624370455741882,
0.2354397028684616,
-0.14476719498634338,
0.5689820051193237,
0.6789969801902771,
-0.921441912651062,
0.18991020321846008,... |
func (o *UpdateInventoryInventoryListItemReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 204:
result := NewUpdateInventoryInventoryListItemNoContent()
if err := result.readResponse(response, consumer, o.formats); err != nil {
... | [
-0.9881091117858887,
-1.666226863861084,
0.8388113975524902,
0.3810078501701355,
-0.18062946200370789,
-0.6814258694648743,
-0.08278939872980118,
-0.1280011236667633,
0.8694474697113037,
0.4503294825553894,
0.20202204585075378,
-0.7203734517097473,
-1.3355517387390137,
-0.4210216701030731,... |
func NewUpdateInventoryInventoryListItemNoContent() *UpdateInventoryInventoryListItemNoContent {
return &UpdateInventoryInventoryListItemNoContent{}
} | [
-0.9969269633293152,
-1.1270523071289062,
-0.1039014458656311,
0.48381534218788147,
-0.497535765171051,
-0.21337203681468964,
-0.014410953968763351,
-0.1335989534854889,
-0.34156253933906555,
0.2970394790172577,
-0.165065199136734,
-1.2474548816680908,
-1.0826250314712524,
-1.0365756750106... |
func NewUpdateInventoryInventoryListItemBadRequest() *UpdateInventoryInventoryListItemBadRequest {
return &UpdateInventoryInventoryListItemBadRequest{}
} | [
-1.324910044670105,
-1.3396260738372803,
0.714654803276062,
1.4529094696044922,
-0.29562437534332275,
0.2484753578901291,
-0.5973058342933655,
0.9726568460464478,
0.546072244644165,
0.3103709816932678,
-0.2310401350259781,
-0.23591504991054535,
-0.9662341475486755,
-0.27944615483283997,
... |
func NewUpdateInventoryInventoryListItemUnauthorized() *UpdateInventoryInventoryListItemUnauthorized {
return &UpdateInventoryInventoryListItemUnauthorized{}
} | [
-1.482511043548584,
-1.1935596466064453,
0.3857731521129608,
0.9918924570083618,
-0.6148104667663574,
0.10720352083444595,
-0.47670114040374756,
1.0805658102035522,
0.4273015260696411,
-0.19056817889213562,
-0.5680794715881348,
-0.361225962638855,
-0.6161983609199524,
-1.1732409000396729,
... |
func NewUpdateInventoryInventoryListItemForbidden() *UpdateInventoryInventoryListItemForbidden {
return &UpdateInventoryInventoryListItemForbidden{}
} | [
-0.48972827196121216,
-0.9331117868423462,
0.43484917283058167,
1.701015591621399,
-0.639182984828949,
0.738921582698822,
-0.0497015118598938,
0.4715428948402405,
-0.009711247868835926,
0.3320583999156952,
-0.16881686449050903,
-0.16700653731822968,
-0.848296582698822,
-1.6350103616714478,... |
func NewUpdateInventoryInventoryListItemNotFound() *UpdateInventoryInventoryListItemNotFound {
return &UpdateInventoryInventoryListItemNotFound{}
} | [
-0.9993433952331543,
-2.066312313079834,
0.1210581585764885,
0.9680435657501221,
0.3002566695213318,
0.6402331590652466,
-0.040779802948236465,
1.2079038619995117,
0.07420990616083145,
0.7423999905586243,
-0.47056204080581665,
-0.5869391560554504,
-0.7069777250289917,
-1.0013490915298462,
... |
func NewUpdateInventoryInventoryListItemMethodNotAllowed() *UpdateInventoryInventoryListItemMethodNotAllowed {
return &UpdateInventoryInventoryListItemMethodNotAllowed{}
} | [
-0.8579152226448059,
-0.6089839339256287,
0.32096579670906067,
1.1931352615356445,
-0.4854828417301178,
0.3190820515155792,
0.3983785808086395,
0.2225290685892105,
0.17197345197200775,
0.7164826989173889,
0.2937924861907959,
-0.49483028054237366,
-0.6657774448394775,
-1.208560824394226,
... |
func NewUpdateInventoryInventoryListItemTooManyRequests() *UpdateInventoryInventoryListItemTooManyRequests {
return &UpdateInventoryInventoryListItemTooManyRequests{}
} | [
-1.2150429487228394,
-0.9015493392944336,
0.5841304063796997,
1.4646185636520386,
-0.026034342125058174,
-0.20539316534996033,
-0.5880246758460999,
0.3468703329563141,
0.40404731035232544,
0.585823655128479,
-0.19760969281196594,
-0.7513998746871948,
-1.2546435594558716,
-1.267157196998596... |
func (parser *Parser) program() (*Program, error) {
parser.trace("PROGRAM")
defer parser.untrace()
parser.symbEnvs.PushEnv()
defer parser.symbEnvs.PopEnv()
funcs, err := parser.funcsDeclars()
if err != nil {
return nil, err
}
if _, _, found := parser.match(fxsymbols.EOF); !found {
return nil, parser.Errorf(... | [
-0.026554476469755173,
-0.024157347157597542,
0.6034293174743652,
0.4540690779685974,
0.11493384838104248,
-0.23853054642677307,
0.7885845899581909,
-0.3744822144508362,
0.4133988320827484,
-0.479878306388855,
-0.04770651459693909,
0.4132373034954071,
-0.12579458951950073,
0.31392100453376... |
func (parser *Parser) funcsDeclars() ([]*Function, error) {
parser.trace("FUNCS DECLARS")
function, err := parser.funcDeclar()
// Empty, is not an error
if err == ErrNoMatch {
return nil, nil
}
if err != nil {
return nil, err
}
funcs, err := parser.funcsDeclars()
if err != nil {
return nil, err
}
retur... | [
-0.06225552409887314,
0.08151929825544357,
0.6870370507240295,
0.22431394457817078,
0.07135089486837387,
-0.5168693661689758,
-0.9257303476333618,
-0.644487202167511,
0.8288326263427734,
-0.6994220614433289,
-0.6777133941650391,
0.291264146566391,
-0.4860433340072632,
0.9816934466362,
-0... |
func (parser *Parser) funcDeclar() (*Function, error) {
parser.trace("FUNC_DECLAR")
defer parser.untrace()
_, err, found := parser.match(fxsymbols.Func)
if err != nil {
return nil, err
//return ErrSyntax
}
if !found {
return nil, ErrNoMatch
}
token, _, found := parser.match(fxsymbols.Id)
if !found {
re... | [
0.5113517045974731,
-0.12872903048992157,
0.9544031620025635,
-0.2665620446205139,
-0.7886686325073242,
-0.45280352234840393,
-0.32666653394699097,
0.08454548567533493,
-0.5546809434890747,
-0.42260071635246277,
0.055400919169187546,
0.6529995799064636,
0.1628255844116211,
0.68630051612854... |
func (parser *Parser) parameters() ([]*Declaration, error) {
parser.trace("PARAMETERS")
defer parser.untrace()
param, err := parser.parameter()
// empty, not an error
if err == ErrNoMatch {
return nil, nil
}
if err != nil {
return nil, err
}
moreParams, err := parser.moreParams()
if err != nil {
return ... | [
-0.5737431049346924,
-0.4204842448234558,
0.4598783254623413,
-0.1585698276758194,
0.2731855809688568,
-0.28163689374923706,
-0.4393654465675354,
0.7519773840904236,
0.06656727194786072,
0.00506842415779829,
0.2679775059223175,
0.16716745495796204,
-0.5275130271911621,
1.5650652647018433,
... |
func (parser *Parser) parameter() (*Declaration, error) {
parser.trace("PARAMETER")
defer parser.untrace()
dataTypeTok, err, found := parser.match(fxsymbols.DataType)
if err != nil {
// return ErrSyntax
return nil, err
}
if !found {
return nil, ErrNoMatch
}
dataIdTok, _, found := parser.match(fxsymbols.Id... | [
0.2287673056125641,
-0.33514174818992615,
0.5261721611022949,
-0.3605397045612335,
-0.5249501466751099,
-0.385944664478302,
0.35920751094818115,
0.4291059374809265,
0.5846303701400757,
-0.290313184261322,
0.2581021785736084,
0.8583839535713196,
-0.2687467932701111,
0.923401951789856,
0.3... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.