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
| # start a job after another job succeeds | |
| JOBID=$(sbatch --parsable job1.sh) && sbatch --dependency=afterok:$JOBID job2.sh | |
| # start a job after another job fails | |
| JOBID=$(sbatch --parsable job1.sh) && sbatch --dependency=afternotok:$JOBID job2.sh | |
| # get the time and memory of a running node | |
| sstat --format="CPUTime,Elapsed,MaxRSS" -j $SLURM_JOB_ID |
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
| library(tibble) | |
| # create a tibble with no rows, but defined columns | |
| tbl <- tibble(name=character(), age=numeric(), gender=factor()) | |
| # add a row to the tibble. The values can even be vectors!! | |
| tbl <- add_row(tbl, name='Steve', age='24', gender='male') |
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
| # Convert .sam file to .bam file | |
| $ samtools view -b -S -o [outputted bam file] [inputted sam file] | |
| # Sort and index the .bam file | |
| $ samtools sort [inputted bam file] > [output prefix of bam file].sorted | |
| $ samtools index [inputted bam file].sorted.bam |
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
| user@server$ jupyter notebook --no-browser --port=8889 | |
| # run client side | |
| user@client$ ssh -N -f -L localhost:8000:localhost:8889 remote_user@remote_host | |
| firefox http://localhost:8000 | |
| # source: https://coderwall.com/p/ohk6cg/remote-access-to-ipython-notebooks-via-ssh |
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
| <activity android:name=".ui.activities.MainActivity" | |
| android:configChanges="orientation|keyboardHidden|screenSize"> | |
| android:label="Main Activity" | |
| android:name=".MainActivity" | |
| <intent-filter> | |
| <action android:name="android.intent.action.MAIN" /> | |
| <category android:name="android.intent.category.LAUNCHER" /> | |
| </intent-filter> | |
| </activity> |
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
| // Beginning of our code | |
| int beat_counter = 0; | |
| int rand_array[] = 100; | |
| bool fail = true; | |
| setrandSeed(); | |
| do { // loop for each round | |
| rand_array[beat_counter] = rand16(); |
NewerOlder