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 = [];
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 / Cheetsheet.cpp
Created March 4, 2019 03:20
STL cheetsheet
// C++ Structure
/*The constructor initializes id to 42 when it's called. It's called an initliazation list.
In your example, it is equivalent to
*/
struct TestStruct {
int id;

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real