├── .gitignore ├── Croissant-Metadata ├── McEval-Instruct_croissant_metadata.json └── McEval_croissant_metadata.json ├── LICENSE ├── CODE-LICENSE └── DATA-LICENSE ├── MCoder ├── codeqwen │ ├── infer.py │ ├── infer.sh │ ├── train.py │ ├── train.sh │ └── utils.py └── deepseek │ ├── finetune_deepseekcoder.py │ ├── requirements.txt │ ├── train.sh │ └── utils.py ├── README.md ├── assets ├── bench_cases.png ├── bench_explain_cases.png ├── bench_fim_cases.png ├── bench_generation_cases.png ├── cate_result.png ├── eval_env.png ├── gen_result.png ├── icon.png ├── intro.png ├── json_test_case.png └── mceval_icon.pdf ├── completion └── completion_data.zip ├── data ├── AWK.jsonl ├── AWK │ ├── 9_1.txt │ ├── 9_2.txt │ ├── contribution.txt │ └── url.txt ├── C#.jsonl ├── C# │ └── MyConsoleApp │ │ ├── MyConsoleApp.csproj │ │ ├── Program.cs │ │ ├── bin │ │ └── Debug │ │ │ └── net8.0 │ │ │ ├── MyConsoleApp │ │ │ ├── MyConsoleApp.deps.json │ │ │ ├── MyConsoleApp.dll │ │ │ ├── MyConsoleApp.pdb │ │ │ └── MyConsoleApp.runtimeconfig.json │ │ └── obj │ │ ├── Debug │ │ └── net8.0 │ │ │ ├── .NETCoreApp,Version=v8.0.AssemblyAttributes.cs │ │ │ ├── MyConsoleApp.AssemblyInfo.cs │ │ │ ├── MyConsoleApp.AssemblyInfoInputs.cache │ │ │ ├── MyConsoleApp.GeneratedMSBuildEditorConfig.editorconfig │ │ │ ├── MyConsoleApp.GlobalUsings.g.cs │ │ │ ├── MyConsoleApp.assets.cache │ │ │ ├── MyConsoleApp.csproj.CoreCompileInputs.cache │ │ │ ├── MyConsoleApp.csproj.FileListAbsolute.txt │ │ │ ├── MyConsoleApp.dll │ │ │ ├── MyConsoleApp.genruntimeconfig.cache │ │ │ ├── MyConsoleApp.pdb │ │ │ ├── MyConsoleApp.sourcelink.json │ │ │ ├── apphost │ │ │ ├── ref │ │ │ └── MyConsoleApp.dll │ │ │ └── refint │ │ │ └── MyConsoleApp.dll │ │ ├── MyConsoleApp.csproj.nuget.dgspec.json │ │ ├── MyConsoleApp.csproj.nuget.g.props │ │ ├── MyConsoleApp.csproj.nuget.g.targets │ │ ├── project.assets.json │ │ └── project.nuget.cache ├── C.jsonl ├── CPP.jsonl ├── CoffeeScript.jsonl ├── Common Lisp.jsonl ├── Common Lisp │ └── file.txt ├── Dart.jsonl ├── Elixir.jsonl ├── Emacs Lisp.jsonl ├── Erlang.jsonl ├── F#.jsonl ├── F# │ └── MyFsharpApp │ │ ├── MyFsharpApp.fsproj │ │ ├── Program.fs │ │ ├── bin │ │ └── Debug │ │ │ └── net8.0 │ │ │ ├── FSharp.Core.dll │ │ │ ├── MyFsharpApp │ │ │ ├── MyFsharpApp.deps.json │ │ │ ├── MyFsharpApp.dll │ │ │ ├── MyFsharpApp.pdb │ │ │ ├── MyFsharpApp.runtimeconfig.json │ │ │ ├── cs │ │ │ └── FSharp.Core.resources.dll │ │ │ ├── de │ │ │ └── FSharp.Core.resources.dll │ │ │ ├── es │ │ │ └── FSharp.Core.resources.dll │ │ │ ├── fr │ │ │ └── FSharp.Core.resources.dll │ │ │ ├── it │ │ │ └── FSharp.Core.resources.dll │ │ │ ├── ja │ │ │ └── FSharp.Core.resources.dll │ │ │ ├── ko │ │ │ └── FSharp.Core.resources.dll │ │ │ ├── pl │ │ │ └── FSharp.Core.resources.dll │ │ │ ├── pt-BR │ │ │ └── FSharp.Core.resources.dll │ │ │ ├── ru │ │ │ └── FSharp.Core.resources.dll │ │ │ ├── tr │ │ │ └── FSharp.Core.resources.dll │ │ │ ├── zh-Hans │ │ │ └── FSharp.Core.resources.dll │ │ │ └── zh-Hant │ │ │ └── FSharp.Core.resources.dll │ │ └── obj │ │ ├── Debug │ │ └── net8.0 │ │ │ ├── .NETCoreApp,Version=v8.0.AssemblyAttributes.fs │ │ │ ├── MyFsharpApp.AssemblyInfo.fs │ │ │ ├── MyFsharpApp.AssemblyInfoInputs.cache │ │ │ ├── MyFsharpApp.assets.cache │ │ │ ├── MyFsharpApp.dll │ │ │ ├── MyFsharpApp.fsproj.AssemblyReference.cache │ │ │ ├── MyFsharpApp.fsproj.CopyComplete │ │ │ ├── MyFsharpApp.fsproj.CoreCompileInputs.cache │ │ │ ├── MyFsharpApp.fsproj.FileListAbsolute.txt │ │ │ ├── MyFsharpApp.genruntimeconfig.cache │ │ │ ├── MyFsharpApp.pdb │ │ │ ├── MyFsharpApp.sourcelink.json │ │ │ ├── apphost │ │ │ ├── ref │ │ │ └── MyFsharpApp.dll │ │ │ └── refint │ │ │ └── MyFsharpApp.dll │ │ ├── MyFsharpApp.fsproj.nuget.dgspec.json │ │ ├── MyFsharpApp.fsproj.nuget.g.props │ │ ├── MyFsharpApp.fsproj.nuget.g.targets │ │ ├── project.assets.json │ │ └── project.nuget.cache ├── Fortran.jsonl ├── Go.jsonl ├── Groovy.jsonl ├── HTML.jsonl ├── HTML │ ├── 1.html │ ├── 10.html │ ├── 11.html │ ├── 12.html │ ├── 13.html │ ├── 14.html │ ├── 15.html │ ├── 16.html │ ├── 17.html │ ├── 18.html │ ├── 19.html │ ├── 2.html │ ├── 20.html │ ├── 21.html │ ├── 22.html │ ├── 23.html │ ├── 24.html │ ├── 25.html │ ├── 26.html │ ├── 27.html │ ├── 28.html │ ├── 29.html │ ├── 3.html │ ├── 30.html │ ├── 31.html │ ├── 32.html │ ├── 33.html │ ├── 34.html │ ├── 35.html │ ├── 36.html │ ├── 37.html │ ├── 38.html │ ├── 39.html │ ├── 4.html │ ├── 40.html │ ├── 41.html │ ├── 42.html │ ├── 43.html │ ├── 44.html │ ├── 45.html │ ├── 46.html │ ├── 47.html │ ├── 48.html │ ├── 49.html │ ├── 5.html │ ├── 50.html │ ├── 6.html │ ├── 7.html │ ├── 8.html │ └── 9.html ├── Haskell.jsonl ├── JSON.jsonl ├── JSON │ ├── 1.json │ ├── 10.json │ ├── 11.json │ ├── 12.json │ ├── 13.json │ ├── 14.json │ ├── 15.json │ ├── 16.json │ ├── 17.json │ ├── 18.json │ ├── 19.json │ ├── 2.json │ ├── 20.json │ ├── 21.json │ ├── 22.json │ ├── 23.json │ ├── 24.json │ ├── 25.json │ ├── 26.json │ ├── 27.json │ ├── 28.json │ ├── 29.json │ ├── 3.json │ ├── 30.json │ ├── 31.json │ ├── 32.json │ ├── 33.json │ ├── 34.json │ ├── 35.json │ ├── 36.json │ ├── 37.json │ ├── 38.json │ ├── 39.json │ ├── 4.json │ ├── 40.json │ ├── 41.json │ ├── 42.json │ ├── 43.json │ ├── 44.json │ ├── 45.json │ ├── 46.json │ ├── 47.json │ ├── 48.json │ ├── 49.json │ ├── 5.json │ ├── 50.json │ ├── 6.json │ ├── 7.json │ ├── 8.json │ └── 9.json ├── Java.jsonl ├── JavaScript.jsonl ├── Julia.jsonl ├── Kotlin.jsonl ├── Lua.jsonl ├── Markdown.jsonl ├── Markdown │ ├── 1.md │ ├── 10.md │ ├── 11.md │ ├── 12.md │ ├── 13.md │ ├── 14.md │ ├── 15.md │ ├── 16.md │ ├── 17.md │ ├── 18.md │ ├── 19.md │ ├── 2.md │ ├── 20.md │ ├── 21.md │ ├── 22.md │ ├── 23.md │ ├── 24.md │ ├── 25.md │ ├── 26.md │ ├── 27.md │ ├── 28.md │ ├── 29.md │ ├── 3.md │ ├── 30.md │ ├── 31.md │ ├── 32.md │ ├── 33.md │ ├── 34.md │ ├── 35.md │ ├── 36.md │ ├── 37.md │ ├── 38.md │ ├── 39.md │ ├── 4.md │ ├── 40.md │ ├── 41.md │ ├── 42.md │ ├── 43.md │ ├── 44.md │ ├── 45.md │ ├── 46.md │ ├── 47.md │ ├── 48.md │ ├── 49.md │ ├── 5.md │ ├── 50.md │ ├── 6.md │ ├── 7.md │ ├── 8.md │ └── 9.md ├── PHP.jsonl ├── Pascal.jsonl ├── Perl.jsonl ├── PowerShell.jsonl ├── Python.jsonl ├── R.jsonl ├── Racket.jsonl ├── Ruby.jsonl ├── Rust.jsonl ├── Scala.jsonl ├── Scheme.jsonl ├── Shell.jsonl ├── Swift.jsonl ├── Tcl.jsonl ├── TypeScript.jsonl ├── VimScript.jsonl ├── Visual Basic.jsonl ├── Visual Basic │ └── APP │ │ ├── APP.vbproj │ │ ├── Program.vb │ │ ├── bin │ │ └── Debug │ │ │ └── net8.0 │ │ │ ├── APP │ │ │ ├── APP.deps.json │ │ │ ├── APP.dll │ │ │ ├── APP.pdb │ │ │ └── APP.runtimeconfig.json │ │ └── obj │ │ ├── APP.vbproj.nuget.dgspec.json │ │ ├── APP.vbproj.nuget.g.props │ │ ├── APP.vbproj.nuget.g.targets │ │ ├── Debug │ │ └── net8.0 │ │ │ ├── .NETCoreApp,Version=v8.0.AssemblyAttributes.vb │ │ │ ├── APP.AssemblyInfo.vb │ │ │ ├── APP.AssemblyInfoInputs.cache │ │ │ ├── APP.GeneratedMSBuildEditorConfig.editorconfig │ │ │ ├── APP.assets.cache │ │ │ ├── APP.dll │ │ │ ├── APP.genruntimeconfig.cache │ │ │ ├── APP.pdb │ │ │ ├── APP.sourcelink.json │ │ │ ├── APP.vbproj.CoreCompileInputs.cache │ │ │ ├── APP.vbproj.FileListAbsolute.txt │ │ │ ├── apphost │ │ │ ├── ref │ │ │ └── APP.dll │ │ │ └── refint │ │ │ └── APP.dll │ │ ├── project.assets.json │ │ └── project.nuget.cache ├── go │ ├── go.mod │ ├── go.sum │ ├── vendor.tar.gz │ └── vendor │ │ ├── github.com │ │ ├── davecgh │ │ │ └── go-spew │ │ │ │ ├── LICENSE │ │ │ │ └── spew │ │ │ │ ├── bypass.go │ │ │ │ ├── bypasssafe.go │ │ │ │ ├── common.go │ │ │ │ ├── config.go │ │ │ │ ├── doc.go │ │ │ │ ├── dump.go │ │ │ │ ├── format.go │ │ │ │ └── spew.go │ │ ├── pmezard │ │ │ └── go-difflib │ │ │ │ ├── LICENSE │ │ │ │ └── difflib │ │ │ │ └── difflib.go │ │ └── stretchr │ │ │ └── testify │ │ │ ├── LICENSE │ │ │ └── assert │ │ │ ├── assertion_compare.go │ │ │ ├── assertion_compare_can_convert.go │ │ │ ├── assertion_compare_legacy.go │ │ │ ├── assertion_format.go │ │ │ ├── assertion_format.go.tmpl │ │ │ ├── assertion_forward.go │ │ │ ├── assertion_forward.go.tmpl │ │ │ ├── assertion_order.go │ │ │ ├── assertions.go │ │ │ ├── doc.go │ │ │ ├── errors.go │ │ │ ├── forward_assertions.go │ │ │ └── http_assertions.go │ │ ├── gopkg.in │ │ └── yaml.v3 │ │ │ ├── LICENSE │ │ │ ├── NOTICE │ │ │ ├── README.md │ │ │ ├── apic.go │ │ │ ├── decode.go │ │ │ ├── emitterc.go │ │ │ ├── encode.go │ │ │ ├── parserc.go │ │ │ ├── readerc.go │ │ │ ├── resolve.go │ │ │ ├── scannerc.go │ │ │ ├── sorter.go │ │ │ ├── writerc.go │ │ │ ├── yaml.go │ │ │ ├── yamlh.go │ │ │ └── yamlprivateh.go │ │ └── modules.txt └── rust │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ └── main.rs ├── dataset_build ├── gen_explain_task_data.py └── gen_fim_data.py ├── docs ├── Examples.md ├── README_ZH.md └── environment_config_zh.md ├── eval ├── .dart_tool │ ├── package_config.json │ ├── package_config_subset │ └── version ├── __init__.py ├── eval_all.py ├── excute.py ├── extract │ ├── __init__.py │ ├── base.py │ ├── extract_awk_code.py │ ├── extract_c_code.py │ ├── extract_clisp_code.py │ ├── extract_coffescript_code.py │ ├── extract_csharp_code.py │ ├── extract_dart_code.py │ ├── extract_elisp_code.py │ ├── extract_elixir_code.py │ ├── extract_erlang_code.py │ ├── extract_fortran_code.py │ ├── extract_fs_code.py │ ├── extract_go_code.py │ ├── extract_groovy_code.py │ ├── extract_haskell_code.py │ ├── extract_html_code.py │ ├── extract_java_code.py │ ├── extract_javascript_code.py │ ├── extract_json_code.py │ ├── extract_julia_code.py │ ├── extract_kotlin_code.py │ ├── extract_lua_code.py │ ├── extract_markdown_code.py │ ├── extract_pascal_code.py │ ├── extract_perl_code.py │ ├── extract_php_code.py │ ├── extract_powershell_code.py │ ├── extract_python_code.py │ ├── extract_r_code.py │ ├── extract_racket_code.py │ ├── extract_ruby_code.py │ ├── extract_rust_code.py │ ├── extract_scala_code.py │ ├── extract_scheme_code.py │ ├── extract_shell_code.py │ ├── extract_swift_code.py │ ├── extract_tcl_code.py │ ├── extract_typescript_code.py │ ├── extract_vb_code.py │ └── extract_vimscript_code.py ├── json2file.py ├── package-lock.json ├── package.json ├── pubspec.lock ├── pubspec.yaml ├── safe_subprocess │ ├── .gitignore │ ├── __init__.py │ ├── evil_programs │ │ ├── block_on_inputs.py │ │ ├── close_outputs.py │ │ ├── fork_bomb.py │ │ ├── fork_once.py │ │ ├── sleep_forever.py │ │ └── unbounded_output.py │ └── module_test.py ├── save2file.py ├── scripts │ ├── eval_completion.sh │ ├── eval_completion_light.sh │ ├── eval_explain.sh │ └── eval_generation.sh └── valid_data.py ├── examples └── evaluate │ ├── completion │ └── C.jsonl │ ├── explaination │ └── C.jsonl │ └── generation │ └── C.jsonl ├── explanation └── explaination_data.zip └── inference ├── gen_stage2_instruction.py ├── inference_torch.py ├── inference_vllm.py ├── scripts ├── inference_torch.sh ├── run_completion_vllm.sh ├── run_explaination_vllm.sh └── run_generation_vllm.sh ├── split_result.py └── utils.py /Croissant-Metadata/McEval_croissant_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "@context": { 3 | "@language": "en", 4 | "@vocab": "https://schema.org/", 5 | "citeAs": "cr:citeAs", 6 | "column": "cr:column", 7 | "conformsTo": "dct:conformsTo", 8 | "cr": "http://mlcommons.org/croissant/", 9 | "data": { 10 | "@id": "cr:data", 11 | "@type": "@json" 12 | }, 13 | "dataBiases": "cr:dataBiases", 14 | "dataCollection": "cr:dataCollection", 15 | "dataType": { 16 | "@id": "cr:dataType", 17 | "@type": "@vocab" 18 | }, 19 | "dct": "http://purl.org/dc/terms/", 20 | "extract": "cr:extract", 21 | "field": "cr:field", 22 | "fileProperty": "cr:fileProperty", 23 | "fileObject": "cr:fileObject", 24 | "fileSet": "cr:fileSet", 25 | "format": "cr:format", 26 | "includes": "cr:includes", 27 | "isLiveDataset": "cr:isLiveDataset", 28 | "jsonPath": "cr:jsonPath", 29 | "key": "cr:key", 30 | "md5": "cr:md5", 31 | "parentField": "cr:parentField", 32 | "path": "cr:path", 33 | "personalSensitiveInformation": "cr:personalSensitiveInformation", 34 | "recordSet": "cr:recordSet", 35 | "references": "cr:references", 36 | "regex": "cr:regex", 37 | "repeated": "cr:repeated", 38 | "replace": "cr:replace", 39 | "sc": "https://schema.org/", 40 | "separator": "cr:separator", 41 | "source": "cr:source", 42 | "subField": "cr:subField", 43 | "transform": "cr:transform" 44 | }, 45 | "@type": "sc:Dataset", 46 | "distribution": [ 47 | { 48 | "@type": "cr:FileObject", 49 | "@id": "repo", 50 | "name": "repo", 51 | "description": "The Hugging Face git repository.", 52 | "contentUrl": "https://huggingface.co/datasets/Multilingual-Multimodal-NLP/McEval/tree/refs%2Fconvert%2Fparquet", 53 | "encodingFormat": "git+https", 54 | "sha256": "https://github.com/mlcommons/croissant/issues/80" 55 | } 56 | ], 57 | "recordSet": [], 58 | "conformsTo": "http://mlcommons.org/croissant/1.0", 59 | "name": "McEval", 60 | "description": "McEval benchmark data as described in the McEval Paper. Code for the evaluation can be found on Github as McEval.\n", 61 | "alternateName": [ 62 | "Multilingual-Multimodal-NLP/McEval" 63 | ], 64 | "creator": { 65 | "@type": "Organization", 66 | "name": "Multilingual-Multimodal-NLP", 67 | "url": "https://huggingface.co/Multilingual-Multimodal-NLP" 68 | }, 69 | "keywords": [ 70 | "text-generation", 71 | "fill-mask", 72 | "summarization", 73 | "English", 74 | "cc-by-sa-4.0", 75 | "Croissant", 76 | "arxiv:2406.07436" 77 | ], 78 | "license": "https://choosealicense.com/licenses/cc-by-sa-4.0/", 79 | "url": "https://huggingface.co/datasets/Multilingual-Multimodal-NLP/McEval" 80 | } 81 | -------------------------------------------------------------------------------- /LICENSE/CODE-LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 MCEVAL 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /MCoder/codeqwen/infer.sh: -------------------------------------------------------------------------------- 1 | export MASTER_ADDR=localhost 2 | export MASTER_PORT=2131 3 | export CUDA_VISIBLE_DEVICES="0,1,2,3,4,5,6,7" 4 | 5 | MODEL_DIR="" 6 | OUT_DIR="" 7 | 8 | COMPLETE_DATA_PATH='complete' 9 | 10 | torchrun --nproc_per_node 8 --master_port 7834 infer.py \ 11 | --base_model $MODEL_DIR \ 12 | --data_path $COMPLETE_DATA_PATH \ 13 | --out_path $OUT_DIR \ 14 | --batch_size 4 15 | 16 | 17 | -------------------------------------------------------------------------------- /MCoder/codeqwen/train.sh: -------------------------------------------------------------------------------- 1 | export MASTER_ADDR="localhost" 2 | export MASTER_PORT="1231" 3 | export GLOO_SOCKET_IFNAME="lo" 4 | export NCCL_SOCKET_IFNAME="lo" 5 | 6 | 7 | MODEL_PATH='CodeQwen1.5-7B' 8 | 9 | DATA_PATH="" 10 | 11 | SAVE_PATH='./ckpt/sft-codewen-1.5-7b' 12 | CUDA_VISIBLE_DEVICES="0,1,2,3,4,5,6,7" python -m torch.distributed.launch --master_addr ${MASTER_ADDR} --master_port ${MASTER_PORT} --nproc_per_node=8 --use_env train.py \ 13 | --model_name_or_path $MODEL_PATH \ 14 | --data_path $DATA_PATH \ 15 | --bf16 True \ 16 | --output_dir $SAVE_PATH \ 17 | --num_train_epochs 2 \ 18 | --per_device_train_batch_size 1\ 19 | --per_device_eval_batch_size 4 \ 20 | --gradient_accumulation_steps 64 \ 21 | --evaluation_strategy "no" \ 22 | --save_strategy "steps" \ 23 | --model_max_length 5000 \ 24 | --save_steps 10000 \ 25 | --save_total_limit 40 \ 26 | --learning_rate 2e-5 \ 27 | --weight_decay 0. \ 28 | --warmup_ratio 0.03 \ 29 | --lr_scheduler_type "cosine" \ 30 | --logging_steps 1 \ 31 | --fsdp "full_shard auto_wrap" \ 32 | --fsdp_transformer_layer_cls_to_wrap 'Qwen2DecoderLayer' \ 33 | --gradient_checkpointing True \ 34 | --tf32 True 35 | 36 | 37 | -------------------------------------------------------------------------------- /MCoder/codeqwen/utils.py: -------------------------------------------------------------------------------- 1 | import dataclasses 2 | import logging 3 | import math 4 | import os 5 | import io 6 | import sys 7 | import time 8 | import json 9 | from typing import Optional, Sequence, Union 10 | import tqdm 11 | import copy 12 | 13 | 14 | def _make_w_io_base(f, mode: str): 15 | if not isinstance(f, io.IOBase): 16 | f_dirname = os.path.dirname(f) 17 | if f_dirname != "": 18 | os.makedirs(f_dirname, exist_ok=True) 19 | f = open(f, mode=mode) 20 | return f 21 | 22 | 23 | def _make_r_io_base(f, mode: str): 24 | if not isinstance(f, io.IOBase): 25 | f = open(f, mode=mode) 26 | return f 27 | 28 | 29 | def jdump(obj, f, mode="w", indent=4, default=str): 30 | """Dump a str or dictionary to a file in json format. 31 | 32 | Args: 33 | obj: An object to be written. 34 | f: A string path to the location on disk. 35 | mode: Mode for opening the file. 36 | indent: Indent for storing json dictionaries. 37 | default: A function to handle non-serializable entries; defaults to `str`. 38 | """ 39 | f = _make_w_io_base(f, mode) 40 | if isinstance(obj, (dict, list)): 41 | json.dump(obj, f, indent=indent, default=default) 42 | elif isinstance(obj, str): 43 | f.write(obj) 44 | else: 45 | raise ValueError(f"Unexpected type: {type(obj)}") 46 | f.close() 47 | 48 | 49 | def jload(f, mode="r"): 50 | """Load a .json file into a dictionary.""" 51 | f = _make_r_io_base(f, mode) 52 | 53 | jdict = [] 54 | for item in f.readlines(): 55 | jdict.append(json.loads(item.strip())) 56 | f.close() 57 | return jdict 58 | -------------------------------------------------------------------------------- /MCoder/deepseek/requirements.txt: -------------------------------------------------------------------------------- 1 | torch==2.0.1 2 | tokenizers==0.14.0 3 | transformers==4.35.0 4 | accelerate==0.24.1 5 | attrdict 6 | tqdm 7 | 8 | deepspeed==0.12.2 9 | datasets 10 | tensorboardX -------------------------------------------------------------------------------- /MCoder/deepseek/train.sh: -------------------------------------------------------------------------------- 1 | 2 | CUDA_VISIBLE_DEVICES="0,1,2,3,4,5,6,7" 3 | export MASTER_ADDR="localhost" 4 | export MASTER_PORT="1231" 5 | export GLOO_SOCKET_IFNAME="lo" 6 | export NCCL_SOCKET_IFNAME="lo" 7 | 8 | 9 | 10 | DATA_PATH="" 11 | OUTPUT_PATH="./ckpt_mcoder_dpsk" 12 | MODEL_PATH="deepseek-coder-7b-base-v1.5" 13 | 14 | 15 | CUDA_VISIBLE_DEVICES="0,1,2,3,4,5,6,7" python -m torch.distributed.launch --master_addr ${MASTER_ADDR} --master_port ${MASTER_PORT} --nproc_per_node=8 --use_env finetune_deepseekcoder.py \ 16 | --model_name_or_path $MODEL_PATH \ 17 | --data_path $DATA_PATH \ 18 | --bf16 True \ 19 | --output_dir $OUTPUT_PATH \ 20 | --num_train_epochs 2 \ 21 | --per_device_train_batch_size 1 \ 22 | --per_device_eval_batch_size 4 \ 23 | --gradient_accumulation_steps 64 \ 24 | --model_max_length 5000 \ 25 | --evaluation_strategy "no" \ 26 | --save_strategy "steps" \ 27 | --save_steps 10000 \ 28 | --save_total_limit 40 \ 29 | --learning_rate 2e-5 \ 30 | --weight_decay 0. \ 31 | --warmup_ratio 0.03 \ 32 | --lr_scheduler_type "cosine" \ 33 | --logging_steps 1 \ 34 | --fsdp "full_shard auto_wrap" \ 35 | --fsdp_transformer_layer_cls_to_wrap 'LlamaDecoderLayer' \ 36 | --gradient_checkpointing True \ 37 | --tf32 True 38 | 39 | 40 | -------------------------------------------------------------------------------- /MCoder/deepseek/utils.py: -------------------------------------------------------------------------------- 1 | import dataclasses 2 | import logging 3 | import math 4 | import os 5 | import io 6 | import sys 7 | import time 8 | import json 9 | from typing import Optional, Sequence, Union 10 | import tqdm 11 | import copy 12 | 13 | 14 | def _make_w_io_base(f, mode: str): 15 | if not isinstance(f, io.IOBase): 16 | f_dirname = os.path.dirname(f) 17 | if f_dirname != "": 18 | os.makedirs(f_dirname, exist_ok=True) 19 | f = open(f, mode=mode) 20 | return f 21 | 22 | 23 | def _make_r_io_base(f, mode: str): 24 | if not isinstance(f, io.IOBase): 25 | f = open(f, mode=mode) 26 | return f 27 | 28 | 29 | def jdump(obj, f, mode="w", indent=4, default=str): 30 | """Dump a str or dictionary to a file in json format. 31 | 32 | Args: 33 | obj: An object to be written. 34 | f: A string path to the location on disk. 35 | mode: Mode for opening the file. 36 | indent: Indent for storing json dictionaries. 37 | default: A function to handle non-serializable entries; defaults to `str`. 38 | """ 39 | f = _make_w_io_base(f, mode) 40 | if isinstance(obj, (dict, list)): 41 | json.dump(obj, f, indent=indent, default=default) 42 | elif isinstance(obj, str): 43 | f.write(obj) 44 | else: 45 | raise ValueError(f"Unexpected type: {type(obj)}") 46 | f.close() 47 | 48 | 49 | def jload(f, mode="r"): 50 | """Load a .json file into a dictionary.""" 51 | f = _make_r_io_base(f, mode) 52 | 53 | jdict = [] 54 | for item in f.readlines(): 55 | jdict.append(json.loads(item.strip())) 56 | f.close() 57 | return jdict 58 | -------------------------------------------------------------------------------- /assets/bench_cases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/assets/bench_cases.png -------------------------------------------------------------------------------- /assets/bench_explain_cases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/assets/bench_explain_cases.png -------------------------------------------------------------------------------- /assets/bench_fim_cases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/assets/bench_fim_cases.png -------------------------------------------------------------------------------- /assets/bench_generation_cases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/assets/bench_generation_cases.png -------------------------------------------------------------------------------- /assets/cate_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/assets/cate_result.png -------------------------------------------------------------------------------- /assets/eval_env.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/assets/eval_env.png -------------------------------------------------------------------------------- /assets/gen_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/assets/gen_result.png -------------------------------------------------------------------------------- /assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/assets/icon.png -------------------------------------------------------------------------------- /assets/intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/assets/intro.png -------------------------------------------------------------------------------- /assets/json_test_case.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/assets/json_test_case.png -------------------------------------------------------------------------------- /assets/mceval_icon.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/assets/mceval_icon.pdf -------------------------------------------------------------------------------- /completion/completion_data.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/completion/completion_data.zip -------------------------------------------------------------------------------- /data/AWK/9_1.txt: -------------------------------------------------------------------------------- 1 | 100 Jason Smith 2 | 200 John Doe 3 | 300 Sanjay Gupta 4 | 400 Ashok Sharma -------------------------------------------------------------------------------- /data/AWK/9_2.txt: -------------------------------------------------------------------------------- 1 | 100 $5,000 2 | 200 $500 3 | 300 $3,000 4 | 400 $1,250 -------------------------------------------------------------------------------- /data/AWK/contribution.txt: -------------------------------------------------------------------------------- 1 | Zhang Dandan 41117397 :250:100:175 2 | Zhang Xiaoyu 390320151 :155:90:201 3 | Meng Feixue 80042789 :250:60:50 4 | Wu Waiwai 70271111 :250:80:75 5 | Liu Bingbing 41117483 :250:100:175 6 | Wang Xiaoai 3515064655 :50:95:135 7 | Zi Gege 1986787350 :250:168:200 8 | Li Youjiu 918391635 :175:75:300 9 | Lao Nanhai 918391635 :250:100:175 -------------------------------------------------------------------------------- /data/AWK/url.txt: -------------------------------------------------------------------------------- 1 | http://www.etiantian.org/index.html 2 | http://www.etiantian.org/1.html 3 | http://post.etiantian.org/index.html 4 | http://mp3.etiantian.org/index.html 5 | http://www.etiantian.org/3.html 6 | http://post.etiantian.org/2.html -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/MyConsoleApp.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net8.0 6 | enable 7 | enable 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Diagnostics; 5 | 6 | class Program 7 | { 8 | 9 | 10 | /* Counts the number of digit, lowercase, and uppercase characters in a given string of length 8. 11 | >>> CountCharacters("1n2s0e1s") 12 | (4, 4, 0) 13 | */ 14 | 15 | static (int, int, int) CountCharacters(string s) 16 | { 17 | if (s.Length != 8) { 18 | throw new ArgumentException("String must be exactly 8 characters long."); 19 | } 20 | 21 | int digits = 0, lowercase = 0, uppercase = 0; 22 | foreach (char c in s) { 23 | if (char.IsDigit(c)) digits++; 24 | else if (char.IsLower(c)) lowercase++; 25 | else if (char.IsUpper(c)) uppercase++; 26 | } 27 | 28 | return (digits, lowercase, uppercase); 29 | } 30 | 31 | // Check function to verify the correctness of the CountCharacters function. 32 | public static void Check() { 33 | var result1 = CountCharacters("1n2s0e1s"); 34 | Debug.Assert(result1 == (4, 4, 0), "Test case 1 failed"); 35 | 36 | var result2 = CountCharacters("AbCdEfG"); 37 | Debug.Assert(result2 == (0, 0, 8), "Test case 2 failed"); 38 | 39 | var result3 = CountCharacters("12345678"); 40 | Debug.Assert(result3 == (8, 0, 0), "Test case 3 failed"); 41 | 42 | Console.WriteLine("All test cases passed!"); 43 | } 44 | static void Main() 45 | { 46 | Debug.Assert(CountCharacters("yLAX2022") == (4, 1, 3)); 47 | Debug.Assert(CountCharacters("MBKKOKOK") == (0, 0, 8)); 48 | Debug.Assert(CountCharacters("1n2s0e1s") == (4, 4, 0)); 49 | Debug.Assert(CountCharacters("1234ABCD") == (4, 0, 4)); 50 | 51 | 52 | } 53 | } -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/bin/Debug/net8.0/MyConsoleApp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/C#/MyConsoleApp/bin/Debug/net8.0/MyConsoleApp -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/bin/Debug/net8.0/MyConsoleApp.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETCoreApp,Version=v8.0", 4 | "signature": "" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETCoreApp,Version=v8.0": { 9 | "MyConsoleApp/1.0.0": { 10 | "runtime": { 11 | "MyConsoleApp.dll": {} 12 | } 13 | } 14 | } 15 | }, 16 | "libraries": { 17 | "MyConsoleApp/1.0.0": { 18 | "type": "project", 19 | "serviceable": false, 20 | "sha512": "" 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/bin/Debug/net8.0/MyConsoleApp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/C#/MyConsoleApp/bin/Debug/net8.0/MyConsoleApp.dll -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/bin/Debug/net8.0/MyConsoleApp.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/C#/MyConsoleApp/bin/Debug/net8.0/MyConsoleApp.pdb -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/bin/Debug/net8.0/MyConsoleApp.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "net8.0", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "8.0.0" 7 | }, 8 | "configProperties": { 9 | "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")] 5 | -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/Debug/net8.0/MyConsoleApp.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | using System; 11 | using System.Reflection; 12 | 13 | [assembly: System.Reflection.AssemblyCompanyAttribute("MyConsoleApp")] 14 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 15 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 16 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 17 | [assembly: System.Reflection.AssemblyProductAttribute("MyConsoleApp")] 18 | [assembly: System.Reflection.AssemblyTitleAttribute("MyConsoleApp")] 19 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 20 | 21 | // Generated by the MSBuild WriteCodeFragment class. 22 | 23 | -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/Debug/net8.0/MyConsoleApp.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 0d3514fbcefafd191ef12e6aed3cd374166613a825c29adddaa7b65d3b38b1ba 2 | -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/Debug/net8.0/MyConsoleApp.GeneratedMSBuildEditorConfig.editorconfig: -------------------------------------------------------------------------------- 1 | is_global = true 2 | build_property.TargetFramework = net8.0 3 | build_property.TargetPlatformMinVersion = 4 | build_property.UsingMicrosoftNETSdkWeb = 5 | build_property.ProjectTypeGuids = 6 | build_property.InvariantGlobalization = 7 | build_property.PlatformNeutralAssembly = 8 | build_property.EnforceExtendedAnalyzerRules = 9 | build_property._SupportedPlatformList = Linux,macOS,Windows 10 | build_property.RootNamespace = MyConsoleApp 11 | build_property.ProjectDir = /workspace/MMCodeEval/data/C#/MyConsoleApp/ 12 | build_property.EnableComHosting = 13 | build_property.EnableGeneratedComInterfaceComImportInterop = 14 | -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/Debug/net8.0/MyConsoleApp.GlobalUsings.g.cs: -------------------------------------------------------------------------------- 1 | // 2 | global using global::System; 3 | global using global::System.Collections.Generic; 4 | global using global::System.IO; 5 | global using global::System.Linq; 6 | global using global::System.Net.Http; 7 | global using global::System.Threading; 8 | global using global::System.Threading.Tasks; 9 | -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/Debug/net8.0/MyConsoleApp.assets.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/C#/MyConsoleApp/obj/Debug/net8.0/MyConsoleApp.assets.cache -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/Debug/net8.0/MyConsoleApp.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 29bf2c2070086d611c7e334a11f3b690936734c2ab123d613c588c0cfcf4fa47 2 | -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/Debug/net8.0/MyConsoleApp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/C#/MyConsoleApp/obj/Debug/net8.0/MyConsoleApp.dll -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/Debug/net8.0/MyConsoleApp.genruntimeconfig.cache: -------------------------------------------------------------------------------- 1 | 87e09b384f8d772ba45cc8d19072641b37d6460e15fb045b6b92f1b67c11ed26 2 | -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/Debug/net8.0/MyConsoleApp.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/C#/MyConsoleApp/obj/Debug/net8.0/MyConsoleApp.pdb -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/Debug/net8.0/MyConsoleApp.sourcelink.json: -------------------------------------------------------------------------------- 1 | {"documents":{"/workspace/MMCodeEval/*":"https://raw.githubusercontent.com/SkLiu2001/MMCodeEval/a44e43049cb0d2f486a39af55f8bd5ad2fe838c7/*"}} -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/Debug/net8.0/apphost: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/C#/MyConsoleApp/obj/Debug/net8.0/apphost -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/Debug/net8.0/ref/MyConsoleApp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/C#/MyConsoleApp/obj/Debug/net8.0/ref/MyConsoleApp.dll -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/Debug/net8.0/refint/MyConsoleApp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/C#/MyConsoleApp/obj/Debug/net8.0/refint/MyConsoleApp.dll -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/MyConsoleApp.csproj.nuget.dgspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "format": 1, 3 | "restore": { 4 | "/workspace/MMCodeEval/data/C#/MyConsoleApp/MyConsoleApp.csproj": {} 5 | }, 6 | "projects": { 7 | "/workspace/MMCodeEval/data/C#/MyConsoleApp/MyConsoleApp.csproj": { 8 | "version": "1.0.0", 9 | "restore": { 10 | "projectUniqueName": "/workspace/MMCodeEval/data/C#/MyConsoleApp/MyConsoleApp.csproj", 11 | "projectName": "MyConsoleApp", 12 | "projectPath": "/workspace/MMCodeEval/data/C#/MyConsoleApp/MyConsoleApp.csproj", 13 | "packagesPath": "/root/.nuget/packages/", 14 | "outputPath": "/workspace/MMCodeEval/data/C#/MyConsoleApp/obj/", 15 | "projectStyle": "PackageReference", 16 | "configFilePaths": [ 17 | "/root/.nuget/NuGet/NuGet.Config" 18 | ], 19 | "originalTargetFrameworks": [ 20 | "net8.0" 21 | ], 22 | "sources": { 23 | "https://api.nuget.org/v3/index.json": {} 24 | }, 25 | "frameworks": { 26 | "net8.0": { 27 | "targetAlias": "net8.0", 28 | "projectReferences": {} 29 | } 30 | }, 31 | "warningProperties": { 32 | "warnAsError": [ 33 | "NU1605" 34 | ] 35 | } 36 | }, 37 | "frameworks": { 38 | "net8.0": { 39 | "targetAlias": "net8.0", 40 | "imports": [ 41 | "net461", 42 | "net462", 43 | "net47", 44 | "net471", 45 | "net472", 46 | "net48", 47 | "net481" 48 | ], 49 | "assetTargetFallback": true, 50 | "warn": true, 51 | "frameworkReferences": { 52 | "Microsoft.NETCore.App": { 53 | "privateAssets": "all" 54 | } 55 | }, 56 | "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/8.0.100/PortableRuntimeIdentifierGraph.json" 57 | } 58 | } 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/MyConsoleApp.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | True 5 | NuGet 6 | $(MSBuildThisFileDirectory)project.assets.json 7 | /root/.nuget/packages/ 8 | /root/.nuget/packages/ 9 | PackageReference 10 | 6.8.0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/MyConsoleApp.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/project.assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "targets": { 4 | "net8.0": {} 5 | }, 6 | "libraries": {}, 7 | "projectFileDependencyGroups": { 8 | "net8.0": [] 9 | }, 10 | "packageFolders": { 11 | "/root/.nuget/packages/": {} 12 | }, 13 | "project": { 14 | "version": "1.0.0", 15 | "restore": { 16 | "projectUniqueName": "/workspace/MMCodeEval/data/C#/MyConsoleApp/MyConsoleApp.csproj", 17 | "projectName": "MyConsoleApp", 18 | "projectPath": "/workspace/MMCodeEval/data/C#/MyConsoleApp/MyConsoleApp.csproj", 19 | "packagesPath": "/root/.nuget/packages/", 20 | "outputPath": "/workspace/MMCodeEval/data/C#/MyConsoleApp/obj/", 21 | "projectStyle": "PackageReference", 22 | "configFilePaths": [ 23 | "/root/.nuget/NuGet/NuGet.Config" 24 | ], 25 | "originalTargetFrameworks": [ 26 | "net8.0" 27 | ], 28 | "sources": { 29 | "https://api.nuget.org/v3/index.json": {} 30 | }, 31 | "frameworks": { 32 | "net8.0": { 33 | "targetAlias": "net8.0", 34 | "projectReferences": {} 35 | } 36 | }, 37 | "warningProperties": { 38 | "warnAsError": [ 39 | "NU1605" 40 | ] 41 | } 42 | }, 43 | "frameworks": { 44 | "net8.0": { 45 | "targetAlias": "net8.0", 46 | "imports": [ 47 | "net461", 48 | "net462", 49 | "net47", 50 | "net471", 51 | "net472", 52 | "net48", 53 | "net481" 54 | ], 55 | "assetTargetFallback": true, 56 | "warn": true, 57 | "frameworkReferences": { 58 | "Microsoft.NETCore.App": { 59 | "privateAssets": "all" 60 | } 61 | }, 62 | "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/8.0.100/PortableRuntimeIdentifierGraph.json" 63 | } 64 | } 65 | } 66 | } -------------------------------------------------------------------------------- /data/C#/MyConsoleApp/obj/project.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "dgSpecHash": "R36zcsy/vx2oqizEEhd01+ZmgnC8XEueLHnSSzCwXj7+kUk93vkcar7kipt9B5ORm4jl4BA3F26hNAVbKcWwww==", 4 | "success": true, 5 | "projectFilePath": "/workspace/MMCodeEval/data/C#/MyConsoleApp/MyConsoleApp.csproj", 6 | "expectedPackageFiles": [], 7 | "logs": [] 8 | } -------------------------------------------------------------------------------- /data/Common Lisp/file.txt: -------------------------------------------------------------------------------- 1 | First line of the file 2 | Second line of the file -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/MyFsharpApp.fsproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net8.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/Program.fs: -------------------------------------------------------------------------------- 1 | 2 | let absoluteValue (n: int): int = 3 | if n < 0 then -n 4 | else n 5 | 6 | 7 | let check () = 8 | if absoluteValue -10 <> 10 then 9 | failwith "Test Case 1 failed" 10 | if absoluteValue 5 <> 5 then 11 | failwith "Test Case 2 failed" 12 | if absoluteValue 0 <> 0 then 13 | failwith "Test Case 3 failed" 14 | if absoluteValue -10000 <> 10000 then 15 | failwith "Test Case 4 failed" 16 | if absoluteValue 9999 <> 9999 then 17 | failwith "Test Case 5 failed" 18 | if absoluteValue -1 <> 1 then 19 | failwith "Test Case 6 failed" 20 | 21 | check () -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/FSharp.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/bin/Debug/net8.0/FSharp.Core.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/MyFsharpApp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/bin/Debug/net8.0/MyFsharpApp -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/MyFsharpApp.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETCoreApp,Version=v8.0", 4 | "signature": "" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETCoreApp,Version=v8.0": { 9 | "MyFsharpApp/1.0.0": { 10 | "dependencies": { 11 | "FSharp.Core": "8.0.100" 12 | }, 13 | "runtime": { 14 | "MyFsharpApp.dll": {} 15 | } 16 | }, 17 | "FSharp.Core/8.0.100": { 18 | "runtime": { 19 | "lib/netstandard2.1/FSharp.Core.dll": { 20 | "assemblyVersion": "8.0.0.0", 21 | "fileVersion": "8.1.23.52306" 22 | } 23 | }, 24 | "resources": { 25 | "lib/netstandard2.1/cs/FSharp.Core.resources.dll": { 26 | "locale": "cs" 27 | }, 28 | "lib/netstandard2.1/de/FSharp.Core.resources.dll": { 29 | "locale": "de" 30 | }, 31 | "lib/netstandard2.1/es/FSharp.Core.resources.dll": { 32 | "locale": "es" 33 | }, 34 | "lib/netstandard2.1/fr/FSharp.Core.resources.dll": { 35 | "locale": "fr" 36 | }, 37 | "lib/netstandard2.1/it/FSharp.Core.resources.dll": { 38 | "locale": "it" 39 | }, 40 | "lib/netstandard2.1/ja/FSharp.Core.resources.dll": { 41 | "locale": "ja" 42 | }, 43 | "lib/netstandard2.1/ko/FSharp.Core.resources.dll": { 44 | "locale": "ko" 45 | }, 46 | "lib/netstandard2.1/pl/FSharp.Core.resources.dll": { 47 | "locale": "pl" 48 | }, 49 | "lib/netstandard2.1/pt-BR/FSharp.Core.resources.dll": { 50 | "locale": "pt-BR" 51 | }, 52 | "lib/netstandard2.1/ru/FSharp.Core.resources.dll": { 53 | "locale": "ru" 54 | }, 55 | "lib/netstandard2.1/tr/FSharp.Core.resources.dll": { 56 | "locale": "tr" 57 | }, 58 | "lib/netstandard2.1/zh-Hans/FSharp.Core.resources.dll": { 59 | "locale": "zh-Hans" 60 | }, 61 | "lib/netstandard2.1/zh-Hant/FSharp.Core.resources.dll": { 62 | "locale": "zh-Hant" 63 | } 64 | } 65 | } 66 | } 67 | }, 68 | "libraries": { 69 | "MyFsharpApp/1.0.0": { 70 | "type": "project", 71 | "serviceable": false, 72 | "sha512": "" 73 | }, 74 | "FSharp.Core/8.0.100": { 75 | "type": "package", 76 | "serviceable": true, 77 | "sha512": "sha512-ZOVZ/o+jI3ormTZOa28Wh0tSRoyle1f7lKFcUN61sPiXI7eDZu8eSveFybgTeyIEyW0ujjp31cp7GOglDgsNEg==", 78 | "path": "fsharp.core/8.0.100", 79 | "hashPath": "fsharp.core.8.0.100.nupkg.sha512" 80 | } 81 | } 82 | } -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/MyFsharpApp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/bin/Debug/net8.0/MyFsharpApp.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/MyFsharpApp.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/bin/Debug/net8.0/MyFsharpApp.pdb -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/MyFsharpApp.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "net8.0", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "8.0.0" 7 | }, 8 | "configProperties": { 9 | "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/cs/FSharp.Core.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/bin/Debug/net8.0/cs/FSharp.Core.resources.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/de/FSharp.Core.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/bin/Debug/net8.0/de/FSharp.Core.resources.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/es/FSharp.Core.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/bin/Debug/net8.0/es/FSharp.Core.resources.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/fr/FSharp.Core.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/bin/Debug/net8.0/fr/FSharp.Core.resources.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/it/FSharp.Core.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/bin/Debug/net8.0/it/FSharp.Core.resources.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/ja/FSharp.Core.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/bin/Debug/net8.0/ja/FSharp.Core.resources.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/ko/FSharp.Core.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/bin/Debug/net8.0/ko/FSharp.Core.resources.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/pl/FSharp.Core.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/bin/Debug/net8.0/pl/FSharp.Core.resources.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/pt-BR/FSharp.Core.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/bin/Debug/net8.0/pt-BR/FSharp.Core.resources.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/ru/FSharp.Core.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/bin/Debug/net8.0/ru/FSharp.Core.resources.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/tr/FSharp.Core.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/bin/Debug/net8.0/tr/FSharp.Core.resources.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/zh-Hans/FSharp.Core.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/bin/Debug/net8.0/zh-Hans/FSharp.Core.resources.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/bin/Debug/net8.0/zh-Hant/FSharp.Core.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/bin/Debug/net8.0/zh-Hant/FSharp.Core.resources.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.fs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.BuildSettings 2 | [] 3 | do () 4 | -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.AssemblyInfo.fs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the FSharp WriteCodeFragment class. 3 | // 4 | namespace FSharp 5 | 6 | open System 7 | open System.Reflection 8 | 9 | 10 | [] 11 | [] 12 | [] 13 | [] 14 | [] 15 | [] 16 | [] 17 | do() 18 | -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 633518b2735d2aa3971225c3ea8e95308e48cdeed8b121d99f5b8889950b6a83 2 | -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.assets.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.assets.cache -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.fsproj.AssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.fsproj.AssemblyReference.cache -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.fsproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.fsproj.CopyComplete -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.fsproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | e5e7e44213a6ca66ed531386cf16db8ac5a5590de17d2671bdc624843b6009ce 2 | -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.fsproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/MyFsharpApp 2 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/MyFsharpApp.deps.json 3 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/MyFsharpApp.runtimeconfig.json 4 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/MyFsharpApp.dll 5 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/MyFsharpApp.pdb 6 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/FSharp.Core.dll 7 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/cs/FSharp.Core.resources.dll 8 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/de/FSharp.Core.resources.dll 9 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/es/FSharp.Core.resources.dll 10 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/fr/FSharp.Core.resources.dll 11 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/it/FSharp.Core.resources.dll 12 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/ja/FSharp.Core.resources.dll 13 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/ko/FSharp.Core.resources.dll 14 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/pl/FSharp.Core.resources.dll 15 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/pt-BR/FSharp.Core.resources.dll 16 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/ru/FSharp.Core.resources.dll 17 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/tr/FSharp.Core.resources.dll 18 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/zh-Hans/FSharp.Core.resources.dll 19 | /workspace/MMCodeEval/data/F#/MyFsharpApp/bin/Debug/net8.0/zh-Hant/FSharp.Core.resources.dll 20 | /workspace/MMCodeEval/data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.fsproj.AssemblyReference.cache 21 | /workspace/MMCodeEval/data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.AssemblyInfoInputs.cache 22 | /workspace/MMCodeEval/data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.AssemblyInfo.fs 23 | /workspace/MMCodeEval/data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.fsproj.CoreCompileInputs.cache 24 | /workspace/MMCodeEval/data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.sourcelink.json 25 | /workspace/MMCodeEval/data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.fsproj.CopyComplete 26 | /workspace/MMCodeEval/data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.dll 27 | /workspace/MMCodeEval/data/F#/MyFsharpApp/obj/Debug/net8.0/refint/MyFsharpApp.dll 28 | /workspace/MMCodeEval/data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.pdb 29 | /workspace/MMCodeEval/data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.genruntimeconfig.cache 30 | /workspace/MMCodeEval/data/F#/MyFsharpApp/obj/Debug/net8.0/ref/MyFsharpApp.dll 31 | -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.genruntimeconfig.cache: -------------------------------------------------------------------------------- 1 | 10ad75308aa7f6a6af08d62c5379277114186f3a26b7ab39a334e4c6c33020f6 2 | -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.pdb -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/Debug/net8.0/MyFsharpApp.sourcelink.json: -------------------------------------------------------------------------------- 1 | {"documents":{"/workspace/MMCodeEval/*":"https://raw.githubusercontent.com/SkLiu2001/MMCodeEval/a44e43049cb0d2f486a39af55f8bd5ad2fe838c7/*"}} -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/Debug/net8.0/apphost: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/obj/Debug/net8.0/apphost -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/Debug/net8.0/ref/MyFsharpApp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/obj/Debug/net8.0/ref/MyFsharpApp.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/Debug/net8.0/refint/MyFsharpApp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/F#/MyFsharpApp/obj/Debug/net8.0/refint/MyFsharpApp.dll -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/MyFsharpApp.fsproj.nuget.dgspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "format": 1, 3 | "restore": { 4 | "/workspace/MMCodeEval/data/F#/MyFsharpApp/MyFsharpApp.fsproj": {} 5 | }, 6 | "projects": { 7 | "/workspace/MMCodeEval/data/F#/MyFsharpApp/MyFsharpApp.fsproj": { 8 | "version": "1.0.0", 9 | "restore": { 10 | "projectUniqueName": "/workspace/MMCodeEval/data/F#/MyFsharpApp/MyFsharpApp.fsproj", 11 | "projectName": "MyFsharpApp", 12 | "projectPath": "/workspace/MMCodeEval/data/F#/MyFsharpApp/MyFsharpApp.fsproj", 13 | "packagesPath": "/root/.nuget/packages/", 14 | "outputPath": "/workspace/MMCodeEval/data/F#/MyFsharpApp/obj/", 15 | "projectStyle": "PackageReference", 16 | "configFilePaths": [ 17 | "/root/.nuget/NuGet/NuGet.Config" 18 | ], 19 | "originalTargetFrameworks": [ 20 | "net8.0" 21 | ], 22 | "sources": { 23 | "/usr/share/dotnet/sdk/8.0.100/FSharp/library-packs": {}, 24 | "https://api.nuget.org/v3/index.json": {} 25 | }, 26 | "frameworks": { 27 | "net8.0": { 28 | "targetAlias": "net8.0", 29 | "projectReferences": {} 30 | } 31 | } 32 | }, 33 | "frameworks": { 34 | "net8.0": { 35 | "targetAlias": "net8.0", 36 | "dependencies": { 37 | "FSharp.Core": { 38 | "include": "Runtime, Compile, Build, Native, Analyzers, BuildTransitive", 39 | "target": "Package", 40 | "version": "[8.0.100, )", 41 | "generatePathProperty": true 42 | } 43 | }, 44 | "imports": [ 45 | "net461", 46 | "net462", 47 | "net47", 48 | "net471", 49 | "net472", 50 | "net48", 51 | "net481" 52 | ], 53 | "assetTargetFallback": true, 54 | "warn": true, 55 | "frameworkReferences": { 56 | "Microsoft.NETCore.App": { 57 | "privateAssets": "all" 58 | } 59 | }, 60 | "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/8.0.100/PortableRuntimeIdentifierGraph.json" 61 | } 62 | } 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/MyFsharpApp.fsproj.nuget.g.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | True 5 | NuGet 6 | $(MSBuildThisFileDirectory)project.assets.json 7 | /root/.nuget/packages/ 8 | /root/.nuget/packages/ 9 | PackageReference 10 | 6.8.0 11 | 12 | 13 | 14 | 15 | 16 | /root/.nuget/packages/fsharp.core/8.0.100 17 | 18 | -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/MyFsharpApp.fsproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /data/F#/MyFsharpApp/obj/project.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "dgSpecHash": "3bhDJDyVfbO7QqtcQz7jK4pHWeNQ6HVEqLgAGetsv17pT7ZWbRAWhC5Z508/2Nw7idwTcQmufL1i1Mw1AQ6ofw==", 4 | "success": true, 5 | "projectFilePath": "/workspace/MMCodeEval/data/F#/MyFsharpApp/MyFsharpApp.fsproj", 6 | "expectedPackageFiles": [ 7 | "/root/.nuget/packages/fsharp.core/8.0.100/fsharp.core.8.0.100.nupkg.sha512" 8 | ], 9 | "logs": [] 10 | } -------------------------------------------------------------------------------- /data/HTML/1.html: -------------------------------------------------------------------------------- 1 |

