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 ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
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
import py4j | |
from pyspark.sql.functions import monotonically_increasing_id | |
# very important to cache this. | |
df = df.select(monotonically_increasing_id().alias("index"), "*")\ | |
.cache() | |
MAX = 34359738368 | |
def mod_binary_search(round, previous_winner, dataset): | |
# round starts at 0, previous_winner starts at 0 |
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
''' | |
This is an example of the server-side logic to handle slash commands in | |
Python with Flask. | |
Detailed documentation of Slack slash commands: | |
https://api.slack.com/slash-commands | |
Slash commands style guide: | |
https://medium.com/slack-developer-blog/slash-commands-style-guide-4e91272aa43a#.6zmti394c | |
''' |
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
# Edit ~/.bash_profile | |
export GOPATH=/Users/$USER/go | |
export PATH=$GOPATH/bin:$PATH | |
# Reload profile : source ~/.bash_profile |
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
Awesome git tutorial, learn by doing in browser. | |
https://try.github.io/levels/1/challenges/1 | |
/* Set up Git Configuration */ | |
git config --global user.email "[email protected]" | |
git config --global user.name "Your Name" | |
git config --global core.editor "vi" | |
git config --global color.ui true |
I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).
- Launch quicktime player
- do Screen recording
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
NewerOlder