text stringlengths 1k 12k | metadata dict |
|---|---|
package controller
import (
"context"
"encoding/json"
"fmt"
"strings"
"time"
"github.com/LINBIT/golinstor/client"
"github.com/piraeusdatastore/linstor-csi/pkg/driver"
csilinstor "github.com/piraeusdatastore/linstor-csi/pkg/linstor"
hlclient "github.com/piraeusdatastore/linstor-csi/pkg/linstor/highlevelclient... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "piraeusdatastore/linstor-affinity-controller",
"path": "pkg/controller/affinity.go",
"language": "Go",
"commit": "9c7da30",
"domain": "kubernetes-storage-controller",
"fit": "tool_use"
} |
// Copyright 2024 Nokia
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writi... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "sdcio/data-server",
"path": "pkg/cache/local.go",
"language": "Go",
"commit": "f946242",
"domain": "Go cache wrapper with protobuf intents",
"fit": "tool_use"
} |
package common
import (
"encoding/json"
"fmt"
"strings"
"github.com/samber/lo"
corev1 "k8s.io/api/core/v1"
)
const (
searchPartsSep = ';'
ClusterNamespaceKey = "clusterNamespace"
All = "a_l_l"
)
type ClusterNamespace struct {
Cluster string
Namespace string
}
... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "Ben-Zheng/bz",
"path": "common/helper.go",
"language": "Go",
"commit": "7fc1565",
"domain": "kubernetes_helpers_pagination",
"fit": "tool_use"
} |
package handlers
import (
"net/http"
"simple-goroutine-product/internal/models"
"simple-goroutine-product/internal/presenters"
"strconv"
"github.com/labstack/echo/v4"
)
// ProductHandler handles HTTP requests for products
type ProductHandler struct {
presenter presenters.ProductPresenter
}
// NewProductHandle... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "putram11/simple-goroutine-product",
"path": "internal/handlers/product_handler.go",
"language": "Go",
"commit": "efd6c52",
"domain": "go_web_api_crud",
"fit": "tool_use"
} |
package server
import (
"time"
"github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
"github.com/michaelyusak/go-auth/adaptor"
"github.com/michaelyusak/go-auth/config"
"github.com/michaelyusak/go-auth/handler"
"github.com/michaelyusak/go-auth/repository"
"github.com/michaelyusak/go-auth/service"
helperHan... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "michaelyusak/go-auth",
"path": "server/router.go",
"language": "Go",
"commit": "f27d281",
"domain": "go_web_api_auth_service",
"fit": "tool_use"
} |
package engUtils
import (
"augeu-agent/internal/pkg/weibu"
"augeu-agent/pkg/logger"
"augeu-agent/pkg/util/convert"
"fmt"
"strings"
)
type Check struct {
}
// NewCheck 创建检查工具实例
//
// return:
// - *Check 检查工具实例
func NewCheck() *Check {
return &Check{}
}
// CheckHash 通过微步检查哈希值的风险率是否低于指定阈值
//
// params:
// - ... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "TSY244/augeu-agent",
"path": "internal/pkg/engine/engUtils/check.go",
"language": "Go",
"commit": "fffdbea",
"domain": "malware-hash-reputation-check",
"fit": "tool_use"
} |
package internal
import (
"fmt"
"io"
"log"
"net/http"
"encoding/json"
"strings"
)
type Item struct {
ID string `json:"id"`
Name string `json:"name"`
Intelligence string `json:"intelligence"`
Strength string `json:"strength"`
Speed string `json:"speed"`
Durability string `json:... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "Awakened696/superheroapi_test",
"path": "internal/clients.go",
"language": "Go",
"commit": "620b4c5",
"domain": "HTTP API client (Superhero API)",
"fit": "tool_use"
} |
package utility
import (
"net/http"
"path/filepath"
"boilerplate-api/lib/config"
"boilerplate-api/lib/json_response"
"boilerplate-api/lib/utils"
"boilerplate-api/services/aws"
"github.com/gin-gonic/gin"
)
type Controller struct {
logger config.Logger
s3Bucket aws.S3BucketService
service Service
}
func ... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "readytowork-org/go-gin-skeleton",
"path": "api/utility/controller.go",
"language": "Go",
"commit": "d56fe75",
"domain": "web-api file upload / AWS S3",
"fit": "tool_use"
} |
package handlers
import (
"net/http"
"github.com/labstack/echo/v4"
)
// User 用户结构体
type User struct {
ID string `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
}
// GetUsers 获取所有用户
func GetUsers(c echo.Context) error {
users := []User{
{ID: "1", Name: "John Doe", Email: "john@example.c... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "zhuohq/test",
"path": "internal/handlers/user_handler.go",
"language": "Go",
"commit": "4b0ea21",
"domain": "web-api-handlers",
"fit": "tool_use"
} |
package post
import (
"context"
"net-http-boilerplate/internal/entity"
"gorm.io/gorm"
)
type Repository struct {
db *gorm.DB
}
func NewPostRepository(db *gorm.DB) *Repository {
return &Repository{
db: db,
}
}
func (r *Repository) Create(ctx context.Context, post *entity.Post) error {
return r.db.WithConte... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "gnotnek/net-http-bolierplate",
"path": "internal/post/repo.go",
"language": "Go",
"commit": "27c273c",
"domain": "golang gorm repository/backend persistence",
"fit": "tool_use"
} |
package types
import (
"encoding/json"
"fmt"
)
// XSourceField represents a field with an x-source extension.
type XSourceField struct {
Name string
XSource string
Title string
Type string
Required bool
}
// ExtractXSourceFields parses a JSON schema and returns all fields with x-source extensions.... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "LF-Decentralized-Trust-labs/chaindeploy",
"path": "pkg/plugin/types/schema_extensions.go",
"language": "Go",
"commit": "e13d856",
"domain": "json-schema processing / plugin schema extensions",
"fit": "tool_use"
} |
package service
import (
"aave_web/config"
"aave_web/dao"
"aave_web/logger/xzap"
"aave_web/stores/gdb"
"aave_web/stores/xkv"
"context"
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/kv"
"github.com/zeromicro/go-zero/core/stores/redis"
"gorm.io/gorm"
)
type ServerC... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "MeinAJ/imacro",
"path": "server/web/service/ServiceContext.go",
"language": "Go",
"commit": "484d347",
"domain": "go web service context/DI",
"fit": "tool_use"
} |
package controller
import (
pdoknlv3 "github.com/pdok/atom-operator/api/v3"
smoothutil "github.com/pdok/smooth-operator/pkg/util"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
ct... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "PDOK/atom-operator",
"path": "internal/controller/deployment.go",
"language": "Go",
"commit": "17ac512",
"domain": "kubernetes-operator/controller",
"fit": "tool_use"
} |
package handler
import (
"context"
"fmt"
"aidicti.top/api/protogen_cmn"
"aidicti.top/api/protogen_stt"
"aidicti.top/pkg/handler/exectime"
"aidicti.top/pkg/handler/proc"
pkgmodel "aidicti.top/pkg/model"
"aidicti.top/stt/internal/model"
)
type controller interface {
TranslateAudio(context.Context, pkgmodel.Re... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "mhtate/aidicti.top",
"path": "stt/internal/handler/grpc.go",
"language": "Go",
"commit": "0826e9f",
"domain": "speech-to-text gRPC service",
"fit": "tool_use"
} |
/*
Copyright 2023 The Tekton Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "tektoncd/pipeline",
"path": "pkg/apis/pipeline/v1beta1/stepaction_types.go",
"language": "Go",
"commit": "d97e81a",
"domain": "kubernetes-ci-cd-api",
"fit": "tool_use"
} |
package web
import (
"context"
"github.com/gin-gonic/gin"
"go-rest-test/internal/core/entities"
"go-rest-test/internal/core/repository"
"go-rest-test/internal/infrastructure/auth"
"go-rest-test/pkg/html"
"log"
"net/http"
)
type PlayerWebHandler struct {
repo repository.Repository[entities.Player]
}
func New... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "bel-mont/go-rest-test",
"path": "internal/adapters/web/player_web_handler.go",
"language": "Go",
"commit": "13b338c",
"domain": "go_web_api_handler",
"fit": "tool_use"
} |
package grpc
import (
"context"
"encoding/json"
"time"
"trabalho-03/internal/domain"
"trabalho-03/internal/usecase"
)
// Simple gRPC-like structs without protobuf dependency
type OrderMessage struct {
ID uint32 `json:"id"`
CustomerID string `json:"customer_id"`
Amount float64 `json:"amount"`
St... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "marcos-lancy/trabalhos-fullcycle-go",
"path": "trabalho-03/internal/grpc/order_service.go",
"language": "Go",
"commit": "b3f1477",
"domain": "order-service API (Go, gRPC-style)",
"fit": "tool_use"
} |
package di
import (
"context"
"demoservice/internal/web"
"fmt"
"net/http"
"github.com/go-chi/chi/v5"
"go.uber.org/fx"
"log"
"demoservice/internal/config"
"demoservice/internal/cache"
"demoservice/internal/db"
"demoservice/internal/kafka"
"github.com/go-chi/cors"
)
func StartHTTPServer(lc fx.Lifecycle, we... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "iapparov/Demo_service",
"path": "internal/di/di.go",
"language": "Go",
"commit": "6bccf69",
"domain": "go microservice DI (HTTP/Kafka/cache)",
"fit": "tool_use"
} |
package api
import (
"fmt"
"io"
"net/http"
"strings"
"github.com/jianxcao/watch-docker/backend/internal/dockercli"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
// setupImageRoutes 设置镜像相关的路由
func (s *Server) setupImageRoutes(protected *gin.RouterGroup) {
protected.GET("/images", s.handleListImages())
prot... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "jianxcao/watch-docker",
"path": "backend/internal/api/image_router.go",
"language": "Go",
"commit": "c813275",
"domain": "docker image management API",
"fit": "tool_use"
} |
package logic
import (
"context"
"fmt"
"titan-vm/vms/api/internal/svc"
"titan-vm/vms/api/internal/types"
"titan-vm/vms/pb"
"titan-vm/vms/vms"
"github.com/zeromicro/go-zero/core/logx"
)
type VMInterfaceAddLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
func NewVMInterfaceAdd... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "zscboy/titan-vm",
"path": "vms/api/internal/logic/vminterfaceaddlogic.go",
"language": "Go",
"commit": "4d9b578",
"domain": "virtualization-api",
"fit": "tool_use"
} |
/*********************************************************************
* Copyright (c) Intel Corporation 2023
* SPDX-License-Identifier: Apache-2.0
**********************************************************************/
// Package messagelog facilitiates communication with Intel® AMT devices to provide access to th... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "device-management-toolkit/go-wsman-messages",
"path": "pkg/wsman/amt/messagelog/log.go",
"language": "Go",
"commit": "ca7996b",
"domain": "Intel AMT WS-Man device management",
"fit": "tool_use"
} |
package middlewares
import (
"errors"
"net/http"
"strings"
"github.com/gin-gonic/gin"
"github.com/golang-jwt/jwt"
"github.com/webapp/services"
)
func Authorizes(roles ...string) gin.HandlerFunc {
return func(c *gin.Context) {
jwtWrapper := services.JwtWrapper{
SecretKey: "SvNQpBN8y3qlVrsGAYYWoJJk56LtzFHx... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "nopx45/Tsubaki",
"path": "backend/middlewares/authorization.go",
"language": "Go",
"commit": "5a88e80",
"domain": "web-api-auth-middleware",
"fit": "tool_use"
} |
package api
import (
notifications "client-app/internal/api/v1/notifications"
"client-app/internal/service"
"context"
"fmt"
)
// 通知系统控制器
type cNotifications struct{}
func Notifications() *cNotifications {
return &cNotifications{}
}
// List 获取通知列表
func (c *cNotifications) List(ctx context.Context, req *notifica... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "slotmagia/resources-admin",
"path": "internal/controller/api/notifications.go",
"language": "Go",
"commit": "97d5992",
"domain": "notification-api-controller",
"fit": "tool_use"
} |
package handlerV1
import (
"ginAPI/utils"
"github.com/gin-gonic/gin"
"net/http"
"regexp"
)
type UserHandler struct{}
type GetUsersByIdV1Params struct {
Id int `uri:"id" binding:"required,gt=0"` // ID must be a positive integer
}
type GetUsersByUidV1Params struct {
Uid string `uri:"uid" binding:"required,uuid"` ... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "vixuancu/backendGin",
"path": "internal/api/v1/handler/user.go",
"language": "Go",
"commit": "7ef1ac3",
"domain": "go-gin-web-api-handlers",
"fit": "tool_use"
} |
package datasource
import (
"context"
"encoding/json"
"fmt"
"net/http"
"sort"
"strconv"
"sync"
"time"
"ta-watcher/internal/config"
)
// CoinbaseClient Coinbase数据源实现
type CoinbaseClient struct {
baseURL string
client *http.Client
rateLimit *config.RateLimitConfig
lastRequest time.Time
req... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "zjy-dev/ta-watcher",
"path": "internal/datasource/coinbase.go",
"language": "Go",
"commit": "31ad6ff",
"domain": "crypto-exchange data client",
"fit": "tool_use"
} |
package role
import (
"context"
"github.com/coder-lulu/newbee-core/rpc/internal/utils/entx"
"github.com/coder-lulu/newbee-common/utils/pointy"
"github.com/coder-lulu/newbee-core/rpc/ent"
"github.com/coder-lulu/newbee-core/rpc/internal/svc"
"github.com/coder-lulu/newbee-core/rpc/internal/utils/dberrorhandler"
"... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "coder-lulu/newbee-core",
"path": "rpc/internal/logic/role/create_role_logic.go",
"language": "Go",
"commit": "32a9430",
"domain": "backend-rpc-role-management",
"fit": "tool_use"
} |
package rpc
import (
"net/http"
"github.com/gofiber/fiber/v2"
"github.com/qualifiedov/ldap-selfservice-password-changer/internal/options"
ldap "github.com/netresearch/simple-ldap-go"
)
type Func = func(params []string) ([]string, error)
type Handler struct {
ldap *ldap.LDAP
opts *options.Opts
}
func New(opts... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "qualifiedov/ldap-selfservice-password-changer",
"path": "internal/rpc/handler.go",
"language": "Go",
"commit": "c4277be",
"domain": "LDAP password service RPC handler",
"fit": "tool_use"
} |
// Copyright 2024-2025 NetCracker Technology Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "Netcracker/qubership-opensearch",
"path": "operator/controllers/dbaas_adapter_reconciler.go",
"language": "Go",
"commit": "babbeb8",
"domain": "kubernetes-operator/controller",
"fit": "tool_use"
} |
package redisH
import (
"context"
"encoding/json"
"fmt"
"log"
"plexcache/models"
"plexcache/utils"
s "strings"
"time"
"github.com/redis/go-redis/v9"
)
func SubscribeToExpired(rdb *redis.Client) *redis.PubSub {
ctx := context.Background()
plexExpirerKey := ":plex-expirer"
location := "/cache"
subscriber... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "richie-south/plex-cache",
"path": "redis/subscriber.go",
"language": "Go",
"commit": "5f28a26",
"domain": "redis-cache-expiration-file-cleanup",
"fit": "tool_use"
} |
package clients
import (
"bytes"
"context"
"fmt"
"mime/multipart"
"net/http"
"path/filepath"
"time"
)
type LocalImageStorageClient struct {
address string
client *http.Client
}
func NewLocalImageStorageClient(address string) (*LocalImageStorageClient, error) {
store := &LocalImageStorageClient{
address:... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "TheTeemka/pinterest",
"path": "internal/clients/local_image_store.go",
"language": "Go",
"commit": "7b0200f",
"domain": "image storage HTTP client",
"fit": "tool_use"
} |
package kafka
import (
"encoding/json"
"fmt"
"log"
"github.com/Alias1177/Notification/internal/domain/service"
)
// KafkaHandler обрабатывает сообщения из Kafka
type KafkaHandler struct {
notificationService *service.NotificationService
emailService *service.EmailService
}
// NewKafkaHandler создает но... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "Alias1177/Notification",
"path": "internal/delivery/kafka/handlers.go",
"language": "Go",
"commit": "b7cb168",
"domain": "event-driven notification service (Kafka + email)",
"fit": "tool_use"
} |
package service
import (
"context"
"fmt"
"time"
"github.com/google/uuid"
"golang.org/x/crypto/bcrypt"
"google.golang.org/protobuf/types/known/timestamppb"
pb "github.com/amath/backend/api/proto/user"
"github.com/amath/backend/pkg/jwt"
"github.com/amath/backend/pkg/logger"
"github.com/amath/backend/services... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "MajorTom3K1M/frolix-backend",
"path": "services/user-service/internal/service/user_service.go",
"language": "Go",
"commit": "c9aecc4",
"domain": "user-authentication-service",
"fit": "tool_use"
} |
// SPDX-FileCopyrightText: Copyright 2025 The SLSA Authors
// SPDX-License-Identifier: Apache-2.0
package attest
import (
"bufio"
"context"
"fmt"
"strings"
vpb "github.com/in-toto/attestation/go/predicates/vsa/v1"
spb "github.com/in-toto/attestation/go/v1"
"google.golang.org/protobuf/encoding/protojson"
"goo... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "slsa-framework/source-tool",
"path": "pkg/attest/vsa.go",
"language": "Go",
"commit": "134593d",
"domain": "supply-chain attestation (SLSA/in-toto)",
"fit": "tool_use"
} |
//go:build wireinject
// +build wireinject
package app
import (
"context"
"fmt"
"log/slog"
"time"
"github.com/google/wire"
"github.com/jackc/pgx/v4/pgxpool"
"github.com/tehrelt/test-users-api/internal/config"
"github.com/tehrelt/test-users-api/internal/service/userservice"
"github.com/tehrelt/test-users-api... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "tehrelt/test-user-api",
"path": "internal/app/wire.go",
"language": "Go",
"commit": "9262208",
"domain": "go-backend-di-postgres",
"fit": "tool_use"
} |
/*
Copyright 2025 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "kubernetes-sigs/multicluster-runtime",
"path": "providers/multi/provider.go",
"language": "Go",
"commit": "d465a1b",
"domain": "kubernetes multicluster provider management",
"fit": "tool_use"
} |
package transform
import (
"context"
"encoding/json"
"fmt"
"os"
"strings"
"sync"
"cloud.google.com/go/storage"
"github.com/brexhq/substation/v2/config"
"github.com/brexhq/substation/v2/message"
"github.com/brexhq/substation/v2/internal/aggregate"
iconfig "github.com/brexhq/substation/v2/internal/config"
... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "brexhq/substation",
"path": "transform/send_gcp_storage.go",
"language": "Go",
"commit": "dad9243",
"domain": "gcp-storage-data-pipeline",
"fit": "tool_use"
} |
package controllers
import (
"github.com/gofiber/fiber/v2"
"github.com/kyyyyyyyyyyyyyy/sertifikasibc/domain"
"github.com/kyyyyyyyyyyyyyy/sertifikasibc/models"
)
type BlockChainApi struct {
Bc *domain.BlockChain
}
func (bca *BlockChainApi) TopUpBalance(ctx *fiber.Ctx) error {
var request domain.Transaction
if ... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "kyyyyyyyyyyyyyy/e-wallet",
"path": "controllers/transactioncontroller.go",
"language": "Go",
"commit": "1bbed89",
"domain": "blockchain-api",
"fit": "tool_use"
} |
package postgresqlrepo
import (
"context"
"fmt"
"time"
"github.com/google/uuid"
"github.com/maksemen2/pvz-service/internal/domain/models"
"github.com/maksemen2/pvz-service/internal/domain/repositories"
"github.com/maksemen2/pvz-service/internal/pkg/database"
databaseerrors "github.com/maksemen2/pvz-service/in... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "maksemen2/pvz-service",
"path": "internal/repository/postgresql/pvz.go",
"language": "Go",
"commit": "bf0120f",
"domain": "golang-postgresql-repository",
"fit": "tool_use"
} |
package vector
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"math"
"os"
"path/filepath"
"sort"
"strings"
"sync"
"github.com/azhany/codecli/internal/config"
"github.com/azhany/codecli/internal/llm"
"github.com/azhany/codecli/internal/types"
)
// Store handles vector storage and retrieval
type Sto... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "azhany/codecli",
"path": "internal/vector/vector.go",
"language": "Go",
"commit": "56a97ae",
"domain": "vector-search/code-embedding",
"fit": "tool_use"
} |
package channel
import (
"crypto/rand"
"crypto/sha256"
"encoding/json"
"log"
"github.com/ddr4869/minifab/common/blockutil"
"github.com/ddr4869/minifab/common/configtx"
"github.com/ddr4869/minifab/common/msp"
"google.golang.org/protobuf/types/known/timestamppb"
"github.com/ddr4869/minifab/common/logger"
"gi... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "ddr4869/minifab",
"path": "peer/channel/create.go",
"language": "Go",
"commit": "779727c",
"domain": "blockchain-channel-management",
"fit": "tool_use"
} |
package handler
import (
"net/http"
"strconv"
"time"
"github.com/gin-gonic/gin"
"github.com/AI1411/fullstack-react-go/internal/domain/model"
"github.com/AI1411/fullstack-react-go/internal/infra/logger"
"github.com/AI1411/fullstack-react-go/internal/usecase"
)
type Organization interface {
ListOrganizations(... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "AI1411/fullstack-react-go",
"path": "backend/internal/handler/organization_handler.go",
"language": "Go",
"commit": "b06d3c0",
"domain": "web_api_crud_handler",
"fit": "tool_use"
} |
package handlers
import (
"fiber-gorm/internal/models"
"fiber-gorm/internal/services"
"fiber-gorm/internal/validators"
"net/http"
"time"
"github.com/gofiber/fiber/v2"
"github.com/rs/zerolog/log"
)
// TokenResponse represents the response for token generation endpoints
type TokenResponse struct {
AccessToken ... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "underworld14/fiber-gorm-boilerplate",
"path": "internal/handlers/auth_handler.go",
"language": "Go",
"commit": "52a1923",
"domain": "web-api-authentication",
"fit": "tool_use"
} |
// Main package
package main
import (
"context"
"fmt"
"log/slog"
"net/http"
"os"
ssogrpc "url-shortener/internal/clients/sso/grpc"
"url-shortener/internal/config"
"url-shortener/internal/http-server/handlers/pages/landing"
"url-shortener/internal/http-server/handlers/redirect"
"url-shortener/internal/http-se... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "georgs1xth/RestApiURLshortener",
"path": "cmd/url-shortener/main.go",
"language": "Go",
"commit": "6cdc529",
"domain": "web backend / URL shortener service",
"fit": "tool_use"
} |
package handlers
import (
"bufio"
"chat/internal/models"
"chat/internal/services"
"encoding/json"
"fmt"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"io"
"strings"
)
// HandleCreateSession 处理创建新会话
func HandleCreateSession(c *gin.Context) {
session, err := services.CreateSession()
if err != nil {
f... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "zhao-gl/zgl-chat-server",
"path": "chat/internal/handlers/chat.go",
"language": "Go",
"commit": "7f25535",
"domain": "chat service API (Go/Gin, SSE streaming)",
"fit": "tool_use"
} |
// @author xiangqian
// @date 20:47 2023/06/10
package db
import (
"fmt"
_ "github.com/go-sql-driver/mysql"
"github.com/jmoiron/sqlx"
"time"
)
// 数据库连接池
var db *sqlx.DB
// Init 初始化数据库连接池
func Init(config Config) (*sqlx.DB, error) {
var err error
// 进行连接验证,sql.Open 本身不会建立连接
// 因为每一个连接都是惰性创建的,如何验证 sql.Open 调用之... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "xiangqians/gweb",
"path": "pkg/db/db.go",
"language": "Go",
"commit": "491a8dd",
"domain": "golang database access layer",
"fit": "tool_use"
} |
package config
import (
"embed"
"log"
_ "github.com/lib/pq"
"github.com/pressly/goose/v3"
"gorm.io/driver/postgres"
"gorm.io/gorm"
)
//go:embed migrations/*.sql
var embedMigrations embed.FS
func ConnectDB() *gorm.DB {
db, err := gorm.Open(postgres.Open(DB_URL), &gorm.Config{})
if err != nil {
log.Println(... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "n-saji/Housing-Panda",
"path": "config/daos.go",
"language": "Go",
"commit": "98e6612",
"domain": "go-postgres-db-migrations",
"fit": "tool_use"
} |
package payment
import (
"fmt"
"strings"
"time"
)
// PaymentService handles the payment processing logic.
type PaymentService struct{}
// NewPaymentService creates a new PaymentService.
func NewPaymentService() *PaymentService {
return &PaymentService{}
}
// ProcessPayment simulates processing a payment from a ... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "syed-zeeshan-zaidi/businesscart.ai",
"path": "checkout-service/internal/payment/payment.go",
"language": "Go",
"commit": "5873a53",
"domain": "payment-processing service",
"fit": "tool_use"
} |
package route
import (
"net/http"
"backend/internal/handlers"
"backend/internal/logger"
"backend/internal/middleware"
"backend/internal/services"
"backend/utils"
)
type Router struct {
agentHandler *handlers.AgentHandler
integrationHandler *handlers.IntegrationHandler
authHandler *handlers.Auth... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "dafascoder/Pattaka",
"path": "backend/internal/route/route.go",
"language": "Go",
"commit": "6a1d18e",
"domain": "go-web-api-routing",
"fit": "tool_use"
} |
package openapi
import (
"errors"
"github.com/TykTechnologies/graphql-go-tools/pkg/introspection"
"github.com/getkin/kin-openapi/openapi3"
)
func (c *converter) processArray(schema *openapi3.SchemaRef) error {
fullTypeName, err := extractFullTypeNameFromRef(schema.Value.Items.Ref)
if errors.Is(err, errTypeNameE... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "TykTechnologies/graphql-translator",
"path": "openapi/array.go",
"language": "Go",
"commit": "5dfef88",
"domain": "OpenAPI-to-GraphQL schema conversion",
"fit": "tool_use"
} |
package community
import (
"context"
"database/sql"
"time"
domain "wz-backend-go/internal/domain/community"
)
// ViewRepository 浏览记录仓储实现
type ViewRepository struct {
db *sql.DB
}
// NewViewRepository 创建浏览记录仓储
func NewViewRepository(db *sql.DB) *ViewRepository {
return &ViewRepository{
db: db,
}
}
// SaveV... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "dumbsheep1990/wz-backend-go",
"path": "internal/infrastructure/repository/community/view_repository.go",
"language": "Go",
"commit": "6ac9dfb",
"domain": "go-backend-sql-repository",
"fit": "tool_use"
} |
package coralogix
import (
"bytes"
"io"
"net/http"
"strconv"
"time"
)
// SendRequest send logs data to Coralogix server
func SendRequest(Bulk *Bulk, privateKey string) int {
client := &http.Client{
Timeout: time.Duration(HTTPTimeout) * time.Second,
}
for Attempt := 1; uint(Attempt) <= HTTPSendRetryCount; A... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "coralogix/go-coralogix-sdk",
"path": "http.go",
"language": "Go",
"commit": "981d72a",
"domain": "logging client / HTTP API integration",
"fit": "tool_use"
} |
// Copyright 2021 Cisco Systems, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "noironetworks/aci-containers",
"path": "pkg/controller/epgcache.go",
"language": "Go",
"commit": "c03bd21",
"domain": "kubernetes-aci-controller",
"fit": "tool_use"
} |
package weight
import (
"log/slog"
"time"
"ypeskov/kkal-tracker/internal/models"
"ypeskov/kkal-tracker/internal/repositories"
)
type Service struct {
weightRepo repositories.WeightHistoryRepository
logger *slog.Logger
}
func New(weightRepo repositories.WeightHistoryRepository, logger *slog.Logger) *Servic... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "ypeskov/kkal-tracker",
"path": "internal/services/weight/service.go",
"language": "Go",
"commit": "81c2f21",
"domain": "health/fitness weight tracking service",
"fit": "tool_use"
} |
package cli
import (
"fmt"
"github.com/IBM/openkommander/internal/core/commands"
"github.com/spf13/cobra"
)
type ProduceCommandList struct{}
func (ProduceCommandList) GetParentCommand() *OkParentCmd {
return &OkParentCmd{
Use: "produce [TOPIC NAME]",
Short: "Produce command",
Run: produceMessage,
Fl... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "IBM/openkommander",
"path": "pkg/cli/produce_cli.go",
"language": "Go",
"commit": "993610e",
"domain": "message-queue CLI (Kafka-like producer)",
"fit": "tool_use"
} |
package isolate
import (
"bufio"
"context"
"errors"
"fmt"
"os"
"os/exec"
"path/filepath"
"slices"
"strconv"
"strings"
"testing_system/common/connectors/masterconn"
"testing_system/common/constants/verdict"
"testing_system/invoker/sandbox"
"testing_system/lib/customfields"
"testing_system/lib/logger"
"t... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "problem-judge/testing-system",
"path": "invoker/sandbox/isolate/isolate.go",
"language": "Go",
"commit": "d54ead5",
"domain": "code-execution sandboxing",
"fit": "tool_use"
} |
package controllers
import (
"net/http"
"github.com/gin-gonic/gin"
"github.com/waltertaya/saas-microservices/auth-service/db"
"github.com/waltertaya/saas-microservices/auth-service/models"
)
// simple protected test route
func Profile(ctx *gin.Context) {
userID := ctx.GetInt("user_id")
role := ctx.GetString("r... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "waltertaya/SaaS-Microservices",
"path": "auth-service/controllers/profile_controller.go",
"language": "Go",
"commit": "f861c3b",
"domain": "web-api/auth-profile-service",
"fit": "tool_use"
} |
package data
import (
"context"
"gps-tracker/internal/database"
"gps-tracker/internal/types"
"github.com/google/uuid"
)
type AuthStore interface {
GetSessionById(id uuid.UUID) (session *types.Session, err error)
CreateSession() (session *types.AuthResponse, err error)
Refresh(sessionId uuid.UUID) (session *ty... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "JueViGrace/gps-tracker",
"path": "server/internal/data/auth.go",
"language": "Go",
"commit": "c2d5345",
"domain": "backend_auth_session_store",
"fit": "tool_use"
} |
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"os"
"sync"
appsv1 "k8s.io/api/apps/v1"
"k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/client-go/informers"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/tools/clientcmd"
)
type ReplicaI... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "EdmondAndy/go_project",
"path": "src/go_project/http-api-server-cache-replica/main.go",
"language": "Go",
"commit": "05c8017",
"domain": "kubernetes-informer-http-api",
"fit": "tool_use"
} |
// internal/storage/clinic_repository.go
package storage
import (
"context"
"errors"
"fmt"
"time"
"github.com/zabaletac3/go-vet-api/internal/models"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "zabaletac3/vetsify-go-api",
"path": "internal/storage/clinic_repository.go",
"language": "Go",
"commit": "af06df4",
"domain": "golang mongodb repository",
"fit": "tool_use"
} |
/*
* Copyright 1999-2019 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "chaosblade-io/chaosblade-exec-cri",
"path": "exec/executor.go",
"language": "Go",
"commit": "ec3ee53",
"domain": "container chaos engineering executor",
"fit": "tool_use"
} |
package types
import (
pb "ride-sharing/shared/proto/trip"
)
type OsrmApiResponse struct {
Routes []struct {
Distance float64 `json:"distance"`
Duration float64 `json:"duration"`
Geometry struct {
Coordinates [][]float64 `json:"coordinates"`
} `json:"geometry"`
} `json:"routes"`
}
func (o *OsrmApiRespo... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "longlnOff/rider-sharing-microservice",
"path": "services/trip-service/pkg/types/types.go",
"language": "Go",
"commit": "f705d87",
"domain": "ride-sharing routing/pricing service",
"fit": "tool_use"
} |
package kuber
import (
"bytes"
"context"
"fmt"
"io"
"sort"
"time"
"github.com/inviewteam/fenrir.executor/internal/domain/entity"
"github.com/inviewteam/fenrir.executor/internal/domain/service"
"gopkg.in/yaml.v2"
v1 "k8s.io/api/core/v1"
kerrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/client-go/kuberne... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "inview-team/fenrir.executor",
"path": "internal/infrastructure/kuber/client.go",
"language": "Go",
"commit": "8d57f9d",
"domain": "kubernetes-client",
"fit": "tool_use"
} |
package telegram
import "io"
///
type Update struct {
UpdatedID int64 `json:"update_id"`
Message *Message `json:"message,omitempty"`
EditedMessage *Message `json:"edited_message,omitempty"`
ChannelPost *Message `json:"channel_post,omitempty"`
EditedChannelP... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "dhcmrlchtdj/feedbox",
"path": "internal/telegram/types.go",
"language": "Go",
"commit": "1a9f188",
"domain": "telegram-bot-api-types",
"fit": "tool_use"
} |
package v1
import (
"fmt"
"strconv"
"sugurta/api/handlers"
status_http "sugurta/api/http_status"
"sugurta/internal/entity"
"sugurta/internal/pkg/config"
"sugurta/internal/pkg/helper"
"sugurta/internal/usecase/database"
"github.com/casbin/casbin/v2"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"go.u... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "dilshodumarov/ndc_ai_seller",
"path": "api/handlers/v1/database.go",
"language": "Go",
"commit": "b594b18",
"domain": "golang_rest_api_handlers",
"fit": "tool_use"
} |
package authentication
import (
"encoding/base64"
"errors"
user_model "go_shurtiner/internal/app/model"
repository "go_shurtiner/internal/app/repository"
"golang.org/x/crypto/bcrypt"
"net/http"
"strings"
)
type BasicAuth struct {
repo repository.UserRepository
}
func NewBasicAuth(repo repository.UserReposito... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "akozadaev/go_shortiner",
"path": "internal/app/authentication/basic.go",
"language": "Go",
"commit": "8622f25",
"domain": "web-authentication",
"fit": "tool_use"
} |
package authgrpc
import (
"context"
"errors"
"my-grpc/internal/repository/storage"
ssov1 "github.com/GolangLessons/protos/gen/go/sso"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
type Auth interface {
Login(
ctx context.Context,
email string,
password string... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "MaxDubrovin252/sso-auth",
"path": "internal/server/server.go",
"language": "Go",
"commit": "547015a",
"domain": "grpc_auth_service",
"fit": "tool_use"
} |
package git
import (
"bytes"
"context"
"errors"
"fmt"
"strings"
"sync"
"text/template"
"time"
"github.com/alihamzam/git-web-server/config"
"github.com/alihamzam/git-web-server/pkg"
"github.com/go-git/go-billy/v5/memfs"
"github.com/go-git/go-git/v5"
gitcfg "github.com/go-git/go-git/v5/config"
"github.com... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "alihamzam/git-web-server",
"path": "internal/git/git.go",
"language": "Go",
"commit": "50ca942",
"domain": "git repository polling and file extraction service",
"fit": "tool_use"
} |
package discover
import (
"log"
"os"
"path/filepath"
ginkgoLoader "github.com/OpenTestSolar/testtool-golang-ginkgo/pkg/loader"
ginkgoSelector "github.com/OpenTestSolar/testtool-golang-ginkgo/pkg/selector"
ginkgoTestcase "github.com/OpenTestSolar/testtool-golang-ginkgo/pkg/testcase"
ginkgoUtil "github.com/OpenT... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "OpenTestSolar/testtool-golang-ginkgo",
"path": "cmd/discover/discover.go",
"language": "Go",
"commit": "7527053",
"domain": "test discovery CLI (Ginkgo)",
"fit": "tool_use"
} |
package http
import (
"encoding/json"
"io"
"net/http"
"github.com/Sanmoo/go-api-lambda-boilerplate/core/usecases"
)
type ElectronicGamesHandler struct {
usecases *usecases.ElectronicGamesUsecases
}
func NewElectronicGamesHandler(usecases *usecases.ElectronicGamesUsecases) *ElectronicGamesHandler {
return &Ele... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "Sanmoo/go-api-lambda-boilerplate",
"path": "adapters/inbound/http/electronicgames.go",
"language": "Go",
"commit": "dc8a06b",
"domain": "go_http_api_handlers",
"fit": "tool_use"
} |
package repository
import (
"context"
"errors"
"fmt"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue"
"github.com/aws/aws-sdk-go-v2/service/dynamodb"
"github.com/aws/aws-sdk-go-v2/service/dynamodb/types"
"go.uber.org/zap"
"parallax-gallery/backend/int... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "Ayan-sh03/parallel-galaxy",
"path": "backend/internal/auth/repository/dynamodb_user_repository.go",
"language": "Go",
"commit": "da7af7b",
"domain": "golang-dynamodb-repository",
"fit": "tool_use"
} |
package api
import (
"context"
"encoding/json"
"net/http"
"strconv"
"time"
"github.com/go-chi/chi/v5"
"github.com/jackc/pgx/v5/pgxpool"
)
type Transacao struct {
Valor int `json:"valor"`
Tipo string `json:"tipo"`
Descricao string `json:"descricao"`
}
type Extrato s... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "cecigonca/pond-rinha-backend",
"path": "api/handlers.go",
"language": "Go",
"commit": "9517f42",
"domain": "banking REST API handlers",
"fit": "tool_use"
} |
package resources
import (
"context"
"time"
"github.com/cgroschupp/hetzner-nuke/pkg/hetzner"
"github.com/cgroschupp/hetzner-nuke/pkg/nuke"
"github.com/ekristen/libnuke/pkg/registry"
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"
"github.com/hetznercloud/hcloud-go/v2/hcloud"... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "cgroschupp/hetzner-nuke",
"path": "resources/servers.go",
"language": "Go",
"commit": "9e3363e",
"domain": "cloud infrastructure management (Hetzner API)",
"fit": "tool_use"
} |
package fetchers
import (
"bytes"
"context"
"fmt"
"io"
"log"
"net/url"
"regexp"
"strings"
"github.com/erans/thumbla/utils"
"github.com/gofiber/fiber/v2"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/credentials"
"github.com/aws/aws-sdk-go-v2/serv... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "erans/thumbla",
"path": "fetchers/s3.go",
"language": "Go",
"commit": "d9eae4b",
"domain": "aws-s3-fetcher",
"fit": "tool_use"
} |
package override
import (
"context"
"fmt"
"io"
"os"
"os/signal"
"syscall"
"github.com/fatih/color"
"github.com/signadot/cli/internal/builder"
"github.com/signadot/cli/internal/config"
sbmgr "github.com/signadot/cli/internal/locald/sandboxmanager"
"github.com/signadot/cli/internal/utils"
"github.com/signad... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "signadot/cli",
"path": "internal/command/local/override/command.go",
"language": "Go",
"commit": "5a4cfce",
"domain": "devops_cli_sandbox_traffic_routing",
"fit": "tool_use"
} |
package repository
import (
"MindsWallet/internal/db"
"MindsWallet/internal/models"
)
func GetAllAccounts() ([]models.Account, error) {
var accounts []models.Account
err := db.GetDBConn().Select(&accounts,
`SELECT id,
user_id,
balance,
created_at
FROM accounts WHERE deleted_at IS ... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "Sal1mzoda/MindsWallet",
"path": "internal/repository/accounts.go",
"language": "Go",
"commit": "c82f481",
"domain": "fintech-wallet-repository",
"fit": "tool_use"
} |
package handlers
import (
"encoding/json"
"net/http"
"strconv"
"time"
"github.com/slickip/Healthy-summer-app/backend/nutrition-service/internal/middleware"
"github.com/slickip/Healthy-summer-app/backend/nutrition-service/internal/models"
"gorm.io/gorm"
)
type MealHandler struct {
DB *gorm.DB
}
func (h *Meal... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "slickip/Healthy-summer-app",
"path": "backend/nutrition-service/internal/handlers/MealHandler.go",
"language": "Go",
"commit": "7384041",
"domain": "web API nutrition tracking service",
"fit": "tool_use"
} |
package user
import (
"admin-server/api/internal/errorx"
"admin-server/api/internal/model/user"
"context"
"golang.org/x/crypto/bcrypt"
"admin-server/api/internal/svc"
"admin-server/api/internal/types"
"github.com/zeromicro/go-zero/core/logx"
)
type CreateUserLogic struct {
logx.Logger
ctx context.Conte... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "leimeng-go/admin-server",
"path": "api/internal/logic/user/create_user_logic.go",
"language": "Go",
"commit": "4effc8e",
"domain": "backend user management/auth",
"fit": "tool_use"
} |
package server
import (
"fmt"
"go-oai-gateway/internal/balancer"
"go-oai-gateway/internal/config"
"go-oai-gateway/internal/discovery"
"log"
"net/http"
"net/http/httputil"
"net/url"
"github.com/gin-gonic/gin"
)
// Server 結構體包含了伺服器運行所需的所有依賴
type Server struct {
config *config.Config
registry *discovery.... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "xblc/oaiunion",
"path": "internal/server/server.go",
"language": "Go",
"commit": "e273765",
"domain": "LLM API gateway / reverse proxy",
"fit": "tool_use"
} |
package main
import (
"context"
"fmt"
"log/slog"
"net/http"
"os"
"os/signal"
"syscall"
"time"
"net/http/pprof"
"github.com/RuvinSL/webpage-analyzer/pkg/interfaces"
"github.com/RuvinSL/webpage-analyzer/pkg/logger"
"github.com/RuvinSL/webpage-analyzer/pkg/metrics"
"github.com/RuvinSL/webpage-analyzer/serv... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "RuvinSL/webpage-analyzer",
"path": "services/gateway/main.go",
"language": "Go",
"commit": "8ab5286",
"domain": "go microservice api gateway",
"fit": "tool_use"
} |
package initialize
import (
"strconv"
"time"
"github.com/trananh-it-hust/ChatApp/global"
"go.uber.org/zap"
"gorm.io/driver/mysql"
"gorm.io/gorm"
)
func InitializeMySQL() {
conf := global.Config.Mysql
dsn := conf.Username + ":" + conf.Password + "@tcp(" + conf.Host + ":" + strconv.Itoa(conf.Port) + ")/" + con... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "trananh-it-hust/ChatApp",
"path": "pkg/initialize/mysql.go",
"language": "Go",
"commit": "c308120",
"domain": "go-backend-mysql-initialization",
"fit": "tool_use"
} |
package odm
import (
"context"
"fmt"
"time"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
)
// Query represents a query builder for MongoDB operations
type Query struct {
model Model
filter bson.M
sort bson.D
projection bso... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "varcore/mongo-odm",
"path": "pkg/odm/query.go",
"language": "Go",
"commit": "1dcd2e4",
"domain": "mongodb odm query builder",
"fit": "tool_use"
} |
package main
import (
"context"
"fmt"
"log"
"net/http"
"github.com/go-redis/redis/v8"
)
var ctx = context.Background()
var rdb *redis.Client
func init() {
// Connect to Redis.
// IMPORTANT: Use the container name 'my-full-stack-redis' as the hostname!
rdb = redis.NewClient(&redis.Options{
Addr: "my-f... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "DanielT2024/first-docker-learning",
"path": "go-redis-app/main.go",
"language": "Go",
"commit": "fcd5a80",
"domain": "go web API with Redis",
"fit": "tool_use"
} |
package ctlog
import (
"bytes"
"context"
"errors"
"io"
"log/slog"
"os"
"path/filepath"
"time"
"filippo.io/sunlight/internal/durable"
"filippo.io/sunlight/internal/immutable"
"github.com/prometheus/client_golang/prometheus"
)
type LocalBackend struct {
dir string
metrics []prometheus.Collector
dur... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "FiloSottile/sunlight",
"path": "internal/ctlog/local.go",
"language": "Go",
"commit": "944c314",
"domain": "filesystem storage backend",
"fit": "tool_use"
} |
package cmd
import (
"fmt"
"os"
"os/exec"
"path/filepath"
"strings"
"time"
"github.com/spf13/cobra"
)
// vmSnapshotCmd represents the vm snapshot command
var vmSnapshotCmd = &cobra.Command{
Use: "snapshot",
Short: "Manage VM snapshots",
Long: `Create, list, revert, and delete VM snapshots for easy state... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "cassandragargoyle/portunix",
"path": "cmd/vm_snapshot.go",
"language": "Go",
"commit": "7f4bf94",
"domain": "vm_snapshot_cli",
"fit": "tool_use"
} |
package expr
import (
"os"
"github.com/bornholm/calli/internal/authz"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/vm"
"github.com/pkg/errors"
)
type Rule struct {
script string
}
// Exec implements authz.Rule.
func (r *Rule) Exec(env map[string]any) (bool, error) {
program, err := r.getProgram()
... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "Bornholm/calli",
"path": "internal/authz/expr/rule.go",
"language": "Go",
"commit": "14ea8c4",
"domain": "authorization rule engine",
"fit": "tool_use"
} |
package main // import "proxyServer"
import (
"encoding/json"
"fmt"
"log"
"net/http"
"os"
"time"
"github.com/labstack/echo/v4"
)
func procData(source, data string) {
if source == "rest" {
fmt.Println(source + "-" + data)
}
f, err := os.OpenFile("ipc.log", os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0644)
if ... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "edp1096/hello-skill-ipc",
"path": "proxyServer/proxyServer.go",
"language": "Go",
"commit": "c68ab87",
"domain": "Go HTTP service with IPC logging",
"fit": "tool_use"
} |
package main
import (
"birdtalk/server/core"
"birdtalk/server/handler"
"birdtalk/server/ws"
"crypto/tls"
"fmt"
"github.com/gin-gonic/gin"
"net/http"
"path/filepath"
"sort"
)
func Index(c *gin.Context) {
c.HTML(200, "index.html", nil)
}
// mapHTMLFiles 将指定目录下的所有HTML文件映射为主文件名的路由
func mapHTMLFiles(router *gin... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "robinfoxnan/BirdTalkServer",
"path": "server/main.go",
"language": "Go",
"commit": "5e3c592",
"domain": "Go Gin web server",
"fit": "tool_use"
} |
package models
import (
"encoding/json"
"fmt"
"io"
"time"
"github.com/go-playground/validator/v10"
)
// Product defines the structure for product API responses
// @Description Product represents an item in the store.
// @Tags model
type Product struct {
ID int `json:"id" example:"1"`
// Name of the product
... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "ahsan0098/http-server",
"path": "models/product.go",
"language": "Go",
"commit": "168d07d",
"domain": "go web api model/store",
"fit": "tool_use"
} |
package service
import (
"errors"
"fmt"
"github.com/poplovexzjip/daoyu-go/internal/module/mall/model"
"github.com/poplovexzjip/daoyu-go/internal/module/mall/repository"
)
// CategoryService 商品分类服务接口
type CategoryService interface {
CreateCategory(category *model.Category) (uint, error)
UpdateCategory(category ... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "poplovexz/daoyu-go",
"path": "internal/module/mall/service/category_service.go",
"language": "Go",
"commit": "15cc0a2",
"domain": "ecommerce-category-service",
"fit": "tool_use"
} |
package main
import (
"context"
"crypto/tls"
"fmt"
"os"
"strings"
"time"
openfgav1 "github.com/openfga/api/proto/openfga/v1"
"github.com/spf13/cobra"
"go.miloapis.com/auth-provider-openfga/internal/webhook"
iamv1alpha1 "go.miloapis.com/milo/pkg/apis/iam/v1alpha1"
resourcemanagerv1alpha1 "go.miloapis.com/mi... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "datum-cloud/auth-provider-openfga",
"path": "cmd/webhook.go",
"language": "Go",
"commit": "09951fe",
"domain": "kubernetes-authz-webhook-openfga",
"fit": "tool_use"
} |
package llm
import (
"bytes"
"context"
"encoding/json"
"fmt"
"net/http"
"time"
)
// 走 /api/chat
type OllamaClassifier struct {
BaseURL string // http://localhost:11434
Model string // qwen2.5:7b-instruct / llama3.1:8b-instruct 等
Timeout time.Duration
HTTP *http.Client
}
type olMsg struct {
Role st... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "ArtisanCloud/PowerX",
"path": "internal/server/agent/intent/llm/ollama_classifier.go",
"language": "Go",
"commit": "7ea6b3a",
"domain": "llm-intent-classification/ollama-client",
"fit": "tool_use"
} |
package cockroach
import (
"context"
"database/sql"
"fmt"
"time"
"github.com/gin-gonic/gin"
"github.com/jackc/pgconn"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/log/zapadapter"
"github.com/jackc/pgx/v4/pgxpool"
"github.com/lib/pq"
"github.com/pkg/errors"
"go.uber.org/zap"
)
func NewConnectionPool... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "tannhac2310/MMLABEL",
"path": "pkg/database/cockroach/util.go",
"language": "Go",
"commit": "a3cfe0e",
"domain": "golang cockroachdb database utilities",
"fit": "tool_use"
} |
package main
import (
"context"
"database/sql"
"encoding/json"
"io"
"net/http"
"time"
_ "github.com/mattn/go-sqlite3"
)
type DollarPrice struct {
Bid string `json:"bid"`
}
type EconomiaUSDBRL struct {
USDBRL struct {
Code string `json:"code"`
Codein string `json:"codein"`
Name string ... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "gblcarvalho/go-expert-client-server-api",
"path": "server.go",
"language": "Go",
"commit": "25e5b3f",
"domain": "go_http_api_sqlite_service",
"fit": "tool_use"
} |
package lottery
import (
"context"
"github.com/jialechen7/go-lottery/app/lottery/cmd/rpc/pb"
"github.com/jialechen7/go-lottery/app/lottery/model"
"github.com/jialechen7/go-lottery/common/utility"
"github.com/pkg/errors"
"github.com/jialechen7/go-lottery/app/lottery/cmd/api/internal/svc"
"github.com/jialechen7/... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "jialechen7/LuckyGo",
"path": "app/lottery/cmd/api/internal/logic/lottery/add_lottery_participation_logic.go",
"language": "Go",
"commit": "9548ea8",
"domain": "backend API service (lottery participation)",
"fit": "tool_use"
} |
package db
import (
"context"
)
type TransferTxParams struct {
A1_ID int64 `json:"from_account_id"`
A2_ID int64 `json:"to_account_id"`
Amount int64 `json:"amount"`
}
type TransferTxResult struct {
Transfer Transfer `json:"transfer"`
FromAccount Account `json:"from_account"`
ToAccount Account `json:"t... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "yuspavel/SimpleBank",
"path": "db/sqlc/tx_transfer.go",
"language": "Go",
"commit": "32fcf15",
"domain": "database transactions / fintech transfer logic",
"fit": "tool_use"
} |
package controller
import (
"Letterboxd/model"
"context"
"encoding/json"
"fmt"
"log"
"net/http"
"os"
"github.com/gorilla/mux"
"github.com/joho/godotenv"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/o... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "Harshvardhan2164/LessGo",
"path": "Simple-Letterboxd/controller/controller.go",
"language": "Go",
"commit": "8fb3f0a",
"domain": "Go REST API with MongoDB",
"fit": "tool_use"
} |
package db
import (
"context"
"notification-service/functions/services"
"notification-service/functions/shared"
"github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue"
"github.com/aws/aws-sdk-go-v2/feature/dynamodb/expression"
"github.com/aws/aws-sdk-go-v2/service/dynamodb/types"
)
var (
ColConfigConte... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "deepakumarvu/notification-service",
"path": "functions/db/systemconfigdb.go",
"language": "Go",
"commit": "0e75d7b",
"domain": "go-dynamodb-config-service",
"fit": "tool_use"
} |
package api
import (
"context"
"net/http"
"os"
"strings"
"gpsnav/internal/store"
"gpsnav/internal/webhooks"
"gpsnav/internal/auth"
)
type Server struct {
Store store.Store
Pub *webhooks.Publisher
Auth *auth.Verifier
Broker EventBroker
}
// NewServer creates a Server. I... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "joshuarotgers/USPS_Main",
"path": "internal/api/server.go",
"language": "Go",
"commit": "7bd82f7",
"domain": "backend API server setup (Go)",
"fit": "tool_use"
} |
package db
import (
"context"
"errors"
"fmt"
"os"
"path/filepath"
"time"
"github.com/google/uuid"
influxdb "github.com/influxdata/influxdb-client-go/v2"
influxdb_write "github.com/influxdata/influxdb-client-go/v2/api/write"
"google.golang.org/protobuf/reflect/protoreflect"
"kiezbox/internal/github.com/mes... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "technologiestiftung/kiezbox-gateway-service",
"path": "internal/db/write.go",
"language": "Go",
"commit": "507a029",
"domain": "influxdb-ingestion-cache",
"fit": "tool_use"
} |
package controller
import (
"net/http"
"github.com/gin-gonic/gin"
)
// CreateSet handles the creation of a new set.
func (c *IPSetController) CreateSet(ctx *gin.Context) {
var req struct {
SetName string `json:"setName"`
}
if err := ctx.ShouldBindJSON(&req); err != nil {
ctx.JSON(http.StatusBadRequest, gin.... | {
"source": "nvidia/Nemotron-Pretraining-Code-v3",
"repo": "vitaliy-sn/ipset-ui",
"path": "api/internal/controller/set.go",
"language": "Go",
"commit": "d7936ac",
"domain": "network/ipset REST controller",
"fit": "tool_use"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.