repo_name stringlengths 7 65 | path stringlengths 5 185 | copies stringlengths 1 4 | size stringlengths 4 6 | content stringlengths 977 990k | license stringclasses 14
values | hash stringlengths 32 32 | line_mean float64 7.18 99.4 | line_max int64 31 999 | alpha_frac float64 0.25 0.95 | ratio float64 1.5 7.84 | autogenerated bool 1
class | config_or_test bool 2
classes | has_no_keywords bool 2
classes | has_few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
all-of-us/raw-data-repository | rdr_service/alembic/versions/079772728b59_removing_deviation_requirement.py | 1 | 2308 | """removing deviation requirement
Revision ID: 079772728b59
Revises: 679d13d850ce
Create Date: 2020-05-01 16:09:17.321892
"""
from alembic import op
import sqlalchemy as sa
import model.utils
from sqlalchemy.dialects import mysql
from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStat... | bsd-3-clause | 4258c7b6795d913eee06d1bb5c14f280 | 31.507042 | 125 | 0.713605 | 3.76509 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/038364a84126_add_fields_for_workbench_api.py | 1 | 4057 | """add fields for workbench api
Revision ID: 038364a84126
Revises: 27b812b403cc
Create Date: 2020-01-08 14:06:44.251432
"""
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils
from rdr_service.participant_enums import WorkbenchResearcherSexAtBirth, WorkbenchResearcherSexualOrientation
# r... | bsd-3-clause | aea73577b6f45bb80e6827a9d7c2e2cc | 46.174419 | 120 | 0.627557 | 3.849146 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/relatedperson.py | 1 | 4720 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/RelatedPerson) on 2017-03-22.
# 2017, SMART Health IT.
from . import domainresource
class RelatedPerson(domainresource.DomainResource):
""" An person that is related to a patient, but who ... | bsd-3-clause | 6cc6abfc338263cbcf4d777e2afbab79 | 35.589147 | 105 | 0.616525 | 4.267631 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/19c5c975d852_.py | 1 | 2122 | """
Revision ID: 19c5c975d852
Revises: 011b5659ae29
Create Date: 2021-02-26 14:03:21.579534
"""
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils
from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, OrderStatus
from rdr_service.participant_enums impo... | bsd-3-clause | d37110e1aa64ae76cd82598c4be629d4 | 33.225806 | 125 | 0.744581 | 3.461664 | false | false | false | false |
django/django-localflavor | tests/test_in.py | 3 | 6889 | from django.test import SimpleTestCase
from localflavor.in_.forms import (INAadhaarNumberField, INPANCardNumberFormField, INStateField, INStateSelect,
INZipCodeField)
class INLocalFlavorTests(SimpleTestCase):
maxDiff = None
def test_INPStateSelect(self):
f = INStat... | bsd-3-clause | 365a3cad26dda50ad2635ec9c15aa122 | 31.961722 | 111 | 0.496298 | 3.132788 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/group.py | 1 | 7440 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Group) on 2017-03-22.
# 2017, SMART Health IT.
from . import domainresource
class Group(domainresource.DomainResource):
""" Group of multiple entities.
Represents a defined collec... | bsd-3-clause | 23f8e245be70824034aa457d43684182 | 34.598086 | 132 | 0.597715 | 4.366197 | false | false | false | false |
all-of-us/raw-data-repository | ci/old_scripts/release_notes.py | 1 | 7516 | #!/usr/bin/env python
"""Generates release notes for a given deployed AppEngine environment based on code at HEAD.
We expect deployed versions to be named with a git tag like v0-1-rc14. This script gets a project's
current version, then gets commit messages from that tag to HEAD, and formats the messages (with
JIRA's ... | bsd-3-clause | 1b50adf29496757c4a45e352f2663498 | 39.627027 | 119 | 0.664715 | 3.468389 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/genomic/validation.py | 1 | 3509 | import collections
import datetime
import functools
import operator
from rdr_service import clock
from rdr_service.dao.genomics_dao import GenomicSetDao
from rdr_service.participant_enums import SampleStatus, WithdrawalStatus
from rdr_service.genomic_enums import GenomicSetStatus, GenomicSetMemberStatus, GenomicValida... | bsd-3-clause | 0c8f61a0f944a0c917686b1ed0e92833 | 42.320988 | 107 | 0.701339 | 3.45374 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/rdr_client/pairing_assigner.py | 1 | 5499 | """Assigns participants with the specified IDs to the organization.
Usage:
./rdr_client/run_client.sh --project all-of-us-rdr-prod --account $USER@pmi-ops.org \
pairing_assigner.py file.csv --pairing [site|organization|awardee] \
[--dry_run] [--override_site]
Where site = google_group, organization = external_id,... | bsd-3-clause | 14449a8216b1d1a6a67b7b3ecda1aa52 | 36.924138 | 119 | 0.571377 | 3.872535 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/ce0d4837ba00_add_deleted_flag_for_genomic_metrics.py | 1 | 4812 | """add deleted flag for genomic metrics
Revision ID: ce0d4837ba00
Revises: a41c2f2266cb
Create Date: 2021-02-17 13:31:28.006077
"""
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils
from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, OrderStatus
fro... | bsd-3-clause | 2e7c49392fa57fd383c4a2a7a1fe7466 | 52.466667 | 125 | 0.738362 | 3.220884 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/37bac919059e_removing_stored_sample_tmp_table.py | 1 | 3832 | """removing stored sample tmp table
Revision ID: 37bac919059e
Revises: 061dc1adde35
Create Date: 2021-03-10 16:13:28.497174
"""
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils
from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, OrderStatus
from rd... | bsd-3-clause | 88388553409cfdc51e2eeea30a999151 | 46.9 | 181 | 0.731211 | 3.430618 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/model/onsite_id_verification.py | 1 | 2071 | from sqlalchemy import Column, Integer, String, JSON, ForeignKey, event
from sqlalchemy.ext.declarative import declared_attr
from rdr_service.model.utils import Enum, UTCDateTime6
from rdr_service.model.base import Base, model_insert_listener, model_update_listener
from rdr_service.participant_enums import OnSiteVerif... | bsd-3-clause | 2d73ce51883b100c94e431dfee8afec3 | 39.607843 | 111 | 0.720425 | 4.235174 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/model/resource_schema.py | 1 | 1289 |
from sqlalchemy import event, Column, ForeignKey, UniqueConstraint, BigInteger, String, Index
from sqlalchemy.dialects.mysql import JSON
from rdr_service.model.base import Base, model_insert_listener, model_update_listener
from rdr_service.model.utils import UTCDateTime6
class ResourceSchema(Base):
"""
Reso... | bsd-3-clause | 131333a0fa3627011f48600c0c4def0f | 39.28125 | 95 | 0.734678 | 3.966154 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/questionnaireresponse.py | 1 | 10757 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse) on 2017-03-22.
# 2017, SMART Health IT.
from . import domainresource
class QuestionnaireResponse(domainresource.DomainResource):
""" A structured set of questions an... | bsd-3-clause | 456d95f8636d93f2cb4284e2fcba3037 | 39.746212 | 132 | 0.615041 | 4.369212 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/api/biobank_order_api.py | 1 | 1705 | from flask import request
from rdr_service.api.base_api import UpdatableApi
from rdr_service.api_util import PTC_AND_HEALTHPRO
from rdr_service.app_util import auth_required
from rdr_service.dao.biobank_order_dao import BiobankOrderDao
class BiobankOrderApi(UpdatableApi):
def __init__(self):
super(Bioban... | bsd-3-clause | 1ce3627d294df24c5193b9ccb1f14e7b | 36.065217 | 91 | 0.646921 | 3.18097 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_1_0_6/models/eligibilityresponse.py | 1 | 3429 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 1.0.2.7202 (http://hl7.org/fhir/StructureDefinition/EligibilityResponse) on 2016-06-23.
# 2016, SMART Health IT.
from . import domainresource
class EligibilityResponse(domainresource.DomainResource):
""" EligibilityResponse resource.
... | bsd-3-clause | b74142ac30c59f4146ca342d46861055 | 37.52809 | 110 | 0.614465 | 4.351523 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/tools/tool_libs/genomic_datagen.py | 1 | 11364 | #! /bin/env python
#
# Template for RDR tool python program.
#
import argparse
import csv
import logging
import os
import sys
from rdr_service import clock
from rdr_service.dao.genomic_datagen_dao import GenomicDataGenRunDao
from rdr_service.services.genomic_datagen import ParticipantGenerator, GeneratorOutputTemplate... | bsd-3-clause | f50f0e3ed6a54b0f383225bca0932a6f | 39.297872 | 118 | 0.582717 | 4.124864 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/tools/tool_libs/data-dictionary.py | 1 | 1056 | import argparse
from rdr_service.config import DATA_DICTIONARY_DOCUMENT_ID
from rdr_service.services.data_dictionary_updater import DataDictionaryUpdater
from rdr_service.tools.tool_libs.tool_base import cli_run, logger, ToolBase
tool_cmd = 'data-dictionary'
tool_desc = "Supplemental tool for managing RDR's data-dic... | bsd-3-clause | a5d9ad149de33ab9e41695a02ad0b9b2 | 34.2 | 108 | 0.731061 | 3.666667 | false | true | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/806f7c2031a5_add_order_finalized_time.py | 1 | 2116 | """Add order finalized time
Revision ID: 806f7c2031a5
Revises: 5ec19e6b8726
Create Date: 2019-10-23 13:19:45.264759
"""
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils
from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, OrderStatus
from rdr_servic... | bsd-3-clause | 96e0bf21544cab56ccc6e0285a45a794 | 33.129032 | 125 | 0.749055 | 3.56229 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_1_0_6/models/devicemetric.py | 1 | 5021 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 1.0.2.7202 (http://hl7.org/fhir/StructureDefinition/DeviceMetric) on 2016-06-23.
# 2016, SMART Health IT.
from . import domainresource
class DeviceMetric(domainresource.DomainResource):
""" Measurement, calculation or setting capability of a... | bsd-3-clause | 6d7b82965e1fd0911ef4b97d541e98a3 | 37.037879 | 103 | 0.609042 | 4.459147 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/2c3a71f9fc04_add_genomic_set_member_columns_for_aw3_.py | 1 | 3524 | """add_genomic_set_member columns_for_aw3_aw4
Revision ID: 2c3a71f9fc04
Revises: c069abb92cc0
Create Date: 2020-08-25 08:57:17.987756
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '2c3a71f9fc04'
down_revision = 'c069abb92c... | bsd-3-clause | 4e3ed6020d55720fa7ffbc3dbf3b3d2d | 42.506173 | 158 | 0.695516 | 2.914806 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/codeableconcept.py | 1 | 1591 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/CodeableConcept) on 2017-03-22.
# 2017, SMART Health IT.
from . import element
class CodeableConcept(element.Element):
""" Concept - reference to a terminology or just text.
A co... | bsd-3-clause | 58b57eb2c1a804347ab7bfbe124433d1 | 30.82 | 107 | 0.620365 | 4.111111 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/rdr_client/dv_order.py | 1 | 2337 | """Simple client demonstrating how to create and retrieve a participant"""
import logging
import pprint
from rdr_service.main_util import configure_logging
from rdr_service.rdr_client.client import Client
def main():
client = Client()
body = {
"authoredOn": "2019-02-12",
"contained": [
... | bsd-3-clause | d7361f617ddba55dd76bc9754cb65b4a | 37.95 | 115 | 0.489944 | 3.787682 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/app_util.py | 1 | 16764 | import calendar
import datetime
import email.utils
import flask
from flask_limiter import Limiter
from flask_limiter.util import get_remote_address
import logging
from requests.exceptions import RequestException
from time import sleep
from typing import Callable, Collection
import urllib.parse
import netaddr
import py... | bsd-3-clause | 4d3e96e2fe000dcd4f6d092171852373 | 35.522876 | 119 | 0.64561 | 4.060063 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/f69e4a978a1f_adding_branching_logic_to_survey_.py | 1 | 1949 | """adding branching logic to survey questions
Revision ID: f69e4a978a1f
Revises: 615d1f3a5cd4
Create Date: 2022-03-14 14:04:08.341608
"""
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils
from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, OrderStat... | bsd-3-clause | b6129f43b25dfbc92ab394262a5ba451 | 31.483333 | 125 | 0.752181 | 3.582721 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/library.py | 1 | 8296 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Library) on 2017-03-22.
# 2017, SMART Health IT.
from . import domainresource
class Library(domainresource.DomainResource):
""" Represents a library of quality improvement components.
... | bsd-3-clause | ecca9d52ed810102a63e69f21252f65f | 37.948357 | 103 | 0.603544 | 4.474649 | false | false | false | false |
django/django-localflavor | localflavor/nl/forms.py | 3 | 3623 | """NL-specific Form helpers."""
import re
from django import forms
from .nl_provinces import PROVINCE_CHOICES
from .validators import NLBSNFieldValidator, NLLicensePlateFieldValidator, NLZipCodeFieldValidator
class NLZipCodeField(forms.CharField):
"""A Dutch zip code field."""
default_validators = [NLZipC... | bsd-3-clause | c93f9a3c36bf6acbcab4f599d1163b4e | 36.350515 | 116 | 0.538504 | 2.673801 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_4_0_0/models/adverseevent.py | 1 | 10267 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/AdverseEvent) on 2019-05-07.
# 2019, SMART Health IT.
from . import domainresource
class AdverseEvent(domainresource.DomainResource):
""" Medical care, research study or other healthc... | bsd-3-clause | 48d6f1bdace09386971dd875e62d9638 | 41.60166 | 111 | 0.631441 | 4.221628 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_4_0_0/models/binary_tests.py | 1 | 1330 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b on 2019-05-07.
# 2019, SMART Health IT.
import os
import io
import unittest
import json
from . import binary
from .fhirdate import FHIRDate
class BinaryTests(unittest.TestCase):
def instantiate_from(self, filename):
... | bsd-3-clause | d79031b8de342c560f6a5d55722a98e5 | 32.25 | 103 | 0.65188 | 3.436693 | false | true | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/0ffdadea0b92_adding_measurement.py | 1 | 2991 | """Adding measurement
Revision ID: 0ffdadea0b92
Revises: ffcd82a35890
Create Date: 2017-08-30 17:33:54.104062
"""
import model.utils
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "0ffdadea0b92"
down_revision = "ffcd82a35890"
branch_labels = None
depends_on = None
... | bsd-3-clause | 6d766debdb3b5b7b1d855912986ddc26 | 37.346154 | 114 | 0.662989 | 3.767003 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/825eefb014f9_adding_w5nf_analysis_attributes.py | 1 | 4265 | """adding_w5nf_analysis_attributes
Revision ID: 825eefb014f9
Revises: 6cb9405f1549, 57515daf8448, 33b34f5ae271
Create Date: 2022-03-30 15:51:16.904983
"""
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils
from rdr_service.participant_enums import PhysicalMeasurementsStatus, Questionnaire... | bsd-3-clause | 78c3964e175fa660375ab0899509f1cc | 46.921348 | 125 | 0.721454 | 3.104076 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_4_0_0/models/operationdefinition_tests.py | 1 | 4857 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b on 2019-05-07.
# 2019, SMART Health IT.
import os
import io
import unittest
import json
from . import operationdefinition
from .fhirdate import FHIRDate
class OperationDefinitionTests(unittest.TestCase):
def instantiate_fro... | bsd-3-clause | 276e7c08587cccf14dff97d4d24646a2 | 55.476744 | 187 | 0.698991 | 3.690729 | false | true | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_1_0_6/models/imagingobjectselection_tests.py | 1 | 3701 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 1.0.2.7202 on 2016-06-23.
# 2016, SMART Health IT.
import io
import json
import os
import unittest
from . import imagingobjectselection
from .fhirdate import FHIRDate
class ImagingObjectSelectionTests(unittest.TestCase):
def instantiate_fr... | bsd-3-clause | 2354e2d230d7bbf952e55ba2fb5af5d3 | 61.728814 | 173 | 0.707647 | 2.87568 | false | true | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/processresponse.py | 1 | 5987 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ProcessResponse) on 2017-03-22.
# 2017, SMART Health IT.
from . import domainresource
class ProcessResponse(domainresource.DomainResource):
""" ProcessResponse resource.
This reso... | bsd-3-clause | d38fc170dd46ab1e57a216edad31d057 | 37.625806 | 109 | 0.625522 | 4.525321 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/substance.py | 1 | 6510 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Substance) on 2017-03-22.
# 2017, SMART Health IT.
from . import domainresource
class Substance(domainresource.DomainResource):
""" A homogeneous material with a definite composition.
... | bsd-3-clause | 81328c1e986250d1fe134abba676ccaf | 36.2 | 128 | 0.626882 | 4.389751 | false | false | false | false |
django/django-localflavor | localflavor/de/forms.py | 2 | 3538 | """DE-specific Form helpers."""
import re
from django.core.exceptions import ImproperlyConfigured
from django.forms import ValidationError
from django.forms.fields import CharField, RegexField, Select
from django.utils.translation import gettext_lazy as _
from .de_states import STATE_CHOICES
ID_RE = re.compile(r"^(... | bsd-3-clause | 9e7766db5c55aaff6c11c6aba75d3ebf | 33.019231 | 82 | 0.573488 | 4.142857 | false | false | false | false |
all-of-us/raw-data-repository | tests/api_tests/test_deceased_report_api.py | 1 | 36956 | from copy import deepcopy
from datetime import date, datetime, timedelta
import pytz
from rdr_service import config
from rdr_service.api_util import HEALTHPRO, PTC
from rdr_service.model.api_user import ApiUser
from rdr_service.model.deceased_report import DeceasedReport
from rdr_service.model.participant_summary impo... | bsd-3-clause | d906529eb58fc5933c952d7e14ea2ca2 | 46.74677 | 120 | 0.666171 | 3.820531 | false | true | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_1_0_6/models/questionnaire_tests.py | 1 | 14250 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 1.0.2.7202 on 2016-06-23.
# 2016, SMART Health IT.
import io
import json
import os
import unittest
from . import questionnaire
from .fhirdate import FHIRDate
class QuestionnaireTests(unittest.TestCase):
def instantiate_from(self, filename)... | bsd-3-clause | 800ba8483277d72abe447c43a419acf2 | 64.972222 | 158 | 0.678456 | 3.215253 | false | false | false | false |
all-of-us/raw-data-repository | tests/service_tests/test_data_dictionary_updater.py | 1 | 19671 | from datetime import datetime
from rdr_service.services.data_dictionary_updater import DataDictionaryUpdater, changelog_tab_id, dictionary_tab_id,\
internal_tables_tab_id, hpo_key_tab_id, questionnaire_key_tab_id, site_key_tab_id
from tests.service_tests.test_google_sheets_client import GoogleSheetsTestBase
clas... | bsd-3-clause | a1c13502ae3ecaa0980fa19d5b55caf1 | 52.021563 | 120 | 0.639927 | 3.98279 | false | true | false | false |
all-of-us/raw-data-repository | rdr_service/tools/tool_libs/resource_tool.py | 1 | 68245 | #! /bin/env python
#
# PDR data tools.
#
import argparse
# pylint: disable=superfluous-parens
# pylint: disable=broad-except
import datetime
import logging
import math
import os
import sys
from time import sleep
from werkzeug.exceptions import NotFound
from rdr_service.model.genomics import UserEventMetrics
from rdr... | bsd-3-clause | f2c526561a3ab4bef5006411fcf6c25d | 41.948395 | 120 | 0.564012 | 3.927092 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/endpoint.py | 1 | 4637 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Endpoint) on 2017-03-22.
# 2017, SMART Health IT.
from . import domainresource
class Endpoint(domainresource.DomainResource):
""" The technical details of an endpoint that can be used for ... | bsd-3-clause | d845b88ee118540fc6aab5492b99080a | 37.641667 | 110 | 0.621954 | 4.378659 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/da96192073f0_modify_genomic_set_member_after_e2e.py | 1 | 3350 | """modify genomic_set_member after e2e
Revision ID: da96192073f0
Revises: b0520bacfbd0
Create Date: 2020-06-25 12:15:13.956804
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'da96192073f0'
down_revision = 'b0520bacfbd0'
br... | bsd-3-clause | 5d886fed3a951402072f1de85853344d | 38.880952 | 134 | 0.664478 | 3.163362 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/code_constants.py | 1 | 11043 | """Constants for code values for questions and modules and their mappings to fields on
participant summaries and metrics."""
PPI_SYSTEM = "http://terminology.pmi-ops.org/CodeSystem/ppi"
# System for codes that are used in questionnaires but we don't need for analysis purposes;
# these codes are ignored by RDR.
PPI_EXT... | bsd-3-clause | f356aeba9c7551ec522c2f3a94a33d40 | 37.611888 | 96 | 0.774427 | 2.574726 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/genomic/genomic_mappings.py | 1 | 12678 | """
This module provides central location for all genomics_mappings
"""
from rdr_service.genomic_enums import GenomicReportState
genome_type_to_aw1_aw2_file_prefix = {
"aou_array": "GEN",
"aou_wgs": "SEQ",
"aou_array_investigation": "GEN",
"aou_wgs_investigation": "SEQ"
}
raw_aw1_to_genomic_set_member... | bsd-3-clause | 609c71a120b0bab3f86858d2579ca458 | 41.543624 | 88 | 0.530683 | 3.203133 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_1_0_6/models/medication.py | 1 | 9113 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 1.0.2.7202 (http://hl7.org/fhir/StructureDefinition/Medication) on 2016-06-23.
# 2016, SMART Health IT.
from . import domainresource
class Medication(domainresource.DomainResource):
""" Definition of a Medication.
This resource is p... | bsd-3-clause | 033aff0242d0219b755bc1ba85d7d301 | 35.745968 | 101 | 0.6257 | 4.471541 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_4_0_0/models/substancesourcematerial.py | 1 | 21182 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/SubstanceSourceMaterial) on 2019-05-07.
# 2019, SMART Health IT.
from . import domainresource
class SubstanceSourceMaterial(domainresource.DomainResource):
""" Source material shall c... | bsd-3-clause | b7a2c2cede8d82cb1e57b288cd8896ce | 47.232346 | 122 | 0.670681 | 4.370279 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/parameterdefinition.py | 1 | 2568 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ParameterDefinition) on 2017-03-22.
# 2017, SMART Health IT.
from . import element
class ParameterDefinition(element.Element):
""" Definition of a parameter to a module.
The param... | bsd-3-clause | 73bb2a87fb377b4abd1b0b3472d18109 | 32.350649 | 111 | 0.58528 | 4.39726 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/1dff4309d707_hash_and_duplicate_flag_on_.py | 1 | 2154 | """hash and duplicate flag on questionnaire response
Revision ID: 1dff4309d707
Revises: a6c3846e5eae
Create Date: 2021-04-01 12:55:33.967305
"""
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils
from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, Or... | bsd-3-clause | 56efd632efa7106de3e23a70e8d3be13 | 33.741935 | 132 | 0.750232 | 3.602007 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/query.py | 1 | 3882 | """A query to run against a DAO (abstracted from the persistent level)."""
from protorpc import messages
from sqlalchemy import func, not_, or_
class Operator(messages.Enum):
EQUALS = 0 # Case insensitive comparison for strings, exact comparison otherwise
LESS_THAN = 1
GREATER_THAN = 2
LESS_THAN_OR_EQ... | bsd-3-clause | b062545c825cd43b31dde783a14db794 | 30.560976 | 91 | 0.615147 | 3.885886 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/concepts.py | 1 | 4142 | """A single place for FHIR concepts."""
from collections import namedtuple
from rdr_service.census_regions import census_regions
Concept = namedtuple("Concept", ["system", "code"])
SYSTEM_CONSENT_FORM = "http://terminology.pmi-ops.org/CodeSystem/consent-form"
ENROLLMENT_CONSENT_FORM = Concept(SYSTEM_CONSENT_FORM, ... | bsd-3-clause | b257603cadfdfa39de71cf7c7d134b9b | 41.265306 | 98 | 0.750845 | 2.490679 | false | false | false | false |
django/django-localflavor | localflavor/id_/forms.py | 2 | 7603 | """ID-specific Form helpers."""
import re
import time
from django.core.exceptions import ImproperlyConfigured
from django.forms import ValidationError
from django.forms.fields import CharField, Select
from django.utils.translation import gettext_lazy as _
postcode_re = re.compile(r'^[1-9]\d{4}$')
plate_re = re.compi... | bsd-3-clause | effff0f1f63004cec9187e7783c424aa | 34.863208 | 102 | 0.615546 | 3.795806 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/identifier.py | 1 | 2591 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Identifier) on 2017-03-22.
# 2017, SMART Health IT.
from . import element
class Identifier(element.Element):
""" An identifier intended for computation.
A technical identifier - i... | bsd-3-clause | b96d9e226c4a73597e982f21538b06e8 | 32.649351 | 102 | 0.598997 | 4.268534 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_1_0_6/models/fhirabstractresource.py | 1 | 6973 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Base class for FHIR resources.
# 2014, SMART Health IT.
from . import fhirabstractbase
class FHIRAbstractResource(fhirabstractbase.FHIRAbstractBase):
""" Extends the FHIRAbstractBase with server talking capabilities.
"""
resource_name = 'FHIRAbstractRes... | bsd-3-clause | 8bec6c97950e31a248d050999b1386dd | 35.507853 | 115 | 0.60849 | 4.504522 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/offline/biobank_samples_pipeline.py | 1 | 39087 | """Reads a CSV that Biobank uploads to GCS and upserts to the BiobankStoredSample table.
Also updates ParticipantSummary data related to samples.
"""
import csv
import datetime
from dateutil.parser import parse
import logging
import math
import os
import pytz
from sqlalchemy import case
from sqlalchemy.orm import ali... | bsd-3-clause | b0d5d8c567284ab58ee0d1fff50824ac | 40.670576 | 120 | 0.679535 | 3.551426 | false | false | false | false |
django/django-localflavor | localflavor/se/utils.py | 4 | 2784 | import datetime
def id_number_checksum(gd):
"""Calculates a Swedish ID number checksum, using the "Luhn"-algoritm."""
n = s = 0
for c in (gd['year'] + gd['month'] + gd['day'] + gd['serial']):
# When validating interim ID numbers, the letter is considered
# equivalent to 1. Source:
... | bsd-3-clause | 941503744368cf4f851f69da54447b49 | 29.933333 | 96 | 0.579023 | 3.449814 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_4_0_0/models/healthcareservice_tests.py | 1 | 6957 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b on 2019-05-07.
# 2019, SMART Health IT.
import os
import io
import unittest
import json
from . import healthcareservice
from .fhirdate import FHIRDate
class HealthcareServiceTests(unittest.TestCase):
def instantiate_from(se... | bsd-3-clause | a1c64378c4793177cd20219a92d0c25e | 63.416667 | 162 | 0.700014 | 3.365747 | false | true | false | false |
all-of-us/raw-data-repository | rdr_service/api/participant_summary_api.py | 1 | 11905 | import logging
from flask import request
from werkzeug.exceptions import BadRequest, Forbidden, InternalServerError, NotFound
from rdr_service.api.base_api import BaseApi, make_sync_results_for_request
from rdr_service.api_util import AWARDEE, DEV_MAIL, RDR_AND_PTC, PTC_HEALTHPRO_AWARDEE_CURATION
from rdr_service.app... | bsd-3-clause | 07905b87137220923be7fc4e847bf1ce | 39.355932 | 112 | 0.60924 | 3.849014 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_1_0_6/models/episodeofcare_tests.py | 1 | 3909 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 1.0.2.7202 on 2016-06-23.
# 2016, SMART Health IT.
import io
import json
import os
import unittest
from . import episodeofcare
from .fhirdate import FHIRDate
class EpisodeOfCareTests(unittest.TestCase):
def instantiate_from(self, filename)... | bsd-3-clause | e667c0f32d5f2303bb044bdfd80f7d56 | 54.056338 | 108 | 0.68483 | 3.235927 | false | true | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_4_0_0/models/careplan.py | 1 | 15036 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/CarePlan) on 2019-05-07.
# 2019, SMART Health IT.
from . import domainresource
class CarePlan(domainresource.DomainResource):
""" Healthcare plan for patient or group.
Descri... | bsd-3-clause | 3f61df3139201c4a01ac569c440575a7 | 39.970027 | 123 | 0.601889 | 4.318208 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/repository/questionnaire_response_repository.py | 1 | 10019 | from collections import defaultdict
from datetime import datetime
from typing import Dict, List, Optional
from sqlalchemy import and_, func, or_
from sqlalchemy.orm import aliased, joinedload, Session
from rdr_service import code_constants, participant_enums as enums
from rdr_service.domain_model import response as r... | bsd-3-clause | 210b3bfa5c674c3c2c402d5a30d22901 | 46.937799 | 116 | 0.616529 | 4.642725 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/69453413dfc3_change_site_to_unicode_text.py | 1 | 1720 | """change site to unicode text
Revision ID: 69453413dfc3
Revises: 0a4ccc37472a
Create Date: 2018-07-11 14:20:54.392997
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "69453413dfc3"
down_revision = "0a4ccc37472a"
branch_labels = None
depends_on = None
def upgr... | bsd-3-clause | 03e4c906fc1a244321d6a66a8c2980ec | 28.152542 | 118 | 0.672093 | 3.460765 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_4_0_0/models/measurereport_tests.py | 1 | 30095 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b on 2019-05-07.
# 2019, SMART Health IT.
import os
import io
import unittest
import json
from . import measurereport
from .fhirdate import FHIRDate
class MeasureReportTests(unittest.TestCase):
def instantiate_from(self, file... | bsd-3-clause | 521f7138490084910991299302fe4ecf | 82.830084 | 124 | 0.698056 | 3.175918 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/goal.py | 1 | 8483 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Goal) on 2017-03-22.
# 2017, SMART Health IT.
from . import domainresource
class Goal(domainresource.DomainResource):
""" Describes the intended objective(s) for a patient, group or organi... | bsd-3-clause | 7851ce41ac5928063ee32b16d48b60aa | 39.588517 | 182 | 0.618649 | 4.254263 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/model/questionnaire_response.py | 1 | 8091 | from sqlalchemy import (
Boolean,
Column,
Date,
Float,
ForeignKey,
ForeignKeyConstraint,
Index,
Integer,
String,
Text
)
from sqlalchemy import BLOB # pylint: disable=unused-import
from sqlalchemy.orm import relationship
from sqlalchemy.sql import text
from typing import List
fr... | bsd-3-clause | ef49c42cdfe53d3464b3f2788ea14754 | 45.768786 | 114 | 0.721542 | 4.24279 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_4_0_0/models/riskevidencesynthesis.py | 1 | 18420 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/RiskEvidenceSynthesis) on 2019-05-07.
# 2019, SMART Health IT.
from . import domainresource
class RiskEvidenceSynthesis(domainresource.DomainResource):
""" A quantified estimate of ri... | bsd-3-clause | b82bb51c19e92461b6e67f43caac3891 | 39.306346 | 135 | 0.617915 | 4.348442 | false | false | false | false |
django/django-localflavor | localflavor/sg/forms.py | 3 | 2857 | """Singapore-specific Form helpers."""
import re
from django.forms import ValidationError
from django.forms.fields import CharField, RegexField
from django.utils.encoding import force_str
from django.utils.translation import gettext_lazy as _
NRIC_FIN_RE = re.compile(r'^[SFTG](\d{7})[A-Z]$')
NRIC_FIN_DIGIT_WEIGHT = ... | bsd-3-clause | 762728af2151677fedb0d25374bc3e45 | 34.271605 | 81 | 0.583129 | 3.177976 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/api/metrics_api.py | 1 | 1756 | import datetime
import json
from flask import request
from flask_restful import Resource
from werkzeug.exceptions import BadRequest
from rdr_service import app_util
from rdr_service.api_util import HEALTHPRO
from rdr_service.dao.metrics_dao import MetricsBucketDao
DATE_FORMAT = "%Y-%m-%d"
DAYS_LIMIT = 7
class Metr... | bsd-3-clause | a90a6a8059b59fa80a4ff24af8b8d8ab | 37.173913 | 91 | 0.603075 | 4.064815 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/model/bq_pdr_participant_summary.py | 1 | 29463 | #
# BigQuery schemas for PDR that do not contain PII.
#
#
from rdr_service.model.bq_base import BQTable, BQSchema, BQView, BQField, BQFieldTypeEnum, BQFieldModeEnum, \
BQRecordField
from rdr_service.model.bq_participant_summary import (
BQRaceSchema,
BQGenderSchema,
BQModuleStatusSchema,
BQConsentSc... | bsd-3-clause | 48576ce471d5c846ccd51f5a1e2d68a6 | 52.471869 | 120 | 0.674948 | 3.343129 | false | true | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/server.py | 1 | 10865 | # -*- coding: utf-8 -*-
import json
import logging
import requests
try: # Python 2.x
import urllib.parse
except ImportError as e: # Python 3
import urllib.parse as urlparse
from .auth import FHIRAuth
FHIRJSONMimeType = 'application/fhir+json'
logger = logging.getL... | bsd-3-clause | 71e14bd2680c52496f64fd6cd782aa42 | 34.048387 | 134 | 0.615647 | 4.221057 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_4_0_0/models/medicationdispense.py | 1 | 12359 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/MedicationDispense) on 2019-05-07.
# 2019, SMART Health IT.
from . import domainresource
class MedicationDispense(domainresource.DomainResource):
""" Dispensing a medication to a name... | bsd-3-clause | 4eb5c23117ff23b64d84ff87384a1a77 | 42.213287 | 138 | 0.634436 | 4.321329 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_4_0_0/models/codesystem_tests.py | 1 | 16116 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b on 2019-05-07.
# 2019, SMART Health IT.
import os
import io
import unittest
import json
from . import codesystem
from .fhirdate import FHIRDate
class CodeSystemTests(unittest.TestCase):
def instantiate_from(self, filename):... | bsd-3-clause | 3347bd8c90a606f4524eccfd3a431b54 | 60.51145 | 211 | 0.68764 | 3.522623 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_4_0_0/models/observationdefinition_tests.py | 1 | 1758 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b on 2019-05-07.
# 2019, SMART Health IT.
import os
import io
import unittest
import json
from . import observationdefinition
from .fhirdate import FHIRDate
class ObservationDefinitionTests(unittest.TestCase):
def instantiate... | bsd-3-clause | 5d89230a7f5391f48bace5220a918140 | 39.883721 | 103 | 0.694539 | 3.632231 | false | true | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_1_0_6/models/basic_tests.py | 1 | 5714 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 1.0.2.7202 on 2016-06-23.
# 2016, SMART Health IT.
import io
import json
import os
import unittest
from . import basic
from .fhirdate import FHIRDate
class BasicTests(unittest.TestCase):
def instantiate_from(self, filename):
datadi... | bsd-3-clause | b8e61cd01c820c5da1f3d876cec99857 | 53.419048 | 149 | 0.693385 | 3.433894 | false | true | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/50d9eeb498c3_genomic_contamination_records.py | 1 | 2402 | """genomic contamination records
Revision ID: 50d9eeb498c3
Revises: 2d20e3ee280a
Create Date: 2020-12-17 15:25:04.596627
"""
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils
from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, OrderStatus
from rdr_s... | bsd-3-clause | 5440a50620de2af18bdaa7f5e392cbe3 | 33.811594 | 125 | 0.743547 | 3.537555 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/resource/generators/retention_metrics.py | 1 | 1965 | #
# This file is subject to the terms and conditions defined in the
# file 'LICENSE', which is part of this source code package.
#
import logging
from sqlalchemy.sql import text
from werkzeug.exceptions import NotFound
from rdr_service.dao.resource_dao import ResourceDataDao
from rdr_service.resource import generator... | bsd-3-clause | 3d0367265dce8e4a5313ec7a1e0f9def | 39.9375 | 120 | 0.654962 | 4.189765 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/tools/tool_libs/consent_validation_report.py | 1 | 61856 | #! /bin/env python
#
# Temporary tool for manually generating consent validation metrics (until it can be automated by dashboard team)
# Also creates CSV files for PTSC with information about consent errors.
#
import argparse
# pylint: disable=superfluous-parens
# pylint: disable=broad-except
import logging
import sy... | bsd-3-clause | 8118abee2eb2dd1da680df8ed5878c4b | 54.575921 | 120 | 0.625016 | 4.005439 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/encounter_tests.py | 1 | 28372 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 on 2017-03-22.
# 2017, SMART Health IT.
import io
import json
import os
import unittest
from . import encounter
from .fhirdate import FHIRDate
class EncounterTests(unittest.TestCase):
def instantiate_from(self, filename):
... | bsd-3-clause | a8763fc5cf86ed09e7495947918f4cf1 | 64.524249 | 159 | 0.695615 | 3.178579 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/clinicalimpression.py | 1 | 10611 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ClinicalImpression) on 2017-03-22.
# 2017, SMART Health IT.
from . import domainresource
class ClinicalImpression(domainresource.DomainResource):
""" A clinical assessment performed when p... | bsd-3-clause | d0646cd822bf9328ef3396db87a81805 | 41.78629 | 192 | 0.640844 | 4.283811 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/elementdefinition.py | 1 | 62683 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ElementDefinition) on 2017-03-22.
# 2017, SMART Health IT.
from . import element
class ElementDefinition(element.Element):
""" Definition of an element in a resource or extension.
... | bsd-3-clause | 21d5494399f98486d7910baa767941cb | 41.267701 | 138 | 0.590479 | 4.571731 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/resource.py | 1 | 1814 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Resource) on 2017-03-22.
# 2017, SMART Health IT.
from . import fhirabstractresource
class Resource(fhirabstractresource.FHIRAbstractResource):
""" Base Resource.
This is the base... | bsd-3-clause | 7f7bd4aa45e50f565d81ceda6c970df0 | 29.745763 | 100 | 0.585447 | 4.199074 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_1_0_6/models/detectedissue_tests.py | 1 | 4545 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 1.0.2.7202 on 2016-06-23.
# 2016, SMART Health IT.
import io
import json
import os
import unittest
from . import detectedissue
from .fhirdate import FHIRDate
class DetectedIssueTests(unittest.TestCase):
def instantiate_from(self, filename)... | bsd-3-clause | cce3fb8c462356391624527f904c6cd8 | 44.45 | 200 | 0.676128 | 3.456274 | false | true | false | false |
all-of-us/raw-data-repository | rdr_service/tools/tool_libs/rdr_docs.py | 1 | 5500 | #! /bin/env python
#
# Tool to manage the RDR readthedocs project via its public API.
#
import argparse
import logging
import sys
from json import dumps
from time import sleep
from rdr_service.services.system_utils import setup_logging, setup_i18n
from rdr_service.services.documentation_utils import ReadTheDocsHand... | bsd-3-clause | 4311fd73b83c07207e0d7f0dbb2234d2 | 40.353383 | 118 | 0.628182 | 3.835425 | false | true | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/1ebd26a7612c_add_origin_to_biobank_order.py | 1 | 1284 | """add_origin_to_biobank_order
Revision ID: 1ebd26a7612c
Revises: c2fa79ef2fca
Create Date: 2020-02-26 12:00:50.340756
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1ebd26a7612c'
down_revision = 'c2fa79ef2fca'
branch_labels = None
depends_on = None
def upgr... | bsd-3-clause | 290b3ca0f08ad05bd12aaf889ca1806b | 24.176471 | 100 | 0.668224 | 3.34375 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_1_0_6/models/messageheader_tests.py | 1 | 2390 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 1.0.2.7202 on 2016-06-23.
# 2016, SMART Health IT.
import io
import json
import os
import unittest
from . import messageheader
from .fhirdate import FHIRDate
class MessageHeaderTests(unittest.TestCase):
def instantiate_from(self, filename)... | bsd-3-clause | ff15c1c8169be4ea5862e5eb02a5d9ef | 43.259259 | 103 | 0.6841 | 3.361463 | false | true | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_4_0_0/models/namingsystem.py | 1 | 6219 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/NamingSystem) on 2019-05-07.
# 2019, SMART Health IT.
from . import domainresource
class NamingSystem(domainresource.DomainResource):
""" System of unique identification.
A c... | bsd-3-clause | f60ae961171b1df534300d8169ce2b31 | 34.537143 | 109 | 0.589001 | 4.348951 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_4_0_0/models/valueset_tests.py | 1 | 36643 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b on 2019-05-07.
# 2019, SMART Health IT.
import os
import io
import unittest
import json
from . import valueset
from .fhirdate import FHIRDate
class ValueSetTests(unittest.TestCase):
def instantiate_from(self, filename):
... | bsd-3-clause | a4da61e79552a28de702919ca98d627b | 69.998062 | 219 | 0.699058 | 3.424472 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/medicationstatement.py | 1 | 8902 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/MedicationStatement) on 2017-03-22.
# 2017, SMART Health IT.
from . import domainresource
class MedicationStatement(domainresource.DomainResource):
""" Record of medication being taken by ... | bsd-3-clause | a0a03679502014baa09dc6e3b5205d4f | 46.100529 | 178 | 0.656819 | 4.342439 | false | false | false | false |
django/django-localflavor | localflavor/md/validators.py | 3 | 3143 | import re
from django.core.exceptions import ValidationError
from django.core.validators import RegexValidator
from django.utils.translation import gettext_lazy as _
from .choices import (LICENSE_PLATE_DIPLOMATIC, LICENSE_PLATE_GOVERNMENT_TYPE, LICENSE_PLATE_POLICE,
REGION_CHOICES_2002_2015)
c... | bsd-3-clause | b6245de5fdfb1d57905a8cc565c3af7d | 31.739583 | 102 | 0.611836 | 3.488346 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_1_0_6/models/deviceusestatement.py | 1 | 3846 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 1.0.2.7202 (http://hl7.org/fhir/StructureDefinition/DeviceUseStatement) on 2016-06-23.
# 2016, SMART Health IT.
from . import domainresource
class DeviceUseStatement(domainresource.DomainResource):
""" None.
A record of a device bei... | bsd-3-clause | f6efa0df181a40fa14f706721f58b580 | 37.079208 | 126 | 0.599324 | 4.189542 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/3e991a30426b_adding_pipeline_id.py | 1 | 2129 | """adding_pipeline_id
Revision ID: 3e991a30426b
Revises: 4fa9a3846491, 88ea1bb98358
Create Date: 2021-10-20 15:17:12.729113
"""
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils
from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, OrderStatus
from rd... | bsd-3-clause | a363cc4d286157c48de1a87bacc864fc | 33.901639 | 125 | 0.746829 | 3.467427 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/tools/ehr_upload.py | 1 | 5475 | """Get site/participant info for a given organization to fetch consent forms from
ptc-uploads-all-of-us-rdr-prod (the default location for new participant uploads from PTC.
Syncs consent files to a new organization bucket by the same name in the Awardees consent bucket
i.e.aou179/hpo-site-xxx/Participant/<consent files... | bsd-3-clause | 6ab6a9336832a186e7095571d78c2863 | 33.006211 | 114 | 0.611689 | 3.635458 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/rdr_client/client.py | 1 | 6893 | import argparse
import copy
import http.client
import json
import logging
import pprint
import httplib2
from oauth2client.service_account import ServiceAccountCredentials
SCOPE = "https://www.googleapis.com/auth/userinfo.email"
DEFAULT_INSTANCE = "https://pmi-drc-api-test.appspot.com"
_DEFAULT_BASE_PATH = "rdr/v1"
PO... | bsd-3-clause | 9c1c1a1fa0d3ddc2e8405fb727c4cebc | 36.259459 | 116 | 0.593065 | 4.195374 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/c68d427d67b3_adding_vcf_tbi_files_to_genomic_gc_.py | 1 | 1376 | """adding vcf tbi files to genomic gc metrics validation
Revision ID: c68d427d67b3
Revises: f80b79cff59e
Create Date: 2020-08-12 15:51:23.285273
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'c68d427d67b3'
down_revision = 'f80b79cff59e'
branch_labels = None
de... | bsd-3-clause | b2632888d23180a3dbab7cabe3d0dc37 | 26.52 | 116 | 0.680233 | 3.331719 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/procedure_tests.py | 1 | 17117 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 on 2017-03-22.
# 2017, SMART Health IT.
import io
import json
import os
import unittest
from . import procedure
from .fhirdate import FHIRDate
class ProcedureTests(unittest.TestCase):
def instantiate_from(self, filename):
... | bsd-3-clause | d2b7178e548766b50b7df2afe937f0ee | 54.937908 | 165 | 0.683473 | 3.329508 | false | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_4_0_0/models/measurereport.py | 1 | 14814 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/MeasureReport) on 2019-05-07.
# 2019, SMART Health IT.
from . import domainresource
class MeasureReport(domainresource.DomainResource):
""" Results of a measure evaluation.
T... | bsd-3-clause | d2e4d92738216e67c1f0580c67eb14a9 | 39.037838 | 112 | 0.638248 | 4.515087 | false | false | false | false |
all-of-us/raw-data-repository | tests/client_tests/test_requests.py | 1 | 1132 | import http.client
import unittest
from tests.client_tests.base import BaseClientTest
class RequestsTest(BaseClientTest):
"""Tests basic mechanics of requests: authorization and headers."""
def test_unauthenticated(self):
response, _ = self.client.request(
"Participant", method="POST", b... | bsd-3-clause | 0e10518c274c5a7ff3e78963613b5d27 | 34.375 | 92 | 0.606007 | 4.223881 | false | true | false | false |
all-of-us/raw-data-repository | tests/dao_tests/test_bigquery_sync_dao.py | 1 | 25805 | from datetime import datetime, timedelta
import json
from rdr_service.clock import FakeClock
from rdr_service import clock
from rdr_service.code_constants import *
from rdr_service.dao.biobank_order_dao import BiobankOrderDao
from rdr_service.dao.participant_dao import ParticipantDao
from rdr_service.dao.physical_meas... | bsd-3-clause | 98f524ea67c4ad3a568d7900bd79858c | 51.02621 | 119 | 0.650068 | 3.637068 | false | true | false | false |
brython-dev/brython | www/cgi-bin/store_speed.py | 1 | 1886 | #!c:/python37/python.exe
# -*- coding: utf-8 -*-
import os
import cgi
import json
import sys
cpython_version = ".".join(str(x) for x in sys.implementation.version[:3])
print('Content-type: text/html\n\n')
print()
fs = cgi.FieldStorage()
results = json.loads(fs["results"].value)
version = fs["version"].value
userAgen... | bsd-3-clause | ebdf1ff143c20abaf17227dd5812e8bd | 23.828947 | 80 | 0.608165 | 2.946875 | false | false | false | false |
brython-dev/brython | www/src/Lib/encodings/mac_romanian.py | 35 | 13968 | """ Python Character Mapping Codec mac_romanian generated from 'MAPPINGS/VENDORS/APPLE/ROMANIAN.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def de... | bsd-3-clause | 4dd1443b29e7cfab8bc99774c7118433 | 43.498371 | 118 | 0.52742 | 3.232585 | false | false | false | false |
brython-dev/brython | www/src/Lib/codeop.py | 1 | 5520 | r"""Utilities to compile possibly incomplete Python source code.
This module provides two interfaces, broadly similar to the builtin
function compile(), which take program text, a filename and a 'mode'
and:
- Return code object if the command is complete and valid
- Return None if the command is incomplete
- Raise Sy... | bsd-3-clause | 7637ab5f3705bb6213e641d956f62719 | 35.078431 | 98 | 0.676812 | 4.52459 | false | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.