diff --git a/.gitattributes b/.gitattributes index bed0738c7eeb449bca98b5d2f33c89a1ee56349a..3f9a00abba64fb320f86cdf4de2afe2d41d04c6a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -58,3 +58,8 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text # Video files - compressed *.mp4 filter=lfs diff=lfs merge=lfs -text *.webm filter=lfs diff=lfs merge=lfs -text +assets/Project_CodeNet_statistics.xlsx filter=lfs diff=lfs merge=lfs -text +model-experiments/token-based-similarity-classification/CodeMLtranslationDataset.pdf filter=lfs diff=lfs merge=lfs -text +model-experiments/token-based-similarity-classification/LargeDataCodeClassifier.pdf filter=lfs diff=lfs merge=lfs -text +model-experiments/token-based-similarity-classification/LargeDataCodeSimilarity.pdf filter=lfs diff=lfs merge=lfs -text +tools/json-graph/graph-json.pdf filter=lfs diff=lfs merge=lfs -text diff --git a/Container/Dockerfile b/Container/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..8297562cfe87ef821c09c2b5e8cc9a54400674eb --- /dev/null +++ b/Container/Dockerfile @@ -0,0 +1,21 @@ +FROM centos:centos8 + +RUN yum -y update; yum clean all +RUN yum -y install net-tools iproute unzip git +RUN yum -y install openssh-server openssh-clients + +RUN ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa +RUN ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t ed25519 +RUN ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t ecdsa + +RUN yum -y install wget tar maven gcc-c++ +RUN yum -y install java-1.8.0-openjdk + + +RUN mkdir -p /root/.ssh +COPY ./authorized_keys /root/.ssh/ + +COPY ./start_container.sh /root/ + +EXPOSE 22 +ENTRYPOINT ["/root/start_container.sh"] diff --git a/Container/README.md b/Container/README.md new file mode 100644 index 0000000000000000000000000000000000000000..dba08ba6a650767fb8713cc2b711593d9bf44166 --- /dev/null +++ b/Container/README.md @@ -0,0 +1,26 @@ +Creating container that provides a 'VM' in which to experiment with the tools. + +1. Place a public keys for ssh into file 'authorized_keys' in the 'Container' directory + +2. docker build -t centos8_plain:v1 . + +3. docker run --init -d centos8_plain:v1 . + +4. docker ps -a + docker logs + + The log contains the network config of the container, + from which the ip address can be extracted. + + An alternative is to 'inspect' the container. + +5. ssh root@ + + If the host from which the ssh is initiated has proper access to + the docker network and the private key matching one of the + public keys deposited into the container, this allows + access similar to a real system/VM. + If the container has internet access, 'yum install ...' and + 'git clone ...' inside the container work as well to + expand functionality. + \ No newline at end of file diff --git a/Container/start_container.sh b/Container/start_container.sh new file mode 100644 index 0000000000000000000000000000000000000000..6d4ca950454754a2efa127feb27347b85bd86494 --- /dev/null +++ b/Container/start_container.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +echo "Starting container" + +ifconfig + +/usr/sbin/sshd -D + diff --git a/Contest/ExampleSimAnalysis/README.md b/Contest/ExampleSimAnalysis/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2138e4870db71fb12c5f8378e41761ba21576f33 --- /dev/null +++ b/Contest/ExampleSimAnalysis/README.md @@ -0,0 +1,89 @@ +# Example of contest test set evaluation + +Author: [Vladimir Zolotov](mailto:zolotov@us.ibm.com) + + +This directory holds an example of program `TestSetEval.py` and `scrip test_eval.sh` for evaluating a contest test set on source code similarity. + +The program is given only as an example. It is expected that the contestants write their own test set evaluation program better suitable for their operational environment, file formats and ML framework. + +The program `TestSetEval.py` accepts a test set consisting of two components: + +1. Directory with source code files of C++ programs to detect similarity or dissimilarity with each other. +2. csv file of a test set in the following format: + +`,,` + +where `path to 1-st file` and `path to 2-nd file` specify paths to the pair of files to detect similarity or dissimilarity. The paths are specified relative to the directory with source code files. Here is an example of the csv file of the test set: + +``` +pair-id,file1,file2 +1,p02761/s682789980.cpp,p02761/s060579067.cpp +2,p02817/s224840938.cpp,p03360/s804824036.cpp +3,p01085/s591760635.cpp,p01085/s734466918.cpp +``` + +The program `TestSetEval.py` can also accept a csv file of ground truth labels in the following format: +`,