Heading level 1

-------------------------------------------------------------------------------- /data/HTML/10.html: -------------------------------------------------------------------------------- 1 |
    2 |
  • First item
  • 3 |
  • Second item
  • 4 |
  • Third item
  • 5 |
  • Fourth item
  • 6 |
-------------------------------------------------------------------------------- /data/HTML/11.html: -------------------------------------------------------------------------------- 1 | Use `code` in your HTML file -------------------------------------------------------------------------------- /data/HTML/12.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
col_1col_2
row_1; col_1row_1; col_2
row_2; col_1row_2; col_2
-------------------------------------------------------------------------------- /data/HTML/13.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
col_1col_2
row_1; col_1row_1; col_2
row_2; col_1row_2; col_2
-------------------------------------------------------------------------------- /data/HTML/14.html: -------------------------------------------------------------------------------- 1 |

this is
Text.

-------------------------------------------------------------------------------- /data/HTML/15.html: -------------------------------------------------------------------------------- 1 |

+++

-------------------------------------------------------------------------------- /data/HTML/16.html: -------------------------------------------------------------------------------- 1 | --- 2 | name: 漏洞反馈 3 | about: 报错或漏洞请使用这个模板创建 4 | title: "[BUG]" 5 | labels: bug 6 | assignees: 7 | --- 8 | -------------------------------------------------------------------------------- /data/HTML/17.html: -------------------------------------------------------------------------------- 1 |

