- Repo: git@github.com:SocialCodeInc/interview-exercises.git
- Shared notes: http://tinyurl.com/sc-shared-notes
TODO
- setup-interview.sh
- teardown-interview.sh
ad-account id: id | |
page id: id | |
post id: id | |
message: message | |
campaign: | |
id: id | |
objective: objective | |
name: name |
{ | |
"estimates": { | |
"post_impressions": 38760.211670480545 | |
}, | |
"id": "135249540516_10153617542060517", | |
"predictions": { | |
"post_impressions": { | |
"series_high": [ | |
[ | |
1387211207, |
#!/bin/sh | |
user=`git st | grep 'modified' | cut -d ":" -f 2 | tr -d ' ' | while read fn; do | |
git --no-pager blame $fn | |
done | cut -d " " -f 2- | cut -d ')' -f 1 | sed 's/[0-9].*//' | tr -d '(' | sort | uniq -c | sort -n | tail -r | head -n 1 | cut -d ' ' -f 3-` | |
echo $user | |
cat $1 > /tmp/commit-msg | |
echo '\n' > $1 | |
echo "cc: $user" >> $1 | |
cat /tmp/commit-msg >> $1 |
// tree | |
// . | |
// ├── bin | |
// │ └── scribe | |
// └── src | |
// └── scribe | |
// └── scribe.go | |
// $ gb build all; bin/scribe | |
// Jesse |
#!/bin/bash | |
if [ $# -eq 0 ] | |
then | |
echo "Usage: git reviewer filename" | |
exit | |
fi | |
git blame $1 | cut -d "(" -f 2 | ruby -ne 'puts $_.split(/\d{4}/).first' | sort | uniq -c | sort -n | tail -r | head -n 1 | cut -d ' ' -f 3- |
https://beta.socialcode.com/advisor/#audience-profiler?|hvac:act_321764907982593,hvad:6018552247870,hvsc:y,connection_frac:0.8659861889250815-0.88324| |
// ex | |
// $ gb build all; bin/scribe | |
// scribe | |
// Jesse | |
package main | |
import "os" | |
import "fmt" | |
import "time" | |
import "bufio" |
TODO
#!/usr/bin/python | |
import urllib,urllib2, sys | |
BASE_URL = 'http://192.168.100.101:5000' | |
ADMIN_PASS = 'YOUR ADMIN PASS' | |
# Login to admin interface | |
parameters = {'username' : 'admin', 'passwd':ADMIN_PASS,'service_type':'1'} | |
request = urllib2.Request(BASE_URL+'/webman/modules/login.cgi', urllib.urlencode(parameters)) |
# typical to sum over your list of items perhaps | |
# performing some calculation on each item | |
normalizing_constant = \ | |
sum([calc(item) for item in items if filter(item)]) | |
r = random.random() | |
for item in items: | |
prob = get_probability(item) / normalizing_constant |