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
sharmaeklavya2 / ttt_ai.py
Last active August 11, 2016 23:33
Tic-Tac-Toe AI
#!/usr/bin/env python
"""
Tic-Tac-Toe
2 players 'a' and 'b' are playing the game. Player 'a' always moves first.
board_state is a 9-character string (row-major), each character representing who marked that cell.
'0' means that the cell is unmarked.
outcome is a one-character string containing 'w', 'l' or '0'.
"""
@sharmaeklavya2
sharmaeklavya2 / gsoc16_output.md
Last active September 8, 2018 19:22
GSoC16 Output
@sharmaeklavya2
sharmaeklavya2 / cp_syllabus.md
Last active November 15, 2025 16:15
Competitive Programming Syllabus

Competitive Programming Syllabus

Geometry

  • Problems - Refer the article for a list of problems which can be solved using Rotating Calipers technique.
@sharmaeklavya2
sharmaeklavya2 / code.fun.do_themes.md
Created September 11, 2016 17:28
code.fun.do themes

code.fun.do 2016 Hackathon Themes

http://bit.ly/codefundothemes

Following are the categories and problem statements under those respective categories. Team can pick up any one of those problem statement and build the solution using their ideas. We have also suggested certain tools and platform you can use to build those solutions, you are free to choose any of them or anything else you feel suitable, but do not forget to integrate Microsoft platform services in your solutions.

@sharmaeklavya2
sharmaeklavya2 / clustering.md
Last active October 22, 2016 10:16
Clustering notes

Clustering

Uses of clustering

  • Summarization: Apply algo on cluster prototypes instead of actual data if actual data is large.

  • Compression: Don't store all attributes of all objects. Store all attributes for cluster prototypes.

@sharmaeklavya2
sharmaeklavya2 / cf_750F_judge.py
Created January 2, 2017 12:47
Codeforces problem 750F
#!/usr/bin/env python3
# Pass the path to a hack file as a command-line argument
import sys
from collections import defaultdict
fobj = open(sys.argv[1])
t = int(fobj.readline())
print(t, flush=True)
@sharmaeklavya2
sharmaeklavya2 / cpintro.md
Last active February 18, 2020 23:53
Slides used in ACM-CPSIG 2017

Introduction to Competitive Programming

--

Presentation summary

  • What is competitive programming (CP)?
  • Why do CP?
  • How and where to practice?
  • Comparison of programming languages
@sharmaeklavya2
sharmaeklavya2 / adult.ipynb
Last active August 5, 2017 17:13
US Census Income Dataset Analysis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sharmaeklavya2
sharmaeklavya2 / covertype.ipynb
Last active October 22, 2024 18:07
Forest Covertype Dataset Analysis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sharmaeklavya2
sharmaeklavya2 / ekunc.c
Last active February 10, 2017 11:12
My netcat clone
#define _POSIX_SOURCE
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<sys/types.h>
#include<sys/socket.h>
#include<netinet/in.h>
#include<arpa/inet.h>
#include<unistd.h>