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 random | |
try: | |
from io import StringIO | |
except ImportError: | |
try: | |
from cStringIO import StringIO | |
except ImportError: | |
from StringIO import StringIO | |
from PIL import Image |
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
# -*- coding: utf-8 -*- | |
from inspect import isclass | |
from pdfminer import layout | |
class _LTNode(object): | |
__singletons = {} |
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
# -*- coding: utf-8 -*- | |
from itertools import product | |
class Rect(object): | |
def __init__(self, x0, y0, x1, y1): | |
self.x = sorted((x0, x1)) | |
self.y = sorted((y0, y1)) |
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
process.stdout.write("Hello world!"); |
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
/** | |
* A simple script to initial a request to Sierra GraphQL service | |
* and then output current HIVDB version in an alert window. | |
*/ | |
window.fetch('https://hivdb.stanford.edu/graphql', { | |
method: 'post', | |
headers: { 'Content-Type': 'application/json' }, | |
body: JSON.stringify({ | |
query: 'query { viewer { currentVersion { text } } }', | |
variables: {} |
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
# Linux and Mac users may need add “sudo” before this command | |
pip install sierrapy |
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
""" | |
A simple script to initial a request to Sierra GraphQL service and | |
then print out current HIVDB version. | |
""" | |
from __future__ import print_function | |
import json | |
import requests | |
resp = requests.post( | |
'https://hivdb.stanford.edu/graphql', |
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
""" | |
A simple script to initial a request to Sierra GraphQL service and | |
then print out current HIVDB version. | |
""" | |
from __future__ import print_function | |
from gql import gql | |
from sierrapy import SierraClient | |
client = SierraClient('https://hivdb.stanford.edu/graphql') | |
data = client.execute( |
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
inputSequence { | |
header | |
} | |
drugResistance { | |
mutationsByTypes { | |
mutationType, | |
mutations { | |
consensus, | |
position, |
OlderNewer