Recommended to have oh-my-zsh and python3 installed. Clone this repository in your home directory. The bootstrap script will pull in the latest version and copy the files into your home directory.
cd ~ && git clone "https://github.com/SRI-PRIYAN/dotfiles.git" && cd dotfiles/Mac && source bootstrap.sh
-
If you are taking part in a codeforces contest, then you might not want to waste your time in creating template code, input and output files.
To automate that process, I've written the
codeforces
function which makes use of thewebscraper.py
and gets the job done.The
webscraper.py
uses the BeautifulSoup library, parses the html page, gets the number of problems and creates folders for each problem with the template code, sample input and output files.All you have to do is,
codeforces <contest_id>
-
Now that we've automated the process of creating the sample input and output files, we can even automate the process of testing the code against those files. The
grade
function precisely does that.It takes in the source code (cpp or c file) as argument.
grade source_file.cpp
-
Fuzzy Find and
cd
into any previously visited directory conviniently.Utilizes
zoxide
which keeps track of already visited directories andfzf
which is used for Fuzzy Finding.