- Introduction
- Projects
- Assets
- Running a local copy
- Improvements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (service *IndexService) IndexUserVideo(userID, videoID string) error { | |
var indexRequest IndexRequest | |
var err error | |
done := make(chan bool) | |
u := make(chan *UserResponse) | |
v := make(chan *VideoResponse) | |
e := make(chan error) | |
go func(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Questions | |
Once finished writing the code you must answer the following questions and include them in your documentation: | |
Was the question/problem clear? Did you feel like something was missing or not explained correctly? | |
- The problem was well defined, but a few details were left out. The request is to "create a piece of software that collects data from two services and indexes that data through a third service as quickly and efficiently as possible", but a little more context would've been helpful. What does the typical load for our system look like (in other words, what value should i pass in for the -c flag to the `./challenge-linux input -c <LOAD>` command?). I'd also argue that the wording "as quickly and efficiently as possible" is ill-defined, and specific metrics around what success would look like might have been better. For example: We expect the service to index 95% of all incoming requests in under 5 seconds, to have a memory profile that fits this certain use case, etc. | |
There were also some imp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
func write(input chan int) { | |
for i := 0; i < 4; i++ { | |
fmt.Printf("sending i: %d to input channel\n", i) | |
input <- i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type CSVParser struct { | |
scanner *bufio.Scanner | |
Validator func([]string) bool | |
Output chan []string | |
} | |
func ReaderCSVParser(reader io.Reader) *CSVParser { | |
return &CSVParser{ | |
bufio.NewScanner(reader), | |
ValidateCSVLine, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type getUserTestCase struct { | |
Tag string | |
ID string | |
Expected *UserResponse | |
} | |
func DummyHandler(w http.ResponseWriter, r *http.Request) { | |
w.WriteHeader(http.StatusOK) | |
w.Header().Set("Content-Type", "application/json") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Examples: | |
Input: {5, 20, 3, 2, 50, 80}, n = 78 | |
Output: Pair Found: (2, 80) | |
Input: {90, 70, 20, 80, 50}, n = 45 | |
Output: No Such Pair | |
""" | |
def find_diff(arr, n): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Objects are not valid as a React child (found: object with keys {currency_code, value}). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons. Check the render method of `Text`. | |
traverseAllChildrenImpl | |
traverseAllChildren.js:184:8 | |
traverseAllChildrenImpl | |
traverseAllChildren.js:103:8 | |
traverseAllChildren | |
traverseAllChildren.js:218:33 | |
instantiateChildren | |
ReactChildReconciler.js:87:8 | |
_reconcilerInstantiateChildren |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST /target HTTP/1.1 | |
Host: localhost:5000 | |
Cache-Control: no-cache | |
Postman-Token: b813fe82-040a-4a44-c19a-54e3d8b5a4a1 | |
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW | |
------WebKitFormBoundary7MA4YWxkTrZu0gW | |
Content-Disposition: form-data; name="target_inet"; filename="" | |
Content-Type: |
Request:
Request URL:https://t1qa4.mediamath.com/dmp/v2.0/attributes?full=*&q=owner_type%3D%3Dpixel_bundle%26owner_id%3D%3D1124233
Request Method:GET
Status Code:404 Not Found
Remote Address:74.121.142.249:443
Response:
NewerOlder