{"repo": "ownRepo", "path": "cppExample.cpp", "func_name": "#include", "original_string": "#include", "code_tokens": ["#include"], "docstring_tokens": [], "sha": "random_sha", "url": "noURL", "partition": "validation"} {"repo": "ownRepo", "path": "cppExample.cpp", "func_name": "main()", "original_string": "int main(){\n stack st;\n st.push(2);\n st.push(4);\n st.push(5);\n st.push(6);\n st.push(3);\n st.push(4);\n //for(auto elem:st) cout << elem << endl;\n int count = st.size();\n for (size_t i = 0; i < count; i++)\n {\n cout << st.top() << endl;\n st.pop();\n }\n\n\n\n vector v1 {5,4,3,21,5,6,8};\n cout << \"v1 unsorted: \" << endl;\n for(auto elem:v1) cout << elem << \" \";\n cout << endl;\n\n sort(v1.begin(), v1.end(), [&](int a, int b){return a > b;});\n cout << \"v1 sorted: \" << endl;\n for(auto elem:v1) cout << elem << \" \";\n cout << endl;\n\n vector v2;\n copy_if(v1.begin(), v1.end(), back_inserter(v2), [&](int a) {return a!=5;});\n cout << \"v2\" << endl;\n for(auto elem:v2) cout << elem << \" \";\n cout << endl;\n\n vector v3;\n copy(v2.begin(), v2.end(), back_inserter(v3));\n reverse(v3.begin(), v3.end());\n cout << \"v3\" << endl;\n for(auto elem:v3) cout << elem << \" \";\n cout << endl;\n\n \n}", "code_tokens": ["int", "main", "(", ")", "{", "stack", "<", "int", ">", "st", ";", "st", ".", "push", "(", "2", ")", ";", "st", ".", "push", "(", "4", ")", ";", "st", ".", "push", "(", "5", ")", ";", "st", ".", "push", "(", "6", ")", ";", "st", ".", "push", "(", "3", ")", ";", "st", ".", "push", "(", "4", ")", ";", "//", "for", "(", "auto", "elem", ":", "st", ")", "cout", "<<", "elem", "<<", "endl", ";", "int", "count", "=", "st", ".", "size", "(", ")", ";", "for", "(", "size_t", "i", "=", "0", ";", "i", "<", "count", ";", "i", "++", ")", "{", "cout", "<<", "st", ".", "top", "(", ")", "<<", "endl", ";", "st", ".", "pop", "(", ")", ";", "}", "vector", "<", "int", ">", "v1", "{", "5", ",", "4", ",", "3", ",", "21", ",", "5", ",", "6", ",", "8", "}", ";", "cout", "<<", "\"v1", "unsorted:", "\"", "<<", "endl", ";", "for", "(", "auto", "elem", ":", "v1", ")", "cout", "<<", "elem", "<<", "\"", " ", "\"", ";", "cout", "<<", "endl", ";", "sort", "(", "v1", ".", "begin", "(", ")", ",", "v1", ".", "end", "(", ")", ",", "&", "]", "(", "int", "a", ",", "int", "b", ")", "{", "return", "a", ">", "b", ";", "}", ")", ";", "cout", "<<", "\"v1", "sorted:", "\"", "<<", "endl", ";", "for", "(", "auto", "elem", ":", "v1", ")", "cout", "<<", "elem", "<<", "\"", " ", "\"", ";", "cout", "<<", "endl", ";", "vector", "<", "int", ">", "v2", ";", "copy_if", "(", "v1", ".", "begin", "(", ")", ",", "v1", ".", "end", "(", ")", ",", "back_inserter", "(", "v2", ")", ",", "&", "]", "(", "int", "a", ")", "{", "return", "a", "!=", "5", ";", "}", ")", ";", "cout", "<<", "\"v2\"", "<<", "endl", ";", "for", "(", "auto", "elem", ":", "v2", ")", "cout", "<<", "elem", "<<", "\"", " ", "\"", ";", "cout", "<<", "endl", ";", "vector", "<", "int", ">", "v3", ";", "copy", "(", "v2", ".", "begin", "(", ")", ",", "v2", ".", "end", "(", ")", ",", "back_inserter", "(", "v3", ")", ")", ";", "reverse", "(", "v3", ".", "begin", "(", ")", ",", "v3", ".", "end", "(", ")", ")", ";", "cout", "<<", "\"v3\"", "<<", "endl", ";", "for", "(", "auto", "elem", ":", "v3", ")", "cout", "<<", "elem", "<<", "\"", " ", "\"", ";", "cout", "<<", "endl", ";", "}"], "docstring_tokens": [], "sha": "random_sha", "url": "noURL", "partition": "validation"}