code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
#!/usr/bin/env python ###################################################################### # Software License Agreement (BSD License) # # Copyright (c) 2010, Rice University # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that t...
[ "matplotlib.backends.backend_pdf.PdfPages", "os.remove", "numpy.sum", "optparse.OptionParser", "matplotlib.pyplot.clf", "matplotlib.pyplot.boxplot", "matplotlib.pyplot.bar", "numpy.mean", "matplotlib.pyplot.gca", "matplotlib.font_manager.FontProperties", "numpy.std", "os.path.exists", "matpl...
[((1977, 1998), 'matplotlib.use', 'matplotlib.use', (['"""pdf"""'], {}), "('pdf')\n", (1991, 1998), False, 'import matplotlib\n'), ((4389, 4412), 'sqlite3.connect', 'sqlite3.connect', (['dbname'], {}), '(dbname)\n', (4404, 4412), False, 'import sqlite3\n'), ((15219, 15228), 'matplotlib.pyplot.clf', 'plt.clf', ([], {}),...
# -*- coding: utf-8 -*- from flask_restful import Resource from flask_login import login_user, login_required, current_user from .parsers import login_parser, update_info_parser from .managers import AuthManager, UserManager from ..constants import Code from ..functions import make_response class LoginResource(Reso...
[ "flask_login.login_user" ]
[((650, 666), 'flask_login.login_user', 'login_user', (['user'], {}), '(user)\n', (660, 666), False, 'from flask_login import login_user, login_required, current_user\n')]
import os import numpy as np from wavedata.tools.core import calib_utils class ObjectLabel: """Object Label Class 1 type Describes the type of object: 'Car', 'Van', 'Truck', 'Pedestrian', 'Person_sitting', 'Cyclist', 'Tram', 'Misc' or 'DontCare' 1 ...
[ "wavedata.tools.core.calib_utils.project_to_image", "wavedata.tools.core.calib_utils.read_calibration", "numpy.logical_and", "os.stat", "numpy.asarray", "numpy.zeros", "numpy.ones", "numpy.sin", "wavedata.tools.core.calib_utils.lidar_to_cam_frame", "numpy.arange", "wavedata.tools.core.calib_util...
[((3056, 3076), 'numpy.arange', 'np.arange', (['label_num'], {}), '(label_num)\n', (3065, 3076), True, 'import numpy as np\n'), ((6754, 6777), 'numpy.zeros', 'np.zeros', (['(num_objs, 4)'], {}), '((num_objs, 4))\n', (6762, 6777), True, 'import numpy as np\n'), ((6793, 6816), 'numpy.zeros', 'np.zeros', (['(num_objs, 7)'...
# # 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...
[ "gabbi.case.HTTPTestCase" ]
[((963, 996), 'gabbi.case.HTTPTestCase', 'case.HTTPTestCase', (['"""test_request"""'], {}), "('test_request')\n", (980, 996), False, 'from gabbi import case\n'), ((2073, 2106), 'gabbi.case.HTTPTestCase', 'case.HTTPTestCase', (['"""test_request"""'], {}), "('test_request')\n", (2090, 2106), False, 'from gabbi import cas...
#!/usr/bin/env python import hatchet as ht if __name__ == "__main__": # Path to caliper json-split file. json_file = "../../../hatchet/tests/data/caliper-cpi-json/cpi-callpath-profile.json" # Use hatchet's ``from_caliper_json`` API with the resulting json-split. # The result is stored into Hatchet's...
[ "hatchet.GraphFrame.from_caliper_json" ]
[((342, 384), 'hatchet.GraphFrame.from_caliper_json', 'ht.GraphFrame.from_caliper_json', (['json_file'], {}), '(json_file)\n', (373, 384), True, 'import hatchet as ht\n')]
from options import opt import os from pathlib import Path import json import numpy as np from dataset import NoteDataset, get_loader import torch from model import Rnn, BiRNN, NeuralNet, NeuralNetWithRNN import torch.nn as nn import copy from tqdm import tqdm from torch.optim.lr_scheduler import ReduceLROnPlateau from...
[ "tqdm.tqdm", "torch.narrow", "dataset.NoteDataset", "torch.nn.BCEWithLogitsLoss", "torch.optim.lr_scheduler.ReduceLROnPlateau", "torch.FloatTensor", "model.NeuralNetWithRNN", "pathlib.Path", "dataset.get_loader", "numpy.array", "numpy.loadtxt", "torch.nn.SmoothL1Loss", "visual.visualization"...
[((1566, 1594), 'dataset.NoteDataset', 'NoteDataset', (['data_seq', 'label'], {}), '(data_seq, label)\n', (1577, 1594), False, 'from dataset import NoteDataset, get_loader\n'), ((1628, 1648), 'dataset.get_loader', 'get_loader', (['data_set'], {}), '(data_set)\n', (1638, 1648), False, 'from dataset import NoteDataset, g...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 OpenStack Foundation. # All Rights Reserved. # # 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....
[ "neutron.manager.validate_pre_plugin_load", "oslo.config.cfg.CONF.import_opt", "neutron.openstack.common.log.getLogger", "oslo.config.cfg.CONF.set_override", "fixtures.MonkeyPatch", "os.path.dirname", "neutron.manager.NeutronManager.get_instance", "neutron.common.config.parse", "neutron.manager.Neut...
[((1120, 1147), 'neutron.openstack.common.log.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1137, 1147), True, 'from neutron.openstack.common import log as logging\n'), ((1277, 1305), 'os.path.join', 'os.path.join', (['ROOTDIR', '"""etc"""'], {}), "(ROOTDIR, 'etc')\n", (1289, 1305), False, 'impo...
# Copyright (c) Johns Hopkins University and its affiliates. # This source code is licensed under the Apache 2 license found in the # LICENSE file in the root directory of this source tree. """ JHU Medicine crawler Expected page to crawl is https://www.hopkinsmedicine.org/health/conditions-and-diseases/coronavirus/coro...
[ "covid_scraping.Conversion", "requests.get", "bs4.BeautifulSoup" ]
[((1814, 1852), 'covid_scraping.Conversion', 'Conversion', (['self._filename', 'self._path'], {}), '(self._filename, self._path)\n', (1824, 1852), False, 'from covid_scraping import Conversion, Scraper\n'), ((950, 967), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (962, 967), False, 'import requests\n'), (...
""" Classe basique du tchat server. """ import socket import select import json import ChatProtocole class ChatServer: server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.setblocking(0) inputs = inputs_address = outputs = [] readable = writable = exceptional = [] message_queues =...
[ "json.loads", "socket.socket", "json.dumps", "select.select", "ChatProtocole.ChatProtocole" ]
[((135, 184), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (148, 184), False, 'import socket\n'), ((682, 711), 'ChatProtocole.ChatProtocole', 'ChatProtocole.ChatProtocole', ([], {}), '()\n', (709, 711), False, 'import ChatProtocole\n'), ((15...
import logging import os import numpy as np from fairseq import utils from fairseq import data from fairseq.data import ( ConcatSentencesDataset, Dictionary, IdDataset, NestedDictionaryDataset, NumelDataset, NumSamplesDataset, OffsetTokensDataset, PrependTokenDataset, RawLabelDatas...
[ "fairseq.data.NumelDataset", "fairseq.data.NestedDictionaryDataset", "fairseq.data.NumberValueDataset", "sentencepiece.SentencePieceProcessor", "fairseq.tasks.register_task", "fairseq.data.PrependTokenDataset", "fairseq.data.SortDataset", "os.path.exists", "fairseq.data.ConcatSentencesDataset", "f...
[((660, 687), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (677, 687), False, 'import logging\n'), ((691, 736), 'fairseq.tasks.register_task', 'register_task', (['"""sentence_prediction_num_norm"""'], {}), "('sentence_prediction_num_norm')\n", (704, 736), False, 'from fairseq.tasks impo...
import abc import unittest import itertools import math import cscl.bitvector_gate_encoders as bvg import cscl.interfaces as cscl_if from cscl_tests.testutils.trivial_sat_solver import TrivialSATSolver from cscl_tests.testutils.logging_clause_consumer_decorator import LoggingClauseConsumerDecorator class TestLiteralF...
[ "math.log2", "cscl.bitvector_gate_encoders.encode_bv_mux_gate", "cscl_tests.testutils.trivial_sat_solver.TrivialSATSolver", "cscl.bitvector_gate_encoders.encode_staggered_or_gate", "cscl_tests.testutils.logging_clause_consumer_decorator.LoggingClauseConsumerDecorator", "cscl.bitvector_gate_encoders.encode...
[((1359, 1493), 'cscl.bitvector_gate_encoders.encode_gate_vector', 'bvg.encode_gate_vector', (['clause_consumer', 'lit_factory', '__should_not_be_called'], {'lhs_input_lits': '[]', 'rhs_input_lits': '[]', 'output_lits': '[]'}), '(clause_consumer, lit_factory, __should_not_be_called,\n lhs_input_lits=[], rhs_input_li...
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import sys import os from os import listdir from PIL import Image import shutil from io import BytesIO #val = {'2017Autumn': {'A': 12, 'C': 2, 'B': 3, 'D': 0, 'F': 0, 'P': 0, 'EX': 8}, '2018Spring': {'A': 6, 'C': 3, 'B': 6, 'D': 3, 'F': 0, 'P': 3,...
[ "matplotlib.pyplot.title", "PIL.Image.new", "matplotlib.pyplot.close", "matplotlib.pyplot.bar", "PIL.Image.open", "matplotlib.pyplot.text", "matplotlib.use", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xticks", "os.path.join", "os.listdir", "matplotlib.pyplot.savefig" ]
[((18, 39), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (32, 39), False, 'import matplotlib\n'), ((564, 617), 'PIL.Image.open', 'Image.open', (['"""Grades/Temp_files/HistoricalAverage.png"""'], {}), "('Grades/Temp_files/HistoricalAverage.png')\n", (574, 617), False, 'from PIL import Image\n'),...
import pygrib import os import pytz import datetime as dt import pytest from forest_lite.server.drivers import nearcast from forest_lite.server.drivers.nearcast import (driver, parse_date, get_data_vars, ...
[ "forest_lite.server.drivers.nearcast.driver.description", "forest_lite.server.drivers.nearcast.driver.points", "forest_lite.server.drivers.nearcast.find_nearest", "forest_lite.server.drivers.nearcast.parse_date", "os.path.dirname", "pygrib.index", "forest_lite.server.drivers.nearcast.get_data_vars", "...
[((554, 574), 'pytz.timezone', 'pytz.timezone', (['"""UTC"""'], {}), "('UTC')\n", (567, 574), False, 'import pytz\n'), ((4179, 4335), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""var_name"""', "['Pseudo-adiabatic potential temperature', 'Precipitable water',\n 'U component of wind', 'V component of wi...
import torch import torch.nn as nn from model.extractor import FlotEncoder from model.corr import CorrBlock from model.update import UpdateBlock from model.refine import FlotRefine class RSF(nn.Module): def __init__(self, args): super(RSF, self).__init__() self.hidden_dim = 64 self.contex...
[ "torch.relu", "model.update.UpdateBlock", "model.extractor.FlotEncoder", "torch.split", "model.corr.CorrBlock", "torch.tanh" ]
[((364, 377), 'model.extractor.FlotEncoder', 'FlotEncoder', ([], {}), '()\n', (375, 377), False, 'from model.extractor import FlotEncoder\n'), ((411, 424), 'model.extractor.FlotEncoder', 'FlotEncoder', ([], {}), '()\n', (422, 424), False, 'from model.extractor import FlotEncoder\n'), ((451, 564), 'model.corr.CorrBlock'...
# coding=utf-8 import os from pprint import pprint # noqa # Third party libraries import heroku3 # import socket # import httplib # import logging # httplib.HTTPConnection.debuglevel = 1 # logging.basicConfig() # you need to initialize logging, otherwise you will not see anything from requests # logging.getLogger()...
[ "os.environ.get", "heroku3.from_key" ]
[((496, 535), 'os.environ.get', 'os.environ.get', (['"""HEROKU_API_KEY"""', '(False)'], {}), "('HEROKU_API_KEY', False)\n", (510, 535), False, 'import os\n'), ((553, 592), 'os.environ.get', 'os.environ.get', (['"""HEROKU_APPNAME"""', '(False)'], {}), "('HEROKU_APPNAME', False)\n", (567, 592), False, 'import os\n'), ((6...
from scrapy.utils.python import retry_on_eintr from scrapy.utils.conf import get_config, closest_scrapy_cfg import os import sys import glob from subprocess import check_call _SETUP_PY_TEMPLATE = """ # Automatically created by: scrapydd from setuptools import setup, find_packages setup( name = '...
[ "scrapy.utils.conf.closest_scrapy_cfg", "scrapy.utils.python.retry_on_eintr", "os.path.dirname", "os.path.exists", "scrapy.utils.conf.get_config", "os.path.join" ]
[((667, 687), 'scrapy.utils.conf.closest_scrapy_cfg', 'closest_scrapy_cfg', ([], {}), '()\n', (685, 687), False, 'from scrapy.utils.conf import get_config, closest_scrapy_cfg\n'), ((1046, 1181), 'scrapy.utils.python.retry_on_eintr', 'retry_on_eintr', (['check_call', "[sys.executable, 'setup.py', 'clean', '-a', 'bdist_e...
from django.contrib.gis import admin from django.utils.translation import ugettext_lazy as _ from enumfields.admin import EnumFieldListFilter from field_permissions.admin import FieldPermissionsAdminMixin from leasing.models import ( Area, AreaNote, AreaSource, BankHoliday, BasisOfRent, BasisOf...
[ "django.contrib.gis.admin.site.register", "django.utils.translation.ugettext_lazy" ]
[((19480, 19516), 'django.contrib.gis.admin.site.register', 'admin.site.register', (['Area', 'AreaAdmin'], {}), '(Area, AreaAdmin)\n', (19499, 19516), False, 'from django.contrib.gis import admin\n'), ((19517, 19565), 'django.contrib.gis.admin.site.register', 'admin.site.register', (['AreaSource', 'AreaSourceAdmin'], {...
#!/usr/bin/env python import requests import json from json import encoder import sys def add_pretty_names(instances): family_names = { 't2': 'T2 General Purpose', 'r3': 'R3 Memory Optimized', 'r4': 'R4 Memory Optimized', 'c3': 'C3 High-CPU', 'c4': 'C4 High-CPU', 'm...
[ "json.load", "requests.get" ]
[((1897, 1922), 'requests.get', 'requests.get', (['price_index'], {}), '(price_index)\n', (1909, 1922), False, 'import requests\n'), ((1741, 1761), 'json.load', 'json.load', (['json_data'], {}), '(json_data)\n', (1750, 1761), False, 'import json\n')]
from __future__ import absolute_import, division, print_function, unicode_literals import torch from tests import utils class SimpleSplitModel(torch.nn.Module): def __init__(self, split_size_or_sections, dimension): super(SimpleSplitModel, self).__init__() self.split_size_or_sections = split_size...
[ "torch.split", "torch.randn" ]
[((410, 469), 'torch.split', 'torch.split', (['x', 'self.split_size_or_sections', 'self.dimension'], {}), '(x, self.split_size_or_sections, self.dimension)\n', (421, 469), False, 'import torch\n'), ((578, 592), 'torch.randn', 'torch.randn', (['(8)'], {}), '(8)\n', (589, 592), False, 'import torch\n'), ((622, 637), 'tor...
from typing import Any, List, Dict, Union, Optional import time import gym import gym_hybrid import copy import numpy as np from easydict import EasyDict from ding.envs import BaseEnv, BaseEnvTimestep, BaseEnvInfo from ding.envs.common import EnvElementInfo, affine_transform from ding.torch_utils import to_ndarray, to_...
[ "numpy.random.seed", "gym.make", "ding.torch_utils.to_ndarray", "gym.wrappers.Monitor", "ding.envs.BaseEnvTimestep", "numpy.random.randint", "numpy.array", "ding.utils.ENV_REGISTRY.register", "numpy.concatenate", "ding.envs.common.affine_transform" ]
[((364, 399), 'ding.utils.ENV_REGISTRY.register', 'ENV_REGISTRY.register', (['"""gym_hybrid"""'], {}), "('gym_hybrid')\n", (385, 399), False, 'from ding.utils import ENV_REGISTRY\n'), ((1853, 1879), 'numpy.random.seed', 'np.random.seed', (['self._seed'], {}), '(self._seed)\n', (1867, 1879), True, 'import numpy as np\n'...
from django.db import models class City(models.Model): city_name = models.TextField()
[ "django.db.models.TextField" ]
[((73, 91), 'django.db.models.TextField', 'models.TextField', ([], {}), '()\n', (89, 91), False, 'from django.db import models\n')]
from rest_framework import serializers from apis_core.apis_vocabularies.serializers import LabelTypeMinimalSerializer from .models import Label class LabelSerializerLegacy(serializers.ModelSerializer): label_type = LabelTypeMinimalSerializer() class Meta: model = Label fields = ('id', 'label...
[ "apis_core.apis_vocabularies.serializers.LabelTypeMinimalSerializer" ]
[((222, 250), 'apis_core.apis_vocabularies.serializers.LabelTypeMinimalSerializer', 'LabelTypeMinimalSerializer', ([], {}), '()\n', (248, 250), False, 'from apis_core.apis_vocabularies.serializers import LabelTypeMinimalSerializer\n')]
# Natural Language Toolkit: Regular Expression Chunkers # # Copyright (C) 2001-2022 NLTK Project # Author: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> (minor additions) # URL: <https://www.nltk.org/> # For license information, see LICENSE.TXT import re from nltk.chunk.api import ChunkParserI from nltk.tree import Tre...
[ "nltk.Tree", "re.split", "nltk.chunk.tagstr2tree", "re.match", "nltk.corpus.conll2000.chunked_sents", "nltk.chunk.ChunkScore", "nltk.chunk.RegexpParser", "re.sub", "re.compile" ]
[((2382, 2424), 're.compile', 're.compile', (["('^(\\\\{?%s\\\\}?)*?$' % CHUNK_TAG)"], {}), "('^(\\\\{?%s\\\\}?)*?$' % CHUNK_TAG)\n", (2392, 2424), False, 'import re\n'), ((2440, 2464), 're.compile', 're.compile', (['"""[^\\\\{\\\\}]+"""'], {}), "('[^\\\\{\\\\}]+')\n", (2450, 2464), False, 'import re\n'), ((2489, 2513)...
# # RPi-Spark pHAT Drives # Author: <NAME> # 2018.6.6 # 2020.7.18 Fix screenCenter incorrect error # from setuptools import setup, find_packages classifiers = [ 'Development Status :: 4 - Beta', 'Operating System :: POSIX :: Linux', 'License :: OSI Approved :: MIT License', 'Intended Audience :: Developers', 'Pr...
[ "setuptools.find_packages" ]
[((1575, 1590), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (1588, 1590), False, 'from setuptools import setup, find_packages\n')]
import pytest from pycox.models import BCESurv import torchtuples as tt from utils_model_testing import make_dataset, fit_model, assert_survs @pytest.mark.parametrize('numpy', [True, False]) @pytest.mark.parametrize('num_durations', [2, 5]) def test_pmf_runs(numpy, num_durations): data = make_dataset(True) i...
[ "torchtuples.practical.MLPVanilla", "pycox.models.BCESurv", "utils_model_testing.make_dataset", "utils_model_testing.fit_model", "torchtuples.tuplefy", "utils_model_testing.assert_survs", "pycox.models.BCESurv.label_transform", "pytest.mark.parametrize" ]
[((146, 193), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""numpy"""', '[True, False]'], {}), "('numpy', [True, False])\n", (169, 193), False, 'import pytest\n'), ((195, 243), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""num_durations"""', '[2, 5]'], {}), "('num_durations', [2, 5])\n", (218...
# coding: utf-8 """ App::Netdisco No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: 2.050003 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import un...
[ "unittest.main", "openapi_netdisco.api.general_api.GeneralApi" ]
[((909, 924), 'unittest.main', 'unittest.main', ([], {}), '()\n', (922, 924), False, 'import unittest\n'), ((590, 635), 'openapi_netdisco.api.general_api.GeneralApi', 'openapi_netdisco.api.general_api.GeneralApi', ([], {}), '()\n', (633, 635), False, 'import openapi_netdisco\n')]
import time import os import asyncio from conf import debug while True: if debug: n = 0 else: n = 5 os.system("python3 C:\\Users\\qvalador\\Documents\\Code\\scout\\bot.py") print("the bot died, restarting in 5") time.sleep(n)
[ "os.system", "time.sleep" ]
[((129, 201), 'os.system', 'os.system', (['"""python3 C:\\\\Users\\\\qvalador\\\\Documents\\\\Code\\\\scout\\\\bot.py"""'], {}), "('python3 C:\\\\Users\\\\qvalador\\\\Documents\\\\Code\\\\scout\\\\bot.py')\n", (138, 201), False, 'import os\n'), ((249, 262), 'time.sleep', 'time.sleep', (['n'], {}), '(n)\n', (259, 262), ...
# Copyright 2018 Canonical Ltd. # # 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 writin...
[ "zaza.charm_lifecycle.utils.generate_model_name", "zaza.utilities.run_report.output_event_report", "argparse.ArgumentParser", "zaza.utilities.run_report.register_event_wrapper", "zaza.utilities.deployment_env.get_model_constraints", "zaza.utilities.deployment_env.get_model_settings", "zaza.utilities.dep...
[((876, 932), 'zaza.utilities.run_report.register_event_wrapper', 'run_report.register_event_wrapper', (['"""Prepare Environment"""'], {}), "('Prepare Environment')\n", (909, 932), True, 'import zaza.utilities.run_report as run_report\n'), ((1643, 1668), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '...
#!/usr/bin/env python # _*_ coding:utf-8 _*_ import cv2 as cv import numpy as np def sharpen(image): kernel = np.array([[0, -1, 0], [-1, 5, -1], [0, -1, 0]], np.float32) #銳化 dst = cv.filter2D(image, -1, kernel=kernel) cv.imwrite("output00000000_sharpen.png",dst) for i in range(1): for j in range(1): ...
[ "cv2.imwrite", "numpy.array", "cv2.imread", "cv2.filter2D" ]
[((114, 173), 'numpy.array', 'np.array', (['[[0, -1, 0], [-1, 5, -1], [0, -1, 0]]', 'np.float32'], {}), '([[0, -1, 0], [-1, 5, -1], [0, -1, 0]], np.float32)\n', (122, 173), True, 'import numpy as np\n'), ((188, 225), 'cv2.filter2D', 'cv.filter2D', (['image', '(-1)'], {'kernel': 'kernel'}), '(image, -1, kernel=kernel)\n...
"""Update a SQLite database in real time. Requires Grafana and Python >3.6. ``` python -m pip install numpy tqdm python create_grafana_sample_db.py ``` See discussion context: https://github.com/fr-ser/grafana-sqlite-datasource/issues/21 """ import sqlite3 import time from contextlib import ContextDecorator from pa...
[ "time.time", "time.sleep", "pathlib.Path", "sqlite3.connect", "numpy.random.normal" ]
[((926, 955), 'sqlite3.connect', 'sqlite3.connect', (['self.path_db'], {}), '(self.path_db)\n', (941, 955), False, 'import sqlite3\n'), ((1949, 1984), 'numpy.random.normal', 'np.random.normal', (['mu', 'sigma', 'points'], {}), '(mu, sigma, points)\n', (1965, 1984), True, 'import numpy as np\n'), ((2296, 2309), 'time.sl...
import pandas as pd import click def condense(ann_path, out_path, segment_length): df = pd.read_csv(ann_path) df = df.sort_values(by=['video_id', 'start_seconds']) if not 'label' in df.columns: df['label'] = df['labeler_2'] df.loc[df['label'] == 'none', 'label'] = 'background' df.l...
[ "pandas.read_csv", "click.option", "click.command" ]
[((2535, 2550), 'click.command', 'click.command', ([], {}), '()\n', (2548, 2550), False, 'import click\n'), ((2552, 2625), 'click.option', 'click.option', (['"""--ann-path"""'], {'default': '"""../annotations/v0.5.0-anns-5sec.csv"""'}), "('--ann-path', default='../annotations/v0.5.0-anns-5sec.csv')\n", (2564, 2625), Fa...
import json import datetime from django.utils.translation import ugettext, get_language import elasticutils from datawinners.accountmanagement.localized_time import convert_utc_to_localized from datawinners.search.filters import SubmissionDateRangeFilter, DateQuestionRangeFilter from datawinners.search.index_utils im...
[ "json.loads", "datawinners.search.index_utils.es_unique_id_code_field_name", "django.utils.translation.get_language", "datawinners.search.index_utils.es_questionnaire_field_name", "mangrove.utils.dates.py_datetime_to_js_datestring", "django.utils.translation.ugettext", "datawinners.accountmanagement.loc...
[((2827, 2900), 'datawinners.accountmanagement.localized_time.convert_utc_to_localized', 'convert_utc_to_localized', (['self.localized_time_delta', 'submission_date_time'], {}), '(self.localized_time_delta, submission_date_time)\n', (2851, 2900), False, 'from datawinners.accountmanagement.localized_time import convert_...
from math import sqrt class BadClass: def __init__(self, x: int, y: int): self.x = x self.y = y @staticmethod def length(x: int, y: int) -> float: return sqrt(x ** 2 + y ** 2) @staticmethod def dot(self_x: int, self_y: int, other_x: int, other_y: int) -> int: retu...
[ "math.sqrt" ]
[((193, 214), 'math.sqrt', 'sqrt', (['(x ** 2 + y ** 2)'], {}), '(x ** 2 + y ** 2)\n', (197, 214), False, 'from math import sqrt\n')]
#!/usr/bin/env python # flake8: noqa # Para pruebas rápidas import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'src.config.settings.local') import django django.setup() ##############################################################################
[ "os.environ.setdefault", "django.setup" ]
[((72, 148), 'os.environ.setdefault', 'os.environ.setdefault', (['"""DJANGO_SETTINGS_MODULE"""', '"""src.config.settings.local"""'], {}), "('DJANGO_SETTINGS_MODULE', 'src.config.settings.local')\n", (93, 148), False, 'import os\n'), ((164, 178), 'django.setup', 'django.setup', ([], {}), '()\n', (176, 178), False, 'impo...
import os import pickle import pandas as pd import sys import cmd #season = input("What NBA season would you like to select? Enter between 2001-2016. ") #season = int(season) #player_list = input("Enter 5 players from that season in a format like this... '<NAME>','<NAME>'...") #player_list = player_list.split(',') #p...
[ "functions.playerSwap.teamAssessment", "functions.playerSwap.salaryCap", "functions.playerSwap.recommendPlayer", "os.getcwd", "pandas.read_csv", "functions.playerSwap.assessPlayerSwaps", "functions.predictWinPercentage.predictWinPercentage", "functions.playerSwap.getZScores" ]
[((488, 499), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (497, 499), False, 'import os\n'), ((537, 580), 'pandas.read_csv', 'pd.read_csv', (["(path + '/data/player_data.csv')"], {}), "(path + '/data/player_data.csv')\n", (548, 580), True, 'import pandas as pd\n'), ((607, 664), 'pandas.read_csv', 'pd.read_csv', (["(pat...
from __future__ import annotations from typing import TYPE_CHECKING, Union from warnings import filterwarnings import pyopencl as cl import pyopencl.array as cla import numpy as np from gpyfft.fft import FFT from ._util import get_context filterwarnings("ignore", module="pyopencl") if TYPE_CHECKING: from rei...
[ "pyopencl.array.empty_like", "gpyfft.fft.FFT", "numpy.iscomplexobj", "warnings.filterwarnings", "numpy.isscalar", "pyopencl.CommandQueue", "pyopencl.array.to_device" ]
[((244, 287), 'warnings.filterwarnings', 'filterwarnings', (['"""ignore"""'], {'module': '"""pyopencl"""'}), "('ignore', module='pyopencl')\n", (258, 287), False, 'from warnings import filterwarnings\n'), ((485, 509), 'pyopencl.CommandQueue', 'cl.CommandQueue', (['context'], {}), '(context)\n', (500, 509), True, 'impor...
# -*- coding: utf-8 -*- """ DdkRpPromUrlGenerate.py: https://open.pinduoduo.com/application/document/api?id=pdd.ddk.rp.prom.url.generate 生成营销工具推广链接 """ from pdd_sdk.api.base import RestApi class DdkRpPromUrlGenerate(RestApi): def __init__(self, domain='gw-api.pinduoduo.com', port=80): RestApi.__init__(s...
[ "pdd_sdk.api.base.RestApi.__init__" ]
[((302, 338), 'pdd_sdk.api.base.RestApi.__init__', 'RestApi.__init__', (['self', 'domain', 'port'], {}), '(self, domain, port)\n', (318, 338), False, 'from pdd_sdk.api.base import RestApi\n')]
"""Test module of the images.""" import unittest from books import Books import fnmatch import os import re import sys class TestImages(unittest.TestCase): """Unit test of the images.""" def test_images_are_valid(self): """Test that the MD files refer to valid URLs.""" books = Books() ...
[ "unittest.main", "fnmatch.filter", "re.finditer", "os.walk", "os.path.isfile", "books.Books", "os.path.join" ]
[((3257, 3272), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3270, 3272), False, 'import unittest\n'), ((306, 313), 'books.Books', 'Books', ([], {}), '()\n', (311, 313), False, 'from books import Books\n'), ((1287, 1294), 'books.Books', 'Books', ([], {}), '()\n', (1292, 1294), False, 'from books import Books\n'...
#!/usr/bin/env python3 """ mock.py - Seperate mock util functions """ from random import randint def generate_issue_id(): return randint(10000, 999999) users = { '<EMAIL>': {'email': '<EMAIL>', 'password': '<PASSWORD>', 'type': 'trainstaff'}, '<EMAIL>': {'email': '<EMAIL>', 'password': '<PASSWORD>', 'ty...
[ "random.randint" ]
[((136, 158), 'random.randint', 'randint', (['(10000)', '(999999)'], {}), '(10000, 999999)\n', (143, 158), False, 'from random import randint\n')]
# coding=utf-8 # Copyright 2019 The Google Research Authors. # # 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 applicab...
[ "tensorflow.compat.v1.cast", "tensorflow.compat.v1.equal", "tensorflow.compat.v1.name_scope", "tensorflow.compat.v1.reduce_mean", "tensorflow.compat.v1.nn.top_k", "tensorflow.compat.v1.minimum", "tensorflow.compat.v1.pow", "tensorflow.compat.v1.add_to_collection", "tensorflow.compat.v1.get_collectio...
[((1321, 1376), 'tensorflow.compat.v1.reduce_sum', 'tf.reduce_sum', (['(labels * logits)'], {'axis': '(-1)', 'keep_dims': '(True)'}), '(labels * logits, axis=-1, keep_dims=True)\n', (1334, 1376), True, 'import tensorflow.compat.v1 as tf\n'), ((2229, 2284), 'tensorflow.compat.v1.summary.scalar', 'tf.summary.scalar', (['...
import enum from InternalNode import InternalNode from LeafNode import LeafNode from NodeTag import NodeTag class TreeHash: class HashKeyDefinitions(enum.Enum): PerTGroup = 0 hashKeyDefinition = HashKeyDefinitions.PerTGroup @staticmethod def hash(tree): if TreeHash.hashKeyDefini...
[ "InternalNode.InternalNode", "NodeTag.NodeTag.isT" ]
[((382, 412), 'NodeTag.NodeTag.isT', 'NodeTag.isT', (['tree.root.nodeTag'], {}), '(tree.root.nodeTag)\n', (393, 412), False, 'from NodeTag import NodeTag\n'), ((559, 597), 'InternalNode.InternalNode', 'InternalNode', (['left', 'right', 'compactTree'], {}), '(left, right, compactTree)\n', (571, 597), False, 'from Intern...
# Copyright 2017 Google Inc. All Rights Reserved. # Modifications 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 # # U...
[ "tensorflow.contrib.slim.arg_scope", "lib.model.residual_block", "tensorflow.constant_initializer", "tensorflow.variable_scope", "lib.model.conv2d", "tensorflow.random_normal_initializer", "lib.model.upsampling" ]
[((1697, 1742), 'tensorflow.variable_scope', 'tf.variable_scope', (['"""transformer"""'], {'reuse': 'reuse'}), "('transformer', reuse=reuse)\n", (1714, 1742), True, 'import tensorflow as tf\n'), ((2117, 2226), 'tensorflow.contrib.slim.arg_scope', 'slim.arg_scope', (['[slim.conv2d]'], {'normalizer_fn': 'slim.batch_norm'...
import cv2 import numpy as np import scipy.fftpack import scipy.signal from matplotlib import pyplot # from eulerian_magnification.io import play_vid_data from eulerian_magnification.pyramid import create_laplacian_video_pyramid, collapse_laplacian_video_pyramid from eulerian_magnification.transforms import temporal_b...
[ "matplotlib.pyplot.title", "cv2.VideoWriter_fourcc", "eulerian_magnification.pyramid.create_laplacian_video_pyramid", "numpy.argsort", "matplotlib.pyplot.figure", "cv2.VideoWriter", "cv2.pyrDown", "numpy.ndarray", "cv2.convertScaleAbs", "matplotlib.pyplot.show", "eulerian_magnification.transform...
[((473, 544), 'eulerian_magnification.pyramid.create_laplacian_video_pyramid', 'create_laplacian_video_pyramid', (['vid_data'], {'pyramid_levels': 'pyramid_levels'}), '(vid_data, pyramid_levels=pyramid_levels)\n', (503, 544), False, 'from eulerian_magnification.pyramid import create_laplacian_video_pyramid, collapse_la...
from constants.database import PASSWORD_MANAGER_COLLECTION_NAME, PASSWORD_MANAGER_COLLECTION_DOMAIN_FIELD, PASSWORD_MANAGER_COLLECTION_USERNAME_FIELD, PASSWORD_MANAGER_COLLECTION_SECRETS_FIELD from constants.request_parameters import BODY_DOMAIN_PARAM, BODY_USERNAME_PARAM, BODY_SECRET_PARAM, BODY_MASTER_PASSWORD_PARAM,...
[ "crypto.decrypter.Decrypter" ]
[((1833, 1871), 'crypto.decrypter.Decrypter', 'Decrypter', (['master_password', 'master_key'], {}), '(master_password, master_key)\n', (1842, 1871), False, 'from crypto.decrypter import Decrypter\n')]
# -*- coding: utf-8 -*- # # Copyright (C) 2018 CERN. # # invenio-app-ils is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Ils permissions.""" from __future__ import absolute_import, print_function from functools import wraps from ...
[ "flask.abort", "functools.wraps", "invenio_access.action_factory", "invenio_access.permissions.Permission", "invenio_records_rest.utils.deny_all", "invenio_records_rest.utils.allow_all" ]
[((678, 717), 'invenio_access.action_factory', 'action_factory', (['"""ils-backoffice-access"""'], {}), "('ils-backoffice-access')\n", (692, 717), False, 'from invenio_access import action_factory\n'), ((1573, 1609), 'invenio_access.permissions.Permission', 'Permission', (['backoffice_access_action'], {}), '(backoffice...
import os import inspect from mishell.shell_family import Alpha class sysrv_sh(Alpha): NAME = "sysrv_sh" def __init__(self): super(sysrv_sh, self).__init__() self.anchor_processor = {} self.file_abs_path = None self.lines = [] self._inspect_anchor_processor() ...
[ "os.path.basename", "inspect.ismethod", "json.loads", "inspect.getmembers" ]
[((1148, 1172), 'inspect.getmembers', 'inspect.getmembers', (['self'], {}), '(self)\n', (1166, 1172), False, 'import inspect\n'), ((620, 651), 'os.path.basename', 'os.path.basename', (['file_abs_path'], {}), '(file_abs_path)\n', (636, 651), False, 'import os\n'), ((1219, 1241), 'inspect.ismethod', 'inspect.ismethod', (...
#!/usr/bin/env python #python 2.7.5 #catcount.py #Version 1. <NAME>, Feb 2017 #Contact, <NAME>, <EMAIL> ############################################# # Concatenate count tables from HTSeq-count # ############################################# import csv import sys import os import copy import argparse import pandas as...
[ "pandas.DataFrame", "copy.deepcopy", "os.path.abspath", "csv.reader", "argparse.ArgumentParser", "os.makedirs", "os.path.basename", "os.path.isdir", "pandas.DataFrame.from_dict", "os.path.join", "sys.exit" ]
[((363, 391), 'os.path.abspath', 'os.path.abspath', (['args.outDir'], {}), '(args.outDir)\n', (378, 391), False, 'import os\n'), ((893, 917), 'copy.deepcopy', 'copy.deepcopy', (['indexlist'], {}), '(indexlist)\n', (906, 917), False, 'import copy\n'), ((1382, 1424), 'pandas.DataFrame', 'pd.DataFrame', ([], {'index': 'in...
"""Tests for module gromov """ # Author: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # License: MIT License import numpy as np import ot def test_gromov(): n_samples = 50 # nb samples mu_s = np.array([0, 0]) cov_s = np.array([[1, 0], [0, 1]]) xs = o...
[ "ot.unif", "numpy.random.seed", "numpy.eye", "ot.datasets.make_data_classif", "numpy.random.randn", "ot.dist", "ot.gromov.entropic_gromov_wasserstein", "numpy.testing.assert_allclose", "ot.gromov.fused_gromov_wasserstein", "ot.gromov.fused_gromov_wasserstein2", "numpy.flipud", "ot.gromov.entro...
[((250, 266), 'numpy.array', 'np.array', (['[0, 0]'], {}), '([0, 0])\n', (258, 266), True, 'import numpy as np\n'), ((280, 306), 'numpy.array', 'np.array', (['[[1, 0], [0, 1]]'], {}), '([[1, 0], [0, 1]])\n', (288, 306), True, 'import numpy as np\n'), ((319, 392), 'ot.datasets.make_2D_samples_gauss', 'ot.datasets.make_2...
""" 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 ...
[ "remi.gui.Container", "threading.Timer", "random.randint", "remi.gui.GenericDialog", "remi.gui.TableRow", "remi.gui.Table", "remi.gui.Image", "remi.gui.Link", "remi.start", "remi.gui.Button", "remi.gui.Label" ]
[((10512, 10611), 'remi.start', 'start', (['MyApp'], {'multiple_instance': '(True)', 'address': '"""0.0.0.0"""', 'port': '(0)', 'debug': '(True)', 'start_browser': '(True)'}), "(MyApp, multiple_instance=True, address='0.0.0.0', port=0, debug=True,\n start_browser=True)\n", (10517, 10611), False, 'from remi import st...
import json import sys import click # type: ignore from stac_check.cli import cli_message as lint_message # type: ignore from stac_check.lint import Linter # type: ignore from .validate import StacValidate @click.command() @click.argument("stac_file") @click.option( "--lint", is_flag=True, help="Use ...
[ "click.version_option", "click.argument", "click.option", "stac_check.lint.Linter", "json.dumps", "click.command", "stac_check.cli.cli_message", "sys.exit" ]
[((214, 229), 'click.command', 'click.command', ([], {}), '()\n', (227, 229), False, 'import click\n'), ((231, 258), 'click.argument', 'click.argument', (['"""stac_file"""'], {}), "('stac_file')\n", (245, 258), False, 'import click\n'), ((260, 378), 'click.option', 'click.option', (['"""--lint"""'], {'is_flag': '(True)...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/063_callback.MVP.ipynb (unless otherwise specified). __all__ = ['create_subsequence_mask', 'create_variable_mask', 'create_future_mask', 'natural_mask', 'create_mask', 'MVP', 'TSBERT'] # Cell from ..imports import * from fastai.callback.all import * from ..ut...
[ "torch.distributions.binomial.Binomial", "matplotlib.colors.TABLEAU_COLORS.keys", "torch.distributions.geometric.Geometric", "matplotlib.colors.CSS4_COLORS.keys" ]
[((3130, 3148), 'torch.distributions.binomial.Binomial', 'Binomial', (['(1)', 'probs'], {}), '(1, probs)\n', (3138, 3148), False, 'from torch.distributions.binomial import Binomial\n'), ((12583, 12612), 'matplotlib.colors.TABLEAU_COLORS.keys', 'mcolors.TABLEAU_COLORS.keys', ([], {}), '()\n', (12610, 12612), True, 'impo...
import pandas as pd from sodapy import Socrata import datetime import definitions # global variables for main data: hhs_data, test_data, nyt_data_us, nyt_data_state, max_hosp_date = [],[],[],[],[] """ get_data() Fetches data from API, filters, cleans, and combines with provisional. After running, global variables are...
[ "pandas.DataFrame", "pandas.Timestamp", "definitions.states.keys", "pandas.read_csv", "sodapy.Socrata", "pandas.to_datetime", "datetime.timedelta", "pandas.DataFrame.from_records", "pandas.Timedelta", "pandas.concat", "pandas.Timestamp.today" ]
[((514, 625), 'pandas.read_csv', 'pd.read_csv', (['"""https://raw.githubusercontent.com/nytimes/covid-19-data/master/rolling-averages/us.csv"""'], {}), "(\n 'https://raw.githubusercontent.com/nytimes/covid-19-data/master/rolling-averages/us.csv'\n )\n", (525, 625), True, 'import pandas as pd\n'), ((637, 755), 'pa...
import docker import os import glob import json import datetime import numpy client = docker.APIClient(base_url='unix://var/run/docker.sock') def mem_stats(container_id): docker_stats = client.stats(container_id, decode=True, stream=False) mem_stats = docker_stats['memory_stats'] wanted_keys = ['usage', ...
[ "json.dump", "os.path.abspath", "docker.APIClient", "datetime.datetime.now", "numpy.mean", "glob.glob", "os.path.join", "os.chdir" ]
[((87, 142), 'docker.APIClient', 'docker.APIClient', ([], {'base_url': '"""unix://var/run/docker.sock"""'}), "(base_url='unix://var/run/docker.sock')\n", (103, 142), False, 'import docker\n'), ((4274, 4296), 'os.chdir', 'os.chdir', (['sockshop_dir'], {}), '(sockshop_dir)\n', (4282, 4296), False, 'import os\n'), ((4316,...
#!/usr/bin/env python3 import pandas as pd import numpy as np #import module_mass file as a pd.DataFrame and name column input = pd.read_csv('input.txt', header = None) input.columns = ['module_mass'] #calculate fuel needed input['fuel'] = (input['module_mass']/3) input['fuel_round']= input['fuel'].apply(np.floor) i...
[ "pandas.read_csv" ]
[((131, 168), 'pandas.read_csv', 'pd.read_csv', (['"""input.txt"""'], {'header': 'None'}), "('input.txt', header=None)\n", (142, 168), True, 'import pandas as pd\n')]
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) n, q = map(int, readline().split()) f = [['N'] * n for _ in range(n)] for i in range(q): s = list(map(int, readline().split())) s[1] -= 1 if s[0] == 1: ...
[ "sys.setrecursionlimit" ]
[((116, 146), 'sys.setrecursionlimit', 'sys.setrecursionlimit', (['(10 ** 7)'], {}), '(10 ** 7)\n', (137, 146), False, 'import sys\n')]
import pandas as pd import re import qiime2 import qiime2.plugin.model as model from qiime2.plugin import SemanticType from q2_types.feature_data import FeatureData from qiime2.plugin import ValidationError class UNIXListFormat(model.TextFileFormat): def _validate_(self, level): # any file with lines w...
[ "re.fullmatch", "qiime2.plugin.model.File", "qiime2.plugin.ValidationError", "qiime2.plugin.SemanticType", "qiime2.plugin.model.ValidationError", "re.compile" ]
[((1310, 1373), 'qiime2.plugin.SemanticType', 'SemanticType', (['"""Selection"""'], {'variant_of': "FeatureData.field['type']"}), "('Selection', variant_of=FeatureData.field['type'])\n", (1322, 1373), False, 'from qiime2.plugin import SemanticType\n'), ((837, 886), 'qiime2.plugin.model.File', 'model.File', (['"""includ...
""" ** Copyright 2021 Bloomberg Finance L.P. ** ** 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 applica...
[ "sqlalchemy.orm.declarative_base", "sqlalchemy.ForeignKey", "sqlalchemy.Column", "sqlalchemy.String", "sqlalchemy.JSON" ]
[((826, 844), 'sqlalchemy.orm.declarative_base', 'declarative_base', ([], {}), '()\n', (842, 844), False, 'from sqlalchemy.orm import declarative_base\n'), ((890, 952), 'sqlalchemy.Column', 'Column', (['"""id"""', 'BigInteger'], {'autoincrement': '(True)', 'primary_key': '(True)'}), "('id', BigInteger, autoincrement=Tr...
from collections import OrderedDict instruments = OrderedDict() instruments['Piano'] = ['Acoustic Grand Piano', 'Bright Acoustic Piano', 'Electric Grand Piano', 'Honky-tonk Piano', 'Electric Piano 1', 'Electric Piano 2', 'Harpsichord', 'Clavi',] instruments['Chromatic Percussion'] = ['Celesta', 'Glockenspiel', 'Music ...
[ "collections.OrderedDict" ]
[((51, 64), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (62, 64), False, 'from collections import OrderedDict\n')]
#!/usr/bin/env python # encoding=utf-8 """ Copyright (c) 2021 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFT...
[ "yat.test.inject.RandomInject", "yat.test.inject.decorator.order" ]
[((1138, 1156), 'yat.test.inject.RandomInject', 'RandomInject', (['node'], {}), '(node)\n', (1150, 1156), False, 'from yat.test.inject import RandomInject\n'), ((764, 778), 'yat.test.inject.decorator.order', 'order', ([], {'index': '(1)'}), '(index=1)\n', (769, 778), False, 'from yat.test.inject.decorator import order\...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ "fastavro.reader", "iceberg.api.expressions.Expressions.always_true" ]
[((2179, 2198), 'fastavro.reader', 'fastavro.reader', (['fo'], {}), '(fo)\n', (2194, 2198), False, 'import fastavro\n'), ((3215, 3234), 'fastavro.reader', 'fastavro.reader', (['fo'], {}), '(fo)\n', (3230, 3234), False, 'import fastavro\n'), ((3858, 3883), 'iceberg.api.expressions.Expressions.always_true', 'Expressions....
""" Various sanity tests to check that filenames are handled corectly.""" import pytest import cad2vox import os # use the test case folder as their working directory @pytest.fixture(autouse=True) def change_test_dir(request, monkeypatch): monkeypatch.chdir(request.fspath.dirname) @pytest.fixture() def cleanup():...
[ "os.remove", "pytest.fixture", "os.path.exists", "pytest.raises", "pytest.mark.parametrize", "cad2vox.voxelise" ]
[((169, 197), 'pytest.fixture', 'pytest.fixture', ([], {'autouse': '(True)'}), '(autouse=True)\n', (183, 197), False, 'import pytest\n'), ((289, 305), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (303, 305), False, 'import pytest\n'), ((515, 583), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""inp...
from binding import * from .namespace import llvm from .Pass import ImmutablePass DataLayout = llvm.Class(ImmutablePass) StructLayout = llvm.Class() from .LLVMContext import LLVMContext from .ADT.StringRef import StringRef from .Module import Module from .Type import Type, IntegerType, StructType from .ADT.SmallVecto...
[ "llvmpy.extra.make_small_vector_from_values" ]
[((3274, 3318), 'llvmpy.extra.make_small_vector_from_values', 'extra.make_small_vector_from_values', (['args[1]'], {}), '(args[1])\n', (3309, 3318), False, 'from llvmpy import extra\n')]
from django.contrib.auth import authenticate from backend import paramiko_ssh from web import models class SshHandler(object): """堡垒机交互脚本""" def __init__(self,argv_handler_instance): self.argv_handler_instance = argv_handler_instance self.models = models def auth(self): """认证程序""" ...
[ "backend.paramiko_ssh.ssh_connect", "django.contrib.auth.authenticate" ]
[((479, 529), 'django.contrib.auth.authenticate', 'authenticate', ([], {'username': 'username', 'password': 'password'}), '(username=username, password=password)\n', (491, 529), False, 'from django.contrib.auth import authenticate\n'), ((2010, 2067), 'backend.paramiko_ssh.ssh_connect', 'paramiko_ssh.ssh_connect', (['se...
"""Library to take a Python AST and add Pytype type information to it.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections from pytype import analyze from pytype import errors from pytype import io from pytype import load_pytd from pytype...
[ "pytype.analyze.CallTracer", "pytype.analyze.infer_types", "collections.defaultdict", "pytype.io.wrap_pytype_exceptions", "pytype.pytd.pytd_utils.Print", "pytype.errors.ErrorLog", "pytype.load_pytd.create_loader" ]
[((1928, 1945), 'pytype.errors.ErrorLog', 'errors.ErrorLog', ([], {}), '()\n', (1943, 1945), False, 'from pytype import errors\n'), ((1957, 1989), 'pytype.load_pytd.create_loader', 'load_pytd.create_loader', (['options'], {}), '(options)\n', (1980, 1989), False, 'from pytype import load_pytd\n'), ((1998, 2109), 'pytype...
from django.contrib import admin from app import models # Register your models here. admin.site.register(models.Post) admin.site.register(models.Comment) admin.site.register(models.Profile)
[ "django.contrib.admin.site.register" ]
[((85, 117), 'django.contrib.admin.site.register', 'admin.site.register', (['models.Post'], {}), '(models.Post)\n', (104, 117), False, 'from django.contrib import admin\n'), ((118, 153), 'django.contrib.admin.site.register', 'admin.site.register', (['models.Comment'], {}), '(models.Comment)\n', (137, 153), False, 'from...
#!/usr/bin/env python3 """ Author : <NAME> Date : 2021-01-15 Purpose: Python Village - Variables and Some Arithmetic """ import argparse class BadIntegerValue(Exception): """Base class for other exception """ # -------------------------------------------------- def get_args(): """ Get command-line argum...
[ "argparse.ArgumentParser", "argparse.FileType" ]
[((343, 654), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Variables and Some Arithmetic. Given two integers,\n a and b, each less than 1000, this program returns the square of the\n hypothenuse of the right triangle whose legs have lenghts a and b."""', 'formatter_class'...
"""Parsers.""" import re from enum import Enum from typing import Any, Dict, cast UNKNOWN = 'unknown' DELIM = '*' SPECIAL_REQUEST = r'^\*#\d{2,4}\*\*\d{1,2}##$' # *#*1## ACK = r'^\*#\*(1)##$' # *#*0## NACK = r'^\*#\*(0)##$' ACK_NACK_RE = r'|'.join([ACK, NACK]) # *WHO*WHAT*WHERE## *1*1*0#13236017## BUS_COMMAND = ...
[ "typing.cast", "re.compile" ]
[((830, 853), 're.compile', 're.compile', (['BUS_COMMAND'], {}), '(BUS_COMMAND)\n', (840, 853), False, 'import re\n'), ((868, 891), 're.compile', 're.compile', (['ACK_NACK_RE'], {}), '(ACK_NACK_RE)\n', (878, 891), False, 'import re\n'), ((913, 940), 're.compile', 're.compile', (['SPECIAL_REQUEST'], {}), '(SPECIAL_REQUE...
import tradebotapiclient import tradebotgdaxclient import tickerdb import math import time import datetime import traceback import random import yaml import sys import os.path import tradeerrors import os class Tradebot(object): def issuebuyorder(self,current): cryptotobuy = self.base_unit / current ...
[ "yaml.load", "traceback.print_exc", "tradebotapiclient.Tradebotapiclient", "random.randint", "math.fabs", "os.path.exists", "time.sleep", "tradeerrors.BotIniterror", "os.path.isfile", "tradebotgdaxclient.Tradebotgdaxclient", "tickerdb.Tickerdb", "tradeerrors.InputError", "datetime.datetime.n...
[((10600, 10623), 'time.sleep', 'time.sleep', (['backofftime'], {}), '(backofftime)\n', (10610, 10623), False, 'import time\n'), ((11088, 11111), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (11109, 11111), False, 'import datetime\n'), ((10460, 10490), 'random.randint', 'random.randint', (['(0)',...
import copy from kalliope.core.NeuronParameterLoader import NeuronParameterLoader class MatchedSynapse(object): """ This class represent a synapse that has matched an order send by an User. """ def __init__(self, matched_synapse=None, matched_order=None, user_order=None): """ :param ...
[ "kalliope.core.NeuronParameterLoader.NeuronParameterLoader.get_parameters", "copy.deepcopy" ]
[((882, 917), 'copy.deepcopy', 'copy.deepcopy', (['self.synapse.neurons'], {}), '(self.synapse.neurons)\n', (895, 917), False, 'import copy\n'), ((1062, 1159), 'kalliope.core.NeuronParameterLoader.NeuronParameterLoader.get_parameters', 'NeuronParameterLoader.get_parameters', ([], {'synapse_order': 'self.matched_order',...
from telewavesim import utils as ut from telewavesim.rmat_f import plane as pw_f from telewavesim import conf as cf import numpy as np import pyfftw from conftest import load_params def test_plane_obs(load_params): yx, yy, yz = pw_f.plane_obs(cf.nt, cf.nlay, np.array(cf.wvtype, dtype='c')) ux = np.real(pyfft...
[ "numpy.abs", "telewavesim.utils.get_trxyz", "pyfftw.interfaces.numpy_fft.fft", "telewavesim.utils.tf_from_xyz", "numpy.array" ]
[((1404, 1428), 'telewavesim.utils.get_trxyz', 'ut.get_trxyz', (['ux', 'uy', 'uz'], {}), '(ux, uy, uz)\n', (1416, 1428), True, 'from telewavesim import utils as ut\n'), ((1439, 1460), 'telewavesim.utils.tf_from_xyz', 'ut.tf_from_xyz', (['trxyz'], {}), '(trxyz)\n', (1453, 1460), True, 'from telewavesim import utils as u...
import base64 import os import re import random import threading import cv2 import numpy as np from flask import * from auth.Auth import Auth from dao.FollowDAO import FollowDAO from dao.FollowerDAO import FollowerDAO from dao.FollowingDAO import FollowingDAO from dao.ImageDAO import WorkDAO from dao.InformationDAO ...
[ "cv2.imdecode", "pojo.User.User", "pojo.Image.Work", "auth.Auth.Auth.identify", "random.randint", "dao.addressDAO.AddressDAO", "cv2.cvtColor", "cv2.imwrite", "os.path.exists", "base64.urlsafe_b64decode", "pojo.Information.Information", "re.sub", "numpy.fromstring", "dao.FollowerDAO.Followe...
[((1059, 1065), 'pojo.User.User', 'User', ([], {}), '()\n', (1063, 1065), False, 'from pojo.User import User\n'), ((1342, 1362), 'auth.Auth.Auth.authorize', 'Auth.authorize', (['user'], {}), '(user)\n', (1356, 1362), False, 'from auth.Auth import Auth\n'), ((2141, 2147), 'pojo.User.User', 'User', ([], {}), '()\n', (214...
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
[ "atom.api.Range", "atom.api.Enum", "atom.api.observe", "atom.api.Typed", "atom.api.ForwardTyped", "atom.api.Coerced", "atom.api.set_default" ]
[((768, 799), 'atom.api.ForwardTyped', 'ForwardTyped', (['(lambda : FlowArea)'], {}), '(lambda : FlowArea)\n', (780, 799), False, 'from atom.api import Enum, Range, Coerced, Typed, ForwardTyped, observe, set_default\n'), ((2021, 2042), 'atom.api.set_default', 'set_default', (['"""ignore"""'], {}), "('ignore')\n", (2032...
# Copyright (c) 2015-2019, Activision Publishing, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of ...
[ "assertpy.assert_that", "datetime.timedelta", "datetime.datetime.today", "assertpy.fail" ]
[((1613, 1638), 'datetime.datetime.today', 'datetime.datetime.today', ([], {}), '()\n', (1636, 1638), False, 'import datetime\n'), ((14298, 14328), 'datetime.timedelta', 'datetime.timedelta', ([], {'seconds': '(60)'}), '(seconds=60)\n', (14316, 14328), False, 'import datetime\n'), ((1671, 1696), 'datetime.datetime.toda...
""" The MIT License (MIT) Copyright (c) [2015-2019] [<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 to use, copy, modify, mer...
[ "getspice.GetCSPICE", "setuptools.command.install.install.finalize_options", "wheel.bdist_wheel.bdist_wheel.get_tag", "pytest.main", "os.path.isfile", "setuptools.command.install.install.run", "os.path.join", "os.chdir", "shutil.copy", "os.waitpid", "os.path.exists", "subprocess.Popen", "os....
[((1458, 1475), 'platform.system', 'platform.system', ([], {}), '()\n', (1473, 1475), False, 'import platform\n'), ((1703, 1735), 'os.path.join', 'os.path.join', (['root_dir', '"""cspice"""'], {}), "(root_dir, 'cspice')\n", (1715, 1735), False, 'import os\n'), ((1787, 1818), 'os.path.join', 'os.path.join', (['cspice_di...
''' Tests MQTT functionality. ''' import unittest from unittest.mock import patch from modules import rec_mqtt class DummyMessage: # pylint: disable=R0903 '''Creating a mock response''' def __init__(self, command): self.payload=command topic='test_hub' class Tes...
[ "unittest.mock.patch" ]
[((517, 559), 'unittest.mock.patch', 'patch', (['"""modules.rec_mqtt.rec_api.link_hub"""'], {}), "('modules.rec_mqtt.rec_api.link_hub')\n", (522, 559), False, 'from unittest.mock import patch\n'), ((747, 795), 'unittest.mock.patch', 'patch', (['"""modules.rec_mqtt.rec_api.pull_data_dump"""'], {}), "('modules.rec_mqtt.r...
from functools import wraps from nose.plugins import skip from freezegun.api import FakeDate, FakeDatetime, _is_cpython def is_fake_date(obj): return obj.__class__ is FakeDate def is_fake_datetime(obj): return obj.__class__ is FakeDatetime def cpython_only(func): @wraps(func) def wrapper(*args):...
[ "nose.plugins.skip.SkipTest", "functools.wraps" ]
[((285, 296), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n', (290, 296), False, 'from functools import wraps\n'), ((367, 400), 'nose.plugins.skip.SkipTest', 'skip.SkipTest', (['"""Requires CPython"""'], {}), "('Requires CPython')\n", (380, 400), False, 'from nose.plugins import skip\n')]
# ------------------------------------------------------------------------------ # Copyright (c) NKU # Licensed under the MIT License. # Written by <NAME> (<EMAIL>) # ------------------------------------------------------------------------------ import torch import torch.nn as nn import torch.nn.functional as F import ...
[ "torch.nn.BatchNorm3d", "torch.nn.ReLU", "torch.nn.ModuleList", "torch.nn.Conv3d", "torch.sum", "torch.nn.Conv2d", "torch.FloatTensor", "torch.cat", "torch.nn.functional.softmax", "torch.squeeze", "torch.nn.BatchNorm2d", "torch.unsqueeze", "torch.nn.LeakyReLU", "datetime.datetime.now" ]
[((7858, 7881), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (7879, 7881), False, 'import datetime\n'), ((7967, 7990), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (7988, 7990), False, 'import datetime\n'), ((482, 622), 'torch.nn.Conv2d', 'nn.Conv2d', (['in_channel', 'out_c...
from django.db import models from Apps.usuario.models import usuario # Create your models here. class Paciente(usuario): contrato = models.CharField(max_length=100) class Meta: managed = False db_table = 'paciente'
[ "django.db.models.CharField" ]
[((142, 174), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (158, 174), False, 'from django.db import models\n')]
import unittest import datetime from rest_framework import status, test from rest_framework.reverse import reverse from waldur_core.core.utils import datetime_to_timestamp from waldur_core.structure.tests.factories import TestNewInstanceFactory, TestServiceProjectLinkFactory, UserFactory from ..models import Resourc...
[ "waldur_core.structure.tests.factories.TestNewInstanceFactory", "waldur_core.core.utils.datetime_to_timestamp", "waldur_core.structure.tests.factories.UserFactory", "datetime.date.today", "rest_framework.reverse.reverse", "unittest.skip", "datetime.timedelta", "waldur_core.structure.tests.factories.Te...
[((823, 885), 'unittest.skip', 'unittest.skip', (['"""Monitoring is not supported by structure yet."""'], {}), "('Monitoring is not supported by structure yet.')\n", (836, 885), False, 'import unittest\n'), ((2231, 2293), 'unittest.skip', 'unittest.skip', (['"""Monitoring is not supported by structure yet."""'], {}), "...
import json import boto3 # configuration alerts_queue_name = "alerts-queue" # AWS SDK clients s3 = boto3.client("s3") sqs = boto3.client("sqs") # ============= # HELPER METHOD # ============= def read_s3_object(bucket, key) -> str: data = s3.get_object(Bucket=bucket, Key=key) return data["Body"].read().d...
[ "json.loads", "boto3.client", "json.dumps" ]
[((102, 120), 'boto3.client', 'boto3.client', (['"""s3"""'], {}), "('s3')\n", (114, 120), False, 'import boto3\n'), ((127, 146), 'boto3.client', 'boto3.client', (['"""sqs"""'], {}), "('sqs')\n", (139, 146), False, 'import boto3\n'), ((1022, 1038), 'json.loads', 'json.loads', (['line'], {}), '(line)\n', (1032, 1038), Fa...
import boto3 def create_movie_table(dynamodb=None): dynamodb = boto3.resource("dynamodb", endpoint_url="http://localhost:8000") table = dynamodb.create_table( TableName="Movies", KeySchema=[ {"AttributeName": "year", "KeyType": "HASH"}, # Partition key {"AttributeName...
[ "boto3.resource" ]
[((69, 133), 'boto3.resource', 'boto3.resource', (['"""dynamodb"""'], {'endpoint_url': '"""http://localhost:8000"""'}), "('dynamodb', endpoint_url='http://localhost:8000')\n", (83, 133), False, 'import boto3\n')]
# Copyright 2016 Google Inc. All rights reserved. # # 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 agre...
[ "tempfile.NamedTemporaryFile", "os.remove", "utils.prompt_for_confirmation", "create.flags", "utils.prompt_for_zone", "connect.connect", "create.prepare" ]
[((3306, 3326), 'create.flags', 'create.flags', (['parser'], {}), '(parser)\n', (3318, 3326), False, 'import create\n'), ((5262, 5317), 'create.prepare', 'create.prepare', (['args', 'gcloud_beta_compute', 'gcloud_repos'], {}), '(args, gcloud_beta_compute, gcloud_repos)\n', (5276, 5317), False, 'import create\n'), ((480...
import os from web3 import HTTPProvider from ethereumetl.providers.rpc import BatchHTTPProvider from tests.ethereumetl.job.mock_batch_web3_provider import MockBatchWeb3Provider from tests.ethereumetl.job.mock_web3_provider import MockWeb3Provider def get_web3_provider(provider_type, read_resource_lambda=None, batch...
[ "tests.ethereumetl.job.mock_web3_provider.MockWeb3Provider", "tests.ethereumetl.job.mock_batch_web3_provider.MockBatchWeb3Provider", "os.environ.get", "web3.HTTPProvider", "ethereumetl.providers.rpc.BatchHTTPProvider" ]
[((558, 601), 'tests.ethereumetl.job.mock_batch_web3_provider.MockBatchWeb3Provider', 'MockBatchWeb3Provider', (['read_resource_lambda'], {}), '(read_resource_lambda)\n', (579, 601), False, 'from tests.ethereumetl.job.mock_batch_web3_provider import MockBatchWeb3Provider\n'), ((639, 677), 'tests.ethereumetl.job.mock_we...
# ------------------------------------------------------------------------ # Copyright (c) 2021 4669 (for eccv submission only). All Rights Reserved. # ------------------------------------------------------------------------ # Modified from Deformable DETR (https://github.com/fundamentalvision/Deformable-DETR) # Copyri...
[ "numpy.random.seed", "torchvision.transforms.functional.to_tensor", "numpy.empty", "pathlib.Path", "cv2.rectangle", "torch.device", "os.path.join", "random.randint", "cv2.cvtColor", "cv2.imwrite", "torch.load", "os.path.exists", "numpy.loadtxt", "util.tool.load_model", "models.build_mode...
[((1980, 2000), 'numpy.random.seed', 'np.random.seed', (['(2020)'], {}), '(2020)\n', (1994, 2000), True, 'import numpy as np\n'), ((3804, 3851), 'cv2.rectangle', 'cv2.rectangle', (['img', 'c1', 'c2', 'color'], {'thickness': 'tl'}), '(img, c1, c2, color, thickness=tl)\n', (3817, 3851), False, 'import cv2\n'), ((10835, 1...
import os, sys import numpy as np import pandas as pd import matplotlib.pyplot as plt import scipy.optimize from pyddem.volint_tools import neff_circ, std_err import functools import matplotlib.ticker as mtick from mpl_toolkits.axes_grid.inset_locator import inset_axes plt.rcParams.update({'font.size': 5}) plt.rcPara...
[ "numpy.abs", "numpy.nanmedian", "pandas.read_csv", "numpy.isnan", "matplotlib.pyplot.figure", "numpy.mean", "numpy.arange", "numpy.sin", "pyddem.volint_tools.neff_circ", "numpy.sqrt", "numpy.round", "numpy.nanmean", "pandas.DataFrame", "matplotlib.pyplot.rcParams.update", "matplotlib.tic...
[((272, 309), 'matplotlib.pyplot.rcParams.update', 'plt.rcParams.update', (["{'font.size': 5}"], {}), "({'font.size': 5})\n", (291, 309), True, 'import matplotlib.pyplot as plt\n'), ((310, 356), 'matplotlib.pyplot.rcParams.update', 'plt.rcParams.update', (["{'lines.linewidth': 0.35}"], {}), "({'lines.linewidth': 0.35})...
import torch import torch.nn as nn import torch.nn.functional as F class Message(nn.Module): def __init__(self, d_model1, d_model2): super().__init__() self.fc_gate1 = nn.Linear(d_model1, d_model2, bias=False) self.fc_gate2 = nn.Linear(d_model1, d_model2, bias=False) #self.fc_gate1...
[ "torch.nn.Linear" ]
[((190, 231), 'torch.nn.Linear', 'nn.Linear', (['d_model1', 'd_model2'], {'bias': '(False)'}), '(d_model1, d_model2, bias=False)\n', (199, 231), True, 'import torch.nn as nn\n'), ((256, 297), 'torch.nn.Linear', 'nn.Linear', (['d_model1', 'd_model2'], {'bias': '(False)'}), '(d_model1, d_model2, bias=False)\n', (265, 297...
# Copyright 2018 SUSE, Inc. import os import logging import pylint.config import pylint.lint import pylint.reporters from pyls import hookimpl, lsp log = logging.getLogger(__name__) @hookimpl def pyls_lint(config, document, on_change): settings = config.plugin_settings('pylint') log.debug("Got pylint setting...
[ "os.getcwd", "logging.getLogger" ]
[((155, 182), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (172, 182), False, 'import logging\n'), ((464, 475), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (473, 475), False, 'import os\n')]
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # # Port to UserBot by @MoveAngel from covid import Covid from userbot import CMD_HELP from userbot.events import regist...
[ "userbot.CMD_HELP.update", "covid.Covid", "userbot.events.register" ]
[((326, 381), 'userbot.events.register', 'register', ([], {'outgoing': '(True)', 'pattern': '"""^\\\\.covid(?: |$)(.*)"""'}), "(outgoing=True, pattern='^\\\\.covid(?: |$)(.*)')\n", (334, 381), False, 'from userbot.events import register\n'), ((2059, 2181), 'userbot.CMD_HELP.update', 'CMD_HELP.update', (['{\'covid\':\n ...
#!/usr/bin/env python3 from automata.Eva import Eva import time import json import logging # This example shows usage of the Eva object, used for controlling Eva, # reading Eva's current state and responding to different events triggered # by Eva's operation. host_ip = input("Please enter a Eva IP: ") token = input...
[ "automata.Eva.Eva", "json.dumps" ]
[((364, 383), 'automata.Eva.Eva', 'Eva', (['host_ip', 'token'], {}), '(host_ip, token)\n', (367, 383), False, 'from automata.Eva import Eva\n'), ((707, 731), 'json.dumps', 'json.dumps', (['outToolpaths'], {}), '(outToolpaths)\n', (717, 731), False, 'import json\n')]
""" Functions for manipulating Polymer Modeler files. """ from polymerxtal.polymod import main, readPDB from .validate import validate_bonds, readbond def generate_polymod_input(polymer_custom_input): polymer_custom_output = polymer_custom_input + "_latch.in" polymer_type_custom = {} src = open(polymer_...
[ "polymerxtal.polymod.main", "polymerxtal.polymod.readPDB" ]
[((11465, 11479), 'polymerxtal.polymod.main', 'main', (['[infile]'], {}), '([infile])\n', (11469, 11479), False, 'from polymerxtal.polymod import main, readPDB\n'), ((12089, 12125), 'polymerxtal.polymod.readPDB', 'readPDB', (['""".tmp/chains_unwrapped.pdb"""'], {}), "('.tmp/chains_unwrapped.pdb')\n", (12096, 12125), Fa...
# -*- coding: utf-8 -*- """ Madame.handler.collections ~~~~~~~~~~ Handler for collections. :copyright: (c) 2012 by <NAME>. :license: MIT, see LICENSE for more details. """ from datetime import datetime from flask.helpers import json from flask.views import MethodView from madame.response import ...
[ "flask.request.values.to_dict", "werkzeug.exceptions.abort", "flask.helpers.json.loads", "madame.response.send_error", "madame.response.send_response", "madame.utils.get_document_link", "datetime.datetime.utcnow", "madame.utils.get_etag", "madame.utils.get_parent_link", "madame.utils.get_self_link...
[((1144, 1168), 'flask.request.values.to_dict', 'request.values.to_dict', ([], {}), '()\n', (1166, 1168), False, 'from flask import request\n'), ((2164, 2187), 'madame.response.send_response', 'send_response', (['response'], {}), '(response)\n', (2177, 2187), False, 'from madame.response import send_response, send_erro...
"""Docstring in public module.""" import os import sys import ujson as json from tornado.testing import AsyncHTTPTestCase APP_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) sys.path.append(os.path.join(APP_ROOT, "..")) class TestPoliciesApi(AsyncHTTPTestCase): def get_app(self): f...
[ "os.path.dirname", "ujson.loads", "consoleme.routes.make_app", "consoleme.config.config.get", "ujson.dumps", "os.path.join" ]
[((214, 242), 'os.path.join', 'os.path.join', (['APP_ROOT', '""".."""'], {}), "(APP_ROOT, '..')\n", (226, 242), False, 'import os\n'), ((164, 189), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (179, 189), False, 'import os\n'), ((373, 409), 'consoleme.routes.make_app', 'make_app', ([], {'jw...
import pulsar as psr def load_ref_system(): """ Returns l-valine as found in the IQMol fragment library. All credit to https://github.com/nutjunkie/IQmol """ return psr.make_system(""" C 0.2036 -0.4958 0.3403 N 1.4832 -1.2440 0.2997 C 0.3147 ...
[ "pulsar.make_system" ]
[((185, 1101), 'pulsar.make_system', 'psr.make_system', (['"""\n C 0.2036 -0.4958 0.3403\n N 1.4832 -1.2440 0.2997\n C 0.3147 0.9660 0.8346\n C -1.0593 1.6179 0.8658\n C 0.9346 1.0303 2.2224\n C -0.3596...
from os.path import exists, dirname, basename, join, abspath from os import remove from multiprocessing import cpu_count from subprocess import run, PIPE def align_minimap(ref_sequence_path, reads_sequence_path, max_threads=None, output_dir=None, preset="map-ont", sam_only=False, k=15): """ Given a reference ...
[ "subprocess.run", "os.path.abspath", "os.path.basename", "os.path.join", "multiprocessing.cpu_count" ]
[((616, 642), 'os.path.abspath', 'abspath', (['ref_sequence_path'], {}), '(ref_sequence_path)\n', (623, 642), False, 'from os.path import exists, dirname, basename, join, abspath\n'), ((669, 697), 'os.path.abspath', 'abspath', (['reads_sequence_path'], {}), '(reads_sequence_path)\n', (676, 697), False, 'from os.path im...
import os import ptvsd import platform import asyncio import logging from aiorun import run from injector import Injector from .logger import getLogger, CONSOLE, HISTORY from backup.config import Config, Setting from backup.module import MainModule, BaseModule from backup.starter import Starter from time import slee...
[ "backup.config.Config", "ptvsd.enable_attach", "asyncio.sleep", "backup.module.BaseModule", "backup.module.MainModule", "backup.config.Setting.CONFIG_FILE_PATH.default", "platform.system", "os.path.join", "asyncio.WindowsSelectorEventLoopPolicy" ]
[((600, 608), 'backup.config.Config', 'Config', ([], {}), '()\n', (606, 608), False, 'from backup.config import Config, Setting\n'), ((1165, 1203), 'ptvsd.enable_attach', 'ptvsd.enable_attach', (["('0.0.0.0', port)"], {}), "(('0.0.0.0', port))\n", (1184, 1203), False, 'import ptvsd\n'), ((1212, 1229), 'platform.system'...
from mcresources import ResourceManager from mcresources import utils def generate(rm: ResourceManager): vanilla_woods = ('oak', 'acacia', 'dark_oak', 'birch', 'jungle', 'spruce') for wood in vanilla_woods: direct_block_model(rm, 'betterfoliage:%s_leaves' % wood, { 'loader': 'betterfoliag...
[ "mcresources.utils.resource_location" ]
[((3477, 3521), 'mcresources.utils.resource_location', 'utils.resource_location', (['rm.domain', 'location'], {}), '(rm.domain, location)\n', (3500, 3521), False, 'from mcresources import utils\n')]
# Generated by Django 2.1.5 on 2019-03-06 18:20 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('recruitment', '0013_auto_20190306_1652'), ] operations = [ migrations.CreateMo...
[ "django.db.models.DateTimeField", "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.AutoField" ]
[((408, 501), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (424, 501), False, 'from django.db import migrations, models\...
# -*- coding: utf-8 -*- # Copyright 2016 Open Permissions Platform Coalition # 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 appl...
[ "chub.api.Resource", "mock.Mock" ]
[((718, 724), 'mock.Mock', 'Mock', ([], {}), '()\n', (722, 724), False, 'from mock import Mock\n'), ((733, 757), 'chub.api.Resource', 'Resource', (['"""world"""', 'fetch'], {}), "('world', fetch)\n", (741, 757), False, 'from chub.api import Resource\n'), ((3118, 3142), 'chub.api.Resource', 'Resource', (['"""world"""', ...
# Imports here import torch from torch import nn from torch import optim from torchvision import datasets, transforms, models import time from collections import OrderedDict import matplotlib.pyplot as plt import torch.nn.functional as F import numpy as np # Build the network class Network(nn.Module): def __init_...
[ "torch.nn.Dropout", "time.time", "torch.exp", "torch.cuda.is_available", "torch.nn.functional.log_softmax", "torch.nn.Linear", "torch.nn.functional.relu", "torch.no_grad" ]
[((3674, 3685), 'time.time', 'time.time', ([], {}), '()\n', (3683, 3685), False, 'import time\n'), ((813, 853), 'torch.nn.Linear', 'nn.Linear', (['hidden_sizes[-1]', 'output_size'], {}), '(hidden_sizes[-1], output_size)\n', (822, 853), False, 'from torch import nn\n'), ((913, 935), 'torch.nn.Dropout', 'nn.Dropout', ([]...
from django.db import models from django.conf import settings class Contact(models.Model): user1 = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, related_name='user1') user2 = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, related_name='user2') @staticmethod ...
[ "django.db.models.ForeignKey", "django.db.models.BooleanField" ]
[((105, 200), 'django.db.models.ForeignKey', 'models.ForeignKey', (['settings.AUTH_USER_MODEL'], {'on_delete': 'models.CASCADE', 'related_name': '"""user1"""'}), "(settings.AUTH_USER_MODEL, on_delete=models.CASCADE,\n related_name='user1')\n", (122, 200), False, 'from django.db import models\n'), ((209, 304), 'djang...