text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func RandomTCPPort() int {
for i := maxReservedTCPPort; i < maxTCPPort; i++ {
p := tcpPortRand.Intn(maxRandTCPPort) + maxReservedTCPPort + 1
if IsTCPPortAvailable(p) {
return p
}
}
return -1
} | [
-0.823747456073761,
0.03963695093989372,
0.43243691325187683,
-0.7870349884033203,
-0.2284705936908722,
-0.004604221787303686,
1.118449091911316,
-0.3098470866680145,
0.7105306386947632,
0.07642208784818649,
-0.13118545711040497,
-0.6660469174385071,
-1.2124474048614502,
0.0424390286207199... |
func twoSumOne(nums []int, target int) []int {
if len(nums) == 0 {
return []int{}
}
var numMap map[int][]int
numMap = mapByIndex(nums)
for i, num := range nums {
indices, hasVal := numMap[target-num]
if hasVal {
j, isOtherIndex := someOtherNumber(i, indices)
if isOtherIndex {
return []int{i, j}
... | [
-1.2556718587875366,
-0.6399121284484863,
1.0569374561309814,
1.1681909561157227,
0.5080179572105408,
-0.9463028311729431,
0.49618151783943176,
-0.028052184730768204,
0.35734185576438904,
0.4387940764427185,
-0.9765729904174805,
0.7909941673278809,
0.1914260983467102,
0.2647540271282196,
... |
func mapByIndex(nums []int) map[int][]int {
numMap := make(map[int][]int)
for i, num := range nums {
s, hasValue := numMap[num]
if hasValue {
numMap[num] = append(s, i)
} else {
numMap[num] = []int{i}
}
}
return numMap
} | [
-0.6824319958686829,
-0.513209342956543,
0.5508148074150085,
-0.011391744948923588,
-0.2012765109539032,
-0.08635945618152618,
1.30321204662323,
-0.009175064973533154,
0.9170325398445129,
0.17718347907066345,
-0.35005226731300354,
-0.11210024356842041,
0.2805367410182953,
-0.38844314217567... |
func someOtherNumber(num int, s []int) (int, bool) {
for _, other := range s {
if num != other {
return other, true
}
}
return num, false
} | [
-0.4828524589538574,
-0.7727231979370117,
0.4995083212852478,
-0.11232932657003403,
-0.21102140843868256,
-0.44491440057754517,
-0.2755032479763031,
-0.38942334055900574,
0.23813611268997192,
-0.4227891266345978,
-2.2842400074005127,
0.4785725772380829,
-0.41784781217575073,
0.364457607269... |
func twoSumTwo(nums []int, target int) []int {
numMap := make(map[int]int)
// b/c we loop once, only duplicate values will be present in the map.
for index, num := range nums {
otherIndex, hasNum := numMap[target-num]
if hasNum {
return []int{index, otherIndex}
}
numMap[num] = index
}
return []int{}
} | [
-1.1069602966308594,
-1.4446439743041992,
1.0126312971115112,
0.4168151915073395,
0.5018128752708435,
-0.6419157981872559,
0.32945895195007324,
-0.5761744379997253,
0.037885040044784546,
0.04930020123720169,
-1.0013526678085327,
1.1204395294189453,
0.9715059399604797,
0.016230573877692223,... |
func (*utxoR) NewStruct() *utxoR {
return &utxoR{}
} | [
-0.652249276638031,
-0.13800571858882904,
0.1322290599346161,
-0.22459419071674347,
-2.179522752761841,
0.08015208691358566,
-0.9196973443031311,
-0.6804441809654236,
0.21814341843128204,
-0.8873762488365173,
-0.1725543886423111,
-0.3156013786792755,
0.1425180733203888,
-0.7725773453712463... |
func (o *Utxo) doBeforeInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {
if boil.HooksAreSkipped(ctx) {
return nil
}
for _, hook := range utxoBeforeInsertHooks {
if err := hook(ctx, exec, o); err != nil {
return err
}
}
return nil
} | [
-0.45000770688056946,
0.8383824229240417,
0.5639386773109436,
0.31400439143180847,
1.0924570560455322,
0.4138590693473816,
0.7668781280517578,
-0.21216370165348053,
-0.7833754420280457,
0.2175389677286148,
0.4605075716972351,
-0.30825290083885193,
-0.9615224599838257,
0.3709038197994232,
... |
func (o *Utxo) doBeforeUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {
if boil.HooksAreSkipped(ctx) {
return nil
}
for _, hook := range utxoBeforeUpdateHooks {
if err := hook(ctx, exec, o); err != nil {
return err
}
}
return nil
} | [
-0.9249200820922852,
0.02376624010503292,
0.7497566342353821,
0.2466561496257782,
0.9473981261253357,
0.4656863510608673,
0.14885614812374115,
-0.8860216736793518,
-0.052075669169425964,
0.8760585188865662,
0.6338250041007996,
-0.3489709198474884,
-0.334088534116745,
-0.1571258008480072,
... |
func (o *Utxo) doBeforeDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {
if boil.HooksAreSkipped(ctx) {
return nil
}
for _, hook := range utxoBeforeDeleteHooks {
if err := hook(ctx, exec, o); err != nil {
return err
}
}
return nil
} | [
-0.45602986216545105,
0.5131360292434692,
0.7697865962982178,
0.3514017164707184,
0.9663955569267273,
0.49709615111351013,
0.2782036364078522,
-0.8474023938179016,
0.18215514719486237,
0.628951370716095,
0.7958999276161194,
-0.17769984900951385,
-0.1093117818236351,
-0.1785392463207245,
... |
func (o *Utxo) doBeforeUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {
if boil.HooksAreSkipped(ctx) {
return nil
}
for _, hook := range utxoBeforeUpsertHooks {
if err := hook(ctx, exec, o); err != nil {
return err
}
}
return nil
} | [
-0.5464636087417603,
0.7969909906387329,
0.8498711585998535,
-0.16301484405994415,
1.0158191919326782,
0.5161972045898438,
0.7183624505996704,
-0.6831928491592407,
-0.13472619652748108,
0.46438372135162354,
0.7113965749740601,
-0.5356487035751343,
-0.39276814460754395,
0.29713723063468933,... |
func (o *Utxo) doAfterInsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {
if boil.HooksAreSkipped(ctx) {
return nil
}
for _, hook := range utxoAfterInsertHooks {
if err := hook(ctx, exec, o); err != nil {
return err
}
}
return nil
} | [
-0.41873762011528015,
0.4908524751663208,
0.3057575821876526,
0.370429128408432,
0.767370343208313,
0.6217315793037415,
0.6836342215538025,
-0.4738171696662903,
-0.687455415725708,
0.8280999660491943,
0.23403841257095337,
-0.6194518804550171,
-0.921044647693634,
-0.07427289336919785,
-0.... |
func (o *Utxo) doAfterSelectHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {
if boil.HooksAreSkipped(ctx) {
return nil
}
for _, hook := range utxoAfterSelectHooks {
if err := hook(ctx, exec, o); err != nil {
return err
}
}
return nil
} | [
-0.48419514298439026,
-0.5507727265357971,
0.27866384387016296,
0.4394914209842682,
0.408415824174881,
0.41015928983688354,
0.393429160118103,
-1.2389273643493652,
0.23254510760307312,
0.9571475982666016,
0.4571441113948822,
-0.1772301197052002,
0.015222965739667416,
-0.5134835839271545,
... |
func (o *Utxo) doAfterUpdateHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {
if boil.HooksAreSkipped(ctx) {
return nil
}
for _, hook := range utxoAfterUpdateHooks {
if err := hook(ctx, exec, o); err != nil {
return err
}
}
return nil
} | [
-0.8855868577957153,
-0.6949595212936401,
0.4801161587238312,
0.7514861822128296,
0.2709980010986328,
0.9655352830886841,
-0.013669990003108978,
-0.5593761801719666,
-0.19507545232772827,
0.865324079990387,
0.3549533486366272,
-0.5976672768592834,
-0.16521719098091125,
-0.30902987718582153... |
func (o *Utxo) doAfterDeleteHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {
if boil.HooksAreSkipped(ctx) {
return nil
}
for _, hook := range utxoAfterDeleteHooks {
if err := hook(ctx, exec, o); err != nil {
return err
}
}
return nil
} | [
-0.3337135314941406,
-0.12586672604084015,
0.41638246178627014,
0.6384752988815308,
0.4372362196445465,
0.7662897706031799,
0.43328389525413513,
-0.6783696413040161,
0.02621988207101822,
0.733232855796814,
0.5183871984481812,
-0.22791175544261932,
-0.07589157670736313,
-0.12923474609851837... |
func (o *Utxo) doAfterUpsertHooks(ctx context.Context, exec boil.ContextExecutor) (err error) {
if boil.HooksAreSkipped(ctx) {
return nil
}
for _, hook := range utxoAfterUpsertHooks {
if err := hook(ctx, exec, o); err != nil {
return err
}
}
return nil
} | [
-0.6902005076408386,
0.09028532356023788,
0.5717520713806152,
0.375467985868454,
0.6850501894950867,
0.659180760383606,
0.7582298517227173,
-0.5526812076568604,
-0.2603689730167389,
0.98725825548172,
-0.151021346449852,
-0.21386845409870148,
-0.22975076735019684,
0.0017323786159977317,
-... |
func AddUtxoHook(hookPoint boil.HookPoint, utxoHook UtxoHook) {
switch hookPoint {
case boil.BeforeInsertHook:
utxoBeforeInsertHooks = append(utxoBeforeInsertHooks, utxoHook)
case boil.BeforeUpdateHook:
utxoBeforeUpdateHooks = append(utxoBeforeUpdateHooks, utxoHook)
case boil.BeforeDeleteHook:
utxoBeforeDelet... | [
-0.29218629002571106,
0.3191169798374176,
0.7422232627868652,
-0.22497710585594177,
0.002604566514492035,
0.5420153737068176,
-0.4154351055622101,
0.30515435338020325,
0.5330771803855896,
0.048035383224487305,
-0.10235479474067688,
-0.5363600850105286,
-0.34185791015625,
0.0247166752815246... |
func (q utxoQuery) One(ctx context.Context, exec boil.ContextExecutor) (*Utxo, error) {
o := &Utxo{}
queries.SetLimit(q.Query, 1)
err := q.Bind(ctx, exec, o)
if err != nil {
if errors.Cause(err) == sql.ErrNoRows {
return nil, sql.ErrNoRows
}
return nil, errors.Wrap(err, "models: failed to execute a one q... | [
-0.7513909339904785,
0.27546125650405884,
0.4493190348148346,
0.4477611184120178,
0.3532703220844269,
0.3282873034477234,
0.26556122303009033,
0.2908564507961273,
-0.37729203701019287,
0.47136765718460083,
0.0075729768723249435,
-0.5450688004493713,
0.4324580729007721,
-0.32273438572883606... |
func (q utxoQuery) All(ctx context.Context, exec boil.ContextExecutor) (UtxoSlice, error) {
var o []*Utxo
err := q.Bind(ctx, exec, &o)
if err != nil {
return nil, errors.Wrap(err, "models: failed to assign all query results to Utxo slice")
}
if len(utxoAfterSelectHooks) != 0 {
for _, obj := range o {
if e... | [
-0.21593241393566132,
-0.40968915820121765,
0.37852513790130615,
0.6593051552772522,
0.45919671654701233,
0.612529993057251,
-0.01948997937142849,
0.08659575879573822,
-0.49347811937332153,
0.7201746106147766,
0.5835952162742615,
0.03929072618484497,
0.10830333828926086,
0.4051923751831054... |
func (q utxoQuery) Count(ctx context.Context, exec boil.ContextExecutor) (int64, error) {
var count int64
queries.SetSelect(q.Query, nil)
queries.SetCount(q.Query)
err := q.Query.QueryRowContext(ctx, exec).Scan(&count)
if err != nil {
return 0, errors.Wrap(err, "models: failed to count utxo rows")
}
return ... | [
-0.25093504786491394,
0.12209603935480118,
0.3628748953342438,
-0.17053526639938354,
-0.04374723881483078,
-0.06670084595680237,
0.29091501235961914,
-0.4479152262210846,
-0.5884629487991333,
0.4928176701068878,
0.1385492980480194,
-0.6349275708198547,
0.682662308216095,
0.5242696404457092... |
func (q utxoQuery) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error) {
var count int64
queries.SetSelect(q.Query, nil)
queries.SetCount(q.Query)
queries.SetLimit(q.Query, 1)
err := q.Query.QueryRowContext(ctx, exec).Scan(&count)
if err != nil {
return false, errors.Wrap(err, "models: failed... | [
-1.2224560976028442,
-0.008303816430270672,
0.394574373960495,
-0.39643675088882446,
0.2891108989715576,
0.11546943336725235,
-0.6648674607276917,
-0.13187894225120544,
-0.23365670442581177,
0.1811191290616989,
0.31537386775016785,
-0.5355088114738464,
0.6690566539764404,
0.013867815025150... |
func Utxos(mods ...qm.QueryMod) utxoQuery {
mods = append(mods, qm.From("\"utxo\""))
return utxoQuery{NewQuery(mods...)}
} | [
0.24492841958999634,
0.5863824486732483,
0.2606927156448364,
-0.3894338011741638,
-0.9472620487213135,
-0.1576780080795288,
-1.687272071838379,
-0.039494261145591736,
0.1633734107017517,
-0.07318037003278732,
0.28754672408103943,
-0.09524376690387726,
0.3736421465873718,
-0.966414272785186... |
func FindUtxo(ctx context.Context, exec boil.ContextExecutor, rowid int, selectCols ...string) (*Utxo, error) {
utxoObj := &Utxo{}
sel := "*"
if len(selectCols) > 0 {
sel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), ",")
}
query := fmt.Sprintf(
"select %s from \"utxo\" where \... | [
0.23632490634918213,
0.013791657984256744,
0.3532989025115967,
-0.06579643487930298,
-0.43642550706863403,
-0.42792636156082153,
-0.06324122101068497,
-1.0338482856750488,
-0.24813595414161682,
0.5667541027069092,
-0.05157352238893509,
-0.7281278371810913,
-0.0721665620803833,
-0.393382221... |
func (o *Utxo) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error {
if o == nil {
return errors.New("models: no utxo provided for insertion")
}
var err error
if err := o.doBeforeInsertHooks(ctx, exec); err != nil {
return err
}
nzDefaults := queries.NonZeroDefaultSet(utxoCol... | [
-1.0573335886001587,
1.1304417848587036,
0.5679531097412109,
0.048260245472192764,
-0.055197346955537796,
-0.1173483207821846,
0.4094541370868683,
-0.06763046979904175,
-0.453740656375885,
0.610718309879303,
-0.39249616861343384,
-0.7383461594581604,
-0.47872596979141235,
-0.15010508894920... |
func (o *Utxo) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error) {
var err error
if err = o.doBeforeUpdateHooks(ctx, exec); err != nil {
return 0, err
}
key := makeCacheKey(columns, nil)
utxoUpdateCacheMut.RLock()
cache, cached := utxoUpdateCache[key]
utxoUpdateCacheMu... | [
-1.6357353925704956,
0.49068859219551086,
0.7073324918746948,
-0.059751685708761215,
-0.6611523628234863,
-0.306674599647522,
0.41586071252822876,
-0.01841886341571808,
-0.5069068670272827,
1.0817234516143799,
-0.2991371154785156,
-0.0434843972325325,
0.28900912404060364,
-0.18592396378517... |
func (q utxoQuery) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error) {
queries.SetUpdate(q.Query, cols)
result, err := q.Query.ExecContext(ctx, exec)
if err != nil {
return 0, errors.Wrap(err, "models: unable to update all for utxo")
}
rowsAff, err := result.RowsAffected()
if er... | [
-0.29849499464035034,
-0.08798480778932571,
0.6060253381729126,
0.2557389736175537,
-0.5531254410743713,
0.13692592084407806,
-0.39812371134757996,
0.24037319421768188,
-0.44789525866508484,
0.5399353504180908,
0.10213073343038559,
0.09404761344194412,
0.36155351996421814,
-0.0508475378155... |
func (o UtxoSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error) {
ln := int64(len(o))
if ln == 0 {
return 0, nil
}
if len(cols) == 0 {
return 0, errors.New("models: update all requires at least one column argument")
}
colNames := make([]string, len(cols))
args := make([]... | [
-0.7791277170181274,
0.1492958962917328,
1.0860488414764404,
0.32004907727241516,
-0.8029131889343262,
-0.19078898429870605,
-0.07765108346939087,
0.45139214396476746,
-0.6295124888420105,
0.9291470646858215,
-0.09062713384628296,
-0.23567640781402588,
0.2986937463283539,
0.073409222066402... |
func (o *Utxo) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error {
if o == nil {
return errors.New("models: no utxo provided for upsert")
}
if err := o.doBeforeUpsertHooks(ctx, exec); err != nil {
return err
... | [
-0.8247385621070862,
0.4866597354412079,
0.6567392945289612,
-0.07104624062776566,
0.12886838614940643,
-0.2971482276916504,
-0.09836636483669281,
-0.2938839793205261,
-0.5684812664985657,
0.640985906124115,
-0.5968061685562134,
-0.8240716457366943,
-0.26414725184440613,
-0.259790480136871... |
func (o *Utxo) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error) {
if o == nil {
return 0, errors.New("models: no Utxo provided for delete")
}
if err := o.doBeforeDeleteHooks(ctx, exec); err != nil {
return 0, err
}
args := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), u... | [
0.03247825801372528,
0.7316799163818359,
0.8220124244689941,
0.08807472884654999,
-0.24592351913452148,
-0.48803767561912537,
0.6342861652374268,
0.201324462890625,
0.03641064465045929,
0.9528408646583557,
0.3909543454647064,
-0.44513145089149475,
0.07827431708574295,
0.13259373605251312,
... |
func (q utxoQuery) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error) {
if q.Query == nil {
return 0, errors.New("models: no utxoQuery provided for delete all")
}
queries.SetDelete(q.Query)
result, err := q.Query.ExecContext(ctx, exec)
if err != nil {
return 0, errors.Wrap(err, "models:... | [
0.2640475928783417,
0.1355796903371811,
0.5862522125244141,
-0.16856049001216888,
-0.20252184569835663,
0.23389551043510437,
-0.1492720991373062,
0.25541749596595764,
0.13932441174983978,
0.10451316833496094,
0.6877660751342773,
0.2218196988105774,
0.4143795371055603,
0.9110095500946045,
... |
func (o UtxoSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error) {
if len(o) == 0 {
return 0, nil
}
if len(utxoBeforeDeleteHooks) != 0 {
for _, obj := range o {
if err := obj.doBeforeDeleteHooks(ctx, exec); err != nil {
return 0, err
}
}
}
var args []interface{}
for _,... | [
-0.36749956011772156,
0.3179595470428467,
0.9287234544754028,
0.11919436603784561,
-0.5536187887191772,
-0.32728663086891174,
0.5175637006759644,
0.3716046214103699,
-0.2893480658531189,
0.6957092881202698,
0.3908502161502838,
-0.3020457923412323,
0.4477415382862091,
0.4679766595363617,
... |
func (o *Utxo) Reload(ctx context.Context, exec boil.ContextExecutor) error {
ret, err := FindUtxo(ctx, exec, o.Rowid)
if err != nil {
return err
}
*o = *ret
return nil
} | [
-0.3469962477684021,
0.7709102630615234,
0.5766483545303345,
0.22512981295585632,
0.34877708554267883,
0.02541753463447094,
0.42001184821128845,
-0.23693665862083435,
0.07906657457351685,
0.4532715082168579,
0.3822399377822876,
-0.18527847528457642,
0.39064082503318787,
-1.0718351602554321... |
func (o *UtxoSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error {
if o == nil || len(*o) == 0 {
return nil
}
slice := UtxoSlice{}
var args []interface{}
for _, obj := range *o {
pkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), utxoPrimaryKeyMapping)
args = ap... | [
-0.5351738333702087,
0.16943715512752533,
0.7043448686599731,
0.8747658133506775,
-0.6020416021347046,
-0.17847351729869843,
-0.2680676281452179,
-0.033660367131233215,
-0.40653663873672485,
0.7012454867362976,
-0.16802319884300232,
0.027686692774295807,
0.18836559355258942,
0.397611647844... |
func UtxoExists(ctx context.Context, exec boil.ContextExecutor, rowid int) (bool, error) {
var exists bool
sql := "select exists(select 1 from \"utxo\" where \"rowid\"=$1 limit 1)"
if boil.DebugMode {
fmt.Fprintln(boil.DebugWriter, sql)
fmt.Fprintln(boil.DebugWriter, rowid)
}
row := exec.QueryRowContext(ctx,... | [
-0.9472372531890869,
0.3843064308166504,
0.6154241561889648,
-0.5419822931289673,
0.18597561120986938,
-0.15566003322601318,
-0.27146729826927185,
0.21475915610790253,
-0.08134468644857407,
0.787476122379303,
-0.15617606043815613,
-0.9624460935592651,
0.11350568383932114,
-0.52326583862304... |
func (s *Sim) Init() {
s.System = make([]*poly.Chain,0)
s.solver = new(solver.RK4)
s.solver.Mods = make([]solver.Modifier,0)
s.solverInit = false
} | [
0.001979900524020195,
0.027140149846673012,
0.3157356083393097,
0.04755893349647522,
0.4643597900867462,
0.27069273591041565,
0.13537409901618958,
-0.907166600227356,
0.14928442239761353,
-0.31921300292015076,
-1.0848499536514282,
0.1297583132982254,
-0.11242425441741943,
0.230201363563537... |
func (s *Sim) InitSolver() {
s.solver.Init(s.System)
for _, mod := range s.solver.Mods {
mod.Init(s.System)
}
s.solverInit = true
} | [
-0.8599640130996704,
-0.43839988112449646,
0.3587849736213684,
0.45748817920684814,
0.30250734090805054,
-0.3972565531730652,
0.060020480304956436,
0.47648873925209045,
0.17986632883548737,
-0.38319817185401917,
-1.5172926187515259,
-0.027963677421212196,
-0.41874346137046814,
1.5575957298... |
func (s *Sim) WriteLoc(output io.Writer) {
locstrings := make([]string, len(s.System))
for n , poly := range s.System{
locstrings[n] = poly.ToJSON()
}
loc := strings.Join(locstrings, ",")
io.WriteString(output,"[")
io.WriteString(output,loc)
io.WriteString(output,"]")
} | [
-0.2596987783908844,
-1.4609465599060059,
0.4712945222854614,
-1.0504262447357178,
0.2466462403535843,
-0.004993025213479996,
1.0240732431411743,
0.22109301388263702,
0.001787348068319261,
-0.016042206436395645,
0.16908934712409973,
0.44082868099212646,
1.715413212776184,
-0.07392284274101... |
func ReportText(results []Result) ([]byte, error) {
m := NewMetrics(results)
out := &bytes.Buffer{}
w := tabwriter.NewWriter(out, 0, 8, 2, '\t', tabwriter.StripEscape)
fmt.Fprintf(w, "Time(avg)\tRequests\tSuccess\tBytes(rx/tx)\n")
fmt.Fprintf(w, "%s\t%d\t%.2f%%\t%.2f/%.2f\n", m.MeanTiming, m.TotalRequests, m.Mean... | [
0.28618794679641724,
0.5391317009925842,
1.0511804819107056,
-0.38745272159576416,
-0.6955612897872925,
0.4909106492996216,
0.060582298785448074,
-1.089179515838623,
-0.8281245231628418,
0.7683037519454956,
0.07872636616230011,
-0.13029372692108154,
-0.9220085740089417,
0.37776437401771545... |
func ReportJSON(results []Result) ([]byte, error) {
return json.Marshal(NewMetrics(results))
} | [
-0.2970185875892639,
0.38981693983078003,
0.30234506726264954,
-0.02374977432191372,
-0.5332193374633789,
-0.09940400719642639,
0.8685029149055481,
-0.9589298963546753,
0.2238067090511322,
0.6881675124168396,
-0.49760448932647705,
0.09242453426122665,
-0.8240870237350464,
0.769754946231842... |
func ReportPlot(results []Result) ([]byte, error) {
out := &bytes.Buffer{}
for _, result := range results {
fmt.Fprintf(out, "[%f,%f],",
result.Timestamp.Sub(results[0].Timestamp).Seconds(),
result.Timing.Seconds()*1000,
)
}
out.Truncate(out.Len() - 1) // Remove trailing comma
return []byte(fmt.Sprintf(p... | [
-0.13776296377182007,
0.7810479998588562,
0.6931806206703186,
-0.4725879430770874,
-0.33841535449028015,
-0.7108840346336365,
0.34688758850097656,
-0.9692026376724243,
-0.2298477292060852,
-0.03361019864678383,
-0.3015921115875244,
-0.527148962020874,
-0.8172141909599304,
0.109721750020980... |
func (mt *GoaExampleClient) Validate() (err error) {
if mt.Href == "" {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "href"))
}
if mt.Name == "" {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "name"))
}
return
} | [
-0.04235431179404259,
-0.4585917294025421,
0.3898773193359375,
-0.7877342700958252,
-0.032492753118276596,
0.3821415305137634,
0.28281423449516296,
-0.6263782382011414,
-0.5513724684715271,
-0.0280151329934597,
0.10275670140981674,
0.13342070579528809,
-0.312997967004776,
0.420302838087081... |
func GetAfterDateString(addDays int) string {
nowDate := time.Now()
afterDate := nowDate.AddDate(0, 0, addDays)
return getStringDate(afterDate)
} | [
-0.18835945427417755,
-0.23539544641971588,
0.5067043900489807,
-0.48971396684646606,
-1.384080171585083,
0.6377421021461487,
-0.7319485545158386,
-0.6330229640007019,
0.26048073172569275,
-0.8995158672332764,
0.8074201941490173,
0.5676586627960205,
0.30885985493659973,
0.20888519287109375... |
func (w *WSHub) Handle(conn *websocket.Conn) {
debug.Printf("ws[%s] subscribed", conn.RemoteAddr())
c := &WSConn{
conn: conn,
out: make(chan interface{}, 1),
}
w.mu.Lock()
w.pool[c] = struct{}{}
w.mu.Unlock()
// Initial status update
// (broadcasted as it includes info to other clients about this new one... | [
0.4089535176753998,
-0.38454732298851013,
0.9770123958587646,
-0.39074641466140747,
0.09454670548439026,
0.3864916265010834,
0.6062473058700562,
-0.770725667476654,
-0.484106183052063,
0.1776081770658493,
-0.25487151741981506,
0.21481366455554962,
-0.08470290899276733,
0.35952216386795044,... |
func drainUntilSilence(w *fsnotify.Watcher, silenceDur time.Duration) {
timer := time.NewTimer(silenceDur)
defer timer.Stop()
for {
select {
case <-w.Events:
if !timer.Stop() {
<-timer.C
}
timer.Reset(silenceDur)
case <-timer.C:
return
}
}
} | [
0.2573797404766083,
-0.059185344725847244,
0.528586208820343,
-0.1895231306552887,
-0.055476803332567215,
-0.4746357798576355,
-0.3426963984966278,
-0.40141555666923523,
0.4547126889228821,
-0.32063600420951843,
-0.15982586145401,
0.6168053150177002,
-1.111885905265808,
0.13506415486335754... |
func tailFile(path string) (<-chan []byte, chan<- struct{}, error) {
lines := make(chan []byte)
done := make(chan struct{})
file, err := os.Open(path)
if err != nil {
return nil, nil, err
}
go func() {
rd := bufio.NewReader(file)
for {
data, _, err := rd.ReadLine()
if errors.Is(err, io.EOF) {
tim... | [
0.6176276206970215,
-0.6813116669654846,
0.8127843141555786,
-1.1291605234146118,
0.04376348480582237,
0.33990225195884705,
0.5284647941589355,
-0.7450135946273804,
-0.9483602643013,
0.056430768221616745,
0.04544905945658684,
0.45906195044517517,
-0.20965847373008728,
0.2660371661186218,
... |
func NewChpRegistry(address common.Address, backend bind.ContractBackend) (*ChpRegistry, error) {
contract, err := bindChpRegistry(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &ChpRegistry{ChpRegistryCaller: ChpRegistryCaller{contract: contract}, ChpRegistryTransactor: ChpRegistryT... | [
0.2838161289691925,
0.30585286021232605,
0.4983442425727844,
0.1582316905260086,
-0.451668381690979,
-0.1567087173461914,
-0.55990070104599,
0.6339005827903748,
-0.07780692726373672,
0.9400583505630493,
-0.9572670459747314,
0.9274412393569946,
-0.6115272045135498,
0.4541260898113251,
0.9... |
func NewChpRegistryCaller(address common.Address, caller bind.ContractCaller) (*ChpRegistryCaller, error) {
contract, err := bindChpRegistry(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &ChpRegistryCaller{contract: contract}, nil
} | [
-0.19852738082408905,
0.5260086059570312,
0.4446627199649811,
0.6842244863510132,
-0.466505765914917,
0.45477956533432007,
-0.2776186466217041,
0.7673664093017578,
0.030207142233848572,
0.7939378619194031,
-0.9078052043914795,
0.5602157711982727,
-0.5775035619735718,
0.5956498384475708,
... |
func NewChpRegistryTransactor(address common.Address, transactor bind.ContractTransactor) (*ChpRegistryTransactor, error) {
contract, err := bindChpRegistry(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &ChpRegistryTransactor{contract: contract}, nil
} | [
-0.13982072472572327,
0.2596520483493805,
0.44183000922203064,
0.2712222635746002,
-0.4792306423187256,
0.24649456143379211,
0.2569338083267212,
1.0514235496520996,
-0.43237632513046265,
0.8689521551132202,
-1.7180434465408325,
0.6172757744789124,
-0.2727120518684387,
-0.09164286404848099,... |
func NewChpRegistryFilterer(address common.Address, filterer bind.ContractFilterer) (*ChpRegistryFilterer, error) {
contract, err := bindChpRegistry(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &ChpRegistryFilterer{contract: contract}, nil
} | [
-0.3931697607040405,
0.05756761133670807,
0.42007002234458923,
0.6978863477706909,
-0.6960015296936035,
0.30401796102523804,
-0.3490757644176483,
1.1269211769104004,
-0.2510714828968048,
0.7413694858551025,
-0.8677380681037903,
0.910063624382019,
-0.8143768906593323,
0.6050844192504883,
... |
func bindChpRegistry(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(ChpRegistryABI))
if err != nil {
return nil, err
}
return bind.NewBoundContract(address, parsed, cal... | [
-0.13783316314220428,
-0.2502093017101288,
0.4795306324958801,
0.2842976450920105,
-0.01641584374010563,
-0.12789861857891083,
-0.6244069337844849,
0.5579111576080322,
0.038045212626457214,
0.3468282222747803,
-0.4197857081890106,
1.2446433305740356,
-0.8235334157943726,
0.3575495481491089... |
func (_ChpRegistry *ChpRegistryRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
return _ChpRegistry.Contract.ChpRegistryCaller.contract.Call(opts, result, method, params...)
} | [
-0.999027669429779,
1.012882113456726,
0.4306057095527649,
0.9209770560264587,
-0.5839831233024597,
0.4632745683193207,
-0.10624074190855026,
-0.28441566228866577,
0.25554463267326355,
0.40815821290016174,
0.009894246235489845,
0.18684978783130646,
-0.7188845872879028,
0.2848840355873108,
... |
func (_ChpRegistry *ChpRegistryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _ChpRegistry.Contract.ChpRegistryTransactor.contract.Transfer(opts)
} | [
-0.5967745184898376,
0.28555575013160706,
0.27263668179512024,
0.7045088410377502,
-0.03241201490163803,
0.4417896568775177,
0.7740671634674072,
-0.08471621572971344,
0.5214174389839172,
-0.12047301977872849,
-0.4042004942893982,
0.5671564340591431,
-0.38390272855758667,
-0.325823664665222... |
func (_ChpRegistry *ChpRegistryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _ChpRegistry.Contract.ChpRegistryTransactor.contract.Transact(opts, method, params...)
} | [
-0.547138512134552,
0.5549670457839966,
0.44323551654815674,
-0.24572068452835083,
0.41277098655700684,
-0.07164143770933151,
1.0787098407745361,
-0.05127210170030594,
0.14066974818706512,
0.2624174654483795,
-0.35431477427482605,
0.7413799166679382,
-0.042065251618623734,
0.06513103097677... |
func (_ChpRegistry *ChpRegistryCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
return _ChpRegistry.Contract.contract.Call(opts, result, method, params...)
} | [
-0.9902995228767395,
0.8555482029914856,
0.4494665563106537,
0.9004682898521423,
-0.6720403432846069,
0.47646674513816833,
-0.018751710653305054,
-0.47133755683898926,
0.377048134803772,
0.29782626032829285,
-0.04457758739590645,
0.1830170750617981,
-0.732456386089325,
0.1832103282213211,
... |
func (_ChpRegistry *ChpRegistryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _ChpRegistry.Contract.contract.Transfer(opts)
} | [
-0.537248432636261,
0.17168156802654266,
0.24340315163135529,
0.7550215721130371,
0.060239821672439575,
0.3484096825122833,
0.8092936277389526,
-0.43637847900390625,
0.7494924664497375,
-0.1287529319524765,
-0.08430372923612595,
0.4492436349391937,
-0.3363482654094696,
-0.46377816796302795... |
func (_ChpRegistry *ChpRegistryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _ChpRegistry.Contract.contract.Transact(opts, method, params...)
} | [
-0.5259901881217957,
0.3887435793876648,
0.40044358372688293,
-0.25361108779907227,
0.376400351524353,
-0.060611799359321594,
0.9831882119178772,
-0.4375646710395813,
0.30935630202293396,
0.27340495586395264,
-0.07495232671499252,
0.6652160882949829,
0.032136186957359314,
-0.14769306778907... |
func (_ChpRegistry *ChpRegistryCaller) CORESTAKINGAMOUNT(opts *bind.CallOpts) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _ChpRegistry.contract.Call(opts, out, "CORE_STAKING_AMOUNT")
return *ret0, err
} | [
-0.7247812151908875,
0.7038465738296509,
0.7584446668624878,
0.3106554448604584,
-1.2619472742080688,
0.6060041785240173,
0.8473407030105591,
-0.01253206841647625,
-0.14684246480464935,
0.6113775968551636,
-1.0472042560577393,
0.01632309891283512,
-1.263068437576294,
0.4854532480239868,
... |
func (_ChpRegistry *ChpRegistrySession) CORESTAKINGAMOUNT() (*big.Int, error) {
return _ChpRegistry.Contract.CORESTAKINGAMOUNT(&_ChpRegistry.CallOpts)
} | [
-1.0868351459503174,
0.8016766905784607,
0.24741773307323456,
0.2796027362346649,
-1.172080636024475,
0.23658153414726257,
0.3861457109451294,
0.27690112590789795,
0.38390183448791504,
-0.03251674398779869,
-0.484136164188385,
0.6844977736473083,
-1.2154135704040527,
0.17019955813884735,
... |
func (_ChpRegistry *ChpRegistryCallerSession) CORESTAKINGAMOUNT() (*big.Int, error) {
return _ChpRegistry.Contract.CORESTAKINGAMOUNT(&_ChpRegistry.CallOpts)
} | [
-1.0582375526428223,
0.7906410098075867,
0.2609366178512573,
0.25208914279937744,
-1.1960281133651733,
0.3086085021495819,
0.279070645570755,
0.18991507589817047,
0.3900521397590637,
-0.03709284961223602,
-0.5106040239334106,
0.6334009766578674,
-1.2381432056427002,
0.1807311475276947,
0... |
func (_ChpRegistry *ChpRegistryCaller) CORESTAKINGDURATION(opts *bind.CallOpts) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _ChpRegistry.contract.Call(opts, out, "CORE_STAKING_DURATION")
return *ret0, err
} | [
-0.6774761080741882,
1.1389464139938354,
0.5111986398696899,
0.43289798498153687,
-1.0584062337875366,
0.9177641868591309,
0.664351224899292,
-0.2629106640815735,
-0.07088945806026459,
0.8867702484130859,
-1.010881781578064,
0.076270192861557,
-1.1247587203979492,
0.5772847533226013,
0.1... |
func (_ChpRegistry *ChpRegistrySession) CORESTAKINGDURATION() (*big.Int, error) {
return _ChpRegistry.Contract.CORESTAKINGDURATION(&_ChpRegistry.CallOpts)
} | [
-0.9145225286483765,
0.9928490519523621,
0.17281650006771088,
0.21894468367099762,
-0.9338098168373108,
0.6874515414237976,
0.4586315453052521,
0.008397338911890984,
0.6830176115036011,
0.38155481219291687,
-0.512813150882721,
0.9355089068412781,
-0.9427987337112427,
0.28843286633491516,
... |
func (_ChpRegistry *ChpRegistryCallerSession) CORESTAKINGDURATION() (*big.Int, error) {
return _ChpRegistry.Contract.CORESTAKINGDURATION(&_ChpRegistry.CallOpts)
} | [
-0.8684583306312561,
0.9596455693244934,
0.15969623625278473,
0.18599136173725128,
-0.998072624206543,
0.7463152408599854,
0.35373303294181824,
-0.07494962215423584,
0.7097595930099487,
0.31355053186416626,
-0.5690281987190247,
0.8105943202972412,
-0.9447908401489258,
0.30711397528648376,
... |
func (_ChpRegistry *ChpRegistryCaller) NODESTAKINGAMOUNT(opts *bind.CallOpts) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _ChpRegistry.contract.Call(opts, out, "NODE_STAKING_AMOUNT")
return *ret0, err
} | [
-0.8193252086639404,
0.8706228733062744,
0.6323899030685425,
-0.2107428014278412,
-0.6652606725692749,
0.3413242995738983,
0.4174526631832123,
-0.6521868705749512,
-0.6272867918014526,
0.26930099725723267,
-1.0826483964920044,
-0.000696356117259711,
-0.44449183344841003,
0.4572713375091553... |
func (_ChpRegistry *ChpRegistrySession) NODESTAKINGAMOUNT() (*big.Int, error) {
return _ChpRegistry.Contract.NODESTAKINGAMOUNT(&_ChpRegistry.CallOpts)
} | [
-1.0072535276412964,
1.075051188468933,
0.1403171271085739,
-0.4043229818344116,
-0.78499835729599,
-0.02347392775118351,
0.186367467045784,
-0.5562790632247925,
-0.24875403940677643,
-0.26051241159439087,
-0.8312453031539917,
0.6904804110527039,
-0.2808278799057007,
0.14142462611198425,
... |
func (_ChpRegistry *ChpRegistryCallerSession) NODESTAKINGAMOUNT() (*big.Int, error) {
return _ChpRegistry.Contract.NODESTAKINGAMOUNT(&_ChpRegistry.CallOpts)
} | [
-0.9907528162002563,
1.0998046398162842,
0.15471814572811127,
-0.3784102201461792,
-0.8138852119445801,
0.07016727328300476,
0.13812431693077087,
-0.6236448287963867,
-0.20359566807746887,
-0.2494249939918518,
-0.8295504450798035,
0.6214007139205933,
-0.3323891758918762,
0.1742985397577285... |
func (_ChpRegistry *ChpRegistryCaller) NODESTAKINGDURATION(opts *bind.CallOpts) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ret0
err := _ChpRegistry.contract.Call(opts, out, "NODE_STAKING_DURATION")
return *ret0, err
} | [
-0.7769551277160645,
1.2301524877548218,
0.3910343050956726,
-0.007110325153917074,
-0.49289748072624207,
0.5812394022941589,
0.2448934018611908,
-0.6493248343467712,
-0.6566237211227417,
0.620509922504425,
-1.0588066577911377,
0.05948448181152344,
-0.5377044081687927,
0.520943820476532,
... |
func (_ChpRegistry *ChpRegistrySession) NODESTAKINGDURATION() (*big.Int, error) {
return _ChpRegistry.Contract.NODESTAKINGDURATION(&_ChpRegistry.CallOpts)
} | [
-0.8697507381439209,
1.1845204830169678,
0.019787553697824478,
-0.33245086669921875,
-0.5809010863304138,
0.2848101258277893,
0.12076427787542343,
-0.5830730199813843,
-0.18592654168605804,
0.17643406987190247,
-0.827754020690918,
0.9119277000427246,
-0.20235955715179443,
0.220521628856658... |
func (_ChpRegistry *ChpRegistryCallerSession) NODESTAKINGDURATION() (*big.Int, error) {
return _ChpRegistry.Contract.NODESTAKINGDURATION(&_ChpRegistry.CallOpts)
} | [
-0.8426588177680969,
1.190562129020691,
0.01943941041827202,
-0.31843212246894836,
-0.6507996320724487,
0.3758583068847656,
0.06471168994903564,
-0.6758860349655151,
-0.09268172085285187,
0.11006022244691849,
-0.8493580222129822,
0.7784010767936707,
-0.23331761360168457,
0.2859724164009094... |
func (_ChpRegistry *ChpRegistryCaller) AllocatedIps(opts *bind.CallOpts, arg0 uint32) (bool, error) {
var (
ret0 = new(bool)
)
out := ret0
err := _ChpRegistry.contract.Call(opts, out, "allocatedIps", arg0)
return *ret0, err
} | [
-0.929530143737793,
0.6947160959243774,
0.9357868432998657,
-0.0935576930642128,
-0.7790647745132446,
0.6315617561340332,
0.7172280550003052,
-0.23900341987609863,
0.8635154962539673,
0.039669912308454514,
-0.08444938063621521,
-0.8772180676460266,
-0.2453048825263977,
0.179338738322258,
... |
func (_ChpRegistry *ChpRegistrySession) AllocatedIps(arg0 uint32) (bool, error) {
return _ChpRegistry.Contract.AllocatedIps(&_ChpRegistry.CallOpts, arg0)
} | [
-1.00497305393219,
0.6097411513328552,
0.7385690212249756,
-0.5422890186309814,
-0.7220105528831482,
0.48520785570144653,
0.7479867339134216,
-0.5887696146965027,
1.0468116998672485,
-0.18695689737796783,
0.2422802448272705,
-0.9561681151390076,
-0.33111870288848877,
0.525680422782898,
-... |
func (_ChpRegistry *ChpRegistryCallerSession) AllocatedIps(arg0 uint32) (bool, error) {
return _ChpRegistry.Contract.AllocatedIps(&_ChpRegistry.CallOpts, arg0)
} | [
-0.9619128704071045,
0.6182563304901123,
0.7336656451225281,
-0.5340161919593811,
-0.8373266458511353,
0.6000706553459167,
0.6271618604660034,
-0.6912798881530762,
1.0397073030471802,
-0.24190258979797363,
0.30083295702934265,
-0.9583160877227783,
-0.2479948252439499,
0.5052421689033508,
... |
func (_ChpRegistry *ChpRegistryCaller) CoreApprovalSignaturesUsed(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (bool, error) {
var (
ret0 = new(bool)
)
out := ret0
err := _ChpRegistry.contract.Call(opts, out, "coreApprovalSignaturesUsed", arg0, arg1)
return *ret0, err
} | [
-0.6055772304534912,
0.8004471063613892,
0.9268907904624939,
-0.2394535392522812,
-1.1103460788726807,
0.518015444278717,
0.9377195239067078,
-0.1164487898349762,
0.04435728117823601,
0.9552387595176697,
-0.06766583770513535,
0.8224693536758423,
-1.1850626468658447,
0.9478139877319336,
0... |
func (_ChpRegistry *ChpRegistrySession) CoreApprovalSignaturesUsed(arg0 common.Address, arg1 common.Address) (bool, error) {
return _ChpRegistry.Contract.CoreApprovalSignaturesUsed(&_ChpRegistry.CallOpts, arg0, arg1)
} | [
-0.757246196269989,
0.6350879073143005,
0.7876437902450562,
-0.48741528391838074,
-1.127224326133728,
0.38427579402923584,
0.6620358228683472,
-0.4701257646083832,
0.1072729229927063,
0.8353618383407593,
-0.025657497346401215,
0.9359948635101318,
-1.251283884048462,
0.8492193818092346,
0... |
func (_ChpRegistry *ChpRegistryCallerSession) CoreApprovalSignaturesUsed(arg0 common.Address, arg1 common.Address) (bool, error) {
return _ChpRegistry.Contract.CoreApprovalSignaturesUsed(&_ChpRegistry.CallOpts, arg0, arg1)
} | [
-0.7412998676300049,
0.688595175743103,
0.8259639143943787,
-0.4878794550895691,
-1.1507357358932495,
0.3996698260307312,
0.579357922077179,
-0.5344077944755554,
0.1375340074300766,
0.7912911772727966,
-0.0721842423081398,
0.8727781772613525,
-1.1975269317626953,
0.8881203532218933,
0.57... |
func (_ChpRegistry *ChpRegistryCaller) Cores(opts *bind.CallOpts, arg0 common.Address) (struct {
CoreIp uint32
IsStaked bool
IsHealthy bool
CoreId []byte
AmountStaked *big.Int
StakeLockedUntil *big.Int
}, error) {
ret := new(struct {
CoreIp uint32
IsStaked ... | [
-0.8497321009635925,
1.2439258098602295,
0.6784339547157288,
-0.11885464936494827,
0.03537750989198685,
-0.3254132866859436,
0.23984065651893616,
-0.5083001852035522,
1.2055237293243408,
0.7906009554862976,
-0.14608077704906464,
0.5348139405250549,
-1.135100245475769,
0.48246461153030396,
... |
func (_ChpRegistry *ChpRegistrySession) Cores(arg0 common.Address) (struct {
CoreIp uint32
IsStaked bool
IsHealthy bool
CoreId []byte
AmountStaked *big.Int
StakeLockedUntil *big.Int
}, error) {
return _ChpRegistry.Contract.Cores(&_ChpRegistry.CallOpts, arg0)
} | [
-0.8078505396842957,
0.9941876530647278,
0.5304387211799622,
-0.31446680426597595,
0.30666404962539673,
-0.39334145188331604,
0.2606712579727173,
-0.5525124073028564,
1.0127806663513184,
0.9625831246376038,
-0.4082571566104889,
0.4547140598297119,
-1.0256340503692627,
0.44967782497406006,
... |
func (_ChpRegistry *ChpRegistryCallerSession) Cores(arg0 common.Address) (struct {
CoreIp uint32
IsStaked bool
IsHealthy bool
CoreId []byte
AmountStaked *big.Int
StakeLockedUntil *big.Int
}, error) {
return _ChpRegistry.Contract.Cores(&_ChpRegistry.CallOpts, arg0)
} | [
-0.7834941148757935,
1.0082060098648071,
0.5344420075416565,
-0.3167649507522583,
0.23569530248641968,
-0.22662383317947388,
0.15085698664188385,
-0.6286553740501404,
1.1346231698989868,
0.8813011050224304,
-0.4032991826534271,
0.45548322796821594,
-0.9994539618492126,
0.5258264541625977,
... |
func (_ChpRegistry *ChpRegistryCaller) EligibleCores(opts *bind.CallOpts, arg0 common.Address) (bool, error) {
var (
ret0 = new(bool)
)
out := ret0
err := _ChpRegistry.contract.Call(opts, out, "eligibleCores", arg0)
return *ret0, err
} | [
-0.561497688293457,
1.1286888122558594,
1.0141685009002686,
0.15366414189338684,
-0.47731295228004456,
0.6517487168312073,
0.6679126620292664,
-0.08380880951881409,
0.994012176990509,
1.0864250659942627,
-0.8590719699859619,
0.3473166227340698,
-0.9805176258087158,
0.356577068567276,
0.1... |
func (_ChpRegistry *ChpRegistrySession) EligibleCores(arg0 common.Address) (bool, error) {
return _ChpRegistry.Contract.EligibleCores(&_ChpRegistry.CallOpts, arg0)
} | [
-0.5724685788154602,
1.0377638339996338,
0.7554979920387268,
-0.22888058423995972,
-0.3315809965133667,
0.4126351475715637,
0.5847604274749756,
-0.27600982785224915,
1.0974318981170654,
1.10767662525177,
-0.7079551219940186,
0.34744590520858765,
-1.0239970684051514,
0.7762611508369446,
0... |
func (_ChpRegistry *ChpRegistryCallerSession) EligibleCores(arg0 common.Address) (bool, error) {
return _ChpRegistry.Contract.EligibleCores(&_ChpRegistry.CallOpts, arg0)
} | [
-0.5588544607162476,
1.0475268363952637,
0.7309371829032898,
-0.23331405222415924,
-0.4304031431674957,
0.47406476736068726,
0.4993628263473511,
-0.34218090772628784,
1.1138718128204346,
1.0425374507904053,
-0.706098198890686,
0.3229876160621643,
-0.9723320007324219,
0.7776952981948853,
... |
func (_ChpRegistry *ChpRegistryCaller) IsHealthyCore(opts *bind.CallOpts, _address common.Address) (bool, error) {
var (
ret0 = new(bool)
)
out := ret0
err := _ChpRegistry.contract.Call(opts, out, "isHealthyCore", _address)
return *ret0, err
} | [
-0.3790057301521301,
0.8256328105926514,
1.2377984523773193,
0.146815687417984,
-0.24412432312965393,
0.14976195991039276,
-0.03850066661834717,
-0.5653030276298523,
0.8287037014961243,
1.2420635223388672,
-0.5082713961601257,
0.44868090748786926,
-0.6952117085456848,
0.4710879623889923,
... |
func (_ChpRegistry *ChpRegistrySession) IsHealthyCore(_address common.Address) (bool, error) {
return _ChpRegistry.Contract.IsHealthyCore(&_ChpRegistry.CallOpts, _address)
} | [
-0.5321415662765503,
0.8567947149276733,
0.8992775678634644,
-0.11819367110729218,
-0.17144787311553955,
-0.48098501563072205,
-0.18876314163208008,
-0.7993854284286499,
1.1637688875198364,
1.166251301765442,
-0.2534845769405365,
0.7813697457313538,
-0.6158237457275391,
0.7043105959892273,... |
func (_ChpRegistry *ChpRegistryCallerSession) IsHealthyCore(_address common.Address) (bool, error) {
return _ChpRegistry.Contract.IsHealthyCore(&_ChpRegistry.CallOpts, _address)
} | [
-0.5138720870018005,
0.8447597026824951,
0.8968417048454285,
-0.14944620430469513,
-0.1841651201248169,
-0.3898591697216034,
-0.2851305902004242,
-0.8291878700256348,
1.1487709283828735,
1.122058629989624,
-0.2512977421283722,
0.7318584322929382,
-0.6437515616416931,
0.6549363136291504,
... |
func (_ChpRegistry *ChpRegistryCaller) IsOwner(opts *bind.CallOpts) (bool, error) {
var (
ret0 = new(bool)
)
out := ret0
err := _ChpRegistry.contract.Call(opts, out, "isOwner")
return *ret0, err
} | [
-0.5008208751678467,
0.2646479606628418,
0.6547394394874573,
1.716823935508728,
-0.20694920420646667,
0.5742563009262085,
0.8660550713539124,
-0.4707106947898865,
0.4681342840194702,
0.04682830348610878,
-0.8225060701370239,
0.26480644941329956,
-0.9165919423103333,
-0.2068539410829544,
... |
func (_ChpRegistry *ChpRegistrySession) IsOwner() (bool, error) {
return _ChpRegistry.Contract.IsOwner(&_ChpRegistry.CallOpts)
} | [
-0.46334308385849,
0.4246697425842285,
0.3882425129413605,
1.2224992513656616,
0.22947469353675842,
0.003786723595112562,
0.7513094544410706,
-0.7049737572669983,
1.0206105709075928,
0.07586264610290527,
-0.23681959509849548,
0.16200655698776245,
-0.9149957895278931,
0.006426559761166573,
... |
func (_ChpRegistry *ChpRegistryCallerSession) IsOwner() (bool, error) {
return _ChpRegistry.Contract.IsOwner(&_ChpRegistry.CallOpts)
} | [
-0.49289223551750183,
0.4526054263114929,
0.36007070541381836,
1.1475284099578857,
0.08684967458248138,
0.14992280304431915,
0.5592337250709534,
-0.8965715169906616,
0.9980582594871521,
-0.060622815042734146,
-0.270670622587204,
0.09378250688314438,
-0.8774253726005554,
-0.0178316161036491... |
func (_ChpRegistry *ChpRegistryCaller) IsPauser(opts *bind.CallOpts, account common.Address) (bool, error) {
var (
ret0 = new(bool)
)
out := ret0
err := _ChpRegistry.contract.Call(opts, out, "isPauser", account)
return *ret0, err
} | [
-0.8149451613426208,
0.7175169587135315,
0.8857133984565735,
0.7304127216339111,
-0.5792050957679749,
0.5481035709381104,
1.1736574172973633,
0.18338525295257568,
1.4505420923233032,
0.3732690215110779,
-0.9639653563499451,
0.5174185037612915,
-0.6953421831130981,
-0.13533248007297516,
-... |
func (_ChpRegistry *ChpRegistrySession) IsPauser(account common.Address) (bool, error) {
return _ChpRegistry.Contract.IsPauser(&_ChpRegistry.CallOpts, account)
} | [
-0.9549080729484558,
1.1195123195648193,
0.6349105834960938,
0.4214954674243927,
-0.6138871908187866,
0.01699097640812397,
1.013724446296692,
0.13529808819293976,
2.0736899375915527,
0.48495054244995117,
-0.5563921928405762,
0.4959002435207367,
-0.6834760904312134,
-0.018534308299422264,
... |
func (_ChpRegistry *ChpRegistryCallerSession) IsPauser(account common.Address) (bool, error) {
return _ChpRegistry.Contract.IsPauser(&_ChpRegistry.CallOpts, account)
} | [
-0.9803913831710815,
1.1228046417236328,
0.6208427548408508,
0.40347981452941895,
-0.6568408012390137,
0.11719288676977158,
0.9108002185821533,
0.014608543366193771,
2.065014600753784,
0.38751235604286194,
-0.5592221021652222,
0.4881564676761627,
-0.6635808944702148,
0.007351947017014027,
... |
func (_ChpRegistry *ChpRegistryCaller) Name(opts *bind.CallOpts) (string, error) {
var (
ret0 = new(string)
)
out := ret0
err := _ChpRegistry.contract.Call(opts, out, "name")
return *ret0, err
} | [
-0.3252065181732178,
0.2258579283952713,
0.8261368870735168,
0.7981123924255371,
-0.7738984823226929,
-0.03814946115016937,
0.16149874031543732,
-0.5881453156471252,
0.29432082176208496,
0.9991645216941833,
-0.9961500763893127,
0.04329049214720726,
-0.9260208606719971,
0.2713935971260071,
... |
func (_ChpRegistry *ChpRegistrySession) Name() (string, error) {
return _ChpRegistry.Contract.Name(&_ChpRegistry.CallOpts)
} | [
-0.5957279205322266,
0.345530241727829,
0.6383423805236816,
0.4986591339111328,
-0.5138194561004639,
-0.15123263001441956,
0.21899080276489258,
-0.7223972082138062,
0.5353329181671143,
1.549112319946289,
-0.5347752571105957,
0.39760324358940125,
-0.41476351022720337,
-0.003907154314219952,... |
func (_ChpRegistry *ChpRegistryCallerSession) Name() (string, error) {
return _ChpRegistry.Contract.Name(&_ChpRegistry.CallOpts)
} | [
-0.6352061033248901,
0.23915265500545502,
0.6055372357368469,
0.4149610102176666,
-0.6481765508651733,
0.15245045721530914,
-0.001294636749662459,
-0.8136096000671387,
0.5406770706176758,
1.3492214679718018,
-0.5835471749305725,
0.3428220748901367,
-0.4293191432952881,
0.09154769033193588,... |
func (_ChpRegistry *ChpRegistryCaller) Nodes(opts *bind.CallOpts, arg0 common.Address) (struct {
NodeIp uint32
RewardsAddr common.Address
IsStaked bool
AmountStaked *big.Int
StakeLockedUntil *big.Int
}, error) {
ret := new(struct {
NodeIp uint32
RewardsAddr common.Add... | [
-0.6812252998352051,
1.2536747455596924,
0.48906317353248596,
-0.9322884678840637,
0.4367712140083313,
-0.37650197744369507,
0.32855692505836487,
-0.0019494936568662524,
0.817317008972168,
0.5322076678276062,
-0.026013869792222977,
0.5897806882858276,
-0.2075866311788559,
-0.03011230938136... |
func (_ChpRegistry *ChpRegistrySession) Nodes(arg0 common.Address) (struct {
NodeIp uint32
RewardsAddr common.Address
IsStaked bool
AmountStaked *big.Int
StakeLockedUntil *big.Int
}, error) {
return _ChpRegistry.Contract.Nodes(&_ChpRegistry.CallOpts, arg0)
} | [
-0.781075119972229,
1.042407751083374,
0.3581254184246063,
-1.026137113571167,
0.644753634929657,
-0.5999287366867065,
0.4471540153026581,
-0.06209808960556984,
0.65580815076828,
0.5884222388267517,
-0.3445753753185272,
0.6862567067146301,
-0.046878915280103683,
-0.16189272701740265,
-0.... |
func (_ChpRegistry *ChpRegistryCallerSession) Nodes(arg0 common.Address) (struct {
NodeIp uint32
RewardsAddr common.Address
IsStaked bool
AmountStaked *big.Int
StakeLockedUntil *big.Int
}, error) {
return _ChpRegistry.Contract.Nodes(&_ChpRegistry.CallOpts, arg0)
} | [
-0.712617814540863,
1.1111501455307007,
0.3666667342185974,
-1.000767707824707,
0.4935092329978943,
-0.4608435332775116,
0.2868867814540863,
-0.24307793378829956,
0.7871459722518921,
0.4539778232574463,
-0.2771960198879242,
0.6645952463150024,
-0.05142530798912048,
-0.036625936627388,
-0... |
func (_ChpRegistry *ChpRegistryCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
var (
ret0 = new(common.Address)
)
out := ret0
err := _ChpRegistry.contract.Call(opts, out, "owner")
return *ret0, err
} | [
-0.45884668827056885,
0.018931115046143532,
0.6182809472084045,
1.7317043542861938,
-0.1541421264410019,
0.3483783006668091,
1.298327922821045,
-0.621817946434021,
0.7856886386871338,
-0.3469288647174835,
-0.7039275169372559,
0.5511789321899414,
-0.8949808478355408,
-0.1395607441663742,
... |
func (_ChpRegistry *ChpRegistrySession) Owner() (common.Address, error) {
return _ChpRegistry.Contract.Owner(&_ChpRegistry.CallOpts)
} | [
-0.4320298731327057,
-0.06237800419330597,
0.3608514964580536,
1.119803786277771,
-0.03933754563331604,
0.0915178433060646,
1.3429124355316162,
-0.693700909614563,
0.9706622958183289,
0.2326132208108902,
-0.18752044439315796,
0.9250022172927856,
-0.606349527835846,
-0.401295006275177,
0.... |
func (_ChpRegistry *ChpRegistryCallerSession) Owner() (common.Address, error) {
return _ChpRegistry.Contract.Owner(&_ChpRegistry.CallOpts)
} | [
-0.4126071035861969,
-0.06540722399950027,
0.3152749240398407,
1.1049821376800537,
-0.1574247181415558,
0.29120731353759766,
1.1635719537734985,
-0.7406001687049866,
1.0059438943862915,
0.10723298788070679,
-0.20942170917987823,
0.856755793094635,
-0.5580577254295349,
-0.3201967477798462,
... |
func (_ChpRegistry *ChpRegistryCaller) Paused(opts *bind.CallOpts) (bool, error) {
var (
ret0 = new(bool)
)
out := ret0
err := _ChpRegistry.contract.Call(opts, out, "paused")
return *ret0, err
} | [
-0.3063109219074249,
0.5812267065048218,
0.7672958374023438,
0.9992186427116394,
0.4113547205924988,
0.5871618390083313,
0.1168544739484787,
-0.231953427195549,
0.8019551038742065,
0.20473094284534454,
-1.3464106321334839,
-0.026868466287851334,
-1.0746725797653198,
-0.33369433879852295,
... |
func (_ChpRegistry *ChpRegistrySession) Paused() (bool, error) {
return _ChpRegistry.Contract.Paused(&_ChpRegistry.CallOpts)
} | [
-0.5912797451019287,
0.8829971551895142,
0.5320908427238464,
0.16729801893234253,
0.7559369206428528,
-0.11078805476427078,
-0.14210332930088043,
-0.6272965669631958,
0.8480888605117798,
0.29350513219833374,
-1.1150116920471191,
-0.07545739412307739,
-1.0113425254821777,
-0.434764921665191... |
func (_ChpRegistry *ChpRegistryCallerSession) Paused() (bool, error) {
return _ChpRegistry.Contract.Paused(&_ChpRegistry.CallOpts)
} | [
-0.6209686994552612,
0.8141571283340454,
0.5683085322380066,
0.1719854772090912,
0.5617661476135254,
0.09025228768587112,
-0.31928879022598267,
-0.8201242685317993,
0.8887771964073181,
0.1678449660539627,
-1.1735305786132812,
-0.0807785764336586,
-1.0064483880996704,
-0.3446763753890991,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.