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
| #!/usr/bin/env python3 | |
| """Split FASTQ(.gz) files into gzip chunks that stay under a size target. | |
| This script is intended for customer-facing support workflows where a user needs | |
| smaller `.fastq.gz` files for re-upload. It works on record boundaries and can | |
| split paired-end R1/R2 inputs with identical record counts per chunk. | |
| Because gzip compression ratio varies across reads, the script keeps a safety | |
| margin below the requested maximum and rotates once the current chunk approaches | |
| that threshold. The default settings target 200 MB output chunks with a 5 MB |
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
| const handleCompletedUploaded: HandleFileUploadFn = useCallback(async preview => { | |
| const normalizedPreviews = mergePreviewsToState([{ ...preview, status: FileUploadStatus.Available }], localPreviews) | |
| setLocalPreviews(normalizedPreviews) | |
| await savePreviews(normalizedPreviews) | |
| }, [mergePreviewsToState, localPreviews, setLocalPreviews]) |
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
| const [localPreviews, setLocalPreviews] = useState({} as INormalizedPreviews) | |
| const handleCompletedUploaded: HandleFileUploadFn = async preview => { | |
| const normalizedPreviews = mergePreviewsToState([{ ...preview, status: FileUploadStatus.Available }], localPreviews) | |
| setLocalPreviews(normalizedPreviews) | |
| } |
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
| // Track a completed download and use an effect to update the status | |
| // of the associated upload via the latest component state. | |
| const [finishedDownload, setFinishedDownload] = useState(null as string | null) | |
| useEffect(() => { | |
| if (!finishedDownload) { return } | |
| const updatedPreview = localPreviews[finishedDownload] | |
| if (localPreviews[finishedDownload].status !== FileUploadStatus.Available) { | |
| const normalizedPreviews = mergePreviewsToState([{ ...updatedPreview, status: FileUploadStatus.Available }], localPreviews) | |
| setLocalPreviews(normalizedPreviews) | |
| const save = async () => { |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <data> | |
| <time>9:12 AM</time> | |
| <forecaster>M. Graves</forecaster> | |
| <discussion>This week will be winter-like in Yuma as cold air remains settled over the region; High temperatures will stay in the low-mid 60s. Normal for this time of year is 75 degrees F. The main day of interest this week is Friday, on which breezy winds out of the northwest are forecast. Blowing dust may be possible on Friday and therefore the PM-10 (dust) forecast has been bumped up into the Moderate Air Quality (AQI) category to reflect this. PM-10 may increase again on Sunday with breezy northerly winds as well. Ozone is forecast to stay in the Good AQI category through this forecast period. We'll keep an eye out for any changes in the wind forecast later this week.<br/><br/>Check back tomorrow for the next Yuma air quality forecast.</discussion> | |
| <forecasts> | |
| <forecast> | |
| <date>2/21/2018</date> | |
| <day>WED</day> | |
| <aqivalue>46</aqivalue> |
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
| <body> | |
| <svg id="map" xmlns:xlink="http://www.w3.org/1999/xlink" width="671" height="367"> | |
| <g> | |
| <g id="states"> | |
| <a id="s01" class="<?php the_field('al_legal'); ?>" href="http://dispensarypermits.com/united-states-marijuana-dispensary-laws/open-a-dispensary-in-alabama/"> | |
| <path d="M446.5848460941517,216.26501324764592L464.81286038377675,214.2603543573807L468.10323765853497,225.08860445900154L472.8937074082319,241.00178951997543L474.61008720683344,244.42048722827803L476.0625626818386,246.29743631830007L475.76722830026273,247.62689856030931L477.10805089685584,248.22910918121545L475.5070201786913,250.09623188502263L475.7873316078113,251.70362228164615L475.13993857965056,254.0096380222493L476.7334995824955,257.72478632149034L476.4216558002466,261.1981977477231L478.0945121552954,264.54108080067283L472.72709714484995,265.33683005517673L449.7452897425235,268.119261782702L449.57058192002177,269.8466738984158L452.3066137029198,272.0345007925466L452.1205917477962,274.1896880002505L453.08275860861545,275.148983180 |
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
| const get = (target, path) => path.split(".").reduce((value, key) => value ? value[key] : value, target) | |
| const a = { | |
| b: { | |
| c: { | |
| d: "result!" | |
| } | |
| } | |
| } |
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
| /** | |
| All of the intervals which call the pollDate() function | |
| after different time intervals will resolve with similar | |
| qualifying times thanks to managed state in the *fetchDate() | |
| generator function. | |
| */ | |
| function* fetchDate() { | |
| var isFetching = false | |
| var date = 0 |
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
| /** | |
| Solution to an interview question posted by trello. I came across the link | |
| not actually looking for a job but I love puzzles. So I went ahead and solved | |
| it :) | |
| Decrypts a value hashed by the following Pseudo code: | |
| Int64 hash (String s) { | |
| Int64 h = 7 |
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
| private class QueryDataTask extends AsyncTask<Void, Void, DataReadResult> { | |
| @Override | |
| protected void onPreExecute() { | |
| super.onPreExecute(); | |
| Log.d(TAG, "Executing query task"); | |
| } | |
| protected DataReadResult doInBackground(Void... params) { | |
| Calendar date = new GregorianCalendar(); | |
| date.set(Calendar.HOUR_OF_DAY, 0); |
NewerOlder