Skip to content

Instantly share code, notes, and snippets.

View NickSto's full-sized avatar

Nick Stoler NickSto

View GitHub Profile
@NickSto
NickSto / paperpile.txt
Created March 27, 2020 06:30
Paperpile error
pp-write.js:4 Injecting Paperpile code.
pp-write.js:73870 GOOG IS IN CONTROL
pp-write.js:75641 App tabID is 7
edit#:1 A cookie associated with a cross-site resource at http://paperpile.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
pp-write.js:5058 Cross-Origin Read Blocking (CORB) blocked cross-origin response https://paperpile.com/ajax/app/ping with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details.
send @ pp-write.js:5058
ajax @ pp-write.js:4727
t @ pp-write.js:16510
request @ pp-write.js:16537
loadFromServer @ pp-write.js:21758
JSON:
curl 'https://www.ncbi.nlm.nih.gov/genomes/VirusVariation/vvsearch2/' --data 'wt=json&indent=true&q=*:*&sort=&facet=on&facet.limit=500&facet.sort=index&fl=id,*_s,*_ss,*_sw,*_txt,*_i,*_csv,*_dt,*_dr&sord=asc&start=0&rows=200&facet.field=%7B!ex=SeqType_s%7DSeqType_s&facet.field=%7B!ex=Isolation_csv%7DIsolation_csv&facet.field=%7B!ex=Flags_csv%7DFlags_csv&facet.query=%7B!ex=EnvSample_s%20key=EnvSample_only%7DEnvSample_s:*&facet.query=%7B!ex=EnvSample_s%20key=EnvSample_exclude%7DNOT%20EnvSample_s:*&facet.query=%7B!ex=LabHost_s%20key=LabHost_only%7DLabHost_s:*&facet.query=%7B!ex=LabHost_s%20key=LabHost_exclude%7DNOT%20LabHost_s:*&facet.query=%7B!ex=VacStrain_s%20key=VacStrain_only%7DVacStrain_s:*&facet.query=%7B!ex=VacStrain_s%20key=VacStrain_exclude%7DNOT%20VacStrain_s:*&facet.pivot=%7B!ex=Region_s,Country_s%7DRegion_s,Country_s&&fq=VirusLineageId_ss:(2697049)&fq=%7B!tag=SeqType_s%7DSeqType_s:(%22Nucleotide%22)'
CSV:
curl 'https://www.ncbi.nlm.nih.gov/genomes/VirusVariation/vvsearch2/?q=*:*&fq=VirusLineage
<!DOCTYPE HTML>
<html>
<!--base.mako-->
@NickSto
NickSto / queryparams.py
Created April 11, 2018 22:45
A nice helper object to deal with query strings.
class QueryParams(collections.OrderedDict):
"""A class to simplify handling query parameters and enable simpler query strings.
This encapsulates parsing the values of query strings, holding their values, and producing
altered query strings in a simplified format.
It works by first declaring the accepted ("canonical") query string parameters with add().
This object retains information on the preferred order of parameters, along with their default
values and type.
Then, you give parse() the parameters given by the user, and it will interpret the values
according to their expected type.
Then, you can continue using this object as a dict holding the parameter values, and getting and
@NickSto
NickSto / session-recover.py
Created November 28, 2017 05:28
Python 3 script to recover your tabs from a Session Manager .session file.
#!/usr/bin/env python3
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import sys
import json
import errno
import argparse
@NickSto
NickSto / gist:34915378fdfd7e6c7996ccd25bdb0987
Created August 16, 2017 23:10
Bioconda simulate-travis.py error
$ ./simulate-travis.py --git-range HEAD
Using config file /home/me/.config/bioconda/conf.yml, which has the following contents:
{'CONDA_ROOT': '/tmp/miniconda', 'CONDARC': '/tmp/miniconda/condarc'}
+ bioconda-utils lint recipes config.yml --git-range HEAD
18:45:31 BIOCONDA INFO Recipes newly unblacklisted:
18:45:31 BIOCONDA INFO Recipes to consider according to git:
recipes/dunovo
recipes/dunovo
18:45:31 BIOCONDA INFO Recipes to lint:
[Approximating frequencies of minimizers ] 0 % elapsed: 0 min 0 sec remaining: 0 min 0 sec cpu: -1.0 % mem: [ 17, 17, 17] MB
[Approximating frequencies of minimizers ] 100 % elapsed: 0 min 4 sec remaining: 0 min 0 sec cpu: 100.0 % mem: [ 17, 17, 17] MB
[Approximating frequencies of minimizers ] 100 % elapsed: 0 min 4 sec remaining: 0 min 0 sec cpu: 100.0 % mem: [ 17, 17, 17] MB
[Approximating frequencies of minimizers ] 100 % elapsed: 0 min 4 sec remaining: 0 min 0 sec cpu: 100.0 % mem: [ 17, 17, 17] MB
[Approximating frequencies of minimizers ] 100 % elapsed: 0 min 4 sec remaining: 0 min 0 sec cpu: 100.0 % mem: [ 17, 17, 17] MB
[Approximating frequencies of minimizers ] 100 % elapsed: 0 min 4 sec remaining: 0 min 0 sec cpu: 100.0 % mem: [ 17, 17, 17] MB
[Approximating frequencies of minimizers ] 100 % elapsed: 0 min 4 sec remaining: 0 min 0 sec cpu: 100.0 % m
BCALM 2, git commit d47cf58
setting storage type to hdf5
bcalm_algo params, prefix:k21a10/SC8C1.bcalm.unitigs.fa k:21 a:10 minsize:10 threads:48 mintype:1
DSK used 1 passes and 48 partitions
Iterated 339851 kmers, among them 69358 were doubled
In this superbucket (containing 48 active minimizers),
sum of time spent in lambda's: 31223.5 msecs
longest lambda: 706.7 msecs
@NickSto
NickSto / vg-index-p.7752-8000.txt
Created October 17, 2016 06:21
vg index progress 7752-8000
$ vg index -p --edge-max 3 -k 11 -x nvc-debug.7752-8000.xg -g nvc-debug.7752-8000.gcsa nvc-debug.7752-8000.vg
Saving index to disk...
loading graph [=====================================================================================================]100.0%
processing kmers of nvc-debug. [=====================================================================================================]100.0%
InputGraph::InputGraph(): 2156576 kmers in 1 file(s)
InputGraph::read(): Read 2156576 11-mers from .vg-kmers-tmp-XXM0k7nm
InputGraph::readKeys(): 737698 unique keys
InputGraph::read(): Read 2156576 11-mers from .vg-kmers-tmp-XXM0k7nm
InputGraph::readFrom(): 33562 unique from nodes
InputGraph::read(): Read 2156576 11-mers from .vg-kmers-tmp-XXM0k7nm
@NickSto
NickSto / vg-index-p.8001-8256.txt
Created October 17, 2016 05:14
vg index progress 8001-8256
$ vg index -p --edge-max 3 -k 11 -x nvc-debug.8001-8256.xg -g nvc-debug.8001-8256.gcsa nvc-debug.8001-8256.vg
Saving index to disk...
loading graph [=====================================================================================================]100.0%
processing kmers of nvc-debug. [=====================================================================================================]100.0%
InputGraph::InputGraph(): 504202 kmers in 1 file(s)
InputGraph::read(): Read 504202 11-mers from .vg-kmers-tmp-XXTYw8qM
InputGraph::readKeys(): 254968 unique keys
InputGraph::read(): Read 504202 11-mers from .vg-kmers-tmp-XXTYw8qM
InputGraph::readFrom(): 33488 unique from nodes
InputGraph::read(): Read 504202 11-mers from .vg-kmers-tmp-XXTYw8qM