Datasets:
code stringlengths 1 1.05M | repo_name stringlengths 7 65 | path stringlengths 2 255 | language stringclasses 236
values | license stringclasses 24
values | size int64 1 1.05M |
|---|---|---|---|---|---|
package com.study.aio.client;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.AsynchronousSocketChannel;
import java.nio.channels.CompletionHandler;
import java.util.concurrent.CountDownLatch;
/**
* Creat... | vincentjava/netty-study | src/main/java/com/study/aio/client/AsyncTimeClientHandler.java | Java | apache-2.0 | 3,563 |
package com.study.aio.client;
/**
* @description:
* @author: wusz
* @date: 2018/6/12
*/
public class Demo1 {
}
| vincentjava/netty-study | src/main/java/com/study/aio/client/Demo1.java | Java | apache-2.0 | 116 |
package com.study.aio.client;
import org.apache.commons.lang3.StringUtils;
import java.io.*;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* Created by wusz on 2018/5/17.
*/
public class Test implements Serializable {
public String s = ... | vincentjava/netty-study | src/main/java/com/study/aio/client/Test.java | Java | apache-2.0 | 5,568 |
package com.study.aio.client;
/**
* Created by wusz on 2018/5/17.
*/
public class TimeClient {
public static void main(String[] args) {
new Thread(new AsyncTimeClientHandler("127.0.0.1", 8080)).start();
}
}
| vincentjava/netty-study | src/main/java/com/study/aio/client/TimeClient.java | Java | apache-2.0 | 226 |
package com.study.aio.server;
import java.nio.ByteBuffer;
import java.nio.channels.AsynchronousSocketChannel;
import java.nio.channels.CompletionHandler;
/**
* Created by wusz on 2018/5/16.
*/
public class AcceptCompletionHandler implements CompletionHandler<AsynchronousSocketChannel,AsyncTimeServerHandler> {
... | vincentjava/netty-study | src/main/java/com/study/aio/server/AcceptCompletionHandler.java | Java | apache-2.0 | 802 |
package com.study.aio.server;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.AsynchronousServerSocketChannel;
import java.util.concurrent.CountDownLatch;
public class AsyncTimeServerHandler implements Runnable {
private int port;
AsynchronousServerSocketChannel asynchr... | vincentjava/netty-study | src/main/java/com/study/aio/server/AsyncTimeServerHandler.java | Java | apache-2.0 | 1,121 |
package com.study.aio.server;
import io.netty.util.internal.StringUtil;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.AsynchronousSocketChannel;
import java.nio.channels.CompletionHandler;
import java.util.Date;
/**
* Created by wusz on 2018/5/16.
*/
public class ReadCompletionHa... | vincentjava/netty-study | src/main/java/com/study/aio/server/ReadCompletionHandler.java | Java | apache-2.0 | 2,281 |
package com.study.aio.server;
public class TimeServer {
public static void main(String[] args) {
AsyncTimeServerHandler timeServer = new AsyncTimeServerHandler(8080);
new Thread(timeServer,"AIO-AsyncTimeServerHandler-001").start();
}
}
| vincentjava/netty-study | src/main/java/com/study/aio/server/TimeServer.java | Java | apache-2.0 | 261 |
package com.study.four.client;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChann... | vincentjava/netty-study | src/main/java/com/study/four/client/TimeClient.java | Java | apache-2.0 | 1,696 |
package com.study.four.client;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandlerAdapter;
import io.netty.channel.ChannelHandlerContext;
import java.util.logging.Logger;
/**
* Created by wusz on 2018/5/28.
*/
public class TimeClientHandler extends ChannelHandler... | vincentjava/netty-study | src/main/java/com/study/four/client/TimeClientHandler.java | Java | apache-2.0 | 1,341 |
package com.study.four.server;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.Socke... | vincentjava/netty-study | src/main/java/com/study/four/server/TimeServer.java | Java | apache-2.0 | 1,778 |
package com.study.four.server;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandlerAdapter;
import io.netty.channel.ChannelHandlerContext;
import java.util.Date;
/**
* Created by wusz on 2018/5/28.
*/
public class TimeServerHandler extends ChannelHandlerAdapter {
... | vincentjava/netty-study | src/main/java/com/study/four/server/TimeServerHandler.java | Java | apache-2.0 | 1,098 |
package com.study.http.server;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io... | vincentjava/netty-study | src/main/java/com/study/http/server/HttpFileServer.java | Java | apache-2.0 | 1,159 |
package com.study.nio.client;
/**
* Create by wusz on 2018/5/14
*/
public class TimeClient {
public static void main(String[] args) {
int port = 8080;
new Thread(new TimeClientHandler("127.0.0.1",port)).start();
}
}
| vincentjava/netty-study | src/main/java/com/study/nio/client/TimeClient.java | Java | apache-2.0 | 243 |
package com.study.nio.client;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.SocketChannel;
import java.util.Iterator;
import java.util.Set;
/**
* Create by wusz on 2018/5/14... | vincentjava/netty-study | src/main/java/com/study/nio/client/TimeClientHandler.java | Java | apache-2.0 | 4,048 |
package com.study.nio.server;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
import java.util.Date;
import java.uti... | vincentjava/netty-study | src/main/java/com/study/nio/server/MultiplexerTimeServer.java | Java | apache-2.0 | 3,801 |
package com.study.nio.server;
/**
* Create by wusz on 2018/5/11
*/
public class TimeServer {
public static void main(String[] args) {
int port = 8080;
MultiplexerTimeServer timeServer = new MultiplexerTimeServer(port);
new Thread(timeServer,"NIO-MultiplexerTimeServer").start();
}
}
| vincentjava/netty-study | src/main/java/com/study/nio/server/TimeServer.java | Java | apache-2.0 | 318 |
package com.study.three.client;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChan... | vincentjava/netty-study | src/main/java/com/study/three/client/TimeClient.java | Java | apache-2.0 | 1,697 |
package com.study.three.client;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandlerAdapter;
import io.netty.channel.ChannelHandlerContext;
import java.util.logging.Logger;
/**
* Created by wusz on 2018/5/28.
*/
public class TimeClientHandler extends ChannelHandle... | vincentjava/netty-study | src/main/java/com/study/three/client/TimeClientHandler.java | Java | apache-2.0 | 1,500 |
package com.study.three.server;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.Sock... | vincentjava/netty-study | src/main/java/com/study/three/server/TimeServer.java | Java | apache-2.0 | 1,779 |
package com.study.three.server;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandlerAdapter;
import io.netty.channel.ChannelHandlerContext;
import java.util.Date;
/**
* Created by wusz on 2018/5/28.
*/
public class TimeServerHandler extends ChannelHandlerAdapter {... | vincentjava/netty-study | src/main/java/com/study/three/server/TimeServerHandler.java | Java | apache-2.0 | 1,198 |
package com.kariqu.cldld.wss;
import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame;
public class CloseFramer extends CloseWebSocketFrame {
private CloseFramer(WebsocketStatusCode code)
{
super(code.getStatusCode(), code.getStr());
}
public static CloseFramer normalClose()
{
... | vincentjava/ws_server | src/main/java/com/kariqu/cldld/wss/CloseFramer.java | Java | unknown | 532 |
package com.kariqu.cldld.wss;
public class Main {
public static void main(String[] args) throws InterruptedException {
Thread thread = new Thread(new WebSocketServer(7910));
thread.start();
thread.join();
}
}
| vincentjava/ws_server | src/main/java/com/kariqu/cldld/wss/Main.java | Java | unknown | 242 |
/*
* Copyright 2012 The Netty Project
*
* The Netty Project licenses this file to you 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 ... | vincentjava/ws_server | src/main/java/com/kariqu/cldld/wss/WebSocketFrameHandler.java | Java | unknown | 4,739 |
/*
* Copyright 2012 The Netty Project
*
* The Netty Project licenses this file to you 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 ... | vincentjava/ws_server | src/main/java/com/kariqu/cldld/wss/WebSocketIndexPageHandler.java | Java | unknown | 4,887 |
/*
* Copyright 2012 The Netty Project
*
* The Netty Project licenses this file to you 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 ... | vincentjava/ws_server | src/main/java/com/kariqu/cldld/wss/WebSocketServer.java | Java | unknown | 2,372 |
/*
* Copyright 2012 The Netty Project
*
* The Netty Project licenses this file to you 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 ... | vincentjava/ws_server | src/main/java/com/kariqu/cldld/wss/WebSocketServerIndexPage.java | Java | unknown | 3,686 |
/*
* Copyright 2012 The Netty Project
*
* The Netty Project licenses this file to you 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 ... | vincentjava/ws_server | src/main/java/com/kariqu/cldld/wss/WebSocketServerInitializer.java | Java | unknown | 2,233 |
package com.kariqu.cldld.wss;
/*
0-999
Status codes in the range 0-999 are not used.
1000-2999
Status codes in the range 1000-2999 are reserved for definition by
this protocol, its future revisions, and extensions specified in a
permanent and readily avail... | vincentjava/ws_server | src/main/java/com/kariqu/cldld/wss/WebsocketStatusCode.java | Java | unknown | 1,419 |
/*
* Copyright 2012 The Netty Project
*
* The Netty Project licenses this file to you 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 ... | vincentjava/ws_server | src/main/java/com/kariqu/cldld/wss/package-info.java | Java | unknown | 1,091 |
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/src/oatpp/core/base/Environment.hpp" OATPP_VERSION_MACRO REGEX "#define OATPP_VERSION \"[0-9]+.[0-9]+.[0-9]+\"$")
string(REGEX REPLACE "#define OATPP_VERSION \"([0-9]+.[0-9]+.[0-9]+)\"$" "\\1" oatpp_VERSION "${OATPP_VERSION_MACRO}"... | vincent-in-black-sesame/oat | CMakeLists.txt | CMake | apache-2.0 | 5,776 |
@PACKAGE_INIT@
if(NOT TARGET oatpp::@OATPP_MODULE_NAME@)
include("${CMAKE_CURRENT_LIST_DIR}/@OATPP_MODULE_NAME@Targets.cmake")
endif()
set_and_check(@OATPP_MODULE_NAME@_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include/oatpp-@OATPP_MODULE_VERSION@/@OATPP_MODULE_NAME@/")
set_and_check(@OATPP_MODULE_NAME@_LIBRARIES_DIRS ... | vincent-in-black-sesame/oat | cmake/module-config.cmake.in | CMake | apache-2.0 | 540 |
#######################################################################################
## Set module properties
## all oatpp modules should have the same installation procedure
##
## installation tree:
##
## prefix/
## |
## |- include/oatpp-<version>/<module-name>
## - lib/
## |
## |- cmake/<module-nam... | vincent-in-black-sesame/oat | cmake/module-install.cmake | CMake | apache-2.0 | 4,366 |
macro(configure_msvc_runtime)
if(MSVC)
# Set compiler options.
set(variables
CMAKE_C_FLAGS
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_RELEASE
... | vincent-in-black-sesame/oat | cmake/msvc-runtime.cmake | CMake | apache-2.0 | 1,079 |
#
# Packaging
# https://cmake.org/cmake/help/latest/module/CPack.html
#
set( CPACK_PACKAGE_NAME ${PROJECT_NAME} )
set( CPACK_PACKAGE_VENDOR "Balluff" )
set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "oatpp - Light and powerful C++ web framework" )
set( CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/oatpp/oatpp" )
set( CPACK_P... | vincent-in-black-sesame/oat | cpack.cmake | CMake | apache-2.0 | 4,474 |
#include "oatpp/parser/json/mapping/ObjectMapper.hpp"
#include "oatpp/core/macro/codegen.hpp"
typedef oatpp::parser::Caret ParsingCaret;
typedef oatpp::parser::json::mapping::Serializer Serializer;
typedef oatpp::parser::json::mapping::Deserializer Deserializer;
#include OATPP_CODEGEN_BEGIN(DTO)
class EmptyDto : pub... | vincent-in-black-sesame/oat | fuzzers/oatpp/parser/json/mapping/ObjectMapper.cpp | C++ | apache-2.0 | 745 |
#######################################################################################################
## oatpp
add_library(oatpp
oatpp/algorithm/CRC.cpp
oatpp/algorithm/CRC.hpp
oatpp/codegen/ApiClient_define.hpp
oatpp/codegen/ApiClient_undef.hpp
oatpp/codegen/api_controller/b... | vincent-in-black-sesame/oat | src/CMakeLists.txt | CMake | apache-2.0 | 15,263 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp-test/Checker.cpp | C++ | apache-2.0 | 2,209 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp-test/Checker.hpp | C++ | apache-2.0 | 2,299 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp-test/UnitTest.cpp | C++ | apache-2.0 | 2,045 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp-test/UnitTest.hpp | C++ | apache-2.0 | 2,869 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp-test/web/ClientServerTestRunner.hpp | C++ | apache-2.0 | 4,611 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp/algorithm/CRC.cpp | C++ | apache-2.0 | 2,095 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp/algorithm/CRC.hpp | C++ | apache-2.0 | 1,965 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp/codegen/ApiClient_define.hpp | C++ | apache-2.0 | 13,479 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp/codegen/ApiClient_undef.hpp | C++ | apache-2.0 | 3,149 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp/codegen/ApiController_define.hpp | C++ | apache-2.0 | 1,706 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp/codegen/ApiController_undef.hpp | C++ | apache-2.0 | 1,622 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp/codegen/DTO_define.hpp | C++ | apache-2.0 | 1,561 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp/codegen/DTO_undef.hpp | C++ | apache-2.0 | 1,479 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp/codegen/DbClient_define.hpp | C++ | apache-2.0 | 6,164 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp/codegen/DbClient_undef.hpp | C++ | apache-2.0 | 2,755 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp/codegen/api_controller/auth_define.hpp | C++ | apache-2.0 | 4,013 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp/codegen/api_controller/auth_undef.hpp | C++ | apache-2.0 | 1,421 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp/codegen/api_controller/base_define.hpp | C++ | apache-2.0 | 27,070 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp/codegen/api_controller/base_undef.hpp | C++ | apache-2.0 | 4,471 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp/codegen/api_controller/bundle_define.hpp | C++ | apache-2.0 | 1,787 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | vincent-in-black-sesame/oat | src/oatpp/codegen/api_controller/bundle_undef.hpp | C++ | apache-2.0 | 1,257 |
Gitee Code Dataset
A comprehensive, large-scale code dataset compiled from Gitee, China's premier code hosting platform. This dataset is specifically designed to support training code models with strong Chinese language understanding and authentic Chinese coding practices.
Overview
The Gitee Code Dataset represents one of the largest code corpora from a Chinese-native platform, capturing both open-source and enterprise projects across 554 programming languages. It serves as a critical resource for developing multilingual code understanding models tailored to Chinese developers and organizations.
Key Statistics
| Metric | Value |
|---|---|
| Total Files | 819,472,785 |
| Total Repositories | 3,105,923 |
| Compressed Size | 536 GB (Parquet with Zstd) |
| Programming Languages | 554 |
| Total Parquet Shards | 468 files |
Dataset Characteristics
Scope and Coverage
This dataset captures code from over 3 million repositories hosted on Gitee, including:
- Chinese-centric content: Extensive coverage of code written by Chinese developers, featuring Chinese comments, documentation, and variable naming conventions
- Diverse language ecosystem: Support for 554 distinct programming languages
- Enterprise and open-source projects: A balanced mix from individual developers to major Chinese enterprises
- Quality-assured: Rigorously filtered to exclude vendor code, build artifacts, generated files, and low-quality content
Programming Languages
The dataset encompasses 554 languages across multiple categories. The 30 most represented languages by file count are:
| Rank | Language | File Count |
|---|---|---|
| 1 | Java | 293,439,777 |
| 2 | JavaScript | 77,715,425 |
| 3 | C | 62,836,721 |
| 4 | C++ | 49,134,251 |
| 5 | HTML | 46,191,063 |
| 6 | Vue | 40,468,646 |
| 7 | PHP | 37,132,954 |
| 8 | C# | 33,842,369 |
| 9 | Python | 25,192,704 |
| 10 | CSS | 20,802,464 |
| 11 | TypeScript | 20,122,528 |
| 12 | Go | 16,176,561 |
| 13 | Shell | 8,371,429 |
| 14 | Makefile | 6,341,964 |
| 15 | Java Server Pages | 6,224,523 |
| 16 | TSX | 5,768,542 |
| 17 | CMake | 5,581,774 |
| 18 | SCSS | 5,291,031 |
| 19 | Objective-C | 4,922,736 |
| 20 | Less | 4,669,672 |
| 21 | Ruby | 3,027,385 |
| 22 | Kotlin | 2,986,211 |
| 23 | Scala | 2,869,640 |
| 24 | Rust | 2,466,122 |
| 25 | Starlark | 2,027,514 |
| 26 | Dart | 2,010,079 |
| 27 | Unix Assembly | 1,900,320 |
| 28 | Fluent | 1,882,380 |
| 29 | HTML+Razor | 1,863,914 |
| 30 | Swift | 1,607,477 |
License Distribution
Files are distributed across various open-source licenses. Repositories with restrictive terms (CC-BY-ND, Commons Clause, SSPL) have been excluded to ensure broader usability.
| License | File Count |
|---|---|
| Apache 2.0 | 273,706,950 |
| MIT | 201,880,040 |
| Unknown | 195,868,240 |
| AGPL 3.0 | 60,181,320 |
| BSD | 30,013,190 |
| GPL 2.0 | 27,831,530 |
| LGPL 3.0 | 11,746,750 |
| LGPL 2.1 | 4,807,600 |
| BSD-3-Clause | 4,442,480 |
| CC0 1.0 | 3,144,920 |
| GPL 3.0 | 1,631,590 |
| Unlicense | 1,181,930 |
| BSD-2-Clause | 1,154,300 |
| EPL 1.0 | 1,045,470 |
| Other Licenses | ~5,800,000 |
Dataset Structure
Data Fields
Each record contains six fields providing comprehensive metadata and content information:
| Field | Type | Description |
|---|---|---|
code |
string | The complete source code content in UTF-8 encoding |
repo_name |
string | Repository identifier in the format username/repository_name |
path |
string | File path relative to the repository root |
language |
string | Programming language identified using go-enry |
license |
string | Repository license (SPDX identifier or "unknown") |
size |
int64 | File size in bytes |
Sample Record
{
"code": "package com.example.demo;\n\nimport org.springframework.boot.SpringApplication;\n...",
"repo_name": "username/spring-demo",
"path": "src/main/java/com/example/demo/Application.java",
"language": "Java",
"license": "apache-2.0",
"size": 1234
}
File Format
- Format: Apache Parquet with Zstd compression
- Shards: 468 files (
gitee_0000.parquetthroughgitee_0467.parquet) - Split: All examples are included in a single training split (no validation or test splits)
Data Creation Process
Pipeline Stages
The dataset was constructed through a systematic multi-stage pipeline:
- Repository Discovery – Identification of relevant repositories on Gitee
- Branch Selection – Extraction of the primary branch using priority order:
master→main→develop→dev→ first available branch - Repository Cloning – Download of selected repositories
- Content Extraction and Filtering – Intelligent extraction and quality filtering of source code files
- Parquet Serialization – Writing processed records to compressed Parquet shards
Language Detection
Programming languages are identified using go-enry, a Go implementation of GitHub's Linguist classification system. Only files classified as Programming or Markup types are retained; Data and Prose file types are excluded.
License Detection
License identification follows a three-step process:
- Scan for license files:
LICENSE,LICENSE.txt,LICENSE.md,COPYING, and similar variants - Match license text against known patterns (MIT, Apache 2.0, GPL variants, BSD, Creative Commons, etc.)
- Default to "unknown" if no license match is found
Excluded Licenses: The following restrictive licenses are filtered out to ensure broad usability:
- Creative Commons No-Derivatives:
cc-by-nd,cc-by-nd-2.0,cc-by-nd-3.0,cc-by-nd-4.0 commons-clause- Server Side Public License:
sspl,sspl-1.0
Quality Filtering
Extensive filtering mechanisms ensure dataset quality and usability:
Size Constraints
| Constraint | Limit |
|---|---|
| Maximum repository compressed size | 48 MB |
| Maximum single file size | 1 MB |
| Maximum line length | 1,000 characters |
Excluded Directories
Version Control and IDE Configuration
.git/,.github/,.gitlab/,.vscode/,.idea/,.vs/,.settings/,.eclipse/,.project/,.metadata/
Dependencies and Vendor Code
node_modules/,bower_components/,jspm_packages/,vendor/,third_party/,3rdparty/,external/,packages/,deps/,lib/vendor/,target/dependency/,Pods/
Build Artifacts and Output
build/,dist/,out/,bin/,target/,release/,debug/,.next/,.nuxt/,_site/,_build/,__pycache__/,.pytest_cache/,cmake-build-*,.gradle/,.maven/
Excluded Files
Dependency Lock Files
package-lock.json,yarn.lock,pnpm-lock.yaml,Gemfile.lock,Cargo.lock,poetry.lock,Pipfile.lock,composer.lock,go.sum,mix.lock
Minified Code
- Any file containing
.min.in the filename
Binary and Non-Code Files
- Executables:
.exe,.dll,.so,.dylib,.a,.lib,.o,.obj - Java archives:
.jar,.war,.ear,.class,.pyc,.pyo,.wasm - Documents:
.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx - Archives:
.zip,.tar,.gz,.bz2,.7z,.rar - Media:
.jpg,.jpeg,.png,.gif,.bmp,.ico,.svg,.mp3,.mp4,.avi,.mov,.wav,.flac - Fonts:
.ttf,.otf,.woff,.woff2,.eot
System Files
.DS_Store,thumbs.db
Content Validation
Files must meet the following criteria to be included:
- Text Encoding: Valid UTF-8 encoding required
- Binary Detection: Files identified as binary by go-enry are excluded
- Auto-generation Markers: Files with generation indicators in the first 500 bytes are filtered out:
- Markers:
generated by,do not edit,auto-generated,autogenerated,automatically generated,code generator,generated code,this file is generated,@generated,<auto-generated
- Markers:
- Content Quality: Empty files or those containing only whitespace are excluded
- Line Length: Files with any line exceeding 1,000 characters are excluded
- Advanced Filtering: Additional go-enry checks exclude vendor code, images, dotfiles, test files, and detected generated code
- Repository Type: Repositories containing only documentation are skipped
Usage Considerations
Data Privacy and Security
The dataset may contain sensitive information that requires careful handling:
- Email Addresses: Present in code comments, documentation, or configuration files
- Credentials: Accidentally committed API keys or authentication tokens
- Personal Information: Names, phone numbers, and other identifiable data in comments or documentation
Users should implement appropriate filtering and anonymization when preparing data for model training.
Licensing and Attribution
This dataset aggregates source code from repositories with diverse licenses. Any use of code or data derived from this dataset must comply with the original repository licenses, including attribution requirements where applicable.
The license field in each record indicates the license of the source repository. Users are responsible for:
- Reviewing applicable license terms
- Providing proper attribution when required
- Ensuring compliance with license restrictions
Technical Details
Source: Public repositories hosted on Gitee
Annotations: Machine-generated (language detection, license identification)
Multilingual Support: Includes multilingual code and documentation
Task Categories: Text generation, code modeling, language understanding
Tags: Code, Chinese language, multilingual
- Downloads last month
- 347