<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: jainal gosaliya</title>
    <description>The latest articles on DEV Community by jainal gosaliya (@jainal09).</description>
    <link>https://dev.to/jainal09</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F171937%2F9918c02a-1172-4608-b98d-390da30def65.jpeg</url>
      <title>DEV Community: jainal gosaliya</title>
      <link>https://dev.to/jainal09</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jainal09"/>
    <language>en</language>
    <item>
      <title>How I made a GitHub action to host coding competition on GitHub!</title>
      <dc:creator>jainal gosaliya</dc:creator>
      <pubDate>Thu, 16 Apr 2020 09:09:42 +0000</pubDate>
      <link>https://dev.to/jainal09/how-i-made-a-github-action-to-host-coding-competition-on-github-5bnf</link>
      <guid>https://dev.to/jainal09/how-i-made-a-github-action-to-host-coding-competition-on-github-5bnf</guid>
      <description>&lt;p&gt;
   &lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2gc7ug6tbaq713at11ng.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2gc7ug6tbaq713at11ng.png" alt="Strivio Logo"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h1&gt;
  
  
  Strivio
&lt;/h1&gt;

&lt;p&gt;Strivio is a GitHub action that allows anyone to host competitive coding event directly on GitHub Repository like hackerrank, leetcode, etc. It is fun to use and quite simple. It also has the support of many programming languages such as &lt;code&gt;c&lt;/code&gt; , &lt;code&gt;c++&lt;/code&gt;, &lt;code&gt;java&lt;/code&gt; and &lt;code&gt;python&lt;/code&gt;&lt;br&gt;
You can check &lt;strong&gt;Strivio&lt;/strong&gt; here on the GitHub marketplace.&lt;br&gt;
&lt;a href="https://github.com/marketplace/actions/strivio" rel="noopener noreferrer"&gt;https://github.com/marketplace/actions/strivio&lt;/a&gt;&lt;br&gt;
Strivio is also OpenSourced on GitHub and here are the links for the action and the source code of the action.&lt;br&gt;
&lt;code&gt;Action Repo&lt;/code&gt; - &lt;a href="https://github.com/jainal09/strivio" rel="noopener noreferrer"&gt;https://github.com/jainal09/strivio&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Source Code&lt;/code&gt;- &lt;a href="https://github.com/jainal09/strivio-docker" rel="noopener noreferrer"&gt;https://github.com/jainal09/strivio-docker&lt;/a&gt;&lt;br&gt;
Also, check out the &lt;code&gt;docker image on docker hub&lt;/code&gt;- &lt;a href="https://hub.docker.com/r/jainal09/strivio" rel="noopener noreferrer"&gt;https://hub.docker.com/r/jainal09/strivio&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Ever wondered that is it possible to host a competitive coding event on GitHub?&lt;br&gt;
Well, it should be possible given the fact that GitHub provides CI / CD built-in through &lt;strong&gt;GitHub Action&lt;/strong&gt;.&lt;br&gt;
So, I decided wouldn't it be cool if I make a GitHub action that simply tests code by passing given sets of Inputs and checking it against given sets of outputs. Sounds simple right? Well, it's a kind of little complex! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/dWy2WwcB3wvX8QA1Iu/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/dWy2WwcB3wvX8QA1Iu/giphy.gif" alt="enter image description here"&gt;&lt;/a&gt;&lt;br&gt;
You see, there are a few &lt;strong&gt;challenges&lt;/strong&gt; I need to solve.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input and output test cases should be hidden somewhere and the participants of the events cannot see it.&lt;/li&gt;
&lt;li&gt;Multiple Programming Language Support&lt;/li&gt;
&lt;li&gt;And a system that should enable organizers to use the action without modifying the code.&lt;/li&gt;
&lt;li&gt;One GitHub action that can be used simultaneously many people around the world.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;So, this is how it all went.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/xT9Igz4cFb1K91fTI4/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/xT9Igz4cFb1K91fTI4/giphy.gif" alt="enter image description here"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Idea Construction
&lt;/h2&gt;

&lt;p&gt;So basically I created a rough idea of implementation like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;my-python-script&lt;/code&gt; ------&amp;gt; &lt;code&gt;user-code&lt;/code&gt; ------&amp;gt; &lt;code&gt;compile and run&lt;/code&gt; ------&amp;gt; &lt;code&gt;result&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So, here first my python script identifies users' programming language. Then it compiles and runs the user's program by passing necessary inputs and storing outputs.&lt;br&gt;
It then matches the outputs of the program with the output of the test cases. If all outputs are passed than tick&lt;br&gt;
☑️ and if not than ✖️.&lt;/p&gt;
&lt;h2&gt;
  
  
  Solving Challenges
