Skip to content

Instantly share code, notes, and snippets.

View yatharth's full-sized avatar

Yatharth Agarwal yatharth

View GitHub Profile
@yatharth
yatharth / EncodingHelperCharNames.java
Created October 18, 2015 17:28
Stripped down example of working with errorable static init blocks
public class EncodingHelperCharNames {
private static HashMap<Integer, String> CHARACTER_NAMES;
private static boolean enabled = false;
static {
readFile(false);
}
/**
@yatharth
yatharth / lightson.py
Last active January 10, 2016 20:20
USACO Dec 2015 Silver Problem #1 solution for CompSci club
#!/usr/bin/env python3
from collections import defaultdict
__author__ = 'Yatharth Agarwal <[email protected]>'
with open('lightson.in') as in_file:
read_numbers = lambda: map(int, in_file.readline().strip().split())
switches = defaultdict(set)
@yatharth
yatharth / keybase.md
Created June 23, 2018 07:28
Proof for Keybase account @mndhck

Keybase proof

I hereby claim:

  • I am yatharth on github.
  • I am mndhck (https://keybase.io/mndhck) on keybase.
  • I have a public key whose fingerprint is 5105 B914 D4DA 8EF3 5D2A 79E8 0C7F 0180 C090 9DC9

To claim this, I am signing this object:

@yatharth
yatharth / dabblet.css
Last active June 4, 2019 03:09
Vertical centering + overflow
/* Vertical centering + overflow */
#middle {
width: 80%;
margin: 10px auto;
border: 1px dashed black;
height: 500px;
line-height: 500px;
vertical-align: middle;
text-align: center;
}