text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (bot *ExchangeBot) ConvertedState(code string) (*ExchangeBotState, error) {
bot.RLock()
defer bot.RUnlock()
fiatIndices := make(map[string]*ExchangeState)
for token, indices := range bot.indexMap {
for symbol, price := range indices {
if symbol == code {
fiatIndices[token] = &ExchangeState{Price: pric... | [
-0.7758991122245789,
0.1477591097354889,
0.7932330965995789,
-0.7364747524261475,
-0.17944085597991943,
-0.4523088335990906,
-0.4197983741760254,
-0.3933332562446594,
0.7637608051300049,
0.07542183250188828,
-0.3747909367084503,
0.06649482995271683,
-0.4843845069408417,
-0.2729294598102569... |
func (bot *ExchangeBot) StateBytes() []byte {
bot.RLock()
defer bot.RUnlock()
return bot.currentStateBytes
} | [
-1.0338600873947144,
0.1766202747821808,
0.41154295206069946,
0.36898696422576904,
-0.4204687476158142,
0.20072481036186218,
-0.5389389991760254,
-0.5475382208824158,
0.5274089574813843,
0.2937999665737152,
-0.36453619599342346,
0.5557184815406799,
-2.093076705932617,
0.30923348665237427,
... |
func (bot *ExchangeBot) ConvertedStateBytes(symbol string) ([]byte, error) {
state, err := bot.ConvertedState(symbol)
if err != nil {
return nil, err
}
var jsonBytes []byte
if bot.config.Indent {
jsonBytes, err = json.MarshalIndent(state, "", " ")
} else {
jsonBytes, err = json.Marshal(state)
}
if err ... | [
-1.1991194486618042,
-0.09980681538581848,
0.6925952434539795,
-0.46136772632598877,
-0.9994198679924011,
0.005485410336405039,
-0.5705153942108154,
-0.4938698410987854,
1.1569468975067139,
0.11320765316486359,
-0.81053626537323,
0.7296963334083557,
-0.5934613347053528,
0.5636322498321533,... |
func (bot *ExchangeBot) AvailableIndices() []string {
bot.RLock()
defer bot.RUnlock()
var indices sort.StringSlice
add := func(index string) {
for _, symbol := range indices {
if symbol == index {
return
}
}
indices = append(indices, index)
}
for _, fiatIndices := range bot.indexMap {
for symbol... | [
-1.4323371648788452,
-0.5373547673225403,
0.11841709166765213,
-0.28635674715042114,
-0.30879926681518555,
0.0901780053973198,
0.08854550123214722,
0.19891491532325745,
0.7805817127227783,
0.6305937170982361,
0.30810245871543884,
0.7699732184410095,
-0.6788791418075562,
0.14110122621059418... |
func (bot *ExchangeBot) processState(states map[string]*ExchangeState, volumeAveraged bool) (float64, float64) {
var priceAccumulator, volSum float64
var deletions []string
oldestValid := time.Now().Add(-bot.RequestExpiry)
for token, state := range states {
if bot.Exchanges[token].LastUpdate().Before(oldestValid)... | [
-0.19946549832820892,
-0.3926539719104767,
0.6768084168434143,
-0.7040297985076904,
-0.14673401415348053,
-0.5777245759963989,
-0.40380871295928955,
0.19402647018432617,
0.501207709312439,
0.838421642780304,
0.9896807670593262,
-0.28422167897224426,
0.22825327515602112,
0.10021413862705231... |
func (bot *ExchangeBot) updateExchange(update *ExchangeUpdate) error {
bot.Lock()
defer bot.Unlock()
bot.currentState.DcrBtc[update.Token] = update.State
return bot.updateState()
} | [
-0.9205098748207092,
-0.46195024251937866,
0.4572893977165222,
0.16701310873031616,
-0.3646526336669922,
0.23190838098526,
-1.5376266241073608,
0.30514419078826904,
0.4773962199687958,
0.266107439994812,
-0.5333645939826965,
-0.1453578621149063,
-1.287574291229248,
0.43465420603752136,
0... |
func (bot *ExchangeBot) updateIndices(update *IndexUpdate) error {
bot.Lock()
defer bot.Unlock()
bot.indexMap[update.Token] = update.Indices
price, hasCode := update.Indices[bot.config.BtcIndex]
if hasCode {
bot.currentState.FiatIndices[update.Token] = &ExchangeState{
Price: price,
Stamp: time.Now().Unix()... | [
-1.9252458810806274,
-0.1906379759311676,
0.3363794982433319,
-0.2508978247642517,
-0.4696137607097626,
-0.38573575019836426,
-0.7056416869163513,
0.780564546585083,
0.5623692870140076,
0.5675620436668396,
-0.19131438434123993,
-0.2857305705547333,
-1.0251072645187378,
-0.339943528175354,
... |
func (bot *ExchangeBot) updateState() error {
dcrPrice, volume := bot.processState(bot.currentState.DcrBtc, true)
btcPrice, _ := bot.processState(bot.currentState.FiatIndices, false)
if dcrPrice == 0 || btcPrice == 0 {
bot.failed = true
bot.stateCopy = nil
return nil
}
bot.failed = false
bot.currentState.P... | [
-1.3149522542953491,
-0.5693874955177307,
0.7333040833473206,
-0.30071571469306946,
-0.38308942317962646,
-0.08205798268318176,
-0.39252203702926636,
-0.1593443602323532,
-0.10218627750873566,
0.7333145141601562,
-0.20629891753196716,
0.5001224875450134,
-0.8936499953269958,
0.051804095506... |
func (bot *ExchangeBot) IsFailed() bool {
bot.RLock()
defer bot.RUnlock()
return bot.failed
} | [
-0.8316637873649597,
0.7865163683891296,
0.31675928831100464,
0.11799544095993042,
0.20453786849975586,
0.3510506749153137,
-0.6415529847145081,
-0.2073061615228653,
0.666686475276947,
-0.4229013919830322,
-0.7873204946517944,
0.45185744762420654,
-1.5228297710418701,
0.07650493085384369,
... |
func (bot *ExchangeBot) nextTick() *time.Timer {
tNow := time.Now()
tOldest := tNow
for _, xc := range bot.Exchanges {
t := xc.LastTry()
if t.Before(tOldest) {
tOldest = t
}
}
tSince := tNow.Sub(tOldest)
tilNext := bot.DataExpiry - tSince
if tilNext < bot.minTick {
tilNext = bot.minTick
}
return tim... | [
-0.22101172804832458,
0.8838102221488953,
0.5530886054039001,
-0.7991922497749329,
-1.2752726078033447,
0.48793694376945496,
-0.10129959881305695,
-0.11581535637378693,
0.1613563895225525,
-0.11789947748184204,
0.21001456677913666,
0.6362228393554688,
-0.35727009177207947,
0.39934092760086... |
func (bot *ExchangeBot) Cycle() {
tNow := time.Now()
for _, xc := range bot.Exchanges {
if tNow.Sub(xc.LastTry()) > bot.DataExpiry {
go xc.Refresh()
}
}
} | [
-0.27638307213783264,
0.4904194474220276,
0.5462890267372131,
-0.6736929416656494,
-0.12342137098312378,
0.41222596168518066,
-0.6597084403038025,
-0.39183080196380615,
0.028181295841932297,
0.511278510093689,
0.8734140992164612,
0.8273307085037231,
-0.3510991334915161,
0.2749902904033661,... |
func (bot *ExchangeBot) Price() float64 {
bot.RLock()
defer bot.RUnlock()
return bot.currentState.Price
} | [
-0.8067771792411804,
0.30984774231910706,
0.15495406091213226,
0.4660544991493225,
0.5800914764404297,
0.9236751198768616,
-0.3536064326763153,
-0.2790922224521637,
0.08568254113197327,
0.4051056206226349,
0.5464696884155273,
-0.12009358406066895,
-1.6547356843948364,
0.07843402773141861,
... |
func (r *Result) GroupPublicKeyBytes() ([]byte, error) {
if r.GroupPublicKey == nil {
return nil, fmt.Errorf("group public key is nil")
}
return r.GroupPublicKey.Marshal(), nil
} | [
-0.158807173371315,
0.6862531304359436,
0.022975286468863487,
0.5963455438613892,
0.27335989475250244,
0.24862945079803467,
0.07400505989789963,
-0.6635718941688538,
-1.1034330129623413,
0.5365256667137146,
-0.8374836444854736,
-0.3191564381122589,
-1.5644052028656006,
1.146670937538147,
... |
func (r *Result) GroupPublicKeyShares() map[group.MemberIndex]*bn256.G2 {
r.groupPublicKeySharesMutex.Lock()
defer r.groupPublicKeySharesMutex.Unlock()
if r.groupPublicKeyShares == nil {
r.groupPublicKeyShares = <-r.groupPublicKeySharesChannel
}
return r.groupPublicKeyShares
} | [
-0.2652132213115692,
0.30063602328300476,
0.40236300230026245,
-0.18755961954593658,
-0.31173989176750183,
0.32227814197540283,
0.3012619614601135,
-1.251641035079956,
-0.7993181347846985,
-0.21988826990127563,
-0.7475511431694031,
0.15738031268119812,
-1.7840059995651245,
0.37817883491516... |
func New(ctx context.Context) (*Controller, error) {
// create user service
userSVC, err := service.New(ctx)
if err != nil {
return nil, fmt.Errorf("error creating service: %v", err)
}
return &Controller{
user: userSVC,
}, nil
} | [
0.22495415806770325,
-0.10542761534452438,
0.10129644721746445,
0.24938185513019562,
-0.6723042726516724,
0.344145804643631,
0.1839115023612976,
-0.7975859642028809,
-0.043507836759090424,
-0.4381466209888458,
0.2502698004245758,
0.4195976257324219,
0.4178009033203125,
0.20692208409309387,... |
func getFront(s *Setup) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
sess, err := sessionStart(s, w, r)
if err != nil {
s.Logger.Printf("server error starting session because: %v", err)
showErrorPage(w, r)
return
}
if sess.Get(s.sessionValues.username) != "" {
http.Redir... | [
-0.3633893132209778,
-0.0214911587536335,
0.6048915982246399,
-0.08700922876596451,
-0.1567150503396988,
-0.42219606041908264,
0.3850051164627075,
-0.06462875008583069,
0.978861391544342,
-0.9125869870185852,
0.09015696495771408,
1.1440398693084717,
0.6219528913497925,
0.6152031421661377,
... |
func newTestDownload() *Download {
return &Download{
url: "https://example.com/1.0.0/app.dmg",
filetype: "application/octet-stream",
length: 100000,
dsaSignature: "MC4CFQCeqQ/MxlFt2H3rQfCPimChDPibCgIVAJhZmHcU8ZHylc7EjvbkVr3ardLp",
md5: "098f6bcd4621d373cade4e832627b4f6",
}
} | [
0.5189828276634216,
-0.298526793718338,
0.4602523148059845,
-0.11591935902833939,
-0.682611346244812,
-0.6992732882499695,
-0.666951060295105,
-0.5317171216011047,
0.3041061460971832,
-0.4711117148399353,
-0.2915976345539093,
-0.011693143285810947,
-0.14219829440116882,
0.12408550083637238... |
func CompanyLogoGET(w http.ResponseWriter, r *http.Request) {
res := ExtractDataFromSourceHTML()
_,err := w.Write([]byte(res))
if err != nil{
log.Println(err)
}
} | [
-0.7114868760108948,
0.6912694573402405,
0.6153499484062195,
-0.254695326089859,
-0.33853068947792053,
-0.01754811219871044,
-0.22754918038845062,
-0.01809133030474186,
-0.5616676211357117,
0.7409154772758484,
-0.3492560386657715,
0.3430279493331909,
-0.4161498248577118,
-0.573017537593841... |
func getServiceClient(serviceMaddr multiaddr.Multiaddr) (cmds.Executor, error) {
network, dialHost, clientHost, clientOpts, err := parseClientOptions(serviceMaddr)
if err != nil {
return nil, err
}
conn, err := net.Dial(network, dialHost)
if err == nil { // use this address
if err = conn.Close(); err != nil {
... | [
0.34531205892562866,
-0.2169087678194046,
0.715256929397583,
-0.059660814702510834,
-0.47775202989578247,
-0.6884307265281677,
0.317065954208374,
-0.4048159122467041,
-0.13491804897785187,
-0.5076695680618286,
0.4599906802177429,
1.0521206855773926,
0.20471489429473877,
0.43823739886283875... |
func (s *DockerAPISuite) TestExecAPICreateNoCmd(c *testing.T) {
name := "exec_test"
dockerCmd(c, "run", "-d", "-t", "--name", name, "busybox", "/bin/sh")
res, body, err := request.Post(fmt.Sprintf("/containers/%s/exec", name), request.JSONBody(map[string]interface{}{"Cmd": nil}))
assert.NilError(c, err)
if versio... | [
-0.16571061313152313,
0.023557187989354134,
0.6691117286682129,
-0.24892984330654144,
0.7656500339508057,
0.2826130986213684,
0.2714705765247345,
-0.2953008711338043,
-0.03464898467063904,
-1.1799355745315552,
-0.2179774045944214,
0.43233245611190796,
0.7129594087600708,
1.1087172031402588... |
func TestChain(t *testing.T) {
e := Chain(
annotate("first"),
annotate("second"),
annotate("third"),
annotate("four"),
)(myEndpoint)
if _, err := e(ctx, req); err != nil {
panic(err)
}
} | [
-0.006475073751062155,
0.2963099181652069,
0.3773057460784912,
0.3965775966644287,
1.1907163858413696,
0.6611874103546143,
-0.464805006980896,
-0.06125989556312561,
-0.3292701542377472,
-0.998097836971283,
-0.6653556823730469,
0.07569323480129242,
-0.6180862784385681,
0.18053928017616272,
... |
func RemoveOrphanedDeployments(ctx context.Context, rclient client.Client, cr orphanedCRD, keepDeployments map[string]struct{}) error {
deployToRemove, err := discoverDeploymentsByLabels(ctx, rclient, cr.GetNSName(), cr.SelectorLabels())
if err != nil {
return err
}
for i := range deployToRemove {
dep := deploy... | [
-0.29283270239830017,
-0.5374205708503723,
0.5744702219963074,
-0.26890432834625244,
-0.03244868293404579,
0.27273446321487427,
0.45314303040504456,
0.04106920212507248,
0.5101680159568787,
1.0971213579177856,
-0.052989412099123,
-0.3269187808036804,
-0.481320321559906,
1.2456696033477783,... |
func discoverDeploymentsByLabels(ctx context.Context, rclient client.Client, ns string, selector map[string]string) ([]*appsv1.Deployment, error) {
var deps appsv1.DeploymentList
opts := client.ListOptions{
Namespace: ns,
LabelSelector: labels.SelectorFromSet(selector),
}
if err := rclient.List(ctx, &deps, ... | [
-0.5504046678543091,
-0.6257825493812561,
0.43077701330184937,
-0.42094576358795166,
0.29180800914764404,
-0.18778212368488312,
-0.9736616611480713,
-1.0426115989685059,
0.4095444083213806,
1.209289789199829,
-0.040636468678712845,
0.19480930268764496,
-0.21760395169258118,
1.0850948095321... |
func RemoveOrphanedServices(ctx context.Context, rclient client.Client, args RemoveSvcArgs, spec *victoriametricsv1beta1.ServiceSpec) error {
svcsToRemove, err := discoverServicesByLabels(ctx, rclient, args)
if err != nil {
return err
}
handleDelete := func(s *v1.Service) error {
if err := RemoveFinalizer(ctx, ... | [
-0.4108242690563202,
-0.2943507134914398,
0.48854860663414,
-0.9805537462234497,
-0.31295356154441833,
0.35589900612831116,
0.7019627690315247,
-0.10494262725114822,
0.18196403980255127,
0.23641903698444366,
0.47568032145500183,
-0.22420381009578705,
-0.7320974469184875,
1.153456687927246,... |
func discoverServicesByLabels(ctx context.Context, rclient client.Client, args RemoveSvcArgs) ([]*v1.Service, error) {
var svcs v1.ServiceList
opts := client.ListOptions{
Namespace: args.GetNameSpace(),
LabelSelector: labels.SelectorFromSet(args.SelectorLabels()),
}
if err := rclient.List(ctx, &svcs, &opts)... | [
-0.7657291889190674,
-0.19354429841041565,
0.42426788806915283,
-0.4133988618850708,
0.6316093802452087,
-0.02879747934639454,
-0.6286768317222595,
-1.0317062139511108,
0.12936531007289886,
0.43058744072914124,
0.42031076550483704,
0.08965060859918594,
-1.2253295183181763,
0.62759089469909... |
func optimizePackage(ctx context.Context, config *packages.Package) error {
log.Printf("optimizing files (Js %t, Css %t, Png %t, Jpg %t)\n",
config.Optimization.Js(),
config.Optimization.Css(),
config.Optimization.Png(),
config.Optimization.Jpg())
files := config.NpmFilesFrom(WORKSPACE)
cpuCount := runtime.... | [
-1.0054799318313599,
1.3015180826187134,
0.4940378665924072,
0.14814803004264832,
0.9908827543258667,
-0.5701854825019836,
0.671305239200592,
-0.55982506275177,
-0.668287992477417,
0.38001078367233276,
-0.2875766456127167,
-0.5795590877532959,
-0.015329851768910885,
0.44303831458091736,
... |
func isPublic(name string) bool {
up := bytes.ToUpper([]byte(name))
return []byte(name)[0] == up[0]
} | [
-0.5674628019332886,
-0.029111120849847794,
0.32992100715637207,
0.3135250508785248,
-1.1913994550704956,
0.29585352540016174,
-0.5481200218200684,
-0.7270517349243164,
0.18639732897281647,
1.0569952726364136,
-1.4721052646636963,
0.5509792566299438,
-0.6384354829788208,
0.4623661041259765... |
func (vr *VRecord) TitleOnly() {
vr.HideFields()
vr.HideMethods()
} | [
0.4993380606174469,
0.20128454267978668,
0.09776148945093155,
0.4494292736053467,
-0.9660560488700867,
0.4889327585697174,
-0.11473537981510162,
-0.39672890305519104,
0.46350061893463135,
0.7795625329017639,
-0.5843169689178467,
-0.055160678923130035,
-0.5200887322425842,
0.732084751129150... |
func readConfig(settingFile string) ConfigJSON {
raw, err := ioutil.ReadFile(settingFile)
if err != nil {
fmt.Println(err.Error())
os.Exit(1)
}
var s ConfigJSON
json.Unmarshal(raw, &s)
return s
} | [
-0.8273741006851196,
-0.19143448770046234,
0.6727185249328613,
-0.3814372420310974,
-0.9850279688835144,
0.6922771334648132,
0.3999405801296234,
0.7003591060638428,
-1.6275352239608765,
1.472908854484558,
-0.2133415937423706,
0.05135084688663483,
0.040041711181402206,
0.07563085108995438,
... |
func (s *ConfigJSON) saveConfig(settingFile string) error {
// let's write it back
out, err := json.Marshal(s)
if err != nil {
return err
}
err = ioutil.WriteFile(settingFile, out, 0600)
if err != nil {
return err
}
return nil
} | [
-0.734484076499939,
-0.36648714542388916,
0.2918292284011841,
-0.4241223931312561,
0.3022811710834503,
0.18195189535617828,
0.1123323142528534,
0.9125573635101318,
-0.4590364694595337,
1.1406718492507935,
-1.44086492061615,
-0.6389250755310059,
0.043868791311979294,
0.9471173882484436,
0... |
func executablePathFinder() (string, error) {
fullpath, err := os.Executable()
folderPath := filepath.Dir(fullpath)
return folderPath, err
} | [
0.15717405080795288,
-0.7464065551757812,
0.5895728468894958,
0.626085638999939,
-0.658181369304657,
0.5721379518508911,
1.4422762393951416,
-0.28427404165267944,
-0.5072648525238037,
-0.06908612698316574,
0.09763320535421371,
-0.23869332671165466,
-0.1189558207988739,
0.8013978004455566,
... |
func String() string {
return fmt.Sprintf("%s %s [date: %s]", app, version, date)
} | [
0.2623860836029053,
-0.9709867835044861,
0.2833090126514435,
-0.1262138932943344,
-0.4127351939678192,
1.5126160383224487,
0.38010188937187195,
-0.69394451379776,
-1.2223049402236938,
0.4806840717792511,
-0.0809992328286171,
0.7966028451919556,
0.5974968671798706,
-0.2270583212375641,
0.... |
func NewAutoCLIQueryService(appModules map[string]interface{}) *AutoCLIQueryService {
return &AutoCLIQueryService{
moduleOptions: ExtractAutoCLIOptions(appModules),
}
} | [
-0.1365816593170166,
-0.6682546734809875,
0.04969809204339981,
-0.4817885458469391,
0.1161494180560112,
-0.524154543876648,
-0.7834440469741821,
-0.896777331829071,
-0.5975722074508667,
0.20220854878425598,
-0.5087747573852539,
1.0945013761520386,
-0.4334944188594818,
0.12575054168701172,
... |
func ExtractAutoCLIOptions(appModules map[string]interface{}) map[string]*autocliv1.ModuleOptions {
moduleOptions := map[string]*autocliv1.ModuleOptions{}
for modName, mod := range appModules {
if autoCliMod, ok := mod.(interface {
AutoCLIOptions() *autocliv1.ModuleOptions
}); ok {
moduleOptions[modName] = ... | [
-0.3427528738975525,
0.1379103660583496,
0.40247926115989685,
-0.37904027104377747,
0.23760077357292175,
-0.5840849280357361,
-0.39616456627845764,
-0.7633943557739258,
0.04400342330336571,
0.8097822070121765,
0.19087742269039154,
0.15451112389564514,
-0.33324623107910156,
1.52359926700592... |
func NewMockServicer(ctrl *gomock.Controller) *MockServicer {
mock := &MockServicer{ctrl: ctrl}
mock.recorder = &MockServicerMockRecorder{mock}
return mock
} | [
-0.4629141688346863,
0.0597514808177948,
0.25403013825416565,
0.67421954870224,
-0.3982394337654114,
-0.05319517105817795,
0.5012630820274353,
-1.2481753826141357,
0.3991037607192993,
-0.05845927447080612,
-0.5266568064689636,
-0.062192950397729874,
-0.9965523481369019,
2.133657932281494,
... |
func (m *MockServicer) EXPECT() *MockServicerMockRecorder {
return m.recorder
} | [
-0.10075416415929794,
0.39860421419143677,
0.27388468384742737,
0.3350048065185547,
-0.20761458575725555,
0.12098973244428635,
-0.008551295846700668,
0.2720833718776703,
0.28160563111305237,
-0.5667869448661804,
0.9554990530014038,
0.7494960427284241,
-1.212367057800293,
0.9414874911308289... |
func (m *MockServicer) CalculateHashAndDuration(startTime time.Time, fiveSecTimer *time.Timer, password string) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "CalculateHashAndDuration", startTime, fiveSecTimer, password)
} | [
0.06952100992202759,
0.7060409784317017,
0.43552759289741516,
1.0759376287460327,
0.6352907419204712,
0.6828962564468384,
0.9901880025863647,
0.38934144377708435,
-0.4581174850463867,
-0.18558233976364136,
-0.596183717250824,
-0.9970105886459351,
-0.46090903878211975,
2.007502555847168,
... |
func (mr *MockServicerMockRecorder) CalculateHashAndDuration(startTime, fiveSecTimer, password interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CalculateHashAndDuration", reflect.TypeOf((*MockServicer)(nil).CalculateHashAndDuration), startTime, fiveSecTimer, p... | [
0.029600271955132484,
0.9263161420822144,
0.357959121465683,
0.946093738079071,
-0.5046624541282654,
0.33461031317710876,
0.0027589204255491495,
-0.5052514672279358,
0.410536527633667,
0.390205055475235,
-0.006729956716299057,
-0.35921451449394226,
-0.6129218339920044,
2.228588104248047,
... |
func (m *MockServicer) CalculateStats() *service.Stats {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CalculateStats")
ret0, _ := ret[0].(*service.Stats)
return ret0
} | [
0.6373457908630371,
1.030523657798767,
0.5455287098884583,
0.7317377328872681,
0.7185802459716797,
0.6483919620513916,
0.8611496686935425,
-0.16167579591274261,
-0.24118785560131073,
-1.1926594972610474,
0.2771618366241455,
-1.3130979537963867,
-1.3049200773239136,
1.4894145727157593,
0.... |
func (mr *MockServicerMockRecorder) CalculateStats() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CalculateStats", reflect.TypeOf((*MockServicer)(nil).CalculateStats))
} | [
0.4986523687839508,
1.694164514541626,
0.3207547068595886,
0.3888140320777893,
0.09844682365655899,
0.6996861100196838,
0.026562055572867393,
-0.802947998046875,
1.0943124294281006,
-0.3811420500278473,
0.9029479622840881,
-0.5366999506950378,
-1.1664314270019531,
1.681585431098938,
-0.4... |
func (m *MockServicer) GetHashedPasswords() []string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetHashedPasswords")
ret0, _ := ret[0].([]string)
return ret0
} | [
0.11182733625173569,
0.1359005719423294,
0.406781941652298,
0.9827142357826233,
1.5439330339431763,
0.3009946644306183,
0.7153493165969849,
-0.06572102755308151,
-0.20028525590896606,
-0.8938882946968079,
-0.9036831259727478,
0.05443559214472771,
-1.3247809410095215,
1.7848966121673584,
... |
func (mr *MockServicerMockRecorder) GetHashedPasswords() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHashedPasswords", reflect.TypeOf((*MockServicer)(nil).GetHashedPasswords))
} | [
0.3515184819698334,
1.2636061906814575,
0.4912002980709076,
0.91768479347229,
0.5002898573875427,
0.16527140140533447,
-0.5785571932792664,
-0.9804612994194031,
1.272566556930542,
0.03604813665151596,
0.17820507287979126,
0.6580862402915955,
-1.0728769302368164,
2.4591028690338135,
0.198... |
func NewFilterHandler(filter filters.Filter) *FilterHandler {
return &FilterHandler{filter: filter}
} | [
0.5192326903343201,
-0.6449326872825623,
-0.06282933056354523,
0.6889820694923401,
-1.7583013772964478,
-0.050174567848443985,
-0.6455376744270325,
-0.2784487307071686,
0.3763437569141388,
0.2789730429649353,
0.1124332994222641,
0.6671856641769409,
-0.7198062539100647,
0.40066245198249817,... |
func (f *FilterHandler) filterHandler(w http.ResponseWriter, r *http.Request) {
url := r.URL.RequestURI()[len(FILTER_ENDPOINT):]
found, err := f.filter.ContainsURL(url)
// If we generated an error but the URL was found we can still act on
// that information. If an error was generated but the URL was not found
//... | [
-0.4374190866947174,
-0.3301263749599457,
0.4596153199672699,
0.653705358505249,
-0.48268160223960876,
-0.09122216701507568,
0.29365041851997375,
-0.1822785884141922,
-0.25518304109573364,
0.07463478296995163,
1.0381791591644287,
-0.13318130373954773,
-0.5465660691261292,
0.088764034211635... |
func (f *FilterHandler) Init() {
http.HandleFunc(FILTER_ENDPOINT, f.filterHandler)
} | [
-0.08433379232883453,
-0.4368850588798523,
0.2236841320991516,
0.1933186948299408,
0.23740124702453613,
0.44130563735961914,
0.32587504386901855,
0.45889338850975037,
-1.4808285236358643,
-0.31660860776901245,
0.3386310338973999,
0.8854466676712036,
0.2912752628326416,
0.16539844870567322,... |
func GetAllMarks(user *[]Marks) (err error) {
if err = Config.DB.Find(user).Error; err != nil {
return err
}
return nil
} | [
0.18549323081970215,
0.5327230095863342,
0.40591707825660706,
1.5549862384796143,
0.5539851784706116,
0.7924690246582031,
0.2805429995059967,
-0.09956350922584534,
0.3794633448123932,
-0.6680868268013,
-0.13023459911346436,
0.16351880133152008,
-0.3316834270954132,
1.0847759246826172,
0.... |
func CreateMarks(user *Marks) (err error) {
if err = Config.DB.Create(user).Error; err != nil {
return err
}
return nil
} | [
-0.10294481366872787,
0.865975022315979,
0.17673790454864502,
0.5661795139312744,
1.2713061571121216,
1.1898213624954224,
0.4920497536659241,
-0.28531259298324585,
-0.062338437885046005,
-0.05730699747800827,
-0.3605881333351135,
-1.1212999820709229,
-0.7311419248580933,
0.6661289930343628... |
func GetMarksByStudentID(marks *[]Marks, id string) (err error) {
if err = Config.DB.Where("student_id = ?", id).Find(marks).Error; err != nil {
return err
}
return nil
} | [
0.49171051383018494,
-0.39825692772865295,
0.45974618196487427,
0.8459914922714233,
1.0346601009368896,
-0.03418693691492081,
-0.17912380397319794,
0.031563542783260345,
-0.07393062859773636,
0.7248499989509583,
-0.39412227272987366,
-0.0019308226183056831,
-0.17228201031684875,
1.03647935... |
func UpdateMarks(user *Marks, id string) (err error) {
fmt.Println(user)
Config.DB.Save(user)
return nil
} | [
-1.002160668373108,
-0.12890812754631042,
0.19294071197509766,
0.4348668158054352,
0.22187714278697968,
1.0257740020751953,
0.8000195622444153,
0.09795097261667252,
-0.055365730077028275,
0.30569154024124146,
-0.9316067099571228,
0.1075165793299675,
-0.7157499194145203,
0.09467985481023788... |
func DeleteMarks(user *Marks, id string) (err error) {
Config.DB.Where("id = ?", id).Delete(user)
return nil
} | [
0.3688100278377533,
0.5044684410095215,
0.06795110553503036,
0.9953143000602722,
0.5885815024375916,
0.536138117313385,
0.5971903204917908,
0.16720333695411682,
0.18304398655891418,
-0.05810810253024101,
-0.0944124236702919,
-0.13825897872447968,
-0.3566279113292694,
0.3652084469795227,
... |
func NewFirestoreManager(client *firestore.Client,
collectionName string) *FirestoreManager {
return &FirestoreManager{
client: client,
collectionName: collectionName,
}
} | [
-0.5867807865142822,
-0.5414668321609497,
0.07375752925872803,
-0.2875288724899292,
-1.3243910074234009,
-0.15037035942077637,
-1.010794997215271,
-0.29027798771858215,
0.6859104633331299,
-1.1616060733795166,
-0.48696428537368774,
0.3656162917613983,
-0.6316949725151062,
1.353672385215759... |
func (m *FirestoreManager) Add(ctx context.Context, usr *User) (<-chan *User,
<-chan error) {
userCh := make(chan *User)
errCh := make(chan error)
go func() {
defer close(userCh)
defer close(errCh)
if err := m.client.RunTransaction(ctx, func(ctx context.Context,
t *firestore.Transaction) error {
ctx, ... | [
-0.2748763859272003,
0.07719291746616364,
0.7974154949188232,
-0.07354076951742172,
-0.4623783230781555,
0.22159069776535034,
0.9019647836685181,
-0.627155065536499,
0.7169744372367859,
-0.24485576152801514,
-0.1740884929895401,
0.38298797607421875,
-0.08083073049783707,
0.4326318502426147... |
func (m *FirestoreManager) Find(ctx context.Context,
queries ...datastore.Query) (<-chan *User, <-chan error) {
out := make(chan *User)
errs := make(chan error)
go func() {
defer close(out)
defer close(errs)
if err := m.client.RunTransaction(ctx, func(ctx context.Context,
t *firestore.Transaction) error ... | [
-0.2325819581747055,
0.31978046894073486,
0.6060101389884949,
-0.03622623160481453,
-0.29017895460128784,
-0.22130891680717468,
0.41837775707244873,
-1.194490671157837,
-0.48706623911857605,
0.14109350740909576,
0.137853741645813,
-0.19938646256923676,
-0.334462434053421,
0.662013232707977... |
func (m *FirestoreManager) Update(ctx context.Context,
usr *User) (<-chan *User, <-chan error) {
userCh := make(chan *User)
errCh := make(chan error)
go func() {
defer close(userCh)
defer close(errCh)
if err := m.client.RunTransaction(ctx, func(ctx context.Context,
t *firestore.Transaction) error {
re... | [
-0.480630487203598,
-0.40619969367980957,
0.41573190689086914,
-0.011184793896973133,
-1.0569634437561035,
0.4659610688686371,
0.12719649076461792,
-0.7296265363693237,
0.4610820412635803,
0.04892389476299286,
0.14080259203910828,
0.6493989825248718,
-0.5851491093635559,
0.473506361246109,... |
func Resolve(cfg *config.Config) *Container {
ctr := Container{}
ctr.Adapters = resolveAdapters(cfg)
ctr.Repositories = resolveRepositories(&ctr.Adapters)
ctr.Services = resolveServices(cfg.Services)
return &ctr
} | [
-0.08049867302179337,
0.44190549850463867,
0.25394871830940247,
-0.09092466533184052,
0.1617935597896576,
-1.3014167547225952,
-0.4760723114013672,
-0.29785892367362976,
0.21546171605587006,
-0.7796787023544312,
0.02651689387857914,
-0.20533299446105957,
-0.17979858815670013,
0.62550812959... |
func NewMarketPlaceAppPool(args ...int) (*MarketPlaceAppPool, error) {
var who, start, end int
switch len(args) {
case 0:
who = PoolWhoMine
start = -1
end = -1
case 1:
who = args[0]
start = -1
end = -1
case 3:
who = args[0]
start = args[1]
end = args[2]
default:
return nil, errors.New("Wrong ... | [
-0.3436054289340973,
-0.6287958025932312,
0.7129813432693481,
-0.13509680330753326,
-0.1263255774974823,
0.9234265685081482,
-0.019525382667779922,
-0.2240617573261261,
-0.5821192264556885,
0.027168456465005875,
0.6089633107185364,
0.4464759826660156,
-0.591870903968811,
-0.014279820024967... |
func NewMarketPlaceApp(id uint) *MarketPlaceApp {
return &MarketPlaceApp{ID: id}
} | [
1.3227429389953613,
-0.9325336217880249,
0.12412619590759277,
-0.5077371001243591,
-0.4133872091770172,
0.8135513067245483,
-0.4481837749481201,
-0.017770156264305115,
1.4955523014068604,
-0.16269446909427643,
0.041516613215208054,
-0.17003238201141357,
0.017518578097224236,
0.400930941104... |
func NewMarketPlaceAppFromName(name string) (*MarketPlaceApp, error) {
marketAppPool, err := NewMarketPlaceAppPool()
if err != nil {
return nil, err
}
id, err := marketAppPool.GetIDFromName(name, "/MARKETPLACEAPP_POOL/MARKETPLACEAPP")
if err != nil {
return nil, err
}
return NewMarketPlaceApp(id), nil
} | [
1.062753677368164,
-1.1208924055099487,
0.26425644755363464,
-0.27134913206100464,
-0.7093501091003418,
0.8882097601890564,
-0.11564046144485474,
-0.40873193740844727,
1.1620006561279297,
0.7284469604492188,
0.04758539795875549,
-0.30928024649620056,
-0.3233707845211029,
0.3777012825012207... |
func CreateMarketPlaceApp(tpl string, market int) (uint, error) {
response, err := client.Call("one.marketapp.allocate", tpl, market)
if err != nil {
return 0, err
}
return uint(response.BodyInt()), nil
} | [
-0.25078412890434265,
-0.21831859648227692,
0.5825591683387756,
-0.3440360128879547,
-0.29765474796295166,
0.6091095805168152,
0.4217473864555359,
-0.5681127309799194,
1.0888950824737549,
0.7786030173301697,
0.3965514898300171,
-0.8312636613845825,
-1.2401906251907349,
0.12274917960166931,... |
func (marketApp *MarketPlaceApp) Delete() error {
_, err := client.Call("one.marketapp.delete", marketApp.ID)
return err
} | [
0.5999715328216553,
-0.12213265150785446,
0.1482222080230713,
0.5681965947151184,
0.3441438674926758,
0.8352238535881042,
0.25200164318084717,
0.03273450583219528,
1.343123435974121,
0.8120606541633606,
0.3872286379337311,
0.21418984234333038,
-1.3447535037994385,
0.22346380352973938,
-0... |
func (marketApp *MarketPlaceApp) Enable(enable bool) error {
_, err := client.Call("one.marketapp.enable", marketApp.ID, enable)
return err
} | [
-0.18475908041000366,
-0.025211883708834648,
0.37101927399635315,
1.0172063112258911,
0.26889273524284363,
1.4549387693405151,
0.23772546648979187,
0.7855041027069092,
0.7816277146339417,
0.8823567628860474,
-0.10138217359781265,
-0.010894709266722202,
-1.4701762199401855,
-0.0025114174932... |
func (marketApp *MarketPlaceApp) Update(tpl string, appendTemplate int) error {
_, err := client.Call("one.marketapp.update", marketApp.ID, tpl, appendTemplate)
return err
} | [
-0.5241695046424866,
-0.46027472615242004,
0.20651991665363312,
-0.6132863163948059,
-0.9391682147979736,
0.5097378492355347,
-0.35383448004722595,
-0.14938318729400635,
0.7736561894416809,
0.8771368861198425,
0.23937959969043732,
-0.6456450819969177,
-1.1909725666046143,
0.411496698856353... |
func (marketApp *MarketPlaceApp) Chmod(uu, um, ua, gu, gm, ga, ou, om, oa int) error {
_, err := client.Call("one.marketapp.chmod", marketApp.ID, uu, um, ua, gu, gm, ga, ou, om, oa)
return err
} | [
0.1409079134464264,
0.18298231065273285,
0.5367904305458069,
0.6964991092681885,
0.06372544914484024,
1.0009675025939941,
0.4336441457271576,
0.22088517248630524,
0.11693841218948364,
1.0865788459777832,
1.2434637546539307,
0.7857571244239807,
-0.9394519925117493,
-0.17867432534694672,
0... |
func (marketApp *MarketPlaceApp) Chown(userID, groupID int) error {
_, err := client.Call("one.marketapp.chown", marketApp.ID, userID, groupID)
return err
} | [
0.21298258006572723,
-0.3319399952888489,
0.04294305667281151,
1.0894945859909058,
-0.6328365206718445,
-0.04222453758120537,
0.41753730177879333,
-0.4555671513080597,
-0.018280932679772377,
0.3906797766685486,
0.18414145708084106,
1.2053210735321045,
0.140239417552948,
0.36045199632644653... |
func (marketApp *MarketPlaceApp) Rename(newName string) error {
_, err := client.Call("one.marketapp.rename", marketApp.ID, newName)
return err
} | [
-0.34676164388656616,
-0.5837425589561462,
0.23578013479709625,
0.7538517713546753,
-0.40827757120132446,
0.4050194025039673,
-0.011764234863221645,
0.05563925579190254,
0.86360102891922,
1.52149498462677,
0.1572854071855545,
0.29801374673843384,
-0.7671684622764587,
-0.18200963735580444,
... |
func (marketApp *MarketPlaceApp) Info() error {
response, err := client.Call("one.marketapp.info", marketApp.ID)
if err != nil {
return err
}
marketApp.body = response.Body()
return nil
} | [
0.20873288810253143,
0.03629652410745621,
0.21158818900585175,
-0.24073022603988647,
0.2814560830593109,
0.4450128674507141,
-0.13447469472885132,
-0.3221960663795471,
0.23054185509681702,
1.065656304359436,
-0.10241048038005829,
0.1452508270740509,
-0.26636743545532227,
0.5142936706542969... |
func (marketApp *MarketPlaceApp) Lock(level uint) error {
_, err := client.Call("one.marketapp.lock", marketApp.ID, level)
return err
} | [
-0.860668420791626,
0.23927326500415802,
0.26810017228126526,
0.4773700535297394,
0.08673576265573502,
0.9245940446853638,
0.303737074136734,
-1.1660027503967285,
0.5545262694358826,
-0.07849609106779099,
0.15339358150959015,
0.15826204419136047,
-1.2397820949554443,
0.17863163352012634,
... |
func (marketApp *MarketPlaceApp) Unlock() error {
_, err := client.Call("one.marketapp.unlock", marketApp.ID)
return err
} | [
-0.5211597681045532,
0.5072575807571411,
0.2514442801475525,
0.613029420375824,
0.18831567466259003,
0.4129026532173157,
0.30539432168006897,
0.2603940963745117,
0.8940660357475281,
0.3350014388561249,
0.6435142755508423,
0.27104753255844116,
-0.8944235444068909,
-0.3393370807170868,
0.1... |
func (marketApp *MarketPlaceApp) LockUse() error {
return marketApp.Lock(1)
} | [
-0.2485160529613495,
0.2246844619512558,
0.437197208404541,
0.7169893980026245,
0.8082674741744995,
-0.2375502586364746,
0.3373816907405853,
-0.702907919883728,
0.3486325144767761,
0.13035964965820312,
0.6587437987327576,
0.49629005789756775,
-1.396512508392334,
0.30314305424690247,
-0.0... |
func (marketApp *MarketPlaceApp) LockManage() error {
return marketApp.Lock(2)
} | [
-0.23524241149425507,
0.06395170837640762,
0.25546368956565857,
0.7636478543281555,
0.4953804910182953,
0.2821457087993622,
-0.8120458126068115,
-0.3094968795776367,
0.14996741712093353,
-0.3810722231864929,
0.33581241965293884,
0.0619857981801033,
-0.5757309794425964,
1.00910222530365,
... |
func (marketApp *MarketPlaceApp) LockAdmin() error {
return marketApp.Lock(3)
} | [
0.043710578233003616,
0.6566778421401978,
0.21031655371189117,
0.542119026184082,
0.14281095564365387,
1.1335326433181763,
-1.068339467048645,
-1.4200242757797241,
0.8855016231536865,
0.2192343920469284,
0.021715693175792694,
0.5658104419708252,
-0.8092129826545715,
0.1304161101579666,
-... |
func (marketApp *MarketPlaceApp) LockAll() error {
return marketApp.Lock(4)
} | [
0.8861367702484131,
-0.40610063076019287,
0.2489567995071411,
1.2745869159698486,
0.4155072569847107,
0.715024471282959,
-0.7220935821533203,
-0.4583660066127777,
0.8033868670463562,
-0.013878479599952698,
0.056765057146549225,
0.33649393916130066,
-0.1678738296031952,
0.6448798179626465,
... |
func Equal(r1, r2 io.Reader, bufSize int) (bool, error) {
b1 := make([]byte, bufSize)
b2 := make([]byte, bufSize)
for {
n1, err1 := r1.Read(b1)
n2, err2 := r2.Read(b2)
if err1 != nil && err1 != io.EOF {
return false, err1
}
if err2 != nil && err2 != io.EOF {
return false, err2
}
// Catch up wi... | [
-0.22329477965831757,
-1.0917556285858154,
1.0299173593521118,
-0.013925207778811455,
-0.21752585470676422,
-0.001872505759820342,
-0.3426111340522766,
-1.1526463031768799,
-0.4311387836933136,
0.21908119320869446,
-0.21540714800357819,
0.2606329619884491,
-0.6310892105102539,
-0.066342517... |
func FilesEqual(name1, name2 string) (bool, error) {
f1Info, err := os.Stat(name1)
if err != nil {
return false, err
}
f2Info, err := os.Stat(name2)
if err != nil {
return false, err
}
if f1Info.Size() != f2Info.Size() {
return false, nil
}
f1, err := os.Open(name1)
if err != nil {
return false, err... | [
-0.2054186761379242,
-0.12601478397846222,
0.9068896770477295,
-0.1740902066230774,
-0.19786286354064941,
0.241693913936615,
-0.7227646112442017,
-0.11049524694681168,
-0.7115225195884705,
0.24368081986904144,
-0.7644127011299133,
-0.3817610442638397,
-0.507061779499054,
0.4577030241489410... |
func NewMyRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MyRequestBuilder) {
m := &MyRequestBuilder{
BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseReque... | [
-1.1003735065460205,
-0.8223951458930969,
0.6237595081329346,
-0.17765633761882782,
-1.4983081817626953,
0.01189525704830885,
0.08890020847320557,
0.416073739528656,
-0.3189410865306854,
-0.5502707362174988,
0.17062276601791382,
0.8495909571647644,
-1.1044961214065552,
0.575160801410675,
... |
func NewMyRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*MyRequestBuilder) {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewMyRequestBuilderInternal(urlParams, requestAdapter)
} | [
-1.3813354969024658,
-0.5727875828742981,
0.4587588608264923,
0.7711548209190369,
-1.5550817251205444,
-0.09035730361938477,
-0.5609461665153503,
0.6253980398178101,
0.6646499633789062,
-1.4411194324493408,
-0.07189051806926727,
0.3183578550815582,
-0.306913286447525,
0.3400644361972809,
... |
func (m *MyRequestBuilder) Get(ctx context.Context, requestConfiguration *MyRequestBuilderGetRequestConfiguration)(MyResponseable, error) {
requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration);
if err != nil {
return nil, err
}
errorMapping := i2ae4187f7daee263371cb1c977df639... | [
-0.510867714881897,
-0.2899490296840668,
0.8686802387237549,
-0.35993891954421997,
-0.012945103459060192,
-0.05902120843529701,
-0.007049056235700846,
-0.06376619637012482,
-0.21431182324886322,
-0.7658131718635559,
-0.04842681065201759,
0.5288549661636353,
-0.3850863575935364,
-0.15367987... |
func (m *MyRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *MyRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewR... | [
-1.3095189332962036,
-0.4210526943206787,
0.9253129363059998,
-0.6293578147888184,
-0.2328883409500122,
-0.22086666524410248,
-0.17531201243400574,
-0.22654572129249573,
0.1089668720960617,
-0.6906212568283081,
-0.0650848001241684,
0.18959824740886688,
-0.6349684596061707,
-0.0277398657053... |
func SafeClose(ch chan MetadataSyncResult) (closed bool) {
if ch == nil {
return
}
defer func() {
if recover() != nil {
closed = true
}
}()
close(ch)
return false
} | [
0.15233992040157318,
0.7961778044700623,
0.7766440510749817,
0.414217472076416,
-0.2990044057369232,
0.21136680245399475,
-0.14845021069049835,
-0.8808379173278809,
-0.18373920023441315,
-0.5122629404067993,
-0.0792103111743927,
-0.47203561663627625,
-0.9664486050605774,
-0.219373136758804... |
func SafeSend(ch chan MetadataSyncResult, result MetadataSyncResult) (closed bool) {
if ch == nil {
return
}
defer func() {
if recover() != nil {
closed = true
}
}()
ch <- result
return false
} | [
-0.150238499045372,
0.7437205910682678,
0.4758502244949341,
0.3602127432823181,
-0.29717522859573364,
0.5672104954719543,
-0.566101610660553,
-0.7023468017578125,
-0.5528762936592102,
-0.3356718122959137,
-0.4264097511768341,
0.48252320289611816,
-1.1080576181411743,
0.09540806710720062,
... |
func RecordDatasetMetrics(result MetadataSyncResult, datasetNamespace, datasetName string, log logr.Logger) {
if len(datasetNamespace) == 0 {
argErr := errors.New("invalid argument: datasetNamespace should not be empty")
log.Error(argErr, "fail to validate RecordDatasetMetrics arguments")
return
}
if len(data... | [
-0.5207802653312683,
0.8396942019462585,
0.6954854726791382,
-0.670134425163269,
0.5426303744316101,
-0.4556313157081604,
0.31104692816734314,
0.008019108325242996,
-0.3898669183254242,
-0.1901436746120453,
-0.13503329455852509,
0.40250730514526367,
0.31926384568214417,
0.5116010904312134,... |
func (val Value) GobEncode() ([]byte, error) {
buf := &bytes.Buffer{}
enc := gob.NewEncoder(buf)
gv := gobValue{
Version: 0,
Ty: val.ty,
V: val.v,
}
err := enc.Encode(gv)
if err != nil {
return nil, fmt.Errorf("error encoding cty.Value: %s", err)
}
return buf.Bytes(), nil
} | [
0.00624794140458107,
0.5401322841644287,
0.5965551137924194,
0.7059544324874878,
0.683121383190155,
0.061400480568408966,
-1.1475882530212402,
-0.4890419840812683,
-0.5059512257575989,
1.1512587070465088,
-0.5593029260635376,
0.7344056367874146,
-1.2646255493164062,
0.3565760850906372,
0... |
func (val *Value) GobDecode(buf []byte) error {
r := bytes.NewReader(buf)
dec := gob.NewDecoder(r)
var gv gobValue
err := dec.Decode(&gv)
if err != nil {
return fmt.Errorf("error decoding cty.Value: %s", err)
}
if gv.Version != 0 {
return fmt.Errorf("unsupported cty.Value encoding version %d; only 0 is supp... | [
0.5284377932548523,
0.10865799337625504,
0.6580400466918945,
0.2185109406709671,
0.761778712272644,
0.04445870220661163,
-0.22405366599559784,
0.09095825999975204,
-0.5472684502601624,
0.4261847734451294,
-0.2616688907146454,
0.1431116759777069,
-0.6172565817832947,
0.39823293685913086,
... |
func (t Type) GobEncode() ([]byte, error) {
buf := &bytes.Buffer{}
enc := gob.NewEncoder(buf)
gt := gobType{
Version: 0,
Impl: t.typeImpl,
}
err := enc.Encode(gt)
if err != nil {
return nil, fmt.Errorf("error encoding cty.Type: %s", err)
}
return buf.Bytes(), nil
} | [
-0.2059192657470703,
0.2734167277812958,
0.6496167778968811,
0.3218640685081482,
1.098400354385376,
0.06389734148979187,
-0.9894059300422668,
-0.59919673204422,
-0.875291109085083,
1.3121953010559082,
-0.8292664885520935,
0.7905979156494141,
-1.4574023485183716,
0.45512112975120544,
0.48... |
func (t *Type) GobDecode(buf []byte) error {
r := bytes.NewReader(buf)
dec := gob.NewDecoder(r)
var gt gobType
err := dec.Decode(>)
if err != nil {
return fmt.Errorf("error decoding cty.Type: %s", err)
}
if gt.Version != 0 {
return fmt.Errorf("unsupported cty.Type encoding version %d; only 0 is supported"... | [
0.5051226019859314,
-0.24763257801532745,
0.7689933180809021,
-0.07495179027318954,
1.074501633644104,
0.3798586428165436,
-0.2314392328262329,
0.03140072152018547,
-0.735526442527771,
0.7553929686546326,
-0.5461951494216919,
0.06908025592565536,
-1.373846173286438,
0.12432673573493958,
... |
func (t *capsuleType) GobEncode() ([]byte, error) {
return nil, fmt.Errorf("cannot gob-encode capsule type %q", t.FriendlyName(friendlyTypeName))
} | [
-0.24593517184257507,
0.4120025038719177,
0.46821409463882446,
1.183755874633789,
0.986383855342865,
-0.17396265268325806,
-0.9824581742286682,
-0.6749422550201416,
-0.39352789521217346,
0.5864053964614868,
-1.028376579284668,
0.23756232857704163,
-1.2008519172668457,
0.5292146801948547,
... |
func (v TopologyParams) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjson6601e8cdEncodeGithubComSkydiveProjectSkydiveGraffitiApiTypes(&w, v)
return w.Buffer.BuildBytes(), w.Error
} | [
-0.5075553059577942,
0.3948042392730713,
0.12232382595539093,
-0.4099605083465576,
0.5589458346366882,
0.15893636643886566,
0.871907114982605,
-0.02103065885603428,
-0.12886419892311096,
0.5060359239578247,
-0.2948070466518402,
0.4523499011993408,
-0.30950525403022766,
0.8487707376480103,
... |
func (v TopologyParams) MarshalEasyJSON(w *jwriter.Writer) {
easyjson6601e8cdEncodeGithubComSkydiveProjectSkydiveGraffitiApiTypes(w, v)
} | [
-0.6829093098640442,
0.21876181662082672,
0.28109025955200195,
-0.8300508856773376,
0.3089641034603119,
-0.34038862586021423,
0.6581222414970398,
-0.8279988169670105,
0.009724060073494911,
0.2659434974193573,
-0.5402500033378601,
0.31895381212234497,
0.1326592117547989,
1.3388200998306274,... |
func (v *TopologyParams) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjson6601e8cdDecodeGithubComSkydiveProjectSkydiveGraffitiApiTypes(&r, v)
return r.Error()
} | [
-0.6477342844009399,
0.5309424996376038,
0.21833045780658722,
-1.178502082824707,
-0.09199589490890503,
0.15541979670524597,
0.5822663307189941,
0.20378127694129944,
-0.3062747120857239,
0.623711347579956,
-0.011912794783711433,
0.08285954594612122,
-0.20259031653404236,
0.8234763741493225... |
func (v *TopologyParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjson6601e8cdDecodeGithubComSkydiveProjectSkydiveGraffitiApiTypes(l, v)
} | [
-0.31308719515800476,
0.23635774850845337,
0.299940824508667,
-1.0713285207748413,
0.18171128630638123,
-0.7673312425613403,
0.6871544122695923,
0.16081546247005463,
-0.16579994559288025,
0.4133198857307434,
-0.49194684624671936,
0.15729887783527374,
0.2537844479084015,
1.30032217502594,
... |
func (v Node) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjson6601e8cdEncodeGithubComSkydiveProjectSkydiveGraffitiApiTypes1(&w, v)
return w.Buffer.BuildBytes(), w.Error
} | [
-0.3105620741844177,
0.6952601075172424,
0.22764113545417786,
-0.3280004560947418,
0.3232784867286682,
-0.3108258843421936,
0.42114341259002686,
0.27376866340637207,
0.2711619436740875,
0.40094631910324097,
-0.21342796087265015,
1.1872713565826416,
-0.1917116343975067,
0.7482620477676392,
... |
func (v Node) MarshalEasyJSON(w *jwriter.Writer) {
easyjson6601e8cdEncodeGithubComSkydiveProjectSkydiveGraffitiApiTypes1(w, v)
} | [
-0.46616020798683167,
0.3269751965999603,
0.3793165683746338,
-0.9871149063110352,
0.2501550018787384,
-0.7412099838256836,
0.2823266386985779,
-0.5670042634010315,
0.3004770278930664,
0.14886416494846344,
-0.5750812888145447,
1.099769949913025,
0.20749056339263916,
1.3167386054992676,
0... |
func (v *Node) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjson6601e8cdDecodeGithubComSkydiveProjectSkydiveGraffitiApiTypes1(&r, v)
return r.Error()
} | [
-0.4070221483707428,
0.8639540076255798,
0.2796105742454529,
-1.3850122690200806,
-0.17555926740169525,
-0.15585407614707947,
0.12688319385051727,
0.5678899884223938,
0.012207098305225372,
0.47208210825920105,
0.011196891777217388,
1.0185033082962036,
-0.26311734318733215,
0.55270016193389... |
func (v *Node) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjson6601e8cdDecodeGithubComSkydiveProjectSkydiveGraffitiApiTypes1(l, v)
} | [
-0.058355700224637985,
0.30137205123901367,
0.40361708402633667,
-1.2322636842727661,
0.18929384648799896,
-1.1059517860412598,
0.32749393582344055,
0.5211532711982727,
0.10673952847719193,
0.2904699742794037,
-0.5512367486953735,
0.9551780223846436,
0.1820254623889923,
0.9959009289741516,... |
func (v Edge) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjson6601e8cdEncodeGithubComSkydiveProjectSkydiveGraffitiApiTypes2(&w, v)
return w.Buffer.BuildBytes(), w.Error
} | [
-0.3165580630302429,
0.21205291152000427,
0.1569172888994217,
-0.15998587012290955,
-0.002617696998640895,
-0.3494904041290283,
0.4863354563713074,
0.5787320733070374,
0.3784397840499878,
0.6757961511611938,
-0.2800184190273285,
0.8968088030815125,
-0.6330695152282715,
0.9388521909713745,
... |
func (v Edge) MarshalEasyJSON(w *jwriter.Writer) {
easyjson6601e8cdEncodeGithubComSkydiveProjectSkydiveGraffitiApiTypes2(w, v)
} | [
-0.46470680832862854,
-0.09584343433380127,
0.330950528383255,
-0.7245826721191406,
-0.05286148190498352,
-0.7065359354019165,
0.233733668923378,
-0.34893113374710083,
0.30096039175987244,
0.359580934047699,
-0.5905483961105347,
0.8315551280975342,
-0.07804900407791138,
1.4428564310073853,... |
func (v *Edge) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjson6601e8cdDecodeGithubComSkydiveProjectSkydiveGraffitiApiTypes2(&r, v)
return r.Error()
} | [
-0.2911527752876282,
0.30364394187927246,
0.2851908206939697,
-1.1886149644851685,
-0.35329678654670715,
-0.2581234872341156,
0.11698391288518906,
0.7285895943641663,
0.16324295103549957,
0.7000718712806702,
-0.02180679887533188,
0.7014349699020386,
-0.7577598690986633,
0.7176937460899353,... |
func (v *Edge) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjson6601e8cdDecodeGithubComSkydiveProjectSkydiveGraffitiApiTypes2(l, v)
} | [
0.036809418350458145,
-0.12643887102603912,
0.3701048493385315,
-1.0990784168243408,
-0.09881903231143951,
-1.0800079107284546,
0.24955397844314575,
0.6604275107383728,
0.18104298412799835,
0.5065296292304993,
-0.5278280973434448,
0.6673436164855957,
-0.17936982214450836,
1.145193576812744... |
func ForceConfigValue(key string, value interface{}) OptionsModifier {
return func(o *options) {
o.forcedValues[key] = value
}
} | [
-1.4061106443405151,
0.5252578854560852,
0.3829384446144104,
-0.1514405757188797,
-0.05374579876661301,
0.3669124245643616,
-0.9806737899780273,
-0.205018550157547,
-0.44433972239494324,
0.506413459777832,
-1.0542020797729492,
0.1445254385471344,
0.2904540002346039,
0.9423041939735413,
0... |
func DisableValidation() OptionsModifier {
return func(o *options) {
o.validate = false
}
} | [
-0.7673535346984863,
-0.012180859223008156,
0.32789885997772217,
0.19903618097305298,
-0.12641014158725739,
1.0873808860778809,
0.9239559769630432,
0.6138066053390503,
0.41389134526252747,
-0.19052383303642273,
-0.23838841915130615,
-1.4834622144699097,
-0.7001792192459106,
-0.187128335237... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.