Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View sumeet-bansal's full-sized avatar
🚀

Sumeet Bansal sumeet-bansal

🚀
  • New York
View GitHub Profile
@sumeet-bansal
sumeet-bansal / git-cheatsheet.md
Last active March 29, 2023 16:45
Misc notes on Git.

To tag a commit and use the commit date for the tag:

git checkout <commit hash>
GIT_COMMITTER_DATE="$(git show --format=%aD  | head -1)" git tag <tag name>

To fix commit timestamps:

git filter-branch --env-filter 'export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"'

Hi, thanks for your interest in ACM's backend development team! Your task is to write a design doc for a "quest system" that integrates into the membership portal and then schedule an interview that'll be some mix of design review, technical, and behavioral.

First you'll need to understand how the portal works at the API and database layers—the portal doesn't currently have a service layer—and then design appropriate API and database changes for the required functionality. Your priority should be a working design, not a clever one; bonus points if you explain why yours is definitively the best or if you consider multiple designs and explain the tradeoffs of each. There's no right answer and this is an exercise intended to see how you approach some functionality you'd reasonably be expected to implement as a backend developer for ACM—there's no limit to how deep your changes to the portal can go. The portal's being completely rewritten so don't worry about any current constraints (e.g. what

Sumeet Bansal

CSE 131 PA4

fibonacci.boa

(def fib (n : Num) : Num
	(if (< n 3)
		1
 (+ (fib (- n 1)) (fib (- n 2)))
@sumeet-bansal
sumeet-bansal / midterm_practice.ml
Created December 10, 2018 09:11
FA18 CSE 130 midterm practice: solutions to previous midterms.
(* FA18 CSE 130 Midterm Practice *)
(* FA14 *)
type expr = Const of int | Var of string | Op of string * expr * expr
let rec rename_var e n1 n2 =
match e with
| Const c -> Const c
| Var s -> if s = n1 then Var n2 else Var s
| Op (a,b,c) -> Op (a, rename_var b n1 n2, rename_var c n1 n2)
@sumeet-bansal
sumeet-bansal / extractor.py
Created October 19, 2017 08:19
Generates PDFs from embedded images on Alexander Street Press online textbooks.
from bs4 import BeautifulSoup # for parsing HTML
import os # for managing files
import sys # for cleaner stdout
import urllib.request # for downloading images
from fpdf import FPDF # for generating PDFs
# page content saved as HTML file
inputfile = 'MUS-17-Tricia-Rose-reading.html'
output = inputfile[:-5] + '.pdf'