&lt;/h2&gt;

&lt;p&gt;So, I thought if there is a way that input test cases &lt;strong&gt;magically appeared&lt;/strong&gt; at run time and disappeared after that should solve my issue.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3o7TKP9ln2Dr6ze6f6/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3o7TKP9ln2Dr6ze6f6/giphy.gif" alt="enter image description here"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hence, I used an amazing bash script known as the DropBox uploader.&lt;br&gt;
&lt;a href="https://github.com/andreafabrizi/Dropbox-Uploader" rel="noopener noreferrer"&gt;https://github.com/andreafabrizi/Dropbox-Uploader&lt;/a&gt;&lt;br&gt;
What it does is it allows anyone to download and upload files from their DropBox account from the terminal!&lt;br&gt;
Sounds cool right. It also has many more cool features and I recommend you to have a look at this repository.&lt;br&gt;
So, now organizers will simply upload input and output test cases on their DropBox drive and during the run time my script will download the input and output test cases through a unique token(dropbox API key) preventing visibility to the participants.&lt;br&gt;
This solved my 2 challenges.&lt;/p&gt;

&lt;p&gt;&lt;del&gt;Input and output test cases should be hidden somewhere and the participants of the events cannot see it.&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;&lt;del&gt;And a system that should enable organizers to use the action without modifying the code.&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;Still, 2 challenges needed to solve.&lt;br&gt;
For multiple language support, I decided to stick it to simple and restrict the top 4 most popular competetive coding programming languages i.e python, java, cpp, and c.&lt;br&gt;
&lt;a href="https://i.giphy.com/media/3OvvA11fPUvfYRFjxS/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3OvvA11fPUvfYRFjxS/giphy.gif" alt="enter image description here"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The support to the programming languages can be solved by using docker with all the dependencies and compilers installed into a docker container.&lt;/p&gt;

&lt;p&gt;&lt;del&gt;Multiple Programming Language Support&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.mememaker.net%2Fapi%2Fbucket%3Fpath%3Dstatic%2Fimg%2Fmemes%2Ffull%2F2017%2FJan%2F30%2F23%2Fdocker-docker-everywhere.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.mememaker.net%2Fapi%2Fbucket%3Fpath%3Dstatic%2Fimg%2Fmemes%2Ffull%2F2017%2FJan%2F30%2F23%2Fdocker-docker-everywhere.jpg" alt="enter image description here"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the last issue, allowing simultaneous use of action was solved by putting the DropBox API key as a GitHub secret and hence not hardcoding it in the code and hence anyone can use the action!&lt;/p&gt;

&lt;p&gt;&lt;del&gt;One GitHub action that can be used simultaneously many people around the world.&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;And that's how I solved all my challenges and issues.&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://i.giphy.com/media/IelxugxenjdyU/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/IelxugxenjdyU/giphy.gif" alt="enter image description here"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Creating the action
&lt;/h2&gt;

&lt;p&gt;So far the idea was clear to me and the challenges were so far sorted out.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Now it was coding time!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://i.giphy.com/media/LmNwrBhejkK9EFP504/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/LmNwrBhejkK9EFP504/giphy.gif" alt="enter image description here"&gt;&lt;/a&gt;&lt;br&gt;
As mentioned earlier I needed a python script which I will compile the code for me and a docker container.&lt;br&gt;
Here Is the basic code segment from my Code : &lt;a href="https://github.com/jainal09/strivio-docker/blob/master/Evaluate.py" rel="noopener noreferrer"&gt;https://github.com/jainal09/strivio-docker/blob/master/Evaluate.py&lt;/a&gt;&lt;br&gt;
Organizers will upload a I/O test cases and then I will download it and create into python arrays &lt;code&gt;inputs&lt;/code&gt; and &lt;code&gt;outputs&lt;/code&gt;. Then I will iterate them and compile and pass inputs and compare outputs. Check out the below code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;inp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;outp&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;zip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;inputs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;outputs&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;temp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pipe&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
     &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;temp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;bytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;inp&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;utf-8&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
     &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;temp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
     &lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;subprocess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;check_output&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
         &lt;span class="p"&gt;[&lt;/span&gt;
             &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;python3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abspath&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;program.py&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
          &lt;span class="p"&gt;)&lt;/span&gt;
         &lt;span class="p"&gt;],&lt;/span&gt;
         &lt;span class="n"&gt;stdin&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;
     &lt;span class="p"&gt;)&lt;/span&gt;
     &lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;utf-8&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
     &lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sub&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;\s+&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
     &lt;span class="n"&gt;outp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sub&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;\s+&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;outp&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;                        
     &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;outp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
         &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Test Case &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;case&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: Passed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
         &lt;span class="n"&gt;case&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;case&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
     &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
         &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
             &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Test Case &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;case&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: Failed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
         &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Done its as simple as that! You can check out the whole code base and other cool stuff which I did here&lt;br&gt;
