text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (tc *TokenCreate) SetUserID(id int) *TokenCreate {
tc.mutation.SetUserID(id)
return tc
} | [
-0.4423213303089142,
-0.10845436155796051,
0.13720348477363586,
1.46518075466156,
-0.6437855958938599,
1.2245608568191528,
0.5324761271476746,
0.5417314171791077,
0.3926647901535034,
-0.1923174113035202,
-1.3171058893203735,
0.2746899127960205,
0.16421908140182495,
0.7990222573280334,
-0... |
func (tc *TokenCreate) SetUser(u *User) *TokenCreate {
return tc.SetUserID(u.ID)
} | [
-0.4115869402885437,
0.45382755994796753,
0.17232678830623627,
1.1348763704299927,
-0.6045433282852173,
0.572268545627594,
0.6290374398231506,
0.04766564071178436,
0.30833131074905396,
-1.4655299186706543,
-0.9174280166625977,
0.4715413451194763,
0.32273340225219727,
0.5055815577507019,
... |
func (tc *TokenCreate) Save(ctx context.Context) (*Token, error) {
if _, ok := tc.mutation.Name(); !ok {
return nil, errors.New("ent: missing required field \"name\"")
}
if v, ok := tc.mutation.Name(); ok {
if err := token.NameValidator(v); err != nil {
return nil, fmt.Errorf("ent: validator failed for field ... | [
-0.6344901919364929,
0.05088158696889877,
0.6866278648376465,
-0.2788093090057373,
0.537138819694519,
-0.10683265328407288,
0.2621155083179474,
-0.8249837160110474,
-0.7976178526878357,
0.04197163134813309,
-0.7470614910125732,
-0.17695237696170807,
0.43417564034461975,
0.3781604468822479,... |
func (tc *TokenCreate) SaveX(ctx context.Context) *Token {
v, err := tc.Save(ctx)
if err != nil {
panic(err)
}
return v
} | [
-0.223606675863266,
0.5912548899650574,
0.21734163165092468,
0.4943460524082184,
-0.5503815412521362,
0.8682297468185425,
-1.177494764328003,
0.16489964723587036,
0.8004971742630005,
-0.0023724683560431004,
-1.4641354084014893,
-0.158162921667099,
-0.15889300405979156,
-0.534666895866394,
... |
func (id *Hello) SayHello(c frame.Context) error {
var res hello.HelloResponse
res.Message = "welcome~~~"
log.Info("SayHello receiver....", c.Bizid(), c.Header().Get("A"))
return c.JSON(&res)
} | [
0.2147757112979889,
-0.5254714488983154,
0.7415701150894165,
-0.5514360070228577,
1.0146952867507935,
-0.7227779626846313,
0.15258200466632843,
0.3272939920425415,
0.17966917157173157,
0.4788625240325928,
-1.5788244009017944,
0.1711328625679016,
-0.09352896362543106,
0.21282567083835602,
... |
func (id *Hello) GetExample(c frame.Context) error {
log.Info("GetExample receiver....", c.Bizid(), " name=", c.FormValue("name"), " age=", c.FormValue("age"))
return c.JSON2(0, "success", &hello.HelloResponse{Message: "GetExample hi~~~"})
} | [
-0.18427006900310516,
0.031207244843244553,
0.79166179895401,
0.12989655137062073,
0.03601448982954025,
-0.28852465748786926,
-0.4288223087787628,
0.7820936441421509,
-0.08229520171880722,
0.36822637915611267,
-1.1978548765182495,
0.8826996684074402,
-0.4339189827442169,
0.4902658760547638... |
func (id *Hello) PostFormExample(c frame.Context) error {
if c.GetString("B", "") != "B" {
return c.JSON2(1, "params not illegal", nil)
}
c.Info("GetString:", c.GetString("B", "not get value B"))
c.Info("GetInt:", c.GetInt("C", -1))
c.Info("GetUint:", c.GetUint("D", uint64(0)))
c.Info("GetFloat:", c.GetFloat("E... | [
-0.6031127572059631,
-0.33482223749160767,
0.9888683557510376,
-0.22013840079307556,
0.42372289299964905,
0.13460877537727356,
-0.07104770839214325,
0.6170098781585693,
-0.795479953289032,
-0.1465199738740921,
-1.6234008073806763,
-0.02369539625942707,
-0.5825047492980957,
1.32949388027191... |
func ExecuteGenericTestTable(t *testing.T, testTable []GenericTestEntry) {
for _, testCase := range testTable {
err := ocpp2.Validate.Struct(testCase.Element)
if err != nil {
assert.Equal(t, testCase.ExpectedValid, false, err.Error())
} else {
assert.Equal(t, testCase.ExpectedValid, true, "%v is valid", te... | [
-0.7883527874946594,
-0.4314115643501282,
0.6725872755050659,
0.9722940921783447,
1.260802984237671,
1.6712937355041504,
-0.04141075164079666,
-0.6330984830856323,
-0.33865872025489807,
0.29058921337127686,
0.48206767439842224,
0.30091387033462524,
-0.46877843141555786,
-0.0240166056901216... |
func TestOcpp2Protocol(t *testing.T) {
logrus.SetLevel(logrus.PanicLevel)
suite.Run(t, new(OcppV2TestSuite))
} | [
-0.41909632086753845,
-0.4786110818386078,
0.22102725505828857,
0.3739437162876129,
-0.16382361948490143,
1.0454479455947876,
0.09902797639369965,
-0.7158563733100891,
-0.05736038088798523,
-0.11709289997816086,
-0.2705669403076172,
0.7868236303329468,
-0.5015681982040405,
-0.8641210794448... |
func isBtrfsSubVolume(subvolPath string) bool {
fs := syscall.Stat_t{}
err := syscall.Lstat(subvolPath, &fs)
if err != nil {
return false
}
// Check if BTRFS_FIRST_FREE_OBJECTID
if fs.Ino != 256 {
return false
}
return true
} | [
0.4346465468406677,
-0.5974862575531006,
0.7277384400367737,
0.6590654253959656,
0.21421372890472412,
-0.30439329147338867,
-0.48279911279678345,
-0.2917865812778473,
0.30695849657058716,
-0.818692684173584,
-0.804187536239624,
0.3440381586551666,
-0.6183406710624695,
0.38782137632369995,
... |
func btrfsSubVolumesDelete(subvol string) error {
// Delete subsubvols.
subsubvols, err := btrfsSubVolumesGet(subvol)
if err != nil {
return err
}
sort.Sort(sort.Reverse(sort.StringSlice(subsubvols)))
for _, subsubvol := range subsubvols {
err := btrfsSubVolumeDelete(path.Join(subvol, subsubvol))
if err !=... | [
0.8988304138183594,
-0.7449737191200256,
0.5325914621353149,
0.7139525413513184,
0.31662073731422424,
-0.3184305429458618,
-0.30433645844459534,
-0.01417106669396162,
-0.01823863759636879,
-0.3410467803478241,
-0.34994569420814514,
0.02996249683201313,
0.08882978558540344,
0.22327187657356... |
func MakeLoopbackBtrfs(loopback string, size int64, uid int, gid int, dest string) error {
mounted, err := isMounted(loopback)
if err != nil {
return err
}
/* if it's already mounted, don't do anything */
if mounted {
return nil
}
if err := setupLoopback(loopback, uid, gid, size); err != nil {
return err... | [
0.4909135103225708,
-0.24784287810325623,
1.0762051343917847,
-0.13626529276371002,
-0.35642459988594055,
0.05970873311161995,
-0.3535860478878021,
-0.5160104036331177,
0.5529538989067078,
-0.4800596535205841,
0.43636590242385864,
0.5606864094734192,
-0.47097527980804443,
0.007540334481745... |
func NewPoint(name string) (*Point, error) {
if name == "" {
return nil, ErrNameEmptyOrNull
}
if len(name) > 3 {
return nil, ErrInvalidName
}
return &Point{
Name: name,
Connections: make([]*Connection, 0),
}, nil
} | [
0.1750405877828598,
-0.13740994036197662,
0.5161821246147156,
0.7578923106193542,
-0.5646662712097168,
0.32992246747016907,
-0.5247578620910645,
-0.04150646924972534,
0.5833867192268372,
0.46797218918800354,
-0.2731071412563324,
-0.025800570845603943,
-1.0073269605636597,
-0.32479864358901... |
func (point *Point) containsConnectionTo(destiny *Point) bool {
for i := 0; i < len(point.Connections); i++ {
if point.Connections[i].Destination.Name == destiny.Name {
return true
}
}
return false
} | [
-0.9725569486618042,
-1.022696614265442,
0.662945568561554,
-0.3826757073402405,
-0.31871047616004944,
-0.3296802341938019,
-0.4741392433643341,
-0.3205547332763672,
-0.49453505873680115,
0.5197296738624573,
0.15843647718429565,
-0.3223722577095032,
0.28287526965141296,
0.1361350119113922,... |
func (point *Point) NewConnection(destination *Point, price uint) error {
if point.Name == destination.Name {
return ErrOriginAndDestinationEqual
}
contains := point.containsConnectionTo(destination)
if contains {
return ErrExistentConnection
}
connection, err := newConnection(destination, price)
if err !=... | [
-0.8382628560066223,
-0.152690127491951,
0.5086356997489929,
1.0651021003723145,
-0.10104431957006454,
-0.23830632865428925,
-0.437688410282135,
-0.03759743645787239,
0.410432368516922,
1.1502994298934937,
0.07081280648708344,
-0.6927236914634705,
0.38966497778892517,
-0.07751872390508652,... |
func longestCommonSubsequenceLentgh(s1 string, s2 string) int {
/*
* s2 will be on the rows, s1 will be on the columns.
*
* +1 to leave room at the left for the "".
*/
cache := make([][]int, len(s1)+1)
for indx := range cache {
cache[indx] = make([]int, len(s2)+1)
}
/*
* cache[s2.length()][s1.leng... | [
0.6905032396316528,
0.0679798349738121,
0.8599310517311096,
-0.061175186187028885,
-1.2241328954696655,
-0.27921292185783386,
-0.01239379309117794,
0.14994865655899048,
-0.35943400859832764,
0.36458277702331543,
-0.46013668179512024,
0.6967686414718628,
-0.394256591796875,
-0.4696686267852... |
func Hash(input string) (string, error) {
bytes, err := bcrypt.GenerateFromPassword([]byte(input), 14)
return string(bytes), err
} | [
1.0342376232147217,
0.8157068490982056,
0.78273606300354,
0.3125508427619934,
-0.9129428267478943,
1.0626507997512817,
0.06988036632537842,
0.09635704010725021,
0.2160799503326416,
0.03506513684988022,
-1.0103976726531982,
0.8774265050888062,
-0.4648084342479706,
-0.4901633560657501,
1.0... |
func CheckHash(input, hash string) bool {
err := bcrypt.CompareHashAndPassword([]byte(hash), []byte(input))
return err == nil
} | [
1.127971887588501,
-0.1843792349100113,
0.7392756342887878,
1.5199906826019287,
0.040120095014572144,
1.0015923976898193,
-0.6901208162307739,
0.43119776248931885,
-0.2626743018627167,
0.05823344737291336,
-0.21235813200473785,
0.5465156435966492,
-0.9825782775878906,
0.4689745604991913,
... |
func NormalizeFileName(file string) string {
if i := strings.Index(file, "@"); i != -1 {
file = fmt.Sprintf("%s%s", file[:i], filepath.Ext(file))
}
return file
} | [
0.13776622712612152,
-0.2584863007068634,
0.6631853580474854,
-0.45822885632514954,
-0.17622339725494385,
0.3928278684616089,
-0.025050485506653786,
0.5127332210540771,
-0.04875752702355385,
0.5867518186569214,
0.9149081110954285,
-0.3149641454219818,
-0.18657518923282623,
-0.2899504601955... |
func BuildHTMLTree(f *os.File) (*branch.Branch, error) {
buf := bufio.NewReader(f)
st := NewHTMLTree(cBody)
st.br, _ = st.root.AddBranch(-1, cP)
for {
line, err := buf.ReadString('\n')
if err != nil && err != io.EOF {
return st.root, err
}
st.Build(line)
if err == io.EOF {
break
}
}
return st... | [
0.11738372594118118,
-0.06339742243289948,
0.6267589330673218,
0.23618578910827637,
-0.9823621511459351,
0.36047643423080444,
0.523884117603302,
0.18583673238754272,
-0.3886052370071411,
-0.6301589012145996,
0.5535814166069031,
-0.11211290955543518,
-0.22600580751895905,
0.8583675026893616... |
func Configure() *Config {
cfg := new(Config)
// parse de argumenten
version := flag.Bool("version", false, "Show version number and exit")
if *version {
fmt.Printf("Version %s\n", cVersion)
os.Exit(0)
}
input := flag.String("in", "stdin", "path to input file")
output := flag.String("out", "stdout", "path ... | [
0.15245743095874786,
-0.2157002091407776,
0.8691020011901855,
0.8499903678894043,
-0.8007252216339111,
0.5605972409248352,
0.09806771576404572,
0.22244207561016083,
-1.5235284566879272,
0.008522522635757923,
-0.04227596893906593,
-0.4799540340900421,
-0.37432408332824707,
0.648438155651092... |
func HTMLCode(br *branch.Branch, lvl int) string {
sbl := br.Siblings()
if len(sbl) <= 0 {
return ""
}
indnt := ""
if lvl > 0 {
indnt = strings.Repeat(" ", lvl)
}
s := ""
switch br.ID {
case cTable:
s = cCrLf
}
s = s + indnt + "<" + br.ID
if len(br.Info) > 0 {
s = s + " " + strings.TrimSpace(br.In... | [
0.02616165019571781,
-0.15650342404842377,
0.9747227430343628,
0.34345895051956177,
-0.6612521409988403,
0.32682520151138306,
-0.28657466173171997,
-0.19835369288921356,
-0.7061597108840942,
-0.22460737824440002,
0.22152051329612732,
0.2397966831922531,
-0.23457840085029602,
0.669499397277... |
func (cfg *Config) Header() *branch.Branch {
head := branch.NewBranch(cHead)
if len(cfg.title) > 0 {
title, _ := head.AddBranch(-1, cTitle)
title.Add(-1, cfg.title)
}
meta, _ := head.AddBranch(-1, cMeta)
meta.Info = "charset=\"utf-8\""
meta.Add(-1, "")
meta, _ = head.AddBranch(-1, cMeta)
meta.Info = "nam... | [
-0.5472457408905029,
-0.12729637324810028,
0.8857857584953308,
0.09467735886573792,
-0.6055051684379578,
0.8905854225158691,
-0.1436084657907486,
0.261281818151474,
-0.4871377646923065,
-0.02752179466187954,
0.552821934223175,
0.4530951678752899,
-0.38496649265289307,
-0.3911502957344055,
... |
func Merge(src interface{}, dst interface{}, ignore ...string) interface{} {
srcStruct := ST.New(src)
dstStruct := ST.New(dst)
main:
for _, field := range srcStruct.Fields() {
_, ok := dstStruct.FieldOk(field.Name())
if !ok {
continue
}
for _, ign := range ignore {
//skip field if it's on the ignore l... | [
-0.9133856296539307,
0.6981073021888733,
0.9427034854888916,
-0.2478667050600052,
-0.7944129109382629,
0.29490926861763,
-0.41033118963241577,
0.394753634929657,
-0.3714677691459656,
-0.01664971187710762,
-0.8123871088027954,
-0.02908719889819622,
-0.4708568751811981,
-0.3388589024543762,
... |
func GetMsg(code int) string {
msg, ok := MsgFlags[code]
if ok {
return msg
}
return MsgFlags[ERROR]
} | [
-0.27455922961235046,
1.3760713338851929,
0.552708625793457,
0.32120341062545776,
0.6509471535682678,
0.3330201804637909,
0.09557051956653595,
-0.6322609782218933,
-0.0011610090732574463,
0.7074651718139648,
0.7693085074424744,
0.22163434326648712,
-0.1332181692123413,
0.922612190246582,
... |
func newFileLogger() *fileLogger {
// Open the log file for writing.
f, err := os.OpenFile(*logFile, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
glog.Fatalf("could not open log file: %v", err)
}
return &fileLogger{f: f}
} | [
0.3557945489883423,
-0.811127781867981,
0.17660537362098694,
-0.18298670649528503,
-0.8856756687164307,
-0.08388622850179672,
-0.2302362471818924,
0.3411020338535309,
-0.6447830200195312,
-0.5878982543945312,
-0.5390781164169312,
-0.4339301884174347,
-0.25907471776008606,
0.981671273708343... |
func New(files []string, nReduce int) *Master {
mapTasks := map[string]model.Task{}
for _, f := range files {
t := model.Task{
Files: []string{f},
NReduce: nReduce,
Type: model.Map,
Status: pending,
}
// Sanitize filename.
mapTasks[path.Base(f)] = t
}
// Create empty reduce tasks.
reduce... | [
-0.6801941394805908,
-0.27965933084487915,
0.6878950595855713,
-0.14826427400112152,
-0.5739238858222961,
-0.280398964881897,
0.08007869869470596,
0.35307711362838745,
-0.9447587728500366,
0.09534996002912521,
-0.5934243202209473,
-0.6864624619483948,
0.6674466133117676,
0.8812308311462402... |
func (m *Master) GetWork(args *model.Args, reply *model.Task) error {
// Handle assigning both map and reduce tasks.
log.Infof("[%d] worker %s asking for work", m.phase, args.WorkerID)
if m.phase == model.Map {
// Hand over a map task.
mt := m.getPendingMapTask()
if mt == nil {
return model.ErrNoPendingTas... | [
-0.8809794783592224,
-0.06694280356168747,
1.0659902095794678,
0.46315470337867737,
0.5612872838973999,
-0.14586405456066132,
0.2344299852848053,
-0.6352815628051758,
-0.3218095302581787,
0.2566467821598053,
-0.3817285895347595,
-0.2738203704357147,
-0.5033410787582397,
0.6567039489746094,... |
func (m *Master) watch(taskName, taskType string) {
ctx, cancel := context.WithCancel(context.Background())
// Start the timer to keep track of the task.
go func(ctx context.Context, timeout chan struct{ taskName, taskType string }, task string) {
t := time.NewTimer(taskTimeout)
defer t.Stop()
select {
case ... | [
0.7662893533706665,
-0.3357219994068146,
0.6017159819602966,
0.08589299023151398,
0.04172578826546669,
-0.0459015928208828,
0.05260408669710159,
0.647518515586853,
-0.46904921531677246,
0.46610599756240845,
-0.7099865674972534,
1.209790825843811,
0.30100980401039124,
0.17725203931331635,
... |
func (m *Master) Done() chan struct{} {
return m.done
} | [
-0.41203778982162476,
0.02769527956843376,
0.6066745519638062,
0.2257988303899765,
-0.210249125957489,
0.25245824456214905,
-0.02802574262022972,
-0.5071658492088318,
-0.24229373037815094,
-0.7570561766624451,
-0.9803953170776367,
1.1139249801635742,
-0.35492029786109924,
0.584212064743042... |
func (m *Master) SignalTaskStatus(args *model.TaskStatus, reply *bool) error {
if !args.Success {
return nil
}
if m.phase == model.Map {
log.Infof("map phase for %s completed", args.File)
m.mutex.Lock()
defer m.mutex.Unlock()
f := path.Base(args.File)
if t, ok := m.mapTasks[f]; ok {
if t.Status == in... | [
-0.7688987851142883,
-0.7680627107620239,
0.8474386930465698,
-0.33056846261024475,
-0.005004601087421179,
-0.029869720339775085,
0.29984140396118164,
0.36088377237319946,
-0.6362228393554688,
0.7203112840652466,
-1.2164232730865479,
-0.635934054851532,
0.4477337598800659,
0.43418362736701... |
func (m *Master) getPendingMapTask() *model.Task {
m.mutex.Lock()
defer m.mutex.Unlock()
for k, t := range m.mapTasks {
if t.Status == pending {
t.Status = inprogress
m.mapTasks[k] = t
return &t
}
}
return nil
} | [
-0.8296592831611633,
-0.8520137071609497,
0.7346449494361877,
0.042764414101839066,
-0.904358446598053,
0.1227082833647728,
-0.7054668068885803,
0.40693148970603943,
-0.12290804088115692,
-0.445467472076416,
-0.8157831430435181,
-0.4562385380268097,
-0.19324389100074768,
0.2473290711641311... |
func (m *Master) getPendingReduceTask() (string, *model.Task) {
m.mutex.Lock()
defer m.mutex.Unlock()
for k, t := range m.reduceTasks {
if t.Status == pending {
t.Status = inprogress
m.reduceTasks[k] = t
return k, &t
}
}
return "", nil
} | [
-1.2435543537139893,
-0.19948558509349823,
0.705843448638916,
-0.06081245467066765,
-0.366461843252182,
-0.6832442283630371,
-0.5771233439445496,
0.9300627112388611,
-0.2513997256755829,
-0.16699668765068054,
-0.8765950202941895,
-0.15121743083000183,
-0.2878035008907318,
0.881572604179382... |
func Merge(aa []string, bb ...string) []string {
check := make(map[string]int)
res := make([]string, 0)
dd := append(aa, bb...)
for _, val := range dd {
check[val] = 1
}
for letter, _ := range check {
if letter == "" {
continue
}
res = append(res, letter)
}
sort.Strings(res)
return res
} | [
-1.0507597923278809,
0.6898707747459412,
0.9160444140434265,
-0.08409807085990906,
0.259005606174469,
0.04191723093390465,
-0.3640691339969635,
-0.16396281123161316,
-0.10028605908155441,
0.09399091452360153,
-0.11066607385873795,
0.3455639183521271,
-0.8727589845657349,
0.883123517036438,... |
func DeployOutboxEntry(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *OutboxEntry, error) {
parsed, err := abi.JSON(strings.NewReader(OutboxEntryABI))
if err != nil {
return common.Address{}, nil, nil, err
}
address, tx, contract, err := bind.DeployContract(auth, par... | [
-0.7266323566436768,
-0.5318083167076111,
0.5167309641838074,
-0.5469849705696106,
-0.2264626920223236,
-0.3032574951648712,
0.09800765663385391,
-0.2665252983570099,
-0.22515609860420227,
0.9012949466705322,
0.07442522794008255,
0.4060313403606415,
-0.362504243850708,
0.2862647771835327,
... |
func NewOutboxEntry(address common.Address, backend bind.ContractBackend) (*OutboxEntry, error) {
contract, err := bindOutboxEntry(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &OutboxEntry{OutboxEntryCaller: OutboxEntryCaller{contract: contract}, OutboxEntryTransactor: OutboxEntryT... | [
-0.20329664647579193,
0.26924702525138855,
0.3608585596084595,
-0.2626858651638031,
-0.668121337890625,
-0.26648974418640137,
-0.11993605643510818,
-0.23759329319000244,
-0.1868906319141388,
0.8560165762901306,
-0.36072027683258057,
0.6216509342193604,
-0.2574399411678314,
0.74301671981811... |
func NewOutboxEntryCaller(address common.Address, caller bind.ContractCaller) (*OutboxEntryCaller, error) {
contract, err := bindOutboxEntry(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &OutboxEntryCaller{contract: contract}, nil
} | [
-0.7803298234939575,
0.25953271985054016,
0.2648491859436035,
0.08961338549852371,
-0.8207292556762695,
0.5850987434387207,
-0.3768063485622406,
0.18571412563323975,
-0.2870478630065918,
0.5355802178382874,
0.07174064218997955,
0.0903782844543457,
-0.5138004422187805,
0.2977701723575592,
... |
func NewOutboxEntryTransactor(address common.Address, transactor bind.ContractTransactor) (*OutboxEntryTransactor, error) {
contract, err := bindOutboxEntry(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &OutboxEntryTransactor{contract: contract}, nil
} | [
-0.56234210729599,
0.08128596842288971,
0.1697404831647873,
-0.24959881603717804,
-0.6756839752197266,
0.2791527807712555,
-0.0028427373617887497,
0.33037102222442627,
-0.4489024877548218,
0.9336859583854675,
-0.609513521194458,
-0.07686158269643784,
-0.34448760747909546,
-0.50185048580169... |
func NewOutboxEntryFilterer(address common.Address, filterer bind.ContractFilterer) (*OutboxEntryFilterer, error) {
contract, err := bindOutboxEntry(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &OutboxEntryFilterer{contract: contract}, nil
} | [
-0.8296124339103699,
-0.11435756832361221,
0.0418703556060791,
0.19534698128700256,
-0.7061843872070312,
0.1454709768295288,
-0.5616520047187805,
-0.024680862203240395,
-0.5516065955162048,
0.6712972521781921,
0.11067748069763184,
0.23979583382606506,
-0.2601759433746338,
0.067944571375846... |
func bindOutboxEntry(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(OutboxEntryABI))
if err != nil {
return nil, err
}
return bind.NewBoundContract(address, parsed, cal... | [
-0.6387403011322021,
-0.5455526113510132,
0.4872284233570099,
-0.21866151690483093,
-0.5742088556289673,
-0.12363039702177048,
-0.429583340883255,
-0.17128777503967285,
-0.05051449313759804,
0.3604236841201782,
0.18368223309516907,
0.9434625506401062,
-0.3257749378681183,
0.000380979996407... |
func (_OutboxEntry *OutboxEntryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _OutboxEntry.Contract.OutboxEntryCaller.contract.Call(opts, result, method, params...)
} | [
-1.6065919399261475,
0.948639452457428,
0.49013200402259827,
0.7494409084320068,
-0.7216983437538147,
0.5163593292236328,
-0.5094282627105713,
-0.8030707836151123,
0.020912092179059982,
0.2250855565071106,
0.14914771914482117,
0.04574998468160629,
-0.5677728652954102,
-0.022036107257008553... |
func (_OutboxEntry *OutboxEntryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _OutboxEntry.Contract.OutboxEntryTransactor.contract.Transfer(opts)
} | [
-0.9689748287200928,
0.24035145342350006,
0.23932437598705292,
0.5840590000152588,
-0.14487862586975098,
0.7301347851753235,
0.3812277913093567,
-0.6409132480621338,
0.3683941066265106,
-0.3234155774116516,
-0.17702899873256683,
0.26016750931739807,
-0.21833071112632751,
-0.806393742561340... |
func (_OutboxEntry *OutboxEntryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _OutboxEntry.Contract.OutboxEntryTransactor.contract.Transact(opts, method, params...)
} | [
-0.9931212067604065,
0.4482448399066925,
0.45715799927711487,
-0.3372623324394226,
0.2168172150850296,
0.26134300231933594,
0.7563201189041138,
-0.6700519323348999,
-0.11457746475934982,
-0.008253661915659904,
-0.06951799988746643,
0.38925036787986755,
-0.0074782599695026875,
-0.3574633598... |
func (_OutboxEntry *OutboxEntryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _OutboxEntry.Contract.contract.Call(opts, result, method, params...)
} | [
-1.341650128364563,
1.010576844215393,
0.5015485286712646,
0.8640807867050171,
-0.710886538028717,
0.4474191963672638,
-0.42876556515693665,
-0.8306434750556946,
0.2508695721626282,
0.20107951760292053,
0.08275940269231796,
0.0008624272304587066,
-0.5751021504402161,
0.0825023353099823,
... |
func (_OutboxEntry *OutboxEntryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _OutboxEntry.Contract.contract.Transfer(opts)
} | [
-0.6038692593574524,
0.28548941016197205,
0.19461598992347717,
0.6270592212677002,
-0.026779627427458763,
0.4461035132408142,
0.5504891872406006,
-0.6978830695152283,
0.6420506238937378,
-0.2973337769508362,
0.04667580500245094,
0.12535753846168518,
-0.27252131700515747,
-0.563141167163848... |
func (_OutboxEntry *OutboxEntryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _OutboxEntry.Contract.contract.Transact(opts, method, params...)
} | [
-0.6954727172851562,
0.5093733668327332,
0.40863215923309326,
-0.29949450492858887,
0.34328052401542664,
0.05591145157814026,
0.8554722666740417,
-0.7900816202163696,
0.17729225754737854,
0.07649194449186325,
0.09966076165437698,
0.35066723823547363,
0.07865949720144272,
-0.190301895141601... |
func (_OutboxEntry *OutboxEntryCaller) IsMaster(opts *bind.CallOpts) (bool, error) {
var out []interface{}
err := _OutboxEntry.contract.Call(opts, &out, "isMaster")
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
} | [
-0.7654939889907837,
0.39216357469558716,
0.8936384320259094,
1.2067402601242065,
-0.29403650760650635,
0.22802667319774628,
-0.5272923111915588,
-0.523919403553009,
0.7355875968933105,
0.30576425790786743,
-0.6441308259963989,
1.0439261198043823,
-1.0941349267959595,
-0.5560488104820251,
... |
func (_OutboxEntry *OutboxEntrySession) IsMaster() (bool, error) {
return _OutboxEntry.Contract.IsMaster(&_OutboxEntry.CallOpts)
} | [
-0.44988176226615906,
0.4864564836025238,
0.5665580630302429,
0.6879426836967468,
0.015865076333284378,
0.03732176125049591,
-0.9560508131980896,
-0.4751269817352295,
1.2528737783432007,
-0.012562695890665054,
-0.29832449555397034,
0.8441249132156372,
-1.0582455396652222,
-0.51688885688781... |
func (_OutboxEntry *OutboxEntryCallerSession) IsMaster() (bool, error) {
return _OutboxEntry.Contract.IsMaster(&_OutboxEntry.CallOpts)
} | [
-0.3695283532142639,
0.5251665115356445,
0.5454548001289368,
0.6773861646652222,
-0.06652835756540298,
0.17179079353809357,
-1.021378755569458,
-0.5907121896743774,
1.2379913330078125,
-0.055827975273132324,
-0.3253605365753174,
0.7852252125740051,
-1.0514171123504639,
-0.3972925841808319,... |
func (_OutboxEntry *OutboxEntryCaller) NumRemaining(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _OutboxEntry.contract.Call(opts, &out, "numRemaining")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
} | [
-0.8962962627410889,
0.5225995182991028,
0.7358095049858093,
0.19339457154273987,
-0.22134050726890564,
0.021820353344082832,
-0.12366931885480881,
-0.6931074261665344,
0.6300380825996399,
-0.11353844404220581,
-1.0536123514175415,
0.18362146615982056,
-0.7601788640022278,
0.13238820433616... |
func (_OutboxEntry *OutboxEntrySession) NumRemaining() (*big.Int, error) {
return _OutboxEntry.Contract.NumRemaining(&_OutboxEntry.CallOpts)
} | [
-0.6325042247772217,
0.7135109305381775,
0.2944563925266266,
-0.05783674865961075,
0.07509119808673859,
0.09335453808307648,
-0.6877150535583496,
-0.43727684020996094,
0.8916304707527161,
-0.2851327061653137,
-0.8481961488723755,
-0.1940498650074005,
-0.9829411506652832,
0.0653030574321746... |
func (_OutboxEntry *OutboxEntryCallerSession) NumRemaining() (*big.Int, error) {
return _OutboxEntry.Contract.NumRemaining(&_OutboxEntry.CallOpts)
} | [
-0.6342678070068359,
0.7484264373779297,
0.287887305021286,
-0.02412041462957859,
0.036840781569480896,
0.2162177413702011,
-0.7344091534614563,
-0.6117928624153137,
0.8907393217086792,
-0.27909135818481445,
-0.8090496063232422,
-0.147029310464859,
-0.9917071461677551,
0.1097922995686531,
... |
func (_OutboxEntry *OutboxEntryCaller) Root(opts *bind.CallOpts) ([32]byte, error) {
var out []interface{}
err := _OutboxEntry.contract.Call(opts, &out, "root")
if err != nil {
return *new([32]byte), err
}
out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
} | [
0.001293396344408393,
1.1043323278427124,
0.7513235807418823,
0.7577614784240723,
-0.38943517208099365,
0.5826728343963623,
-0.5283461809158325,
-1.7153948545455933,
0.666342556476593,
0.1855229288339615,
-0.23115968704223633,
1.9912278652191162,
-1.0177981853485107,
0.804519534111023,
0... |
func (_OutboxEntry *OutboxEntrySession) Root() ([32]byte, error) {
return _OutboxEntry.Contract.Root(&_OutboxEntry.CallOpts)
} | [
0.3455474078655243,
1.1260426044464111,
0.36869508028030396,
0.20784536004066467,
-0.23405811190605164,
0.5930876135826111,
-0.8891409039497375,
-1.5209648609161377,
1.1474425792694092,
0.031193625181913376,
0.1993386596441269,
1.9033763408660889,
-1.0057055950164795,
0.3848345875740051,
... |
func (_OutboxEntry *OutboxEntryCallerSession) Root() ([32]byte, error) {
return _OutboxEntry.Contract.Root(&_OutboxEntry.CallOpts)
} | [
0.3391490578651428,
1.200628638267517,
0.3680001199245453,
0.21484045684337616,
-0.30985692143440247,
0.6904151439666748,
-0.959209144115448,
-1.6079453229904175,
1.1857194900512695,
0.020472347736358643,
0.1357743740081787,
1.8556699752807617,
-0.9945926666259766,
0.5287697911262512,
0.... |
func (_OutboxEntry *OutboxEntryCaller) SpentOutput(opts *bind.CallOpts, arg0 [32]byte) (bool, error) {
var out []interface{}
err := _OutboxEntry.contract.Call(opts, &out, "spentOutput", arg0)
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
} | [
-0.6871628165245056,
0.5212642550468445,
0.9252180457115173,
0.2554471790790558,
-0.4485420882701874,
-0.12024688720703125,
1.0937334299087524,
-0.8183766603469849,
0.27914267778396606,
0.5783278942108154,
-1.1239619255065918,
-0.16404029726982117,
-1.289599061012268,
0.6288020610809326,
... |
func (_OutboxEntry *OutboxEntrySession) SpentOutput(arg0 [32]byte) (bool, error) {
return _OutboxEntry.Contract.SpentOutput(&_OutboxEntry.CallOpts, arg0)
} | [
-0.6760146617889404,
0.6497505903244019,
0.610969066619873,
-0.14721643924713135,
-0.5117230415344238,
-0.10584020614624023,
0.9022856950759888,
-1.1661039590835571,
0.5354105234146118,
0.33434832096099854,
-1.025178074836731,
-0.499761700630188,
-1.4842861890792847,
0.6724913120269775,
... |
func (_OutboxEntry *OutboxEntryCallerSession) SpentOutput(arg0 [32]byte) (bool, error) {
return _OutboxEntry.Contract.SpentOutput(&_OutboxEntry.CallOpts, arg0)
} | [
-0.5888925790786743,
0.6935903429985046,
0.6145763397216797,
-0.1483924835920334,
-0.6212615966796875,
-0.03896133229136467,
0.7608091235160828,
-1.2656594514846802,
0.590239942073822,
0.40628162026405334,
-0.9893467426300049,
-0.395709365606308,
-1.437302827835083,
0.7782280445098877,
-... |
func (_OutboxEntry *OutboxEntryTransactor) Destroy(opts *bind.TransactOpts) (*types.Transaction, error) {
return _OutboxEntry.contract.Transact(opts, "destroy")
} | [
-0.4830852150917053,
0.3787213861942291,
0.339838445186615,
-0.02140609361231327,
0.3163275122642517,
-0.023385338485240936,
0.1264897733926773,
-0.4923957288265228,
0.4198325276374817,
0.5130953192710876,
-0.21595433354377747,
-0.19942457973957062,
-0.9706449508666992,
-0.4432901442050934... |
func (_OutboxEntry *OutboxEntrySession) Destroy() (*types.Transaction, error) {
return _OutboxEntry.Contract.Destroy(&_OutboxEntry.TransactOpts)
} | [
-0.03229095786809921,
0.3622003197669983,
0.41124919056892395,
-0.31438615918159485,
0.4161365330219269,
-0.2143021821975708,
0.011307474225759506,
-0.5192342400550842,
0.373153418302536,
0.652524471282959,
-0.1457381546497345,
-0.6955854296684265,
-0.7588256001472473,
-0.33360031247138977... |
func (_OutboxEntry *OutboxEntryTransactorSession) Destroy() (*types.Transaction, error) {
return _OutboxEntry.Contract.Destroy(&_OutboxEntry.TransactOpts)
} | [
0.003540630917996168,
0.3668314218521118,
0.39492160081863403,
-0.40030959248542786,
0.5163640975952148,
-0.19208918511867523,
0.030221804976463318,
-0.6034727096557617,
0.31585589051246643,
0.7898913025856018,
-0.20985911786556244,
-0.7477050423622131,
-0.6983822584152222,
-0.378094106912... |
func (_OutboxEntry *OutboxEntryTransactor) Initialize(opts *bind.TransactOpts, _root [32]byte, _numInBatch *big.Int) (*types.Transaction, error) {
return _OutboxEntry.contract.Transact(opts, "initialize", _root, _numInBatch)
} | [
-0.4721786677837372,
0.9364737272262573,
0.42211344838142395,
0.5997757911682129,
-0.14276853203773499,
-0.7579666376113892,
-0.21480922400951385,
-0.44467565417289734,
-0.09777534753084183,
-0.11509215831756592,
-0.9962828159332275,
0.5538567900657654,
-0.24405023455619812,
-0.02705791406... |
func (_OutboxEntry *OutboxEntrySession) Initialize(_root [32]byte, _numInBatch *big.Int) (*types.Transaction, error) {
return _OutboxEntry.Contract.Initialize(&_OutboxEntry.TransactOpts, _root, _numInBatch)
} | [
-0.2992168366909027,
0.96611487865448,
0.3900330066680908,
0.47321784496307373,
-0.1656387895345688,
-0.9323203563690186,
-0.28342756628990173,
-0.45029768347740173,
-0.21183006465435028,
0.06716618686914444,
-0.8026809096336365,
0.4578402638435364,
-0.4809770882129669,
-0.0742315500974655... |
func (_OutboxEntry *OutboxEntryTransactorSession) Initialize(_root [32]byte, _numInBatch *big.Int) (*types.Transaction, error) {
return _OutboxEntry.Contract.Initialize(&_OutboxEntry.TransactOpts, _root, _numInBatch)
} | [
-0.25023049116134644,
0.8961688876152039,
0.36438921093940735,
0.37648123502731323,
-0.10913138091564178,
-0.8936371803283691,
-0.32379186153411865,
-0.5317071080207825,
-0.19374124705791473,
0.12433703243732452,
-0.8230665922164917,
0.38221678137779236,
-0.47152331471443176,
-0.1771110743... |
func (_OutboxEntry *OutboxEntryTransactor) SpendOutput(opts *bind.TransactOpts, _root [32]byte, _id [32]byte) (*types.Transaction, error) {
return _OutboxEntry.contract.Transact(opts, "spendOutput", _root, _id)
} | [
-0.4994434118270874,
0.27185314893722534,
0.4077378213405609,
-0.3240709900856018,
-0.5061396956443787,
-1.25930655002594,
0.8644792437553406,
-0.9960850477218628,
-0.23622998595237732,
0.14305627346038818,
-0.5008859038352966,
-0.015090842731297016,
-0.5436823964118958,
0.1192968711256980... |
func (_OutboxEntry *OutboxEntrySession) SpendOutput(_root [32]byte, _id [32]byte) (*types.Transaction, error) {
return _OutboxEntry.Contract.SpendOutput(&_OutboxEntry.TransactOpts, _root, _id)
} | [
-0.370723694562912,
0.21711395680904388,
0.4049992859363556,
-0.2693153917789459,
-0.40269485116004944,
-1.2792963981628418,
0.7153167724609375,
-1.1529732942581177,
-0.15778203308582306,
0.24576474726200104,
-0.38983777165412903,
0.18895789980888367,
-0.6560349464416504,
0.099222525954246... |
func (_OutboxEntry *OutboxEntryTransactorSession) SpendOutput(_root [32]byte, _id [32]byte) (*types.Transaction, error) {
return _OutboxEntry.Contract.SpendOutput(&_OutboxEntry.TransactOpts, _root, _id)
} | [
-0.2845034599304199,
0.23626646399497986,
0.3913656771183014,
-0.29320764541625977,
-0.40894609689712524,
-1.2695934772491455,
0.7314455509185791,
-1.200699806213379,
-0.16245810687541962,
0.30966922640800476,
-0.4098266363143921,
0.16224904358386993,
-0.5685228705406189,
0.049055818468332... |
func (c *Client) PostOrganisationAccountsAccountIDIdentifications() *PostOrganisationAccountsAccountIDIdentificationsRequest {
var ()
return &PostOrganisationAccountsAccountIDIdentificationsRequest{
AccountIdentificationRequest: models.AccountIdentificationRequestWithDefaults(c.Defaults),
AccountID: c.Defaults.... | [
-0.492159903049469,
-0.4139052629470825,
0.40084415674209595,
0.25098535418510437,
0.020374812185764313,
-0.18455268442630768,
0.9849647283554077,
-0.03663840889930725,
1.0617750883102417,
-0.22332978248596191,
-1.1576954126358032,
0.7555218935012817,
-0.25549906492233276,
-0.2323126941919... |
func (o *PostOrganisationAccountsAccountIDIdentificationsRequest) WithContext(ctx context.Context) *PostOrganisationAccountsAccountIDIdentificationsRequest {
o.Context = ctx
return o
} | [
-0.5373246669769287,
-0.022080300375819206,
0.4181708097457886,
-0.16974778473377228,
-0.5714649558067322,
-0.024902060627937317,
0.11123906075954437,
-0.4890499711036682,
1.403439998626709,
-0.06143643334507942,
-0.4729915261268616,
0.4150971472263336,
-0.10385344922542572,
-0.68177419900... |
func (o *PostOrganisationAccountsAccountIDIdentificationsRequest) WithHTTPClient(client *http.Client) *PostOrganisationAccountsAccountIDIdentificationsRequest {
o.HTTPClient = client
return o
} | [
-0.5908025503158569,
-0.5369090437889099,
0.3122848868370056,
-0.2925771176815033,
-0.038209084421396255,
-0.1570488065481186,
0.8236863613128662,
-0.40807342529296875,
0.6811147928237915,
-0.3349936604499817,
-0.4319376051425934,
0.25942516326904297,
0.388656347990036,
-0.4602709114551544... |
func (o *PostOrganisationAccountsAccountIDIdentificationsRequest) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// ISBODYPARAM
if o.AccountIdentificationRequest != nil {
if err := r.SetBodyParam(o.AccountIdent... | [
-0.9167434573173523,
-0.20817787945270538,
0.5915236473083496,
-0.040698740631341934,
1.021344542503357,
-0.08367294818162918,
1.2199991941452026,
0.2507951259613037,
0.22781217098236084,
0.23118956387043,
-0.19791686534881592,
0.19592225551605225,
-0.5759945511817932,
0.38571056723594666,... |
func NewCommentGormRepo(db *gorm.DB) comment.CommentRepository {
return &CommentGormRepo{conn: db}
} | [
0.4669363498687744,
-0.6336413025856018,
0.2010049819946289,
-0.6229158043861389,
0.5085132122039795,
-0.29349076747894287,
0.10000459849834442,
0.31368276476860046,
-0.44283705949783325,
0.7248494625091553,
-0.5835726857185364,
-0.49016934633255005,
-0.5440917611122131,
-0.100208304822444... |
func (cmntRepo *CommentGormRepo) Comments() ([]entity.Comment, []error) {
cmnts := []entity.Comment{}
fmt.Println(cmnts)
errs := cmntRepo.conn.Find(&cmnts).GetErrors()
if len(errs) > 0 {
return nil, errs
}
return cmnts, errs
} | [
-0.4525618255138397,
-0.95977783203125,
0.3612019419670105,
-0.5922831892967224,
1.8049274682998657,
-0.32283923029899597,
-0.02251308411359787,
-0.315033882856369,
-0.5791255235671997,
-0.04032605141401291,
0.0012212388683110476,
-0.24938726425170898,
-0.44811078906059265,
0.5998412370681... |
func (cmntRepo *CommentGormRepo) StoreComment(comment *entity.Comment) (*entity.Comment, []error) {
cmnt := comment
errs := cmntRepo.conn.Create(cmnt).GetErrors()
if len(errs) > 0 {
return nil, errs
}
return cmnt, errs
} | [
-0.5615130066871643,
-0.5670649409294128,
0.41368457674980164,
-0.7846104502677917,
1.4307897090911865,
-0.22162601351737976,
0.6848194599151611,
-0.6291548609733582,
0.23967817425727844,
-0.13727852702140808,
-0.827922523021698,
-0.5757437348365784,
-0.9472861289978027,
-0.006835230626165... |
func (l LCMTest) Start(setDeviceCode ...string) {
var logFile *os.File
writefile.CreateFile(l.FileName)
logFile = writefile.OpenFile(logFile, l.FileName)
writefile.WriteText(logFile, "Device ID", "Operation", "Time")
workingsetKey := workingset.Workingset{}.CreateWorkingset()
retry:
for i := 0; i < 10; i++ {
... | [
0.07026872783899307,
0.5477151274681091,
0.6268661022186279,
0.16729013621807098,
0.23819775879383087,
-0.5293912887573242,
0.48665371537208557,
-0.26494792103767395,
-0.5096091628074646,
0.3045920431613922,
-0.13090287148952484,
0.33738645911216736,
-0.7003283500671387,
0.1351754963397979... |
func NewRepo(appConfig *config.AppConfig) *Repository {
return &Repository{
AppConfig: appConfig,
}
} | [
0.9059591293334961,
-0.1340170055627823,
0.09510066360235214,
1.0312973260879517,
-1.2361562252044678,
-0.6048582792282104,
-0.7754328846931458,
0.4540812373161316,
0.2534143924713135,
-0.35217544436454773,
0.06688866019248962,
-0.47667059302330017,
0.7153294086456299,
-0.2536559998989105,... |
func NewHandlers(r *Repository) {
Repo = r
} | [
0.43495047092437744,
0.038440875709056854,
0.11373496055603027,
-0.44745194911956787,
0.05932772159576416,
0.08058895170688629,
-0.2501758337020874,
0.11663103103637695,
-0.23901554942131042,
-0.42070531845092773,
-0.7919477224349976,
-0.0015894323587417603,
-0.40456774830818176,
0.4952057... |
func (ue *UserEntity) listen(errChan chan error) {
connectionFailCount := 0
for {
client, err := model.NewWebSocketClient4(ue.config.WebSocketURL, ue.client.AuthToken)
if err != nil {
errChan <- fmt.Errorf("websocketClient creation error: %w", err)
connectionFailCount++
select {
case <-ue.wsClosing:
... | [
-0.18237601220607758,
-1.042601466178894,
0.8547232151031494,
-0.4923759698867798,
-0.019839422777295113,
-0.11964205652475357,
0.36588990688323975,
-0.9132260084152222,
-0.1462944597005844,
0.030906664207577705,
0.06341064721345901,
0.4548189640045166,
0.33750101923942566,
-0.053441926836... |
func getWaitTime(failCount int) time.Duration {
waitTime := minWebsocketReconnectDuration
if failCount > maxWebsocketFails {
waitTime *= time.Duration(failCount) * time.Duration(failCount)
if waitTime > maxWebsocketReconnectDuration {
waitTime = maxWebsocketReconnectDuration
}
}
return waitTime
} | [
-0.3123834431171417,
0.44006189703941345,
0.37392657995224,
-0.4698672890663147,
-0.2063458263874054,
0.14732858538627625,
-0.04648270830512047,
-0.02604183740913868,
-0.38305553793907166,
0.4648759961128235,
-0.0626852735877037,
0.5262284874916077,
-0.4782944321632385,
0.32225561141967773... |
func NewEqlFeaturesJoinBuilder() *EqlFeaturesJoinBuilder {
r := EqlFeaturesJoinBuilder{
&EqlFeaturesJoin{},
}
return &r
} | [
0.44540801644325256,
-0.4815293848514557,
0.03603439778089523,
0.613742470741272,
-0.18235079944133759,
-0.36132171750068665,
-0.2375057339668274,
0.9094744920730591,
0.03250497579574585,
-0.8146990537643433,
-0.47508615255355835,
-0.9627761840820312,
-0.7539436221122742,
0.228757426142692... |
func (rb *EqlFeaturesJoinBuilder) Build() EqlFeaturesJoin {
return *rb.v
} | [
0.17039600014686584,
-1.1975947618484497,
0.2248130887746811,
0.49283838272094727,
0.1911906749010086,
-0.27943742275238037,
0.22508153319358826,
0.6200510859489441,
-0.2904481589794159,
-1.0852184295654297,
0.059737544506788254,
-0.25673070549964905,
-0.8601171970367432,
-0.12145463377237... |
func fetchStoryIDs(feedType *string) []int {
url := fmt.Sprintf(storiesFeedURL, *feedType)
resp, err := http.Get(url)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
var m []int
err = json.Unmarshal(body, &m)
if err != nil {
log.Fatal(err)
}
return m
} | [
0.03585154190659523,
-0.5175556540489197,
0.5880578756332397,
-0.3010806143283844,
0.04299504682421684,
-0.370392769575119,
-1.187665581703186,
-0.9544273018836975,
-0.7047362923622131,
0.6046763062477112,
-0.3998486399650574,
0.8485085368156433,
-0.308589369058609,
0.9409806728363037,
0... |
func fetchStories(count *int, feedType *string) []Story {
var stories []Story
var feed = fetchStoryIDs(feedType)
var ch = make(chan int, *count)
for i := 0; i < *count; i++ {
go fetchOne(feed[i], ch)
}
for j := 0; j < *count; j++ {
<-ch
}
for k := 0; k < *count; k++ {
stories = append(stories, results[... | [
0.5072261691093445,
0.24925419688224792,
0.3767862319946289,
0.6181965470314026,
0.1577063500881195,
-0.14349792897701263,
-0.4682098627090454,
-1.2728815078735352,
-0.8157960176467896,
-0.5479071140289307,
0.1482168287038803,
-0.2507815361022949,
-0.3911195397377014,
1.056754231452942,
... |
func ParseArgs(args []string) Args {
if len(args) == 1 {
return Args{false, false}
}
cfg := Args{false, false}
for i := 1; i < len(args); i++ {
arg := args[i]
if arg == "-n" || arg == "--nohup" {
cfg.IgnoreHangups = true
} else if arg == "-h" || arg == "--help" {
printHelp()
os.Exit(0)
} else if ... | [
-0.16895334422588348,
-0.04062829911708832,
0.7244003415107727,
0.08158747106790543,
-0.01552735734730959,
0.2698826789855957,
-0.6739324331283569,
0.05149862915277481,
-0.009795906953513622,
0.7669593691825867,
0.6033247113227844,
-0.2760327458381653,
-1.0192734003067017,
1.24226009845733... |
func runCommand(query string) ([]byte, error) {
path, err := os.Getwd()
if err != nil {
return []byte{}, err
}
cmd := fmt.Sprintf("%s/dasgoclient", path)
out, err := exec.Command(cmd, "-query", query, "-format", "json").Output()
return out, err
} | [
-1.2826337814331055,
0.29703769087791443,
0.730746865272522,
-0.5862080454826355,
-0.1522132307291031,
0.6135915517807007,
0.3022492229938507,
0.08771248906850815,
-0.5738113522529602,
-0.4661931097507477,
0.061632800847291946,
1.090367078781128,
0.07389454543590546,
0.35882318019866943,
... |
func typeof(v interface{}) string {
return reflect.TypeOf(v).String()
} | [
-0.15822359919548035,
-0.09476350247859955,
0.35055193305015564,
-1.2918047904968262,
-0.3514186143875122,
0.12606769800186157,
0.23357121646404266,
-1.6968929767608643,
1.2482291460037231,
0.4545525908470154,
0.18809673190116882,
-0.21297401189804077,
-0.2993933856487274,
-0.2591861188411... |
func TestStatus(t *testing.T) {
assert := assert.New(t)
examples := []string{"block_queries.txt", "file_queries.txt", "lumi_queries.txt", "mcm_queries.txt", "run_queries.txt", "dataset_queries.txt", "jobsummary_queries.txt", "misc_queries.txt", "site_queries.txt"}
dasKeys := []string{"expire", "instance", "primary_... | [
-0.16455446183681488,
0.500341534614563,
0.6773990988731384,
-0.29915758967399597,
-0.02772999368607998,
0.45810994505882263,
0.36432769894599915,
0.23459118604660034,
-0.43556898832321167,
-0.18482527136802673,
0.21092018485069275,
0.4624476134777069,
0.590223491191864,
0.6563453078269958... |
func (b *Block1) Serialize() []byte {
var result bytes.Buffer
encoder := gob.NewEncoder(&result)
err := encoder.Encode(b)
if err != nil {
log.Panic(err)
}
return result.Bytes()
} | [
-0.062018394470214844,
0.8527142405509949,
0.6815868616104126,
0.96382737159729,
0.3549099564552307,
-0.3764547109603882,
-0.6773471236228943,
-0.28006628155708313,
-0.6754385232925415,
0.8318435549736023,
-1.095139503479004,
0.6899124383926392,
-2.0289723873138428,
0.5312512516975403,
0... |
func DeserializeBlock(d []byte) *Block1 {
var block Block1
decoder := gob.NewDecoder(bytes.NewReader(d))
err := decoder.Decode(&block)
if err != nil {
log.Panic(err)
}
return &block
} | [
0.23634470999240875,
0.3581659197807312,
0.6538559794425964,
0.023845940828323364,
-0.1195489913225174,
0.06500294059515,
-0.7223294377326965,
0.009092908352613449,
-0.18001866340637207,
-0.4309239685535431,
-0.3917026221752167,
0.002491267630830407,
-1.1387438774108887,
-0.330828368663787... |
func cvStressIncLoop(s *cvStressData, countImod4 uint64, n uint64) {
s.mu.Lock()
s.mu.AssertHeld()
for i := uint64(0); i != n; i++ {
s.mu.AssertHeld()
for (s.count & 3) != countImod4 {
var absDeadline = time.Now().Add(time.Duration(rand.Int31n(cvMaxDelayMicros)) * time.Microsecond)
for s.countIsIMod4[count... | [
0.02067754603922367,
0.14468692243099213,
0.4809421896934509,
0.3433019816875458,
0.11832234263420105,
0.49566879868507385,
0.2656615376472473,
-0.7458783388137817,
0.16687573492527008,
0.09267161786556244,
0.015579376369714737,
0.29869702458381653,
-0.2845846116542816,
0.089617520570755,
... |
func TestCVTimeoutStress(t *testing.T) {
const loopCount = 50000
const threadsPerValue = 5
var s cvStressData
s.mu.Lock()
s.mu.AssertHeld()
// Create threads trying to increment from 1, 2, and 3 mod 4.
// They will continually hit their timeouts because s.count==0
for i := 0; i != threadsPerValue; i++ {
s.mu... | [
0.46514469385147095,
0.613785982131958,
0.5831523537635803,
0.15373511612415314,
0.2664814293384552,
0.11823833733797073,
1.159730315208435,
-0.7818390727043152,
0.16637858748435974,
-0.7698591947555542,
-0.2649860680103302,
-0.26781558990478516,
-0.3876505196094513,
-0.16913017630577087,
... |
func (i *Integer) Type() ObjectType { return IntegerObject } | [
-0.6003814339637756,
-0.39134636521339417,
0.1552060842514038,
0.33860769867897034,
0.2565390169620514,
0.6299440264701843,
1.0034974813461304,
-1.3642661571502686,
0.6584707498550415,
-0.0424458384513855,
-0.5369585156440735,
0.07922586053609848,
-0.7831843495368958,
-0.17772142589092255,... |
func (i *Integer) Inspect() string {
return fmt.Sprintf("%d", i.Value)
} | [
-0.5795154571533203,
0.24277687072753906,
0.6878897547721863,
-1.2257308959960938,
-0.6941639184951782,
0.3581433892250061,
0.24743704497814178,
-0.2717573642730713,
-0.3065815567970276,
0.3055698573589325,
0.717557430267334,
-0.2215605080127716,
0.05878739804029465,
0.08796653151512146,
... |
func Constructor(capacity int) MyCircularQueue {
dummyHead, dummyTail := NewNode(0), NewNode(0)
dummyHead.Next = dummyTail
dummyTail.Pre = dummyHead
return MyCircularQueue{dummyHead, dummyTail, 0, capacity}
} | [
-0.23047886788845062,
-0.8402100801467896,
0.5536003708839417,
-0.5415984988212585,
-0.2710823118686676,
-0.17625468969345093,
0.7885999083518982,
0.18778420984745026,
0.1939110904932022,
-0.07455963641405106,
-0.7090478539466858,
1.1950278282165527,
-0.46822988986968994,
0.687116980552673... |
func (mcq *MyCircularQueue) EnQueue(value int) bool {
if mcq.length == mcq.capacity {
return false
}
newNode := NewNode(value)
newNode.Next = mcq.dummyTail
newNode.Pre = mcq.dummyTail.Pre
mcq.dummyTail.Pre.Next = newNode
mcq.dummyTail.Pre = newNode
mcq.length++
return true
} | [
-0.4413642883300781,
0.696816086769104,
0.7040793299674988,
-1.1130759716033936,
-0.28754112124443054,
0.2834722697734833,
0.8947540521621704,
-0.3938152492046356,
0.38826727867126465,
0.07605557143688202,
-0.9305123686790466,
0.560493528842926,
-1.248643159866333,
0.6344025135040283,
0.... |
func (mcq *MyCircularQueue) DeQueue() bool {
if mcq.length == 0 {
return false
}
shouldDeleteNode := mcq.dummyHead.Next
deleteNodeInList(shouldDeleteNode)
mcq.length--
return true
} | [
-0.5918756127357483,
0.28934019804000854,
0.7282170057296753,
-1.1121035814285278,
-0.030525995418429375,
-0.3487151861190796,
0.16110222041606903,
0.5918253064155579,
0.4408760666847229,
0.23582616448402405,
-0.7021306753158569,
0.23266637325286865,
-1.6344738006591797,
0.8508937954902649... |
func (mcq *MyCircularQueue) Front() int {
if mcq.length == 0 {
return -1
}
return mcq.dummyHead.Next.Val
} | [
-0.6011423468589783,
-0.1621059775352478,
0.36514514684677124,
-0.8072614073753357,
0.08027151972055435,
0.015124544501304626,
0.6191438436508179,
0.1701940894126892,
0.1405390352010727,
-0.574307382106781,
-0.5095765590667725,
1.5600873231887817,
-0.8821972608566284,
1.3169001340866089,
... |
func (mcq *MyCircularQueue) Rear() int {
if mcq.length == 0 {
return -1
}
return mcq.dummyTail.Pre.Val
} | [
-0.5844781398773193,
-0.16354186832904816,
0.686842143535614,
-0.6081372499465942,
-0.19990453124046326,
-0.43853941559791565,
0.6562755107879639,
0.2649576961994171,
0.14111848175525665,
-1.230368971824646,
-0.7406484484672546,
1.1413081884384155,
-1.5349633693695068,
0.26086026430130005,... |
func (mcq *MyCircularQueue) IsEmpty() bool {
return mcq.length == 0
} | [
-0.9531843066215515,
-1.4510412216186523,
0.30529293417930603,
-0.6416966915130615,
0.6647327542304993,
0.1826513707637787,
0.10751491785049438,
0.18597418069839478,
0.36712878942489624,
0.22966507077217102,
-0.4677407443523407,
0.6685164570808411,
-1.007444977760315,
0.5098116993904114,
... |
func (mcq *MyCircularQueue) IsFull() bool {
return mcq.length == mcq.capacity
} | [
0.5421248078346252,
-1.4809436798095703,
0.36502620577812195,
-0.3244985044002533,
-0.05019940435886383,
0.18152639269828796,
-0.06338287144899368,
0.22457996010780334,
0.8798585534095764,
0.670942485332489,
-1.0236144065856934,
0.5348604917526245,
-0.6325623393058777,
0.25527864694595337,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.