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
| # Add this component code in a break routine | |
| # Select when to break after trial no. x | |
| break_after_trial = [2, 5] | |
| # Terminate this routine if this trial no. is not in break_after_trial | |
| # Note: trials.thisN is the current item no. with zero indexing | |
| # i.e., 1st item a participant see is 0, 2nd item is 1... | |
| if not((trials.thisN + 1) in break_after_trial): | |
| continueRoutine = False |
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
| repos: | |
| - repo: https://github.com/psf/black | |
| rev: 21.11b1 | |
| hooks: | |
| - id: black | |
| language_version: python3.8.10 | |
| exclude: references/ | |
| - repo: local | |
| hooks: | |
| - id: jupyter-nb-clear-output |
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
| # Assume we already have a remote called origin linked to this repo | |
| # Add a new remote called "upstream" | |
| git remote add upstream https://github.com/owner/repo.git | |
| # Set local master branch to track from upstream master | |
| git branch -u upstream/master master | |
| # Create a new private branch for development | |
| git checkout -b dev |
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
| # Altairs by default will not take dataframe with more than 5000 rows. | |
| # This command will disable this limit. | |
| alt.data_transformers.disable_max_rows() |
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
| git checkout master | |
| git pull | |
| git checkout -b feature | |
| git push --set-upstream origin feature |
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
| # .gitconfig | |
| # single-command alias: lg | |
| # multi-command alias: mp | |
| [alias] | |
| lg = log --all --decorate --oneline --graph | |
| mp = !git checkout master && git pull |
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
| export BUCKET=gs://<bucket-name> | |
| gsutil mb -l us-central1 $BUCKET | |
| gsutil lifecycle set <lifecycle-json-file> $BUCKET | |
| gsutil -m rsync -r runs/<run-name>/ $BUCKET |
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
| { | |
| "rule": [ | |
| { | |
| "action": { | |
| "type": "SetStorageClass", | |
| "storageClass": "COLDLINE" | |
| }, | |
| "condition": { | |
| "age": 3, | |
| "matchesSuffix": [".h5", ".parquet", ".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
| name: mkdocs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest |
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 | |
| # Check if nvidia-smi is available | |
| if ! command -v nvidia-smi &> /dev/null; then | |
| echo "nvidia-smi not found. Please ensure NVIDIA drivers are installed." | |
| exit 1 | |
| fi | |
| # Get GPU processes using nvidia-smi | |
| process_list=$(nvidia-smi --query-compute-apps=gpu_uuid,pid --format=csv,noheader,nounits) |
OlderNewer