&lt;a href="https://github.com/jainal09/strivio-docker" rel="noopener noreferrer"&gt;https://github.com/jainal09/strivio-docker&lt;/a&gt;&lt;br&gt;
I am not explaining here each and every segment of it as it kind of makes sense right!&lt;/p&gt;

&lt;h2&gt;
  
  
  Okay Now How do I use it?
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Organizers
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Head to &lt;a href="https://www.dropbox.com" rel="noopener noreferrer"&gt;DropBox&lt;/a&gt; Sign In/ Create account and then click on this link
&lt;a href="https://www.dropbox.com/developers/apps?_tk=pilot_lp&amp;amp;_ad=topbar4&amp;amp;_camp=myapps" rel="noopener noreferrer"&gt;DropBox Developer Page&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Alternate Link: &lt;a href="https://www.dropbox.com/developers/documentation" rel="noopener noreferrer"&gt;https://www.dropbox.com/developers/documentation&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on App Console&lt;/li&gt;
&lt;li&gt;Click on Create App&lt;/li&gt;
&lt;li&gt;Click Full Dropbox&lt;/li&gt;
&lt;li&gt;Give any name to the app and Click create app

&lt;ol&gt;
&lt;li&gt;After you Create your Dropbox App click on Generate Access token and Copy it.&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmiro.medium.com%2Fmax%2F938%2F1%2AvLvuPuX5n-klKMConAXQug.png" alt="enter image description here"&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This token is to be shared with participants. This works as a login access key for the competition.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a File Known as 🗃️ "IO.yaml" for all the Input / Output Test Cases&lt;/li&gt;
&lt;li&gt;The File should Look like this
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;inputs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
  &lt;span class="na"&gt;input1&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
    &lt;span class="s"&gt;1&lt;/span&gt;  
  &lt;span class="na"&gt;input2&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
    &lt;span class="s"&gt;2&lt;/span&gt;  
  &lt;span class="na"&gt;input3&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
    &lt;span class="s"&gt;3&lt;/span&gt;  
  &lt;span class="na"&gt;input4&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
    &lt;span class="s"&gt;4&lt;/span&gt;  
  &lt;span class="na"&gt;input5&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
    &lt;span class="s"&gt;5&lt;/span&gt;  
&lt;span class="na"&gt;outputs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
  &lt;span class="na"&gt;output1&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
    &lt;span class="s"&gt;2&lt;/span&gt;  
  &lt;span class="na"&gt;output2&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
    &lt;span class="s"&gt;3&lt;/span&gt;  
  &lt;span class="na"&gt;output3&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
    &lt;span class="s"&gt;4&lt;/span&gt;  
  &lt;span class="na"&gt;output4&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
    &lt;span class="s"&gt;5&lt;/span&gt;  
  &lt;span class="na"&gt;output5&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;  
    &lt;span class="s"&gt;6&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Head to DropBox, Upload this &lt;code&gt;IO.yaml&lt;/code&gt; to the &lt;strong&gt;Root Directory&lt;/strong&gt; (not into any folder just upload it outside on dropbox) of Drop Box and done 😃!&lt;/li&gt;
