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
Dataset Description
This dataset was compiled from code repositories hosted on Gitee, China's largest code hosting platform and a leading alternative to GitHub in the Chinese developer community. Gitee is widely used by Chinese developers, enterprises, and open-source projects, making this dataset particularly valuable for training code models with strong Chinese language understanding and Chinese coding conventions.
Dataset Summary
| Statistic | Value |
|---|---|
| Total Files | 819,472,785 |
| Total Repositories | 3,105,923 |
| Total Size | 536 GB (compressed Parquet) |
| Programming Languages | 554 |
| File Format | Parquet with Zstd compression (468 files) |
Key Features
- Large-scale Chinese code corpus: Contains code from over 3 million repositories, many featuring Chinese comments, documentation, and variable names
- Diverse language coverage: Spans 554 programming languages identified by go-enry (based on GitHub Linguist rules)
- Rich metadata: Includes repository name, file path, detected language, license information, and file size
- Enterprise and open-source projects: Includes code from both individual developers and Chinese enterprises
- Quality filtered: Extensive filtering to remove vendor code, build artifacts, generated files, and low-quality content
Languages
The dataset includes 554 programming languages. The top 30 languages by file count:
| 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 |
Licenses
The dataset includes files from repositories with various licenses. Repositories with restrictive licenses (CC-BY-ND variants, Commons Clause, SSPL) were excluded:
| 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
| Field | Type | Description |
|---|---|---|
code |
string | Content of the source file (UTF-8 encoded) |
repo_name |
string | Name of the Gitee repository (format: username/repo) |
path |
string | Path of the file within the repository (relative to repo root) |
language |
string | Programming language as identified by go-enry |
license |
string | License of the repository (SPDX identifier or "unknown") |
size |
int64 | Size of the source file in bytes |
Data Format
- Format: Apache Parquet with Zstd compression
- File Structure: 468 files (
gitee_0000.parquettogitee_0467.parquet)
Data Splits
All examples are in the train split. There is no validation or test split.
Example Data Point
{
'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
}
Dataset Creation
Pipeline Overview
The dataset was created through a multi-stage pipeline:
- Repository Discovery
- Branch Selection: Selecting the main branch for each repository (priority:
master>main>develop>dev> first branch) - Repository Downloading
- Content Extraction: Extracting and filtering source code files
- Parquet Generation: Writing filtered records to Parquet shards with Zstd compression
Language Detection
Programming languages are detected using go-enry, a Go port of GitHub's Linguist library. Only files classified as Programming or Markup language types are included (Data and Prose types are excluded).
License Detection
Licenses are detected by:
- Scanning for license files (
LICENSE,LICENSE.txt,LICENSE.md,COPYING, etc.) - Matching license text against known patterns (MIT, Apache 2.0, GPL variants, BSD, Creative Commons, etc.)
- Defaulting to "unknown" if no license can be detected
Blocked Licenses: The following restrictive licenses are excluded from the dataset:
cc-by-nd,cc-by-nd-2.0,cc-by-nd-3.0,cc-by-nd-4.0(Creative Commons No-Derivatives)commons-clausesspl,sspl-1.0(Server Side Public License)
File Filtering
Extensive filtering is applied to ensure data quality:
Size Limits
| Limit | Value |
|---|---|
| Max repository ZIP size | 48 MB |
| Max single file size | 1 MB |
| Max line length | 1,000 characters |
Excluded Directories
- Configuration:
.git/,.github/,.gitlab/,.vscode/,.idea/,.vs/,.settings/,.eclipse/,.project/,.metadata/ - Vendor/Dependencies:
node_modules/,bower_components/,jspm_packages/,vendor/,third_party/,3rdparty/,external/,packages/,deps/,lib/vendor/,target/dependency/,Pods/ - Build Output:
build/,dist/,out/,bin/,target/,release/,debug/,.next/,.nuxt/,_site/,_build/,__pycache__/,.pytest_cache/,cmake-build-*,.gradle/,.maven/
Excluded Files
- 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 Files: Any file containing
.min.in the name - Binary Files:
.exe,.dll,.so,.dylib,.a,.lib,.o,.obj,.jar,.war,.ear,.class,.pyc,.pyo,.wasm,.bin,.dat,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.zip,.tar,.gz,.bz2,.7z,.rar,.jpg,.jpeg,.png,.gif,.bmp,.ico,.svg,.mp3,.mp4,.avi,.mov,.wav,.flac,.ttf,.otf,.woff,.woff2,.eot - System Files:
.DS_Store,thumbs.db
Content Filtering
- UTF-8 Validation: Files must be valid UTF-8 encoded text
- Binary Detection: Files detected as binary by go-enry are excluded
- Generated Files: Files with generation markers in the first 500 bytes are excluded:
generated by,do not edit,auto-generated,autogenerated,automatically generated,code generator,generated code,this file is generated,@generated,<auto-generated
- Empty Files: Files that are empty or contain only whitespace are excluded
- Long Lines: Files with any line exceeding 1,000 characters are excluded
- go-enry Filters: Additional filtering using go-enry's
IsVendor(),IsImage(),IsDotFile(),IsTest(), andIsGenerated()functions - Documentation-only Repos: Repositories containing only documentation files (no actual code) are skipped
Source Data
All data originates from public repositories hosted on Gitee.
Considerations for Using the Data
Personal and Sensitive Information
The dataset may contain:
- Email addresses in code comments or configuration files
- API keys or credentials that were accidentally committed
- Personal information in comments or documentation
Users should exercise caution and implement appropriate filtering when using this data.
Licensing Information
This dataset is a collection of source code from repositories with various licenses. Any use of all or part of the code gathered in this dataset must abide by the terms of the original licenses, including attribution clauses when relevant. The license field in each data point indicates the license of the source repository.
- Downloads last month
- 1,677