code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
""" psl2chain.py - convert psl formatted file to a chain formatted file =================================================================== :Tags: Python Purpose ------- convert a `psl <http://genome.ucsc.edu/FAQ/FAQformat.html#format2>`_ formatted file to a `chain <http://www.breyer.com/ucsc/htdocs/goldenPath/help/...
[ "CGAT.Experiment.info", "CGAT.Experiment.Stop", "CGAT.Blat.iterator", "CGAT.Experiment.Start" ]
[((1377, 1403), 'CGAT.Experiment.Start', 'E.Start', (['parser'], {'argv': 'argv'}), '(parser, argv=argv)\n', (1384, 1403), True, 'import CGAT.Experiment as E\n'), ((1474, 1502), 'CGAT.Blat.iterator', 'Blat.iterator', (['options.stdin'], {}), '(options.stdin)\n', (1487, 1502), True, 'import CGAT.Blat as Blat\n'), ((2721...
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="pyske", version="0.5", author="<NAME>", author_email="<EMAIL>", description="The Python Skeleton Library", long_description=long_description, long_description_con...
[ "setuptools.find_packages" ]
[((688, 723), 'setuptools.find_packages', 'setuptools.find_packages', ([], {'where': '"""."""'}), "(where='.')\n", (712, 723), False, 'import setuptools\n')]
import numpy as np from .. import Geometry, Line, LineSegmentMaterial class BoxHelper(Line): """A line box object. Commonly used to visualize bounding boxes. Parameters: size (float): The length of the box' edges (default 1). thickness (float): the thickness of the lines (default 1 px). ...
[ "numpy.array", "numpy.asarray" ]
[((420, 719), 'numpy.array', 'np.array', (['[[0, 0, 0], [1, 0, 0], [0, 0, 0], [0, 0, 1], [1, 0, 1], [1, 0, 0], [1, 0, 1\n ], [0, 0, 1], [0, 1, 0], [1, 1, 0], [0, 1, 0], [0, 1, 1], [1, 1, 1], [1,\n 1, 0], [1, 1, 1], [0, 1, 1], [0, 0, 0], [0, 1, 0], [1, 0, 0], [1, 1, 0],\n [0, 0, 1], [0, 1, 1], [1, 0, 1], [1, 1,...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import List, Optional import torch from botorch.models.multitask import MultiTaskGP from gpytorch.constrai...
[ "gpytorch.constraints.Interval", "gpytorch.distributions.multivariate_normal.MultivariateNormal", "torch.cat", "gpytorch.likelihoods.gaussian_likelihood.FixedNoiseGaussianLikelihood", "gpytorch.lazy.InterpolatedLazyTensor", "torch.nn.Embedding" ]
[((4271, 4299), 'torch.cat', 'torch.cat', (['embeddings'], {'dim': '(1)'}), '(embeddings, dim=1)\n', (4280, 4299), False, 'import torch\n'), ((5412, 5445), 'gpytorch.distributions.multivariate_normal.MultivariateNormal', 'MultivariateNormal', (['mean_x', 'covar'], {}), '(mean_x, covar)\n', (5430, 5445), False, 'from gp...
#!/usr/bin/env python3 import unittest from unittest import mock from unittest.mock import MagicMock from common import database class TestDatabase(unittest.TestCase): @mock.patch("query_lambda.query.logger") def test_query_generates_correctly_with_no_optional_parameters(self, logger_mock): expected...
[ "unittest.main", "common.database.execute_query_to_dict", "unittest.mock.MagicMock", "unittest.mock.patch" ]
[((177, 216), 'unittest.mock.patch', 'mock.patch', (['"""query_lambda.query.logger"""'], {}), "('query_lambda.query.logger')\n", (187, 216), False, 'from unittest import mock\n'), ((1274, 1289), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1287, 1289), False, 'import unittest\n'), ((619, 630), 'unittest.mock.Ma...
from flask import make_response, g from .....common.corpora_orm import CollectionVisibility from .....common.entities import Collection from .....common.utils.exceptions import ConflictException from .....api_server.db import dbconnect from .....common.utils.exceptions import ForbiddenHTTPException from backend.corpo...
[ "backend.corpora.lambdas.api.v1.collection._owner_or_allowed", "flask.make_response" ]
[((1038, 1134), 'flask.make_response', 'make_response', (["{'collection_uuid': collection.id, 'visibility': collection.visibility}", '(202)'], {}), "({'collection_uuid': collection.id, 'visibility': collection.\n visibility}, 202)\n", (1051, 1134), False, 'from flask import make_response, g\n'), ((615, 638), 'backen...
import pandas as pd train = pd.read_csv('./input/train.csv') positive_train = train[train['identity_hate']>0] labels = ['toxic', 'severe_toxic', 'obscene', 'threat', 'insult', 'identity_hate'] for label in labels: positive_train = train[train[label] > 0] print( label) print(positive_train.shape) max = 0 m...
[ "pandas.read_csv" ]
[((29, 61), 'pandas.read_csv', 'pd.read_csv', (['"""./input/train.csv"""'], {}), "('./input/train.csv')\n", (40, 61), True, 'import pandas as pd\n')]
# 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 applicable law or agreed to in writing, software # d...
[ "oslo_config.cfg.ListOpt", "oslo_config.cfg.StrOpt", "oslo_config.cfg.CONF.register_opts", "oslo_config.cfg.IntOpt" ]
[((1032, 1107), 'oslo_config.cfg.CONF.register_opts', 'oslo_config.CONF.register_opts', (['nfp_configurator_extra_opts', '"""configurator"""'], {}), "(nfp_configurator_extra_opts, 'configurator')\n", (1062, 1107), True, 'from oslo_config import cfg as oslo_config\n'), ((1312, 1402), 'oslo_config.cfg.CONF.register_opts'...
import datetime import os import errno import csv import hashlib import sys import subprocess import pickle def get_datestamp(): t = datetime.datetime.now() datestamp = '%d_%02d_%02d' % (t.year, t.month, t.day) return datestamp def get_timestamp(ts = None): if ts == None: t=datetime.datetime.n...
[ "csv.DictWriter", "csv.DictReader", "os.walk", "os.remove", "datetime.datetime", "os.path.exists", "subprocess.Popen", "csv.reader", "os.link", "os.path.getsize", "hashlib.md5", "os.rename", "csv.writer", "pickle.load", "os.path.dirname", "os.path.samefile", "datetime.datetime.fromti...
[((138, 161), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (159, 161), False, 'import datetime\n'), ((937, 994), 'datetime.datetime', 'datetime.datetime', (['year', 'month', 'day', 'hour', 'minute', 'second'], {}), '(year, month, day, hour, minute, second)\n', (954, 994), False, 'import datetime\...
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-05-08 17:26 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("users", "0055_authorization_data_partners_foreignkey_to_manytomany") ] operations = [migra...
[ "django.db.migrations.RemoveField" ]
[((315, 381), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""authorization"""', 'name': '"""partner"""'}), "(model_name='authorization', name='partner')\n", (337, 381), False, 'from django.db import migrations\n')]
import pickle from itertools import permutations import networkx as nx import openpyxl from local_settings_gnome import db """ Layer 2 Network: Edge between developers who commented on 2 bugs which belong to same product. Dataset Used : gnomebug Table : bug """ with db: print("Connected to db!") cur = db.c...
[ "pickle.dump", "networkx.DiGraph", "local_settings_gnome.db.cursor", "networkx.eigenvector_centrality", "openpyxl.Workbook" ]
[((316, 327), 'local_settings_gnome.db.cursor', 'db.cursor', ([], {}), '()\n', (325, 327), False, 'from local_settings_gnome import db\n'), ((2498, 2510), 'networkx.DiGraph', 'nx.DiGraph', ([], {}), '()\n', (2508, 2510), True, 'import networkx as nx\n'), ((2665, 2697), 'networkx.eigenvector_centrality', 'nx.eigenvector...
# Copyright (c) 2018-2022 Advanced Micro Devices, Inc. All rights reserved. # dependencies_map.py # # Map of GitHub project names to clone target paths, relative to the GPUPerfAPI # project root on the local disk. # This script is used by the fetch_dependencies.py script # GitHub GPUOpen-Tools projects map # ...
[ "argparse.ArgumentParser" ]
[((2128, 2233), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Print the GPA git project dependency to local folder mapping."""'}), "(description=\n 'Print the GPA git project dependency to local folder mapping.')\n", (2151, 2233), False, 'import argparse\n')]
import glob import numpy as np import pandas as pd import matplotlib.pyplot as plt def unison_shuffled_copies(a, b): assert len(a) == len(b) p = np.random.permutation(len(a)) return a[p], b[p] def plot_swing(swing_data, shot_type=None, dist=None): """ swing_data: Dx6 array of IMU data """ ...
[ "pandas.read_csv", "matplotlib.pyplot.plot", "numpy.argmax", "numpy.array", "matplotlib.pyplot.figure", "numpy.zeros", "matplotlib.pyplot.title", "matplotlib.pyplot.subplot", "matplotlib.pyplot.suptitle", "glob.glob" ]
[((377, 404), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(15, 7)'}), '(figsize=(15, 7))\n', (387, 404), True, 'import matplotlib.pyplot as plt\n'), ((781, 806), 'glob.glob', 'glob.glob', (["(path + '*.csv')"], {}), "(path + '*.csv')\n", (790, 806), False, 'import glob\n'), ((1074, 1090), 'numpy.array',...
""" Copyright 2018 <NAME> 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 applicable law or agreed to in writing, ...
[ "json.dumps", "time.sleep", "connection_core.ConnectionCore", "json.JSONDecoder", "connection_core.ConnectionCore.getOwnAddress" ]
[((1318, 1368), 'connection_core.ConnectionCore', 'ConnectionCore', (['is_server', 'ip_address', 'port_number'], {}), '(is_server, ip_address, port_number)\n', (1332, 1368), False, 'from connection_core import ConnectionCore\n'), ((2187, 2217), 'connection_core.ConnectionCore.getOwnAddress', 'ConnectionCore.getOwnAddre...
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of th...
[ "iptest.run_test", "clr.AddReference", "unittest.skipUnless" ]
[((783, 843), 'unittest.skipUnless', 'unittest.skipUnless', (['is_cli', '"""IronPython specific test case"""'], {}), "(is_cli, 'IronPython specific test case')\n", (802, 843), False, 'import unittest\n'), ((7329, 7347), 'iptest.run_test', 'run_test', (['__name__'], {}), '(__name__)\n', (7337, 7347), False, 'from iptest...
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ riko.modules.csv ~~~~~~~~~~~~~~~~ Provides functions for fetching csv files. Examples: basic usage:: >>> from riko import get_path >>> from riko.modules.csv import pipe >>> >>> url = get_path('spreadsheet.csv') >>> next...
[ "meza.process.merge", "riko.utils.get_abspath", "riko.bado.return_value", "meza.io.read_csv", "riko.utils.fetch", "pygogo.Gogo", "riko.bado.io.async_url_open" ]
[((1081, 1114), 'pygogo.Gogo', 'gogo.Gogo', (['__name__'], {'monolog': '(True)'}), '(__name__, monolog=True)\n', (1090, 1114), True, 'import pygogo as gogo\n'), ((2730, 2750), 'riko.bado.return_value', 'return_value', (['stream'], {}), '(stream)\n', (2742, 2750), False, 'from riko.bado import coroutine, return_value, i...
# Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # Copyright 2019 The Prescience-Client Authors. All rights reserved. import copy from datetime import datetime from prescience_client.bean.config import Config from prescience_client.bean.dataset import Dataset from ...
[ "prescience_client.bean.source.Source", "prescience_client.enum.problem_type.ProblemType", "termcolor.colored", "prescience_client.bean.dataset.Dataset", "prescience_client.bean.config.Config", "copy.deepcopy", "copy.copy", "prescience_client.bean.serving.evaluator.Evaluator" ]
[((2956, 2981), 'copy.copy', 'copy.copy', (['self.json_dict'], {}), '(self.json_dict)\n', (2965, 2981), False, 'import copy\n'), ((4797, 4817), 'prescience_client.enum.problem_type.ProblemType', 'ProblemType', (['pb_type'], {}), '(pb_type)\n', (4808, 4817), False, 'from prescience_client.enum.problem_type import Proble...
""" This script shows you how to select gripper for an environment. This is controlled by gripper_type keyword argument demo script: python3 examples/policy.py GQCNN-4.0-PJ --depth_image <depth.npy> --segmask <seg.png> --camera_intr data/calib/phoxi/phoxi.intr """ import numpy as np import math import cv2 import robo...
[ "cv2.imwrite", "ik_controller.robosuite_IKmover", "numpy.max", "numpy.array", "dexnet.DexNet", "robosuite.environments.SawyerLift_vj", "numpy.min", "mujoco_py.MjRenderContextOffscreen", "numpy.save" ]
[((2136, 2315), 'robosuite.environments.SawyerLift_vj', 'SawyerLift_vj', ([], {'ignore_done': '(True)', 'gripper_type': '"""TwoFingerGripper"""', 'use_camera_obs': '(False)', 'has_offscreen_renderer': '(False)', 'has_renderer': '(True)', 'camera_name': 'None', 'control_freq': '(100)'}), "(ignore_done=True, gripper_type...
from django.core.management.base import BaseCommand, CommandError from robinson.models import Photo import glob import os # Look for files with a 'JPG' or 'JPEG' extension (case insensitive.) # Note that glob does not support regular expressions, hence the duplication. JPEG_EXTENSIONS = ('[jJ][pP][gG]', '[jJ][pP][eE]...
[ "robinson.models.Photo", "os.path.join", "os.path.split", "django.core.management.base.CommandError", "os.path.normcase", "glob.glob" ]
[((585, 641), 'django.core.management.base.CommandError', 'CommandError', (['"""The path to the files must be specified."""'], {}), "('The path to the files must be specified.')\n", (597, 641), False, 'from django.core.management.base import BaseCommand, CommandError\n'), ((772, 797), 'os.path.normcase', 'os.path.normc...
# coding=utf-8 import os import unittest import pandas as pd from sklearn.svm import SVC from sklearn.naive_bayes import BernoulliNB import gramex.ml import gramex.cache from nose.tools import eq_, ok_ from pandas.util.testing import assert_frame_equal as afe from . import folder class TestClassifier(unittest.TestCas...
[ "os.path.exists", "nose.tools.eq_", "pandas.read_csv", "os.path.join", "pandas.util.testing.assert_frame_equal", "pandas.DataFrame", "os.remove" ]
[((341, 374), 'os.path.join', 'os.path.join', (['folder', '"""model.pkl"""'], {}), "(folder, 'model.pkl')\n", (353, 374), False, 'import os\n'), ((2851, 2888), 'os.path.join', 'os.path.join', (['folder', '"""auto_test.csv"""'], {}), "(folder, 'auto_test.csv')\n", (2863, 2888), False, 'import os\n'), ((420, 452), 'os.pa...
# -*- coding: utf-8 -*- import numpy as np import pandas as pd def calculate_effect_of_credit_drop(model, X, credit_factors): probs = model.predict_proba(X)[:, 1] all_probs_changes = {} all_credit_amount_changes = {} all_expected_costs_in_credit = {} for factor in credit_factors: probs...
[ "numpy.divide", "numpy.where", "numpy.isnan", "pandas.DataFrame", "numpy.round" ]
[((5209, 5458), 'pandas.DataFrame', 'pd.DataFrame', (["{'defaulted': y, 'credit_given': X['credit_given'], 'prob': probs,\n 'factors': all_processed_factors, 'costs': all_processed_costs,\n 'credit_losses': all_processed_credit_changes, 'probs_changes':\n all_processed_probs_changes}"], {}), "({'defaulted': y,...
import os from django.conf import settings from wagtail import VERSION as WAGTAIL_VERSION if WAGTAIL_VERSION < (2, 5): from wagtail.utils.pagination import paginate else: from django.core.paginator import Paginator DEFAULT_PAGE_KEY = 'p' def paginate(request, items, page_key=DEFAULT_PAGE_KEY, per_pag...
[ "django.utils.timezone.now", "os.path.exists", "os.path.join", "django.core.paginator.Paginator" ]
[((550, 564), 'django.utils.timezone.now', 'timezone.now', ([], {}), '()\n', (562, 564), False, 'from django.utils import timezone\n'), ((589, 664), 'os.path.join', 'os.path.join', (['settings.MEDIA_ROOT', 'f"""chunked_media/{timestamp_now}-{title}"""'], {}), "(settings.MEDIA_ROOT, f'chunked_media/{timestamp_now}-{titl...
import nltk if __name__ == '__main__': nltk.download('wordnet')
[ "nltk.download" ]
[((44, 68), 'nltk.download', 'nltk.download', (['"""wordnet"""'], {}), "('wordnet')\n", (57, 68), False, 'import nltk\n')]
from flask import flash, redirect, url_for from flask_login import login_required, current_user from app.models.base import db from app.models.wish import Wish from . import web @web.route('/my/wish') def my_wish(): #传入一个uid,就可以得到一个wish列表,只不过,如果转化成书呢,得到的列表, pass @web.route('/wish/book/<isbn>') @login_requ...
[ "app.models.wish.Wish", "flask.flash", "flask.url_for", "app.models.base.db.auto_commit", "app.models.base.db.session.add", "flask_login.current_user.can_save_to_list" ]
[((356, 391), 'flask_login.current_user.can_save_to_list', 'current_user.can_save_to_list', (['isbn'], {}), '(isbn)\n', (385, 391), False, 'from flask_login import login_required, current_user\n'), ((569, 610), 'flask.flash', 'flash', (['"""这本书已添加至你的赠送清单或已存在于你的心愿清单,请不要重复添加"""'], {}), "('这本书已添加至你的赠送清单或已存在于你的心愿清单,请不要重复添加...
from CpuData import CpuData from DiskStats import DiskStats from MemoryStats import MemoryStats from NetworkStats import NetworkStats import datetime, uuid class ServerData: def __init__(self, stat_provider, config): self.__serverId = config.get("server_id", "serverid") self.__stat_provider = stat...
[ "MemoryStats.MemoryStats", "CpuData.CpuData", "uuid.uuid4", "datetime.datetime.now", "DiskStats.DiskStats", "NetworkStats.NetworkStats" ]
[((390, 403), 'MemoryStats.MemoryStats', 'MemoryStats', ([], {}), '()\n', (401, 403), False, 'from MemoryStats import MemoryStats\n'), ((429, 438), 'CpuData.CpuData', 'CpuData', ([], {}), '()\n', (436, 438), False, 'from CpuData import CpuData\n'), ((465, 476), 'DiskStats.DiskStats', 'DiskStats', ([], {}), '()\n', (474...
from PyQt5.Qt import QWidget, pyqtSignal, QApplication, QLabel, QPushButton, QGraphicsDropShadowEffect, QColor, \ QLineEdit, QMovie from Stools import login import sys class Index(QWidget): show_mainindex_sg = pyqtSignal(int, str) show_register_sg = pyqtSignal() def __init__(self, parent=None): ...
[ "PyQt5.Qt.QApplication.desktop", "PyQt5.Qt.QMovie", "PyQt5.Qt.QApplication", "PyQt5.Qt.QColor", "PyQt5.Qt.QPushButton", "PyQt5.Qt.QWidget", "PyQt5.Qt.pyqtSignal", "PyQt5.Qt.QLabel", "PyQt5.Qt.QGraphicsDropShadowEffect", "Stools.login", "PyQt5.Qt.QLineEdit" ]
[((220, 240), 'PyQt5.Qt.pyqtSignal', 'pyqtSignal', (['int', 'str'], {}), '(int, str)\n', (230, 240), False, 'from PyQt5.Qt import QWidget, pyqtSignal, QApplication, QLabel, QPushButton, QGraphicsDropShadowEffect, QColor, QLineEdit, QMovie\n'), ((264, 276), 'PyQt5.Qt.pyqtSignal', 'pyqtSignal', ([], {}), '()\n', (274, 27...
# Generated by Django 3.1.2 on 2020-10-26 17:45 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('backend', '0014_auto_20201026_1745'), ] operations = [ migrations.AlterField( model_name='semin...
[ "django.db.models.ForeignKey" ]
[((372, 472), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""backend.location"""'}), "(null=True, on_delete=django.db.models.deletion.CASCADE,\n to='backend.location')\n", (389, 472), False, 'from django.db import migrations, mo...
""" lml.loader ~~~~~~~~~~~~~~~~~~~ Auto discover avaiable plugins :copyright: (c) 2017 by Onni Software Ltd. :license: New BSD License, see LICENSE for more details """ import pkgutil import logging from itertools import chain from lml.utils import do_import log = logging.getLogger(__name__) d...
[ "logging.getLogger", "itertools.chain", "lml.utils.do_import", "pdb.set_trace", "pkgutil.iter_modules" ]
[((289, 316), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (306, 316), False, 'import logging\n'), ((761, 776), 'pdb.set_trace', 'pdb.set_trace', ([], {}), '()\n', (774, 776), False, 'import pdb\n'), ((891, 953), 'itertools.chain', 'chain', (['module_names', 'module_names_from_pyinstall...
import os from PIL import Image, ImageFile from tqdm import tqdm ImageFile.LOAD_TRUNCATED_IMAGES = True import torch from torch.utils.data import Dataset import torchvision.transforms as transforms from scene_classification.utils import scan_all_files class TestDataset(Dataset): def __init__(self, imgdir, trans...
[ "scene_classification.utils.scan_all_files", "PIL.Image.open", "tqdm.tqdm", "os.path.basename", "torchvision.transforms.Normalize", "torch.utils.data.DataLoader", "torchvision.transforms.Resize", "torchvision.transforms.ToTensor" ]
[((1218, 1304), 'torch.utils.data.DataLoader', 'torch.utils.data.DataLoader', (['dataset'], {'batch_size': '(96)', 'shuffle': '(False)', 'num_workers': '(24)'}), '(dataset, batch_size=96, shuffle=False,\n num_workers=24)\n', (1245, 1304), False, 'import torch\n'), ((1318, 1334), 'tqdm.tqdm', 'tqdm', (['testloader'],...
"""Adds invoice tables Revision ID: f5056738fe02 Revises: <PASSWORD> Create Date: 2019-06-07 19:06:59.278519 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'f5056738fe02' down_revision = '<PASSWORD>' branch_labels = None depends_on = None def upgrade(): #...
[ "sqlalchemy.DateTime", "alembic.op.drop_table", "sqlalchemy.Text", "alembic.op.f", "sqlalchemy.PrimaryKeyConstraint", "sqlalchemy.Integer", "sqlalchemy.NUMERIC", "sqlalchemy.TEXT", "sqlalchemy.INTEGER", "alembic.op.drop_index", "alembic.op.create_index" ]
[((1077, 1123), 'alembic.op.drop_index', 'op.drop_index', (['"""my_index"""'], {'table_name': '"""models"""'}), "('my_index', table_name='models')\n", (1090, 1123), False, 'from alembic import op\n'), ((1128, 1151), 'alembic.op.drop_table', 'op.drop_table', (['"""models"""'], {}), "('models')\n", (1141, 1151), False, '...
import imghdr from typing import Optional from mitmproxy.contentviews import base from mitmproxy.coretypes import multidict from . import image_parser def test_ico(h, f): if h.startswith(b"\x00\x00\x01\x00"): return "ico" imghdr.tests.append(test_ico) class ViewImage(base.View): name = "Image" ...
[ "imghdr.tests.append", "mitmproxy.coretypes.multidict.MultiDict", "imghdr.what" ]
[((239, 268), 'imghdr.tests.append', 'imghdr.tests.append', (['test_ico'], {}), '(test_ico)\n', (258, 268), False, 'import imghdr\n'), ((382, 405), 'imghdr.what', 'imghdr.what', (['""""""'], {'h': 'data'}), "('', h=data)\n", (393, 405), False, 'import imghdr\n'), ((1065, 1100), 'mitmproxy.coretypes.multidict.MultiDict'...
#!/usr/bin/env python import unittest from peeringdb.PeeringDB import PeeringDB class TestASN(unittest.TestCase): PDB = None def setUp(self): self.PDB = PeeringDB(cache=False) # Real networks that exist and have PeeringDB entries def test_exists_768(self): # JANET UK asn =...
[ "unittest.main", "peeringdb.PeeringDB.PeeringDB" ]
[((1021, 1036), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1034, 1036), False, 'import unittest\n'), ((174, 196), 'peeringdb.PeeringDB.PeeringDB', 'PeeringDB', ([], {'cache': '(False)'}), '(cache=False)\n', (183, 196), False, 'from peeringdb.PeeringDB import PeeringDB\n')]
#!/usr/bin/env python # coding: utf-8 import numpy as np from tqdm import tqdm from functools import reduce import disk.funcs as dfn import h5py import os import glob import sys from matplotlib import pyplot as plt class binary_mbh(object): def __init__(self, filename): self.parse_file(filename) ...
[ "numpy.abs", "numpy.ones", "numpy.nanmedian", "numpy.where", "os.path.join", "numpy.diff", "h5py.File", "os.getcwd", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.full", "numpy.nansum", "numpy.isinf", "disk.funcs.dm1dm2_lk" ]
[((1840, 1872), 'numpy.zeros', 'np.zeros', (['(self.sep.shape[0], 3)'], {}), '((self.sep.shape[0], 3))\n', (1848, 1872), True, 'import numpy as np\n'), ((2443, 2475), 'numpy.zeros', 'np.zeros', (['(self.sep.shape[0], 3)'], {}), '((self.sep.shape[0], 3))\n', (2451, 2475), True, 'import numpy as np\n'), ((3037, 3069), 'n...
# # Copyright (c) 2013 - 2017, 2019 Software AG, Darmstadt, Germany and/or its licensors # # 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...
[ "xpybuild.targets.copy.Copy" ]
[((1424, 1478), 'xpybuild.targets.copy.Copy', 'Copy', (['"""${OUTPUT_DIR}/test-generated.cpp"""', '"""./test.cpp"""'], {}), "('${OUTPUT_DIR}/test-generated.cpp', './test.cpp')\n", (1428, 1478), False, 'from xpybuild.targets.copy import Copy\n')]
import os from flask import Blueprint, request from flask_cors import CORS from service.astra_service import astra_service credentials_controller = Blueprint('credentials_controller', __name__) CORS(credentials_controller) # This controller handles the functionality for connecting to the database # # Here we defin...
[ "service.astra_service.astra_service.check_connection", "flask_cors.CORS", "service.astra_service.astra_service.save_credentials", "flask.request.get_data", "service.astra_service.astra_service.connect", "os.path.abspath", "flask.Blueprint", "service.astra_service.astra_service.test_credentials", "o...
[((150, 195), 'flask.Blueprint', 'Blueprint', (['"""credentials_controller"""', '__name__'], {}), "('credentials_controller', __name__)\n", (159, 195), False, 'from flask import Blueprint, request\n'), ((197, 225), 'flask_cors.CORS', 'CORS', (['credentials_controller'], {}), '(credentials_controller)\n', (201, 225), Fa...
import pandas as pd from visions.core.implementations import visions_complete_set from visions.core.functional import type_cast, type_inference from visions.core.summaries.summary import CompleteSummary # Load dataset df = pd.read_csv( "https://github.com/codebrainz/color-names/raw/master/output/colors.csv", ...
[ "pandas.read_csv", "visions.core.functional.type_inference", "visions.core.summaries.summary.CompleteSummary", "visions.core.implementations.visions_complete_set", "visions.core.functional.type_cast" ]
[((226, 366), 'pandas.read_csv', 'pd.read_csv', (['"""https://github.com/codebrainz/color-names/raw/master/output/colors.csv"""'], {'names': "['Code', 'Name', 'Hex', 'R', 'G', 'B']"}), "(\n 'https://github.com/codebrainz/color-names/raw/master/output/colors.csv',\n names=['Code', 'Name', 'Hex', 'R', 'G', 'B'])\n"...
from __future__ import print_function from cloudmesh.shell.command import command from cloudmesh.shell.command import PluginCommand from cloudmesh.shell.shell import Shell from cloudmesh.common.console import Console from cloudmesh.compute.vm.Provider import Provider import pandas as pd import numpy as np from cloudmes...
[ "cloudmesh.frugal.api.gcp_frugal.get_google_pricing", "cloudmesh.vm.command.vm.VmCommand", "cloudmesh.compute.vm.Provider.Provider", "datetime.datetime.utcnow", "cloudmesh.common.Printer.Printer.write", "cloudmesh.common.console.Console.msg", "cloudmesh.frugal.api.aws_frugal.get_aws_pricing", "cloudme...
[((3471, 3514), 'cloudmesh.common.variables.Variables', 'Variables', ([], {'filename': '"""~/.cloudmesh/var-data"""'}), "(filename='~/.cloudmesh/var-data')\n", (3480, 3514), False, 'from cloudmesh.common.variables import Variables\n'), ((7278, 7342), 'cloudmesh.common.console.Console.msg', 'Console.msg', (['f"""Checkin...
from django.db import models from django.db.models.functions import Cast class AssessmentQuerySet(models.QuerySet): def assessment_grade(self, user, assessment): all_answers = self.filter( user=user, question__assessment=assessment, ) correct_answers = all_answers.f...
[ "django.db.models.Count", "django.db.models.When", "django.db.models.Value", "django.db.models.FloatField" ]
[((1455, 1474), 'django.db.models.FloatField', 'models.FloatField', ([], {}), '()\n', (1472, 1474), False, 'from django.db import models\n'), ((1517, 1547), 'django.db.models.Count', 'models.Count', (['"""correct_answer"""'], {}), "('correct_answer')\n", (1529, 1547), False, 'from django.db import models\n'), ((1549, 1...
from django.conf import settings from django.conf.urls.static import static from django.urls import include, path, re_path from django.views.generic import TemplateView from text.views import MainDetailView, MainView, SiteDataView from listing.views import ListingHomeView from django.contrib import admin urlpattern...
[ "django.urls.include", "django.views.generic.TemplateView.as_view", "text.views.SiteDataView.as_view", "django.conf.urls.static.static", "django.urls.path", "listing.views.ListingHomeView.as_view" ]
[((936, 997), 'django.conf.urls.static.static', 'static', (['settings.MEDIA_URL'], {'document_root': 'settings.MEDIA_ROOT'}), '(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)\n', (942, 997), False, 'from django.conf.urls.static import static\n'), ((1013, 1076), 'django.conf.urls.static.static', 'static', (['set...
import os own_dir = os.path.abspath(os.path.dirname(__file__)) flavour_cfg_path = os.path.join(own_dir, os.pardir, 'build.yaml') cicd_cfg_path = os.path.join(own_dir, 'cicd.yaml')
[ "os.path.dirname", "os.path.join" ]
[((83, 129), 'os.path.join', 'os.path.join', (['own_dir', 'os.pardir', '"""build.yaml"""'], {}), "(own_dir, os.pardir, 'build.yaml')\n", (95, 129), False, 'import os\n'), ((146, 180), 'os.path.join', 'os.path.join', (['own_dir', '"""cicd.yaml"""'], {}), "(own_dir, 'cicd.yaml')\n", (158, 180), False, 'import os\n'), ((3...
#!/usr/bin/env python # -*- encoding: utf-8 -*- import torch try: import colossal_C except: print('Colossalai should be built with cuda extension to use the FP16 optimizer') from torch.optim import Optimizer from colossalai.context.parallel_mode import ParallelMode from colossalai.core import global_context...
[ "colossalai.utils.print_rank_0", "torch.cuda.FloatTensor", "colossalai.logging.get_dist_logger", "colossalai.utils.clip_grad_norm_fp32", "torch.max", "colossalai.core.global_context.get_group", "colossalai.utils.copy_tensor_parallel_attributes", "colossalai.utils.count_zeros_fp32", "torch.cuda.curre...
[((16274, 16289), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (16287, 16289), False, 'import torch\n'), ((1471, 1559), 'colossalai.utils.multi_tensor_applier', 'multi_tensor_applier', (['colossal_C.multi_tensor_scale', 'overflow_buf', '[this, that]', '(1.0)'], {}), '(colossal_C.multi_tensor_scale, overflow_buf,...
import math import os import random import time import gc import dgl import dgl.function as fn import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from sklearn.decomposition import PCA from dataset import load_dataset from utils import compute_spectral_emb, entropy def neighbor_ave...
[ "numpy.union1d", "dataset.load_dataset", "torch.LongTensor", "numpy.log", "torch.pow", "os.path.exists", "torch.cuda.device", "dgl.function.copy_src", "torch.zeros_like", "torch.argmax", "dgl.function.sum", "torch.ones_like", "os.path.dirname", "dgl.function.mean", "torch.nn.functional.o...
[((4853, 5007), 'os.path.join', 'os.path.join', (['""".."""', '"""embeddings"""', 'args.dataset', "(args.model if args.model != 'simple_sagn' else args.model + '_' + args.\n weight_style)", '"""smoothed_emb.pt"""'], {}), "('..', 'embeddings', args.dataset, args.model if args.model !=\n 'simple_sagn' else args.mod...
from office365.calendar.attendee import Attendee from office365.calendar.dateTimeTimeZone import DateTimeTimeZone from office365.calendar.emailAddress import EmailAddress from office365.calendar.event import Event from office365.entity_collection import EntityCollection from office365.mail.itemBody import ItemBody from...
[ "office365.calendar.emailAddress.EmailAddress", "office365.runtime.client_value_collection.ClientValueCollection", "office365.calendar.dateTimeTimeZone.DateTimeTimeZone.parse", "office365.mail.itemBody.ItemBody" ]
[((1432, 1454), 'office365.mail.itemBody.ItemBody', 'ItemBody', (['body', '"""HTML"""'], {}), "(body, 'HTML')\n", (1440, 1454), False, 'from office365.mail.itemBody import ItemBody\n'), ((1477, 1506), 'office365.calendar.dateTimeTimeZone.DateTimeTimeZone.parse', 'DateTimeTimeZone.parse', (['start'], {}), '(start)\n', (...
"""Get counterfactual prediction for 2000 US dollars tuition subsidy. Get counterfactual prediction for 2000 US dollars tuition subsidy for different parametrization of the model with hyperbolic discounting and choice restrictions based on Keane and Wolpin (1994) :cite:`KeaneWolpin1994`. Looking at the bivariate dist...
[ "bld.project_paths.project_paths_join", "respy.get_simulate_func", "src.library.housekeeping._temporary_working_directory", "numpy.linspace", "respy.get_example_model", "pandas.concat" ]
[((1260, 1290), 'numpy.linspace', 'np.linspace', (['(0)', '(99)', 'n_datasets'], {}), '(0, 99, n_datasets)\n', (1271, 1290), True, 'import numpy as np\n'), ((1307, 1342), 'numpy.linspace', 'np.linspace', (['(1000)', '(1099)', 'n_datasets'], {}), '(1000, 1099, n_datasets)\n', (1318, 1342), True, 'import numpy as np\n'),...
import sys import os import asyncio import functools from concurrent.futures import CancelledError import uuid import logging from hubManager import HubManager from sensehat import Sense_Hat logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO) def stdin_listener(): while True: selec...
[ "logging.basicConfig", "os.getenv", "sensehat.Sense_Hat", "sys._getframe", "hubManager.HubManager", "asyncio.get_event_loop", "logging.error", "asyncio.get_running_loop" ]
[((192, 267), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s - %(message)s"""', 'level': 'logging.INFO'}), "(format='%(asctime)s - %(message)s', level=logging.INFO)\n", (211, 267), False, 'import logging\n'), ((497, 541), 'os.getenv', 'os.getenv', (['"""IOTHUB_DEVICE_CONNECTION_STRING"""'...
import functools import os import pathlib import random import unittest import uuid from typing import Any from typing import Callable from typing import Type from typing import TypeVar from typing import cast import pytest from django.conf import settings as django_settings from django.utils.module_loading import imp...
[ "random.randint", "pathlib.Path", "os.environ.get", "functools.wraps", "uuid.uuid4", "django.utils.module_loading.import_string", "typing.cast", "typing.TypeVar" ]
[((538, 587), 'pathlib.Path', 'pathlib.Path', (['django_settings.STATICFILES_DIRS[0]'], {}), '(django_settings.STATICFILES_DIRS[0])\n', (550, 587), False, 'import pathlib\n'), ((593, 631), 'typing.TypeVar', 'TypeVar', (['"""F"""'], {'bound': 'Callable[..., Any]'}), "('F', bound=Callable[..., Any])\n", (600, 631), False...
#!/usr/bin/env python """ Create incidents that group together multiple layers of annotations. This is based on the createIncidentReportsFromEnhancements function from EIDR-Connect, although some differences exist in the output structure, and code related to manual curation (e.g. the accepted attribute) is not included...
[ "datetime.datetime", "re.compile", "datetime.datetime.now", "collections.defaultdict", "datetime.timedelta" ]
[((5753, 5776), 'collections.defaultdict', 'defaultdict', (['(lambda : 0)'], {}), '(lambda : 0)\n', (5764, 5776), False, 'from collections import defaultdict\n'), ((3978, 4001), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (3999, 4001), False, 'import datetime\n'), ((7589, 7663), 'datetime.dateti...
import time import random import datetime import os class Python: @staticmethod def print(*lines): if not lines: print('') for line in lines: print(line) @staticmethod def input(prompt): return input(prompt) @staticmethod def sleep(secs): ...
[ "random.choice", "time.sleep", "os.path.realpath", "datetime.datetime.now", "time.time" ]
[((324, 340), 'time.sleep', 'time.sleep', (['secs'], {}), '(secs)\n', (334, 340), False, 'import time\n'), ((405, 425), 'random.choice', 'random.choice', (['items'], {}), '(items)\n', (418, 425), False, 'import random\n'), ((480, 491), 'time.time', 'time.time', ([], {}), '()\n', (489, 491), False, 'import time\n'), ((5...
# -*- coding: utf-8 -*- # # Copyright (C) 2019 <NAME> <<EMAIL>> # All rights reserved. # # This code is licensed under the MIT License. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files(the "Software"), to deal # in the Software withou...
[ "os.path.isfile", "os.path.dirname" ]
[((2752, 2769), 'os.path.dirname', 'dirname', (['__file__'], {}), '(__file__)\n', (2759, 2769), False, 'from os.path import dirname\n'), ((6646, 6658), 'os.path.isfile', 'isfile', (['path'], {}), '(path)\n', (6652, 6658), False, 'from os.path import isfile\n')]
#!/usr/bin/env python3 # ref: http://open.blogs.nytimes.com/2014/07/10/emr-streaming-in-go/ import sys import json def main(): # loop through each line of stdin for line in sys.stdin: try: # parse the incoming json j = json.loads(line.strip()) # initialize outpu...
[ "sys.stderr.write", "json.dumps" ]
[((1017, 1035), 'json.dumps', 'json.dumps', (['output'], {}), '(output)\n', (1027, 1035), False, 'import json\n'), ((870, 916), 'sys.stderr.write', 'sys.stderr.write', (["('unable to read log: %s' % e)"], {}), "('unable to read log: %s' % e)\n", (886, 916), False, 'import sys\n'), ((1209, 1266), 'sys.stderr.write', 'sy...
import random def liste_perm(n): L = [] for i in range(n): L += [i] i = 1 while i < n: perm = random.randrange(0, n-i) tmp = L[perm] L[perm] = L[n-i] L[n-i] = tmp i += 1 return L
[ "random.randrange" ]
[((128, 154), 'random.randrange', 'random.randrange', (['(0)', '(n - i)'], {}), '(0, n - i)\n', (144, 154), False, 'import random\n')]
# -*- coding: utf-8 -*- # py2.7 and py3 compatibility imports from __future__ import unicode_literals import logging import socket, requests, json from collections import defaultdict from django.db import models from django.db.models.signals import post_save, post_delete from django.dispatch import receiver from djan...
[ "logging.getLogger", "socket.gethostbyname_ex", "django.db.models.ForeignKey", "django.db.models.DateTimeField", "django.conf.settings.ALLOWED_HOSTS.update_cache", "collections.defaultdict", "django.dispatch.receiver", "django.db.models.CharField" ]
[((400, 427), 'logging.getLogger', 'logging.getLogger', (['"""django"""'], {}), "('django')\n", (417, 427), False, 'import logging\n'), ((8000, 8034), 'django.dispatch.receiver', 'receiver', (['post_save'], {'sender': 'Record'}), '(post_save, sender=Record)\n', (8008, 8034), False, 'from django.dispatch import receiver...
import pandas as pd import torch from torch.utils.data import Dataset, DataLoader from transformers import MarianTokenizer, AutoModelForSeq2SeqLM MAX_LEN = 330 BATCH_SIZE = 32 EN_FR = "Helsinki-NLP/opus-mt-en-fr" FR_EN = "Helsinki-NLP/opus-mt-fr-en" DEVICE = torch.device("cuda") if torch.cuda.is_available() else torch...
[ "pandas.read_csv", "transformers.MarianTokenizer.from_pretrained", "transformers.AutoModelForSeq2SeqLM.from_pretrained", "torch.cuda.is_available", "torch.utils.data.DataLoader", "pandas.DataFrame", "torch.device" ]
[((356, 394), 'transformers.MarianTokenizer.from_pretrained', 'MarianTokenizer.from_pretrained', (['EN_FR'], {}), '(EN_FR)\n', (387, 394), False, 'from transformers import MarianTokenizer, AutoModelForSeq2SeqLM\n'), ((488, 526), 'transformers.MarianTokenizer.from_pretrained', 'MarianTokenizer.from_pretrained', (['FR_EN...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import logging import json import uuid from django.db import models from django.conf import settings from django.utils import timezone from google.protobuf.descriptor import FieldDescriptor logging.basicConfig() LOGGER = logging.getLogger(__name__) LOGGER.se...
[ "logging.basicConfig", "logging.getLogger", "json.loads", "uuid.UUID", "django.utils.timezone.make_aware", "json.dumps", "django.utils.timezone.make_naive" ]
[((252, 273), 'logging.basicConfig', 'logging.basicConfig', ([], {}), '()\n', (271, 273), False, 'import logging\n'), ((283, 310), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (300, 310), False, 'import logging\n'), ((3197, 3216), 'uuid.UUID', 'uuid.UUID', (['pb_value'], {}), '(pb_value...
from ..utils.network import Tcp_Message from ..utils.logger import getLogger from threading import Thread, Lock from random import randint class SimpleDataBase: def __init__(self, logger=getLogger()): ''' Clase que mantiene un funcionamiento Basico de una Bd de agentes (Thread Safe) ''' ...
[ "threading.Lock", "random.randint" ]
[((359, 365), 'threading.Lock', 'Lock', ([], {}), '()\n', (363, 365), False, 'from threading import Thread, Lock\n'), ((1408, 1430), 'random.randint', 'randint', (['(0)', '(n_data - 1)'], {}), '(0, n_data - 1)\n', (1415, 1430), False, 'from random import randint\n'), ((1456, 1478), 'random.randint', 'randint', (['(0)',...
""" Contains various utility methods. :file: utils.py :date: 27/08/2015 :authors: - <NAME> <<EMAIL>> """ from typing import Any, Type, Union import inspect import enum import sys class Endianness(enum.Enum): BIG = '>' LITTLE = '<' HOST = '=' TARGET = None def is_equivalent_to_little_endian(...
[ "inspect.isclass" ]
[((1259, 1277), 'inspect.isclass', 'inspect.isclass', (['t'], {}), '(t)\n', (1274, 1277), False, 'import inspect\n'), ((1332, 1350), 'inspect.isclass', 'inspect.isclass', (['v'], {}), '(v)\n', (1347, 1350), False, 'import inspect\n')]
# MIT License # # Copyright (c) 2020-2021 CNRS # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, pu...
[ "pyannote.audio.core.io.Audio", "torch.nn.Sigmoid", "pytorch_lightning.utilities.cloud_io.load", "importlib.import_module", "urllib.parse.urlparse", "huggingface_hub.hf_hub_url", "pyannote.core.SlidingWindow", "os.path.isfile", "pytorch_lightning.core.memory.ModelSummary", "semver.VersionInfo.pars...
[((1910, 1955), 'os.path.expanduser', 'os.path.expanduser', (['"""~/.cache/torch/pyannote"""'], {}), "('~/.cache/torch/pyannote')\n", (1928, 1955), False, 'import os\n'), ((3675, 3861), 'torch.randn', 'torch.randn', (['(batch_size, num_channels, num_samples)'], {'dtype': 'example_input_array.dtype', 'layout': 'example_...
"""Test application for the container reservations.""" import pandas as pd import shapely.geometry import simpy import openclsim.core as core import openclsim.model as model from .test_utils import assert_log def test_container_reservations(): """Test application for the container reservations.""" Site = t...
[ "openclsim.model.BasicActivity", "simpy.Environment", "openclsim.model.ShiftAmountActivity", "pandas.DataFrame", "openclsim.model.MoveActivity" ]
[((874, 922), 'simpy.Environment', 'simpy.Environment', ([], {'initial_time': 'simulation_start'}), '(initial_time=simulation_start)\n', (891, 922), False, 'import simpy\n'), ((6040, 6064), 'pandas.DataFrame', 'pd.DataFrame', (['vessel.log'], {}), '(vessel.log)\n', (6052, 6064), True, 'import pandas as pd\n'), ((2799, ...
import os from django.test import TestCase from .base import TESTS_ROOT, EXAMPLE_PROJECT_FILES from ..analyzers.base import BaseAnalyzer from ..parsers import Parser class CustomAnalyzer(BaseAnalyzer): def analyze_file(self, filepath, code): yield filepath class BaseAnalyzerTests(TestCase): def s...
[ "os.path.join" ]
[((363, 406), 'os.path.join', 'os.path.join', (['TESTS_ROOT', '"""example_project"""'], {}), "(TESTS_ROOT, 'example_project')\n", (375, 406), False, 'import os\n')]
from torch.utils.cpp_extension import load def load_fwi(path): fwi = load(name="fwi", sources=[path+'/Torch_Fwi.cpp', path+'/Parameter.cpp', path+'/libCUFD.cu', path+'/el_stress.cu', path+'/el_velocity.cu', path+'/el_stress_adj.cu', path+'/el_velocity_adj.cu', path+'/Model.cu', path+'/Cpml.cu', path+'/...
[ "torch.utils.cpp_extension.load" ]
[((74, 599), 'torch.utils.cpp_extension.load', 'load', ([], {'name': '"""fwi"""', 'sources': "[path + '/Torch_Fwi.cpp', path + '/Parameter.cpp', path + '/libCUFD.cu', \n path + '/el_stress.cu', path + '/el_velocity.cu', path +\n '/el_stress_adj.cu', path + '/el_velocity_adj.cu', path + '/Model.cu', \n path + '...
# Copyright 2009-2017 <NAME>. # This program is distributed under the MIT license. '''Testing module for `python_toolbox.math_tools.convert_to_base_in_tuple`.''' import sys from python_toolbox.math_tools import convert_to_base_in_tuple from python_toolbox import cute_testing def test(): assert convert_to_base_...
[ "python_toolbox.math_tools.convert_to_base_in_tuple", "python_toolbox.cute_testing.RaiseAssertor" ]
[((304, 342), 'python_toolbox.math_tools.convert_to_base_in_tuple', 'convert_to_base_in_tuple', (['(51346616)', '(16)'], {}), '(51346616, 16)\n', (328, 342), False, 'from python_toolbox.math_tools import convert_to_base_in_tuple\n'), ((382, 424), 'python_toolbox.math_tools.convert_to_base_in_tuple', 'convert_to_base_in...
import os import sys import time import traceback import torch from queue import Queue import requests from typing import List from functools import partial from ctools.utils import read_file, save_file, get_rank, get_world_size, get_data_decompressor, remove_file, broadcast from .base_comm_learner import BaseCommLea...
[ "ctools.utils.broadcast", "requests.post", "traceback.format_tb", "ctools.utils.read_file", "os.path.join", "os.environ.get", "time.sleep", "torch.tensor", "sys.exc_info", "ctools.utils.remove_file", "functools.partial", "ctools.utils.get_world_size", "time.time", "os.path.abspath", "cto...
[((1479, 1489), 'ctools.utils.get_rank', 'get_rank', ([], {}), '()\n', (1487, 1489), False, 'from ctools.utils import read_file, save_file, get_rank, get_world_size, get_data_decompressor, remove_file, broadcast\n'), ((1517, 1533), 'ctools.utils.get_world_size', 'get_world_size', ([], {}), '()\n', (1531, 1533), False, ...
import os, sys, traceback import re, time, datetime, inspect import shutil, atexit import subprocess,collections import yaml from awsRESv2 import * #version 2: add command cli recording def print_color(message, color="black", style="{}", newLine=True): COLORS = { "black": "\x1b[30m", "red": "\x1b[...
[ "os.path.exists", "signal.signal", "os.getenv", "yaml.dump", "re.compile", "subprocess.Popen", "traceback.print_stack", "shutil.move", "inspect.stack", "yaml.load", "time.sleep", "datetime.datetime.now", "os.popen", "collections.defaultdict", "sys.exit", "traceback.print_exc", "atexi...
[((18955, 18972), 'os.getenv', 'os.getenv', (['"""HOME"""'], {}), "('HOME')\n", (18964, 18972), False, 'import os, sys, traceback\n'), ((19240, 19266), 'atexit.register', 'atexit.register', (['obj.close'], {}), '(obj.close)\n', (19255, 19266), False, 'import shutil, atexit\n'), ((19431, 19475), 'signal.signal', 'signal...
# encoding: utf8 # # This file is part of the Neurons project. # Copyright (c), Arskom Ltd. (arskom.com.tr), # <NAME> <<EMAIL>>. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # ...
[ "spyne.Unicode", "spyne.ComplexModel.__init__", "spyne.Array" ]
[((2500, 2527), 'spyne.ComplexModel.__init__', 'ComplexModel.__init__', (['self'], {}), '(self)\n', (2521, 2527), False, 'from spyne import Unicode, ComplexModel, Double, Array, AnyDict\n'), ((2786, 2813), 'spyne.ComplexModel.__init__', 'ComplexModel.__init__', (['self'], {}), '(self)\n', (2807, 2813), False, 'from spy...
#!/usr/bin/env python3 """Download podcast episodes from subscriptions in config file sections.""" __title__ = 'download-podcasts.py' __version__ = '0.1.dev0' __author__ = '<NAME> <<EMAIL>>' __license__ = 'MIT, see LICENSE.txt' __copyright__ = 'Copyright (c) 2020-2021 <NAME>' import argparse import asyncio import co...
[ "aiohttp.ClientSession", "xml.etree.ElementTree.parse", "string.Template", "argparse.ArgumentParser", "pathlib.Path", "re.compile", "time.monotonic", "io.BytesIO", "argparse.ArgumentTypeError", "codecs.lookup", "asyncio.gather", "asyncio.get_event_loop" ]
[((561, 589), 'pathlib.Path', 'pathlib.Path', (['"""podcasts.ini"""'], {}), "('podcasts.ini')\n", (573, 589), False, 'import pathlib\n'), ((1151, 1195), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '__doc__'}), '(description=__doc__)\n', (1174, 1195), False, 'import argparse\n'), ((5974, 5...
#!/usr/bin/env python3 import argparse import logging import os import re import subprocess from concurrent.futures import ThreadPoolExecutor, as_completed def job(command): """Takes a list of str, and runs it as a subprocess.""" command_line = " ".join(command) logging.debug(f"Running '{command_line}'\n...
[ "logging.basicConfig", "os.path.exists", "os.listdir", "logging.debug", "argparse.ArgumentParser", "os.makedirs", "re.compile", "concurrent.futures.ThreadPoolExecutor", "subprocess.run", "os.path.join", "concurrent.futures.as_completed", "os.path.dirname", "os.path.basename" ]
[((278, 322), 'logging.debug', 'logging.debug', (['f"""Running \'{command_line}\'\n"""'], {}), '(f"Running \'{command_line}\'\\n")\n', (291, 322), False, 'import logging\n'), ((454, 515), 'logging.debug', 'logging.debug', (['f"""Command \'{command_line} output:\n\'{res}\'"""'], {}), '(f"""Command \'{command_line} outpu...
""" Creates Indexes on contentstore and modulestore databases. """ from django.core.management.base import BaseCommand from xmodule.contentstore.django import contentstore from xmodule.modulestore.django import modulestore class Command(BaseCommand): """ This command will create indexes on the stores used ...
[ "xmodule.contentstore.django.contentstore", "xmodule.modulestore.django.modulestore" ]
[((506, 520), 'xmodule.contentstore.django.contentstore', 'contentstore', ([], {}), '()\n', (518, 520), False, 'from xmodule.contentstore.django import contentstore\n'), ((546, 559), 'xmodule.modulestore.django.modulestore', 'modulestore', ([], {}), '()\n', (557, 559), False, 'from xmodule.modulestore.django import mod...
#Filename : plankton.py #written by <NAME> #on import csv import numpy as np from scipy import interpolate def reader(filename): """reader reads the .csv file and returns the data as list""" with open(filename, 'r') as fl: reader = csv.reader(fl, dialect = 'excel') data = list(reader) ...
[ "csv.reader", "scipy.interpolate.interp2d", "numpy.savetxt", "numpy.arctan" ]
[((1998, 2052), 'numpy.savetxt', 'np.savetxt', (['"""out.csv"""', 'output'], {'delimiter': '""","""', 'fmt': '"""%s"""'}), "('out.csv', output, delimiter=',', fmt='%s')\n", (2008, 2052), True, 'import numpy as np\n'), ((6268, 6311), 'scipy.interpolate.interp2d', 'interpolate.interp2d', (['x', 'y', 'z'], {'kind': '"""cu...
from notedrive.lanzou import LanZouCloud from notetool.log import logger from notetool.tool.secret import read_secret downer = LanZouCloud() downer.ignore_limits() downer.login_by_cookie() logger.info('begin') #print(downer.sync_directory(path_root='/root/workspace/tmp/coin', folder_id='3358325')) downer.upload_file(...
[ "notetool.log.logger.info", "notedrive.lanzou.LanZouCloud" ]
[((128, 141), 'notedrive.lanzou.LanZouCloud', 'LanZouCloud', ([], {}), '()\n', (139, 141), False, 'from notedrive.lanzou import LanZouCloud\n'), ((191, 211), 'notetool.log.logger.info', 'logger.info', (['"""begin"""'], {}), "('begin')\n", (202, 211), False, 'from notetool.log import logger\n')]
from typing import Dict, List from overrides import overrides import torch from allennlp.common.util import pad_sequence_to_length from allennlp.data.vocabulary import Vocabulary from allennlp.data.tokenizers.token import Token from allennlp.data.fields.field import Field class NamespaceSwappingField(Field[torch.Te...
[ "allennlp.common.util.pad_sequence_to_length" ]
[((1114, 1173), 'allennlp.common.util.pad_sequence_to_length', 'pad_sequence_to_length', (['self._mapping_array', 'desired_length'], {}), '(self._mapping_array, desired_length)\n', (1136, 1173), False, 'from allennlp.common.util import pad_sequence_to_length\n')]
import signal from subprocess import Popen, PIPE import sys from typing import Any, Dict, MutableMapping, Optional, Sequence, Type, TYPE_CHECKING from ..exceptions import PoeException from ..virtualenv import Virtualenv if TYPE_CHECKING: from pathlib import Path from ..context import RunContext # TODO: maybe ...
[ "subprocess.Popen", "signal.signal", "coverage.Coverage.current" ]
[((4311, 4337), 'subprocess.Popen', 'Popen', (['cmd'], {}), '(cmd, **popen_kwargs)\n', (4316, 4337), False, 'from subprocess import Popen, PIPE\n'), ((4479, 4522), 'signal.signal', 'signal.signal', (['signal.SIGINT', 'handle_signal'], {}), '(signal.SIGINT, handle_signal)\n', (4492, 4522), False, 'import signal\n'), ((4...
# system imports import sys import time,os,datetime import shutil as sh # resources from Config import * from Resources.Colors import * # services from Services.common.Audio import * from Services.common.Core import * from Services.common.Input import Key # # from Services.pc.pc_video import PCVideo # from Services.p...
[ "Services.pi.pi_video_sh1106.PiVideoSH1106", "Services.pi.pi_input.PiInput", "sys.exit" ]
[((548, 669), 'Services.pi.pi_video_sh1106.PiVideoSH1106', 'PiVideoSH1106', (['Config.DisplayWidth', 'Config.DisplayHeight', 'Config.FontFile', 'Config.LargeFontSize', 'Config.SmallFontSize'], {}), '(Config.DisplayWidth, Config.DisplayHeight, Config.FontFile,\n Config.LargeFontSize, Config.SmallFontSize)\n', (561, 6...
#!/usr/bin/env python """Module for manipulating binary files, especially those with Fortran formatted records. """ import struct from collections import Iterable from warnings import warn from pyne.utils import QAWarning warn(__name__ + " is not yet QA compliant.", QAWarning) class _FortranRecord(object): """A...
[ "warnings.warn", "struct.calcsize", "struct.pack" ]
[((225, 280), 'warnings.warn', 'warn', (["(__name__ + ' is not yet QA compliant.')", 'QAWarning'], {}), "(__name__ + ' is not yet QA compliant.', QAWarning)\n", (229, 280), False, 'from warnings import warn\n'), ((770, 790), 'struct.calcsize', 'struct.calcsize', (['"""i"""'], {}), "('i')\n", (785, 790), False, 'import ...
import pytest from energuide.embedded import distance def test_distance() -> None: output = distance.Distance(1) assert output.metres == 1.0 assert output.feet == pytest.approx(3.28084) def test_from_square_feet() -> None: output = distance.Distance.from_feet(1) assert output.metres == pytest.ap...
[ "pytest.approx", "energuide.embedded.distance.Distance.from_feet", "energuide.embedded.distance.Distance" ]
[((98, 118), 'energuide.embedded.distance.Distance', 'distance.Distance', (['(1)'], {}), '(1)\n', (115, 118), False, 'from energuide.embedded import distance\n'), ((252, 282), 'energuide.embedded.distance.Distance.from_feet', 'distance.Distance.from_feet', (['(1)'], {}), '(1)\n', (279, 282), False, 'from energuide.embe...
import numpy as np import pandas as pd import matplotlib.pyplot as plt from linear_regression import Linear_regression def Call_myLRmodel(data): # add ones column data.insert(0, 'Ones', 1) # set X (training data) and y (target variable) cols = data.shape[1] X = data.iloc[:,0:cols-1] y = data....
[ "pandas.read_csv", "numpy.array", "numpy.zeros", "pandas.DataFrame", "linear_regression.Linear_regression", "sklearn.linear_model.LinearRegression" ]
[((396, 414), 'numpy.array', 'np.array', (['X.values'], {}), '(X.values)\n', (404, 414), True, 'import numpy as np\n'), ((423, 441), 'numpy.array', 'np.array', (['y.values'], {}), '(y.values)\n', (431, 441), True, 'import numpy as np\n'), ((454, 477), 'numpy.zeros', 'np.zeros', (['[1, cols - 1]'], {}), '([1, cols - 1])...
from mycroft import MycroftSkill, intent_file_handler class LimpezaDeAlimentos(MycroftSkill): def __init__(self): MycroftSkill.__init__(self) @intent_file_handler('alimentos.de.limpeza.intent') def handle_alimentos_de_limpeza(self, message): self.speak_dialog('alimentos.de.limpeza') def...
[ "mycroft.intent_file_handler", "mycroft.MycroftSkill.__init__" ]
[((162, 212), 'mycroft.intent_file_handler', 'intent_file_handler', (['"""alimentos.de.limpeza.intent"""'], {}), "('alimentos.de.limpeza.intent')\n", (181, 212), False, 'from mycroft import MycroftSkill, intent_file_handler\n'), ((128, 155), 'mycroft.MycroftSkill.__init__', 'MycroftSkill.__init__', (['self'], {}), '(se...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'Varun.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtGui,...
[ "PyQt5.QtWidgets.QWidget", "PyQt5.QtWidgets.QTextEdit", "PyQt5.QtGui.QFont", "PyQt5.QtWidgets.QSpacerItem", "PyQt5.QtCore.QMetaObject.connectSlotsByName", "PyQt5.QtWidgets.QFrame", "PyQt5.QtWidgets.QHBoxLayout", "PyQt5.QtWidgets.QApplication", "PyQt5.QtWidgets.QVBoxLayout", "PyQt5.QtWidgets.QPushB...
[((18108, 18140), 'PyQt5.QtWidgets.QApplication', 'QtWidgets.QApplication', (['sys.argv'], {}), '(sys.argv)\n', (18130, 18140), False, 'from PyQt5 import QtCore, QtGui, QtWidgets\n'), ((18152, 18171), 'PyQt5.QtWidgets.QWidget', 'QtWidgets.QWidget', ([], {}), '()\n', (18169, 18171), False, 'from PyQt5 import QtCore, QtG...
# Generated by Django 3.2.8 on 2021-10-25 01:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('itinerary', '0007_auto_20211025_1153'), ] operations = [ migrations.AlterField( model_name='activity', name='cost', ...
[ "django.db.models.CharField" ]
[((338, 431), 'django.db.models.CharField', 'models.CharField', ([], {'choices': "[('HI', 'High'), ('ME', 'Medium'), ('LO', 'Low')]", 'max_length': '(2)'}), "(choices=[('HI', 'High'), ('ME', 'Medium'), ('LO', 'Low')],\n max_length=2)\n", (354, 431), False, 'from django.db import migrations, models\n')]
# 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 applicable law or agreed to in writing, software # distributed under th...
[ "retworkx.directed_gnp_random_graph", "retworkx.undirected_gnp_random_graph" ]
[((682, 734), 'retworkx.directed_gnp_random_graph', 'retworkx.directed_gnp_random_graph', (['(20)', '(0.5)'], {'seed': '(10)'}), '(20, 0.5, seed=10)\n', (716, 734), False, 'import retworkx\n'), ((1206, 1260), 'retworkx.undirected_gnp_random_graph', 'retworkx.undirected_gnp_random_graph', (['(20)', '(0.5)'], {'seed': '(...
import boto.exception as exception import v1.utils.log as log from .json_ops import JBucket from v1.lib.io_info import AddIOInfo class Bucket(object): def __init__(self, connection): log.debug('class: %s' % self.__class__.__name__) self.connection = connection self.add_io_info = AddIOInfo...
[ "v1.lib.io_info.AddIOInfo", "v1.utils.log.debug", "v1.utils.log.info", "v1.utils.log.error" ]
[((5585, 5643), 'v1.utils.log.debug', 'log.debug', (["('function: %s' % check_if_bucket_empty.__name__)"], {}), "('function: %s' % check_if_bucket_empty.__name__)\n", (5594, 5643), True, 'import v1.utils.log as log\n'), ((5653, 5692), 'v1.utils.log.info', 'log.info', (['"""checking if bucket is empty"""'], {}), "('chec...
# -*- coding: utf-8 -*- # The MIT License (MIT) # # Copyright (c) 2015 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # ...
[ "vidmaster.clip_builder.do_concatenate", "vidmaster.clip_builder.do_set_audio", "vidmaster.clip_builder.do_subclip", "vidmaster.clip_builder.define_image", "vidmaster.clip_builder.define_audio", "vidmaster.parser.parse_block", "vidmaster.clip_builder.effect_margin", "vidmaster.clip_builder.define_vide...
[((4220, 4242), 'os.path.isfile', 'os.path.isfile', (['script'], {}), '(script)\n', (4234, 4242), False, 'import os\n'), ((4864, 4882), 'vidmaster.parser.parse_block', 'parse_block', (['block'], {}), '(block)\n', (4875, 4882), False, 'from vidmaster.parser import parse_block\n'), ((1947, 1963), 'vidmaster.clip_builder....
# Copyright 2019-2022 Cambridge Quantum Computing # # 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 applicable law or a...
[ "json.loads", "pytket.extensions.qiskit.result_convert.qiskit_experimentresult_to_backendresult", "pytket.backends.ResultHandle", "qiskit.providers.aer.AerSimulator.from_backend", "pytket.utils.prepare_circuit", "json.dumps", "pytket.backends.CircuitNotRunError", "qiskit.providers.aer.noise.noise_mode...
[((2937, 2983), 'qiskit.providers.aer.AerSimulator.from_backend', 'AerSimulator.from_backend', (['self._ibmq._backend'], {}), '(self._ibmq._backend)\n', (2962, 2983), False, 'from qiskit.providers.aer import AerSimulator\n'), ((5617, 5654), 'typing.cast', 'cast', (['List[ResultHandle]', 'handle_list'], {}), '(List[Resu...
""" This file does the calculatoin, it saves the files and deletes a file from the do list. This scripts loads ERA5 hourly atmospheric data and tries to close the AM budget. This is pyhton 3 """ import os import sys root_path= 'path_to_project' sys.path.append(root_path) import tools_AM_budget as M from tools_AM_b...
[ "matplotlib.pyplot.grid", "matplotlib.pyplot.ylabel", "tools_AM_budget.save_log_txt", "tools_AM_budget.json_load", "numpy.array", "tools_AM_budget.write_log", "numpy.sin", "sys.path.append", "xarray.merge", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylim", "tools_AM_budget.json_save", "too...
[((249, 275), 'sys.path.append', 'sys.path.append', (['root_path'], {}), '(root_path)\n', (264, 275), False, 'import sys\n'), ((627, 638), 'time.time', 'time.time', ([], {}), '()\n', (636, 638), False, 'import time\n'), ((1018, 1050), 'tools_AM_budget.json_load', 'M.json_load', (['"""config"""', 'root_path'], {}), "('c...
import falcon def start_server(DLWebServer): app = application = falcon.App() app.add_route('/testshortresource', DLWebServer.TestShortResource()) app.add_route('/testlongresource', DLWebServer.TestLongResource()) app.add_route('/network', DLWebServer.NetworkResource()) app.add_r...
[ "falcon.App" ]
[((81, 93), 'falcon.App', 'falcon.App', ([], {}), '()\n', (91, 93), False, 'import falcon\n')]
from setuptools import setup import os this_dir = os.path.dirname(__file__) with open(os.path.join(this_dir, "README.md"), "rb") as fo: long_description = fo.read().decode("utf8") setup( name='rainflow', package_dir={"": "src"}, py_modules=['rainflow'], description='Implementation of ASTM E1049-...
[ "os.path.join", "os.path.dirname", "setuptools.setup" ]
[((51, 76), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (66, 76), False, 'import os\n'), ((188, 1378), 'setuptools.setup', 'setup', ([], {'name': '"""rainflow"""', 'package_dir': "{'': 'src'}", 'py_modules': "['rainflow']", 'description': '"""Implementation of ASTM E1049-85 rainflow cycle ...
import codecs import gzip import logging import numpy from ..layers.time_distributed_embedding import TimeDistributedEmbedding from .data_indexer import DataIndexer logger = logging.getLogger(__name__) # pylint: disable=invalid-name class PretrainedEmbeddings: @staticmethod def initialize_random_matrix(sh...
[ "logging.getLogger", "gzip.open", "numpy.asarray", "codecs.open", "numpy.random.RandomState" ]
[((177, 204), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (194, 204), False, 'import logging\n'), ((468, 498), 'numpy.random.RandomState', 'numpy.random.RandomState', (['seed'], {}), '(seed)\n', (492, 498), False, 'import numpy\n'), ((1926, 1962), 'gzip.open', 'gzip.open', (['embedding...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'tfnev_codeepneat_mainwindow_ui.ui' # # Created by: PyQt5 UI code generator 5.15.0 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from Py...
[ "PyQt5.QtWidgets.QWidget", "PyQt5.QtWidgets.QMenu", "PyQt5.QtGui.QFont", "PyQt5.QtWidgets.QListWidget", "PyQt5.QtCore.QMetaObject.connectSlotsByName", "PyQt5.QtWidgets.QFrame", "PyQt5.QtWidgets.QAction", "PyQt5.QtCore.QRect", "PyQt5.QtWidgets.QLabel", "PyQt5.QtWidgets.QVBoxLayout", "PyQt5.QtWidg...
[((535, 564), 'PyQt5.QtWidgets.QWidget', 'QtWidgets.QWidget', (['MainWindow'], {}), '(MainWindow)\n', (552, 564), False, 'from PyQt5 import QtCore, QtGui, QtWidgets\n'), ((705, 742), 'PyQt5.QtWidgets.QWidget', 'QtWidgets.QWidget', (['self.centralwidget'], {}), '(self.centralwidget)\n', (722, 742), False, 'from PyQt5 im...
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton class Script(object): START_TEXT = """ Hey {} I am Telegram Most Powerful Subtitle Muxer Bot I can Mux Any Srt or Txt File in File or Video Use Help Command to Know How to Use me Made With 💕 By @Tellybots_4u """ HELP_TEXT = """ Reco...
[ "pyrogram.types.InlineKeyboardButton" ]
[((1075, 1160), 'pyrogram.types.InlineKeyboardButton', 'InlineKeyboardButton', (['"""🤖 Update Channel"""'], {'url': '"""https://telegram.me/tellybots_4u"""'}), "('🤖 Update Channel', url='https://telegram.me/tellybots_4u'\n )\n", (1095, 1160), False, 'from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardB...
# -*- coding: utf-8 -*- # Copyright 2018 ICON Foundation # # 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 applicable law ...
[ "threading.Lock" ]
[((1226, 1232), 'threading.Lock', 'Lock', ([], {}), '()\n', (1230, 1232), False, 'from threading import Lock\n')]
import setuptools setuptools.setup( name="UnDupe", version="0.0.1", author="<NAME>, <NAME>, <NAME>", author_email="", description="Remove duplicate texts from a .txt file", long_description="Remove duplicate texts from a .txt file " "by using cosine similarity to compare te...
[ "setuptools.find_packages" ]
[((441, 467), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (465, 467), False, 'import setuptools\n')]
# EMACS settings: -*- tab-width: 2; indent-tabs-mode: t; python-indent-offset: 2 -*- # vim: tabstop=2:shiftwidth=2:noexpandtab # kate: tab-width 2; replace-tabs off; indent-width 2; # # ============================================================================== # Authors: <NAME> # <NAME> #...
[ "ToolChains.EditionDescription", "re.compile" ]
[((2037, 2100), 'ToolChains.EditionDescription', 'EditionDescription', ([], {'Name': '"""ModelSim Intel Edition"""', 'Section': 'None'}), "(Name='ModelSim Intel Edition', Section=None)\n", (2055, 2100), False, 'from ToolChains import ConfigurationException, EditionDescription, Edition\n'), ((2140, 2211), 'ToolChains.Ed...
# -*- coding: utf-8 -*- """ Base components for the CRUD subpackage. """ from abc import abstractmethod from contextlib import AbstractContextManager from functools import cached_property from types import TracebackType import typing as tp from app.crud import ( models, repos, ) from app.crud.models.base impor...
[ "functools.cached_property", "app.utils.strutils.camel_to_snake", "typing.TypeVar" ]
[((443, 495), 'typing.TypeVar', 'tp.TypeVar', (['"""UnitOfWorkType"""'], {'bound': '"""UnitOfWorkBase"""'}), "('UnitOfWorkType', bound='UnitOfWorkBase')\n", (453, 495), True, 'import typing as tp\n'), ((5435, 5458), 'functools.cached_property', 'cached_property', (['get_fn'], {}), '(get_fn)\n', (5450, 5458), False, 'fr...
#!/usr/bin/env python import subprocess as sp import sys import argparse sys.path.append("..") from snakePipes import common_functions as cf def parse_args(): parser = argparse.ArgumentParser() required = parser.add_argument_group('Required Arguments') required.add_argument("-d", ...
[ "sys.path.append", "snakePipes.common_functions.set_env_yamls", "argparse.ArgumentParser" ]
[((75, 96), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (90, 96), False, 'import sys\n'), ((176, 201), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (199, 201), False, 'import argparse\n'), ((571, 589), 'snakePipes.common_functions.set_env_yamls', 'cf.set_env_yamls', ...
# B"H import os import docker # Import flask and template operators from flask import Flask, jsonify, render_template ,send_from_directory from flask_socketio import SocketIO from flask_cors import CORS # Define the WSGI application object app = Flask(__name__, static_folder='./') CORS(app) # Configurations app.conf...
[ "flask.send_from_directory", "flask_cors.CORS", "flask.Flask", "flask_socketio.SocketIO", "docker.APIClient" ]
[((248, 283), 'flask.Flask', 'Flask', (['__name__'], {'static_folder': '"""./"""'}), "(__name__, static_folder='./')\n", (253, 283), False, 'from flask import Flask, jsonify, render_template, send_from_directory\n'), ((284, 293), 'flask_cors.CORS', 'CORS', (['app'], {}), '(app)\n', (288, 293), False, 'from flask_cors i...
import os broker_url = os.environ.get('CELERY_BROKER_URL', 'redis://localhost:6379/0'), result_backend = os.environ.get('CELERY_RESULT_BACKEND', 'redis://localhost:6379/0') accept_content = ['pickle'] task_serializer = 'pickle' result_serializer = 'pickle'
[ "os.environ.get" ]
[((106, 173), 'os.environ.get', 'os.environ.get', (['"""CELERY_RESULT_BACKEND"""', '"""redis://localhost:6379/0"""'], {}), "('CELERY_RESULT_BACKEND', 'redis://localhost:6379/0')\n", (120, 173), False, 'import os\n'), ((24, 87), 'os.environ.get', 'os.environ.get', (['"""CELERY_BROKER_URL"""', '"""redis://localhost:6379/...
# Copyright (c) 2015, <NAME> # See LICENSE file for details: <https://github.com/moble/scri/blob/master/LICENSE> import math import numpy as np import quaternion import scri import spherical_functions as sf import warnings def modes_constructor(constructor_statement, data_functor, **kwargs): """WaveformModes obj...
[ "numpy.sqrt", "scipy.special.factorial", "numpy.log", "math.sqrt", "spherical_functions.Wigner3j", "numpy.array", "scri.SpinWeights.index", "spherical_functions.LM_index", "numpy.arange", "scri.sample_waveforms.fake_precessing_waveform", "scipy.interpolate.CubicSpline", "numpy.exp", "numpy.l...
[((1874, 2171), 'scri.WaveformModes', 'scri.WaveformModes', ([], {'t': 't', 'frame': 'frame', 'data': 'data', 'history': "['# Called from constant_waveform']", 'frameType': 'frameType', 'dataType': 'dataType', 'r_is_scaled_out': 'r_is_scaled_out', 'm_is_scaled_out': 'm_is_scaled_out', 'constructor_statement': 'construc...
import streamlit as st import sqlite3 import hashlib def app(): def create_usertable(): conn = sqlite3.connect('/home/dakeh/Escritorio/rebornsdc/app/data/bin/greenchain_users.db') c = conn.cursor() c.execute( 'CREATE TABLE IF NOT EXISTS tablaUsuarios(usern...
[ "sqlite3.connect", "streamlit.text_input", "streamlit.button", "streamlit.subheader" ]
[((1323, 1385), 'streamlit.subheader', 'st.subheader', (['"""Intranet: Crear nuevo usuario para Green Chain"""'], {}), "('Intranet: Crear nuevo usuario para Green Chain')\n", (1335, 1385), True, 'import streamlit as st\n'), ((1418, 1442), 'streamlit.text_input', 'st.text_input', (['"""Usuario"""'], {}), "('Usuario')\n"...
import atexit from threading import Thread from app.event_broker import event_broker from app import app from app.dispatcher import run_event_handling_loop event_thread = run_event_handling_loop() def close_running_thread(t: Thread): event_broker.rpush('dbtool:evet', 'quit') t.join() atexit.register(clos...
[ "app.app.run", "app.event_broker.event_broker.rpush", "app.dispatcher.run_event_handling_loop", "atexit.register" ]
[((174, 199), 'app.dispatcher.run_event_handling_loop', 'run_event_handling_loop', ([], {}), '()\n', (197, 199), False, 'from app.dispatcher import run_event_handling_loop\n'), ((300, 351), 'atexit.register', 'atexit.register', (['close_running_thread', 'event_thread'], {}), '(close_running_thread, event_thread)\n', (3...
from commitizen import BaseCommitizen, out from commitizen.cz import registry NO_COMMITIZEN_FOUND = 2 def commiter_factory(config: dict) -> BaseCommitizen: """Return the correct commitizen existing in the registry.""" name: str = config["name"] try: _cz = registry[name](config) except KeyErro...
[ "commitizen.out.error" ]
[((478, 498), 'commitizen.out.error', 'out.error', (['msg_error'], {}), '(msg_error)\n', (487, 498), False, 'from commitizen import BaseCommitizen, out\n')]
""" The roseguarden project Copyright (C) 2018-2020 <NAME>, 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 program is ...
[ "core.logs.logManager.error", "datetime.datetime.now", "core.jobs.jobManager.JobManager", "inspect.isclass", "datetime.timedelta", "flask.Blueprint" ]
[((982, 1009), 'flask.Blueprint', 'Blueprint', (['"""jobs"""', '__name__'], {}), "('jobs', __name__)\n", (991, 1009), False, 'from flask import Blueprint\n'), ((1024, 1036), 'core.jobs.jobManager.JobManager', 'JobManager', ([], {}), '()\n', (1034, 1036), False, 'from core.jobs.jobManager import JobManager\n'), ((1400, ...