Define a word
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 numpy as n | |
from cryosparc.tools import CryoSPARC | |
from cryosparc.dataset import Dataset | |
from cryosparc.util import first | |
cs = CryoSPARC( | |
# INSERT INSTANCE/CREDENTIALS HERE | |
license="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", | |
email="nick@example.com", | |
password="...", |
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
""" | |
Restore missing GridFS files for a given project (or job) | |
Usage: | |
eval $(cryosparcm env) | |
python -m restore_gridfs_files --project <puid> [ --job <juid> ] | |
""" | |
from io import BytesIO |
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
const beforeEl = document.getElementById('linkify-demo-before') | |
const afterEl = document.getElementById('linkify-demo-after') | |
const options = { | |
rel: 'nofollow noreferrer noopener', | |
formatHref: { | |
hashtag: (val) => `https://www.twitter.com/hashtag/${val.substr(1)}`, | |
mention: (val) => `https://github.com/${val.substr(1)}` | |
} | |
} |
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
# If you use bash, this technique isn't really zsh specific. Adapt as needed. | |
source ~/keychain-environment-variables.sh | |
# AWS configuration example, after doing: | |
# $ set-keychain-environment-variable AWS_ACCESS_KEY_ID | |
# provide: "AKIAYOURACCESSKEY" | |
# $ set-keychain-environment-variable AWS_SECRET_ACCESS_KEY | |
# provide: "j1/yoursupersecret/password" | |
export AWS_ACCESS_KEY_ID=$(keychain-environment-variable AWS_ACCESS_KEY_ID); | |
export AWS_SECRET_ACCESS_KEY=$(keychain-environment-variable AWS_SECRET_ACCESS_KEY); |
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
export default (fn, ...args) => new Promise((resolve, reject) => | |
fn(...args, (err, result) => err ? reject(err) : resolve(result)) | |
); |
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
'body': | |
'alt-cmd-down': 'window:focus-pane-below' | |
'alt-cmd-left': 'window:focus-pane-on-left' | |
'alt-cmd-right': 'window:focus-pane-on-right' | |
'alt-cmd-up': 'window:focus-pane-above' |
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 bcrypt from 'bcrypt'; | |
import {Promise} from 'rsvp'; | |
// Functions from this module return RSVP.js Promises | |
/** | |
Given a string, resolves to the string's hashed value. | |
*/ | |
export function make(str) { | |
return new Promise((resolve, reject) => |
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 {isArray} from 'lodash'; | |
import {Promise} from 'rsvp'; | |
/** | |
Make an RSVP promise out of a generic node function that takes a callback as | |
its last argument. | |
First argument is either (a) the function to call or (b) an array where the | |
first element is the context, and the second is the function to call. |
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
jQuery("#issue_body").val(`As a ___ I did ___ and expected ___ but experienced ___. | |
Steps to reproduce: | |
1. | |
2. | |
3. | |
URL where bug was observed: |
NewerOlder