Use the GitLens: Welcome (Quick Setup) command from the Command Palette to open it.

-------------------------------------------------------------------------------- /data/HTML/18.html: -------------------------------------------------------------------------------- 1 |

GitLens adds Git authorship CodeLens to the top of the file and on code blocks. The recent change CodeLens shows the author and date of the most recent commit for the code block or file, while the authors CodeLens shows the number of authors of the code block or file and the most prominent author (if there is more than one).

-------------------------------------------------------------------------------- /data/HTML/19.html: -------------------------------------------------------------------------------- 1 |

GitLens+ Features

-------------------------------------------------------------------------------- /data/HTML/2.html: -------------------------------------------------------------------------------- 1 |

I really like using Markdown.

2 |

I think I'll use it to format all of my documents from now on.

-------------------------------------------------------------------------------- /data/HTML/20.html: -------------------------------------------------------------------------------- 1 |

To use this directly from your terminal, e.g. when running git rebase -i,

2 |
    3 |
  • set VS Code as your default Git editor
  • 4 |
  • git config --global core.editor "code --wait"
  • 5 |
-------------------------------------------------------------------------------- /data/HTML/21.html: -------------------------------------------------------------------------------- 1 |
2 |

To use the Insiders edition of VS Code, replace code in the above with code-insiders

3 |
-------------------------------------------------------------------------------- /data/HTML/22.html: -------------------------------------------------------------------------------- 1 |

The std::vector in the C++ standard library is described as a dynamic array that provides various methods for inserting elements. To insert elements from the beginning, use the std::vector's insert function combined with iterators.

-------------------------------------------------------------------------------- /data/HTML/23.html: -------------------------------------------------------------------------------- 1 |

streams WG Meeting 2015-01-30

2 |

Links

-------------------------------------------------------------------------------- /data/HTML/24.html: -------------------------------------------------------------------------------- 1 |
    2 |
  • Google Hangouts Video: http://www.youtube.com/watch?v=I9nDOSGfwZg
  • 3 |
  • GitHub Issue: https://github.com/iojs/readable-stream/issues/106
  • 4 |
  • Original Minutes Google Doc: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
  • 5 |
-------------------------------------------------------------------------------- /data/HTML/25.html: -------------------------------------------------------------------------------- 1 |
    2 |
  • adopt a charter #105
  • 3 |
  • release and versioning strategy #101
  • 4 |
  • simpler stream creation #102
  • 5 |
  • proposal: deprecate implicit flowing of streams #99
  • 6 |
-------------------------------------------------------------------------------- /data/HTML/26.html: -------------------------------------------------------------------------------- 1 |

What versioning scheme should be adopted?

2 |
    3 |
  • group: +1’s 3.0.0
  • 4 |
  • domenic+group: pulling in patches from other sources where appropriate
  • 5 |
  • mikeal: version independently, suggesting versions for io.js
  • 6 |
  • mikeal+domenic: work with TC to notify in advance of changes
  • 7 |
8 |

simpler stream creation

-------------------------------------------------------------------------------- /data/HTML/27.html: -------------------------------------------------------------------------------- 1 |

action items:

2 |
    3 |
  • ask Isaac for the ability to list packages by what public io.js APIs they use, especially Stream
  • 4 |
  • ask Rod/build for infrastructure
  • 5 |
-------------------------------------------------------------------------------- /data/HTML/28.html: -------------------------------------------------------------------------------- 1 |

References:

2 | 6 | -------------------------------------------------------------------------------- /data/HTML/29.html: -------------------------------------------------------------------------------- 1 |

Accessibility guidelines

2 | 5 |

Resources

6 | -------------------------------------------------------------------------------- /data/HTML/3.html: -------------------------------------------------------------------------------- 1 | HTML -------------------------------------------------------------------------------- /data/HTML/30.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
Function NameFilesystemFilePathsBase
cdAbstractStringAbstractPath
17 | -------------------------------------------------------------------------------- /data/HTML/31.html: -------------------------------------------------------------------------------- 1 |

Heading level 1

2 |

I really like using Markdown.

3 |

I think I'll use it to format all of my documents from now on.

-------------------------------------------------------------------------------- /data/HTML/32.html: -------------------------------------------------------------------------------- 1 |

allowedInvalidRules is an optional string array of custom roles that should be allowed in addition to the ARIA spec, such as for cases when you need to use a non-standard role.

-------------------------------------------------------------------------------- /data/HTML/33.html: -------------------------------------------------------------------------------- 1 |

Resources

2 | -------------------------------------------------------------------------------- /data/HTML/34.html: -------------------------------------------------------------------------------- 1 |

Confirming on items

2 |

Items can be validated using the specific option ensureItem.

3 |
    4 |
  • The return of a new instance of an array with coerced item values.
  • 5 |
  • The error message will list up to three items which are invalid.
  • 6 |
-------------------------------------------------------------------------------- /data/HTML/35.html: -------------------------------------------------------------------------------- 1 |

lotsofbackticks

2 |

iwonderhowthiswillbeparsed

-------------------------------------------------------------------------------- /data/HTML/36.html: -------------------------------------------------------------------------------- 1 |

Heading level 1

2 |

I just love bold text.

-------------------------------------------------------------------------------- /data/HTML/37.html: -------------------------------------------------------------------------------- 1 |

One red teacher marked, while LLMs are being able to iteratively improve on produced source code, which is a risk.

2 |

I just love bold text.

-------------------------------------------------------------------------------- /data/HTML/38.html: -------------------------------------------------------------------------------- 1 |

Changelog

2 |

v1.1.0

3 |
    4 |
  • test: should require handled by mocha.
  • 5 |
  • package: coffeescript 2 and use semver tilde.
  • 6 |
-------------------------------------------------------------------------------- /data/HTML/39.html: -------------------------------------------------------------------------------- 1 |

[Build Status][travis]

-------------------------------------------------------------------------------- /data/HTML/4.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/HTML/40.html: -------------------------------------------------------------------------------- 1 |

Part of the [CSV module][csv_home], this project is a parser converting CSV text input into arrays or objects. It implements the Node.js.

-------------------------------------------------------------------------------- /data/HTML/41.html: -------------------------------------------------------------------------------- 1 |

Release history

2 |

All notable changes to this project will be documented in this file.

-------------------------------------------------------------------------------- /data/HTML/42.html: -------------------------------------------------------------------------------- 1 |
    2 |
  • Readme link fixed by @danez.
  • 3 |
  • options.capture now works as expected when fastpaths are enabled. See https://github.com/micromatch/picomatch/pull/12/commits/26aefd71f1cfaf95c37f1c1fcab68a693b037304. Thanks to @DrPizza.
  • 4 |
-------------------------------------------------------------------------------- /data/HTML/43.html: -------------------------------------------------------------------------------- 1 |

[1.0.0] - 2018-11-05

2 |
    3 |
  • adds .onMatch option
  • 4 |
  • improvements to .scan method
  • 5 |
  • numerous improvements and optimizations for matching and parsing
  • 6 |
  • better windows path handling
  • 7 |
-------------------------------------------------------------------------------- /data/HTML/44.html: -------------------------------------------------------------------------------- 1 |

gyp-next.

-------------------------------------------------------------------------------- /data/HTML/45.html: -------------------------------------------------------------------------------- 1 |

Documents are available at gyp.gsrc.io, or you can check out md-pages branch to read those documents offline.

-------------------------------------------------------------------------------- /data/HTML/46.html: -------------------------------------------------------------------------------- 1 |

Converters

-------------------------------------------------------------------------------- /data/HTML/47.html: -------------------------------------------------------------------------------- 1 |

See maybe_types.md for more information on Nan::Maybe types.

-------------------------------------------------------------------------------- /data/HTML/48.html: -------------------------------------------------------------------------------- 1 |

Example

2 |

c++ 3 | v8::Local<v8::Value> val; 4 | Nan::MaybeLocal<v8::String> str = Nan::To<v8::String>(val); 5 | Nan::Maybe<double> d = Nan::To<double>(val);

-------------------------------------------------------------------------------- /data/HTML/49.html: -------------------------------------------------------------------------------- 1 |

copy(src, dest, [options, callback])

2 |

Copy a file or directory. The directory can have contents. Like cp -r.

-------------------------------------------------------------------------------- /data/HTML/5.html: -------------------------------------------------------------------------------- 1 |

I just love bold text.

-------------------------------------------------------------------------------- /data/HTML/50.html: -------------------------------------------------------------------------------- 1 |

crontab -e

2 | -------------------------------------------------------------------------------- /data/HTML/6.html: -------------------------------------------------------------------------------- 1 |

One red teamer marked, while LLMs are being able to iteratively improve on produced source code, which is a risk.

-------------------------------------------------------------------------------- /data/HTML/7.html: -------------------------------------------------------------------------------- 1 |
2 | Dorothy followed her through many of the beautiful rooms in her castle. 3 |
4 | The Witch batch her clean the dots and tickets and sweep the floor and keep the fire fed with wood. 5 |
6 |
-------------------------------------------------------------------------------- /data/HTML/8.html: -------------------------------------------------------------------------------- 1 |
2 |

The quarterly results look great!

3 |
    4 |
  • Revenue was off the chart
  • 5 |
  • Profits were higher than ever
  • 6 |
7 |
-------------------------------------------------------------------------------- /data/HTML/9.html: -------------------------------------------------------------------------------- 1 |
    2 |
  1. First item
  2. 3 |
  3. Second item
  4. 4 |
  5. Third item
  6. 5 |
  7. Fourth item
  8. 6 |
