Dataset Viewer
Auto-converted to Parquet Duplicate
file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
.vitepress/config.mts
TypeScript
import { defineConfig } from 'vitepress' const fileAndStyles: Record<string, string> = {} // https://vitepress.dev/reference/site-config export default defineConfig({ title: 'naive-ui-vitepress-demo', description: 'naive-ui vitepress demo', themeConfig: { // https://vitepress.dev/reference/default-theme-config nav: [{ text: 'Home', link: '/' }], sidebar: [ { text: 'Examples', items: [ { text: 'Button Demo 1', link: '/button-demo-1' }, { text: 'Button Demo 2', link: '/button-demo-2' } ] } ] }, vite: { ssr: { noExternal: ['naive-ui', 'date-fns', 'vueuc'] } }, postRender(context) { const styleRegex = /<css-render-style>((.|\s)+)<\/css-render-style>/ const vitepressPathRegex = /<vitepress-path>(.+)<\/vitepress-path>/ const style = styleRegex.exec(context.content)?.[1] const vitepressPath = vitepressPathRegex.exec(context.content)?.[1] if (vitepressPath && style) { fileAndStyles[vitepressPath] = style } context.content = context.content.replace(styleRegex, '') context.content = context.content.replace(vitepressPathRegex, '') }, transformHtml(code, id) { const html = id.split('/').pop() if (!html) return const style = fileAndStyles[`/${html}`] if (style) { return code.replace(/<\/head>/, style + '</head>') } } })
07akioni/naive-ui-vitepress-demo
8
This is a demo for using `naive-ui` in `vitepress` with SSR enabled.
TypeScript
07akioni
07akioni
DeepSeek
.vitepress/theme/index.js
JavaScript
// .vitepress/theme/index.js import { defineComponent, h, inject } from 'vue' import DefaultTheme from 'vitepress/theme' import { NConfigProvider } from 'naive-ui' import { setup } from '@css-render/vue3-ssr' import { useRoute } from 'vitepress' const { Layout } = DefaultTheme const CssRenderStyle = defineComponent({ setup() { const collect = inject('css-render-collect') return { style: collect() } }, render() { return h('css-render-style', { innerHTML: this.style }) } }) const VitepressPath = defineComponent({ setup() { const route = useRoute() return () => { return h('vitepress-path', null, [route.path]) } } }) const NaiveUIProvider = defineComponent({ render() { return h( NConfigProvider, { abstract: true, inlineThemeDisabled: true }, { default: () => [ h(Layout, null, { default: this.$slots.default?.() }), import.meta.env.SSR ? [h(CssRenderStyle), h(VitepressPath)] : null ] } ) } }) export default { extends: DefaultTheme, Layout: NaiveUIProvider, enhanceApp: ({ app }) => { if (import.meta.env.SSR) { const { collect } = setup(app) app.provide('css-render-collect', collect) } } }
07akioni/naive-ui-vitepress-demo
8
This is a demo for using `naive-ui` in `vitepress` with SSR enabled.
TypeScript
07akioni
07akioni
DeepSeek
eslint.config.mjs
JavaScript
// @ts-check import { createConfigForNuxt } from '@nuxt/eslint-config/flat' // Run `npx @eslint/config-inspector` to inspect the resolved config interactively export default createConfigForNuxt({ features: { // Rules for module authors tooling: true, // Rules for formatting stylistic: true, }, dirs: { src: [ './playground', ], }, }) .append( // your custom flat config here... )
07akioni/nuxtjs-naive-ui
27
The official nuxt module for naive-ui that supports Nuxt.js SSR.
TypeScript
07akioni
07akioni
DeepSeek
playground/app.vue
Vue
<template> <NConfigProvider inline-theme-disabled> <NButton>Hello World</NButton> </NConfigProvider> </template> <script setup lang="ts"> import { NButton, NConfigProvider } from 'naive-ui' </script>
07akioni/nuxtjs-naive-ui
27
The official nuxt module for naive-ui that supports Nuxt.js SSR.
TypeScript
07akioni
07akioni
DeepSeek
playground/nuxt.config.ts
TypeScript
export default defineNuxtConfig({ modules: ['../src/module'], devtools: { enabled: true }, })
07akioni/nuxtjs-naive-ui
27
The official nuxt module for naive-ui that supports Nuxt.js SSR.
TypeScript
07akioni
07akioni
DeepSeek
src/module.ts
TypeScript
import { defineNuxtModule, createResolver, addPlugin } from '@nuxt/kit' // Module options TypeScript interface definition export interface ModuleOptions {} export default defineNuxtModule<ModuleOptions>({ meta: { name: 'nuxtjs-naive-ui', configKey: 'naive-ui', }, // Default configuration options of the Nuxt module defaults: {}, setup(_options, _nuxt) { _nuxt.options.nitro.plugins = _nuxt.options.nitro.plugins || [] // Setup transpile const transpile = process.env.NODE_ENV === 'production' ? ['naive-ui'] : [] if (!_nuxt.options.build.transpile) { _nuxt.options.build.transpile = transpile } else { _nuxt.options.build.transpile = _nuxt.options.build.transpile.concat(transpile) } const resolver = createResolver(import.meta.url) // Do not add the extension since the `.ts` will be transpiled to `.mjs` after `npm run prepack` addPlugin(resolver.resolve('./runtime/plugin')) }, })
07akioni/nuxtjs-naive-ui
27
The official nuxt module for naive-ui that supports Nuxt.js SSR.
TypeScript
07akioni
07akioni
DeepSeek
src/runtime/plugin.ts
TypeScript
import { setup } from '@css-render/vue3-ssr' import { defineNuxtPlugin } from '#app' export default defineNuxtPlugin((_nuxtApp) => { if (import.meta.server) { const { collect } = setup(_nuxtApp.vueApp) _nuxtApp.hooks.hook('app:rendered', () => { if (_nuxtApp.ssrContext) { if (typeof _nuxtApp.ssrContext.styles === 'string') { _nuxtApp.ssrContext.styles += collect() } else if (!_nuxtApp.ssrContext.styles) { _nuxtApp.ssrContext.styles = collect() } } }) } })
07akioni/nuxtjs-naive-ui
27
The official nuxt module for naive-ui that supports Nuxt.js SSR.
TypeScript
07akioni
07akioni
DeepSeek
test/basic.test.ts
TypeScript
import { fileURLToPath } from 'node:url' import { describe, it, expect } from 'vitest' import { setup, $fetch } from '@nuxt/test-utils/e2e' describe('ssr', async () => { await setup({ rootDir: fileURLToPath(new URL('./fixtures/basic', import.meta.url)), }) it('renders the index page', async () => { // Get response to a server-rendered page with `$fetch`. const html = await $fetch('/') expect(html).toContain('<div>basic</div>') }) })
07akioni/nuxtjs-naive-ui
27
The official nuxt module for naive-ui that supports Nuxt.js SSR.
TypeScript
07akioni
07akioni
DeepSeek
test/fixtures/basic/app.vue
Vue
<template> <div>basic</div> </template> <script setup> </script>
07akioni/nuxtjs-naive-ui
27
The official nuxt module for naive-ui that supports Nuxt.js SSR.
TypeScript
07akioni
07akioni
DeepSeek
test/fixtures/basic/nuxt.config.ts
TypeScript
import MyModule from '../../../src/module' export default defineNuxtConfig({ modules: [ MyModule, ], })
07akioni/nuxtjs-naive-ui
27
The official nuxt module for naive-ui that supports Nuxt.js SSR.
TypeScript
07akioni
07akioni
DeepSeek
config.mjs
JavaScript
import path from "path"; import { fileURLToPath } from "url"; import HtmlWebpackPlugin from "html-webpack-plugin"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); const isRunningWebpack = !!process.env.WEBPACK; const isRunningRspack = !!process.env.RSPACK; if (!isRunningRspack && !isRunningWebpack) { throw new Error("Unknown bundler"); } /** * @type {import('webpack').Configuration | import('@rspack/cli').Configuration} */ const config = { mode: "development", devtool: false, entry: { main: "./src/index", }, plugins: [new HtmlWebpackPlugin()], output: { clean: true, path: isRunningWebpack ? path.resolve(__dirname, "webpack-dist") : path.resolve(__dirname, "rspack-dist"), filename: "[name].js", }, experiments: { css: true, }, }; export default config;
07akioni/rspack-treeshaking-issue-reprod
0
JavaScript
07akioni
07akioni
DeepSeek
rspack-dist/index.html
HTML
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Webpack App</title> <meta name="viewport" content="width=device-width, initial-scale=1"><script defer src="main.js"></script></head> <body> </body> </html>
07akioni/rspack-treeshaking-issue-reprod
0
JavaScript
07akioni
07akioni
DeepSeek
End of preview. Expand in Data Studio

GitHub Top Developer Source Code

A curated dataset of 1.3M+ source code files from GitHub's top ranked developers (2015-2025).

This dataset is based on the top ranked developers from this dataset: https://huggingface.co/datasets/ronantakizawa/github-top-developers

Dataset Summary

  • 1.3M+ source code files from repositories across ~4,700 unique developers
  • 80+ programming languages included (Python, JavaScript, TypeScript, Rust, Go, C/C++, Java, and more)
  • Source code only — config files (JSON, YAML, TOML, etc.) and documentation (Markdown, TXT) are excluded
  • Permissive licenses only (MIT, Apache-2.0, BSD, ISC, etc.)
  • Rich metadata per file: repo stars, description, primary language, developer company affiliation

Schema

Each row represents a single source file:

Column Type Description
file_path string Path within the repo (e.g. src/main.py)
file_language string Language detected from file extension (e.g. Python, JavaScript)
content string Raw source code (UTF-8)
repo_name string Full repository name (owner/repo)
repo_stars int64 GitHub star count at time of collection
repo_description string Repository description
repo_primary_language string GitHub-detected primary language of the repository
developer_username string GitHub username
developer_name string Developer display name
developer_company string Company affiliation

Note on language columns: file_language is determined per-file from the file extension (e.g. a .py file is always Python). repo_primary_language is GitHub's auto-detected primary language for the entire repository. These may differ — for example, a C header file (.hC/C++ Header) in a repo that GitHub classifies as Python.

Splits

Split Description
train ~90% of repos — for training
test ~5% of repos — for evaluation
validation ~5% of repos — for hyperparameter tuning

Splits are assigned by repository (deterministic hash), so no repo appears in multiple splits. This prevents data leakage from files in the same project.

Usage

from datasets import load_dataset

# Load a specific split
train = load_dataset("ronantakizawa/github-top-code", split="train")
test = load_dataset("ronantakizawa/github-top-code", split="test")

# Filter by language
python_files = train.filter(lambda x: x["file_language"] == "Python")

# Filter by stars
popular = train.filter(lambda x: x["repo_stars"] > 1000)

# Get files from a specific developer
dev_files = train.filter(lambda x: x["developer_username"] == "torvalds")
Downloads last month
20