text stringlengths 24 1.04M | metadata stringlengths 233 497 |
|---|---|
### File: PathTracking/rear_wheel_feedback/rear_wheel_feedback.py
"""
Path tracking simulation with rear wheel feedback steering control and PID speed control.
author: Atsushi Sakai(@Atsushi_twi)
"""
import matplotlib.pyplot as plt
import math
import numpy as np
from utils.angle import angle_mod
from scipy import i... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathTracking/rear_wheel_feedback/rear_wheel_feedback.py", "license": "mit", "size": 6323} |
### File: PathTracking/stanley_controller/stanley_controller.py
"""
Path tracking simulation with Stanley steering control and PID speed control.
author: Atsushi Sakai (@Atsushi_twi)
Ref:
- [Stanley: The robot that won the DARPA grand challenge](http://isl.ecst.csuchico.edu/DOCS/darpa2005/DARPA%202005%20Stanley.... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "PathTracking/stanley_controller/stanley_controller.py", "license": "mit", "size": 5853} |
### File: SLAM/EKFSLAM/ekf_slam.py
"""
Extended Kalman Filter SLAM example
author: Atsushi Sakai (@Atsushi_twi)
"""
import math
import matplotlib.pyplot as plt
import numpy as np
from utils.angle import angle_mod
# EKF state covariance
Cx = np.diag([0.5, 0.5, np.deg2rad(30.0)]) ** 2
# Simulation parameter
Q_sim =... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "SLAM/EKFSLAM/ekf_slam.py", "license": "mit", "size": 6924} |
### File: SLAM/FastSLAM1/fast_slam1.py
"""
FastSLAM 1.0 example
author: Atsushi Sakai (@Atsushi_twi)
"""
import math
import matplotlib.pyplot as plt
import numpy as np
from utils.angle import angle_mod
# Fast SLAM covariance
Q = np.diag([3.0, np.deg2rad(10.0)]) ** 2
R = np.diag([1.0, np.deg2rad(20.0)]) ** 2
# S... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "SLAM/FastSLAM1/fast_slam1.py", "license": "mit", "size": 10321} |
### File: SLAM/FastSLAM2/fast_slam2.py
"""
FastSLAM 2.0 example
author: Atsushi Sakai (@Atsushi_twi)
"""
import math
import matplotlib.pyplot as plt
import numpy as np
from utils.angle import angle_mod
# Fast SLAM covariance
Q = np.diag([3.0, np.deg2rad(10.0)]) ** 2
R = np.diag([1.0, np.deg2rad(20.0)]) ** 2
# S... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "SLAM/FastSLAM2/fast_slam2.py", "license": "mit", "size": 11289} |
### File: SLAM/GraphBasedSLAM/graph_based_slam.py
"""
Graph based SLAM example
author: Atsushi Sakai (@Atsushi_twi)
Ref
[A Tutorial on Graph-Based SLAM]
(http://www2.informatik.uni-freiburg.de/~stachnis/pdf/grisetti10titsmag.pdf)
"""
import sys
import pathlib
sys.path.append(str(pathlib.Path(__file__).parent.paren... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "SLAM/GraphBasedSLAM/graph_based_slam.py", "license": "mit", "size": 8338} |
### File: SLAM/GraphBasedSLAM/graphslam/__init__.py
# Copyright (c) 2020 Jeff Irion and contributors
#
# This file originated from the `graphslam` package:
#
# https://github.com/JeffLIrion/python-graphslam
"""Graph SLAM solver in Python.
"""
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "SLAM/GraphBasedSLAM/graphslam/__init__.py", "license": "mit", "size": 195} |
### File: SLAM/GraphBasedSLAM/graphslam/edge/__init__.py
# Copyright (c) 2020 Jeff Irion and contributors
#
# This file originated from the `graphslam` package:
#
# https://github.com/JeffLIrion/python-graphslam
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "SLAM/GraphBasedSLAM/graphslam/edge/__init__.py", "license": "mit", "size": 157} |
### File: SLAM/GraphBasedSLAM/graphslam/edge/edge_odometry.py
# Copyright (c) 2020 Jeff Irion and contributors
#
# This file originated from the `graphslam` package:
#
# https://github.com/JeffLIrion/python-graphslam
r"""A class for odometry edges.
"""
import numpy as np
import matplotlib.pyplot as plt
#: The d... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "SLAM/GraphBasedSLAM/graphslam/edge/edge_odometry.py", "license": "mit", "size": 5422} |
### File: SLAM/GraphBasedSLAM/graphslam/graph.py
# Copyright (c) 2020 Jeff Irion and contributors
#
# This file originated from the `graphslam` package:
#
# https://github.com/JeffLIrion/python-graphslam
r"""A ``Graph`` class that stores the edges and vertices required for Graph SLAM.
"""
import warnings
from coll... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "SLAM/GraphBasedSLAM/graphslam/graph.py", "license": "mit", "size": 9247} |
### File: SLAM/GraphBasedSLAM/graphslam/load.py
# Copyright (c) 2020 Jeff Irion and contributors
#
# This file originated from the `graphslam` package:
#
# https://github.com/JeffLIrion/python-graphslam
"""Functions for loading graphs.
"""
import logging
import numpy as np
from .edge.edge_odometry import EdgeOdo... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "SLAM/GraphBasedSLAM/graphslam/load.py", "license": "mit", "size": 1815} |
### File: SLAM/GraphBasedSLAM/graphslam/pose/__init__.py
# Copyright (c) 2020 Jeff Irion and contributors
#
# This file originated from the `graphslam` package:
#
# https://github.com/JeffLIrion/python-graphslam
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "SLAM/GraphBasedSLAM/graphslam/pose/__init__.py", "license": "mit", "size": 157} |
### File: SLAM/GraphBasedSLAM/graphslam/pose/se2.py
# Copyright (c) 2020 Jeff Irion and contributors
#
# This file originated from the `graphslam` package:
#
# https://github.com/JeffLIrion/python-graphslam
r"""Representation of a pose in :math:`SE(2)`.
"""
import math
import numpy as np
from ..util import neg_pi... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "SLAM/GraphBasedSLAM/graphslam/pose/se2.py", "license": "mit", "size": 5015} |
### File: SLAM/GraphBasedSLAM/graphslam/util.py
# Copyright (c) 2020 Jeff Irion and contributors
#
# This file originated from the `graphslam` package:
#
# https://github.com/JeffLIrion/python-graphslam
"""Utility functions used throughout the package.
"""
import numpy as np
TWO_PI = 2 * np.pi
def neg_pi_to_pi... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "SLAM/GraphBasedSLAM/graphslam/util.py", "license": "mit", "size": 1532} |
### File: SLAM/GraphBasedSLAM/graphslam/vertex.py
# Copyright (c) 2020 Jeff Irion and contributors
#
# This file originated from the `graphslam` package:
#
# https://github.com/JeffLIrion/python-graphslam
"""A ``Vertex`` class.
"""
import matplotlib.pyplot as plt
# pylint: disable=too-few-public-methods
class Ve... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "SLAM/GraphBasedSLAM/graphslam/vertex.py", "license": "mit", "size": 1722} |
### File: SLAM/iterative_closest_point/iterative_closest_point.py
"""
Iterative Closest Point (ICP) SLAM example
author: Atsushi Sakai (@Atsushi_twi), Göktuğ Karakaşlı, Shamil Gemuev
"""
import math
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
import matplotlib.pyplot as plt
import numpy as np
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "SLAM/iterative_closest_point/iterative_closest_point.py", "license": "mit", "size": 5933} |
### File: docs/Makefile
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = PythonRobotics
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Makefile", "repo_name": "minhanghuang/PythonRobotics", "path": "docs/Makefile", "license": "mit", "size": 611} |
### File: docs/conf.py
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup -------------------------------------------------------------... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "docs/conf.py", "license": "mit", "size": 5713} |
### File: docs/make.bat
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
set SPHINXPROJ=PythonRobotics
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.T... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Batchfile", "repo_name": "minhanghuang/PythonRobotics", "path": "docs/make.bat", "license": "mit", "size": 818} |
### File: runtests.sh
#!/usr/bin/env bash
echo "Run test suites! "
# === pytest based test runner ===
# -Werror: warning as error
# --durations=0: show ranking of test durations
# -l (--showlocals); show local variables when test failed
pytest tests -l -Werror --durations=0
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/PythonRobotics", "path": "runtests.sh", "license": "mit", "size": 254} |
### File: tests/conftest.py
"""Path hack to make tests work."""
import sys
import os
import pytest
TEST_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(TEST_DIR) # to import this file from test code.
ROOT_DIR = os.path.dirname(TEST_DIR)
sys.path.append(ROOT_DIR)
def run_this_test(file):
pytest.... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "tests/conftest.py", "license": "mit", "size": 322} |
### File: utils/angle.py
import numpy as np
from scipy.spatial.transform import Rotation as Rot
def rot_mat_2d(angle):
"""
Create 2D rotation matrix from an angle
Parameters
----------
angle :
Returns
-------
A 2D rotation matrix
Examples
--------
>>> angle_mod(-4.0)
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "utils/angle.py", "license": "mit", "size": 1739} |
### File: utils/plot.py
"""
Matplotlib based plotting utilities
"""
import math
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import art3d
from matplotlib.patches import FancyArrowPatch
from mpl_toolkits.mplot3d.proj3d import proj_transform
from mpl_toolkits.mplot3d import Axes3D
from ut... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/PythonRobotics", "path": "utils/plot.py", "license": "mit", "size": 8698} |
### File: BUILD
# Bazel (https://bazel.build/) BUILD file for Protobuf.
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test", "objc_library", native_cc_proto_library = "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_lang_too... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Starlark", "repo_name": "minhanghuang/protobufsource", "path": "BUILD", "license": "bsd", "size": 40243} |
### File: Makefile.am
## Process this file with automake to produce Makefile.in
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = foreign
# Build . before src so that our all-local and clean-local hooks kicks in at
# the right time.
SUBDIRS = . src
# Always include third_party directories in distributions.
DIST_SUBDIRS = ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Makefile", "repo_name": "minhanghuang/protobufsource", "path": "Makefile.am", "license": "bsd", "size": 106698} |
### File: Protobuf-C++.podspec
Pod::Spec.new do |s|
s.name = 'Protobuf-C++'
s.version = '3.14.0'
s.summary = 'Protocol Buffers v3 runtime library for C++.'
s.homepage = 'https://github.com/google/protobuf'
s.license = '3-Clause BSD License'
s.authors = { 'The Protocol Buffers contributors' => 'proto... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Ruby", "repo_name": "minhanghuang/protobufsource", "path": "Protobuf-C++.podspec", "license": "bsd", "size": 1623} |
### File: Protobuf.podspec
# This file describes to Cocoapods how to integrate the Objective-C runtime into a dependent
# project.
# Despite this file being specific to Objective-C, it needs to be on the root of the repository.
# Otherwise, Cocoapods gives trouble like not picking up the license file correctly, or not ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Ruby", "repo_name": "minhanghuang/protobufsource", "path": "Protobuf.podspec", "license": "bsd", "size": 2221} |
### File: WORKSPACE
workspace(name = "com_google_protobuf")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
local_repository(
name = "com_google_protobuf_examples",
path = "examples",
)
http_archive(
name = "com_google_googletest",
sha256 = "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Starlark", "repo_name": "minhanghuang/protobufsource", "path": "WORKSPACE", "license": "bsd", "size": 2422} |
### File: appveyor.bat
setlocal
IF %platform%==MinGW GOTO build_mingw
IF %language%==cpp GOTO build_cpp
IF %language%==csharp GOTO build_csharp
echo Unsupported language %language% and platform %platform%. Exiting.
goto :error
:build_mingw
echo Building MinGW
set PATH=C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\m... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Batchfile", "repo_name": "minhanghuang/protobufsource", "path": "appveyor.bat", "license": "bsd", "size": 1449} |
### File: benchmarks/Makefile.am
benchmarks_protoc_inputs_benchmark_wrapper = \
benchmarks.proto
benchmarks_protoc_inputs = \
datasets/google_message1/proto3/benchmark_message1_proto3.proto
benchmarks_protoc_inputs_proto2 = ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Makefile", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/Makefile.am", "license": "bsd", "size": 42928} |
### File: benchmarks/cpp/cpp_benchmark.cc
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that th... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/cpp/cpp_benchmark.cc", "license": "bsd", "size": 8103} |
### File: benchmarks/download_data.sh
#! /bin/sh
curl -O https://storage.googleapis.com/protobuf_opensource_benchmark_data/datasets.tar.gz
tar -zvxf datasets.tar.gz
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/download_data.sh", "license": "bsd", "size": 129} |
### File: benchmarks/java/src/main/java/com/google/protobuf/ProtoCaliperBenchmark.java
package com.google.protobuf;
import com.google.caliper.BeforeExperiment;
import com.google.caliper.AfterExperiment;
import com.google.caliper.Benchmark;
import com.google.caliper.Param;
import com.google.caliper.api.VmOptions;
impo... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Java", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/java/src/main/java/com/google/protobuf/ProtoCaliperBenchmark.java", "license": "bsd", "size": 859... |
### File: benchmarks/js/benchmark_suite.js
var benchmark = require("benchmark");
function newBenchmark(messageName, filename, language) {
var benches = [];
return {
suite: new benchmark.Suite(messageName + filename + language )
.on("add", function(event) {
benches.push(event.target);
})
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/js/benchmark_suite.js", "license": "bsd", "size": 944} |
### File: benchmarks/js/js_benchmark.js
require('./datasets/google_message1/proto2/benchmark_message1_proto2_pb.js');
require('./datasets/google_message1/proto3/benchmark_message1_proto3_pb.js');
require('./datasets/google_message2/benchmark_message2_pb.js');
require('./datasets/google_message3/benchmark_message3_pb.js... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/js/js_benchmark.js", "license": "bsd", "size": 2630} |
### File: benchmarks/php/PhpBenchmark.php
<?php
namespace Google\Protobuf\Benchmark;
ini_set('memory_limit', '4096M');
const NAME = "PhpBenchmark.php";
function _require_all($dir, &$prefix) {
// require all php files
foreach (glob("$dir/*") as $path) {
if (preg_match('/\.php$/', $path) &&
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "PHP", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/php/PhpBenchmark.php", "license": "bsd", "size": 5261} |
### File: benchmarks/php/autoload.php
<?php
define("GOOGLE_INTERNAL_NAMESPACE", "Google\\Protobuf\\Internal\\");
define("GOOGLE_NAMESPACE", "Google\\Protobuf\\");
define("GOOGLE_GPBMETADATA_NAMESPACE", "GPBMetadata\\Google\\Protobuf\\");
define("BENCHMARK_NAMESPACE", "Benchmarks");
define("BENCHMARK_GPBMETADATA_NAMESP... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "PHP", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/php/autoload.php", "license": "bsd", "size": 1157} |
### File: benchmarks/protobuf.js/generate_pbjs_files.js
var pbjs = require("./protobuf.js/cli").pbjs
var argv = [];
var protoFiles = [];
var prefix = "";
process.argv.forEach(function(val, index) {
var arg = val;
if (arg.length > 6 && arg.substring(arg.length - 6) == ".proto") {
protoFiles.push(arg);
} else ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/protobuf.js/generate_pbjs_files.js", "license": "bsd", "size": 576} |
### File: benchmarks/protobuf.js/protobufjs_benchmark.js
var root = require("./generated_bundle_code.js");
var fs = require('fs');
var benchmark = require("./node_modules/benchmark");
var benchmarkSuite = require("./benchmark_suite.js");
function getNewPrototype(name) {
var message = eval("root." + name);
if (typ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/protobuf.js/protobufjs_benchmark.js", "license": "bsd", "size": 2039} |
### File: benchmarks/python/py_benchmark.py
from __future__ import print_function
import sys
import os
import timeit
import math
import argparse
import fnmatch
import json
parser = argparse.ArgumentParser(description="Python protobuf benchmark")
parser.add_argument("data_files", metavar="dataFile", nargs="+",
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/python/py_benchmark.py", "license": "bsd", "size": 6786} |
### File: benchmarks/python/python_benchmark_messages.cc
#include <Python.h>
#include "benchmarks.pb.h"
#include "datasets/google_message1/proto2/benchmark_message1_proto2.pb.h"
#include "datasets/google_message1/proto3/benchmark_message1_proto3.pb.h"
#include "datasets/google_message2/benchmark_message2.pb.h"
#includ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/python/python_benchmark_messages.cc", "license": "bsd", "size": 977} |
### File: benchmarks/util/big_query_utils.py
#!/usr/bin/env python2.7
from __future__ import print_function
import argparse
import json
import uuid
import httplib2
from apiclient import discovery
from apiclient.errors import HttpError
from oauth2client.client import GoogleCredentials
# 30 days in milliseconds
_EXPIR... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/util/big_query_utils.py", "license": "bsd", "size": 6137} |
### File: benchmarks/util/data_proto2_to_proto3_util.h
#ifndef PROTOBUF_BENCHMARKS_UTIL_DATA_PROTO2_TO_PROTO3_UTIL_H_
#define PROTOBUF_BENCHMARKS_UTIL_DATA_PROTO2_TO_PROTO3_UTIL_H_
#include "google/protobuf/message.h"
#include "google/protobuf/descriptor.h"
using google::protobuf::FieldDescriptor;
using google::proto... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/util/data_proto2_to_proto3_util.h", "license": "bsd", "size": 1876} |
### File: benchmarks/util/gogo_data_scrubber.cc
#include "benchmarks.pb.h"
#include "datasets/google_message1/proto2/benchmark_message1_proto2.pb.h"
#include "datasets/google_message1/proto3/benchmark_message1_proto3.pb.h"
#include "datasets/google_message2/benchmark_message2.pb.h"
#include "datasets/google_message3/be... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/util/gogo_data_scrubber.cc", "license": "bsd", "size": 2743} |
### File: benchmarks/util/proto3_data_stripper.cc
#include "benchmarks.pb.h"
#include "datasets/google_message1/proto2/benchmark_message1_proto2.pb.h"
#include "datasets/google_message1/proto3/benchmark_message1_proto3.pb.h"
#include "datasets/google_message2/benchmark_message2.pb.h"
#include "datasets/google_message3/... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/util/proto3_data_stripper.cc", "license": "bsd", "size": 2747} |
### File: benchmarks/util/protoc-gen-gogoproto.cc
#include "google/protobuf/compiler/code_generator.h"
#include "google/protobuf/io/zero_copy_stream.h"
#include "google/protobuf/io/printer.h"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/descriptor.pb.h"
#include "schema_proto2_to_proto3_util.h"
#i... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/util/protoc-gen-gogoproto.cc", "license": "bsd", "size": 3249} |
### File: benchmarks/util/protoc-gen-proto2_to_proto3.cc
#include "google/protobuf/compiler/code_generator.h"
#include "google/protobuf/io/zero_copy_stream.h"
#include "google/protobuf/io/printer.h"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/descriptor.pb.h"
#include "schema_proto2_to_proto3_util... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/util/protoc-gen-proto2_to_proto3.cc", "license": "bsd", "size": 3460} |
### File: benchmarks/util/result_parser.py
# This import depends on the automake rule protoc_middleman, please make sure
# protoc_middleman has been built before run this file.
import json
import re
import os.path
# BEGIN OPENSOURCE
import sys
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/util/result_parser.py", "license": "bsd", "size": 8710} |
### File: benchmarks/util/result_uploader.py
from __future__ import print_function
from __future__ import absolute_import
import argparse
import os
import re
import copy
import uuid
import calendar
import time
import datetime
from util import big_query_utils
from util import result_parser
_PROJECT_ID = 'grpc-testing'... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/util/result_uploader.py", "license": "bsd", "size": 3701} |
### File: benchmarks/util/schema_proto2_to_proto3_util.h
#ifndef PROTOBUF_BENCHMARKS_UTIL_SCHEMA_PROTO2_TO_PROTO3_UTIL_H_
#define PROTOBUF_BENCHMARKS_UTIL_SCHEMA_PROTO2_TO_PROTO3_UTIL_H_
#include "google/protobuf/message.h"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/descriptor.pb.h"
#include <s... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/protobufsource", "path": "benchmarks/util/schema_proto2_to_proto3_util.h", "license": "bsd", "size": 6504} |
### File: build_files_updated_unittest.sh
#!/bin/bash
# This script verifies that BUILD files and cmake files are in sync with src/Makefile.am
set -eo pipefail
if [ "$(uname)" != "Linux" ]; then
echo "build_files_updated_unittest only supported on Linux. Skipping..."
exit 0
fi
# Keep in sync with files needed b... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/protobufsource", "path": "build_files_updated_unittest.sh", "license": "bsd", "size": 1721} |
### File: cc_proto_blacklist_test.bzl
"""Contains a unittest to verify that `cc_proto_library` does not generate code for blacklisted `.proto` sources (i.e. WKPs)."""
load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest")
def _cc_proto_blacklist_test_impl(ctx):
"""Verifies that there are no C++ compile ac... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Starlark", "repo_name": "minhanghuang/protobufsource", "path": "cc_proto_blacklist_test.bzl", "license": "bsd", "size": 999} |
### File: cmake/CMakeLists.txt
# Minimum CMake required
cmake_minimum_required(VERSION 3.1.3)
if(protobuf_VERBOSE)
message(STATUS "Protocol Buffers Configuring...")
endif()
# CMake policies
cmake_policy(SET CMP0022 NEW)
# On MacOS use @rpath/ for target's install name prefix path
if (POLICY CMP0042)
cmake_policy(... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/protobufsource", "path": "cmake/CMakeLists.txt", "license": "bsd", "size": 10688} |
### File: cmake/conformance.cmake
add_custom_command(
OUTPUT ${protobuf_source_dir}/conformance/conformance.pb.cc
DEPENDS ${protobuf_PROTOC_EXE} ${protobuf_source_dir}/conformance/conformance.proto
COMMAND ${protobuf_PROTOC_EXE} ${protobuf_source_dir}/conformance/conformance.proto
--proto_path=${protobuf_s... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/protobufsource", "path": "cmake/conformance.cmake", "license": "bsd", "size": 2254} |
### File: cmake/examples.cmake
if(protobuf_VERBOSE)
message(STATUS "Protocol Buffers Examples Configuring...")
endif()
get_filename_component(examples_dir "../examples" ABSOLUTE)
if(protobuf_VERBOSE)
message(STATUS "Protocol Buffers Examples Configuring done")
endif()
include(ExternalProject)
# Internal utility ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/protobufsource", "path": "cmake/examples.cmake", "license": "bsd", "size": 2112} |
### File: cmake/install.cmake
include(GNUInstallDirs)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf.pc.cmake
${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf-lite.pc.cmake
${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc @ONLY)
set(_pro... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/protobufsource", "path": "cmake/install.cmake", "license": "bsd", "size": 6053} |
### File: cmake/libprotobuf-lite.cmake
set(libprotobuf_lite_files
${protobuf_source_dir}/src/google/protobuf/any_lite.cc
${protobuf_source_dir}/src/google/protobuf/arena.cc
${protobuf_source_dir}/src/google/protobuf/arenastring.cc
${protobuf_source_dir}/src/google/protobuf/extension_set.cc
${protobuf_source_d... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/protobufsource", "path": "cmake/libprotobuf-lite.cmake", "license": "bsd", "size": 4396} |
### File: cmake/libprotobuf.cmake
set(libprotobuf_files
${protobuf_source_dir}/src/google/protobuf/any.cc
${protobuf_source_dir}/src/google/protobuf/any.pb.cc
${protobuf_source_dir}/src/google/protobuf/api.pb.cc
${protobuf_source_dir}/src/google/protobuf/compiler/importer.cc
${protobuf_source_dir}/src/google/... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/protobufsource", "path": "cmake/libprotobuf.cmake", "license": "bsd", "size": 7872} |
### File: cmake/libprotoc.cmake
set(libprotoc_files
${protobuf_source_dir}/src/google/protobuf/compiler/code_generator.cc
${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface.cc
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_enum.cc
${protobuf_source_dir}/src/google/protobuf/c... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/protobufsource", "path": "cmake/libprotoc.cmake", "license": "bsd", "size": 13129} |
### File: cmake/protobuf-config-version.cmake.in
set(PACKAGE_VERSION "@protobuf_VERSION@")
set(${PACKAGE_FIND_NAME}_VERSION_PRERELEASE "@protobuf_VERSION_PRERELEASE@" PARENT_SCOPE)
# Prerelease versions cannot be passed in directly via the find_package command,
# so we allow users to specify it in a variable
if(NOT DE... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/protobufsource", "path": "cmake/protobuf-config-version.cmake.in", "license": "bsd", "size": 2894} |
### File: cmake/protobuf-config.cmake.in
# User options
include("${CMAKE_CURRENT_LIST_DIR}/protobuf-options.cmake")
# Depend packages
@_protobuf_FIND_ZLIB@
# Imported targets
include("${CMAKE_CURRENT_LIST_DIR}/protobuf-targets.cmake")
function(protobuf_generate)
include(CMakeParseArguments)
set(_options APPEND_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/protobufsource", "path": "cmake/protobuf-config.cmake.in", "license": "bsd", "size": 5362} |
### File: cmake/protobuf-lite.pc.cmake
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: Protocol Buffers
Description: Google's Data Interchange Format
Version: @protobuf_VERSION@
Libs: -L${libdir} -lprotobuf-lite @CMAKE... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/protobufsource", "path": "cmake/protobuf-lite.pc.cmake", "license": "bsd", "size": 344} |
### File: cmake/protobuf-module.cmake.in
# This file contains backwards compatibility patches for various legacy functions and variables
# Functions
function(PROTOBUF_GENERATE_CPP SRCS HDRS)
cmake_parse_arguments(protobuf_generate_cpp "" "EXPORT_MACRO" "" ${ARGN})
set(_proto_files "${protobuf_generate_cpp_UNPARSE... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/protobufsource", "path": "cmake/protobuf-module.cmake.in", "license": "bsd", "size": 6004} |
### File: cmake/protobuf-options.cmake
# Verbose output
option(protobuf_VERBOSE "Enable for verbose output" OFF)
mark_as_advanced(protobuf_VERBOSE)
# FindProtobuf module compatible
option(protobuf_MODULE_COMPATIBLE "CMake built-in FindProtobuf.cmake module compatible" OFF)
mark_as_advanced(protobuf_MODULE_COMPATIBLE)
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/protobufsource", "path": "cmake/protobuf-options.cmake", "license": "bsd", "size": 281} |
### File: cmake/protobuf.pc.cmake
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: Protocol Buffers
Description: Google's Data Interchange Format
Version: @protobuf_VERSION@
Libs: -L${libdir} -lprotobuf @CMAKE_THREAD_LI... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/protobufsource", "path": "cmake/protobuf.pc.cmake", "license": "bsd", "size": 344} |
### File: cmake/protoc.cmake
set(protoc_files
${protobuf_source_dir}/src/google/protobuf/compiler/main.cc
)
if (MSVC)
set(protoc_rc_files
${CMAKE_CURRENT_BINARY_DIR}/version.rc
)
endif()
add_executable(protoc ${protoc_files} ${protoc_rc_files})
target_link_libraries(protoc libprotoc libprotobuf)
add_executable(pr... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/protobufsource", "path": "cmake/protoc.cmake", "license": "bsd", "size": 394} |
### File: cmake/tests.cmake
if (NOT EXISTS "${PROJECT_SOURCE_DIR}/../third_party/googletest/CMakeLists.txt")
message(FATAL_ERROR
"Cannot find third_party/googletest directory that's needed to "
"build tests. If you use git, make sure you have cloned submodules:\n"
" git submodule update... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/protobufsource", "path": "cmake/tests.cmake", "license": "bsd", "size": 12689} |
### File: compiler_config_setting.bzl
"""Creates config_setting that allows selecting based on 'compiler' value."""
def create_compiler_config_setting(name, value, visibility = None):
# The "do_not_use_tools_cpp_compiler_present" attribute exists to
# distinguish between older versions of Bazel that do not sup... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Starlark", "repo_name": "minhanghuang/protobufsource", "path": "compiler_config_setting.bzl", "license": "bsd", "size": 964} |
### File: configure.ac
## Process this file with autoconf to produce configure.
## In general, the safest way to proceed is to run ./autogen.sh
AC_PREREQ(2.59)
# Note: If you change the version, you must also update it in:
# * Protobuf.podspec
# * csharp/Google.Protobuf.Tools.nuspec
# * csharp/src/*/AssemblyInfo.cs
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "M4Sugar", "repo_name": "minhanghuang/protobufsource", "path": "configure.ac", "license": "bsd", "size": 7766} |
### File: conformance/ConformanceJava.java
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that t... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Java", "repo_name": "minhanghuang/protobufsource", "path": "conformance/ConformanceJava.java", "license": "bsd", "size": 14932} |
### File: conformance/ConformanceJavaLite.java
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided th... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Java", "repo_name": "minhanghuang/protobufsource", "path": "conformance/ConformanceJavaLite.java", "license": "bsd", "size": 5228} |
### File: conformance/Makefile.am
## Process this file with automake to produce Makefile.in
conformance_protoc_inputs = \
conformance.proto \
$(top_srcdir)/src/google/protobuf/test_messages_proto3.proto
# proto2 input files, should be s... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Makefile", "repo_name": "minhanghuang/protobufsource", "path": "conformance/Makefile.am", "license": "bsd", "size": 23965} |
### File: conformance/autoload.php
<?php
define("GOOGLE_INTERNAL_NAMESPACE", "Google\\Protobuf\\Internal\\");
define("GOOGLE_NAMESPACE", "Google\\Protobuf\\");
define("GOOGLE_GPBMETADATA_NAMESPACE", "GPBMetadata\\Google\\Protobuf\\");
function protobuf_autoloader_impl($class, $prefix) {
$length = strlen($prefix);... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "PHP", "repo_name": "minhanghuang/protobufsource", "path": "conformance/autoload.php", "license": "bsd", "size": 752} |
### File: conformance/binary_json_conformance_suite.cc
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted pro... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/protobufsource", "path": "conformance/binary_json_conformance_suite.cc", "license": "bsd", "size": 121101} |
### File: conformance/binary_json_conformance_suite.h
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted prov... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/protobufsource", "path": "conformance/binary_json_conformance_suite.h", "license": "bsd", "size": 6858} |
### File: conformance/conformance_cpp.cc
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/protobufsource", "path": "conformance/conformance_cpp.cc", "license": "bsd", "size": 8665} |
### File: conformance/conformance_nodejs.js
#!/usr/bin/env node
/*
* Protocol Buffers - Google's data interchange format
* Copyright 2008 Google Inc. All rights reserved.
* https://developers.google.com/protocol-buffers/
*
* Redistribution and use in source and binary forms, with or without
* modification, are ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "JavaScript", "repo_name": "minhanghuang/protobufsource", "path": "conformance/conformance_nodejs.js", "license": "bsd", "size": 6132} |
### File: conformance/conformance_objc.m
// Protocol Buffers - Google's data interchange format
// Copyright 2015 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Objective-C", "repo_name": "minhanghuang/protobufsource", "path": "conformance/conformance_objc.m", "license": "bsd", "size": 7416} |
### File: conformance/conformance_php.php
<?php
require_once("Conformance/WireFormat.php");
require_once("Conformance/ConformanceResponse.php");
require_once("Conformance/ConformanceRequest.php");
require_once("Conformance/FailureSet.php");
require_once("Conformance/JspbEncodingConfig.php");
require_once("Conformance/... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "PHP", "repo_name": "minhanghuang/protobufsource", "path": "conformance/conformance_php.php", "license": "bsd", "size": 4272} |
### File: conformance/conformance_python.py
#!/usr/bin/env python
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitte... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/protobufsource", "path": "conformance/conformance_python.py", "license": "bsd", "size": 9255} |
### File: conformance/conformance_ruby.rb
#!/usr/bin/env ruby
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Ruby", "repo_name": "minhanghuang/protobufsource", "path": "conformance/conformance_ruby.rb", "license": "bsd", "size": 4789} |
### File: conformance/conformance_test.cc
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that th... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/protobufsource", "path": "conformance/conformance_test.cc", "license": "bsd", "size": 16150} |
### File: conformance/conformance_test.h
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/protobufsource", "path": "conformance/conformance_test.h", "license": "bsd", "size": 12154} |
### File: conformance/conformance_test_main.cc
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided th... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/protobufsource", "path": "conformance/conformance_test_main.cc", "license": "bsd", "size": 2070} |
### File: conformance/conformance_test_runner.cc
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/protobufsource", "path": "conformance/conformance_test_runner.cc", "license": "bsd", "size": 11819} |
### File: conformance/text_format_conformance_suite.cc
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted pro... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/protobufsource", "path": "conformance/text_format_conformance_suite.cc", "license": "bsd", "size": 18832} |
### File: conformance/text_format_conformance_suite.h
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted prov... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/protobufsource", "path": "conformance/text_format_conformance_suite.h", "license": "bsd", "size": 3325} |
### File: conformance/update_failure_list.py
#!/usr/bin/env python
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitt... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/protobufsource", "path": "conformance/update_failure_list.py", "license": "bsd", "size": 2898} |
### File: csharp/build_packages.bat
@rem Builds Google.Protobuf NuGet packages
dotnet restore src/Google.Protobuf.sln
dotnet pack -c Release src/Google.Protobuf.sln || goto :error
goto :EOF
:error
echo Failed!
exit /b %errorlevel%
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Batchfile", "repo_name": "minhanghuang/protobufsource", "path": "csharp/build_packages.bat", "license": "bsd", "size": 198} |
### File: csharp/build_tools.sh
#!/bin/bash
if [ $# -ne 1 ]; then
cat <<EOF
Usage: $0 <VERSION_NUMBER>
Example:
$ $0 3.0.0
This script will download pre-built protoc binaries from maven repository and
create the Google.Protobuf.Tools package. Well-known type .proto files will also
be included.
EOF
exit 1
fi
V... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/protobufsource", "path": "csharp/build_tools.sh", "license": "bsd", "size": 1266} |
### File: csharp/buildall.bat
@rem Builds Google.Protobuf and runs the tests
dotnet build src/Google.Protobuf.sln || goto :error
echo Running tests.
dotnet test src/Google.Protobuf.Test/Google.Protobuf.Test.csproj || goto :error
goto :EOF
:error
echo Failed!
exit /b %errorlevel%
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Batchfile", "repo_name": "minhanghuang/protobufsource", "path": "csharp/buildall.bat", "license": "bsd", "size": 255} |
### File: csharp/buildall.sh
#!/bin/bash
CONFIG=Release
SRC=$(dirname $0)/src
set -ex
echo Building relevant projects.
dotnet restore $SRC/Google.Protobuf.sln
dotnet build -c $CONFIG $SRC/Google.Protobuf.sln
echo Running tests.
# Only test netcoreapp2.1, which uses the .NET Core runtime.
# If we want to test the .N... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/protobufsource", "path": "csharp/buildall.sh", "license": "bsd", "size": 537} |
### File: csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/CodedInputStreamExtensions.cs
#region Copyright notice and license
// Protocol Buffers - Google's data interchange format
// Copyright 2015 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C#", "repo_name": "minhanghuang/protobufsource", "path": "csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/CodedInputStreamExtensions.cs", "license": "bsd", "... |
### File: csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/EqualityTester.cs
#region Copyright notice and license
// Protocol Buffers - Google's data interchange format
// Copyright 2015 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in sourc... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C#", "repo_name": "minhanghuang/protobufsource", "path": "csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/EqualityTester.cs", "license": "bsd", "size": 2857} |
### File: csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/Program.cs
#region Copyright notice and license
// Protocol Buffers - Google's data interchange format
// Copyright 2017 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and bi... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C#", "repo_name": "minhanghuang/protobufsource", "path": "csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/Program.cs", "license": "bsd", "size": 2059} |
### File: csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/SampleEnum.cs
#region Copyright notice and license
// Protocol Buffers - Google's data interchange format
// Copyright 2015 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C#", "repo_name": "minhanghuang/protobufsource", "path": "csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/SampleEnum.cs", "license": "bsd", "size": 1932} |
### File: csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/SampleMessages.cs
#region Copyright notice and license
// Protocol Buffers - Google's data interchange format
// Copyright 2015 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in sourc... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C#", "repo_name": "minhanghuang/protobufsource", "path": "csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/SampleMessages.cs", "license": "bsd", "size": 5203} |
### File: csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/TestCornerCases.cs
#region Copyright notice and license
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C#", "repo_name": "minhanghuang/protobufsource", "path": "csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/TestCornerCases.cs", "license": "bsd", "size": 2702... |
### File: csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/TestProtos/ForeignMessagePartial.cs
#region Copyright notice and license
// Protocol Buffers - Google's data interchange format
// Copyright 2016 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistributio... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C#", "repo_name": "minhanghuang/protobufsource", "path": "csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/TestProtos/ForeignMessagePartial.cs", "license": "b... |
### File: csharp/compatibility_tests/v3.0.0/test.sh
#!/bin/bash
function run_test() {
# Generate test proto files.
$1 -Iprotos/src -I../../../src/ --csharp_out=src/Google.Protobuf.Test \
--csharp_opt=base_namespace=Google.Protobuf \
protos/src/google/protobuf/unittest_import_proto3.proto \
protos/src/g... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/protobufsource", "path": "csharp/compatibility_tests/v3.0.0/test.sh", "license": "bsd", "size": 2863} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.