python_code
stringlengths
0
679k
repo_name
stringlengths
9
41
file_path
stringlengths
6
149
import logging import dask from cuchemcommon.data.helper.chembldata import IMP_PROPS from cuchemcommon.data.cluster_wf import ChemblClusterWfDao from cuchemcommon.fingerprint import MorganFingerprint, TransformationDefaults logger = logging.getLogger(__name__) def test_dataframe(): """ Verify fetching data ...
cheminformatics-master
cuchem/tests/test_chembl.py
cheminformatics-master
cuchem/tests/__init__.py
#!/opt/conda/envs/rapids/bin/python3 # # Copyright (c) 2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
cheminformatics-master
cuchem/tests/test_benchmark.py
import os import dask import time import inspect import tempfile import logging from locust import events from cuchem.utils.dask import initialize_cluster from cuchemcommon.context import Context logger = logging.getLogger(__name__) def _fetch_chembl_test_dataset(n_molecules=None): if n_molecules is None: ...
cheminformatics-master
cuchem/tests/utils.py
import os import logging import tempfile import dask from cuchemcommon.data.helper.chembldata import ChEmblData from cuchemcommon.data.cluster_wf import FINGER_PRINT_FILES from cuchemcommon.fingerprint import MorganFingerprint, Embeddings logger = logging.getLogger(__name__) def test_cache_morganfingerprint(): ...
cheminformatics-master
cuchem/tests/test_fp_cache.py
import logging from cuchem.benchmark.data import TrainingData logger = logging.getLogger(__name__) def test_training_data(): training_data = TrainingData() cursor = training_data.conn.cursor() cursor.execute('SELECT smiles FROM train_data limit 10') smiles_strs = cursor.fetchall() for smiles in...
cheminformatics-master
cuchem/tests/test_benchmark_data.py
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions a...
cheminformatics-master
cuchem/tests/perf_triton.py
import logging from cuchem.decorator import LipinskiRuleOfFiveDecorator, MolecularStructureDecorator from cuchem.wf.generative import MolBART, Cddd logger = logging.getLogger(__name__) def interpolation(wf, num_points=20, force_unique=False): """ Verify fetching data from chemblDB when the input is a pandas...
cheminformatics-master
cuchem/tests/test_generative_wf.py
cheminformatics-master
cuchem/cuchem/__init__.py
#!/usr/bin/env python3 import glob import os import sys import matplotlib.pyplot as plt import argparse import numpy as np import textwrap import pandas as pd def parse_args(): parser = argparse.ArgumentParser(description='Plot Results') parser.add_argument('-i', '--input_dir', dest=...
cheminformatics-master
cuchem/cuchem/benchmark/plot.py
cheminformatics-master
cuchem/cuchem/benchmark/__init__.py
import os import time import logging import hydra import pandas as pd from datetime import datetime import os import logging import argparse from cuml.ensemble.randomforestregressor import RandomForestRegressor from cuml import LinearRegression, ElasticNet from cuml.svm import SVR from cuchem.wf.generative.megatronmo...
cheminformatics-master
cuchem/cuchem/benchmark/megamolbart.py
import os import pickle import sqlite3 import logging from typing import List from cuchemcommon.utils.singleton import Singleton from cuchemcommon.context import Context logger = logging.getLogger(__name__) class TrainingData(object, metaclass=Singleton): def __init__(self): context = Context() ...
cheminformatics-master
cuchem/cuchem/benchmark/data.py
cheminformatics-master
cuchem/cuchem/metrics/__init__.py
#!/usr/bin/env python3 import logging import pickle import cupy import numpy as np import pandas as pd from cuml.metrics import pairwise_distances from sklearn.model_selection import ParameterGrid, KFold from cuml.metrics.regression import mean_squared_error from cuchem.utils.metrics import spearmanr from cuchem.uti...
cheminformatics-master
cuchem/cuchem/metrics/model.py
import base64 import logging from typing import Union import cudf import pandas from cuchem.decorator import BaseMolPropertyDecorator from rdkit import Chem from rdkit.Chem import Draw logger = logging.getLogger(__name__) class MolecularStructureDecorator(BaseMolPropertyDecorator): ERROR_VALUE = 'Error interpr...
cheminformatics-master
cuchem/cuchem/decorator/mol_structure.py
import logging from typing import Union import cudf import pandas from numpy.core.numeric import NaN from cuchem.decorator import BaseMolPropertyDecorator from rdkit import Chem from rdkit.Chem import QED, Descriptors, Lipinski logger = logging.getLogger(__name__) class LipinskiRuleOfFiveDecorator(BaseMolPropertyDe...
cheminformatics-master
cuchem/cuchem/decorator/lipinski.py
from typing import Union import cudf import pandas class BaseMolPropertyDecorator(object): def decorate(self, df: Union[cudf.DataFrame, pandas.DataFrame], smile_cols: int = 0): NotImplemented from .lipinski import LipinskiRuleOfFiveDecorator as LipinskiRuleOfFiveDecor...
cheminformatics-master
cuchem/cuchem/decorator/__init__.py
#!/opt/conda/envs/rapids/bin/python3 # # Copyright (c) 2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
cheminformatics-master
cuchem/cuchem/datasets/create_ZINC15_trie_multiprocessing.py
#!/opt/conda/envs/rapids/bin/python3 # # Copyright (c) 2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
cheminformatics-master
cuchem/cuchem/datasets/prepare_ChEMBL_tanimoto.py
import logging import os import pathlib import cudf logger = logging.getLogger(__name__) class GenericCSVDataset(): def __init__(self): self.name = None self.index_col = None self.index = None self.max_len = None self.data_path = None self.data = None def _lo...
cheminformatics-master
cuchem/cuchem/datasets/loaders.py
cheminformatics-master
cuchem/cuchem/datasets/__init__.py
#!/opt/conda/envs/rapids/bin/python3 # # Copyright (c) 2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
cheminformatics-master
cuchem/cuchem/datasets/prepare_ChEMBL_approved_drugs_data.py
#!/opt/conda/envs/rapids/bin/python3 # # Copyright (c) 2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
cheminformatics-master
cuchem/cuchem/datasets/create_ZINC15_test_split.py
#!/opt/conda/envs/rapids/bin/python3 # # Copyright (c) 2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
cheminformatics-master
cuchem/cuchem/utils/metrics.py
import logging import sys import traceback from functools import wraps # import dask # import dask_cudf import dash import numpy as np logger = logging.getLogger(__name__) # DELAYED_DF_TYPES = Union[dask.dataframe.core.DataFrame, dask_cudf.core.DataFrame] def generate_colors(num_colors): """ Generates eve...
cheminformatics-master
cuchem/cuchem/utils/__init__.py
#!/opt/conda/envs/rapids/bin/python3 # # Copyright (c) 2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
cheminformatics-master
cuchem/cuchem/utils/distance.py
#!/opt/conda/envs/rapids/bin/python3 # # Copyright (c) 2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
cheminformatics-master
cuchem/cuchem/utils/dataset.py
import logging import cupy from dask.distributed import Client, LocalCluster from dask_cuda import initialize, LocalCUDACluster from dask_cuda.local_cuda_cluster import cuda_visible_devices from dask_cuda.utils import get_n_gpus logger = logging.getLogger(__name__) def initialize_cluster(use_gpu=True, n_cpu=None, n...
cheminformatics-master
cuchem/cuchem/utils/dask.py
#!/opt/conda/envs/rapids/bin/python3 # # Copyright (c) 2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
cheminformatics-master
cuchem/cuchem/utils/plot_benchmark_results.py
import logging import os import shutil from subprocess import run from cuchemcommon.context import Context CDDD_MODEL_SCRIPT = 'https://raw.githubusercontent.com/jrwnter/cddd/master/download_default_model.sh' logger = logging.getLogger(__name__) def download_cddd_models(): """ Downloads CDDD model """ ...
cheminformatics-master
cuchem/cuchem/utils/data_peddler.py
# Copyright 2020 NVIDIA Corporation # SPDX-License-Identifier: Apache-2.0 import base64 import json import logging from io import StringIO from pydoc import locate import cupy import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html import plotly.graph...
cheminformatics-master
cuchem/cuchem/interactive/chemvisualize.py
cheminformatics-master
cuchem/cuchem/interactive/__init__.py
import logging import os import werkzeug werkzeug.cached_property = werkzeug.utils.cached_property from flask import Blueprint, Flask, send_file, json from flask.globals import current_app from flask.helpers import safe_join from flask_restplus import Api from werkzeug.exceptions import HTTPException from werkzeug.ht...
cheminformatics-master
cuchem/cuchem/api/__init__.py
import logging from flask import jsonify from flask_restplus import Resource from cuchem.api import api_rest from cuchem.wf.generative import Cddd, MolBART logger = logging.getLogger(__name__) @api_rest.route('/interpolator/<string:model>/<string:smiles>/<int:num_requested>') class Interpolator(Resource): """ ...
cheminformatics-master
cuchem/cuchem/api/interpolator.py
cheminformatics-master
cuchem/cuchem/wf/__init__.py
from typing import List import cupy import numpy from cuchemcommon.data.helper.chembldata import ADDITIONAL_FEILD, IMP_PROPS from cuml.metrics import pairwise_distances from cuchem.utils.distance import tanimoto_calculate from cuchem.utils.metrics import spearmanr class BaseClusterWorkflow: def __init__(self): ...
cheminformatics-master
cuchem/cuchem/wf/cluster/__init__.py
#!/opt/conda/envs/rapids/bin/python3 # # Copyright (c) 2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
cheminformatics-master
cuchem/cuchem/wf/cluster/gpurandomprojection.py
#!/opt/conda/envs/rapids/bin/python3 # # Copyright (c) 2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
cheminformatics-master
cuchem/cuchem/wf/cluster/cpukmeansumap.py
#!/opt/conda/envs/rapids/bin/python3 # # Copyright (c) 2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
cheminformatics-master
cuchem/cuchem/wf/cluster/gpukmeansumap.py
import logging from typing import List import numpy as np import pandas as pd from cuchemcommon.data import GenerativeWfDao from cuchemcommon.data.generative_wf import ChemblGenerativeWfDao from cuchemcommon.fingerprint import Embeddings from cuchemcommon.utils.singleton import Singleton from cuchemcommon.workflow imp...
cheminformatics-master
cuchem/cuchem/wf/generative/cddd.py
import logging import os import grpc import pandas as pd from typing import List from generativesampler_pb2_grpc import GenerativeSamplerStub from generativesampler_pb2 import GenerativeSpec, EmbeddingList, GenerativeModel, google_dot_protobuf_dot_empty__pb2 from cuchemcommon.data import GenerativeWfDao from cuchemc...
cheminformatics-master
cuchem/cuchem/wf/generative/megatronmolbart.py
from cuchem.wf.generative.cddd import Cddd as Cddd from cuchem.wf.generative.megatronmolbart import MegatronMolBART as MegatronMolBART
cheminformatics-master
cuchem/cuchem/wf/generative/__init__.py
import logging from cuchemcommon.data import GenerativeWfDao from cuchemcommon.data.generative_wf import ChemblGenerativeWfDao from cuchemcommon.utils.singleton import Singleton from cuchemcommon.workflow import BaseGenerativeWorkflow logger = logging.getLogger(__name__) class MolBART(BaseGenerativeWorkflow, metacl...
cheminformatics-master
cuchem/cuchem/wf/generative/molbart.py
import os from setuptools import setup, find_packages requirementPath = 'requirements.txt' install_requires = [] if os.path.isfile(requirementPath): with open(requirementPath) as f: install_requires = f.read().splitlines() setup( name='cuchem-commons', version='0.1', packages=find_packages()...
cheminformatics-master
common/setup.py
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: generativesampler.proto """Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from goo...
cheminformatics-master
common/generated/generativesampler_pb2.py
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc import generativesampler_pb2 as generativesampler__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 class GenerativeSamplerStub(...
cheminformatics-master
common/generated/generativesampler_pb2_grpc.py
import logging import os from abc import ABC from enum import Enum import numpy as np import pandas as pd from cddd.inference import InferenceModel from cuchem.utils.data_peddler import download_cddd_models from rdkit import Chem from rdkit.Chem import AllChem os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' logger = logging...
cheminformatics-master
common/cuchemcommon/fingerprint.py
cheminformatics-master
common/cuchemcommon/__init__.py
import logging import os from configparser import RawConfigParser from io import StringIO from cuchemcommon.utils.singleton import Singleton logger = logging.getLogger(__name__) CONFIG_FILE = '.env' class Context(metaclass=Singleton): def __init__(self): self.dask_client = None self.compute_t...
cheminformatics-master
common/cuchemcommon/context.py
# import os # os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # import logging # from abc import ABC # from rdkit.Chem.SaltRemover import SaltRemover # from cddd.preprocessing import remove_salt_stereo, filter_smiles # logger = logging.getLogger(__name__) # class BaseTransformation(ABC): # def __init__(self): # ...
cheminformatics-master
common/cuchemcommon/smiles.py
import logging # import torch from functools import singledispatch from typing import List import numpy as np from cuchemcommon.data import GenerativeWfDao from rdkit.Chem import PandasTools, CanonSmiles logger = logging.getLogger(__name__) @singledispatch def add_jitter(embedding, radius, cnt, shape): return N...
cheminformatics-master
common/cuchemcommon/workflow.py
from cuchemcommon.utils.singleton import Singleton
cheminformatics-master
common/cuchemcommon/utils/__init__.py
#!/opt/conda/envs/rapids/bin/python3 # # Copyright (c) 2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
cheminformatics-master
common/cuchemcommon/utils/logger.py
# singleton.py import logging """ Metaclass for singletons. """ logger = logging.getLogger(__name__) class Singleton(type): """ Ensures single instance of a class. Example Usage: class MySingleton(metaclass=Singleton) pass """ _instances = {} def __call__(cls, *args, *...
cheminformatics-master
common/cuchemcommon/utils/singleton.py
#!/opt/conda/envs/rapids/bin/python3 # # Copyright (c) 2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
cheminformatics-master
common/cuchemcommon/utils/sysinfo.py
from typing import List class ClusterWfDAO(object): """ Base class for all DAO for fetching data for Clustering Workflows """ def meta_df(self): """ Returns df with dtype set for structure without any column filter. """ return NotImplemented def fetch_molecular_em...
cheminformatics-master
common/cuchemcommon/data/__init__.py
import logging from typing import List from cuchemcommon.data.helper.chembldata import ChEmblData from cuchemcommon.utils.singleton import Singleton from . import GenerativeWfDao logger = logging.getLogger(__name__) class ChemblGenerativeWfDao(GenerativeWfDao, metaclass=Singleton): def __init__(self, fp_type)...
cheminformatics-master
common/cuchemcommon/data/generative_wf.py
import logging import math import os from typing import List import cudf import dask import dask_cudf from cuchemcommon.context import Context from cuchemcommon.data.helper.chembldata import BATCH_SIZE, ChEmblData from cuchemcommon.utils.singleton import Singleton from . import ClusterWfDAO logger = logging.getLogge...
cheminformatics-master
common/cuchemcommon/data/cluster_wf.py
cheminformatics-master
common/cuchemcommon/data/helper/__init__.py
import os import warnings import pandas import sqlite3 import logging from typing import List from dask import delayed, dataframe from contextlib import closing from cuchemcommon.utils.singleton import Singleton from cuchemcommon.context import Context warnings.filterwarnings("ignore", message=r"deprecated", categor...
cheminformatics-master
common/cuchemcommon/data/helper/chembldata.py
#!/usr/bin/env python3 # # Copyright (c) 2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
cheminformatics-master
megamolbart/launch.py
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions a...
cheminformatics-master
megamolbart/tests/perf_grpc.py
import sys import grpc import logging from concurrent import futures from contextlib import contextmanager from megamolbart.service import GenerativeSampler import generativesampler_pb2 import generativesampler_pb2_grpc from util import (DEFAULT_NUM_LAYERS, DEFAULT_D_MODEL, DEFAULT_NUM_HEADS, CHECKPOINTS_DIR) logger...
cheminformatics-master
megamolbart/tests/test_grpc.py
#!/usr/bin/env python3 import pandas as pd import torch from megamolbart.inference import MegaMolBART if __name__ == '__main__': num_interp = 3 smiles1 = 'CC(=O)Nc1ccc(O)cc1' smiles2 = 'CC(=O)Oc1ccccc1C(=O)O' with torch.no_grad(): wf = MegaMolBART() # Test each of the major functi...
cheminformatics-master
megamolbart/tests/test_megamolbart.py
#!/usr/bin/env python3 import os import sys import math import time import random import argparse from subprocess import run from rdkit import Chem from pathlib import Path from concurrent.futures import ProcessPoolExecutor MAX_LENGTH = 150 VAL_TEST_SPLIT = 0.005 def process_line(line): if line is None or lin...
cheminformatics-master
megamolbart/scripts/process_file.py
import logging from generativesampler_pb2 import EmbeddingList, SmilesList, IterationVal import generativesampler_pb2_grpc from megamolbart.inference import MegaMolBART from cuchemcommon.utils import Singleton logger = logging.getLogger(__name__) class GenerativeSampler(generativesampler_pb2_grpc.GenerativeSampler...
cheminformatics-master
megamolbart/megamolbart/service.py
cheminformatics-master
megamolbart/megamolbart/__init__.py
#!/usr/bin/env python3 import logging from functools import partial from pathlib import Path from typing import List from rdkit import Chem import torch import pandas as pd from checkpointing import load_checkpoint from cuchemcommon.workflow import BaseGenerativeWorkflow, add_jitter from decoder import DecodeSampler ...
cheminformatics-master
megamolbart/megamolbart/inference.py
#!/usr/bin/env python # Generate set of projects mk files. # Usage: python generate_mk.py PROJECTS_MK_DIR THRUST_SOURCE_DIR # The program scans through unit tests and examples in THRUST_SOURCE_DIR # and generates project mk for each of the tests and examples in PROJECTS_MK_DIR # A single example or unit test so...
thrust-master
generate_mk.py
#! /usr/bin/env python # Copyright (c) 2022 NVIDIA Corporation # Reply-To: Allison Vacanti <alliepiper16@gmail.com> # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # Released under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. help_text = """%(prog...
thrust-master
ci/common/memmon.py
#! /usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (c) 2012-7 Bryce Adelstein Lelbach aka wash <brycelelbach@gmail.com> # # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy...
thrust-master
internal/benchmark/combine_benchmark_results.py
#! /usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (c) 2012-7 Bryce Adelstein Lelbach aka wash <brycelelbach@gmail.com> # # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy...
thrust-master
internal/benchmark/compare_benchmark_results.py
''' Convert Google Code .wiki files into .tex formatted files. Output is designed to be included within a larger TeX project, it is not standalone. ''' import sys import re import codecs print(sys.argv) ''' A "rule" is a begin tag, an end tag, and how to reformat the inner text (function) ''' def encase(pre, post...
thrust-master
internal/scripts/wiki2tex.py
#! /usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (c) 2018 NVIDIA Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain ...
thrust-master
internal/scripts/eris_perf.py
''' Helper script for creating a header file that includes all of Thrust's public headers. This is useful for instance, to quickly check that all the thrust headers obey proper syntax or are warning free. This script simply outputs a list of C-style #include's to the standard output--this should be redirected to a he...
thrust-master
internal/build/warningstester_create_uber_header.py
import gdb import sys if sys.version_info[0] > 2: Iterator = object else: # "Polyfill" for Python2 Iterator interface class Iterator: def next(self): return self.__next__() class ThrustVectorPrinter(gdb.printing.PrettyPrinter): "Print a thrust::*_vector" class _host_accessibl...
thrust-master
scripts/gdb-pretty-printers.py
#!/usr/bin/env python3 # Copyright (C) 2013-2022 Free Software Foundation, Inc. # # This file is part of GDB. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, ...
cuda-gdb-master
gdb/make-target-delegates.py
#! /usr/bin/env python3 # Copyright (C) 2011-2022 Free Software Foundation, Inc. # # This file is part of GDB. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License,...
cuda-gdb-master
gdb/copyright.py
# Dynamic architecture support for GDB, the GNU debugger. # Copyright (C) 1998-2022 Free Software Foundation, Inc. # This file is part of GDB. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; ...
cuda-gdb-master
gdb/gdbarch-components.py
# Copyright constant for Python code to use. # # Copyright (C) 2022 Free Software Foundation, Inc. # # This file is part of GDB. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version ...
cuda-gdb-master
gdb/gdbcopyright.py
#!/usr/bin/env python3 # Generate Unicode case-folding table for Ada. # Copyright (C) 2022 Free Software Foundation, Inc. # This file is part of GDB. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foun...
cuda-gdb-master
gdb/ada-unicode.py
#!/usr/bin/env python3 # Architecture commands for GDB, the GNU debugger. # # Copyright (C) 1998-2022 Free Software Foundation, Inc. # # This file is part of GDB. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
cuda-gdb-master
gdb/gdbarch.py
# Program to fetch python compilation parameters. # Copied from python-config of the 2.7 release. import sys import os import getopt import sysconfig valid_opts = ["prefix", "exec-prefix", "includes", "libs", "cflags", "ldflags", "help"] def exit_with_usage(code=1): sys.stderr.write( "Usage: %s [%s]\n" ...
cuda-gdb-master
gdb/python/python-config.py
# Copyright (C) 2013-2022 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This progr...
cuda-gdb-master
gdb/python/lib/gdb/FrameIterator.py
# Copyright (C) 2015-2022 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This progr...
cuda-gdb-master
gdb/python/lib/gdb/unwinder.py
# Copyright (C) 2021-2022 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This progr...
cuda-gdb-master
gdb/python/lib/gdb/disassembler.py
# Styling related hooks. # Copyright (C) 2010-2022 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any late...
cuda-gdb-master
gdb/python/lib/gdb/styling.py
# Copyright (C) 2010-2022 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This progr...
cuda-gdb-master
gdb/python/lib/gdb/__init__.py
# Python side of the support for xmethods. # Copyright (C) 2013-2022 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at you...
cuda-gdb-master
gdb/python/lib/gdb/xmethod.py
# Type utilities. # Copyright (C) 2010-2022 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later versi...
cuda-gdb-master
gdb/python/lib/gdb/types.py
# Frame-filter commands. # Copyright (C) 2013-2022 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any late...
cuda-gdb-master
gdb/python/lib/gdb/frames.py
# Extended prompt utilities. # Copyright (C) 2011-2022 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any ...
cuda-gdb-master
gdb/python/lib/gdb/prompt.py
# Copyright (C) 2013-2022 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This progr...
cuda-gdb-master
gdb/python/lib/gdb/FrameDecorator.py
# Pretty-printer utilities. # Copyright (C) 2010-2022 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any l...
cuda-gdb-master
gdb/python/lib/gdb/printing.py
# Pretty-printers for bounds registers. # Copyright (C) 2013-2022 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your o...
cuda-gdb-master
gdb/python/lib/gdb/printer/bound_registers.py
# Copyright (C) 2014-2022 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This progr...
cuda-gdb-master
gdb/python/lib/gdb/printer/__init__.py
# Copyright (C) 2012-2022 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This progr...
cuda-gdb-master
gdb/python/lib/gdb/function/__init__.py
# Useful gdb string convenience functions. # Copyright (C) 2012-2022 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at you...
cuda-gdb-master
gdb/python/lib/gdb/function/strfns.py
# Copyright (C) 2016-2022 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This progr...
cuda-gdb-master
gdb/python/lib/gdb/function/as_string.py