Skip to content

Instantly share code, notes, and snippets.

View papaver's full-sized avatar

Moiz Merchant papaver

View GitHub Profile

Genetic Chain Mini Challenge

Write a function which takes a single integral value and prints out a spiral to standard output. The input value indicates the size of the grid to create the spiral in. Passing in 5 would result in a spiral generated in a 5x5 grid. The spiral should start on the top left most cell and each edge should be one unit shorter as the spiral winds around and finally ends.

This exercise is a way for you to show us how you think about and break down problems. How you use data structures and implement algorithms. The challenge shouldn't take more than a couple hours, we understand everyone's time is valuable. We are not looking for speed, we are looking for quality. We hope you enjoy the challenge.

Requirements

  • Any language can be used.
  • Code should run without errors.
# Vertices: 8
# Points: 0
# Lines: 0
# Faces: 6
# Materials: 1
o 1
# Vertex list
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1500000,RESOLUTION=640x960
http://res.cloudinary.com/talenthouse/video/upload/ac_aac,af_44100,br_1500000,c_limit,h_640,vc_h264:main:3.1,w_960/v1455843532/user-469666/profile/lxiyurogzyy2qen16zde.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=600000,RESOLUTION=320x480
http://res.cloudinary.com/talenthouse/video/upload/ac_aac,af_44100,br_600000,c_limit,h_320,vc_h264:baseline:3.0,w_480/v1455843532/user-469666/profile/lxiyurogzyy2qen16zde.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=4000000,RESOLUTION=720x1280
http://res.cloudinary.com/talenthouse/video/upload/ac_aac,af_44100,br_4000000,c_limit,h_720,vc_h264:high:4.0,w_1280/v1455843532/user-469666/profile/lxiyurogzyy2qen16zde.m3u8
@papaver
papaver / decode.py
Last active August 2, 2017 07:27
Curbside Programming Challenge
#!/usr/bin/env python
#
# Curbside Programming Challenge
# by Moiz Merchant
#
#------------------------------------------------------------------------------
# imports
#------------------------------------------------------------------------------
@papaver
papaver / setup_passless_login.sh
Created December 12, 2013 20:11
Setup Passless Login For SSH
#!/bin/tcsh
# validate command-line args
if ($# != 2) then
echo "Example usage: $0 ssh.codeisart.com 22"
exit 1
endif
# set script variables
set remotehost = $1
@papaver
papaver / mp3.py
Last active December 28, 2015 09:19
MPEG-1 / MPEG-2 Audio Layer III (.mp3) parser
#------------------------------------------------------------------------------
# mp3.py - MPEG-1 / MPEG-2 Audio Layer III (.mp3) parser
#------------------------------------------------------------------------------
import collections
import itertools
import os.path
import struct
#------------------------------------------------------------------------------
@papaver
papaver / filmscribeCutList.py
Created October 20, 2013 20:10
Avid Filmscribe Cutlist (.ctl) parser
#------------------------------------------------------------------------------
# filmscribeCutList.py - avid filmscribe cutlist (.ctl) parser
#------------------------------------------------------------------------------
import collections
import itertools
import logging
import os
import os.path
import re
@papaver
papaver / Gemfile
Last active December 15, 2015 20:19
SSC Group Engineering Challenge: A Content Releaser
source 'http://rubygems.org'
gem 'activerecord'
gem 'fastercsv'
gem 'sqlite3'
@papaver
papaver / apn_pusher.rb
Created February 13, 2012 18:09
Apple Push Notification Tester
#!/usr/bin/env ruby -w
#------------------------------------------------------------------------------
# requires
#------------------------------------------------------------------------------
require 'json'
require 'openssl'
require 'socket'
require 'yaml'