-------------------------------------------------------------------------------- /data/JSON/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cainiao", 3 | "url": "www.runoob.com", 4 | "slogan": "Learning is not only about technology, but also about dreams" 5 | } -------------------------------------------------------------------------------- /data/JSON/10.json: -------------------------------------------------------------------------------- 1 | { 2 | "purchaseOrders": "Purchase Orders", 3 | "orders": { 4 | "order1042": { 5 | "name": "John Smith", 6 | "sku": "20223", 7 | "price": 23.95, 8 | "filled": false 9 | }, 10 | "order1043": { 11 | "name": "Alice Brown", 12 | "sku": "54321", 13 | "price": 199.95, 14 | "filled": true 15 | }, 16 | "order1044": { 17 | "name": "John Smith", 18 | "sku": "23420", 19 | "price": 104.95, 20 | "filled": false 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /data/JSON/11.json: -------------------------------------------------------------------------------- 1 | { 2 | "people": [ 3 | { 4 | "firstName": "Brett", 5 | "lastName": "McLaughlin", 6 | "email": "aaaa" 7 | }, 8 | { 9 | "firstName": "Jason", 10 | "lastName": "Hunter", 11 | "email": "bbbb" 12 | }, 13 | { 14 | "firstName": "Elliotte", 15 | "lastName": "Harold", 16 | "email": "cccc" 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /data/JSON/12.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Extra spaces in tag", 3 | "options": {}, 4 | "expected": [ 5 | { 6 | "type": "tag", 7 | "name": "font", 8 | "attributes": { 9 | "size": "14" 10 | }, 11 | "children": [ 12 | { 13 | "type": "text", 14 | "data": "the text" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /data/JSON/13.json: -------------------------------------------------------------------------------- 1 | { 2 | "router-view": { 3 | "attributes": [ 4 | "name", 5 | "route" 6 | ], 7 | "description": "A component that renders the matched component for the current location. Components rendered by can also have their own , allowing for the rendering of nested routes." 8 | }, 9 | "router-link": { 10 | "attributes": [ 11 | "to", 12 | "replace", 13 | "custom", 14 | "active-class", 15 | "exact-active-class", 16 | "aria-current-value" 17 | ], 18 | "description": "Renders an element with the correct href attribute. Has click listeners for local navigation. The custom prop and the v-slot API allow for customization of its rendering." 19 | } 20 | } -------------------------------------------------------------------------------- /data/JSON/14.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "type": "shell", 6 | "label": "task g++", 7 | "command": "D:\\develop_tools\\mingw64\\bin\\g++.exe", 8 | "args": [ 9 | "-g", 10 | "${file}", 11 | "-o", 12 | "${fileDirname}\\${fileBasenameNoExtension}.exe" 13 | ], 14 | "options": { 15 | "cwd": "D:\\develop_tools\\mingw64\\bin" 16 | }, 17 | "problemMatcher": "$gcc", 18 | "group": "build" 19 | } 20 | ] 21 | } -------------------------------------------------------------------------------- /data/JSON/15.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "FX Preview", 3 | "Type": "scene2d" 4 | } -------------------------------------------------------------------------------- /data/JSON/16.json: -------------------------------------------------------------------------------- 1 | { 2 | "and_ding_remind_type_app" : "应用内", 3 | "and_ding_remind_type_sms" : "短信", 4 | "and_modify_device_name" : "修改设备名称", 5 | "and_network_no_connection" : "无网络连接,请连接网络后重试", 6 | "and_search_user_not_exist_error" : "用户不存在", 7 | "time.yesterday" : "昨天" 8 | } -------------------------------------------------------------------------------- /data/JSON/17.json: -------------------------------------------------------------------------------- 1 | [["d:/python/Lib/site-packages/yarl/__init__.pyi",[false,[["_SimpleQuery",true,13,null],["_QueryVariable",true,13,null],["_Query",true,13,null],["URL",true,5,null],["cached_property",true,5,null],["CacheInfo",true,5,null],["cache_clear",true,12,null],["cache_info",true,12,null],["cache_configure",true,12,null]]]]] -------------------------------------------------------------------------------- /data/JSON/18.json: -------------------------------------------------------------------------------- 1 | {"meta":{"b803f553e3267e38.js":[0,82256]},"version":"3.2.25"} -------------------------------------------------------------------------------- /data/JSON/19.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Node.js 10", 3 | "image": "chrmarti/node" 4 | } -------------------------------------------------------------------------------- /data/JSON/2.json: -------------------------------------------------------------------------------- 1 | { 2 | "sites": [ 3 | { 4 | "name": "Google", 5 | "url": "www.google.com" 6 | }, 7 | { 8 | "name": "Weibo", 9 | "url": "www.weibo.com" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /data/JSON/20.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "parserOptions": { 4 | "ecmaVersion": 6 5 | }, 6 | "env": { 7 | "browser": true, 8 | "commonjs": true, 9 | "node": true, 10 | "mocha": true 11 | }, 12 | "extends": ["eslint:recommended"] 13 | } 14 | -------------------------------------------------------------------------------- /data/JSON/21.json: -------------------------------------------------------------------------------- 1 | { 2 | "help": "https://go.microsoft.com/fwlink/?linkid=866610", 3 | "root": true, 4 | 5 | "dependentFileProviders": { 6 | "add": { 7 | "addedExtension": {}, 8 | "pathSegment": { 9 | "add": { 10 | ".*": [ 11 | ".js", 12 | ".css", 13 | ".html", 14 | ".htm", 15 | ".less", 16 | ".scss", 17 | ".coffee", 18 | ".iced", 19 | ".config", 20 | ".cs", 21 | ".vb", 22 | ".json" 23 | ] 24 | } 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /data/JSON/22.json: -------------------------------------------------------------------------------- 1 | { 2 | "es3": true, 3 | 4 | "additionalRules": [], 5 | 6 | "requireSemicolons": true, 7 | 8 | "disallowMultipleSpaces": true, 9 | 10 | "disallowIdentifierNames": [], 11 | 12 | "requireCurlyBraces": { 13 | "allExcept": [], 14 | "keywords": ["if", "else", "for", "while", "do", "try", "catch"] 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /data/JSON/23.json: -------------------------------------------------------------------------------- 1 | { 2 | "spec": "lib/tests", 3 | "extension": ["js"], 4 | "recursive": true 5 | } -------------------------------------------------------------------------------- /data/JSON/24.json: -------------------------------------------------------------------------------- 1 | {"list":[{"name":"Model English","id":"afcb612e-7576-41d8-8276-e8d4977a2d42","path":"D:/steam/steamapps/common/Phasmophobia/Phasmophobia_Data/StreamingAssets\\LanguageModels/English","tag":"{\"language\":10,\"lastWriteTime\":1673454188429}"}]} -------------------------------------------------------------------------------- /data/JSON/25.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "4.9", 3 | "lockfileVersion": 3, 4 | "requires": true, 5 | "packages": { 6 | "node_modules/@types/node": { 7 | "version": "20.4.7", 8 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.7.tgz", 9 | "integrity": "sha512-bUBrPjEry2QUTsnuEjzjbS7voGWCc30W0qzgMf90GPeDGFRakvrz47ju+oqDAKCXLUCe39u57/ORMl/O/04/9g==", 10 | "dev": true 11 | }, 12 | "node_modules/types-registry": { 13 | "version": "0.1.673", 14 | "resolved": "https://registry.npmjs.org/types-registry/-/types-registry-0.1.673.tgz", 15 | "integrity": "sha512-4rSIfxfrp3t/hYnCB79+R4xW6Xyq+oQJbRqBnPh+eSIg2w8jkQCrl4tM6VhxCAs+PuYuOWo6U1fWFGlLc/40zw==" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /data/JSON/26.json: -------------------------------------------------------------------------------- 1 | { 2 | "endOfLine": "auto", 3 | "printWidth": 120, 4 | "singleQuote": true, 5 | "trailingComma": "all", 6 | "overrides": [ 7 | { 8 | "files": "*.json", 9 | "options": { 10 | "tabWidth": 2 11 | } 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /data/JSON/27.json: -------------------------------------------------------------------------------- 1 | { 2 | "launchers": { 3 | "node": { 4 | "command": "npm test" 5 | } 6 | }, 7 | "src_files": [ 8 | "./**/*.js" 9 | ], 10 | "before_tests": "npm run build", 11 | "on_exit": "rm test/static/bundle.js", 12 | "test_page": "test/static/index.html", 13 | "launch_in_dev": ["node", "phantomjs"] 14 | } 15 | -------------------------------------------------------------------------------- /data/JSON/28.json: -------------------------------------------------------------------------------- 1 | { 2 | "minecraft:adventure/adventuring_time": { 3 | "criteria": { 4 | "minecraft:plains": "2022-08-09 23:22:57 +0800" 5 | }, 6 | "done": false 7 | }, 8 | "DataVersion": 2567 9 | } -------------------------------------------------------------------------------- /data/JSON/29.json: -------------------------------------------------------------------------------- 1 | {"stats":{"minecraft:custom":{"minecraft:time_since_rest":65,"minecraft:play_one_minute":65,"minecraft:leave_game":1,"minecraft:time_since_death":65}},"DataVersion":2567} -------------------------------------------------------------------------------- /data/JSON/3.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "age": 30 4 | } -------------------------------------------------------------------------------- /data/JSON/30.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Basic test", 3 | "options": {}, 4 | "html": "The TitleHello world", 5 | "expected": [ 6 | { 7 | "name": "!doctype", 8 | "data": "!DOCTYPE html", 9 | "type": "directive" 10 | }, 11 | { 12 | "type": "tag", 13 | "name": "html", 14 | "attribs": {}, 15 | "parent": null, 16 | "children": [ 17 | { 18 | "type": "tag", 19 | "name": "title", 20 | "attribs": {}, 21 | "parent": { 22 | "type": "tag", 23 | "name": "html", 24 | "attribs": {} 25 | }, 26 | "children": [ 27 | { 28 | "data": "The Title", 29 | "type": "text", 30 | "parent": { 31 | "type": "tag", 32 | "name": "title", 33 | "attribs": {} 34 | } 35 | } 36 | ] 37 | }, 38 | { 39 | "type": "tag", 40 | "name": "body", 41 | "attribs": {}, 42 | "children": [ 43 | { 44 | "data": "Hello world", 45 | "type": "text" 46 | } 47 | ], 48 | "prev": { 49 | "type": "tag", 50 | "name": "title", 51 | "attribs": {} 52 | } 53 | } 54 | ] 55 | } 56 | ] 57 | } -------------------------------------------------------------------------------- /data/JSON/31.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Single Tag 1", 3 | "options": {}, 4 | "html": "
text
", 5 | "expected": [ 6 | { 7 | "type": "tag", 8 | "name": "br", 9 | "attribs": {} 10 | }, 11 | { 12 | "data": "text", 13 | "type": "text" 14 | }, 15 | { 16 | "type": "tag", 17 | "name": "br", 18 | "attribs": {} 19 | } 20 | ] 21 | } -------------------------------------------------------------------------------- /data/JSON/32.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Single Tag 2", 3 | "options": {}, 4 | "html": "
text
", 5 | "expected": [ 6 | { 7 | "type": "tag", 8 | "name": "br", 9 | "attribs": {} 10 | }, 11 | { 12 | "data": "text", 13 | "type": "text" 14 | }, 15 | { 16 | "type": "tag", 17 | "name": "br", 18 | "attribs": {} 19 | } 20 | ] 21 | } -------------------------------------------------------------------------------- /data/JSON/33.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Special char in comment", 3 | "options": {}, 4 | "html": "", 5 | "expected": [ 6 | { 7 | "type": "tag", 8 | "name": "head", 9 | "attribs": {}, 10 | "children": [ 11 | { 12 | "data": " commented out tags Test", 13 | "type": "comment" 14 | } 15 | ] 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /data/JSON/34.json: -------------------------------------------------------------------------------- 1 | { 2 | "named_entities": [ 3 | { 4 | "name": "北京", 5 | "type": "地点" 6 | } 7 | ] 8 | } -------------------------------------------------------------------------------- /data/JSON/35.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Only text", 3 | "options": {}, 4 | "html": "this is the text", 5 | "expected": [ 6 | { 7 | "data": "this is the text", 8 | "type": "text" 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /data/JSON/36.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Extra spaces in tag", 3 | "options": {}, 4 | "expected": [ 5 | { 6 | "type": "tag", 7 | "name": "font", 8 | "attributes": { 9 | "size": "14" 10 | }, 11 | "children": [ 12 | { 13 | "type": "text", 14 | "data": "the text" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /data/JSON/37.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.autoComplete.extraPaths": ["D:/python/Lib/site-packages"] 3 | } -------------------------------------------------------------------------------- /data/JSON/38.json: -------------------------------------------------------------------------------- 1 | { 2 | "router-view": { 3 | "attributes": [ 4 | "name", 5 | "route" 6 | ], 7 | "description": "A component that renders the matched component for the current location. Components rendered by can also have their own , allowing for the rendering of nested routes." 8 | }, 9 | "router-link": { 10 | "attributes": [ 11 | "to", 12 | "replace", 13 | "custom", 14 | "active-class", 15 | "exact-active-class", 16 | "aria-current-value" 17 | ], 18 | "description": "Renders an
element with the correct href attribute. Has click listeners for local navigation. The custom prop and the v-slot API allow for customization of its rendering." 19 | } 20 | } -------------------------------------------------------------------------------- /data/JSON/39.json: -------------------------------------------------------------------------------- 1 | { 2 | "appinfo": [ 3 | { 4 | "depend_plugins": [ 5 | ], 6 | "id": "26A31B5AD14C88931F106C99D14F4A7C", 7 | "plugin_name": "kpromethirdapp" 8 | }, 9 | { 10 | "depend_plugins": [ 11 | ], 12 | "id": "3kresumetemplate", 13 | "plugin_name": "kdocerfeature" 14 | }] 15 | } -------------------------------------------------------------------------------- /data/JSON/4.json: -------------------------------------------------------------------------------- 1 | { 2 | "flag": true 3 | } -------------------------------------------------------------------------------- /data/JSON/40.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "appConfig", 3 | "isBase": true, 4 | "name": "strings:#/appConfigDependencyTypeName", 5 | "description": "strings:#/appConfigDependencyTypeDescription", 6 | "isSingleton": true, 7 | "connectionSettingPropertyDisplayName": "strings:#/connectionSettings", 8 | "smallImage": { 9 | "guid": "AE27A6B0-E345-4288-96DF-5EAF394EE369", 10 | "id": 3925 11 | }, 12 | "resizableImage": { 13 | "guid": "AE27A6B0-E345-4288-96DF-5EAF394EE369", 14 | "id": 3925 15 | }, 16 | "displayOrder": 4500, 17 | "actions": [], 18 | "tags": [ 19 | "strings:#/store" 20 | ] 21 | } -------------------------------------------------------------------------------- /data/JSON/41.json: -------------------------------------------------------------------------------- 1 | { 2 | "accentColor": "", 3 | "theme": "system", 4 | "monospaceFontFamily": "Inter", 5 | "interfaceFontFamily": "Inter", 6 | "textFontFamily": "Inter", 7 | "translucency": false, 8 | "cssTheme": "Things" 9 | } -------------------------------------------------------------------------------- /data/JSON/42.json: -------------------------------------------------------------------------------- 1 | { 2 | "accentColor": "" 3 | } -------------------------------------------------------------------------------- /data/JSON/43.json: -------------------------------------------------------------------------------- 1 | { 2 | "includes": {}, 3 | "macros": { 4 | "appendixpage": {}, 5 | "setthesubsection": {} 6 | }, 7 | "envs": { 8 | "appendices": {}, 9 | "subappendices": {} 10 | }, 11 | "options": [ 12 | "toc", 13 | "title", 14 | "titletoc", 15 | "header", 16 | "page" 17 | ], 18 | "keyvals": [] 19 | } -------------------------------------------------------------------------------- /data/JSON/44.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "xmlelement.generic", 3 | "restorable": true, 4 | "order": 20, 5 | "model": { 6 | "filePath": "ApplicationInsights.config", 7 | "key": "ConnectionString", 8 | "namespace": "http://schemas.microsoft.com/ApplicationInsights/2013/Settings", 9 | "body": "@@connectionString@@" 10 | } 11 | } -------------------------------------------------------------------------------- /data/JSON/45.json: -------------------------------------------------------------------------------- 1 | { 2 | "components": { 3 | "appServiceSettings": { 4 | "modifiers": [ 5 | "appInsights.appServiceSettings" 6 | ] 7 | }, 8 | "appSettings": { 9 | "modifiers": [ 10 | "appInsights.appSettings" 11 | ] 12 | }, 13 | "code": { 14 | "modifiers": [ 15 | "appInsights.code.generic.startupCode" 16 | ] 17 | }, 18 | "nuget": { 19 | "modifiers": [ 20 | "appInsights.nuget.coreweb" 21 | ] 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /data/JSON/46.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "code.generic", 3 | "confidence": "High", 4 | "featureId": "appInsights", 5 | "componentId": "code", 6 | "model": { 7 | "kind": "Generic", 8 | "detectionLocations": [ 9 | { 10 | "parts": [ 11 | { 12 | "kind": "Method", 13 | "properties": { 14 | "Method": "ConfigureServices", 15 | "TypeName": "Microsoft.Extensions.DependencyInjection.IServiceCollection" 16 | } 17 | }, 18 | { 19 | "kind": "Invocation", 20 | "properties": { 21 | "Invocation": "AddApplicationInsightsTelemetry", 22 | "TypeName": "Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions" 23 | } 24 | } 25 | ] 26 | }, 27 | { 28 | "parts": [ 29 | { 30 | "kind": "TopLevelMethod", 31 | "properties": {} 32 | }, 33 | { 34 | "kind": "Invocation", 35 | "properties": { 36 | "Invocation": "AddApplicationInsightsTelemetry", 37 | "TypeName": "Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions" 38 | } 39 | } 40 | ] 41 | } 42 | ] 43 | } 44 | } -------------------------------------------------------------------------------- /data/JSON/47.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "app_data" : "", 4 | "c_name" : "好友", 5 | "data_name" : "好友", 6 | "desc" : "社交,聊天", 7 | "enable_update" : "0", 8 | "icon" : "https://wegame.gtimg.com/tgp/oss-images/oss_5976ac9b38b82.png", 9 | "id" : "10002", 10 | "item_id" : "1", 11 | "item_update_time" : "2017-07-25 10:27:47", 12 | "name" : "chat", 13 | "new_feature_hint_time" : { 14 | "end_time" : "", 15 | "start_time" : "" 16 | }, 17 | "scope" : [], 18 | "type" : "0" 19 | }, 20 | { 21 | "app_data" : "", 22 | "c_name" : "百科", 23 | "data_name" : "百科", 24 | "desc" : "游戏百科", 25 | "enable_update" : "0", 26 | "icon" : "https://wegame.gtimg.com/tgp/oss-images/oss_5976ad49b0429.png", 27 | "id" : "10003", 28 | "item_id" : "2", 29 | "item_update_time" : "2017-07-25 10:30:46", 30 | "name" : "game_wiki", 31 | "new_feature_hint_time" : { 32 | "end_time" : "", 33 | "start_time" : "" 34 | }, 35 | "scope" : [], 36 | "type" : "0" 37 | }] 38 | -------------------------------------------------------------------------------- /data/JSON/48.json: -------------------------------------------------------------------------------- 1 | { 2 | "JsonSuccessfullyWritten" : true, 3 | "JsonVersion" : 4, 4 | "JsonCreationTime" : "133529054054639386", 5 | "CompatSectionCount" : 1, 6 | "CompatSections" : 7 | [ 8 | { 9 | "SectionMsg" : 10 | { 11 | "MsgId" : 13, 12 | "MsgDescription" : "DEBUG: Machine Attributes" 13 | }, 14 | "Assets" : 15 | [ 16 | { 17 | "AssetImgPath" : "C:\\WINDOWS\\appcompat\\UA\\GenericApp.png", 18 | "Translatable" : true, 19 | "AssetMajorResourceMsgId" : 20 | { 21 | "MsgId" : 119, 22 | "MsgDescription" : "DEBUG: Touch, Capable" 23 | } 24 | } 25 | ] 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /data/JSON/49.json: -------------------------------------------------------------------------------- 1 | {"kgroupsendv2":0,"kprojectmgr":2,"photobusinesstool":0} -------------------------------------------------------------------------------- /data/JSON/5.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Bill Gates", 3 | "age": 62, 4 | "cars": [ 5 | "Porsche", 6 | "BMW", 7 | "Volvo" 8 | ] 9 | } -------------------------------------------------------------------------------- /data/JSON/50.json: -------------------------------------------------------------------------------- 1 | { 2 | "requirements": [ 3 | "vsWebWorkload" 4 | ], 5 | "editSteps": [ 6 | "PickInstanceCompute" 7 | ], 8 | "properties": { 9 | "group": { 10 | "value": "connections" 11 | } 12 | }, 13 | "persistencePreprocessors": [ 14 | "RemoteEntityCompute" 15 | ], 16 | "persistenceProperties": { 17 | "connectionId": { 18 | "isBase": true 19 | }, 20 | "dynamicId": { 21 | "isBase": true 22 | }, 23 | "ignored": { 24 | "isBase": true 25 | }, 26 | "resourceId": { 27 | "parametrizer": "resourceId" 28 | }, 29 | "secretStore": {}, 30 | "suggestion": { 31 | "isBase": true 32 | }, 33 | "type": { 34 | "isBase": true 35 | }, 36 | "group": { 37 | "isBase": true 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /data/JSON/6.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Bill Gates", 3 | "age": 62, 4 | "cars": [ 5 | { 6 | "brand": "Porsche", 7 | "models": [ 8 | "911", 9 | "Taycan" 10 | ] 11 | }, 12 | { 13 | "brand": "BMW", 14 | "models": [ 15 | "M5", 16 | "M3", 17 | "X5" 18 | ] 19 | }, 20 | { 21 | "brand": "Volvo", 22 | "models": [ 23 | "XC60", 24 | "V60" 25 | ] 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /data/JSON/7.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "properties": { 4 | "name": { 5 | "type": "string" 6 | }, 7 | "sku": { 8 | "type": "string" 9 | }, 10 | "price": { 11 | "type": "number", 12 | "minimum": 0 13 | }, 14 | "shipTo": { 15 | "type": "object", 16 | "properties": { 17 | "name": { 18 | "type": "string" 19 | }, 20 | "address": { 21 | "type": "string" 22 | }, 23 | "city": { 24 | "type": "string" 25 | }, 26 | "state": { 27 | "type": "string" 28 | }, 29 | "zip": { 30 | "type": "string" 31 | } 32 | } 33 | }, 34 | "billTo": { 35 | "type": "object", 36 | "properties": { 37 | "name": { 38 | "type": "string" 39 | }, 40 | "address": { 41 | "type": "string" 42 | }, 43 | "city": { 44 | "type": "string" 45 | }, 46 | "state": { 47 | "type": "string" 48 | }, 49 | "zip": { 50 | "type": "string" 51 | } 52 | } 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /data/JSON/8.json: -------------------------------------------------------------------------------- 1 | { 2 | "zip": "12345", 3 | "city": "Pretendville", 4 | "name": "Jane Smith", 5 | "state": "NY", 6 | "address": "123 Maple Street" 7 | } -------------------------------------------------------------------------------- /data/JSON/9.json: -------------------------------------------------------------------------------- 1 | { 2 | "billTo": { 3 | "zip": "12345", 4 | "city": "Pretendville", 5 | "name": "John Smith", 6 | "state": "NY", 7 | "address": "123 Maple Street" 8 | }, 9 | "shipTo": { 10 | "zip": "12345", 11 | "city": "Pretendville", 12 | "name": "Jane Smith", 13 | "state": "NY", 14 | "address": "123 Maple Street" 15 | }, 16 | "sku": "20223", 17 | "name": "John Smith", 18 | "price": 23.95 19 | } -------------------------------------------------------------------------------- /data/Markdown/1.md: -------------------------------------------------------------------------------- 1 | # Heading level 1 -------------------------------------------------------------------------------- /data/Markdown/10.md: -------------------------------------------------------------------------------- 1 | ``Use `code` in your Markdown file`` -------------------------------------------------------------------------------- /data/Markdown/11.md: -------------------------------------------------------------------------------- 1 | ``` 2 | { 3 | "FirstName": "John", 4 | "LastName": "Smith", 5 | "Age": 25 6 | } 7 | ``` -------------------------------------------------------------------------------- /data/Markdown/12.md: -------------------------------------------------------------------------------- 1 | [Markdown](https://markdown.com.cn) -------------------------------------------------------------------------------- /data/Markdown/13.md: -------------------------------------------------------------------------------- 1 | ![Picture](/assets/img/philly-magic-garden.jpg "Magic Gardens") -------------------------------------------------------------------------------- /data/Markdown/14.md: -------------------------------------------------------------------------------- 1 | - [ ] Write the press release 2 | - [ ] Update the website 3 | - [ ] Contact the media -------------------------------------------------------------------------------- /data/Markdown/15.md: -------------------------------------------------------------------------------- 1 | ```json 2 | { 3 | "FirstName": "John", 4 | "LastName": "Smith", 5 | "Age": 25 6 | } 7 | ``` -------------------------------------------------------------------------------- /data/Markdown/16.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 漏洞反馈 3 | about: 报错或漏洞请使用这个模板创建 4 | title: "[BUG]" 5 | labels: 'bug' 6 | assignees: '' 7 | 8 | --- -------------------------------------------------------------------------------- /data/Markdown/17.md: -------------------------------------------------------------------------------- 1 | Use the [GitLens: Welcome (Quick Setup)](command:gitlens.showWelcomePage?%22quick-setup%22) command from the [Command Palette](command:workbench.action.quickOpen?%22>GitLens%3A%20Welcome%22) to open it. -------------------------------------------------------------------------------- /data/Markdown/18.md: -------------------------------------------------------------------------------- 1 | GitLens adds Git authorship CodeLens to the top of the file and on code blocks. The **recent change** CodeLens shows the author and date of the most recent commit for the code block or file, while the **authors** CodeLens shows the number of authors of the code block or file and the most prominent author (if there is more than one). -------------------------------------------------------------------------------- /data/Markdown/19.md: -------------------------------------------------------------------------------- 1 | ## GitLens+ Features -------------------------------------------------------------------------------- /data/Markdown/2.md: -------------------------------------------------------------------------------- 1 | I really like using Markdown. 2 | 3 | I think I'll use it to format all of my documents from now on. -------------------------------------------------------------------------------- /data/Markdown/20.md: -------------------------------------------------------------------------------- 1 | To use this directly from your terminal, e.g. when running `git rebase -i`, 2 | 3 | - set VS Code as your default Git editor 4 | - `git config --global core.editor "code --wait"` -------------------------------------------------------------------------------- /data/Markdown/21.md: -------------------------------------------------------------------------------- 1 | > To use the Insiders edition of VS Code, replace `code` in the above with `code-insiders` -------------------------------------------------------------------------------- /data/Markdown/22.md: -------------------------------------------------------------------------------- 1 | The `std::vector` in the C++ standard library is described as a dynamic array that provides various methods for inserting elements. To insert elements from the beginning, use the `std::vector`'s `insert` function combined with iterators. -------------------------------------------------------------------------------- /data/Markdown/23.md: -------------------------------------------------------------------------------- 1 | # streams WG Meeting 2015-01-30 2 | 3 | ## Links -------------------------------------------------------------------------------- /data/Markdown/24.md: -------------------------------------------------------------------------------- 1 | * **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg 2 | * **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 3 | * **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ -------------------------------------------------------------------------------- /data/Markdown/25.md: -------------------------------------------------------------------------------- 1 | * adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) 2 | * release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) 3 | * simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) 4 | * proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) -------------------------------------------------------------------------------- /data/Markdown/26.md: -------------------------------------------------------------------------------- 1 | ### What versioning scheme should be adopted? 2 | 3 | * group: +1’s 3.0.0 4 | * domenic+group: pulling in patches from other sources where appropriate 5 | * mikeal: version independently, suggesting versions for io.js 6 | * mikeal+domenic: work with TC to notify in advance of changes 7 | 8 | simpler stream creation -------------------------------------------------------------------------------- /data/Markdown/27.md: -------------------------------------------------------------------------------- 1 | **action items:** 2 | 3 | * ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) 4 | * ask rod/build for infrastructure 5 | * **chris**: explore the “flow on data” approach 6 | * add isPaused/isFlowing 7 | * add new docs section 8 | * move isPaused to that section -------------------------------------------------------------------------------- /data/Markdown/28.md: -------------------------------------------------------------------------------- 1 | ## References: 2 | 3 | * SemEval task: https://scienceie.github.io/ 4 | * .ann format: http://brat.nlplab.org/standoff.html -------------------------------------------------------------------------------- /data/Markdown/29.md: -------------------------------------------------------------------------------- 1 | ## Accessibility guidelines 2 | - [WCAG 1.1.1](https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html) 3 | 4 | ### Resources 5 | - [Léonie Watson, Accessible Emoji](https://tink.uk/accessible-emoji/) -------------------------------------------------------------------------------- /data/Markdown/3.md: -------------------------------------------------------------------------------- 1 | I just love **bold text**. -------------------------------------------------------------------------------- /data/Markdown/30.md: -------------------------------------------------------------------------------- 1 | Function Name | Filesystem | FilePathsBase 2 | --- | --- | --- 3 | cd | AbstractString | AbstractPath -------------------------------------------------------------------------------- /data/Markdown/31.md: -------------------------------------------------------------------------------- 1 | # Heading level 1 2 | 3 | I really like using Markdown. 4 | 5 | I think I'll use it to format all of my documents from now on. -------------------------------------------------------------------------------- /data/Markdown/32.md: -------------------------------------------------------------------------------- 1 | `allowedInvalidRules` is an optional string array of custom roles that should be allowed in addition to the ARIA spec, such as for cases when you [need to use a non-standard role](https://axesslab.com/text-splitting). -------------------------------------------------------------------------------- /data/Markdown/33.md: -------------------------------------------------------------------------------- 1 | ### Resources 2 | 3 | - [Chrome Audit Rules, AX_ARIA_01](https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules#ax_aria_01) 4 | - [DPUB-ARIA roles](https://www.w3.org/TR/dpub-aria-1.0/) 5 | - [MDN: Using ARIA: Roles, states, and properties](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques) -------------------------------------------------------------------------------- /data/Markdown/34.md: -------------------------------------------------------------------------------- 1 | ### Confirming on items 2 | 3 | Items can be validated using the specific option `ensureItem`. 4 | 5 | - The return of a new instance of an array with coerced item values. 6 | - The error message will list up to three items which are invalid. 7 | -------------------------------------------------------------------------------- /data/Markdown/35.md: -------------------------------------------------------------------------------- 1 | `lots`of`backticks` 2 | 3 | ``i``wonder``how``this``will``be``parsed`` -------------------------------------------------------------------------------- /data/Markdown/36.md: -------------------------------------------------------------------------------- 1 | # Heading level 1 2 | 3 | I just love **bold text**. -------------------------------------------------------------------------------- /data/Markdown/37.md: -------------------------------------------------------------------------------- 1 | One **red teacher** marked, while LLMs are being able to ***iteratively improve*** on produced *source code*, which is a risk. 2 | 3 | I just love **bold text**. -------------------------------------------------------------------------------- /data/Markdown/38.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## v1.1.0 4 | 5 | * test: should require handled by mocha. 6 | * package: coffeescript 2 and use semver tilde. -------------------------------------------------------------------------------- /data/Markdown/39.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://secure.travis-ci.org/adaltas/node-csv-parse.svg)][travis] -------------------------------------------------------------------------------- /data/Markdown/4.md: -------------------------------------------------------------------------------- 1 | One **red teacher** marked, while LLMs are being able to ***iteratively improve*** on produced *source code*, which is a risk. -------------------------------------------------------------------------------- /data/Markdown/40.md: -------------------------------------------------------------------------------- 1 | Part of the [CSV module][csv_home], this project is a parser converting CSV text input into arrays or objects. It implements the Node.js. -------------------------------------------------------------------------------- /data/Markdown/41.md: -------------------------------------------------------------------------------- 1 | # Release history 2 | 3 | **All notable changes to this project will be documented in this file.** -------------------------------------------------------------------------------- /data/Markdown/42.md: -------------------------------------------------------------------------------- 1 | - Readme link [fixed](https://github.com/micromatch/picomatch/pull/13/commits/a96ab3aa2b11b6861c23289964613d85563b05df) by @danez. 2 | - `options.capture` now works as expected when fastpaths are enabled. See https://github.com/micromatch/picomatch/pull/12/commits/26aefd71f1cfaf95c37f1c1fcab68a693b037304. Thanks to @DrPizza. -------------------------------------------------------------------------------- /data/Markdown/43.md: -------------------------------------------------------------------------------- 1 | ## [1.0.0] - 2018-11-05 2 | 3 | - adds `.onMatch` option 4 | - improvements to `.scan` method 5 | - numerous improvements and optimizations for matching and parsing 6 | - better windows path handling -------------------------------------------------------------------------------- /data/Markdown/44.md: -------------------------------------------------------------------------------- 1 | __gyp-next__ is [released](https://github.com/nodejs/gyp-next/releases) to the [__Python Packaging Index__](https://pypi.org/project/gyp-next) (PyPI) and can be installed with the command: -------------------------------------------------------------------------------- /data/Markdown/45.md: -------------------------------------------------------------------------------- 1 | Documents are available at [gyp.gsrc.io](https://gyp.gsrc.io), or you can check out ```md-pages``` branch to read those documents offline. -------------------------------------------------------------------------------- /data/Markdown/46.md: -------------------------------------------------------------------------------- 1 | ## Converters -------------------------------------------------------------------------------- /data/Markdown/47.md: -------------------------------------------------------------------------------- 1 | See [maybe_types.md](./maybe_types.md) for more information on `Nan::Maybe` types. -------------------------------------------------------------------------------- /data/Markdown/48.md: -------------------------------------------------------------------------------- 1 | ### Example 2 | 3 | ```c++ 4 | v8::Local val; 5 | Nan::MaybeLocal str = Nan::To(val); 6 | Nan::Maybe d = Nan::To(val); 7 | ``` -------------------------------------------------------------------------------- /data/Markdown/49.md: -------------------------------------------------------------------------------- 1 | # copy(src, dest, [options, callback]) 2 | 3 | Copy a file or directory. The directory can have contents. Like `cp -r`. -------------------------------------------------------------------------------- /data/Markdown/5.md: -------------------------------------------------------------------------------- 1 | > Dorothy followed her through many of the beautiful rooms in her castle 2 | >> The Witch batch her clean the dots and tickets and sweep the floor and keep the fire fed with wood -------------------------------------------------------------------------------- /data/Markdown/50.md: -------------------------------------------------------------------------------- 1 | ``` 2 | crontab -e 3 | crontab -l 4 | sudo service cron restart 5 | ``` -------------------------------------------------------------------------------- /data/Markdown/6.md: -------------------------------------------------------------------------------- 1 | > ### The Quarterly Results Look Great! 2 | > - Revenue was off the chart 3 | > - Profits were higher than ever. -------------------------------------------------------------------------------- /data/Markdown/7.md: -------------------------------------------------------------------------------- 1 | 1. First item 2 | 2. Second item 3 | 3. Third item 4 | 4. Fourth item -------------------------------------------------------------------------------- /data/Markdown/8.md: -------------------------------------------------------------------------------- 1 | - First item 2 | - Second item 3 | - Third item 4 | - Fourth item -------------------------------------------------------------------------------- /data/Markdown/9.md: -------------------------------------------------------------------------------- 1 | 1. First item 2 | 2. Second item 3 | 4 | I need to add another paragraph below the second list item 5 | 6 | 3. Third item -------------------------------------------------------------------------------- /data/Visual Basic/APP/APP.vbproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | APP 6 | net8.0 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /data/Visual Basic/APP/Program.vb: -------------------------------------------------------------------------------- 1 | Module Module1 2 | Function CalculateExpression(ByVal a As Integer, ByVal b As Integer, ByVal c As Integer) As Integer 3 | ' Calculates the value of the expression (a+b) * c 4 | Return (a + b) * c 5 | End Function 6 | 7 | Sub Main() 8 | ' Test the CalculateExpression function 9 | Debug.Assert(CalculateExpression(2, 3, 5) = 25) 10 | Debug.Assert(CalculateExpression(-1, 2, 3) = 3) 11 | Debug.Assert(CalculateExpression(0, 0, 1) = 0) 12 | Debug.Assert(CalculateExpression(10, -5, 2) = 10) 13 | Debug.Assert(CalculateExpression(-2, -3, -4) = 20) 14 | Debug.Assert(CalculateExpression(1000, 2000, 3) = 9000) 15 | Debug.Assert(CalculateExpression(-100, 50, 10) = -500) 16 | End Sub 17 | End Module -------------------------------------------------------------------------------- /data/Visual Basic/APP/bin/Debug/net8.0/APP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/Visual Basic/APP/bin/Debug/net8.0/APP -------------------------------------------------------------------------------- /data/Visual Basic/APP/bin/Debug/net8.0/APP.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETCoreApp,Version=v8.0", 4 | "signature": "" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETCoreApp,Version=v8.0": { 9 | "APP/1.0.0": { 10 | "runtime": { 11 | "APP.dll": {} 12 | } 13 | } 14 | } 15 | }, 16 | "libraries": { 17 | "APP/1.0.0": { 18 | "type": "project", 19 | "serviceable": false, 20 | "sha512": "" 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /data/Visual Basic/APP/bin/Debug/net8.0/APP.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/Visual Basic/APP/bin/Debug/net8.0/APP.dll -------------------------------------------------------------------------------- /data/Visual Basic/APP/bin/Debug/net8.0/APP.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/Visual Basic/APP/bin/Debug/net8.0/APP.pdb -------------------------------------------------------------------------------- /data/Visual Basic/APP/bin/Debug/net8.0/APP.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "net8.0", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "8.0.0" 7 | }, 8 | "configProperties": { 9 | "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/APP.vbproj.nuget.dgspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "format": 1, 3 | "restore": { 4 | "/workspace/MMCodeEval/data/Visual Basic/APP/APP.vbproj": {} 5 | }, 6 | "projects": { 7 | "/workspace/MMCodeEval/data/Visual Basic/APP/APP.vbproj": { 8 | "version": "1.0.0", 9 | "restore": { 10 | "projectUniqueName": "/workspace/MMCodeEval/data/Visual Basic/APP/APP.vbproj", 11 | "projectName": "APP", 12 | "projectPath": "/workspace/MMCodeEval/data/Visual Basic/APP/APP.vbproj", 13 | "packagesPath": "/root/.nuget/packages/", 14 | "outputPath": "/workspace/MMCodeEval/data/Visual Basic/APP/obj/", 15 | "projectStyle": "PackageReference", 16 | "configFilePaths": [ 17 | "/root/.nuget/NuGet/NuGet.Config" 18 | ], 19 | "originalTargetFrameworks": [ 20 | "net8.0" 21 | ], 22 | "sources": { 23 | "https://api.nuget.org/v3/index.json": {} 24 | }, 25 | "frameworks": { 26 | "net8.0": { 27 | "targetAlias": "net8.0", 28 | "projectReferences": {} 29 | } 30 | }, 31 | "warningProperties": { 32 | "warnAsError": [ 33 | "NU1605" 34 | ] 35 | } 36 | }, 37 | "frameworks": { 38 | "net8.0": { 39 | "targetAlias": "net8.0", 40 | "imports": [ 41 | "net461", 42 | "net462", 43 | "net47", 44 | "net471", 45 | "net472", 46 | "net48", 47 | "net481" 48 | ], 49 | "assetTargetFallback": true, 50 | "warn": true, 51 | "frameworkReferences": { 52 | "Microsoft.NETCore.App": { 53 | "privateAssets": "all" 54 | } 55 | }, 56 | "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/8.0.100/PortableRuntimeIdentifierGraph.json" 57 | } 58 | } 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/APP.vbproj.nuget.g.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | True 5 | NuGet 6 | $(MSBuildThisFileDirectory)project.assets.json 7 | /root/.nuget/packages/ 8 | /root/.nuget/packages/ 9 | PackageReference 10 | 6.8.0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/APP.vbproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.vb: -------------------------------------------------------------------------------- 1 | ' 2 | Option Strict Off 3 | Option Explicit On 4 | 5 | Imports System 6 | Imports System.Reflection 7 | 8 | -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/Debug/net8.0/APP.AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' 5 | ' Changes to this file may cause incorrect behavior and will be lost if 6 | ' the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Option Strict Off 11 | Option Explicit On 12 | 13 | Imports System 14 | Imports System.Reflection 15 | 22 | 23 | 'Generated by the MSBuild WriteCodeFragment class. 24 | -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/Debug/net8.0/APP.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 15066aac419ed8996201046184a076a3e60278139b69f00b3e4a2a32d56b9c08 2 | -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/Debug/net8.0/APP.GeneratedMSBuildEditorConfig.editorconfig: -------------------------------------------------------------------------------- 1 | is_global = true 2 | build_property.TargetFramework = net8.0 3 | build_property.TargetPlatformMinVersion = 4 | build_property.UsingMicrosoftNETSdkWeb = 5 | build_property.ProjectTypeGuids = 6 | build_property.InvariantGlobalization = 7 | build_property.PlatformNeutralAssembly = 8 | build_property.EnforceExtendedAnalyzerRules = 9 | build_property._SupportedPlatformList = Linux,macOS,Windows 10 | build_property.RootNamespace = APP 11 | build_property.ProjectDir = /workspace/MMCodeEval/data/Visual Basic/APP/ 12 | build_property.EnableComHosting = 13 | build_property.EnableGeneratedComInterfaceComImportInterop = 14 | -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/Debug/net8.0/APP.assets.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/Visual Basic/APP/obj/Debug/net8.0/APP.assets.cache -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/Debug/net8.0/APP.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/Visual Basic/APP/obj/Debug/net8.0/APP.dll -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/Debug/net8.0/APP.genruntimeconfig.cache: -------------------------------------------------------------------------------- 1 | 2fc6ff7b9f531c1f945f3b498547701bd3e1909afa15331a49a50d4619ca691b 2 | -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/Debug/net8.0/APP.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/Visual Basic/APP/obj/Debug/net8.0/APP.pdb -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/Debug/net8.0/APP.sourcelink.json: -------------------------------------------------------------------------------- 1 | {"documents":{"/workspace/MMCodeEval/*":"https://raw.githubusercontent.com/SkLiu2001/MMCodeEval/a44e43049cb0d2f486a39af55f8bd5ad2fe838c7/*"}} -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/Debug/net8.0/APP.vbproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 426245105ecc1bc6943ca01505e0a19b3d5a12d3918062bf853c7173ccb6497e 2 | -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/Debug/net8.0/APP.vbproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | /workspace/MMCodeEval/data/VisualBasic/APP/bin/Debug/net8.0/APP 2 | /workspace/MMCodeEval/data/VisualBasic/APP/bin/Debug/net8.0/APP.deps.json 3 | /workspace/MMCodeEval/data/VisualBasic/APP/bin/Debug/net8.0/APP.runtimeconfig.json 4 | /workspace/MMCodeEval/data/VisualBasic/APP/bin/Debug/net8.0/APP.dll 5 | /workspace/MMCodeEval/data/VisualBasic/APP/bin/Debug/net8.0/APP.pdb 6 | /workspace/MMCodeEval/data/VisualBasic/APP/obj/Debug/net8.0/APP.GeneratedMSBuildEditorConfig.editorconfig 7 | /workspace/MMCodeEval/data/VisualBasic/APP/obj/Debug/net8.0/APP.AssemblyInfoInputs.cache 8 | /workspace/MMCodeEval/data/VisualBasic/APP/obj/Debug/net8.0/APP.AssemblyInfo.vb 9 | /workspace/MMCodeEval/data/VisualBasic/APP/obj/Debug/net8.0/APP.vbproj.CoreCompileInputs.cache 10 | /workspace/MMCodeEval/data/VisualBasic/APP/obj/Debug/net8.0/APP.sourcelink.json 11 | /workspace/MMCodeEval/data/VisualBasic/APP/obj/Debug/net8.0/APP.dll 12 | /workspace/MMCodeEval/data/VisualBasic/APP/obj/Debug/net8.0/refint/APP.dll 13 | /workspace/MMCodeEval/data/VisualBasic/APP/obj/Debug/net8.0/APP.pdb 14 | /workspace/MMCodeEval/data/VisualBasic/APP/obj/Debug/net8.0/APP.genruntimeconfig.cache 15 | /workspace/MMCodeEval/data/VisualBasic/APP/obj/Debug/net8.0/ref/APP.dll 16 | /workspace/MMCodeEval/data/Visual Basic/APP/bin/Debug/net8.0/APP 17 | /workspace/MMCodeEval/data/Visual Basic/APP/bin/Debug/net8.0/APP.deps.json 18 | /workspace/MMCodeEval/data/Visual Basic/APP/bin/Debug/net8.0/APP.runtimeconfig.json 19 | /workspace/MMCodeEval/data/Visual Basic/APP/bin/Debug/net8.0/APP.dll 20 | /workspace/MMCodeEval/data/Visual Basic/APP/bin/Debug/net8.0/APP.pdb 21 | /workspace/MMCodeEval/data/Visual Basic/APP/obj/Debug/net8.0/APP.GeneratedMSBuildEditorConfig.editorconfig 22 | /workspace/MMCodeEval/data/Visual Basic/APP/obj/Debug/net8.0/APP.AssemblyInfoInputs.cache 23 | /workspace/MMCodeEval/data/Visual Basic/APP/obj/Debug/net8.0/APP.AssemblyInfo.vb 24 | /workspace/MMCodeEval/data/Visual Basic/APP/obj/Debug/net8.0/APP.vbproj.CoreCompileInputs.cache 25 | /workspace/MMCodeEval/data/Visual Basic/APP/obj/Debug/net8.0/APP.sourcelink.json 26 | /workspace/MMCodeEval/data/Visual Basic/APP/obj/Debug/net8.0/APP.dll 27 | /workspace/MMCodeEval/data/Visual Basic/APP/obj/Debug/net8.0/refint/APP.dll 28 | /workspace/MMCodeEval/data/Visual Basic/APP/obj/Debug/net8.0/APP.pdb 29 | /workspace/MMCodeEval/data/Visual Basic/APP/obj/Debug/net8.0/APP.genruntimeconfig.cache 30 | /workspace/MMCodeEval/data/Visual Basic/APP/obj/Debug/net8.0/ref/APP.dll 31 | -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/Debug/net8.0/apphost: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/Visual Basic/APP/obj/Debug/net8.0/apphost -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/Debug/net8.0/ref/APP.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/Visual Basic/APP/obj/Debug/net8.0/ref/APP.dll -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/Debug/net8.0/refint/APP.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/Visual Basic/APP/obj/Debug/net8.0/refint/APP.dll -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/project.assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "targets": { 4 | "net8.0": {} 5 | }, 6 | "libraries": {}, 7 | "projectFileDependencyGroups": { 8 | "net8.0": [] 9 | }, 10 | "packageFolders": { 11 | "/root/.nuget/packages/": {} 12 | }, 13 | "project": { 14 | "version": "1.0.0", 15 | "restore": { 16 | "projectUniqueName": "/workspace/MMCodeEval/data/Visual Basic/APP/APP.vbproj", 17 | "projectName": "APP", 18 | "projectPath": "/workspace/MMCodeEval/data/Visual Basic/APP/APP.vbproj", 19 | "packagesPath": "/root/.nuget/packages/", 20 | "outputPath": "/workspace/MMCodeEval/data/Visual Basic/APP/obj/", 21 | "projectStyle": "PackageReference", 22 | "configFilePaths": [ 23 | "/root/.nuget/NuGet/NuGet.Config" 24 | ], 25 | "originalTargetFrameworks": [ 26 | "net8.0" 27 | ], 28 | "sources": { 29 | "https://api.nuget.org/v3/index.json": {} 30 | }, 31 | "frameworks": { 32 | "net8.0": { 33 | "targetAlias": "net8.0", 34 | "projectReferences": {} 35 | } 36 | }, 37 | "warningProperties": { 38 | "warnAsError": [ 39 | "NU1605" 40 | ] 41 | } 42 | }, 43 | "frameworks": { 44 | "net8.0": { 45 | "targetAlias": "net8.0", 46 | "imports": [ 47 | "net461", 48 | "net462", 49 | "net47", 50 | "net471", 51 | "net472", 52 | "net48", 53 | "net481" 54 | ], 55 | "assetTargetFallback": true, 56 | "warn": true, 57 | "frameworkReferences": { 58 | "Microsoft.NETCore.App": { 59 | "privateAssets": "all" 60 | } 61 | }, 62 | "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/8.0.100/PortableRuntimeIdentifierGraph.json" 63 | } 64 | } 65 | } 66 | } -------------------------------------------------------------------------------- /data/Visual Basic/APP/obj/project.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "dgSpecHash": "4CfFOapZcDd87SQaVa4/8l6SVRwvPXuBgR8D39Y+U7NyigU51MNMIu7T91GwaNcp69oGFejw4YOOIEYym9iEJA==", 4 | "success": true, 5 | "projectFilePath": "/workspace/MMCodeEval/data/Visual Basic/APP/APP.vbproj", 6 | "expectedPackageFiles": [], 7 | "logs": [] 8 | } -------------------------------------------------------------------------------- /data/go/go.mod: -------------------------------------------------------------------------------- 1 | module humanEval 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/go-openapi/inflect v0.19.0 7 | github.com/stretchr/testify v1.8.0 8 | ) 9 | 10 | require ( 11 | github.com/davecgh/go-spew v1.1.1 // indirect 12 | github.com/pmezard/go-difflib v1.0.0 // indirect 13 | gopkg.in/yaml.v3 v3.0.1 // indirect 14 | ) 15 | -------------------------------------------------------------------------------- /data/go/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 2 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 3 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 4 | github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4= 5 | github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= 6 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 7 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 8 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 9 | github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= 10 | github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 11 | github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= 12 | github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= 13 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= 14 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 15 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 16 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 17 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 18 | -------------------------------------------------------------------------------- /data/go/vendor.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/data/go/vendor.tar.gz -------------------------------------------------------------------------------- /data/go/vendor/github.com/davecgh/go-spew/LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2012-2016 Dave Collins 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /data/go/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2016 Dave Collins 2 | // 3 | // Permission to use, copy, modify, and distribute this software for any 4 | // purpose with or without fee is hereby granted, provided that the above 5 | // copyright notice and this permission notice appear in all copies. 6 | // 7 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | 15 | // NOTE: Due to the following build constraints, this file will only be compiled 16 | // when the code is running on Google App Engine, compiled by GopherJS, or 17 | // "-tags safe" is added to the go build command line. The "disableunsafe" 18 | // tag is deprecated and thus should not be used. 19 | // +build js appengine safe disableunsafe !go1.4 20 | 21 | package spew 22 | 23 | import "reflect" 24 | 25 | const ( 26 | // UnsafeDisabled is a build-time constant which specifies whether or 27 | // not access to the unsafe package is available. 28 | UnsafeDisabled = true 29 | ) 30 | 31 | // unsafeReflectValue typically converts the passed reflect.Value into a one 32 | // that bypasses the typical safety restrictions preventing access to 33 | // unaddressable and unexported data. However, doing this relies on access to 34 | // the unsafe package. This is a stub version which simply returns the passed 35 | // reflect.Value when the unsafe package is not available. 36 | func unsafeReflectValue(v reflect.Value) reflect.Value { 37 | return v 38 | } 39 | -------------------------------------------------------------------------------- /data/go/vendor/github.com/pmezard/go-difflib/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013, Patrick Mezard 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | The names of its contributors may not be used to endorse or promote 14 | products derived from this software without specific prior written 15 | permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 18 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /data/go/vendor/github.com/stretchr/testify/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /data/go/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go: -------------------------------------------------------------------------------- 1 | //go:build go1.17 2 | // +build go1.17 3 | 4 | // TODO: once support for Go 1.16 is dropped, this file can be 5 | // merged/removed with assertion_compare_go1.17_test.go and 6 | // assertion_compare_legacy.go 7 | 8 | package assert 9 | 10 | import "reflect" 11 | 12 | // Wrapper around reflect.Value.CanConvert, for compatibility 13 | // reasons. 14 | func canConvert(value reflect.Value, to reflect.Type) bool { 15 | return value.CanConvert(to) 16 | } 17 | -------------------------------------------------------------------------------- /data/go/vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.17 2 | // +build !go1.17 3 | 4 | // TODO: once support for Go 1.16 is dropped, this file can be 5 | // merged/removed with assertion_compare_go1.17_test.go and 6 | // assertion_compare_can_convert.go 7 | 8 | package assert 9 | 10 | import "reflect" 11 | 12 | // Older versions of Go does not have the reflect.Value.CanConvert 13 | // method. 14 | func canConvert(value reflect.Value, to reflect.Type) bool { 15 | return false 16 | } 17 | -------------------------------------------------------------------------------- /data/go/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentFormat}} 2 | func {{.DocInfo.Name}}f(t TestingT, {{.ParamsFormat}}) bool { 3 | if h, ok := t.(tHelper); ok { h.Helper() } 4 | return {{.DocInfo.Name}}(t, {{.ForwardedParamsFormat}}) 5 | } 6 | -------------------------------------------------------------------------------- /data/go/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { 3 | if h, ok := a.t.(tHelper); ok { h.Helper() } 4 | return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 5 | } 6 | -------------------------------------------------------------------------------- /data/go/vendor/github.com/stretchr/testify/assert/doc.go: -------------------------------------------------------------------------------- 1 | // Package assert provides a set of comprehensive testing tools for use with the normal Go testing system. 2 | // 3 | // Example Usage 4 | // 5 | // The following is a complete example using assert in a standard test function: 6 | // import ( 7 | // "testing" 8 | // "github.com/stretchr/testify/assert" 9 | // ) 10 | // 11 | // func TestSomething(t *testing.T) { 12 | // 13 | // var a string = "Hello" 14 | // var b string = "Hello" 15 | // 16 | // assert.Equal(t, a, b, "The two words should be the same.") 17 | // 18 | // } 19 | // 20 | // if you assert many times, use the format below: 21 | // 22 | // import ( 23 | // "testing" 24 | // "github.com/stretchr/testify/assert" 25 | // ) 26 | // 27 | // func TestSomething(t *testing.T) { 28 | // assert := assert.New(t) 29 | // 30 | // var a string = "Hello" 31 | // var b string = "Hello" 32 | // 33 | // assert.Equal(a, b, "The two words should be the same.") 34 | // } 35 | // 36 | // Assertions 37 | // 38 | // Assertions allow you to easily write test code, and are global funcs in the `assert` package. 39 | // All assertion functions take, as the first argument, the `*testing.T` object provided by the 40 | // testing framework. This allows the assertion funcs to write the failings and other details to 41 | // the correct place. 42 | // 43 | // Every assertion function also takes an optional string message as the final argument, 44 | // allowing custom error messages to be appended to the message the assertion method outputs. 45 | package assert 46 | -------------------------------------------------------------------------------- /data/go/vendor/github.com/stretchr/testify/assert/errors.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | // AnError is an error instance useful for testing. If the code does not care 8 | // about error specifics, and only needs to return the error for example, this 9 | // error should be used to make the test code more readable. 10 | var AnError = errors.New("assert.AnError general error for testing") 11 | -------------------------------------------------------------------------------- /data/go/vendor/github.com/stretchr/testify/assert/forward_assertions.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | // Assertions provides assertion methods around the 4 | // TestingT interface. 5 | type Assertions struct { 6 | t TestingT 7 | } 8 | 9 | // New makes a new Assertions object for the specified TestingT. 10 | func New(t TestingT) *Assertions { 11 | return &Assertions{ 12 | t: t, 13 | } 14 | } 15 | 16 | //go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs" 17 | -------------------------------------------------------------------------------- /data/go/vendor/gopkg.in/yaml.v3/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | This project is covered by two different licenses: MIT and Apache. 3 | 4 | #### MIT License #### 5 | 6 | The following files were ported to Go from C files of libyaml, and thus 7 | are still covered by their original MIT license, with the additional 8 | copyright staring in 2011 when the project was ported over: 9 | 10 | apic.go emitterc.go parserc.go readerc.go scannerc.go 11 | writerc.go yamlh.go yamlprivateh.go 12 | 13 | Copyright (c) 2006-2010 Kirill Simonov 14 | Copyright (c) 2006-2011 Kirill Simonov 15 | 16 | Permission is hereby granted, free of charge, to any person obtaining a copy of 17 | this software and associated documentation files (the "Software"), to deal in 18 | the Software without restriction, including without limitation the rights to 19 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 20 | of the Software, and to permit persons to whom the Software is furnished to do 21 | so, subject to the following conditions: 22 | 23 | The above copyright notice and this permission notice shall be included in all 24 | copies or substantial portions of the Software. 25 | 26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 27 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 28 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 29 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 30 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 31 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32 | SOFTWARE. 33 | 34 | ### Apache License ### 35 | 36 | All the remaining project files are covered by the Apache license: 37 | 38 | Copyright (c) 2011-2019 Canonical Ltd 39 | 40 | Licensed under the Apache License, Version 2.0 (the "License"); 41 | you may not use this file except in compliance with the License. 42 | You may obtain a copy of the License at 43 | 44 | http://www.apache.org/licenses/LICENSE-2.0 45 | 46 | Unless required by applicable law or agreed to in writing, software 47 | distributed under the License is distributed on an "AS IS" BASIS, 48 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 49 | See the License for the specific language governing permissions and 50 | limitations under the License. 51 | -------------------------------------------------------------------------------- /data/go/vendor/gopkg.in/yaml.v3/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /data/go/vendor/gopkg.in/yaml.v3/writerc.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2011-2019 Canonical Ltd 3 | // Copyright (c) 2006-2010 Kirill Simonov 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | // this software and associated documentation files (the "Software"), to deal in 7 | // the Software without restriction, including without limitation the rights to 8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | // of the Software, and to permit persons to whom the Software is furnished to do 10 | // so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | 23 | package yaml 24 | 25 | // Set the writer error and return false. 26 | func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { 27 | emitter.error = yaml_WRITER_ERROR 28 | emitter.problem = problem 29 | return false 30 | } 31 | 32 | // Flush the output buffer. 33 | func yaml_emitter_flush(emitter *yaml_emitter_t) bool { 34 | if emitter.write_handler == nil { 35 | panic("write handler not set") 36 | } 37 | 38 | // Check if the buffer is empty. 39 | if emitter.buffer_pos == 0 { 40 | return true 41 | } 42 | 43 | if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { 44 | return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) 45 | } 46 | emitter.buffer_pos = 0 47 | return true 48 | } 49 | -------------------------------------------------------------------------------- /data/go/vendor/modules.txt: -------------------------------------------------------------------------------- 1 | # github.com/davecgh/go-spew v1.1.1 2 | ## explicit 3 | github.com/davecgh/go-spew/spew 4 | # github.com/go-openapi/inflect v0.19.0 5 | ## explicit 6 | # github.com/pmezard/go-difflib v1.0.0 7 | ## explicit 8 | github.com/pmezard/go-difflib/difflib 9 | # github.com/stretchr/testify v1.8.0 10 | ## explicit; go 1.13 11 | github.com/stretchr/testify/assert 12 | # gopkg.in/yaml.v3 v3.0.1 13 | ## explicit 14 | gopkg.in/yaml.v3 15 | -------------------------------------------------------------------------------- /data/rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | rand = "0.4" 10 | regex = "1" 11 | md5 = "0.7.0" 12 | 13 | -------------------------------------------------------------------------------- /data/rust/src/main.rs: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | Counts the number of digit characters, lowercase letters, and uppercase letters in a given string of length 8. 4 | 5 | Arguments: 6 | - s: A string of exactly 8 characters that may include digits, lowercase letters, and uppercase letters. 7 | 8 | Returns: 9 | - A tuple containing three usize values: the count of digit characters, the count of lowercase letters, and the count of uppercase letters in the string. 10 | 11 | Examples: 12 | - count_chars_types("yLOI2022") returns (4, 1, 3) 13 | - count_chars_types("IAKIOIOI") returns (0, 0, 8) 14 | - count_chars_types("1n2s0e1s") returns (4, 4, 0) 15 | */ 16 | fn count_chars_types(s: &str) -> (usize, usize, usize) { 17 | let mut digit_count = 0; 18 | let mut lower_count = 0; 19 | let mut upper_count = 0; 20 | 21 | for c in s.chars() { 22 | if c.is_digit(10) { 23 | digit_count += 1; 24 | } else if c.is_lowercase() { 25 | lower_count += 1; 26 | } else if c.is_uppercase() { 27 | upper_count += 1; 28 | } 29 | } 30 | 31 | (digit_count, lower_count, upper_count) 32 | } 33 | 34 | // Check function to verify the correctness of the generated function. 35 | 36 | 37 | 38 | 39 | #[cfg(test)] 40 | mod tests { 41 | use super::*; 42 | 43 | #[test] 44 | fn main() { 45 | assert_eq!(count_chars_types("yLOI2022"), (4, 1, 3)); 46 | assert_eq!(count_chars_types("IAKIOIOI"), (0, 0, 8)); 47 | assert_eq!(count_chars_types("1n2s0e1s"), (4, 4, 0)); 48 | } 49 | 50 | 51 | } -------------------------------------------------------------------------------- /dataset_build/gen_explain_task_data.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | 4 | 5 | 6 | if __name__ == '__main__': 7 | save_dir = '/workspace/explain_data' 8 | # files = os.listdir('./data') 9 | data_dir = '/workspace/MMCodeEval/data' 10 | files = os.listdir(data_dir) 11 | files = [x for x in files if x.endswith('.jsonl')] 12 | 13 | file_fix = {'HTML':'html','Markdown':'md','JSON':'json'} 14 | # file_cnt = 0 15 | for file in files: 16 | 17 | file_path = os.path.join(data_dir, file) 18 | items = [json.loads(x) for x in open(file_path).readlines() if x] 19 | # print(file_path, len(items)) 20 | # file_cnt+=1 21 | save_path = os.path.join(save_dir, file) 22 | f = open(save_path,'w') 23 | for item in items: 24 | lang = item['task_id'].split('/')[0] 25 | item['instruction'] = f"Provide a concise natural language description (docstring) of the {lang} code in English using at most 500 characters." 26 | 27 | if 'signature' in item and 'canonical_solution' in item: 28 | code = item['signature'] +'\n' +item['canonical_solution'] 29 | 30 | elif 'canonical_solution' not in item: # html, markdown, json 31 | code_name, task_id = item['task_id'].split('/') 32 | code_file = f'/workspace/MMCodeEval/data/{code_name}/'+task_id+'.'+file_fix[code_name] 33 | with open(code_file) as tf: 34 | tlines = tf.readlines() 35 | tlines = [l for l in tlines if len(l.strip())] 36 | code = '\n'.join(tlines) 37 | 38 | else: # awk 39 | # print(item['task_id']) 40 | code = item['canonical_solution'] 41 | 42 | # print(item['task_id']) 43 | # print(code) 44 | # print('='* 100) 45 | item['instruction'] = code+'\n\n'+item['instruction'] 46 | 47 | f.write(json.dumps(item, ensure_ascii=False)+ '\n') 48 | f.close() 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /docs/Examples.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## McEval Examples 4 | 5 | 6 | ### Multilingual Code Generation 7 | Examples of multilingual generation. The data mainly consists of an instruction part (including function name, function description, and function call cases), a reference solution, and a test cases part. Left part shows an example of the Lisp language. Middle part shows a file processing programming task in AWK language. During the evaluation, the corresponding file processing result by the generated code will be compared with the reference answer. Right part shows an example of the R language. 8 |

9 | McEval 10 |

11 | 12 | 13 | ### Multilingual Code Explain 14 | Examples of multilingual explanation. The data mainly consists of an instruction part (including a complete function), a reference Explanation. Left part shows an example of the Kotlin language. Middle part shows an example of the Lua language. Right part shows an example of the HTML language. 15 | 16 |

17 | McEval 18 |

19 | 20 | 21 | ### Multilingual Code Completion 22 | Examples of multilingual completion. The data mainly consists of an instruction part (including a incomplete function ), a reference complete code solution and test cases. Left part shows an span completion example of the C++ language. Middle part shows an single line completion example of the Rust language. Right part shows an multiple line completion example of the Shell language. 23 | 24 |

25 | McEval 26 |

27 | 28 | 29 | ### Markup Language 30 | For programming languages other than markup languages, we use an execution-based correctness metric by running the code with the provided test cases. For markup languages, we use the Exact Match metric for evaluation. Taking Json as an example, we parse all subcomponents in Json. If the model result is exactly the same as the subcomponent of the reference solution, the model generation result is considered correct. An example of Markup language (Json) is shown in below figure. 31 | 32 |

33 | McEval 34 |

35 | 36 | 37 | -------------------------------------------------------------------------------- /docs/README_ZH.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/docs/README_ZH.md -------------------------------------------------------------------------------- /eval/.dart_tool/package_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "configVersion": 2, 3 | "packages": [ 4 | { 5 | "name": "collection", 6 | "rootUri": "file:///root/.pub-cache/hosted/pub.dev/collection-1.18.0", 7 | "packageUri": "lib/", 8 | "languageVersion": "2.18" 9 | }, 10 | { 11 | "name": "my_app", 12 | "rootUri": "../", 13 | "packageUri": "lib/", 14 | "languageVersion": "3.2" 15 | } 16 | ], 17 | "generated": "2024-03-13T03:23:46.647933Z", 18 | "generator": "pub", 19 | "generatorVersion": "3.3.1" 20 | } 21 | -------------------------------------------------------------------------------- /eval/.dart_tool/package_config_subset: -------------------------------------------------------------------------------- 1 | collection 2 | 2.18 3 | file:///root/.pub-cache/hosted/pub.dev/collection-1.18.0/ 4 | file:///root/.pub-cache/hosted/pub.dev/collection-1.18.0/lib/ 5 | my_app 6 | 3.2 7 | file:///workspace/MMCodeEval/eval/ 8 | file:///workspace/MMCodeEval/eval/lib/ 9 | 2 10 | -------------------------------------------------------------------------------- /eval/.dart_tool/version: -------------------------------------------------------------------------------- 1 | 0.0.0-unknown -------------------------------------------------------------------------------- /eval/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/eval/__init__.py -------------------------------------------------------------------------------- /eval/extract/extract_awk_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | # from humanevalpack import create_all_tasks, create_task 4 | # create_all_tasks() 5 | 6 | 7 | def extract_awk_code(text) -> str: 8 | code = text 9 | code_block = re.search( 10 | r"```(?:bash)?(.*?)```", text, flags=re.DOTALL) 11 | if code_block is None: 12 | code_block = re.search( 13 | r"```(.*)```", text, flags=re.DOTALL) 14 | if code_block is None: 15 | code = text.split('\n\n')[1] 16 | else: 17 | code = code_block.group(1) 18 | # print(code) 19 | if (code[:2] == "sh"): 20 | code = code[2:] 21 | return code.strip() 22 | 23 | 24 | if __name__ == '__main__': 25 | items = [json.loads(x) for x in open( 26 | 'completions_AWK_humanevalsynthesize.jsonl').readlines() if x] 27 | 28 | for item in items: 29 | print(extract_awk_code(item['raw_generation'][0])) 30 | -------------------------------------------------------------------------------- /eval/extract/extract_c_code.py: -------------------------------------------------------------------------------- 1 | import os 2 | import re 3 | import json 4 | # from humanevalpack import create_all_tasks, create_task 5 | # create_all_tasks() 6 | 7 | 8 | def extract_ccpp_code(text, item, ): 9 | code_block = re.search(rf"```(?:[Cc](?:pp|\+\+|PP)?)?(.*?)\n```", text, flags=re.DOTALL) 10 | if code_block is None: 11 | code_block_pattern = re.compile(rf"(\n.*?\s+{item['entry_point']}.*}})", re.DOTALL) 12 | code_block = code_block_pattern.search(text) 13 | if code_block is None: 14 | code = text 15 | else: 16 | code = code_block.group(1) 17 | 18 | includes_pattern = re.compile(r"(#include\s+<[^>]+>)", re.MULTILINE) 19 | includes = includes_pattern.findall(code) 20 | code = re.sub(r"(#include\s+<[^>]+>)", "\n", code, flags=re.DOTALL).strip() 21 | code = re.sub(r'int\s+main\s*\(.*?\)\s*\{.*?return 0;.*?\}', '', code, flags=re.DOTALL).strip() 22 | 23 | code = re.sub(r'void\s+check\w*\s*\(.*?\)\s*\{.*\}', '', code, flags=re.DOTALL).strip() 24 | 25 | 26 | prompt = item['prompt'].split('\n') 27 | prompt = '\n'.join(prompt[:-1]) 28 | if item['signature'] in prompt: 29 | prompt = prompt.replace(item['signature'], '') 30 | full_code = '\n'.join(includes) + '\n' + prompt +'\n'+ code+'\n' + item['test'] 31 | 32 | return full_code 33 | 34 | 35 | 36 | 37 | if __name__ == '__main__': 38 | items = [json.loads(x) for x in open('eval/generations/gpt4/completions_C_humanevalsynthesize.jsonl').readlines() if x] 39 | 40 | for item in [items[0]]: 41 | prt = extract_ccpp_code(item['raw_generation'][0], item) 42 | print('"'* 60) 43 | print(prt) 44 | # break -------------------------------------------------------------------------------- /eval/extract/extract_clisp_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | # from humanevalpack import create_all_tasks, create_task 4 | # create_all_tasks() 5 | 6 | 7 | def extract_clisp_code(text, item) -> str: 8 | entry_point = item["entry_point"] 9 | code = "" 10 | code_block = re.search( 11 | rf"```(?:[Ll]isp)?.*?(\(defun\s+{entry_point}.*?)```", text, flags=re.DOTALL) 12 | if code_block is None: 13 | code_block = re.search( 14 | rf"(\(defun\s+{entry_point}.*?)(\n\n)", text, flags=re.DOTALL) 15 | if code_block is None: 16 | code_block = re.search( 17 | rf"```(?:[Li]ip)?(.*?)```", text, flags=re.DOTALL) 18 | if code_block is None: 19 | code = text 20 | else: 21 | code = code_block.group(1) 22 | 23 | eql = 0 24 | for ch in code: 25 | if ch == '(': 26 | eql+=1 27 | elif ch == ')': 28 | eql-=1 29 | code += ')'* eql 30 | return code + '\n\n' + item["test"] 31 | 32 | 33 | if __name__ == '__main__': 34 | items = [json.loads(x) for x in open( 35 | 'completions_Common Lisp_humanevalsynthesize.jsonl').readlines() if x] 36 | 37 | for item in items: 38 | extract_clisp_code(item['raw_generation'][0], item) 39 | -------------------------------------------------------------------------------- /eval/extract/extract_dart_code.py: -------------------------------------------------------------------------------- 1 | import os 2 | import re 3 | import json 4 | # from humanevalpack import create_all_tasks, create_task 5 | # create_all_tasks() 6 | 7 | def extract_dart_code_block(text, entry_point) -> str: 8 | re.compile(rf"```(?:[Dd]art\n)?.*?({entry_point}.*?)\n```", re.DOTALL) 9 | code_block_pattern = re.compile(rf"```(?:[Dd]art)?(.*?[^\n]*?{entry_point}.*?)```", re.DOTALL) 10 | code_block = code_block_pattern.search(text) 11 | 12 | 13 | if code_block is None: 14 | code_block = re.search(rf"((?:public)?[^\n]*?{entry_point}.*)", text, flags=re.DOTALL) 15 | if code_block is None: 16 | code_block = re.search(rf"```(?:[Dd]art)?(.*?)\n```", text, flags=re.DOTALL) 17 | 18 | if code_block is None: 19 | code_block_pattern = re.compile(rf"(\n.*?\s+{entry_point}.*}})", re.DOTALL) 20 | code_block = code_block_pattern.search(text) 21 | if code_block is None: 22 | return text 23 | else: 24 | return code_block.group(1) 25 | 26 | def extract_dart_code(text, item, ): 27 | try: 28 | code = extract_dart_code_block(text, item['entry_point']) 29 | 30 | pattern = r"\s*(public)*\s*(static)*\s*void\s+main\s*\(\s*\)\s*\{.*?\n\s*\}" 31 | code = re.sub(pattern, "", code, flags=re.DOTALL) 32 | 33 | # pattern_solution_class = r"(public)*\s*class\s+\w+\s*\{\s*|\s*\}\s*$" 34 | # # Removing the class declaration and closing brace to keep only the methods 35 | # code = re.sub(pattern_solution_class, "\n", code, flags=re.DOTALL).strip() 36 | 37 | pattern_imports = r"^import.*?$" 38 | 39 | # Extracting import lines from the code 40 | import_lines = re.findall(pattern_imports, code, flags=re.MULTILINE) 41 | # Removing import lines from the code 42 | code = re.sub(pattern_imports, "", code, flags=re.MULTILINE).strip() 43 | # print(code) 44 | # code = code.split(item['entry_point'])[-1] 45 | # print(code) 46 | # print(code.index("{")) 47 | sta_idx = code.index("{") 48 | code = code[sta_idx:] 49 | 50 | full_code = "\n".join(import_lines)+'\n' +item['prompt']+'\n'+ code+'\n' + item['test'] 51 | return full_code 52 | except: 53 | return "" 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /eval/extract/extract_elisp_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | # from humanevalpack import create_all_tasks, create_task 4 | # create_all_tasks() 5 | 6 | 7 | def extract_elisp_code(text, item) -> str: 8 | entry_point = item["entry_point"] 9 | code = "" 10 | code_block = re.search( 11 | rf"```(?:emacs)?.*?(\(defun\s+{entry_point}.*?)```", text, flags=re.DOTALL) 12 | if code_block is None: 13 | code_block = re.search( 14 | rf"(\(defun\s+{entry_point}.*?)(\n\n)", text, flags=re.DOTALL) 15 | if code_block is None: 16 | code_block = re.search( 17 | rf"```(?:emacs)?(.*?)```", text, flags=re.DOTALL) 18 | if code_block is None: 19 | code = text 20 | else: 21 | code = code_block.group(1) 22 | 23 | code = "(require 'cl-lib)\n\n" + code 24 | return code + '\n\n' + item['test'] 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /eval/extract/extract_elixir_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | # from humanevalpack import create_all_tasks, create_task 4 | # create_all_tasks() 5 | 6 | 7 | def extract_elixir_code(text, item) -> str: 8 | entry_point = item["entry_point"] 9 | code = text 10 | code_block = re.search( 11 | rf"```(?:[Ee]lixir)?.*?(def\s+{entry_point}.*?)```", text, flags=re.DOTALL) 12 | if code_block is None: 13 | code_block = re.search( 14 | rf"(def\s+{entry_point}.*end)", text, flags=re.DOTALL) 15 | if code_block is None: 16 | code_block = re.search( 17 | rf"```(?:[Ee]lixir)?(.*?)```", text, flags=re.DOTALL) 18 | if code_block is None: 19 | code = text 20 | else: 21 | code = code_block.group(1) 22 | 23 | 24 | defmodule_block = re.search( 25 | rf".*defmodule.*", text, flags=re.DOTALL) 26 | 27 | pattern = r"\s*IO\..*?\n" 28 | code = re.sub(pattern, "", code, flags=re.DOTALL) 29 | 30 | pattern = r"defmodule.*?Test\s+do.*end" 31 | code = re.sub(pattern, "", code, flags=re.DOTALL) 32 | 33 | if defmodule_block is None: 34 | code = item['prompt'].split('\n')[0] + '\n' + code + '\nend\n' 35 | else: 36 | code = item['prompt'].split('\n')[0] + '\n' + code + '\n' 37 | return code + '\n\n' + item['test'] 38 | 39 | 40 | if __name__ == '__main__': 41 | items = [json.loads(x) for x in open( 42 | 'completions_Elixir_humanevalsynthesize.jsonl').readlines() if x] 43 | 44 | for item in items: 45 | extract_elixir_code(item['raw_generation'][0], item) 46 | -------------------------------------------------------------------------------- /eval/extract/extract_erlang_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | 4 | def extract_erlang_code(text, item) -> str: 5 | entry_point = item["entry_point"] 6 | prompt = item["prompt"] 7 | code = text 8 | code_block = re.search( 9 | rf"```(?:[Ee]rlang)?.*?(-module.*{entry_point}.*?->.*?)```", text, flags=re.DOTALL) 10 | 11 | if code_block is None: 12 | code_block = re.search( 13 | rf"```(?:[Ee]rlang)?.*?({entry_point}.*?->.*?)```", text, flags=re.DOTALL) 14 | 15 | if code_block is None: 16 | # code_block = re.search(rf"(-module.*{entry_point}.*?->.*?end)", text, flags=re.DOTALL) 17 | code_block = re.search(rf"({entry_point}.*?\-\>.*?)", text, flags=re.DOTALL) 18 | if code_block is None: 19 | code_block = re.search( 20 | rf"```(?:[Ee]rlang)?(.*?)```", text, flags=re.DOTALL) 21 | if code_block is None: 22 | code = text 23 | else: 24 | code = code_block.group(1) 25 | 26 | if (code.find("test()") != -1): 27 | code = code[:code.find("test()")] 28 | 29 | code_block_post = re.search(rf"(-module.*export.*\n)?({entry_point}.*?->.*)", code, flags=re.DOTALL) 30 | if code_block_post is None: 31 | return code + item['test'] 32 | else: 33 | new_code = prompt.split( 34 | "\n")[0]+'\n'+prompt.split("\n")[1]+"\n\n"+code_block_post.group(2) 35 | return new_code + item['test'] 36 | 37 | 38 | if __name__ == '__main__': 39 | items = [json.loads(x) for x in open( 40 | 'completions_Erlang_humanevalsynthesize.jsonl').readlines() if x] 41 | 42 | for item in items: 43 | extract_erlang_code(item['raw_generation'][0], item) 44 | -------------------------------------------------------------------------------- /eval/extract/extract_fs_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | # from humanevalpack import create_all_tasks, create_task 4 | # create_all_tasks() 5 | 6 | 7 | def extract_fs_code(text, item) -> str: 8 | entry_point = item["entry_point"] 9 | code = text 10 | code_block = re.search( 11 | rf"```(?:[Ff]sharp)?.*?((open)?.*let\s+{entry_point}.*?)```", text, flags=re.DOTALL) 12 | if code_block is None: 13 | code_block = re.search( 14 | rf"((open)?.*let\s+{entry_point}.*?)(\n\n[a-zA-Z])", text, flags=re.DOTALL) 15 | if code_block is None: 16 | code_block = re.search( 17 | rf"```(?:[Ff]sharp)?(.*?)```", text, flags=re.DOTALL) 18 | if code_block is None: 19 | # print("error!!!!!!!!") 20 | code = text 21 | else: 22 | # print("right!!!!") 23 | code = code_block.group(1) 24 | if (code.find("[]") != -1): 25 | code = code[:code.find("[]")] 26 | # print(code) 27 | return code + '\n\n' + item['test'] 28 | 29 | 30 | if __name__ == '__main__': 31 | items = [json.loads(x) for x in open( 32 | 'completions_F#_humanevalsynthesize.jsonl').readlines() if x] 33 | 34 | for item in items: 35 | extract_fs_code(item['raw_generation'][0], item) 36 | -------------------------------------------------------------------------------- /eval/extract/extract_haskell_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | # from humanevalpack import create_all_tasks, create_task 4 | # create_all_tasks() 5 | 6 | 7 | def extract_haskell_code(text, item) -> str: 8 | entry_point = item["entry_point"] 9 | code = text 10 | code_block = re.search( 11 | rf"```(?:[Hh]askell)?.*?((import)?.*?{entry_point} ::.*?)```", text, flags=re.DOTALL) 12 | if code_block is None: 13 | code_block = re.search( 14 | rf"((import)?.*?{entry_point} ::.*?)(\n\n[a-zA-Z])", text, flags=re.DOTALL) 15 | if code_block is None: 16 | code_block = re.search( 17 | rf"```(?:[Hh]askell)?(.*?)```", text, flags=re.DOTALL) 18 | if code_block is None: 19 | # print("error!!!!!!!!") 20 | code = text 21 | else: 22 | # print("right!!!!") 23 | code = code_block.group(1) 24 | if (code.find("main :: IO ()") != -1): 25 | code = code[:code.find("main :: IO ()")] 26 | # print(code) 27 | return code.lstrip() + item["test"] 28 | 29 | 30 | if __name__ == '__main__': 31 | items = [json.loads(x) for x in open( 32 | 'completions_Haskell_humanevalsynthesize.jsonl').readlines() if x] 33 | 34 | for item in items: 35 | extract_haskell_code(item['raw_generation'][0], item) 36 | -------------------------------------------------------------------------------- /eval/extract/extract_html_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | # from humanevalpack import create_all_tasks, create_task 4 | # create_all_tasks() 5 | 6 | 7 | def extract_html_code(text) -> str: 8 | code_block = re.search( 9 | r"```(?:html)?.*?(.*?).*?```", text, flags=re.DOTALL) 10 | if code_block is None: 11 | code_block = re.search( 12 | rf"```(?:html)?(.*?)```", text, flags=re.DOTALL) 13 | if code_block is None: 14 | # print("error!!!!!!!!") 15 | return text 16 | else: 17 | # print("right!!!!") 18 | return code_block.group(1).strip() 19 | 20 | 21 | if __name__ == '__main__': 22 | items = [json.loads(x) for x in open( 23 | 'completions_HTML_humanevalsynthesize.jsonl').readlines() if x] 24 | 25 | for item in items: 26 | extract_html_code(item['raw_generation'][0]) 27 | -------------------------------------------------------------------------------- /eval/extract/extract_java_code.py: -------------------------------------------------------------------------------- 1 | import os 2 | import re 3 | import json 4 | # from humanevalpack import create_all_tasks, create_task 5 | # create_all_tasks() 6 | 7 | def extract_java_code_block(text, entry_point) -> str: 8 | re.compile(rf"```(?:[Jj]ava\n)?.*?({entry_point}.*?)\n```", re.DOTALL) 9 | code_block_pattern = re.compile(rf"```(?:[Jj]ava)?(.*?[^\n]*?{entry_point}.*?)```", re.DOTALL) 10 | code_block = code_block_pattern.search(text) 11 | 12 | if code_block is None: 13 | code_block = re.search(rf"((?:public)?[^\n]*?{entry_point}.*)", text, flags=re.DOTALL) 14 | if code_block is None: 15 | code_block = re.search(rf"```(?:[Jj]ava)?(.*?)\n```", text, flags=re.DOTALL) 16 | if code_block is None: 17 | return text 18 | else: 19 | return code_block.group(1) 20 | 21 | def extract_java_code(text, item): 22 | # task = create_task('java', 'synthesize')(language='java') 23 | # pattern = r"\s*public static void main\(String\[\] args\) \{.*?\n\s*\}" 24 | 25 | 26 | 27 | # print('='*50) 28 | # print(item['task_id']) 29 | # print(item['prompt']) 30 | 31 | 32 | code = extract_java_code_block(text, item['entry_point']) 33 | # # print(content) 34 | # print(code) 35 | 36 | pattern = r"\s*public\s+static\s+void\s+main\s*\(String\[\]\s+args\)\s*\{.*?\n\s*\}" 37 | code = re.sub(pattern, "", code, flags=re.DOTALL) 38 | pattern_solution_class = r"public\s+class\s+\w+\s*\{\s*|\s*\}\s*$" 39 | # Removing the class declaration and closing brace to keep only the methods 40 | code = re.sub(pattern_solution_class, "\n", code, flags=re.DOTALL).strip() 41 | 42 | pattern_imports = r"^import.*?$" 43 | 44 | # Extracting import lines from the code 45 | import_lines = re.findall(pattern_imports, code, flags=re.MULTILINE) 46 | # Removing import lines from the code 47 | code = re.sub(pattern_imports, "", code, flags=re.MULTILINE).strip() 48 | 49 | try: 50 | sta_idx = code.index("{") 51 | code = code[sta_idx:] 52 | except: 53 | return "" 54 | 55 | full_code = "\n".join(import_lines)+'\n' +item['prompt']+'\n'+ code 56 | eql = 0 57 | for ch in full_code: 58 | if ch == '{': 59 | eql+=1 60 | elif ch == '}': 61 | eql-=1 62 | full_code += '\n}'* (eql-1) 63 | 64 | full_code += '\n' + item['test'] 65 | 66 | return full_code 67 | 68 | 69 | if __name__ == '__main__': 70 | 71 | items = [json.loads(x) for x in open('completions_java_humanevalsynthesize.jsonl').readlines() if x] 72 | extract_java_code() 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /eval/extract/extract_javascript_code.py: -------------------------------------------------------------------------------- 1 | import os 2 | import re 3 | import json 4 | 5 | # from humanevalpack import create_all_tasks, create_task 6 | # create_all_tasks() 7 | 8 | 9 | def extract_js_code( 10 | text, 11 | item, 12 | ): 13 | signature_escaped = re.escape(item['signature']) 14 | code_block = re.search( 15 | rf"```(?:[Jj](?:avascript|s))?.*?(const\s+{signature_escaped}.*?)```", 16 | text, 17 | flags=re.DOTALL, 18 | ) 19 | if code_block is None: 20 | code_block = re.search( 21 | rf"(const\s+{signature_escaped}.*)", text, flags=re.DOTALL 22 | ) 23 | if code_block is None: 24 | code_block = re.search( 25 | rf"```(?:[Jj](?:avascript|s))?(.*?)\n```", text, flags=re.DOTALL 26 | ) 27 | if code_block is None: 28 | code = text 29 | else: 30 | code = code_block.group(1) 31 | if "```" in code: 32 | code = code.split("```")[0] 33 | 34 | console_log_regex = re.compile(r"console\.log\(.*?\);", re.DOTALL) 35 | 36 | # 使用正则表达式删除所有console.log语句 37 | code = console_log_regex.sub("", code) 38 | 39 | pattern = r"\s*function\s+check\w*\(\s*\)\s*\{.*\}" 40 | code = re.sub(pattern, "", code, flags=re.DOTALL) 41 | pattern = r"\s*check\w*\(\s*\)\s*\;" 42 | code = re.sub(pattern, "", code, flags=re.DOTALL) 43 | 44 | prompt = item["prompt"].split("\n") 45 | prompt = "\n".join(prompt[:-1]) 46 | if item["signature"] in prompt: 47 | prompt = prompt.replace(item["signature"], "") 48 | full_code = prompt + "\n" + code + "\n" + item["test"] 49 | 50 | return full_code 51 | 52 | 53 | if __name__ == "__main__": 54 | items = [ 55 | json.loads(x) 56 | for x in open( 57 | "eval/generations/gpt4/completions_JavaScript_humanevalsynthesize.jsonl" 58 | ).readlines() 59 | if x 60 | ] 61 | 62 | for item in [items[15]]: 63 | prt = extract_js_code(item["raw_generation"][0], item) 64 | print('"' * 60) 65 | print(prt) 66 | # break 67 | -------------------------------------------------------------------------------- /eval/extract/extract_json_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | # from humanevalpack import create_all_tasks, create_task 4 | # create_all_tasks() 5 | 6 | 7 | def extract_json_code(text) -> str: 8 | code_block = re.search( 9 | rf"```(?:json)(.*?)```", text, flags=re.DOTALL) 10 | if code_block is None: 11 | code_block = re.search( 12 | r"(\{.*\})", text, flags=re.DOTALL) 13 | if code_block is None: 14 | code_block = re.search( 15 | rf"```(.*?)```", text, flags=re.DOTALL) 16 | 17 | if code_block is None: 18 | return text 19 | else: 20 | return code_block.group(1) 21 | 22 | 23 | if __name__ == '__main__': 24 | items = [json.loads(x) for x in open( 25 | 'completions_JSON_humanevalsynthesize.jsonl').readlines() if x] 26 | 27 | for item in items: 28 | extract_json_code(item['raw_generation'][0]) 29 | -------------------------------------------------------------------------------- /eval/extract/extract_julia_code.py: -------------------------------------------------------------------------------- 1 | import os 2 | import re 3 | import json 4 | # from humanevalpack import create_all_tasks, create_task 5 | # create_all_tasks() 6 | 7 | def extract_julia_code_block(text: str, entry_point) -> str: 8 | code_block_pattern = re.compile(rf"```(?:[Jj]ulia\n)?.*?(function\s+{entry_point}.*?)\n```", re.DOTALL) 9 | code_block = code_block_pattern.search(text) 10 | if code_block is None: 11 | code_block_pattern = re.compile(rf"(function\s+{entry_point}.*end)", re.DOTALL) 12 | code_block = code_block_pattern.search(text) 13 | if code_block is not None: 14 | return code_block.group(1) 15 | # if no code block is found, assume the LM is simply filling the code. Try attaching the output to the prompt 16 | if text.startswith("def "): 17 | return text 18 | return text 19 | 20 | def extract_julia_code(text, item, ): 21 | try: 22 | code = extract_julia_code_block(text, item['entry_point']) 23 | # print(code) 24 | pattern_imports = r"^import.*?$" 25 | 26 | # Extracting import lines from the code 27 | import_lines = re.findall(pattern_imports, code, flags=re.MULTILINE) 28 | # Removing import lines from the code 29 | code = re.sub(pattern_imports, "", code, flags=re.MULTILINE).strip() 30 | 31 | 32 | pattern = r"\s*function\s+check\w*\(\s*\)\s*.*?\s*check\w*\(\s*\)" 33 | code = re.sub(pattern, "", code, flags=re.DOTALL) 34 | 35 | # pattern = r"\s*def\s+test\w*\(\s*\)\s*\:.*?\s*test\w*\(\s*\)" 36 | # code = re.sub(pattern, "", code, flags=re.DOTALL) 37 | 38 | pattern = r"\s*@assert.*?\n" 39 | code = re.sub(pattern, "", code) 40 | 41 | delca_col_idx = -1 42 | code_lines = code.split('\n') 43 | code_lines = [x for x in code_lines if 'println' not in x] 44 | for idx, line in enumerate(code_lines): 45 | if line.strip().startswith('function') and item['entry_point'] in line: 46 | delca_col_idx = idx 47 | break 48 | 49 | 50 | full_code = '\n'.join(code_lines[:delca_col_idx])+'\n' + item['prompt']+'\n' + '\n'.join(code_lines[delca_col_idx+1:])+'\n' + item['test'] 51 | 52 | full_code = full_code.strip().strip('julia') 53 | except: 54 | return None 55 | 56 | return full_code 57 | 58 | 59 | if __name__ == '__main__': 60 | items = [json.loads(x) for x in open('completions_julia_humanevalsynthesize.jsonl').readlines() if x] 61 | 62 | for item in items: 63 | extract_julia_code(item['raw_generation'][0], item) 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /eval/extract/extract_lua_code.py: -------------------------------------------------------------------------------- 1 | import os 2 | import re 3 | import json 4 | 5 | 6 | def extract_lua_code(text, item): 7 | signature_escaped = re.escape(item["signature"]) 8 | code_block = re.search( 9 | rf"```lua(.*?local\s+{signature_escaped}.*?|{signature_escaped}.*?)```", 10 | text, 11 | flags=re.DOTALL, 12 | ) 13 | 14 | if code_block is None: 15 | code_block = re.search(rf"```lua(.*?)\n```", text, flags=re.DOTALL) 16 | if code_block is None: 17 | code_block = re.search( 18 | rf"```(.*?)```", 19 | text, 20 | flags=re.DOTALL, 21 | ) 22 | if code_block is None: 23 | code_block = re.search( 24 | rf"(function\s+{item['entry_point']}.*end)", 25 | text, 26 | flags=re.DOTALL, 27 | ) 28 | 29 | if code_block is None: 30 | code = text 31 | else: 32 | code = code_block.group(1) 33 | if "```" in code: 34 | code = code.split("```")[0] 35 | 36 | pattern = r"\-\-\[\[.*?\]\]\-\-" 37 | code = re.sub(pattern, "", code, flags=re.DOTALL) 38 | 39 | # Lua中打印使用print 40 | print_regex = re.compile(r"print\(.*?\)\s*\n", re.DOTALL) 41 | 42 | # 使用正则表达式删除所有print语句 43 | code = print_regex.sub("", code) 44 | 45 | pattern = r"function\s+check\s*\(.*?\).*end.*check\(.*\)" 46 | code = re.sub(pattern, "", code, flags=re.DOTALL) 47 | 48 | 49 | prompt = item["prompt"].split("\n") 50 | prompt = "\n".join(prompt[:-1]) 51 | if item["signature"] in prompt: 52 | prompt = prompt.replace(item["signature"], "") 53 | full_code = prompt + "\n" + code + "\n" + item["test"] 54 | 55 | return full_code 56 | 57 | 58 | if __name__ == "__main__": 59 | items = [ 60 | json.loads(x) 61 | for x in open( 62 | # "eval/generations/gpt4/completions_Lua_humanevalsynthesize.jsonl" 63 | "eval/generations/codellama-13b/gen_result_Lua.jsonl" 64 | ).readlines() 65 | if x 66 | ] 67 | 68 | for item in [items[9]]: 69 | prt = extract_lua_code(item["raw_generation"][0], item) 70 | print('"' * 60) 71 | print(prt) 72 | # break 73 | -------------------------------------------------------------------------------- /eval/extract/extract_markdown_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | # from humanevalpack import create_all_tasks, create_task 4 | # create_all_tasks() 5 | 6 | 7 | def extract_md_code(text) -> str: 8 | code_block = re.search( 9 | rf"```(?:markdown)(.*?)```", text, flags=re.DOTALL) 10 | 11 | if code_block is None: 12 | code_block = re.search(rf"```.*?\n(.*?)```", text, flags=re.DOTALL) 13 | if code_block is None: 14 | # print("error!!!!!!!!") 15 | if ("\n\n" in text): 16 | return text.split("\n\n")[1].strip() 17 | return text.strip() 18 | else: 19 | # print("right!!!!") 20 | return code_block.group(1).strip() 21 | 22 | 23 | if __name__ == '__main__': 24 | items = [json.loads(x) for x in open( 25 | 'completions_Markdown_humanevalsynthesize.jsonl').readlines() if x] 26 | 27 | for item in items: 28 | extract_md_code(item['raw_generation'][0]) 29 | -------------------------------------------------------------------------------- /eval/extract/extract_pascal_code.py: -------------------------------------------------------------------------------- 1 | import os 2 | import re 3 | import json 4 | 5 | 6 | def extract_pascal_code( 7 | text, 8 | item, 9 | ): 10 | signature_escaped = re.escape(item["signature"]) 11 | code_block = re.search( 12 | rf"```(?:[Pp]ascal)?.*?(var\s+{signature_escaped}.*?)```", 13 | text, 14 | flags=re.DOTALL, 15 | ) 16 | if code_block is None: 17 | code_block = re.search(rf"(var\s+{signature_escaped}.*)", text, flags=re.DOTALL) 18 | if code_block is None: 19 | code_block = re.search(rf"```(?:[Pp]ascal)?(.*?)\n```", text, flags=re.DOTALL) 20 | if code_block is None: 21 | code = text 22 | else: 23 | code = code_block.group(1) 24 | if "```" in code: 25 | code = code.split("```")[0] 26 | 27 | prompt = item["prompt"].split("\n") 28 | prompt = "\n".join(prompt[:-1]) 29 | if item["signature"] in prompt: 30 | prompt = prompt.replace(item["signature"], "") 31 | full_code = prompt + "\n" + code + "\n" + item["test"] 32 | 33 | return full_code 34 | 35 | 36 | if __name__ == "__main__": 37 | items = [ 38 | json.loads(x) 39 | for x in open( 40 | "eval/generations/gpt4/completions_Pascal_humanevalsynthesize.jsonl" 41 | ).readlines() 42 | if x 43 | ] 44 | 45 | for item in [items[9]]: 46 | prt = extract_pascal_code(item["raw_generation"][0], item) 47 | print('"' * 60) 48 | print(prt) 49 | -------------------------------------------------------------------------------- /eval/extract/extract_perl_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | # from humanevalpack import create_all_tasks, create_task 4 | # create_all_tasks() 5 | 6 | 7 | def extract_perl_code(text, item) -> str: 8 | entry_point = item["entry_point"] 9 | code = text 10 | code_block = re.search( 11 | rf"```(?:[Pp]erl)?.*?((use)?.*sub\s+{entry_point}.*?)```", text, flags=re.DOTALL) 12 | if code_block is None: 13 | code_block = re.search( 14 | rf"((use)?.*sub\s+{entry_point}.*?)(\n\n[a-zA-Z])", text, flags=re.DOTALL) 15 | if code_block is None: 16 | code_block = re.search( 17 | rf"```(?:[Pp]erl)?(.*?)```", text, flags=re.DOTALL) 18 | if code_block is None: 19 | # print("error!!!!!!!!") 20 | code = text 21 | else: 22 | # print("right!!!!") 23 | code = code_block.group(1) 24 | 25 | 26 | pattern = r"\s*sub\s+check\w*\s*\{.*\}" 27 | code = re.sub(pattern, "", code, flags=re.DOTALL) 28 | 29 | pattern = r"check\s*\(.*?\);" 30 | code = re.sub(pattern, "", code, flags=re.DOTALL) 31 | 32 | return code + '\n\n' + item['test'] 33 | 34 | 35 | if __name__ == '__main__': 36 | items = [json.loads(x) for x in open( 37 | 'completions_Perl_humanevalsynthesize.jsonl').readlines() if x] 38 | 39 | for item in items: 40 | extract_perl_code(item['raw_generation'][0], item) 41 | -------------------------------------------------------------------------------- /eval/extract/extract_php_code.py: -------------------------------------------------------------------------------- 1 | import os 2 | import re 3 | import json 4 | import textwrap 5 | # from humanevalpack import create_all_tasks, create_task 6 | # create_all_tasks() 7 | 8 | 9 | def extract_php_code_block(text: str, entry_point) -> str: 10 | code_block_pattern = re.compile(rf"```(?:[pP]hp\n)?.*?(function\s+{entry_point}.*?)\n```", re.DOTALL) 11 | code_block = code_block_pattern.search(text) 12 | if code_block is None: 13 | code_block_pattern = re.compile(rf"(function\s+{entry_point}.*}})", re.DOTALL) 14 | code_block = code_block_pattern.search(text) 15 | if code_block is not None: 16 | return code_block.group(1) 17 | # if no code block is found, assume the LM is simply filling the code. Try attaching the output to the prompt 18 | return text 19 | 20 | 21 | def extract_php_code(text, item): 22 | 23 | code = extract_php_code_block(text, item['entry_point']) 24 | 25 | # print(code) 26 | 27 | pattern_imports = r"^import.*?$" 28 | # pattern_imports2 = r"^from.*?import.*?$" 29 | 30 | # Extracting import lines from the code 31 | # import_lines = re.findall(pattern_imports, code, flags=re.MULTILINE) 32 | # import_lines += re.findall(pattern_imports2, code, flags=re.MULTILINE) 33 | 34 | # Removing import lines from the code 35 | # code = re.sub(pattern_imports, "", code, flags=re.MULTILINE).strip() 36 | 37 | delca_row_idx = -1 38 | 39 | 40 | pattern = r"function\s+check\w*\(.*?\)\s*\{.*\}" 41 | code = re.sub(pattern, "", code, flags=re.DOTALL) 42 | pattern = r"\s*check\w*\(.*?\)\s*\;" 43 | code = re.sub(pattern, "", code, flags=re.DOTALL) 44 | 45 | pattern = r"\?\>" 46 | code = re.sub(pattern, "", code, flags=re.DOTALL) 47 | 48 | 49 | code_lines = code.split('\n') 50 | code_lines = [x for x in code_lines if 'echo' not in x] 51 | 52 | for idx, line in enumerate(code_lines): 53 | if 'function' in line and item['entry_point'] in line: 54 | delca_row_idx = idx 55 | # print(delca_row_idx, line) 56 | break 57 | 58 | 59 | 60 | 61 | if '{' in code_lines[delca_row_idx]: 62 | item['prompt'] += '{' 63 | 64 | # print('\n'.join(code_lines[:delca_row_idx])) 65 | 66 | full_code = item['prompt']+'\n' + '\n'.join(code_lines[:delca_row_idx])+'\n' +'\n'.join(code_lines[delca_row_idx+1:])+'\n' + item['test'] 67 | 68 | # print(full_code) 69 | return full_code 70 | 71 | 72 | if __name__ == '__main__': 73 | items = [json.loads(x) for x in open('completions_PHP_humanevalsynthesize.jsonl').readlines() if x] 74 | for item in items: 75 | extract_php_code(item['raw_generation'][0], item) 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /eval/extract/extract_powershell_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | # from humanevalpack import create_all_tasks, create_task 4 | # create_all_tasks() 5 | 6 | 7 | def extract_powershell_code(text, item) -> str: 8 | entry_point = item["entry_point"] 9 | code = text 10 | code_block = re.search( 11 | rf"```(?:[Pp]owershell)?.*?(function\s+{entry_point}.*?)```", text, flags=re.DOTALL) 12 | if code_block is None: 13 | code_block = re.search( 14 | rf"(function\s+{entry_point}.*}})", text, flags=re.DOTALL) 15 | if code_block is None: 16 | code_block = re.search( 17 | rf"```(?:[Pp]owershell)?(.*?)```", text, flags=re.DOTALL) 18 | if code_block is None: 19 | code = text 20 | else: 21 | code = code_block.group(1) 22 | # print(code) 23 | return code + '\n\n' + item['test'] 24 | 25 | 26 | if __name__ == '__main__': 27 | items = [json.loads(x) for x in open( 28 | 'completions_PowerShell_humanevalsynthesize.jsonl').readlines() if x] 29 | 30 | for item in items: 31 | extract_powershell_code(item['raw_generation'][0], item) 32 | -------------------------------------------------------------------------------- /eval/extract/extract_racket_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | # from humanevalpack import create_all_tasks, create_task 4 | # create_all_tasks() 5 | 6 | 7 | def extract_racket_code(text, item) -> str: 8 | entry_point = item["entry_point"] 9 | code = text 10 | code_block = re.search( 11 | rf"```(?:[Rr]acket)?.*?((#lang racket)?.*?\(define \(\s*{entry_point}.*?)```", text, flags=re.DOTALL) 12 | if code_block is None: 13 | code_block = re.search( 14 | rf"((#lang racket).*?\(define \(\s*{entry_point}.*?)(\n\n)", text, flags=re.DOTALL) 15 | # print(code_block) 16 | if code_block is None: 17 | code_block = re.search( 18 | rf"```(?:[Rr]acket)?(.*?)```", text, flags=re.DOTALL) 19 | if code_block is None: 20 | code_block = re.search( 21 | rf"```(?:[Rr]acket)?(.*?)$", text, flags=re.DOTALL) 22 | 23 | if code_block is None: 24 | code = text 25 | else: 26 | code = code_block.group(1) 27 | 28 | 29 | 30 | pattern = r"\(module\+\s+test.*?\n\)" 31 | code = re.sub(pattern, "", code, flags=re.DOTALL) 32 | 33 | if "#lang racket" not in code: 34 | code = "#lang racket\n(require rackunit)\n" + code 35 | # print(code) 36 | if "(require rackunit)" not in code: 37 | code = code.replace("#lang racket", "#lang racket\n(require rackunit)\n") 38 | 39 | 40 | return code + '\n\n' + item['test'] 41 | 42 | 43 | if __name__ == '__main__': 44 | items = [json.loads(x) for x in open( 45 | 'completions_Racket_humanevalsynthesize.jsonl').readlines() if x] 46 | 47 | for item in items: 48 | extract_racket_code(item['raw_generation'][0], item) 49 | -------------------------------------------------------------------------------- /eval/extract/extract_rust_code.py: -------------------------------------------------------------------------------- 1 | import os 2 | import re 3 | import json 4 | import textwrap 5 | # from humanevalpack import create_all_tasks, create_task 6 | # create_all_tasks() 7 | 8 | 9 | def extract_rust_code_block(text: str, entry_point) -> str: 10 | code_block_pattern = re.compile(rf"```(?:[Rr]ust)?(.*?fn\s+{entry_point}.*?)```", re.DOTALL) 11 | code_block = code_block_pattern.search(text) 12 | 13 | if code_block is None: 14 | code_block_pattern = re.compile(rf"```(?:[Rr]ust)?(.*?fn\s+{entry_point}.*?)$", re.DOTALL) 15 | code_block = code_block_pattern.search(text) 16 | 17 | if code_block is None: 18 | # code_block_pattern = re.compile(rf"(fn\s+{entry_point}.*?)(?:\n(?!\n*(?: |\t))|$)", re.DOTALL) 19 | code_block_pattern = re.compile(rf"(fn\s+{entry_point}.*}})", re.DOTALL) 20 | 21 | code_block = code_block_pattern.search(text) 22 | if code_block is not None: 23 | return code_block.group(1) 24 | # if no code block is found, assume the LM is simply filling the code. Try attaching the output to the prompt 25 | return text 26 | 27 | def extract_rust_code(text, item, ): 28 | 29 | code = extract_rust_code_block(text, item['entry_point']) 30 | 31 | pattern = r"fn\s+main\s*\(.*?\)\s*\{.*\}" 32 | code = re.sub(pattern, "", code, flags=re.DOTALL) 33 | 34 | pattern = r"fn\s+main\s*\(.*?\)\s*\{.*$" 35 | code = re.sub(pattern, "", code, flags=re.DOTALL) 36 | 37 | pattern = r"fn\s+check\s*\(.*?\)\s*\{.*\}" 38 | code = re.sub(pattern, "", code, flags=re.DOTALL) 39 | 40 | pattern = r"\s+check\s*\(.*?\)\;" 41 | code = re.sub(pattern, "", code, flags=re.DOTALL) 42 | 43 | delca_row_idx = -1 44 | code_lines = code.split('\n') 45 | code_lines = [x for x in code_lines if 'printl' not in x] 46 | 47 | 48 | for idx, line in enumerate(code_lines): 49 | if 'fn' in line and item['entry_point'] in line: 50 | delca_row_idx = idx 51 | break 52 | 53 | 54 | if '{' in code_lines[delca_row_idx] and not item['prompt'].strip().endswith('{'): 55 | item['prompt'] += '{' 56 | # print(item['prompt']) 57 | 58 | full_code ='\n'.join(code_lines[:delca_row_idx])+'\n' + item['prompt']+'\n' + '\n'.join(code_lines[delca_row_idx+1:])+'\n' + item['test'] 59 | 60 | 61 | return full_code 62 | 63 | 64 | if __name__ == '__main__': 65 | items = [json.loads(x) for x in open('completions_Rust_humanevalsynthesize.jsonl').readlines() if x] 66 | for item in items: 67 | extract_rust_code(item['raw_generation'][0], item) 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /eval/extract/extract_scheme_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | # from humanevalpack import create_all_tasks, create_task 4 | # create_all_tasks() 5 | 6 | 7 | def extract_scheme_code(text, item) -> str: 8 | entry_point = item["entry_point"] 9 | code = text 10 | code_block = re.search( 11 | rf"```(?:[Ss]cheme)?.*?((#lang racket)?.*?\(define \(\s*{entry_point}.*?)```", text, flags=re.DOTALL) 12 | if code_block is None: 13 | code_block = re.search( 14 | rf"((#lang racket)?.*?\(define \(\s*{entry_point}.*?)(\n\n)", text, flags=re.DOTALL) 15 | if code_block is None: 16 | code_block = re.search( 17 | rf"```(?:[Ss]cheme)?(.*?)```", text, flags=re.DOTALL) 18 | if code_block is None: 19 | # print("error!!!!!!!!") 20 | code = text 21 | else: 22 | # print("right!!!!") 23 | code = code_block.group(1) 24 | 25 | if "#lang racket" not in code: 26 | code = "#lang racket\n(require rackunit)\n" + code 27 | 28 | eql = 0 29 | for ch in code: 30 | if ch == '(': 31 | eql+=1 32 | elif ch == ')': 33 | eql-=1 34 | code += '\n)'* eql 35 | 36 | return code + '\n\n' + item['test'] 37 | 38 | 39 | if __name__ == '__main__': 40 | items = [json.loads(x) for x in open( 41 | 'completions_Scheme_humanevalsynthesize.jsonl').readlines() if x] 42 | 43 | for item in items: 44 | extract_scheme_code(item['raw_generation'][0], item) 45 | -------------------------------------------------------------------------------- /eval/extract/extract_shell_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | # from humanevalpack import create_all_tasks, create_task 4 | # create_all_tasks() 5 | 6 | 7 | def extract_shell_code(text, item) -> str: 8 | entry_point = item["entry_point"] 9 | code = text 10 | code_block = re.search( 11 | rf"```(?:[Bb]ash)?.*?({entry_point}\s*\(\).*?)```", text, flags=re.DOTALL) 12 | if code_block is None: 13 | code_block = re.search( 14 | rf"({entry_point}\s*\(\).*)(\n\n[a-zA-Z]}})", text, flags=re.DOTALL) 15 | if code_block is None: 16 | code_block = re.search( 17 | rf"```(?:[Bb]ash)?(.*?)```", text, flags=re.DOTALL) 18 | if code_block is None: 19 | # print("error!!!!!!!!") 20 | code = text 21 | else: 22 | # print("right!!!!") 23 | code = code_block.group(1) 24 | 25 | 26 | if (code[:2] == "sh"): 27 | code = code[2:] 28 | code += '\n' 29 | # pattern = r"\s*check\s*\(\s*\)\s*\{.*\}" 30 | # code = re.sub(pattern, "", code, flags=re.DOTALL) 31 | 32 | 33 | return code + '\n\n' + item['test'] 34 | 35 | 36 | if __name__ == '__main__': 37 | items = [json.loads(x) for x in open( 38 | 'completions_Shell_humanevalsynthesize.jsonl').readlines() if x] 39 | 40 | for item in items: 41 | extract_shell_code(item['raw_generation'][0], item) 42 | -------------------------------------------------------------------------------- /eval/extract/extract_swift_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | 4 | 5 | 6 | def extract_swift_code(text, item) -> str: 7 | entry_point = item["entry_point"] 8 | code = text 9 | code_block = re.search( 10 | rf"```(?:[Ss]wift)?.*?((import.*?\n)*?func\s+{entry_point}.*?)```", text, flags=re.DOTALL) 11 | if code_block is None: 12 | code_block = re.search( 13 | rf"((import.*)?func\s+{entry_point}.*?)(\n\n[a-zA-Z])", text, flags=re.DOTALL) 14 | if code_block is None: 15 | code_block = re.search( 16 | rf"```(?:[Ss]wift)?(.*?)```", text, flags=re.DOTALL) 17 | if code_block is None: 18 | # print("error!!!!!!!!") 19 | code = text 20 | else: 21 | # print("right!!!!") 22 | code = code_block.group(1) 23 | 24 | # pattern = r"func\s+check\w*\s*\(.*?\)\s*\{.*\}" 25 | # code = re.sub(pattern, "", code, flags=re.DOTALL) 26 | 27 | # pattern = r"\s+check\w*\s*\(.*?\)" 28 | # code = re.sub(pattern, "", code, flags=re.DOTALL) 29 | 30 | return code + '\n\n'+item['test'] 31 | 32 | 33 | if __name__ == '__main__': 34 | items = [json.loads(x) for x in open( 35 | 'completions_Swift_humanevalsynthesize.jsonl').readlines() if x] 36 | 37 | for item in items: 38 | extract_swift_code(item['raw_generation'][0], item) 39 | -------------------------------------------------------------------------------- /eval/extract/extract_tcl_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | # from humanevalpack import create_all_tasks, create_task 4 | # create_all_tasks() 5 | 6 | 7 | def extract_tcl_code(text, item) -> str: 8 | entry_point = item["entry_point"] 9 | code = text 10 | code_block = re.search( 11 | rf"```(?:[Tt]cl)?.*?(proc\s+{entry_point}.*?)```", text, flags=re.DOTALL) 12 | if code_block is None: 13 | code_block = re.search( 14 | rf"(proc\s+{entry_point}.*}})", text, flags=re.DOTALL) 15 | if code_block is None: 16 | code_block = re.search( 17 | rf"```(?:[Tt]cl)?(.*?)```", text, flags=re.DOTALL) 18 | if code_block is None: 19 | code = text 20 | else: 21 | # print("right!!!!") 22 | code = code_block.group(1) 23 | 24 | pattern = r"\s*puts.*?\n" 25 | code = re.sub(pattern, "", code) 26 | 27 | 28 | return code + '\n\n' + item['test'] 29 | 30 | 31 | if __name__ == '__main__': 32 | items = [json.loads(x) for x in open( 33 | 'completions_Tcl_humanevalsynthesize.jsonl').readlines() if x] 34 | 35 | for item in items: 36 | print(extract_tcl_code(item['raw_generation'][0], item)) 37 | -------------------------------------------------------------------------------- /eval/extract/extract_typescript_code.py: -------------------------------------------------------------------------------- 1 | import os 2 | import re 3 | import json 4 | 5 | def extract_ts_code( 6 | text, 7 | item, 8 | ): 9 | signature_escaped = re.escape(item['signature']) 10 | code_block = re.search( 11 | rf"```(?:[Tt](?:ypescript|s))?.*?(const\s+{signature_escaped}.*?)```", 12 | text, 13 | flags=re.DOTALL, 14 | ) 15 | if code_block is None: 16 | code_block = re.search( 17 | rf"(const\s+{signature_escaped}.*)", text, flags=re.DOTALL 18 | ) 19 | if code_block is None: 20 | code_block = re.search( 21 | rf"```(?:[Tt](?:ypescript|s))?(.*?)\n```", text, flags=re.DOTALL 22 | ) 23 | if code_block is None: 24 | code = text 25 | else: 26 | code = code_block.group(1) 27 | if "```" in code: 28 | code = code.split("```")[0] 29 | 30 | console_log_regex = re.compile(r"console\.log\(.*?\);", re.DOTALL) 31 | 32 | pattern = r"\s*function\s+check\w*\(\s*\)\s*\{.*\}" 33 | code = re.sub(pattern, "", code, flags=re.DOTALL) 34 | pattern = r"\s*check\w*\(\s*\)\s*\;" 35 | code = re.sub(pattern, "", code, flags=re.DOTALL) 36 | 37 | # 使用正则表达式删除所有console.log语句 38 | code = console_log_regex.sub("", code) 39 | 40 | prompt = item["prompt"].split("\n") 41 | prompt = "\n".join(prompt[:-1]) 42 | if item["signature"] in prompt: 43 | prompt = prompt.replace(item["signature"], "") 44 | full_code = prompt + "\n" + code + "\n" + item["test"] 45 | 46 | return full_code 47 | 48 | 49 | if __name__ == "__main__": 50 | items = [ 51 | json.loads(x) 52 | for x in open( 53 | "eval/generations/gpt4/completions_TypeScript_humanevalsynthesize.jsonl" 54 | ).readlines() 55 | if x 56 | ] 57 | 58 | for item in [items[9]]: 59 | prt = extract_ts_code(item["raw_generation"][0], item) 60 | print('"' * 60) 61 | print(prt) 62 | # break 63 | -------------------------------------------------------------------------------- /eval/extract/extract_vb_code.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | # from humanevalpack import create_all_tasks, create_task 4 | # create_all_tasks() 5 | 6 | 7 | def extract_vb_code(text, item) -> str: 8 | entry_point = item["entry_point"] 9 | code = text 10 | code_block = re.search( 11 | rf"```(?:[Vv]b)?.*?(Function\s+{entry_point}.*?End Function).*?```", text, flags=re.DOTALL) 12 | if code_block is None: 13 | code_block = re.search( 14 | rf"(Function\s+{entry_point}.*?End Function)", text, flags=re.DOTALL) 15 | if code_block is None: 16 | code_block = re.search( 17 | rf"```(?:[Vv]b)?(.*?)```", text, flags=re.DOTALL) 18 | if code_block is None: 19 | # print("error!!!!!!!!") 20 | code = text 21 | else: 22 | # print("right!!!!") 23 | code = code_block.group(1) 24 | code = "Module Module1\n" + code 25 | import_block = re.search(rf"Imports(.*?)\n", text, flags=re.DOTALL) 26 | if import_block is not None: 27 | code = "Imports" + import_block.group(1) + "\n" + code 28 | # print(code) 29 | return code + '\n\n' + item["test"] 30 | 31 | 32 | if __name__ == '__main__': 33 | items = [json.loads(x) for x in open( 34 | 'completions_Visual Basic_humanevalsynthesize.jsonl').readlines() if x] 35 | 36 | for item in items: 37 | print(extract_vb_code(item['raw_generation'][0], item)) 38 | -------------------------------------------------------------------------------- /eval/extract/extract_vimscript_code.py: -------------------------------------------------------------------------------- 1 | import os 2 | import re 3 | import json 4 | 5 | 6 | def extract_vimscript_code(text, item): 7 | signature_escaped = re.escape(item["signature"]) 8 | entry_point = re.escape(item["entry_point"]) 9 | # 假设 Vimscript 代码块被 ```vim 包围 10 | code_block = re.search( 11 | rf"```vim(?:script)*(.*?)```", 12 | text, 13 | flags=re.DOTALL, 14 | ) 15 | if code_block is None: 16 | code_block = re.search( 17 | rf"```(.*?)```", 18 | text, 19 | flags=re.DOTALL, 20 | ) 21 | if code_block is None: 22 | code_block = re.search(rf"({signature_escaped}.*|function.*{entry_point}.*)", text, flags=re.DOTALL) 23 | if code_block is None: 24 | # 如果没有找到代码块,尝试匹配整个文本 25 | code = text 26 | else: 27 | # 如果找到了代码块,提取出代码部分 28 | code = code_block.group(1) 29 | 30 | print_regex = re.compile(r"print\(.*?\)?$", re.DOTALL) 31 | 32 | # 使用正则表达式删除所有print语句 33 | code = print_regex.sub("", code) 34 | 35 | # 提取提示(不包括签名行)和测试 36 | prompt = item["prompt"].split("\n") 37 | prompt = "\n".join(prompt[:-1]) 38 | if item["signature"] in prompt: 39 | prompt = prompt.replace(item["signature"], "") 40 | full_code = prompt + "\n" + code + "\n" + item["test"] 41 | 42 | return full_code 43 | 44 | 45 | if __name__ == "__main__": 46 | items = [ 47 | json.loads(x) 48 | for x in open( 49 | "eval/generations/gpt4/completions_VimScript_humanevalsynthesize.jsonl" 50 | ).readlines() 51 | if x 52 | ] 53 | 54 | for item in [items[9]]: 55 | prt = extract_vimscript_code(item["raw_generation"][0], item) 56 | print('"' * 60) 57 | print(prt) 58 | -------------------------------------------------------------------------------- /eval/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "typescript": "^5.3.3" 4 | }, 5 | "dependencies": { 6 | "big-integer": "^1.6.52", 7 | "lodash": "^4.17.21", 8 | "mathjs": "^12.4.1" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /eval/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | collection: 5 | dependency: "direct main" 6 | description: 7 | name: collection 8 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a 9 | url: "https://pub.dev" 10 | source: hosted 11 | version: "1.18.0" 12 | sdks: 13 | dart: ">=3.2.0 <4.0.0" 14 | -------------------------------------------------------------------------------- /eval/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: my_app 2 | environment: 3 | sdk: '^3.2.0' 4 | dependencies: 5 | collection: ^1.15.0 -------------------------------------------------------------------------------- /eval/safe_subprocess/.gitignore: -------------------------------------------------------------------------------- 1 | /__pycache__ 2 | /.pytest_cache -------------------------------------------------------------------------------- /eval/safe_subprocess/evil_programs/block_on_inputs.py: -------------------------------------------------------------------------------- 1 | while True: 2 | input() 3 | -------------------------------------------------------------------------------- /eval/safe_subprocess/evil_programs/close_outputs.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | print("This is the end") 4 | sys.stdout.close() 5 | sys.stderr.close() 6 | while True: 7 | pass 8 | -------------------------------------------------------------------------------- /eval/safe_subprocess/evil_programs/fork_bomb.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | while True: 4 | os.fork() 5 | -------------------------------------------------------------------------------- /eval/safe_subprocess/evil_programs/fork_once.py: -------------------------------------------------------------------------------- 1 | import os 2 | import time 3 | 4 | if os.fork() == 0: 5 | while True: 6 | time.sleep(60) 7 | -------------------------------------------------------------------------------- /eval/safe_subprocess/evil_programs/sleep_forever.py: -------------------------------------------------------------------------------- 1 | import time 2 | 3 | while True: 4 | time.sleep(60) 5 | -------------------------------------------------------------------------------- /eval/safe_subprocess/evil_programs/unbounded_output.py: -------------------------------------------------------------------------------- 1 | b = True 2 | while True: 3 | print(b) 4 | b = not b 5 | -------------------------------------------------------------------------------- /eval/scripts/eval_completion.sh: -------------------------------------------------------------------------------- 1 | python -u eval_all.py --result_path "" --save_path "" 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /eval/scripts/eval_completion_light.sh: -------------------------------------------------------------------------------- 1 | python -u eval_all.py --result_path "" --save_path "" 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /eval/scripts/eval_explain.sh: -------------------------------------------------------------------------------- 1 | python -u eval_all.py --result_path "" --save_path "" 2 | -------------------------------------------------------------------------------- /eval/scripts/eval_generation.sh: -------------------------------------------------------------------------------- 1 | python -u eval_all.py --result_path "" --save_path "" 2 | -------------------------------------------------------------------------------- /eval/valid_data.py: -------------------------------------------------------------------------------- 1 | from json2file import read_jsonl, json2file 2 | from excute import excute 3 | from excute import get_awk_ans 4 | import os 5 | import glob 6 | 7 | 8 | def valid_label(): 9 | data_path ='/workspace/MMCodeEval/data' 10 | beam_path = '/workspace/MMCodeEval/eval' 11 | tmp_path = '/workspace/MMCodeEval/tmp' 12 | langs = ['Haskell', 'CPP', 'HTML', 'rust', 'coffeescript', 'Racket', 'PowerShell', 'Swift', 'VimScript', 'groovy', 'TypeScript', 'SQL', 'Emacs Lisp', 'fortran', 'kotlin', 'Shell', 'JSON', 'Pascal', 'ruby', 'F#', 'R', 'Elixir', 'C#', 'Lua', 'dart', 'Visual Basic', 'JAVA', 'Tcl', 'Erlang', 'Common Lisp', 'scala', 'C', 'Markdown', 'Python', 'Perl', 'php', 'Scheme', 'AWK', 'JavaScript', 'Go', 'julia'] 13 | # langs = ['C#'] 14 | 15 | for lang in langs: 16 | file_path = os.path.join(data_path, lang+'.jsonl') 17 | data = read_jsonl(file_path) 18 | for line in data: 19 | if lang == 'AWK': # write ans to txt 20 | get_awk_ans(line) 21 | path,language_type,task_id=json2file(line) 22 | print(path) 23 | if not excute(language_type,path,task_id): 24 | print('ERROR') 25 | break 26 | 27 | if lang =='Erlang': 28 | files_to_delete = glob.glob(os.path.join(beam_path, '*' + "beam")) 29 | for file_path in files_to_delete: 30 | try: 31 | os.remove(file_path) 32 | except OSError as e: 33 | print(f"Error: {e.filename} - {e.strerror}.") 34 | 35 | 36 | if __name__ == '__main__': 37 | valid_label() 38 | 39 | 40 | -------------------------------------------------------------------------------- /explanation/explaination_data.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MCEVAL/McEval/09dec129dd5756447227239b3e5b47e543c2e0fd/explanation/explaination_data.zip -------------------------------------------------------------------------------- /inference/gen_stage2_instruction.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | 4 | template1 = '''Write a {lang} function `{signature}` to solve the following problem:\n{docstring}''' 5 | template_awk = '''Using the awk command in Linux, complete the following task:\n{docstring}''' 6 | template_html = '''Generate HTML code according to the following requirements:\n{docstring}''' 7 | template_json = '''Create a JSON object according to the following requirements:\n{docstring}''' 8 | template_md = '''Generate Markdown code according to the following requirements:\n{docstring}''' 9 | 10 | 11 | def gen_stage2_instruction(item): 12 | item['stage1_instruction'] = item['instruction'] 13 | item['stage1_raw_generation'] = item['raw_generation'] 14 | 15 | lang = item['task_id'].split('/')[0].strip() 16 | 17 | if lang.lower() == 'awk': 18 | item['instruction'] = template_awk.format(docstring=item['raw_generation'][0]) 19 | elif lang.lower()== 'html': 20 | item['instruction'] = template_html.format(docstring=item['raw_generation'][0]) 21 | elif lang.lower()== 'json': 22 | item['instruction'] = template_json.format(docstring=item['raw_generation'][0]) 23 | elif lang.lower()== 'markdown': 24 | item['instruction'] = template_md.format(docstring=item['raw_generation'][0]) 25 | else: 26 | item['instruction'] = template1.format(lang=lang, signature=item['signature'], docstring=item['raw_generation'][0]) 27 | 28 | del item['raw_generation'] 29 | 30 | if __name__ == '__main__': 31 | result_dir = './explain_stage1' 32 | output_dir = './explain_stage2' 33 | stage1_result_files = os.listdir(result_dir) 34 | 35 | for stage1_result_file in stage1_result_files: 36 | json_path = os.path.join(result_dir, stage1_result_file) 37 | if not os.path.exists(json_path): 38 | continue 39 | items = [json.loads(x) for x in open(json_path).readlines() if x] 40 | for item in items: 41 | gen_stage2_instruction(item) 42 | 43 | save_dir = os.path.join(output_dir, stage1_result_file.replace('.jsonl', '')) 44 | if not os.path.exists(save_dir): 45 | os.mkdir(save_dir) 46 | save_path = os.path.join(save_dir, stage1_result_file) 47 | with open(save_path, 'w') as f: 48 | for item in items: 49 | f.write(json.dumps(item, ensure_ascii=False)+'\n') 50 | 51 | -------------------------------------------------------------------------------- /inference/scripts/inference_torch.sh: -------------------------------------------------------------------------------- 1 | export MASTER_ADDR=localhost 2 | export MASTER_PORT=2131 3 | export CUDA_VISIBLE_DEVICES="0,1,2,3,4,5,6,7" 4 | 5 | COMPLETE_DATA_PATH='' 6 | 7 | 8 | 9 | MODEL_DIR='' 10 | OUT_DIR='' 11 | torchrun --nproc_per_node 8 --master_port 7834 inference_torch.py \ 12 | --base_model $MODEL_DIR \ 13 | --data_path $COMPLETE_DATA_PATH \ 14 | --out_path $OUT_DIR \ 15 | --maxlen_out 1024 \ 16 | --batch_size 4 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /inference/scripts/run_completion_vllm.sh: -------------------------------------------------------------------------------- 1 | 2 | MODEL_DIR='' 3 | 4 | COMPLETE_DATA_PATH='./completion/merge' 5 | python inference_vllm.py \ 6 | --data_path $COMPLETE_DATA_PATH \ 7 | --base_model $MODEL_DIR \ 8 | --task 'completion' \ 9 | --outdir 'completion_result' 10 | 11 | 12 | COMPLETE_DATA_PATH='./completion/light' 13 | python inference_vllm.py \ 14 | --data_path $COMPLETE_DATA_PATH \ 15 | --base_model $MODEL_DIR \ 16 | --task 'completion_light' \ 17 | --outdir 'completion_result' -------------------------------------------------------------------------------- /inference/scripts/run_explaination_vllm.sh: -------------------------------------------------------------------------------- 1 | 2 | MODEL_DIR='' 3 | 4 | COMPLETE_DATA_PATH='./explain_data' 5 | python inference_vllm.py \ 6 | --data_path $COMPLETE_DATA_PATH \ 7 | --base_model $MODEL_DIR \ 8 | --task 'explain_stage1' \ 9 | --outdir 'explain_stage1' 10 | 11 | python gen_stage2_instruction.py 12 | 13 | COMPLETE_DATA_PATH='./explain_stage2/explain_stage1' 14 | python inference_vllm.py \ 15 | --data_path $COMPLETE_DATA_PATH \ 16 | --base_model $MODEL_DIR \ 17 | --task 'explain_stage2' \ 18 | --outdir 'explain_result' 19 | -------------------------------------------------------------------------------- /inference/scripts/run_generation_vllm.sh: -------------------------------------------------------------------------------- 1 | 2 | COMPLETE_DATA_PATH='' 3 | 4 | MODEL_DIR='' 5 | 6 | python inference_vllm.py \ 7 | --data_path $COMPLETE_DATA_PATH \ 8 | --base_model $MODEL_DIR \ 9 | --task 'generation' -------------------------------------------------------------------------------- /inference/split_result.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | from collections import defaultdict 4 | 5 | import argparse 6 | 7 | if __name__ == '__main__': 8 | parser = argparse.ArgumentParser(description='Parameters') 9 | parser.add_argument("--split_file", default="", type=str, help="inference results to be splitted") 10 | parser.add_argument("--save_dir", default="", type=str, help="The folder where the split results are saved") 11 | args = parser.parse_args() 12 | # load_dir = './' 13 | save_dir = args.save_dir 14 | path = args.split_file 15 | filename = os.path.basename(path) 16 | 17 | lang_item_dict = defaultdict(list) 18 | items = [] 19 | 20 | items+=[json.loads(x) for x in open(path).readlines() if len(x) > 0] 21 | 22 | for item in items: 23 | task_id = item['task_id'] 24 | lang = task_id.split('/')[0].strip() 25 | # if 'base' in filename and lang not in ['JSON', 'AWK', 'HTML', 'Markdown']: 26 | # if item["signature"] not in item["raw_generation"][0]: 27 | # item["raw_generation"][0] = item['prompt'] + item["raw_generation"][0] 28 | lang_item_dict[lang].append(item) 29 | for lang, lang_items in lang_item_dict.items(): 30 | # lang_items.sort(key=lambda x: int(x['task_id'].split('/')[1])) 31 | if not os.path.exists(os.path.join(save_dir, filename.replace('.jsonl', ''))): 32 | os.mkdir(os.path.join(save_dir, filename.replace('.jsonl', ''))) 33 | save_file = os.path.join(save_dir, filename.replace('.jsonl', ''), lang+'.jsonl') 34 | 35 | with open(save_file, 'w') as f: 36 | for item in lang_items: 37 | f.write(json.dumps(item, ensure_ascii=False) + '\n') 38 | 39 | -------------------------------------------------------------------------------- /inference/utils.py: -------------------------------------------------------------------------------- 1 | import dataclasses 2 | import logging 3 | import math 4 | import os 5 | import io 6 | import sys 7 | import time 8 | import json 9 | from typing import Optional, Sequence, Union 10 | import tqdm 11 | import copy 12 | 13 | 14 | def _make_w_io_base(f, mode: str): 15 | if not isinstance(f, io.IOBase): 16 | f_dirname = os.path.dirname(f) 17 | if f_dirname != "": 18 | os.makedirs(f_dirname, exist_ok=True) 19 | f = open(f, mode=mode) 20 | return f 21 | 22 | 23 | def _make_r_io_base(f, mode: str): 24 | if not isinstance(f, io.IOBase): 25 | f = open(f, mode=mode) 26 | return f 27 | 28 | 29 | def jdump(obj, f, mode="w", indent=4, default=str): 30 | """Dump a str or dictionary to a file in json format. 31 | 32 | Args: 33 | obj: An object to be written. 34 | f: A string path to the location on disk. 35 | mode: Mode for opening the file. 36 | indent: Indent for storing json dictionaries. 37 | default: A function to handle non-serializable entries; defaults to `str`. 38 | """ 39 | f = _make_w_io_base(f, mode) 40 | if isinstance(obj, (dict, list)): 41 | json.dump(obj, f, indent=indent, default=default) 42 | elif isinstance(obj, str): 43 | f.write(obj) 44 | else: 45 | raise ValueError(f"Unexpected type: {type(obj)}") 46 | f.close() 47 | 48 | 49 | def jload(f, mode="r"): 50 | """Load a .json file into a dictionary.""" 51 | f = _make_r_io_base(f, mode) 52 | 53 | jdict = [] 54 | for item in f.readlines(): 55 | jdict.append(json.loads(item.strip())) 56 | f.close() 57 | return jdict 58 | --------------------------------------------------------------------------------