Skip to content

Instantly share code, notes, and snippets.

View sharmaeklavya2's full-sized avatar
Not coding actively anymore. Doing math instead.

Eklavya Sharma sharmaeklavya2

Not coding actively anymore. Doing math instead.
View GitHub Profile
sharmaeklavya2 /
Last active September 8, 2018 19:22
GSoC16 Output
sharmaeklavya2 /
Last active April 26, 2020 13:21
Rockets using threading
#!/usr/bin/env python
Press keys A and D to move rocket 1
Press keys H and K to move rocket 2
Press Ctrl+C to exit
from __future__ import print_function
sharmaeklavya2 /
Last active April 1, 2017 16:05
Anti-Coding 2015 Problems - Round 1


What will be the output?

#include <stdio.h>
int main(){
    int c=5;
    return 0;


sharmaeklavya2 /
Created January 24, 2016 10:00
Export all tables in a postgres database to a set of CSV files
#if [ "$1" = '--help' ]; then
if [[ ( "$1" == '--help' ) || ( "$1" == '-h' ) ]]; then
echo "usage: $0 [DB_NAME] [DBMS_SHELL]"
echo "default DB_NAME is your username"
echo "default DBMS_SHELL is 'psql'"
sharmaeklavya2 /
Last active July 23, 2017 11:11
Script to make timetable in HTML using a list of sections
#/usr/bin/env python
'Generate Time Table'
from __future__ import print_function
import sys
import argparse
from collections import defaultdict
# Time when classes start
sharmaeklavya2 / apache_conf.conf
Last active January 24, 2016 10:04
Deploying a django project on Apache
<VirtualHost *:9000>
WSGIDaemonProcess python-path=/srv/owliver:/srv/owliver/myvenv3/lib/python3.4/site-packages
Alias /media/ /srv/owliver/media/
Alias /static/ /srv/owliver/staticfiles/
<Directory /srv/owliver/staticfiles>
Require all granted
sharmaeklavya2 /
Last active August 31, 2017 12:58
CPSIG 2014 problems

CPSIG 2014 Problems

This is a list of problems suggested by seniors who taught in the 2014 CPSIG. You can read theory from tutorials on Codechef or TopCoder or a book on algorithms.



Transform the expression


sharmaeklavya2 /
Last active May 19, 2023 19:38
LOLCODE tutorial


LOLCODE is an esoteric programming language inspired by lolcat memes on the internet. The language was created in 2007 by Adam Lindsay, researcher at Lancaster University's Computing Department.

Here I have explained basics of LOLCODE with complete examples. However, you may have questions even after reading them because I have not included all details. For an exhaustive reference, read the official documentation.

Hello World

HAI 1.2
BTW This is the famous 'Hello World' program