Skip to content

Instantly share code, notes, and snippets.

View kthakore's full-sized avatar

Kartik Thakore kthakore

  • San Francisco, California
View GitHub Profile
@kthakore
kthakore / README.md
Created January 10, 2021 19:42
C/C++/Rust Task

Task

Design a simple system that allows HR to track jobs, applications and candidates.

  1. Candiates can register themselves and apply for a job
  2. All applications go through state: applied, interviewed, rejected, accepted
  3. When an application is accepted the job can no longer be applied to

Use C++/C/Rust

curl 'https://imagine.doc.ai/v0.2.5/phenomenal-face/inferByType' -H 'accept-encoding: gzip, deflate' -H 'accept-language: en-US' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) ReactNativeDebugger/0.9.8 Chrome/58.0.3029.110 Electron/1.7.15 Safari/537.36' -H 'content-type: application/json' -H 'accept: application/json' -H 'authority: imagine.doc.ai' -H 'cookie: __cfduid=db762dda0445efe71bd4563420a7f4bbc1558494998' -H 'x-devtools-request-id: 59850.956' --data-binary '{"type":"base64","store":"false","data":"/9j/4AAQSkZJRgABAQAASABIAAD/4QBYRXhpZgAATU0AKgAAAAgAAgESAAMAAAABAAYAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAALoqADAAQAAAABAAAHdAAAAAD/7QA4UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAAA4QklNBCUAAAAAABDUHYzZjwCyBOmACZjs+EJ+/8AAEQgHdAuiAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVl
This file has been truncated, but you can view the full file.
{
"type": "base64",
"store": "false",
"image" : "iVBORw0KGgoAAAANSUhEUgAAAmkAAALiCAYAAACCBkHJAAABfGlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGAqSSwoyGFhYGDIzSspCnJ3UoiIjFJgv8PAzcDDIMRgxSCemFxc4BgQ4MOAE3y7xsAIoi/rgsxK8/x506a1fP4WNq+ZclYlOrj1gQF3SmpxMgMDIweQnZxSnJwLZOcA2TrJBUUlQPYMIFu3vKQAxD4BZIsUAR0IZN8BsdMh7A8gdhKYzcQCVhMS5AxkSwDZAkkQtgaInQ5hW4DYyRmJKUC2B8guiBvAgNPDRcHcwFLXkYC7SQa5OaUwO0ChxZOaFxoMcgcQyzB4MLgwKDCYMxgwWDLoMjiWpFaUgBQ65xdUFmWmZ5QoOAJDNlXBOT+3oLQktUhHwTMvWU9HwcjA0ACkDhRnEKM/B4FNZxQ7jxDLX8jAYKnMwMDcgxBLmsbAsH0PA4PEKYSYyjwGBn5rBoZt5woSixLhDmf8xkKIX5xmbARh8zgxMLDe+///sxoDA/skBoa/E////73o//+/i4H2A+PsQA4AJHdp4IxrEg8AAAGdaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA1LjQuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjYxNzwvZXhpZjpQaXhlbFhEaW1l
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
@kthakore
kthakore / README.md
Last active December 20, 2018 02:33
Creating exercise for Python Proficiency
const services = require('@jupyterlab/services');
var DEFAULT_OPTIONS = {
"kernelName": "python",
"path": "/tmp/foo.ipynb",
"serverSettings" : services.ServerConnection.makeSettings({
"baseUrl" : process.env.JUPYTER_BASEURL || "http://127.0.0.1:8889",
"wsUrl": process.env.JUPYTER_WSURL || "http://127.0.0.1:8889",
"token": '',
})
@kthakore
kthakore / README.md
Last active August 9, 2018 21:10
README.md

Write a program given the specifications below. Use any language, google any thing you need :)

Input

Your program should expect valid JSON representing a two dimensional matrix. It will be in one of the following two formats:

A) a list of lists

The expected format is [ [variable names], [first row], [second row], ... ]

@kthakore
kthakore / Run.java
Created June 20, 2017 00:43
Threads in Java with Syncronized!
package com.java.oop.threads;
import java.lang.Runnable;
import java.lang.Thread;
/**
* Created by kthakore on 2017-06-19.
@kthakore
kthakore / blackjack.js
Last active May 25, 2017 21:54
Backjack in JS OOP
const _ = require('lodash');
/*
* Card
*/
class Card {
constructor(game, deck, options) {
this.game = game;
@kthakore
kthakore / foo.go
Created November 7, 2015 14:40
Testing Go TCP Connections
package foo
import (
"fmt"
"log"
"net"
)
var connection net.Conn = nil
func close() {
if connection != nil {