&lt;li&gt;Send the OATH token to participants.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Participants
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;In GitHub Repo open Settings/Secrets and click on add a Secret&lt;/li&gt;
&lt;li&gt;The name of the secret should be &lt;strong&gt;OATH&lt;/strong&gt; and value should be the access token which the organizer gave you!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffjhhwey31m9qsi39c8ju.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffjhhwey31m9qsi39c8ju.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This should look like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb3tplygs39q56ciy1ozi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb3tplygs39q56ciy1ozi.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Now its time to start coding!  Clone your repo and start working on the problem.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Supported Programming Languages &lt;code&gt;python, java, c++, c&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a file program.&lt;strong&gt;&lt;em&gt;extension&lt;/em&gt;&lt;/strong&gt; - supported extension&lt;code&gt;.c .cpp .java .py&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;NOTE: for &lt;strong&gt;java&lt;/strong&gt; Class name should be &lt;code&gt;Main&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;After Coding is done create a file in repo 🗃️ &lt;strong&gt;"lang.yaml"&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the below code.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;language&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="s"&gt;python3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Replace the name of Programming Language in the above code as follows.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;python - write python3&lt;/code&gt;&lt;br&gt;
&lt;code&gt;java - write java&lt;/code&gt;&lt;br&gt;
&lt;code&gt;c++ - write cpp&lt;/code&gt;&lt;br&gt;
&lt;code&gt;c - write c&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;No language other than above are supported!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Commit the code and push&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Head to GitHub and select Actions&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fx3s8uu0sxnlxfhvyhuhi.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fx3s8uu0sxnlxfhvyhuhi.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on Set up a workflow yourself&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fw0ymzgtv3wn3xnorj0lj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fw0ymzgtv3wn3xnorj0lj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Delete everything and paste the below code
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Evaluation&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;master&lt;/span&gt; &lt;span class="pi"&gt;]&lt;/span&gt;
  &lt;span class="na"&gt;pull_request&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;master&lt;/span&gt; &lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v2&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Results&lt;/span&gt;
      &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;jainal09/strivio@Production&lt;/span&gt;
      &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;oath&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.oath }}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Click on &lt;code&gt;start-commit&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on actions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffqm1eokv52cv37s5xzz8.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffqm1eokv52cv37s5xzz8.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on your last commit, click &lt;strong&gt;build&lt;/strong&gt;, wait for the &lt;strong&gt;Build jainal09/strivio@Production&lt;/strong&gt; to turn green ✔️ and after that  click on Results 🤞&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2k37lu7s64j9eod6hbmx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2k37lu7s64j9eod6hbmx.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check if your code passed all the Test Case ✔️ or ❌&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fo7tj0l4f6cetpvqk56mj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fo7tj0l4f6cetpvqk56mj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;☝️Successful Build with all Test Case Passed🤘.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1l03i2nn4ddseveuvray.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1l03i2nn4ddseveuvray.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;☝️Build Failed as Code Didn't Pass all the Test Cases😬.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Sample Test Repo - &lt;a href="https://github.com/jainal09/strivio-in-action" rel="noopener noreferrer"&gt;https://github.com/jainal09/strivio-in-action&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Done! that's how you can host a coding competition on GitHub like Hackerrank etc&lt;/strong&gt; &lt;br&gt;
&lt;a href="https://i.giphy.com/media/l2JdVptfnCwNTiBvG/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/l2JdVptfnCwNTiBvG/giphy.gif" alt="enter image description here"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the tech used here?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GitHub (obviously!)&lt;/li&gt;
&lt;li&gt;GitHub actions&lt;/li&gt;
&lt;li&gt;Python &lt;/li&gt;
&lt;li&gt;Pyaml to parse the yaml files&lt;/li&gt;
&lt;li&gt;Dropbox-Uploader&lt;/li&gt;
&lt;li&gt;Docker&lt;/li&gt;
&lt;li&gt;Docker Hub for Continuous Deployment with my GitHub repo.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Limitation and Future Scopes
&lt;/h2&gt;

&lt;p&gt;As we all know there is nothing perfect in this world.&lt;br&gt;
So does Strivio! As the idea is just a proof of concept and not a competitor to the online coding platforms.&lt;br&gt;
&lt;a href="https://i.giphy.com/media/LOcPt9gfuNOSI/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/LOcPt9gfuNOSI/giphy.gif" alt="enter image description here"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The following are the Limitations of the project:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Currently, only 1 question per repo is supported and I am working for more project support.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I believe that input and output test cases format should be improved and also separated into 2 different &lt;strong&gt;txt&lt;/strong&gt; files rather than yaml.&lt;/li&gt;
&lt;li&gt;Timing and space constraint features are not present.&lt;/li&gt;
&lt;li&gt;Testing against complex I/O test cases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The following are the Future Scopes of the project:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Add support for time and space constraints.&lt;/li&gt;
&lt;li&gt;[ ] Change Input output formats.&lt;/li&gt;
&lt;li&gt;[ ] And offcourse solve any created issues. &lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>github</category>
      <category>python</category>
      <category>docker</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
