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
module.exports = { | |
generateBuildId: async () => { | |
return process.env.NEXT_EVENT_ENV === "prod" | |
? "XXXXXXXXXXXXXXX" | |
: "YYYYYYYYYYYYYYY"; | |
}, | |
.... | |
} |
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 find_longest_homopolymer(seq): | |
if seq == None or seq == '': | |
return 0 | |
polymer_lengths = [] | |
curr_len = 0 | |
polymer_nt = seq[0] | |
for nt in seq: | |
if nt != polymer_nt: |
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
/* This will perform a case insensitive search in the | |
* collection specified by 'CollectionName', against the field | |
* specified by 'targetField', for all strings in the field that contain | |
* the substring specified by 'substring'. | |
* This was tested primarily in the Mongo Shell. | |
* | |
* Source: https://stackoverflow.com/a/10610461/3559330 | |
*/ | |
db.getCollection('CollectionName').find({targetField: /substring/i}) |
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
/** | |
* Going to be testing 3 things: | |
* 1. Function marked async, but that still runs sync. | |
* 2. Function marked async and returns a promise, but that still runs sync. | |
* 3. Function marked async and that runs async by using process.nextTick(). | |
* | |
* Note: async and sync are defined in the context of the Node.js event loop, | |
* which technically runs everything on one thread. | |
* | |
* Usage: this is a vanillaJS node script. So all you need to to do is type |