Skip to content

Instantly share code, notes, and snippets.

View ameenkhan07's full-sized avatar
:shipit:

Ameen Khan ameenkhan07

:shipit:
View GitHub Profile
@ameenkhan07
ameenkhan07 / CustomBootloader
Last active August 29, 2015 14:16
16 bit assembly bootstrapped loader
1. compile the above code using nasm using the command :
nasm -f bin boot.asm -o boot.img
2. make a bootable usb of the image file created above.
import sys
from socket import socket, AF_INET, SOCK_DGRAM
SERVER_IP = '127.0.0.1'
PORT_NUMBER = 5000
SIZE = 1024
print("Test client sending packets to IP {0}, via port {1}\n".format(SERVER_IP, PORT_NUMBER))
mySocket = socket(AF_INET, SOCK_DGRAM)
@ameenkhan07
ameenkhan07 / index.html
Last active July 2, 2016 17:45
ChaiChui
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="https://raw.githubusercontent.com/novus/nvd3/master/build/nv.d3.css" rel="stylesheet" type="text/css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.2/d3.min.js" charset="utf-8"></script>
<script src="https://raw.githubusercontent.com/novus/nvd3/master/build/nv.d3.js"></script>
<style>
text {
@ameenkhan07
ameenkhan07 / github.audio
Created November 22, 2016 10:54
Github Audio Under the Hood -
var eventQueue = [];
var svg;
var element;
var drawingArea;
var width;
var height;
var volume = 0.6;
var ULTIMATE_DREAM_KILLER = false; // https://github.com/debugger22/github-audio/pull/19
var orgRepoFilterNames = [];
@ameenkhan07
ameenkhan07 / System Design.md
Created December 26, 2016 13:11 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
import os, json, subprocess
file = open('pycon_*.json', 'r')
video = json.loads(file.read())
for i, v in video.items():
print("Installing {} ... ".format(v))
url = "youtube-dl -ciw --no-mtime -f 18 \"" + str(i)+ "\""
os.system(url)
@ameenkhan07
ameenkhan07 / tutorial.md
Created August 14, 2018 04:11 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

@ameenkhan07
ameenkhan07 / ErosionDilation.py
Created December 3, 2018 02:39
AISHACK Morph
def _dilate(self, img, str_img=[]):
'''Expands the poindary of img
'''
w, h = img.shape
res = np.asarray([[0 for _ in range(h)] for _ in range(w)])
# Iterating the anchor of the structure image over the original image
for i, im_row in enumerate(img):
for j, im_ele in enumerate(im_row):
if img[i][j]:
for k in range(-1, 2):
@ameenkhan07
ameenkhan07 / hough.py
Last active January 15, 2019 05:42
Hough Lines
import matplotlib.pyplot as plt
import cv2 as cv
import numpy as np
import os
# import math
from sobel import sobel
OUTPUT_DIR = "outputs/"
img_name = "./hough.jpg"
@ameenkhan07
ameenkhan07 / FB-PE-InterviewTips.md
Last active May 8, 2024 05:03
Facebook Production Engineering Interview

What to Expect and Tips

• 45-minute systems interview, focus on responding to real world problems with an unhealthy service, such as a web server or database. The interview will start off at a high level troubleshooting a likely scenario, dig deeper to find the cause and some possible solutions for it. The goal is to probe your knowledge of systems at scale and under load, so keep in mind the challenges of the Facebook environment.
• Focus on things such as tooling, memory management and unix process lifecycle.

Systems

More specifically, linux troubleshooting and debugging. Understanding things like memory, io, cpu, shell, memory etc. would be pretty helpful. Knowing how to actually write a unix shell would also be a good idea. What tools might you use to debug something? On another note, this interview will likely push your boundaries of what you know (and how to implement it).

Design/Architecture 

Interview is all about taking an ambiguous question of how you might build a system and letting