text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (g *GitLocal) Reset(dir string, commitish string, hard bool) error { return g.GitCLI.Reset(dir, commitish, true) }
[ 0.14690478146076202, 0.9502225518226624, 0.07367732375860214, -0.05498248338699341, 0.1971898078918457, 0.47551172971725464, 0.18611463904380798, 0.48221299052238464, -1.8412715196609497, 0.7813775539398193, -0.21065419912338257, 1.2050340175628662, -0.558931291103363, -0.35795149207115173...
func (g *GitLocal) RemoteUpdate(dir string) error { return g.GitFake.RemoteUpdate(dir) }
[ -0.6041558384895325, -1.264922022819519, 0.2671855092048645, -0.45625296235084534, -1.3172107934951782, 0.7348429560661316, -0.3938290476799011, 0.4584706723690033, 0.021060355007648468, 0.8681881427764893, -0.8329775929450989, 1.3193814754486084, -1.1287895441055298, -0.3328770697116852, ...
func (g *GitLocal) LocalBranches(dir string) ([]string, error) { return g.GitCLI.LocalBranches(dir) }
[ 0.26623180508613586, 0.2536746859550476, 0.14313210546970367, 0.1925458163022995, -0.8175953030586243, -0.025035781785845757, -0.1829979121685028, -0.4785671532154083, -0.06654370576143265, 0.45000147819519043, -0.6365731358528137, 0.42213085293769836, -1.753272533416748, 0.694354236125946...
func (g *GitLocal) MergeTheirs(dir string, commitish string) error { return g.GitCLI.MergeTheirs(dir, commitish) }
[ 0.017442947253584862, 0.12562358379364014, 0.12622235715389252, -1.2371677160263062, 0.5798870921134949, 0.5793482065200806, -0.5382570624351501, -0.0751463994383812, -0.2633315920829773, 0.32196974754333496, -0.3921990692615509, 0.31353244185447693, -0.13663546741008759, 0.202359110116958...
func (g *GitLocal) RebaseTheirs(dir string, upstream string, branch string, skipEmpty bool) error { return g.GitCLI.RebaseTheirs(dir, upstream, branch, false) }
[ -0.08804488182067871, -0.34872427582740784, 0.3175130784511566, -0.29223600029945374, -0.10461240261793137, 0.6055187582969666, -0.012089473195374012, 0.21886880695819855, -0.36700665950775146, 1.2030047178268433, -0.4761711359024048, 0.3712556064128876, -0.7593085169792175, -0.43493038415...
func (g *GitLocal) GetCommits(dir string, startSha string, endSha string) ([]GitCommit, error) { return g.GitCLI.GetCommits(dir, startSha, endSha) }
[ 0.10520918667316437, -0.2308579832315445, 0.40246614813804626, -0.20620018243789673, 0.8816789388656616, -0.5335292816162109, -0.4872824549674988, -0.7309628129005432, -0.7513377070426941, 0.002497266046702862, -0.07521343231201172, 1.2319214344024658, -0.5455610156059265, 0.72892248630523...
func (g *GitLocal) RevParse(dir string, rev string) (string, error) { return g.GitCLI.RevParse(dir, rev) }
[ 0.29635775089263916, -0.08234970271587372, 0.2937793731689453, -0.5391370058059692, -0.679432213306427, -0.40092459321022034, -0.5375754237174988, 0.4225587546825409, -0.6343252062797546, 0.0031976287718862295, 0.04251525551080704, 0.482651948928833, -1.267878770828247, -0.8479781746864319...
func (g *GitLocal) SetUpstreamTo(dir string, branch string) error { return g.GitCLI.SetUpstreamTo(dir, branch) }
[ 0.5351556539535522, 0.09466688334941864, 0.2578032612800598, -1.124261736869812, 0.17399351298809052, -0.0651807188987732, 0.4730689525604248, -0.13607212901115417, -0.5607590675354004, 0.08905129879713058, -0.1661604344844818, 1.37513267993927, -0.537971556186676, 0.7510733008384705, -1...
func (g *GitLocal) Remotes(dir string) ([]string, error) { return g.GitCLI.Remotes(dir) }
[ -0.5411221385002136, -0.11857043206691742, 0.24242866039276123, -0.7687010169029236, -0.4208550453186035, 0.3585022985935211, -1.0778971910476685, -0.305848091840744, 0.12098468840122223, 0.6198974847793579, -0.6539819836616516, 1.180398941040039, -0.6699544191360474, -0.11770205199718475,...
func (g *GitLocal) StashPop(dir string) error { return g.GitCLI.StashPop(dir) }
[ 0.09756176918745041, 0.8147134780883789, 0.40353384613990784, 0.12393680214881897, -0.8055692315101624, 0.37458673119544983, 0.8603523373603821, -0.19875547289848328, -0.18121418356895447, 1.5169039964675903, -0.33587661385536194, -0.428974986076355, 0.0768260806798935, -0.3992751836776733...
func (g *GitLocal) GetCommitsNotOnAnyRemote(dir string, branch string) ([]GitCommit, error) { return g.GitCLI.GetCommitsNotOnAnyRemote(dir, branch) }
[ 0.21876615285873413, -0.6912925839424133, 0.49182602763175964, 0.2576839029788971, -0.023049933835864067, 0.0648844912648201, -1.3377240896224976, -0.8117830753326416, -1.1182361841201782, 0.08983603864908218, -1.0233542919158936, 0.4435112476348877, -1.061700701713562, 0.9231084585189819,...
func (g *GitLocal) CherryPick(dir string, commit string) error { return g.GitCLI.CherryPick(dir, commit) }
[ 1.7269424200057983, 0.43748173117637634, 0.04261166974902153, -0.4758302867412567, 0.7083063721656799, 0.2953721582889557, 0.5288835167884827, 0.14492584764957428, -0.6322997212409973, 0.7475515007972717, 0.1148659810423851, 1.1415156126022339, -0.020418422296643257, -0.234977126121521, ...
func (g *GitLocal) CherryPickTheirs(dir string, commit string) error { return g.GitCLI.CherryPickTheirs(dir, commit) }
[ 1.114123821258545, 0.558289110660553, -0.045312847942113876, -0.49376988410949707, 0.4402743875980377, -0.39009377360343933, -0.18595436215400696, -0.007513557095080614, -0.9645084142684937, 1.1239550113677979, -0.22393493354320526, 0.21168486773967743, -0.3241640329360962, 0.1410597264766...
func (g *GitLocal) CherryPickTheirsKeepRedundantCommits(dir string, commit string) error { return g.GitCLI.CherryPickTheirsKeepRedundantCommits(dir, commit) }
[ 1.0402748584747314, 0.29974159598350525, 0.3107926845550537, -1.3053886890411377, 0.06237240508198738, -0.2182472050189972, 0.4285666048526764, 0.495644211769104, -0.5729419589042664, 0.11295390129089355, 0.5451428294181824, 0.8251215219497681, 0.07611598074436188, 0.15452781319618225, -...
func (g *GitLocal) Describe(dir string, contains bool, commitish string, abbrev string, fallback bool) (string, string, error) { return g.GitCLI.Describe(dir, false, commitish, abbrev, fallback) }
[ 0.5571693181991577, 0.49686184525489807, 0.2571549117565155, -1.017201542854309, -0.10944979637861252, -0.16023336350917816, -0.584480345249176, 0.15644840896129608, -0.5126194953918457, 0.2878786623477936, 0.07666963338851929, 0.7501518726348877, -0.499135285615921, 0.5781654715538025, ...
func (g *GitLocal) IsAncestor(dir string, possibleAncestor string, commitish string) (bool, error) { return g.GitCLI.IsAncestor(dir, possibleAncestor, commitish) }
[ -0.5082306265830994, -0.06535255908966064, 0.24326105415821075, -0.2763165533542633, -1.2882682085037231, -0.0933840423822403, -0.6768379807472229, 0.4621969759464264, -0.166779026389122, 0.18521499633789062, 0.47363945841789246, 0.7495661973953247, -0.36185574531555176, 0.5570858120918274...
func (g *GitLocal) WriteRepoAttributes(dir string, content string) error { return g.GitCLI.WriteRepoAttributes(dir, content) }
[ -0.9408291578292847, 0.2251605987548828, 0.12435980886220932, -1.0880261659622192, 0.37196096777915955, 0.4610057473182678, 0.49804767966270447, 1.1401373147964478, -0.6576979756355286, 0.2623015344142914, -0.6594210863113403, -1.059495210647583, -0.3824287950992584, -0.15465283393859863, ...
func (g *GitLocal) ReadRepoAttributes(dir string) (string, error) { return g.GitCLI.ReadRepoAttributes(dir) }
[ -1.534708023071289, 0.15274493396282196, 0.4936511814594269, -0.15349328517913818, -1.5356806516647339, -0.32152020931243896, 0.007613072171807289, 0.5696225762367249, -0.7541678547859192, 0.5064138174057007, -0.04697222262620926, -0.06114817410707474, -0.8330718278884888, -0.1338452696800...
func Run(paths []string, overwrite bool) error { for _, path := range paths { if err := run(path, overwrite); err != nil { return err } } return nil }
[ -0.42918941378593445, 0.12256385385990143, 0.4136787950992584, 1.1621915102005005, 0.9985871315002441, 0.20400647819042206, 0.7298861145973206, 0.108118437230587, -0.5419790148735046, -0.25250184535980225, 0.15285177528858185, -0.9231532216072083, -0.513126790523529, 0.7616756558418274, ...
func run(path string, overwrite bool) error { fi, err := os.Stat(path) if err != nil { return err } // Look for a .gunkconfig absPath, _ := filepath.Abs(path) cfg, err := config.Load(filepath.Dir(absPath)) var cfgProtocPath, cfgProtocVer, importPath string if err == nil { importPath = filepath.Join(cfg.Dir,...
[ -0.3794209361076355, -0.31853586435317993, 1.0719703435897827, 0.41913560032844543, 0.16721312701702118, -0.4368983209133148, 0.903951108455658, 0.09927153587341309, -0.39042502641677856, 0.09013853222131729, 0.2769671380519867, -0.17369289696216583, -0.6760987639427185, 0.7152078151702881...
func convertFile(path string, overwrite bool, importPath string, protocPath string) error { if filepath.Ext(path) != ".proto" { return fmt.Errorf("convert requires a .proto file") } file, err := os.Open(path) if err != nil { return fmt.Errorf("unable to read file %q: %v", path, err) } defer file.Close() file...
[ 0.3489901125431061, -0.13693958520889282, 0.7822669744491577, -0.014663614332675934, 0.6571527123451233, -0.06630462408065796, 0.6913028359413147, -0.0010514871682971716, -0.8391264081001282, 0.42705971002578735, 0.05956253781914711, 0.22688017785549164, -0.5702019333839417, 0.135935053229...
func CompareFiles(file1, file2 string) (bool, error) { size := 1024 * 4 buffer1, buffer2 := make([]byte, size), make([]byte, size) f1, err := os.Open(file1) if err != nil { return false, err } defer utils.CloseQuietly(f1) f2, err := os.Open(file2) if err != nil { return false, err } defer utils.CloseQui...
[ 0.24022705852985382, -0.14633378386497498, 1.2017617225646973, -0.14311426877975464, 0.24772657454013824, 0.9347985982894897, -0.3670828342437744, -0.03360385075211525, -0.6299557685852051, 0.1712181717157364, -0.09053156524896622, 0.24020527303218842, -0.770781397819519, 0.169696480035781...
func FindFilesIn(dirname string) []string { var list []string walkFunc := func(path string, info os.FileInfo, err error) error { if err != nil { return err } if !info.IsDir() { p, err := filepath.Rel(dirname, path) if err != nil { return err } list = append(list, p) return nil } retur...
[ -0.017325276508927345, -0.0468202605843544, 0.7112334966659546, 0.47499996423721313, 0.20492145419120789, 0.21402372419834137, 0.5408861041069031, -0.2805968225002289, -0.24515371024608612, -0.09549587219953537, 0.14914238452911377, 0.009584425017237663, -1.3754481077194214, 1.106030583381...
func FindFilesFiltering(dirname string, ignored []string) []string { var list []string walkFunc := func(path string, info os.FileInfo, err error) error { if err != nil { return err } if !info.IsDir() { for _, skip := range ignored { if strings.Contains(path, skip) { return nil } } p, e...
[ -0.19093871116638184, 0.2903207242488861, 0.8135533332824707, 0.12966516613960266, -0.33584320545196533, 0.4156770706176758, 0.6173283457756042, -0.41135382652282715, -0.3087511956691742, 0.7317348718643188, 0.35464704036712646, 0.024193644523620605, -1.255282998085022, 0.6090251207351685,...
func InitRoutes(router *mux.Router) *mux.Router { logger = log.Logger("apps.app") appRouter := router.PathPrefix("/v1/cloud").Subrouter() appRouter.Use(format.FormatResponseMiddleware) appRouter.HandleFunc("/region", getRegion).Methods("GET") appRouter.HandleFunc("/region", createRegion).Methods("POST") appRouter...
[ 0.489812970161438, 0.7269356846809387, 0.6386852264404297, 0.38775527477264404, 0.2537210285663605, 0.28011152148246765, -0.43260785937309265, -0.1873117983341217, 0.04826299846172333, -0.14662252366542816, 0.12446583062410355, 0.09415551275014877, 0.15324492752552032, 0.7584259510040283, ...
func (m *Metric) Catalog() *Catalog { return m.source.origin.catalog }
[ 1.3890869617462158, 0.27437376976013184, 0.22583355009555817, -0.004570687655359507, -1.4135628938674927, 1.0078697204589844, 0.8670746684074402, 0.038713134825229645, -0.45455217361450195, -0.9332183599472046, 1.3343698978424072, 1.0496265888214111, 1.0214499235153198, -0.6240243911743164...
func (m *Metric) Origin() *Origin { return m.source.origin }
[ 0.8495088815689087, -0.26753780245780945, 0.09840598702430725, 0.2896953225135803, -0.08153972774744034, 1.1091656684875488, 0.8201674818992615, 0.5895577669143677, -0.0997481495141983, -0.546170175075531, 0.17933772504329681, 0.9805583357810974, 0.44069167971611023, -0.3093825876712799, ...
func (m *Metric) Source() *Source { return m.source }
[ 0.5539265871047974, 0.6711661219596863, -0.386367529630661, 0.945115327835083, -0.6914684772491455, 1.1918504238128662, 1.4739990234375, -0.3694014847278595, -0.22136253118515015, -0.3756434917449951, 0.28487449884414673, 0.42135778069496155, -0.2510451376438141, -0.127287358045578, -0.2...
func (store *DBStore) GetUnassignedBoxes() ([]*entity.Box, error) { var boxes []*entity.Box store.DB.Where("face_id = 0").Find(&boxes) return boxes, nil }
[ -0.507949709892273, 0.4783412218093872, 0.5073651671409607, 0.4761725664138794, 0.4852708578109741, -0.05116536468267441, -0.2782341539859772, -0.23363278806209564, -0.15346254408359528, -0.42239078879356384, -0.3876344859600067, -0.4885500371456146, -0.6938599944114685, 1.401820182800293,...
func (store *DBStore) DeleteBox(box entity.Box) error { boxFilePath := "./photo_storage/boxes/" + box.FilePath err := os.Remove(boxFilePath) if err != nil { panic(err) return err } store.DB.Delete(&entity.Box{}, box.ID) return nil }
[ -0.11408247798681259, 0.5641447901725769, 0.3087339401245117, -0.11500536650419235, 0.17867432534694672, 0.6448830366134644, 0.6399962902069092, 0.11141231656074524, 0.669561505317688, -1.4472978115081787, -0.2414735108613968, -0.10644744336605072, 0.37222519516944885, 1.3039425611495972, ...
func (store *DBStore) AssignFaceToBox(boxID int, faceName string) (entity.Box, error) { var box entity.Box store.DB.Preload(clause.Associations).First(&box, boxID) var newFace entity.Face result := store.DB.Where("name = ?", faceName).First(&newFace) if errors.Is(result.Error, gorm.ErrRecordNotFound) { newFace...
[ -1.0334067344665527, -0.6485258340835571, 0.5517427325248718, -0.2796282172203064, 0.19158391654491425, -0.4120355546474457, 0.2791639268398285, -0.8731531500816345, -0.46458831429481506, 0.3913944959640503, -0.16349133849143982, -0.1989113986492157, -0.15592814981937408, 0.973462879657745...
func New() UID { return UID{ NullUUID: uuid.NullUUID{UUID: uuid.New(), Valid: true}, } }
[ 0.3115586042404175, -1.2834306955337524, 0.18542546033859253, 0.5231468081474304, -0.7665201425552368, 0.40729960799217224, -0.08179425448179245, 1.7171882390975952, 0.6448501348495483, -0.9775571227073669, 0.3392406702041626, 0.6352676749229431, 0.3768128752708435, 0.04251435026526451, ...
func (u UID) IsNull() bool { return !u.Valid }
[ -0.21309740841388702, -0.5542516708374023, 0.26261332631111145, 0.843876302242279, -0.6637317538261414, 0.46625518798828125, -0.6481572389602661, 0.4433804154396057, 1.8022922277450562, -0.5750419497489929, -0.22409747540950775, 1.3370789289474487, -0.2612951397895813, 0.49243593215942383,...
func FromString(id string) (UID, error) { uid, err := uuid.Parse(id) if err != nil { return UID{}, err } return UID{ NullUUID: uuid.NullUUID{UUID: uid, Valid: true}, }, nil }
[ 0.2807026207447052, -1.4352085590362549, 0.27401450276374817, -0.16915187239646912, -1.3078337907791138, 0.6201282143592834, -0.36092624068260193, 0.9843090772628784, 1.0265412330627441, 0.232211172580719, -0.03763273358345032, 0.3796843886375427, -0.2698993980884552, -1.1010977029800415, ...
func (u UID) String() string { if u.Valid { return u.UUID.String() } return "null" }
[ -0.020401496440172195, -0.7815244197845459, 0.16984446346759796, 0.04311273619532585, -1.0139819383621216, 0.7032126784324646, 0.168069988489151, -0.22126984596252441, 1.7997291088104248, -0.40742915868759155, 0.39472079277038574, 0.6433257460594177, -0.3045392334461212, -0.713264226913452...
func (u UID) Equals(uid UID) bool { return u.String() == uid.String() }
[ -0.3738248348236084, -1.3803967237472534, 0.005624523386359215, -0.49696850776672363, -0.06790775805711746, 0.34958696365356445, -0.9350395202636719, 0.4053996205329895, 1.6125338077545166, -0.6993005275726318, -0.3523849844932556, 1.5326287746429443, -0.5167449712753296, 0.110277041792869...
func (u *UID) UnmarshalJSON(data []byte) error { // treat empty strings as null if len(data) == 0 || string(data) == "" || string(data) == "\"\"" || string(data) == "\"null\"" { u.NullUUID = uuid.NullUUID{Valid: false} return nil } return json.Unmarshal(data, &u.NullUUID) }
[ -0.6479955315589905, -0.3130136728286743, 0.643220067024231, -0.9581776857376099, -1.4052077531814575, 0.06372571736574173, 0.07132251560688019, 0.9625052809715271, 1.440341830253601, -0.23906341195106506, 0.21239449083805084, 0.758830189704895, -1.0011818408966064, 0.317423015832901, 0....
func (bs *blobDescriptorService) Stat(ctx context.Context, dgst digest.Digest) (distribution.Descriptor, error) { dcontext.GetLogger(ctx).Debugf("(*blobDescriptorService).Stat: starting with digest=%s", dgst.String()) // if there is a repo layer link, return its descriptor desc, err := bs.BlobDescriptorService.Stat...
[ 0.46159398555755615, -0.34509697556495667, 0.5552599430084229, -0.9580190181732178, 0.34769517183303833, -0.6141221523284912, 0.2894241213798523, -0.5981816649436951, 0.08981779962778091, -0.14858317375183105, 0.5853890776634216, 1.021538496017456, -0.34943780303001404, 1.2078015804290771,...
func DurationToTz(d time.Duration, sampleRate Tz) Tz { return Tz(d * time.Duration(sampleRate) / time.Second) }
[ 0.2277321070432663, -0.11154699325561523, 0.2339017242193222, 0.8068089485168457, -0.44953420758247375, -0.0413861908018589, 0.9782576560974121, -0.6850663423538208, 0.9177479147911072, 0.904304027557373, -0.31390199065208435, -0.01169391069561243, 1.1539602279663086, -0.10813556611537933,...
func CommitOrRollback(tx *sqlx.Tx, sugar *zap.SugaredLogger, err *error) { var logger = sugar.With("func", caller.GetCurrentFunctionName()) if *err == nil { if cErr := tx.Commit(); cErr != nil { *err = fmt.Errorf("failed to commit transaction: %v", cErr) } return } logger.Debugw("rolling back transaction...
[ -0.23586240410804749, -0.3422399163246155, 1.0211164951324463, -0.41060692071914673, -0.277597039937973, -0.48935094475746155, 0.5312412977218628, 0.30291563272476196, 0.15229815244674683, 1.2331976890563965, 1.013232946395874, 0.1473674476146698, -0.22798000276088715, -0.20635604858398438...
func Fuzzing(c *checker.CheckRequest) checker.CheckResult { rawData, err := raw.Fuzzing(c) if err != nil { e := sce.WithMessage(sce.ErrScorecardInternal, err.Error()) return checker.CreateRuntimeErrorResult(CheckFuzzing, e) } // Set the raw results. pRawResults := getRawResults(c) pRawResults.FuzzingResults ...
[ -0.41550153493881226, 0.29391446709632874, 0.6114832162857056, 0.2065199464559555, 0.8187985420227051, -0.35214078426361084, 0.4124644994735718, -0.29933395981788635, 0.18179155886173248, 0.016921138390898705, 0.19344234466552734, 0.2563934922218323, -0.46279338002204895, 0.639185845851898...
func Sort(arr []int) []int { res := []int{} var wg sync.WaitGroup for _, v := range arr { wg.Add(1) go func() { defer wg.Done() time.Sleep(time.Duration(v) * time.Second) }() res = append(res, v) } wg.Wait() return res }
[ -0.6734175086021423, 0.4758491814136505, 0.6787035465240479, 0.33009493350982666, -0.978262186050415, -0.0689651295542717, 0.6992182731628418, -1.3680603504180908, -0.19279752671718597, 0.31904318928718567, -0.08954299241304398, 0.22295770049095154, -0.7637014389038086, 1.2850877046585083,...
func makeFlatTree(om orbitMap) flatTree { ft := make(flatTree, len(om)) var buildTree func(string, uint, *tree) *tree buildTree = func(label string, depth uint, parent *tree) *tree { t := tree{ label: label, children: make([]*tree, 0, len(om[label])), depth: depth, parent: parent, } for i ...
[ -0.2502385675907135, -0.3172646164894104, 0.5993424654006958, -0.7685534358024597, -1.153060793876648, 0.13556233048439026, -0.08889494836330414, -0.3407163918018341, 0.7371888160705566, -0.2970597743988037, 0.19373005628585815, -0.049142468720674515, -0.38559818267822266, 0.40110805630683...
func Solve(input string) (*solutions.Solution, error) { ft := makeFlatTree(parseInput(input)) return &solutions.Solution{Part1: part1(ft), Part2: part2(ft)}, nil }
[ -0.015899986028671265, -0.03467724472284317, 0.43903806805610657, 0.49472638964653015, -0.3283352255821228, -0.7092476487159729, 0.16307932138442993, -0.8351113200187683, -0.3160848021507263, -1.1517646312713623, -0.8965847492218018, -0.6483670473098755, -0.7547662258148193, -0.01164211425...
func (d Distribution) Name() string { return strings.Replace(d.ID, "-", "::", -1) }
[ -0.4589061439037323, -1.1796835660934448, 0.46075931191444397, -0.6149861812591553, -1.0143465995788574, 0.3420076072216034, -0.7467286586761475, 0.3010324537754059, -0.08810296654701233, 1.0128220319747925, -0.2067400962114334, -0.15702944993972778, 0.7830266356468201, -0.4374803602695465...
func (d Distribution) URL() string { return fmt.Sprintf("https://%s/pod/%s", htmlHost, d.Name()) }
[ -0.5629976391792297, -0.25542861223220825, 0.30091458559036255, -0.3148908019065857, 0.20063695311546326, 1.0113786458969116, -0.4611952602863312, 0.39826950430870056, -0.24526332318782806, 0.08370999991893768, 0.3334130048751831, 0.4339839816093445, 0.47325828671455383, 0.0162269100546836...
func SearchDistribution(q string) ([]Distribution, error) { body, err := request(fmt.Sprintf("%s?q=%s", APISearchDistribution, q)) if err != nil { fmt.Println("error at request search distribution.") return nil, err } var result SearchDistributionResult err = json.Unmarshal(body, &result) if err != nil { ...
[ -1.445035457611084, 0.04041916877031326, 0.6171907186508179, -0.1829167902469635, 0.4414311945438385, 0.03685475513339043, -0.10796530544757843, -0.5963484644889832, 0.43899261951446533, 0.34485313296318054, -0.010675571858882904, -0.09217951446771622, -0.7672538757324219, 0.75829994678497...
func (s *Client) Teardown(domain string) error { var teardownError APIError token := s.Token() req, err := http.NewRequest("DELETE", s.getURL(domain), nil) if err != nil { return err } req.SetBasicAuth("token", token) res, err := s.httpClient.Do(req) if err != nil { return err } decoder := json.NewDec...
[ -0.4870253801345825, 0.4784712493419647, 0.8078922629356384, -0.6275482773780823, 0.43321457505226135, 0.3413587510585785, 0.0023095174692571163, -0.5734429359436035, 0.6404932141304016, -0.021115686744451523, 0.0777609795331955, 1.482168197631836, -0.9046216011047363, -0.11730189621448517...
func (p *Plugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error { devs := make([]*pluginapi.Device, 0) // TODO implement a more sophisticated ways to find the number of GPU available // TODO register multiple GPUs per node if available devs = append(devs, &pluginapi.Device{ I...
[ -0.09110166877508163, -1.1260653734207153, 0.479041188955307, -0.13411208987236023, 1.0237948894500732, -0.7737571001052856, -0.20009858906269073, 0.030924437567591667, 1.519449234008789, -0.39504072070121765, -0.17431281507015228, 0.9849849343299866, 0.17923609912395477, 0.802112162113189...
func getModuleBranch(moduleName string, proj *model.Project) (string, error) { // find the module of the patch for _, module := range proj.Modules { if module.Name == moduleName { return module.Branch, nil } } return "", errors.Errorf("module '%s' unknown or not found", moduleName) }
[ 0.29439079761505127, -0.020804479718208313, 0.40621641278266907, -0.12428069859743118, -0.5139718055725098, 1.0060198307037354, 0.1194700375199318, -0.3695221543312073, 0.21281798183918, 0.30323565006256104, 0.27160489559173584, 1.183130145072937, -1.0568581819534302, 0.830011248588562, ...
func getProvider(id string) *provider { if mockGetProviderValue != nil { return mockGetProviderValue } p, _ := auth.GetProviderByConfigID(auth.ProviderConfigID{Type: providerType, ID: id}).(*provider) return p }
[ -0.94613116979599, 0.6372812986373901, 0.176863893866539, 0.9358094334602356, 0.07899333536624908, -0.20296764373779297, 0.35256335139274597, -0.3432062268257141, 1.2298778295516968, 0.08105529844760895, 0.15096263587474823, 0.41896525025367737, -0.25409698486328125, 0.3074057400226593, ...
func providerConfigID(pc *schema.OpenIDConnectAuthProvider) string { if pc.ConfigID != "" { return pc.ConfigID } data, err := json.Marshal(pc) if err != nil { panic(err) } b := sha256.Sum256(data) return base64.RawURLEncoding.EncodeToString(b[:16]) }
[ -0.7973388433456421, -0.23093731701374054, 0.36387479305267334, -0.2106807678937912, -0.7310778498649597, 0.1844022423028946, -0.508267343044281, 0.165312722325325, 0.5297909379005432, 1.5038443803787231, 0.008671601302921772, 0.11815043538808823, -0.6200172305107117, -0.10136144608259201,...
func GetSeedFromFile(seedFile string) (string, error) { f, err := os.Open(seedFile) if err != nil { return "", ErrCombind(ErrorOpenSeedFile, err) } defer f.Close() var buf bytes.Buffer _, err = io.Copy(&buf, f) if err != nil { return "", ErrCombind(ErrorToReadSeedFile, err) } seed := strings.Trim(strings....
[ 1.1849961280822754, -1.300013780593872, 0.5908329486846924, -0.1741267293691635, -0.7381273508071899, 1.1597596406936646, 0.8208398222923279, -0.020965134724974632, -0.2993171513080597, 0.3405057191848755, -0.1152784675359726, 0.3898400366306305, -0.328078031539917, -0.3779922425746918, ...
func (ws *WebServer) GetSeedFromDB(network string) (seed string, err error) { if network == "" { return "", ErrorNoNetwork } db := ws.nodeConfig.GetDB() if db == nil { return "", ErrorGetBoltDB } err = db.View(func(tx *bolt.Tx) error { rootBucket := tx.Bucket([]byte(config.CONFIG_BUCKET_NAME)) bucket :...
[ 0.2949613332748413, 0.17418675124645233, 0.6619287133216858, 0.10237031430006027, -0.3116758167743683, 0.39721351861953735, 0.5602752566337585, -0.3349669277667999, -0.14897847175598145, 0.20390473306179047, -0.2009805291891098, -0.18874996900558472, -1.1877073049545288, 0.3957198858261108...
func (ws *WebServer) SaveSeedToDB(seed, dbPath, network string) error { if network == "" { ws.log.Errorf("SaveSeedToDB:%s", ErrorNoNetwork) return ErrorNoNetwork } db := ws.nodeConfig.GetDB() if nil == db { ws.log.Errorf("SaveSeedToDB:%s", ErrorGetBoltDB) return ErrorGetBoltDB } err := db.Update(func(tx...
[ -0.09791146218776703, -0.2761376202106476, 0.9616934657096863, -0.005353991407901049, 1.0077934265136719, 0.6912745237350464, 1.4276574850082397, -0.5892240405082703, -0.03989696875214577, 0.3956703841686249, -1.0108771324157715, -0.3800767958164215, -0.5986167788505554, 0.3374124765396118...
func (ws *WebServer) LoadSavedAcct(dbPath, network string) (string, error) { seed, err := ws.GetSeedFromDB(network) if err != nil { ws.log.Errorf("LoadSavedAcct:%s", ErrCombind(ErrorBoltDBGetSeed, err)) return "", ErrCombind(ErrorBoltDBGetSeed, err) } if seed == "" { ws.log.Errorf("LoadSavedAcct:%s", ErrorGet...
[ 0.221241295337677, -0.44998717308044434, 0.9004116654396057, -0.297599196434021, -0.8679678440093994, -0.3267908990383148, 1.605988621711731, -0.023613572120666504, 0.5221400856971741, 0.42391303181648254, -0.057979099452495575, 0.023358654230833054, -0.1041361391544342, 0.1222927719354629...
func (ws *WebServer) NewAccount(c *gin.Context) { network := ws.nodeConfig.GetNetwork() if network == "" { ReturnError(c, 500, ErrorNoNetwork.Error()) return } n := sdk.Testnet if network == "bitmark" { n = sdk.Livenet } seedFile := filepath.Join(ws.rootPath, "bitmarkd", network, "proof.sign") if _, err :...
[ -0.15678852796554565, -0.7267369031906128, 0.8357296586036682, 0.5511443018913269, 0.4658505320549011, 0.07287929952144623, 1.6840537786483765, 0.24931073188781738, 0.16979928314685822, 0.1783955693244934, -0.23969779908657074, 0.3309578001499176, 0.08511892706155777, 0.9369792342185974, ...
func (ws *WebServer) GetRecoveryPhrase(c *gin.Context) { network := ws.nodeConfig.GetNetwork() if network == "" { ReturnError(c, 500, ErrorNoNetwork.Error()) return } seed, err := ws.GetSeed(network) if err != nil { //read from file seedFile := filepath.Join(ws.rootPath, "bitmarkd", network, "proof.sign") ...
[ -0.5909317135810852, 0.2271500527858734, 0.67645263671875, 0.27735477685928345, 0.011628685519099236, -0.10448334366083145, -0.13374300301074982, 0.2967948019504547, -0.25025373697280884, 0.9838419556617737, -0.03186097741127014, -0.29050666093826294, -0.973538339138031, 0.282840758562088,...
func (ws *WebServer) SetRecoveryPhrase(c *gin.Context) { network := ws.nodeConfig.GetNetwork() if network == "" { ReturnError(c, 500, ErrorNoNetwork.Error()) return } var args RecoveryPhraseArguments err := c.BindJSON(&args) if err != nil { ReturnError(c, 400, ErrorInvalidArgument.Error()) return } ws....
[ -0.31123313307762146, -0.39120975136756897, 0.7858836650848389, 0.14423955976963043, 0.04644867777824402, 0.010576014406979084, 1.196185827255249, 0.06025058031082153, 0.2767809331417084, 0.7314348220825195, -0.5648609399795532, -0.4617839455604553, -0.46920010447502136, 0.0157496239989995...
func (ws *WebServer) SaveAccount(c *gin.Context) { if err := ws.saveAcct(); nil != err { ReturnError(c, 500, ErrorSaveAccount.Error()) return } c.JSON(200, map[string]interface{}{ "ok": 1, }) return }
[ -1.3050428628921509, -0.5163637399673462, 0.7506831288337708, 1.0657678842544556, 0.875688910484314, 0.055174145847558975, 1.3547759056091309, 0.36894795298576355, 0.7360274791717529, 0.6762909889221191, -0.38192233443260193, 0.8989508748054504, -0.07850374281406403, 0.8222777843475342, ...
func (ws *WebServer) DeleteSavedAccount(c *gin.Context) { if err := ws.deleteSavedAcct(); err != nil { ReturnError(c, 500, ErrorDeleteSavedAccount.Error()) return } c.JSON(200, map[string]interface{}{ "ok": 1, }) return }
[ -0.15629513561725616, 0.10006319731473923, 0.8538460731506348, 0.9417520761489868, 0.11042631417512894, -0.09598953276872635, 1.139843463897705, 0.3171425759792328, 1.2213819026947021, 0.6918932795524597, -0.06541341543197632, 1.0689202547073364, 0.5540682077407837, 0.7469918727874756, 0...
func NewService(devices device.Datastore, cs command.Service) Service { return &service{ commands: cs, devices: devices, } }
[ 0.80413818359375, -0.039514899253845215, -0.05102067068219185, 0.9068556427955627, -0.3375929296016693, 0.32185623049736023, 0.0014326078817248344, 0.03562750667333603, 0.17437341809272766, -0.39239218831062317, 0.36933407187461853, 0.580907940864563, 0.13021886348724365, 0.620216012001037...
func (o *Knowledgedocumentbulkrequest) String() string { o.Categories = []Documentcategoryinput{{}} j, _ := json.Marshal(o) str, _ := strconv.Unquote(strings.Replace(strconv.Quote(string(j)), `\\u`, `\u`, -1)) return str }
[ -0.733423113822937, -0.6520907282829285, 0.2197486311197281, -0.433005690574646, -0.5989415049552917, -0.46412861347198486, -0.15929578244686127, -1.2119970321655273, -0.4162242114543915, 0.1537591516971588, 0.16199453175067902, 0.9409229755401611, -0.27202698588371277, -0.0294365137815475...
func vector(password string, length int) []byte { sum := sha256.Sum256([]byte(password)) return sum[:length] }
[ -0.19744902849197388, -0.5554173588752747, 0.475380539894104, -0.700954258441925, -0.09828682988882065, 0.20632316172122955, -0.025340165942907333, -0.04845908656716347, 0.6104661822319031, 0.9449658393859863, -1.3652911186218262, 0.5619403719902039, -0.5072857737541199, -1.159775733947754...
func (d *DynamicTranslation) Key() string { return translationKey(d.RealmID, d.Locale, d.MessageID) }
[ -0.12907736003398895, -0.3316189646720886, 0.2036924660205841, 0.18216672539710999, -0.01248867902904749, 0.6252242922782898, -0.21160346269607544, 0.06835190951824188, -0.8961485624313354, 0.6174454689025879, -0.010240340605378151, -0.13062509894371033, -0.1859225332736969, -0.12810051441...
func (db *Database) ListDynamicTranslationsCached(ctx context.Context, cacher cache.Cacher) ([]*DynamicTranslation, error) { if cacher == nil { return nil, fmt.Errorf("cacher cannot be nil") } var translations []*DynamicTranslation cacheKey := &cache.Key{ Namespace: "translations:dynamic", Key: "all", ...
[ -0.43774059414863586, 0.011115488596260548, 0.2584364414215088, 0.7030847668647766, -0.33500730991363525, -0.5568896532058716, -0.4751034677028656, -0.9159457683563232, -0.10215944051742554, 0.16637222468852997, -0.8588340282440186, 0.11314398050308228, 0.422972172498703, 1.048309922218322...
func (db *Database) ListDynamicTranslations() ([]*DynamicTranslation, error) { var translations []*DynamicTranslation if err := db.db. Model(&DynamicTranslation{}). Order("realm_id ASC, locale ASC, message_id ASC"). Find(&translations). Error; err != nil { return nil, err } return translations, nil }
[ -0.004005525726824999, -0.25762683153152466, 0.31572043895721436, 0.5286843776702881, 0.3269335925579071, -0.5949589014053345, 0.19781005382537842, -0.7016018033027649, -0.8817329406738281, 0.39204081892967224, -0.6823142766952515, 0.15518127381801605, -0.3551848828792572, 1.22124958038330...
func localeToLanguage(l string) string { l = strings.ToLower(l) if len(l) <= 2 { return l } return l[0:2] }
[ 0.3560154438018799, -0.7702186107635498, 0.3199714422225952, -0.35043495893478394, 0.19791826605796814, -0.6468219757080078, -0.20860889554023743, -0.07388074696063995, -0.015485016629099846, 0.35311850905418396, -0.1866578757762909, 0.24383331835269928, -0.4772288203239441, -0.61358201503...
func GetTestDB() (models.DB, error) { return models.GetDB("localhost", "khan_test", 5433, "disable", "khan_test", "") }
[ 0.736251711845398, 0.48070430755615234, 0.24804998934268951, 1.4218783378601074, 1.2119044065475464, 0.2595846354961395, 0.08556246757507324, 0.18108481168746948, 0.40198788046836853, 0.2272210270166397, 0.008208653889596462, 0.40627631545066833, -1.6942157745361328, -0.2077840268611908, ...
func GetFaultyTestDB() models.DB { faultyDb, _ := models.InitDb("localhost", "khan_tet", 5433, "disable", "khan_test", "") return faultyDb }
[ 0.8433554172515869, 0.2825357913970947, 0.11541377007961273, 0.7856692671775818, 0.5851801037788391, 0.22025151550769806, 0.08736947923898697, 0.34253010153770447, -0.2310047596693039, -0.35480424761772156, -0.8974437117576599, 0.255572110414505, -1.0603971481323242, 0.42018041014671326, ...
func SetUseTable(tb string) { globalUseTable = tb }
[ 0.31197547912597656, 0.2832943797111511, 0.4506427049636841, 0.2994444966316223, 0.26640403270721436, 0.30747127532958984, 1.380843997001648, -0.06068902835249901, -1.0973355770111084, 1.0028939247131348, -0.7479945421218872, 0.35283732414245605, -0.8843915462493896, 0.3305026888847351, ...
func RequireUseTable(run func(*Context) error) func(c *grumble.Context) error { grumbleRun := func(c *grumble.Context) error { if globalUseTable == "" { return fmt.Errorf("please USE a table first") } ctx := &Context{Context: c, UseTable: globalUseTable} return run(ctx) } return grumbleRun }
[ 0.016303835436701775, 0.6965509057044983, 0.6769067049026489, 0.509818971157074, 0.013354631140828133, 0.19044232368469238, 0.6742145419120789, -0.23821081221103668, -0.01670358143746853, 1.0779240131378174, 0.08187559992074966, 0.3721262216567993, -0.417751669883728, 0.9486410617828369, ...
func (sp *SyncProtocol) handleSyncStream(s net.Stream) { log.Println("\t\tGot a new stream!") // wrap stream for protobuf exchange ws := WrapStream(s) // go sp.ReadData(ws) err := sp.createInboundReader(ws) if err != nil { log.Println("unable to attach reader to inbound stream: ", err) } // go sp.WriteDat...
[ 0.5573377013206482, -0.27816468477249146, 0.6933721899986267, 0.4735732972621918, 0.11821313947439194, -0.06004377454519272, 0.43588218092918396, -0.32790738344192505, 0.5914286375045776, -0.8305397033691406, -0.2440725564956665, 0.49605175852775574, -0.3431437015533447, 0.5651487112045288...
func (sp *SyncProtocol) createInboundReader(ws *WrappedStream) error { // create stan connection with random client id sc, err := NSSConnection(nuid.Next()) if err != nil { return err } // launch the read loop, append received blocks to the local feed go func() { defer sc.Close() defer ws.stream.Close() ...
[ 0.3886639475822449, -1.0129806995391846, 1.0024646520614624, -0.10786641389131546, -0.20413917303085327, -0.09407421201467514, -0.25220462679862976, -0.8105828166007996, -0.4103880226612091, -0.11902618408203125, 0.5858516693115234, 1.1790478229522705, -0.9970491528511047, 0.92509979009628...
func (sp *SyncProtocol) createOutboundWriter(ws *WrappedStream) error { // create stan connection with random client id pid := string(ws.remotePeerID()) sc, err := NSSConnection(pid) if err != nil { return err } go func() { errc := make(chan error) defer close(errc) defer sc.Close() // main message s...
[ 0.12851858139038086, -0.19900421798229218, 0.9941617250442505, -0.2950030267238617, 0.0490323044359684, -0.5606547594070435, 0.5115907788276672, -0.4484345316886902, -0.6479539275169373, 0.3421502709388733, -0.021111709997057915, 0.6059145331382751, -0.8082888722419739, 1.298104166984558, ...
func receiveBlock(ws *WrappedStream) (*Block, error) { var block Block err := ws.dec.Decode(&block) if err != nil { return nil, errors.Wrap(err, "unable to read block from stream") } return &block, nil }
[ -0.07772757112979889, 0.28014856576919556, 0.7361211776733398, -0.47755539417266846, -0.7622168660163879, -0.12344520539045334, -0.574289858341217, -0.8722071051597595, 0.37169349193573, -0.7726678848266602, 0.22579863667488098, 0.6630048751831055, -0.2674347162246704, -0.03872679173946380...
func sendBlock(block *Block, ws *WrappedStream) error { defer func() { if r := recover(); r != nil { fmt.Println("recovered error in send block", r) } }() err := ws.enc.Encode(block) if err != nil { log.Printf("block encoding error:\n\n%v\n\n", block) return err } // Because output is buffered with b...
[ -0.2925337553024292, 0.529041051864624, 1.0611971616744995, 0.5596625804901123, -0.7607172131538391, -0.2717629671096802, 0.3557276725769043, -0.978565514087677, 0.44755834341049194, 0.3063063621520996, 0.10903757810592651, 1.3460373878479004, -0.5546058416366577, 0.7879886627197266, 0.0...
func genericCleanupResource( resourceName string, listFunc func() ([]interface{}, error), toStrFunc func(interface{}) string, deleteFunc func(interface{}) (int, error)) { fmt.Printf("Getting %s list ...\n", resourceName) all, err := listFunc() if err != nil { fmt.Printf("Failed getting %s list: %s\n", resourc...
[ -0.4076683819293976, -0.3128405511379242, 0.9240867495536804, -0.07070431858301163, 0.20096813142299652, -0.6428970694541931, 0.6502014994621277, 0.30328503251075745, 0.12679268419742584, -0.14425799250602722, 0.052265021950006485, 0.16285823285579681, 0.049656942486763, 0.6611682772636414...
func New(hugoExe string, docsyDir string, docPath string) *docsy { return &docsy{ hugoExe: hugoExe, docsyDir: docsyDir, docPath: docPath, renderMetric: metrics2.GetFloat64SummaryMetric("docsyserver_docsy_render"), } }
[ -0.560894250869751, 0.28690850734710693, 0.38432490825653076, -0.32369333505630493, -0.9640576243400574, -0.9182565212249756, 0.20332808792591095, -0.6578975319862366, -1.0440119504928589, -1.0506728887557983, 0.06178446114063263, 0.703538715839386, 0.3993951678276062, 0.7727155089378357, ...
func NewOp1(argLen int64, argModes []int64) *Op1 { return &Op1{ ArgLen: argLen, ArgModes: padMissingArgModes(argLen-1, argModes), } }
[ -0.62626713514328, -0.13029693067073822, 0.4772401452064514, 0.7875449657440186, -0.17109183967113495, 0.005692433565855026, 0.4207076132297516, -0.1976737529039383, -0.33881863951683044, 0.7921500205993652, 0.17101484537124634, 0.24561807513237, -0.4420308470726013, 0.29191267490386963, ...
func (op *Op1) Compute(pc *Computer, input int64) (int64, bool, error) { if err := checkMemoryRange(pc, op.ArgLen); err != nil { return 0, false, err } args := calculateArgModes(op.ArgLen-1, op.ArgModes, pc.ptr, pc.Memory) pc.Memory[pc.Memory[pc.ptr+3]] = args[0] + args[1] pc.ptr += op.ArgLen + 1 return 0, fals...
[ -1.2180713415145874, 0.78343266248703, 0.8739362955093384, 0.21657612919807434, -0.0898081511259079, 0.338573694229126, 0.7450351119041443, 0.7756208777427673, -0.09771661460399628, 1.394938349723816, -0.33516398072242737, 0.107542484998703, -1.2245792150497437, 0.13010425865650177, 0.62...
func NewOp2(argLen int64, argModes []int64) *Op2 { return &Op2{ ArgLen: argLen, ArgModes: padMissingArgModes(argLen-1, argModes), } }
[ -0.5955150723457336, -1.054128885269165, 0.4097314774990082, 0.3996477425098419, -0.6973870396614075, -0.4150249660015106, -0.3431164622306824, -0.6414597034454346, -0.6377649307250977, 0.19449865818023682, -0.1272914558649063, 0.21013635396957397, -0.07137402892112732, 0.6387407779693604,...
func (op *Op2) Compute(pc *Computer, input int64) (int64, bool, error) { if err := checkMemoryRange(pc, op.ArgLen); err != nil { return 0, false, err } args := calculateArgModes(op.ArgLen-1, op.ArgModes, pc.ptr, pc.Memory) pc.Memory[pc.Memory[pc.ptr+3]] = args[0] * args[1] pc.ptr += op.ArgLen + 1 return 0, fals...
[ -1.133680820465088, 0.4959162175655365, 0.865707278251648, 0.06279460340738297, -0.18921314179897308, 0.0366097092628479, 0.5200982093811035, 0.6410980224609375, -0.18704546988010406, 1.1314070224761963, -0.5036618709564209, 0.19165678322315216, -1.1135778427124023, 0.20498104393482208, ...
func NewOp3(argLen int64) *Op3 { return &Op3{ ArgLen: argLen, } }
[ -1.0077465772628784, 0.1322714239358902, 0.32655683159828186, 0.5260409712791443, -0.7528191804885864, -0.0065471818670630455, -0.4583539068698883, -0.6296187043190002, 0.8296828866004944, -0.11907137185335159, -0.15840651094913483, -0.09375465661287308, -0.20347194373607635, -0.2777879834...
func (op *Op3) Compute(pc *Computer, input int64) (int64, bool, error) { if err := checkMemoryRange(pc, op.ArgLen); err != nil { return 0, false, err } pc.Memory[pc.Memory[pc.ptr+1]] = input pc.ptr += op.ArgLen + 1 return 0, false, nil }
[ -0.996931791305542, 0.9213876128196716, 0.8667586445808411, 0.13358016312122345, -0.02496328018605709, 0.6536155939102173, 0.658710241317749, 0.5241670608520508, 0.2511298954486847, 1.0015846490859985, -0.35363534092903137, -0.0037275494541972876, -1.3855535984039307, -0.07706021517515182,...
func NewOp4(argLen int64, argModes []int64) *Op4 { return &Op4{ ArgLen: argLen, ArgModes: padMissingArgModes(argLen, argModes), } }
[ -0.19280236959457397, -0.7042338252067566, 0.367382287979126, 0.09853915870189667, 0.175432950258255, -0.5202834606170654, 0.09241171926259995, -0.8048943877220154, -0.41889119148254395, 0.10297998040914536, -0.05839013680815697, -0.5363652110099792, -0.7797274589538574, 0.4352597594261169...
func (op *Op4) Compute(pc *Computer, input int64) (int64, bool, error) { if err := checkMemoryRange(pc, op.ArgLen); err != nil { return 0, false, err } args := calculateArgModes(op.ArgLen, op.ArgModes, pc.ptr, pc.Memory) pc.ptr += op.ArgLen + 1 return args[0], true, nil }
[ -1.1147968769073486, 0.7101471424102783, 0.8329491019248962, 0.26759907603263855, -0.10958663374185562, -0.14891383051872253, 0.71391761302948, 0.5819819569587708, -0.20156461000442505, 1.1020750999450684, -0.2633589804172516, -0.2666514813899994, -1.3729581832885742, 0.3976134955883026, ...
func NewOp5(argLen int64, argModes []int64) *Op5 { return &Op5{ ArgLen: argLen, ArgModes: padMissingArgModes(argLen, argModes), } }
[ -0.5561301112174988, -0.43752923607826233, 0.23940415680408478, 0.24517562985420227, -0.2759643793106079, -0.3130156397819519, 0.5639617443084717, -0.7820106148719788, -0.6073683500289917, 0.4587465822696686, -0.34849613904953003, -0.12446480989456177, -0.5999221205711365, 0.31408590078353...
func (op *Op5) Compute(pc *Computer, input int64) (int64, bool, error) { if err := checkMemoryRange(pc, op.ArgLen); err != nil { return 0, false, err } args := calculateArgModes(op.ArgLen, op.ArgModes, pc.ptr, pc.Memory) if args[0] != 0 { pc.ptr = args[1] } else { pc.ptr += op.ArgLen + 1 } return 0, false,...
[ -1.1769074201583862, 0.6518298387527466, 0.8111755847930908, 0.1999288648366928, -0.1627943515777588, 0.027095532044768333, 1.0401005744934082, 0.4296143352985382, -0.27986574172973633, 1.2365025281906128, -0.34941649436950684, -0.23563583195209503, -1.2968363761901855, 0.6381657123565674,...
func NewOp6(argLen int64, argModes []int64) *Op6 { return &Op6{ ArgLen: argLen, ArgModes: padMissingArgModes(argLen, argModes), } }
[ -0.3399345874786377, -0.7621363997459412, 0.22341878712177277, 0.42587345838546753, 0.2343212068080902, -0.6734690070152283, 0.059501778334379196, -0.5899368524551392, 0.0655844584107399, 0.5272068381309509, -0.3782566487789154, -0.3523569405078888, -0.19411419332027435, 0.2671351134777069...
func (op *Op6) Compute(pc *Computer, input int64) (int64, bool, error) { if err := checkMemoryRange(pc, op.ArgLen); err != nil { return 0, false, err } args := calculateArgModes(op.ArgLen, op.ArgModes, pc.ptr, pc.Memory) if args[0] == 0 { pc.ptr = args[1] } else { pc.ptr += op.ArgLen + 1 } return 0, false,...
[ -0.9833759665489197, 0.4440525472164154, 0.7909708023071289, 0.306727796792984, 0.05964212119579315, -0.1793084442615509, 0.6617087125778198, 0.600471556186676, 0.022867154330015182, 1.1470578908920288, -0.20354530215263367, -0.2582974135875702, -1.0346113443374634, 0.5205206871032715, 0...
func NewOp7(argLen int64, argModes []int64) *Op7 { return &Op7{ ArgLen: argLen, ArgModes: padMissingArgModes(argLen, argModes), } }
[ 0.06389930099248886, -0.13129031658172607, 0.34596356749534607, 0.18626073002815247, -0.15389534831047058, -0.3622457981109619, -0.2567340135574341, -0.33725401759147644, -0.19318105280399323, 0.15199264883995056, 0.6537613868713379, -0.2727743685245514, 0.3224174976348877, 0.4081457555294...
func (op *Op7) Compute(pc *Computer, input int64) (int64, bool, error) { if err := checkMemoryRange(pc, op.ArgLen); err != nil { return 0, false, err } args := calculateArgModes(op.ArgLen, op.ArgModes, pc.ptr, pc.Memory) if args[0] < args[1] { pc.Memory[pc.Memory[pc.ptr+3]] = 1 } else { pc.Memory[pc.Memory[p...
[ -0.9743332862854004, 0.7249919772148132, 0.9243826270103455, 0.0413021594285965, -0.03173495829105377, 0.13152086734771729, 0.5624860525131226, 0.6009658575057983, 0.02223118394613266, 1.1466947793960571, -0.07062716037034988, -0.09454244375228882, -1.0676233768463135, 0.547112226486206, ...
func NewOp8(argLen int64, argModes []int64) *Op8 { return &Op8{ ArgLen: argLen, ArgModes: padMissingArgModes(argLen, argModes), } }
[ -0.7316731214523315, -0.3248337209224701, 0.07885764539241791, 0.4758262038230896, -0.052131202071905136, -0.026733333244919777, 0.007529743481427431, -0.3822026550769806, 0.17388087511062622, 0.3753296732902527, 0.4556010067462921, -0.0808415338397026, -0.4425421357154846, 0.3255533576011...
func (op *Op8) Compute(pc *Computer, input int64) (int64, bool, error) { if err := checkMemoryRange(pc, op.ArgLen); err != nil { return 0, false, err } args := calculateArgModes(op.ArgLen, op.ArgModes, pc.ptr, pc.Memory) if args[0] == args[1] { pc.Memory[pc.Memory[pc.ptr+3]] = 1 } else { pc.Memory[pc.Memory[...
[ -1.3148069381713867, 0.6775470972061157, 0.8158056735992432, -0.013656754978001118, 0.10527551174163818, -0.012724552303552628, 0.6925835609436035, 0.6373609900474548, 0.31789466738700867, 1.3589270114898682, -0.1063804179430008, 0.11047080904245377, -1.2208832502365112, 0.3406988084316253...
func NewOp99() *Op99 { return &Op99{0} }
[ 0.8705140948295593, -0.47266578674316406, -0.0581025667488575, 0.6415984034538269, -0.5341238379478455, -1.1671981811523438, 0.5378446578979492, -0.5714187622070312, 1.0957350730895996, -0.567269504070282, 0.3136756420135498, -0.6547811627388, 0.13702698051929474, -0.5816821455955505, 0....
func (op *Op99) Compute(pc *Computer, input int64) (int64, bool, error) { pc.Halted = true return 0, false, nil }
[ -0.41743743419647217, 0.9138706922531128, 0.6594768166542053, 0.7617184519767761, 0.09285282343626022, 0.6998776197433472, 0.9963244795799255, 0.7967050075531006, -0.18789419531822205, 0.6837406158447266, -0.1922864019870758, -1.0465399026870728, -1.064017415046692, -0.034188203513622284, ...
func GenerateK3OSConfig(path string, cfg *model.HCloudK3OSConfig) (err error) { type k3osCfg struct { SSHAuthorizedKeys []string `yaml:"ssh_authorized_keys"` K3OS struct { ServerURL *string `yaml:"server_url,omitempty"` Token string `yaml:"token"` K3SArgs []string `yaml:"k3s_args"` ...
[ 0.07724372297525406, 0.17755411565303802, 0.7914514541625977, -0.22118711471557617, -0.4921453297138214, 0.5861765146255493, -0.9867854714393616, 0.7875657081604004, -0.29277098178863525, 0.9425094127655029, -1.0449705123901367, -0.30721354484558105, 0.14607933163642883, 0.2843412756919861...
func Path(src string) string { if web.IsDev { return "/asset/file/" + src } file, ok := files[src] if !ok { return "" } return "/asset/hashed/" + file.digest + "/" + src }
[ 0.04798073321580887, 0.2227986454963684, 0.28734344244003296, -0.2956574857234955, -0.7298063635826111, 0.773856520652771, 0.6742420196533203, -1.0857242345809937, 0.35563230514526367, -0.013956083916127682, 0.7256189584732056, -0.7270890474319458, -0.05529721826314926, 0.6552761793136597,...
func RegisterHandlers() { if web.IsDev { web.HandleGet("/asset/file/*", serveDevFile) } else { web.HandleGet("/asset/file/*", serveFile) } web.HandleGet("/asset/hashed/:digest/*", serveHashed, web.PublicCache(240*time.Hour)) }
[ -0.28416645526885986, 0.5188139081001282, 0.5165112614631653, 0.44083109498023987, 1.267808198928833, 0.29438668489456177, -0.05556439608335495, -0.02253955416381359, -0.8538097739219666, -0.8174384832382202, 0.26203203201293945, -0.03266194835305214, -0.41394832730293274, 0.45363250374794...