This file contains hidden or 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
| # Deployment_info | |
| # Notes: to use this worklflow, develop site and write posts in a "source" branch, then use the master branch for deployment. | |
| ## Clean build | |
| jekyll build | |
| ## Pre-deployment gitfu: | |
| git branch -D master | |
| git checkout -b master |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| function qpop { qstat -s p | tail -n+3 | awk '{print $1}' | head -n${1-1} | xargs qrls; } |
This file contains hidden or 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
| #!/bin/bash | |
| # Get and install openblas | |
| mkdir -p ~/bin/openblas | |
| cd ~/bin/openblas | |
| wget https://github.com/xianyi/OpenBLAS/archive/v0.2.9.rc1.zip | |
| unzip v0.2.9.rc1 | |
| cd OpenBLAS-0.2.9.rc1/ | |
| make |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| # On EC2, /mnt is usually already on | |
| mounted=$(mount | grep /mnt | wc -l) | |
| if [ $mounted -eq 1 ]; then | |
| umount -l /mnt | |
| fi | |
| # Install mdadm unattended | |
| DEBIAN_FRONTEND=noninteractive apt-get -y install mdadm | |
| # Create a RAID0 volume, don't ask for permission (--run) |
This file contains hidden or 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
| from starcluster.clustersetup import ClusterSetup | |
| class ScriptRunner(ClusterSetup): | |
| """ | |
| Runs local scripts on node or master startup | |
| """ | |
| def __init__(self, node_startup_script): | |
| self.node_startup_script = node_startup_script | |
| def on_add_node(self, node, nodes, master, user, user_shell, volumes): |
This file contains hidden or 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
| inotifywait -m -e moved_to $BASE | while read line | |
| do | |
| F=$(echo $line | cut -f3 -d" ") | |
| echo "Now uploading $F" | |
| s3cmd --force --no-progress put $F s3://mybucket/ & | |
| done |
This file contains hidden or 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
| awk 'BEGIN { srand(systime()); } {if (rand() < 0.3) { print $0; } }' data.csv |
This file contains hidden or 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
| def merge_intervals(df, start_col="start", stop_col="stop"): | |
| out = [] | |
| df = df.sort(start_col) | |
| first_row = True | |
| for ix, row in df.iterrows(): | |
| if first_row: | |
| current_start = row[start_col] | |
| current_stop = row[stop_col] | |
| first_row = False | |
| start = row[start_col] |