code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
""" This script interfaces with the codepost.io API to produce exemplar reports for ABET accreditation. For a particular assignment, a report includes an assignment summary (basic info and stats) as well as the full assessment of 3 student examples of an A, B, and C submission. The report includes all line-by-line g...
[ "argparse.ArgumentParser", "codepost.assignment.retrieve", "codepost.file.retrieve", "os.system", "codepost.course.retrieve", "codepost.comment.retrieve", "codepost.configure_api_key" ]
[((1555, 1658), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '__doc__', 'formatter_class': 'argparse.RawDescriptionHelpFormatter'}), '(description=__doc__, formatter_class=argparse.\n RawDescriptionHelpFormatter)\n', (1578, 1658), False, 'import argparse\n'), ((6096, 6138), 'codepost.co...
# Lint as: python3 # Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ "tensorflow.test.main", "iree.tf.support.tf_utils.check_same", "iree.tf.support.tf_utils.to_mlir_type", "iree.tf.support.tf_utils.apply_function", "numpy.array", "absl.testing.parameterized.named_parameters", "iree.tf.support.tf_utils.save_input_values" ]
[((823, 1008), 'absl.testing.parameterized.named_parameters', 'parameterized.named_parameters', (["[('int8_to_i8', np.int8, 'i8'), ('int32_to_i32', np.int32, 'i32'), (\n 'float32_to_f32', np.float32, 'f32'), ('float64_to_f64', np.float64, 'f64')\n ]"], {}), "([('int8_to_i8', np.int8, 'i8'), (\n 'int32_to_i32',...
import pandas as pd import numpy as np texts = [] f = open('preprocess/jull_review.csv', 'r') for line in f.readlines(): oneline = line.replace("\n", "").split(",") oneline = list(filter(None, oneline)) texts.append(oneline) print(len(texts)) from gensim.models.doc2vec import Doc2Vec, TaggedDocument doc...
[ "gensim.models.doc2vec.Doc2Vec", "gensim.models.doc2vec.TaggedDocument" ]
[((404, 475), 'gensim.models.doc2vec.Doc2Vec', 'Doc2Vec', (['documents'], {'vector_size': '(100)', 'window': '(10)', 'min_count': '(30)', 'workers': '(4)'}), '(documents, vector_size=100, window=10, min_count=30, workers=4)\n', (411, 475), False, 'from gensim.models.doc2vec import Doc2Vec, TaggedDocument\n'), ((539, 61...
import subprocess, json, sys, time from selenium import webdriver from selenium.webdriver.firefox.options import Options with open('config.json', 'r') as f: CONFIG = json.load(f) proc = subprocess.Popen([sys.executable, 'server.py'], stdout=sys.stdout) print('Waiting for server to start.') time.sleep(4) options ...
[ "subprocess.Popen", "json.load", "selenium.webdriver.Firefox", "time.sleep", "selenium.webdriver.firefox.options.Options" ]
[((192, 258), 'subprocess.Popen', 'subprocess.Popen', (["[sys.executable, 'server.py']"], {'stdout': 'sys.stdout'}), "([sys.executable, 'server.py'], stdout=sys.stdout)\n", (208, 258), False, 'import subprocess, json, sys, time\n'), ((297, 310), 'time.sleep', 'time.sleep', (['(4)'], {}), '(4)\n', (307, 310), False, 'im...
import unittest from two_sum.solution import Solution class MyTestCase(unittest.TestCase): def test_two_sum(self): s = Solution() nums = [2,7,11,15] target = 9 result = s.twoSum(nums, target) self.assertEqual(result, [0,1]) nums = [-1,-2,-3,-4,-5] targe...
[ "two_sum.solution.Solution" ]
[((135, 145), 'two_sum.solution.Solution', 'Solution', ([], {}), '()\n', (143, 145), False, 'from two_sum.solution import Solution\n'), ((463, 473), 'two_sum.solution.Solution', 'Solution', ([], {}), '()\n', (471, 473), False, 'from two_sum.solution import Solution\n'), ((813, 823), 'two_sum.solution.Solution', 'Soluti...
# -*- coding: utf-8 -*- # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) import pytest from spyder.plugins.editor.fallback.actor import FallbackActor from spyder.plugins.editor.lsp.tests.conftest import qtbot_module @pytest.fixture(scope...
[ "spyder.plugins.editor.fallback.actor.FallbackActor", "spyder.plugins.editor.lsp.tests.conftest.qtbot_module.waitSignal", "pytest.fixture", "spyder.plugins.editor.lsp.tests.conftest.qtbot_module.addWidget" ]
[((300, 330), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (314, 330), False, 'import pytest\n'), ((383, 402), 'spyder.plugins.editor.fallback.actor.FallbackActor', 'FallbackActor', (['None'], {}), '(None)\n', (396, 402), False, 'from spyder.plugins.editor.fallback.actor im...
from pygame.draw import rect as draw_rect def darken_color(color, factor): return tuple(int(c * factor) for c in color) def draw_piece(surf, color, left, top, width, height, size): padding_factor = 0.025 shadow_factor = 0.085 margin_factor = 0.05 base_color = color margin_color = darken_colo...
[ "pygame.draw.rect" ]
[((796, 838), 'pygame.draw.rect', 'draw_rect', (['surf', 'bottom_color', 'bottom_rect'], {}), '(surf, bottom_color, bottom_rect)\n', (805, 838), True, 'from pygame.draw import rect as draw_rect\n'), ((843, 880), 'pygame.draw.rect', 'draw_rect', (['surf', 'base_color', 'top_rect'], {}), '(surf, base_color, top_rect)\n',...
#!/usr/bin/env python """ Standard BOX 2D module with single joint """ import gym_rem2D.morph.module_utility as mu from gym_rem.utils import Rot from enum import Enum import numpy as np from Controller import m_controller import random import math from gym_rem2D.morph import abstract_module from gym_rem2D.morph i...
[ "gym_rem.utils.Rot.from_axis", "gym_rem2D.morph.module_utility.create_joint", "random.uniform", "Box2D.b2RevoluteJoint", "math.sin", "numpy.array", "math.cos", "Box2D.b2CircleShape", "random.gauss", "Controller.m_controller.Controller" ]
[((770, 784), 'numpy.array', 'np.array', (['size'], {}), '(size)\n', (778, 784), True, 'import numpy as np\n'), ((981, 1006), 'numpy.array', 'np.array', (['[0.0, 0.0, 1.0]'], {}), '([0.0, 0.0, 1.0])\n', (989, 1006), True, 'import numpy as np\n'), ((1025, 1089), 'gym_rem.utils.Rot.from_axis', 'Rot.from_axis', (['self.co...
#!/usr/bin/env python3 import requests import base64 import re from levels_credentials import credentials level_url = credentials[5]["url"] level_username = credentials[5]["level"] level_password = credentials[5]["password"] next_level_url = credentials[6]["url"] next_level_username = credentials[6]["level"] creden...
[ "levels_credentials.credentials.encode", "re.split", "requests.get" ]
[((562, 615), 'requests.get', 'requests.get', (['level_url'], {'headers': 'heads', 'cookies': 'cooks'}), '(level_url, headers=heads, cookies=cooks)\n', (574, 615), False, 'import requests\n'), ((648, 678), 're.split', 're.split', (['"""\n|:|\\\\s|<|>"""', 'data'], {}), "('\\n|:|\\\\s|<|>', data)\n", (656, 678), False, ...
import warnings import sc2 from sharpy.plans.require.require_base import RequireBase class Gas(RequireBase): """Require that a specific number of minerals are "in the bank".""" def __init__(self, vespene_requirement: int): assert vespene_requirement is not None and isinstance(vespene_requirement, i...
[ "warnings.warn" ]
[((621, 711), 'warnings.warn', 'warnings.warn', (['"""\'RequiredGas\' is deprecated, use \'Gas\' instead"""', 'DeprecationWarning', '(2)'], {}), '("\'RequiredGas\' is deprecated, use \'Gas\' instead",\n DeprecationWarning, 2)\n', (634, 711), False, 'import warnings\n')]
import logging import os # set the default logging level to info logging.basicConfig(level=logging.INFO) ROOT_SRC_DIR = os.path.dirname(os.path.abspath(__file__)) USERNAME = os.environ.get('APP_USERNAME', 'admin') PASSWORD = os.environ.get('APP_PASSWORD', '<PASSWORD>') WORKER_NUM_CPUS = os.environ.get('WORKER_NUM_CP...
[ "os.environ.get", "os.path.abspath", "logging.basicConfig" ]
[((66, 105), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (85, 105), False, 'import logging\n'), ((176, 215), 'os.environ.get', 'os.environ.get', (['"""APP_USERNAME"""', '"""admin"""'], {}), "('APP_USERNAME', 'admin')\n", (190, 215), False, 'import os\n'), ((2...
import numpy as np from multiprocessing import Pool from ..bbox import bbox_overlaps # https://zhuanlan.zhihu.com/p/34655990 def calc_PR_curve(pred, label): pos = label[label == 1] # 正样本 threshold = np.sort(pred)[::-1] # pred是每个样本的正例预测概率值,逆序 label = label[pred.argsort()[::-1]] precision = [] rec...
[ "numpy.maximum", "numpy.sum", "numpy.zeros", "numpy.ones", "numpy.hstack", "numpy.argsort", "numpy.sort", "numpy.cumsum", "numpy.finfo", "numpy.where", "numpy.arange", "numpy.array", "multiprocessing.Pool", "numpy.vstack" ]
[((934, 970), 'numpy.zeros', 'np.zeros', (['num_dets'], {'dtype': 'np.float32'}), '(num_dets, dtype=np.float32)\n', (942, 970), True, 'import numpy as np\n'), ((980, 1016), 'numpy.zeros', 'np.zeros', (['num_dets'], {'dtype': 'np.float32'}), '(num_dets, dtype=np.float32)\n', (988, 1016), True, 'import numpy as np\n'), (...
import cloudpickle import numpy as np import torch from typing import List, Tuple from scipy.linalg import eigh def save_checkpoint(state, filename='checkpoint.pkl'): data = cloudpickle.dumps(state) with open(filename, 'wb') as fi: fi.write(data) def load_checkpoint(filename='checkpoint.pkl'): w...
[ "cloudpickle.dumps", "cloudpickle.load" ]
[((180, 204), 'cloudpickle.dumps', 'cloudpickle.dumps', (['state'], {}), '(state)\n', (197, 204), False, 'import cloudpickle\n'), ((367, 387), 'cloudpickle.load', 'cloudpickle.load', (['fi'], {}), '(fi)\n', (383, 387), False, 'import cloudpickle\n')]
from django.contrib import admin from .models import School,Student # Register your models here. admin.site.register(School) admin.site.register(Student)
[ "django.contrib.admin.site.register" ]
[((100, 127), 'django.contrib.admin.site.register', 'admin.site.register', (['School'], {}), '(School)\n', (119, 127), False, 'from django.contrib import admin\n'), ((129, 157), 'django.contrib.admin.site.register', 'admin.site.register', (['Student'], {}), '(Student)\n', (148, 157), False, 'from django.contrib import ...
""" B-Complement Input: part point clouds: B x P x N x 3 Output: R and T: B x P x(3 + 4) Losses: Center L2 Loss, Rotation L2 Loss, Rotation Chamder-Distance Loss """ import torch from torch import nn import torch.nn.functional as F import sys, os import numpy...
[ "torch.mean", "os.path.abspath", "cd.chamfer.chamfer_distance", "torch.nn.BatchNorm1d", "torch.nn.Conv1d", "numpy.zeros", "quaternion.qrot", "torch.cat", "numpy.random.normal", "torch.nn.Linear", "torch.zeros", "torch.no_grad", "os.path.join", "torch.tensor" ]
[((355, 380), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (370, 380), False, 'import sys, os\n'), ((398, 432), 'os.path.join', 'os.path.join', (['BASE_DIR', '"""../utils"""'], {}), "(BASE_DIR, '../utils')\n", (410, 432), False, 'import sys, os\n'), ((718, 737), 'torch.nn.Conv1d', 'nn.Conv1...
import pytest from dmwmclient import Client @pytest.mark.asyncio async def test_cycle(): client = Client() dynamo = client.dynamo cycle = await dynamo.latest_cycle() assert type(cycle) is dict assert set(cycle.keys()) == {'cycle', 'partition_id', 'timestamp', 'comment'} @pytest.mark.asyncio asy...
[ "dmwmclient.Client" ]
[((104, 112), 'dmwmclient.Client', 'Client', ([], {}), '()\n', (110, 112), False, 'from dmwmclient import Client\n'), ((355, 363), 'dmwmclient.Client', 'Client', ([], {}), '()\n', (361, 363), False, 'from dmwmclient import Client\n')]
import configparser import os import logging dirname = os.path.dirname(__file__) filename = os.path.join(dirname, '../config.ini') config = configparser.ConfigParser() config.read_file(open(filename)) logger = logging.getLogger() handler = logging.StreamHandler() formatter = logging.Formatter( '%(asctime)s %...
[ "os.path.dirname", "logging.StreamHandler", "logging.Formatter", "configparser.ConfigParser", "os.path.join", "logging.getLogger" ]
[((56, 81), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (71, 81), False, 'import os\n'), ((93, 131), 'os.path.join', 'os.path.join', (['dirname', '"""../config.ini"""'], {}), "(dirname, '../config.ini')\n", (105, 131), False, 'import os\n'), ((142, 169), 'configparser.ConfigParser', 'confi...
# -*- coding: utf-8 -*- # # Copyright 2019 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 requir...
[ "googlecloudsdk.command_lib.data_fusion.resource_args.AddOperationResourceArg", "googlecloudsdk.command_lib.data_fusion.operation_poller.OperationPoller", "googlecloudsdk.api_lib.data_fusion.datafusion.Datafusion" ]
[((1422, 1497), 'googlecloudsdk.command_lib.data_fusion.resource_args.AddOperationResourceArg', 'resource_args.AddOperationResourceArg', (['parser', '"""The operation to wait for."""'], {}), "(parser, 'The operation to wait for.')\n", (1459, 1497), False, 'from googlecloudsdk.command_lib.data_fusion import resource_arg...
# -*- coding: utf-8 -*- """groupby procedure for recipes""" import fnmatch import logging from typing import List from .. helpers import debuggable, mkfunc from .. model.ingredient import DataPointIngredient from .. model.chef import Chef logger = logging.getLogger('groupby') @debuggable def groupby(chef: Chef,...
[ "logging.getLogger" ]
[((254, 282), 'logging.getLogger', 'logging.getLogger', (['"""groupby"""'], {}), "('groupby')\n", (271, 282), False, 'import logging\n')]
# -*- coding: utf-8 -*- import pickle import numpy as np from Conv_Bidrect_LSTM import CBLSTM import tensorflow as tf def load_data(normal_stat=False): if normal_stat: filepath = "./data/data_normal.p" else: filepath = "./data/data_seq.p" with open(filepath, mode='rb') as f: x = pi...
[ "pickle.load", "Conv_Bidrect_LSTM.CBLSTM" ]
[((821, 1006), 'Conv_Bidrect_LSTM.CBLSTM', 'CBLSTM', ([], {'MODEL_TYPE': '"""Regression"""', 'FILTER_NUM': 'k', 'FILTER_SIZE': 'm', 'POOL_SIZE': 's', 'INPUT_LENGTH': 'd', 'TIME_STEP': 'l', 'CELL_UNITS': '[50, 100]', 'FULL_UNITS': '[100, 200]', 'KEEP_PROB': '(0.5)', 'OUTPUT_NUM': '(1)'}), "(MODEL_TYPE='Regression', FILT...
#!/usr/bin/env python # Programmer(s): <NAME>. # This file is part of the 'exphydro.lumped' package. from hydroutils import Parameter ###################################################################### class ExphydroParameters(object): def __init__(self): """ Each parameter set conta...
[ "hydroutils.Parameter" ]
[((501, 518), 'hydroutils.Parameter', 'Parameter', (['(0)', '(0.1)'], {}), '(0, 0.1)\n', (510, 518), False, 'from hydroutils import Parameter\n'), ((540, 564), 'hydroutils.Parameter', 'Parameter', (['(100.0)', '(1500.0)'], {}), '(100.0, 1500.0)\n', (549, 564), False, 'from hydroutils import Parameter\n'), ((586, 607), ...
import torch import pyro from pyro.nn import pyro_method from pyro.distributions import Normal, Bernoulli, TransformedDistribution from pyro.distributions.conditional import ConditionalTransformedDistribution from deepscm.distributions.transforms.affine import ConditionalAffineTransform from pyro.nn import DenseNN fr...
[ "deepscm.distributions.transforms.affine.ConditionalAffineTransform", "pyro.plate", "pyro.distributions.TransformedDistribution", "pyro.distributions.Normal", "torch.cat", "pyro.sample", "pyro.distributions.Bernoulli", "pyro.distributions.conditional.ConditionalTransformedDistribution", "torch.nn.Le...
[((731, 803), 'deepscm.distributions.transforms.affine.ConditionalAffineTransform', 'ConditionalAffineTransform', ([], {'context_nn': 'ventricle_volume_net', 'event_dim': '(0)'}), '(context_nn=ventricle_volume_net, event_dim=0)\n', (757, 803), False, 'from deepscm.distributions.transforms.affine import ConditionalAffin...
"""Helpers for Bayesian Modelling. """ import inspect class NoOpContext: def __enter__(self): return self def __exit__(self, exc, exc_type, traceback): pass class Model(NoOpContext): """Definition of a model Usage:: with bayes.Model() as model: @model.observe ...
[ "tensorflow.nn.softmax", "tensorflow.one_hot", "tensorflow.reduce_sum", "inspect.getfullargspec", "tensorflow.trainable_variables", "tensorflow.control_dependencies", "tensorflow.argmax", "tensorflow.stop_gradient", "tensorflow.reduce_mean", "tensorflow.variable_scope", "tensorflow.cast", "ten...
[((5711, 5740), 'tensorflow.reduce_mean', 'tf.reduce_mean', (["scope['loss']"], {}), "(scope['loss'])\n", (5725, 5740), True, 'import tensorflow as tf\n'), ((6879, 6908), 'tensorflow.cast', 'tf.cast', (['(z > 0)'], {'dtype': 'z.dtype'}), '(z > 0, dtype=z.dtype)\n', (6886, 6908), True, 'import tensorflow as tf\n'), ((69...
from base64 import b64encode from ipykernel.comm import Comm from IPython import get_ipython import io from io import BytesIO import urllib.request, urllib.parse, urllib.error _comm=None def is_notebook(): iPython=get_ipython() if iPython is None or not iPython.config: return False return 'IPKernelApp' in iPyt...
[ "IPython.get_ipython", "io.BytesIO", "ipykernel.comm.Comm" ]
[((219, 232), 'IPython.get_ipython', 'get_ipython', ([], {}), '()\n', (230, 232), False, 'from IPython import get_ipython\n'), ((646, 678), 'ipykernel.comm.Comm', 'Comm', ([], {'target_name': '"""tdb"""', 'data': '{}'}), "(target_name='tdb', data={})\n", (650, 678), False, 'from ipykernel.comm import Comm\n'), ((986, 9...
from pathlib import Path from typing import MutableMapping, Any from coveo_styles.styles import ExitWithFailure import toml from toml import TomlDecodeError def load_toml_from_path(toml_path: Path) -> MutableMapping[str, Any]: """Loads a toml from path or raise ExitWithFailure on failure.""" return _load_tom...
[ "toml.loads", "coveo_styles.styles.ExitWithFailure" ]
[((488, 512), 'toml.loads', 'toml.loads', (['toml_content'], {}), '(toml_content)\n', (498, 512), False, 'import toml\n'), ((621, 693), 'coveo_styles.styles.ExitWithFailure', 'ExitWithFailure', ([], {'suggestions': 'f"""{toml_path}:{lineno}:{colno} parse error"""'}), "(suggestions=f'{toml_path}:{lineno}:{colno} parse e...
from vector import Vector from movement import movements def dest_rank(text): i = len(text) -1 while i >= 0: if text[i].isdigit(): return ord(text[i]) - 48 - 1 else: i -= 1 raise Exception("No number found in " + text + ".") def dest_file(text): i = len(text) - 1 wh...
[ "vector.Vector.create" ]
[((5106, 5151), 'vector.Vector.create', 'Vector.create', (['file', 'rank', 'destfile', 'destrank'], {}), '(file, rank, destfile, destrank)\n', (5119, 5151), False, 'from vector import Vector\n')]
import unittest import os import matplotlib.pyplot as plt import numpy as np from lorenz.lorenz import make_dataset, plot_3d import lorenz.dataset class TestDataset(unittest.TestCase): def setUp(self): self.path = os.path.join(os.path.split(os.path.split(os.path.dirname(__file__))[0])[0], 'data', 'lorenz...
[ "matplotlib.pyplot.show", "lorenz.lorenz.plot_3d", "os.path.dirname", "numpy.random.RandomState", "numpy.linspace" ]
[((380, 407), 'numpy.random.RandomState', 'np.random.RandomState', (['(1729)'], {}), '(1729)\n', (401, 407), True, 'import numpy as np\n'), ((684, 711), 'numpy.random.RandomState', 'np.random.RandomState', (['(1729)'], {}), '(1729)\n', (705, 711), True, 'import numpy as np\n'), ((595, 605), 'matplotlib.pyplot.show', 'p...
# Library file on the Computer. # Must be in the same directory as any file using it's functions. import socket import struct import sys from threading import Thread, Event from binascii import crc_hqx class CompTalk: def __init__(self, host): # Variables that define the communication self.buf...
[ "threading.Thread", "socket.socket", "struct.unpack", "threading.Event", "sys.exit" ]
[((7089, 7096), 'threading.Event', 'Event', ([], {}), '()\n', (7094, 7096), False, 'from threading import Thread, Event\n'), ((7149, 7183), 'threading.Thread', 'Thread', ([], {'target': 'self._waitForStream'}), '(target=self._waitForStream)\n', (7155, 7183), False, 'from threading import Thread, Event\n'), ((576, 625),...
from mongomock import MongoClient from repository.repository_factory import RepositoryFactory class MongoMockRepository(RepositoryFactory): __data_source = None def get_data_source(self): if MongoMockRepository.__data_source == None: MongoMockRepository.__data_source = MongoClient() ...
[ "mongomock.MongoClient" ]
[((302, 315), 'mongomock.MongoClient', 'MongoClient', ([], {}), '()\n', (313, 315), False, 'from mongomock import MongoClient\n')]
# Copyright (c) 2020 Room 525 Research Group, Zhejiang University. # All Rights Reserved. """Defination of Role Makers.""" from __future__ import print_function import paddle.fluid as fluid import os import time __all__ = [ 'Role', 'RoleMakerBase', 'MPISymetricRoleMaker', 'UserDefinedRoleMaker', 'UserDef...
[ "netifaces.interfaces", "paddle.fluid.core.Gloo", "os.path.join", "random.randint", "netifaces.gateways", "random.shuffle", "os.path.isdir", "os.environ.get", "socket.gethostname", "netifaces.ifaddresses", "os.getenv", "os.listdir" ]
[((1245, 1266), 'random.shuffle', 'random.shuffle', (['names'], {}), '(names)\n', (1259, 1266), False, 'import random\n'), ((2897, 2918), 'random.shuffle', 'random.shuffle', (['names'], {}), '(names)\n', (2911, 2918), False, 'import random\n'), ((4486, 4510), 'random.shuffle', 'random.shuffle', (['all_data'], {}), '(al...
import main import unittest class OnelineTest(unittest.TestCase): def example_test(self): a = [1, 2, 3, 4, 5] b = [10, 0, 10, 0, 10] main.fmax(a,b) self.assertEqual(a,[10, 2, 10, 4, 10]) if __name__ == '__main__': unittest.main()
[ "unittest.main", "main.fmax" ]
[((260, 275), 'unittest.main', 'unittest.main', ([], {}), '()\n', (273, 275), False, 'import unittest\n'), ((167, 182), 'main.fmax', 'main.fmax', (['a', 'b'], {}), '(a, b)\n', (176, 182), False, 'import main\n')]
from utilities import load_stf import numpy as np from scipy.spatial.distance import cosine import time #vsm = load_stf('glove.840B.300d.sample.txt',300) #csm = np.load('centroids').item() #distrib = np.zeros((100000,10)) #oFile = open('f_distrib','w+') def dot_product(v1,v2): total = 0 if len(v1) != len(v2): thr...
[ "numpy.power", "numpy.zeros" ]
[((788, 808), 'numpy.power', 'np.power', (['v1c', 'gamma'], {}), '(v1c, gamma)\n', (796, 808), True, 'import numpy as np\n'), ((1221, 1233), 'numpy.zeros', 'np.zeros', (['(10)'], {}), '(10)\n', (1229, 1233), True, 'import numpy as np\n'), ((1242, 1254), 'numpy.zeros', 'np.zeros', (['(10)'], {}), '(10)\n', (1250, 1254),...
#!/usr/bin/env python3 import json import logging import pkg_resources import pytz import sys import tzlocal import yaml from datetime import datetime, timedelta from os.path import expanduser, isfile import dash import dash_core_components as dcc import dash_html_components as html import plotly import plotly.graph_...
[ "yaml.load", "json.dumps", "pkg_resources.resource_filename", "os.path.isfile", "logging.error", "dash.Dash", "json.loads", "dash_html_components.Div", "dash.dependencies.State", "datetime.timedelta", "plotly.graph_objs.Figure", "datetime.datetime.now", "dash_core_components.Interval", "da...
[((624, 643), 'dash.Dash', 'dash.Dash', (['__name__'], {}), '(__name__)\n', (633, 643), False, 'import dash\n'), ((2795, 2819), 'datetime.timedelta', 'timedelta', ([], {'hours': '(30 * 24)'}), '(hours=30 * 24)\n', (2804, 2819), False, 'from datetime import datetime, timedelta\n'), ((2833, 2856), 'tzlocal.get_localzone'...
from ast import literal_eval from flask import Flask, jsonify, render_template, request, Response from scripts.downloader import download_hashes from scripts.checks import check_info app = Flask(__name__) @app.route("/check/") def check(): """ Does the following checks: - The album hash (album_hash...
[ "scripts.checks.check_info", "flask.request.args.get", "scripts.downloader.download_hashes", "flask.Flask", "flask.jsonify", "flask.render_template" ]
[((192, 207), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (197, 207), False, 'from flask import Flask, jsonify, render_template, request, Response\n'), ((1164, 1191), 'flask.request.args.get', 'request.args.get', (['"""img_dir"""'], {}), "('img_dir')\n", (1180, 1191), False, 'from flask import Flask, js...
#!/usr/bin/env python ''' KDH at an individual k-point ''' from functools import reduce import numpy from pyscf.pbc import gto from pyscf import pbcdh, lib #lib.num_threads(28) cell = gto.Cell() cell.atom=''' C 0.000000000000 0.000000000000 0.000000000000 C 1.685068664391 1.685068664391 1.685068664391 ''' c...
[ "pyscf.pbcdh.KDH", "pyscf.pbc.gto.Cell" ]
[((188, 198), 'pyscf.pbc.gto.Cell', 'gto.Cell', ([], {}), '()\n', (196, 198), False, 'from pyscf.pbc import gto\n'), ((725, 762), 'pyscf.pbcdh.KDH', 'pbcdh.KDH', (['cell'], {'xc': '"""XYG3"""', 'kpts': 'kpts'}), "(cell, xc='XYG3', kpts=kpts)\n", (734, 762), False, 'from pyscf import pbcdh, lib\n')]
from data_collection.read_sentinel import pair_imagenames from utils.set_user_input import set_arguments_pipeline from utils.raster_helper import read_url_image, read_input_geometry, array2raster import numpy as np import rasterio def compute_ndvi(band_inf, bands=["red", "nir"]): """ This function computes t...
[ "data_collection.read_sentinel.pair_imagenames", "utils.raster_helper.array2raster", "numpy.empty", "utils.set_user_input.set_arguments_pipeline", "numpy.where", "utils.raster_helper.read_url_image", "numpy.logical_or" ]
[((663, 698), 'data_collection.read_sentinel.pair_imagenames', 'pair_imagenames', (['red_band', 'nir_band'], {}), '(red_band, nir_band)\n', (678, 698), False, 'from data_collection.read_sentinel import pair_imagenames\n'), ((1229, 1283), 'numpy.empty', 'np.empty', (['band_red_image.shape'], {'dtype': 'rasterio.float32'...
import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import datetime as dt import numpy as np import plotly.express as px # pd.options.display.float_format = '${:,.2f}'.format # Load the data data = pd.read_excel("./data/Online_Retail.xlsx") # remove duplicate rows filtered_data = data.drop_du...
[ "pandas.read_excel", "plotly.express.scatter" ]
[((224, 266), 'pandas.read_excel', 'pd.read_excel', (['"""./data/Online_Retail.xlsx"""'], {}), "('./data/Online_Retail.xlsx')\n", (237, 266), True, 'import pandas as pd\n'), ((2647, 2829), 'plotly.express.scatter', 'px.scatter', (['df_plot[:25000]'], {'x': '"""UnitPrice"""', 'y': '"""Quantity"""', 'color': '"""Country"...
from saboteur.agent import SaboteurWebApp import json import unittest from test_utils import MockShell from saboteur.apicommands import FAULT_TYPES, alphabetical_keys def post_request(params): return request('POST', params) def delete_request(): return {'path': '/', 'method': 'DELETE'} def req...
[ "unittest.main", "saboteur.agent.SaboteurWebApp", "saboteur.apicommands.alphabetical_keys", "json.dumps", "test_utils.MockShell" ]
[((3966, 3981), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3979, 3981), False, 'import unittest\n'), ((417, 435), 'json.dumps', 'json.dumps', (['params'], {}), '(params)\n', (427, 435), False, 'import json\n'), ((646, 657), 'test_utils.MockShell', 'MockShell', ([], {}), '()\n', (655, 657), False, 'from test_u...
import os import time from selenium import webdriver from selenium.webdriver.common.keys import Keys import os # Change the info here messenger_link = "https://www.messenger.com/t/abc" email = "" password = "" message = "" os.environ["SELENIUM_SERVER_JAR"] = "selenium-server-standalone-2.41.0.jar" browser = webdrive...
[ "selenium.webdriver.Chrome", "time.sleep" ]
[((312, 372), 'selenium.webdriver.Chrome', 'webdriver.Chrome', (['"""/Users/nvravicharan/Desktop/chromedriver"""'], {}), "('/Users/nvravicharan/Desktop/chromedriver')\n", (328, 372), False, 'from selenium import webdriver\n'), ((484, 497), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (494, 497), False, 'import t...
import ast import numba from numba import * from numba import error from numba import typesystem from numba import visitors from numba import nodes from numba import function_util from numba.exttypes import virtual from numba.traits import traits, Delegate class ExtensionTypeLowerer(visitors.NumbaTransformer): ""...
[ "numba.nodes.DereferenceNode", "numba.nodes.CloneableNode", "numba.nodes.NativeCallNode", "ast.Load", "numba.error.NumbaError", "numba.exttypes.virtual.hash_signature", "numba.nodes.const", "numba.traits.Delegate", "numba.nodes.NativeFunctionCallNode", "numba.function_util.utility_call", "numba....
[((5003, 5029), 'numba.traits.Delegate', 'Delegate', (['"""static_handler"""'], {}), "('static_handler')\n", (5011, 5029), False, 'from numba.traits import traits, Delegate\n'), ((8330, 8392), 'numba.nodes.NativeCallNode', 'nodes.NativeCallNode', (['jit_func.signature', 'args', 'jit_func.lfunc'], {}), '(jit_func.signat...
from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow import pickle import datetime # What the program can access within Calendar # See more at https://developers.google.com/calendar/auth scopes = ["https://www.googleapis.com/auth/calendar"] flow = InstalledAppFlow.from_cl...
[ "google_auth_oauthlib.flow.InstalledAppFlow.from_client_secrets_file", "googleapiclient.discovery.build", "datetime.timedelta", "datetime.datetime" ]
[((296, 374), 'google_auth_oauthlib.flow.InstalledAppFlow.from_client_secrets_file', 'InstalledAppFlow.from_client_secrets_file', (['"""client_secret.json"""'], {'scopes': 'scopes'}), "('client_secret.json', scopes=scopes)\n", (337, 374), False, 'from google_auth_oauthlib.flow import InstalledAppFlow\n'), ((662, 710), ...
""" :Created: 26 July 2015 :Author: <NAME> """ from django.conf.urls import url from basecategory.views import ItemPageView from software.models import Software from software.views import SoftwareListView app_name = "software" urlpatterns = [ url( r"^(?P<slug>[\w_-]+)/?$", ItemPageView.as_view()...
[ "basecategory.views.ItemPageView.as_view", "software.views.SoftwareListView.as_view" ]
[((298, 320), 'basecategory.views.ItemPageView.as_view', 'ItemPageView.as_view', ([], {}), '()\n', (318, 320), False, 'from basecategory.views import ItemPageView\n'), ((402, 428), 'software.views.SoftwareListView.as_view', 'SoftwareListView.as_view', ([], {}), '()\n', (426, 428), False, 'from software.views import Sof...
from youtube_transcript_api import YouTubeTranscriptApi, _errors as YouTubeTranscriptApiErrors from datetime import datetime from database import con, cur # on importe la connexion et le curseur de la base de donnée from youtubeAPI import youtubeAPI # on importe la fonction youtubeAPI, qui sert juste à formatter des r...
[ "youtube_transcript_api.YouTubeTranscriptApi.list_transcripts", "datetime.datetime.strptime", "youtubeAPI.youtubeAPI", "database.con.close", "database.con.commit" ]
[((4244, 4255), 'database.con.close', 'con.close', ([], {}), '()\n', (4253, 4255), False, 'from database import con, cur\n'), ((629, 763), 'youtubeAPI.youtubeAPI', 'youtubeAPI', (['"""playlistItems"""', "{'part': 'snippet', 'pageToken': nextPageToken, 'maxResults': 50,\n 'playlistId': config['playlistId']}"], {}), "...
from tests.utils import W3CTestCase class TestVerticalAlignSub(W3CTestCase): vars().update(W3CTestCase.find_tests(__file__, 'vertical-align-sub-'))
[ "tests.utils.W3CTestCase.find_tests" ]
[((96, 151), 'tests.utils.W3CTestCase.find_tests', 'W3CTestCase.find_tests', (['__file__', '"""vertical-align-sub-"""'], {}), "(__file__, 'vertical-align-sub-')\n", (118, 151), False, 'from tests.utils import W3CTestCase\n')]
import torch import torch.nn as nn class PositionalEncoder(nn.Module): def __init__( self, embed_dim: int, max_len: int = 512 ) -> None: super(PositionalEncoder, self).__init__() self._embed_dim = embed_dim self._max_len = max_len self._embed_matrix = to...
[ "torch.nn.Parameter", "torch.cos", "torch.nn.Embedding", "torch.sin" ]
[((511, 549), 'torch.sin', 'torch.sin', (['self._embed_matrix[:, 0::2]'], {}), '(self._embed_matrix[:, 0::2])\n', (520, 549), False, 'import torch\n'), ((588, 626), 'torch.cos', 'torch.cos', (['self._embed_matrix[:, 1::2]'], {}), '(self._embed_matrix[:, 1::2])\n', (597, 626), False, 'import torch\n'), ((652, 696), 'tor...
import pandas as pd from sklearn.preprocessing import LabelEncoder # read dataset file df = pd.read_csv("../data/Android_Permission.csv", header=0, delimiter=',') # Drop the columns which have a remarkable number of identic values. dropper = [] for col in df.columns[10:]: if (df[col].value_counts()[0] > 28999 or ...
[ "pandas.read_csv", "sklearn.preprocessing.LabelEncoder" ]
[((93, 163), 'pandas.read_csv', 'pd.read_csv', (['"""../data/Android_Permission.csv"""'], {'header': '(0)', 'delimiter': '""","""'}), "('../data/Android_Permission.csv', header=0, delimiter=',')\n", (104, 163), True, 'import pandas as pd\n'), ((567, 581), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), ...
from storage.models.base import * from sqlalchemy.orm import validates class Fighter(Base): __tablename__ = 'fighters' id = Column(Integer, primary_key=True) ref = Column(String(STR_SIZE), unique=True, nullable=False) name = Column(String(STR_SIZE), nullable=False) country = Column(String(STR_SIZ...
[ "sqlalchemy.orm.validates" ]
[((722, 741), 'sqlalchemy.orm.validates', 'validates', (['"""height"""'], {}), "('height')\n", (731, 741), False, 'from sqlalchemy.orm import validates\n'), ((840, 859), 'sqlalchemy.orm.validates', 'validates', (['"""weight"""'], {}), "('weight')\n", (849, 859), False, 'from sqlalchemy.orm import validates\n'), ((958, ...
# -*- coding: utf-8 -*- """ Created on January 24, 2018 @author: neerbek """ # -*- coding: utf-8 -*- import os os.chdir("../../taboo-core") from numpy.random import RandomState # type: ignore from sklearn.cluster import KMeans # type: ignore import ai_util import confusion_matrix import kmeans_cluster_util as kut...
[ "confusion_matrix.read_embeddings", "ai_util.Timer", "matplotlib.pyplot.plot", "sklearn.cluster.KMeans", "matplotlib.pyplot.legend", "kmeans_cluster_util.get_base_accuracy", "numpy.random.RandomState", "kmeans_cluster_util.get_cluster_sen_ratios", "importlib.reload", "confusion_matrix.new_graph", ...
[((114, 142), 'os.chdir', 'os.chdir', (['"""../../taboo-core"""'], {}), "('../../taboo-core')\n", (122, 142), False, 'import os\n'), ((473, 507), 'importlib.reload', 'importlib.reload', (['confusion_matrix'], {}), '(confusion_matrix)\n', (489, 507), False, 'import importlib\n'), ((2524, 2553), 'ai_util.Timer', 'ai_util...
""" * Copyright (c) 2022, <NAME> <<EMAIL>> * * SPDX-License-Identifier: BSD-2-Clause Compiles a database of proxy servers with their respective metadata. Links: https://geonode.com/free-proxy-list https://proxylist.geonode.com/api/proxy-list?limit=1000&page=1 Custom proxy key value pair: key = ip (192.16...
[ "requestlogging.log_db_entry_status", "json.loads", "utility.extract_keys", "requestlogging.get_default_logger", "math.ceil", "curlget.curl_get_json", "asynchttprequest.AsyncRequest", "requestlogging.log_request", "utility.try_get_key", "ipinfo.create_ip_info_parser" ]
[((2571, 2615), 'ipinfo.create_ip_info_parser', 'create_ip_info_parser', (['ip_db', 'ip_expire_time'], {}), '(ip_db, ip_expire_time)\n', (2592, 2615), False, 'from ipinfo import create_ip_info_parser\n'), ((3662, 3682), 'requestlogging.get_default_logger', 'get_default_logger', ([], {}), '()\n', (3680, 3682), False, 'f...
import gdbremote_testcase import lldbgdbserverutils from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase): mydir = TestBase.compute_mydir(__file__) def test_qProcessInfo_retur...
[ "lldbgdbserverutils.process_is_running" ]
[((1026, 1074), 'lldbgdbserverutils.process_is_running', 'lldbgdbserverutils.process_is_running', (['pid', '(True)'], {}), '(pid, True)\n', (1063, 1074), False, 'import lldbgdbserverutils\n')]
import tkinter as tk from Gifhandler import * #Main window top=tk.Tk() #Icon top.iconbitmap('gifs/zergyicon.ico') #Setting color top.configure(background='gold') #Title top.title('Zergy') #Fixing picture canvas (will load later) topcanvas=tk.Canvas(top,width=250,height=250,background='gold') topcanvas.pack() #Ope...
[ "tkinter.Canvas", "tkinter.Tk" ]
[((64, 71), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (69, 71), True, 'import tkinter as tk\n'), ((244, 300), 'tkinter.Canvas', 'tk.Canvas', (['top'], {'width': '(250)', 'height': '(250)', 'background': '"""gold"""'}), "(top, width=250, height=250, background='gold')\n", (253, 300), True, 'import tkinter as tk\n')]
import json import pickle import requests from elastic.using_requests import get_gov demo_tax_codes = pickle.load(open('error.p', 'rb')) host = 'http://0.0.0.0:9201' host = 'http://10.0.6.21:30152' e_index = 'index' e_index = 'sme_autocomplete_index_2' e_type = 'sme_autocomplete_type' default_link = host + '/' + e_i...
[ "requests.put", "requests.post", "elastic.using_requests.get_gov", "requests.get" ]
[((505, 523), 'requests.get', 'requests.get', (['link'], {}), '(link)\n', (517, 523), False, 'import requests\n'), ((845, 879), 'requests.put', 'requests.put', (['link'], {'json': 'json_sent'}), '(link, json=json_sent)\n', (857, 879), False, 'import requests\n'), ((1215, 1254), 'requests.post', 'requests.post', ([], {'...
""" Tests for package pytools.viz.dendrogram """ # noinspection PyPackageRequirements import hashlib import logging from io import StringIO import numpy as np # noinspection PyPackageRequirements import pytest # noinspection PyPackageRequirements import scipy.cluster.hierarchy as hc from pytools.viz.dendrogram imp...
[ "io.StringIO", "pytools.viz.dendrogram.DendrogramReportStyle", "scipy.cluster.hierarchy.linkage", "pytest.raises", "numpy.array", "pytools.viz.dendrogram.LinkageTree", "logging.getLogger" ]
[((384, 411), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (401, 411), False, 'import logging\n'), ((509, 558), 'numpy.array', 'np.array', (['[[i] for i in [2, 8, 0, 4, 1, 9, 9, 0]]'], {}), '([[i] for i in [2, 8, 0, 4, 1, 9, 9, 0]])\n', (517, 558), True, 'import numpy as np\n'), ((570, ...
from node import * from nodeitem import * from math import sqrt, pow import time class Graph: def __init__(self, node=[]): self.node=node def createNodeProperty(self, line): return [int(line.split()[0]), int(line.split()[1])] def createEdgeProperty(self, line): retu...
[ "math.pow" ]
[((996, 1021), 'math.pow', 'pow', (['(target2 - target1)', '(2)'], {}), '(target2 - target1, 2)\n', (999, 1021), False, 'from math import sqrt, pow\n')]
#!/usr/bin/python3 import sys #sys.path.insert(0, "/usr/local/opencv3/lib/python2.7/site-packages/") import argparse #import commands import cv2 import fnmatch import numpy as np import os.path import random import navpy sys.path.append('../lib') import AC3D import Pose import ProjectMgr import SRTM import transform...
[ "sys.path.append", "argparse.ArgumentParser", "numpy.linalg.inv", "numpy.linspace", "SRTM.NEDGround", "AC3D.generate", "ProjectMgr.ProjectMgr" ]
[((224, 249), 'sys.path.append', 'sys.path.append', (['"""../lib"""'], {}), "('../lib')\n", (239, 249), False, 'import sys\n'), ((617, 685), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Set the initial camera poses."""'}), "(description='Set the initial camera poses.')\n", (640, 685), ...
import gc import matplotlib.pyplot as plt import numpy as np import os import pandas as pd import torch import torch.nn as nn import torchvision import sys # To view tensorboard metrics # tensorboard --logdir=logs --port=6006 --bind_all from torch.utils.tensorboard import SummaryWriter from functools import partial fr...
[ "numpy.moveaxis", "numpy.ones", "ignite.engine.create_supervised_evaluator", "torch.nn.NLLLoss", "numpy.mean", "landcover_dataloader.get_landcover_dataloaders", "cuda_utils.maybe_get_cuda_device", "torch.no_grad", "cuda_utils.clear_cuda", "os.path.join", "numpy.std", "torch.load", "evolver.V...
[((1006, 1017), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (1015, 1017), False, 'import os\n'), ((1065, 1111), 'os.path.join', 'os.path.join', (['base_dir', "('data/' + dataset_name)"], {}), "(base_dir, 'data/' + dataset_name)\n", (1077, 1111), False, 'import os\n'), ((1249, 1314), 'os.path.join', 'os.path.join', (['b...
# Copyright 2010-2012 Institut Mines-Telecom # # 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...
[ "os.path.dirname", "setuptools.find_packages" ]
[((1258, 1273), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (1271, 1273), False, 'from setuptools import setup, find_packages\n'), ((895, 920), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (910, 920), False, 'import os\n')]
import gc print(gc.isenabled()) gc.disable() print(gc.isenabled()) gc.enable() print(gc.isenabled())
[ "gc.isenabled", "gc.disable", "gc.enable" ]
[((33, 45), 'gc.disable', 'gc.disable', ([], {}), '()\n', (43, 45), False, 'import gc\n'), ((68, 79), 'gc.enable', 'gc.enable', ([], {}), '()\n', (77, 79), False, 'import gc\n'), ((17, 31), 'gc.isenabled', 'gc.isenabled', ([], {}), '()\n', (29, 31), False, 'import gc\n'), ((52, 66), 'gc.isenabled', 'gc.isenabled', ([],...
#!/usr/bin/env python from __future__ import print_function __author__ = 'mnowotka' # ---------------------------------------------------------------------------------------------------------------------- import sys import argparse from chembl_webresource_client.scripts.utils import get_serializer, chembl_id_regex,...
[ "chembl_webresource_client.scripts.utils.get_serializer", "chembl_webresource_client.scripts.utils.smiles_regex.match", "argparse.ArgumentParser", "chembl_webresource_client.scripts.utils.resolve", "chembl_webresource_client.scripts.utils.convert_to_smiles", "sys.stderr.write", "chembl_webresource_clien...
[((707, 774), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': 'description', 'prog': '"""chembl_m2t"""'}), "(description=description, prog='chembl_m2t')\n", (730, 774), False, 'import argparse\n'), ((2593, 2661), 'sys.stderr.write', 'sys.stderr.write', (['"""Unsupported source format"""', 'op...
"""Test record form i.e. marshmallow schema is configured as expected.""" from copy import deepcopy import pytest from cd2h_repo_project.modules.records.marshmallow.json import ( AuthorSchemaV1, MetadataSchemaV1, RecordSchemaV1, ResourceTypeSchemaV1 ) @pytest.fixture def create_input_metadatav1(): """Facto...
[ "cd2h_repo_project.modules.records.marshmallow.json.RecordSchemaV1", "cd2h_repo_project.modules.records.marshmallow.json.MetadataSchemaV1", "copy.deepcopy", "cd2h_repo_project.modules.records.marshmallow.json.AuthorSchemaV1", "cd2h_repo_project.modules.records.marshmallow.json.ResourceTypeSchemaV1" ]
[((1257, 1271), 'copy.deepcopy', 'deepcopy', (['data'], {}), '(data)\n', (1265, 1271), False, 'from copy import deepcopy\n'), ((1619, 1635), 'cd2h_repo_project.modules.records.marshmallow.json.RecordSchemaV1', 'RecordSchemaV1', ([], {}), '()\n', (1633, 1635), False, 'from cd2h_repo_project.modules.records.marshmallow.j...
import os import sys import torch import argparse from collections import OrderedDict from dataloader import Dataset from evaluation import Evaluator from experiment import EarlyStop, train_model from utils import Config, Logger, ResultTable, make_log_dir, set_random_seed os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID...
[ "experiment.EarlyStop", "argparse.ArgumentParser", "utils.Config", "evaluation.Evaluator", "utils.set_random_seed", "dataloader.Dataset", "model.restore", "os.path.exists", "experiment.train_model", "torch.cuda.is_available", "model.eval", "collections.OrderedDict", "utils.Logger", "os.pat...
[((431, 490), 'utils.Config', 'Config', ([], {'main_conf_path': '"""./"""', 'model_conf_path': '"""model_config"""'}), "(main_conf_path='./', model_conf_path='model_config')\n", (437, 490), False, 'from utils import Config, Logger, ResultTable, make_log_dir, set_random_seed\n'), ((1176, 1197), 'utils.set_random_seed', ...
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <markdowncell> # We are going to be doing an activity about viewing images through different filters. These filters are similar to things that happen in the brain when the images from our eyes are registered in our brain. # <codecell> import matplotlib.pyplot as ...
[ "matplotlib.pyplot.imshow", "matplotlib.image.imread" ]
[((427, 450), 'matplotlib.image.imread', 'mpimg.imread', (['"""bar.png"""'], {}), "('bar.png')\n", (439, 450), True, 'import matplotlib.image as mpimg\n'), ((694, 729), 'matplotlib.pyplot.imshow', 'plt.imshow', (['barImg'], {'cmap': 'cm.Greys_r'}), '(barImg, cmap=cm.Greys_r)\n', (704, 729), True, 'import matplotlib.pyp...
import decimal import random import string import textwrap import time import os from memtrain.memtrain_common.mtstatistics import MtStatistics class NoResponsesError(Exception): pass class Question: '''Manages the current cue and response interface''' def __init__(self, settings, database): # I...
[ "string.lower", "random.shuffle", "random.choice" ]
[((7974, 8009), 'random.shuffle', 'random.shuffle', (['same_mtag_responses'], {}), '(same_mtag_responses)\n', (7988, 8009), False, 'import random\n'), ((8018, 8058), 'random.shuffle', 'random.shuffle', (['same_plurality_responses'], {}), '(same_plurality_responses)\n', (8032, 8058), False, 'import random\n'), ((8067, 8...
'''vmssz.py - class of basic Azure VM scale set operations, without UDs, with zones''' import json import azurerm class VMSSZ(): '''VMSSZ class - encapsulates the model and status of a zone redundant VM scale set''' def __init__(self, vmssname, vmssmodel, subscription_id, access_token): '''class ini...
[ "azurerm.upgrade_vmss_vms", "azurerm.start_vmss_vms", "azurerm.list_vmss_vms", "azurerm.stopdealloc_vmss_vms", "azurerm.poweroff_vmss_vms", "azurerm.poweroff_vmss", "azurerm.restart_vmss", "json.dumps", "azurerm.scale_vmss", "azurerm.reimage_vmss_vms", "azurerm.get_vmss", "azurerm.list_vmss_vm...
[((3708, 3780), 'azurerm.get_vmss', 'azurerm.get_vmss', (['self.access_token', 'self.sub_id', 'self.rgname', 'self.name'], {}), '(self.access_token, self.sub_id, self.rgname, self.name)\n', (3724, 3780), False, 'import azurerm\n'), ((6687, 6775), 'azurerm.scale_vmss', 'azurerm.scale_vmss', (['self.access_token', 'self....
from nltk.corpus import stopwords from nltk.stem.lancaster import LancasterStemmer from utils import Constants from utils import Utils #################################################################################### #################################################################################### #############...
[ "nltk.stem.lancaster.LancasterStemmer", "nltk.corpus.stopwords.words" ]
[((1265, 1283), 'nltk.stem.lancaster.LancasterStemmer', 'LancasterStemmer', ([], {}), '()\n', (1281, 1283), False, 'from nltk.stem.lancaster import LancasterStemmer\n'), ((1299, 1325), 'nltk.corpus.stopwords.words', 'stopwords.words', (['"""english"""'], {}), "('english')\n", (1314, 1325), False, 'from nltk.corpus impo...
#!/usr/bin/env python3 import os import logging import yaml from discord.ext.commands import Bot, Context, CommandError, CommandOnCooldown # create logger log = logging.getLogger(__package__) log.setLevel(logging.DEBUG) # create file handler which logs even debug messages fh = logging.FileHandler('../senko.log') fh.s...
[ "logging.FileHandler", "logging.StreamHandler", "logging.Formatter", "yaml.safe_load", "discord.ext.commands.Bot", "os.listdir", "logging.getLogger" ]
[((163, 193), 'logging.getLogger', 'logging.getLogger', (['__package__'], {}), '(__package__)\n', (180, 193), False, 'import logging\n'), ((280, 315), 'logging.FileHandler', 'logging.FileHandler', (['"""../senko.log"""'], {}), "('../senko.log')\n", (299, 315), False, 'import logging\n'), ((397, 420), 'logging.StreamHan...
#!/usr/bin/env python from control.msg import heaveFeedback, heaveAction, heaveResult import rospy import time import actionlib class Heave(object): feedback = heaveFeedback() result = heaveResult() def __init__(self, name): self.heavePub = rospy.Publisher('/heave_setpoint', Float64, queue_size=1)...
[ "rospy.Subscriber", "rospy.Publisher", "control.msg.heaveFeedback", "time.time", "rospy.loginfo", "rospy.init_node", "actionlib.SimpleActionServer", "rospy.get_name", "rospy.spin", "control.msg.heaveResult" ]
[((165, 180), 'control.msg.heaveFeedback', 'heaveFeedback', ([], {}), '()\n', (178, 180), False, 'from control.msg import heaveFeedback, heaveAction, heaveResult\n'), ((194, 207), 'control.msg.heaveResult', 'heaveResult', ([], {}), '()\n', (205, 207), False, 'from control.msg import heaveFeedback, heaveAction, heaveRes...
import os import sys class LoginLibrary: def __init__(self): self._sut_path = os.path.join(os.path.dirname(__file__), '..', 'sut', 'login.py') self._status = '' def create_user(self, username, password): self._run_command('create', username, pass...
[ "os.path.dirname", "os.popen" ]
[((960, 977), 'os.popen', 'os.popen', (['command'], {}), '(command)\n', (968, 977), False, 'import os\n'), ((106, 131), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (121, 131), False, 'import os\n')]
import logging from flytekit import ContainerTask, kwtypes, task, workflow logger = logging.getLogger(__file__) calculate_ellipse_area_shell = ContainerTask( name="ellipse-area-metadata-shell", input_data_dir="/var/inputs", output_data_dir="/var/outputs", inputs=kwtypes(a=float, b=float), outputs...
[ "flytekit.kwtypes", "logging.getLogger" ]
[((86, 113), 'logging.getLogger', 'logging.getLogger', (['__file__'], {}), '(__file__)\n', (103, 113), False, 'import logging\n'), ((282, 307), 'flytekit.kwtypes', 'kwtypes', ([], {'a': 'float', 'b': 'float'}), '(a=float, b=float)\n', (289, 307), False, 'from flytekit import ContainerTask, kwtypes, task, workflow\n'), ...
#--------------------------------------------------------------------------# # This code makes use of all other functions of # # the package to build a Dash Web App # #--------------------------------------------------------------------------# # imports ...
[ "plots.make_fields_pie", "dash.dcc.Store", "plots.make_access_pie", "dash.dcc.Input", "dash.dcc.Tab", "plots.generate_graph_elements_network", "data_collection.semantic_api.get_paper_info", "dash.dcc.Graph", "plots.make_top_key_words", "pandas.DataFrame", "dash.Dash", "plots.make_pubs_cites_pe...
[((934, 1102), 'dash.Dash', 'dash.Dash', (['__name__'], {'suppress_callback_exceptions': '(True)', 'meta_tags': "[{'name': 'viewport', 'content': 'width=device-width, initial-scale=1',\n 'charSet': '“UTF-8”'}]"}), "(__name__, suppress_callback_exceptions=True, meta_tags=[{'name':\n 'viewport', 'content': 'width=d...
import os import sys import argparse try: from aceinna.bootstrap.cli import CommandLine from aceinna.framework.constants import BAUDRATE_LIST except: # pylint: disable=bare-except print('load package from local') sys.path.append('./src') from aceinna.bootstrap.cli import CommandLine from acein...
[ "sys.path.append", "argparse.ArgumentParser", "aceinna.bootstrap.cli.CommandLine", "sys._getframe", "os._exit", "sys.exit" ]
[((436, 521), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Aceinna python driver input args command:"""'}), "(description='Aceinna python driver input args command:'\n )\n", (459, 521), False, 'import argparse\n'), ((1790, 2075), 'aceinna.bootstrap.cli.CommandLine', 'CommandLine', (...
from reindeer import Disease # Part I disease = Disease("day24-input.txt") found, result = disease.battle() print(f"Answer part I: {result}") # Part II for boost in range(10000): body = Disease("day24-input.txt", boost) found, result = body.battle() if found: break print(f"Answer part II: {resu...
[ "reindeer.Disease" ]
[((50, 76), 'reindeer.Disease', 'Disease', (['"""day24-input.txt"""'], {}), "('day24-input.txt')\n", (57, 76), False, 'from reindeer import Disease\n'), ((194, 227), 'reindeer.Disease', 'Disease', (['"""day24-input.txt"""', 'boost'], {}), "('day24-input.txt', boost)\n", (201, 227), False, 'from reindeer import Disease\...
import pytest def test_data(): from awkwardql.data import (RecordArray, PrimitiveArray, ListArray, UnionArray, instantiate) # data in columnar form events = RecordArray({ ...
[ "awkwardql.data.PrimitiveArray", "awkwardql.data.instantiate" ]
[((3473, 3492), 'awkwardql.data.instantiate', 'instantiate', (['events'], {}), '(events)\n', (3484, 3492), False, 'from awkwardql.data import RecordArray, PrimitiveArray, ListArray, UnionArray, instantiate\n'), ((4441, 4460), 'awkwardql.data.instantiate', 'instantiate', (['egamma'], {}), '(egamma)\n', (4452, 4460), Fal...
"""original source: https://github.com/chainer/chainerrl/pull/480 MIT License Copyright (c) Preferred Networks, Inc. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals from __future__ import absolute_import from builtins import * from future import stand...
[ "numpy.abs", "argparse.ArgumentParser", "chainerrl.explorers.Greedy", "future.standard_library.install_aliases", "q_functions.CNNBranchingQFunction", "numpy.random.randint", "expert_converter.choose_top_experts", "expert_converter.fill_buffer", "os.path.join", "chainerrl.links.to_factorized_noisy"...
[((332, 366), 'future.standard_library.install_aliases', 'standard_library.install_aliases', ([], {}), '()\n', (364, 366), False, 'from future import standard_library\n'), ((1390, 1415), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1413, 1415), False, 'import argparse\n'), ((7221, 7248), 'lo...
# -*- coding: utf-8 -*- import unittest from pygraph import util class TestUtil(unittest.TestCase): def test_pointsToEdges(self): points = [(1, 1), (2, 2), (3, 3)] expected = [ ((1, 1), (2, 2)), ((2, 2), (3, 3)), ((3, 3), (1, 1)) ] self.assertLi...
[ "pygraph.util.pointsToEdges" ]
[((338, 364), 'pygraph.util.pointsToEdges', 'util.pointsToEdges', (['points'], {}), '(points)\n', (356, 364), False, 'from pygraph import util\n')]
import setuptools setuptools.setup( name="PyQNLPSimulator", version="0.1", author="<NAME> (ICHEC), <NAME> (ICHEC)", author_email="<EMAIL>, <EMAIL>", description="Quantum NLP package", long_description="Quantum NLP project @ ICHEC", url="https://github.com/ichec/qnlp", packages=setuptool...
[ "setuptools.find_packages" ]
[((311, 337), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (335, 337), False, 'import setuptools\n')]
#!/usr/bin/env python3 import numpy as np import matching.cr_search_validation_matcher import utils.data_format_keys as dfk import sys from evaluation.link_metrics import LinkMetricsResults from multiprocessing import Pool from utils.utils import read_json, save_json def modify_simple_threshold(dataset, threshold):...
[ "utils.utils.read_json", "numpy.arange", "utils.utils.save_json", "multiprocessing.Pool" ]
[((1193, 1224), 'utils.utils.save_json', 'save_json', (['dataset', 'sys.argv[2]'], {}), '(dataset, sys.argv[2])\n', (1202, 1224), False, 'from utils.utils import read_json, save_json\n'), ((852, 874), 'utils.utils.read_json', 'read_json', (['sys.argv[1]'], {}), '(sys.argv[1])\n', (861, 874), False, 'from utils.utils im...
import pprint import json pp = pprint.PrettyPrinter(indent = 4) def convert(path): with open(path, 'r') as read_obj: line = 'init' counter = 0 l = [] while line: line = read_obj.readline() counter += 1 if counter == 1: continue ...
[ "pprint.PrettyPrinter" ]
[((31, 61), 'pprint.PrettyPrinter', 'pprint.PrettyPrinter', ([], {'indent': '(4)'}), '(indent=4)\n', (51, 61), False, 'import pprint\n')]
__author__ = 'cjoakim' import math from .elapsed_time import ElapsedTime class Speed(object): def __init__(self, d, et): self.dist = d # an instance of Distance self.etime = et # an instance of ElapsedTime def mph(self): return self.dist.as_miles() / self.etime.hours() def...
[ "math.floor" ]
[((552, 574), 'math.floor', 'math.floor', (['(spm / 60.0)'], {}), '(spm / 60.0)\n', (562, 574), False, 'import math\n')]
import telebot from telebot import types import os import random from PIL import ImageGrab from winsound import Beep import requests import platform import psutil import time # proxy = 'http://192.168.88.170:8888' # os.environ['http_proxy'] = proxy # os.environ['HTTP_PROXY'] = proxy # os.environ['https_p...
[ "os.remove", "psutil.virtual_memory", "telebot.types.KeyboardButton", "random.randint", "telebot.types.ReplyKeyboardMarkup", "PIL.ImageGrab.grab", "os.path.isdir", "winsound.Beep", "os.walk", "os.system", "platform.uname", "time.time", "os.path.isfile", "telebot.TeleBot", "psutil.cpu_per...
[((388, 399), 'time.time', 'time.time', ([], {}), '()\n', (397, 399), False, 'import time\n'), ((401, 417), 'os.system', 'os.system', (['"""cls"""'], {}), "('cls')\n", (410, 417), False, 'import os\n'), ((463, 485), 'telebot.TeleBot', 'telebot.TeleBot', (['token'], {}), '(token)\n', (478, 485), False, 'import telebot\n...
"""Test cases for dual bytes/str APIs""" import unittest """ The Python 2 str type conveniently permitted the creation of APIs that could be used as either binary APIs (8-bit str in, 8-bit str out) or as text APIs (unicode in, unicode out). The critical enabler for this feature was the ability to define any *consta...
[ "unittest.main", "asciicompat.asciistr" ]
[((2025, 2042), 'asciicompat.asciistr', 'asciistr', (['"""ascii"""'], {}), "('ascii')\n", (2033, 2042), False, 'from asciicompat import asciistr\n'), ((2971, 2987), 'asciicompat.asciistr', 'asciistr', (['"""data"""'], {}), "('data')\n", (2979, 2987), False, 'from asciicompat import asciistr\n'), ((3002, 3022), 'asciico...
""" This file is part of the magtifun.abgeo.dev. (c) 2021 <NAME> <<EMAIL>> For the full copyright and license information, please view the LICENSE file that was distributed with this source code. """ from datetime import timedelta from fastapi import Depends, HTTPException, status from fastapi.security import OAuth...
[ "fastapi.HTTPException", "app.services.magtifun.authenticate_user", "datetime.timedelta", "fastapi.Depends", "app.models.schemas.jwt.Token", "fastapi.APIRouter" ]
[((615, 639), 'fastapi.APIRouter', 'APIRouter', ([], {'tags': "['Auth']"}), "(tags=['Auth'])\n", (624, 639), False, 'from fastapi import APIRouter\n'), ((762, 771), 'fastapi.Depends', 'Depends', ([], {}), '()\n', (769, 771), False, 'from fastapi import Depends, HTTPException, status\n'), ((850, 907), 'app.services.magt...
#!/usr/bin/env python3 # # visualize_contingency_tables.py: Visualizes all contingency tables # obtained by our method in the form of a diagram in the plane. # # Input: JSON file with shapelets # # Output: A set of points in the plane, each representing one table, # such that the distance to the origin refers ...
[ "json.load", "argparse.ArgumentParser", "numpy.sign" ]
[((909, 979), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Contingency Table Visualization"""'}), "(description='Contingency Table Visualization')\n", (932, 979), False, 'import argparse\n'), ((1572, 1584), 'json.load', 'json.load', (['f'], {}), '(f)\n', (1581, 1584), False, 'import js...
# -*- coding: utf-8 -*- # Author: <NAME> <<EMAIL>> # License: See LICENSE file # Copyright: 2020 (c) The Alan Turing Institute from flask import current_app, flash from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SubmitField, BooleanField from wtforms.validators import ( DataRequir...
[ "flask.flash", "wtforms.validators.Email", "wtforms.SubmitField", "app.models.User.query.filter_by", "wtforms.validators.Optional", "wtforms.validators.EqualTo", "wtforms.StringField", "wtforms.validators.DataRequired", "wtforms.validators.ValidationError" ]
[((595, 617), 'wtforms.SubmitField', 'SubmitField', (['"""Sign In"""'], {}), "('Sign In')\n", (606, 617), False, 'from wtforms import StringField, PasswordField, SubmitField, BooleanField\n'), ((809, 859), 'wtforms.StringField', 'StringField', (['"""Full Name (optional)"""'], {'validators': '[]'}), "('Full Name (option...
import pytest from openshift_checks.logging.curator import Curator def canned_curator(exec_oc=None): """Create a Curator check object with canned exec_oc method""" check = Curator("dummy") # fails if a module is actually invoked if exec_oc: check._exec_oc = exec_oc return check def assert_...
[ "pytest.mark.parametrize", "openshift_checks.logging.curator.Curator" ]
[((1140, 1390), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""pods, expect_error"""', "[([], 'no Curator pods'), ([plain_curator_pod], None), ([\n not_running_curator_pod], 'not currently in a running state'), ([\n plain_curator_pod, plain_curator_pod], 'more than one Curator pod')]"], {}), "('pods,...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('trac', '0016_auto_20160303_2353'), ] operations = [ migrations.AddField( model_name='checkpoint', na...
[ "django.db.models.CharField" ]
[((359, 481), 'django.db.models.CharField', 'models.CharField', ([], {'default': "b'mi'", 'max_length': '(2)', 'choices': "[(b'm', b'meters'), (b'km', b'kilometers'), (b'mi', b'miles')]"}), "(default=b'mi', max_length=2, choices=[(b'm', b'meters'), (\n b'km', b'kilometers'), (b'mi', b'miles')])\n", (375, 481), False...
"""Unittests for metrics lib.""" from llama import ping from llama import util import pytest def fake_runcmd(cmd): stderr = ''' --- shelby hping statistic --- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max = 0.1/0.1/0.2 ms ''' stdout = ''' HPING shelby (e...
[ "llama.ping.hping3" ]
[((1078, 1110), 'llama.ping.hping3', 'ping.hping3', (['"""somehost"""'], {'count': '(5)'}), "('somehost', count=5)\n", (1089, 1110), False, 'from llama import ping\n')]
"""Module throttle. ======== Throttle ======== The throttle allows you to limit the rate at which a function is executed. This is helpful to avoid exceeding a limit, such as when sending requests to an internet service that specifies a limit as to the number of requests that can be sent in a specific time interval. ...
[ "threading.Thread", "functools.partial", "scottbrian_utils.pauser.Pauser", "typing.cast", "time.time", "threading.Lock", "time.perf_counter_ns", "typing.TypeVar", "queue.Queue", "logging.getLogger" ]
[((84181, 84219), 'typing.TypeVar', 'TypeVar', (['"""F"""'], {'bound': 'Callable[..., Any]'}), "('F', bound=Callable[..., Any])\n", (84188, 84219), False, 'from typing import Any, Callable, cast, Final, NamedTuple, Optional, overload, Protocol, TYPE_CHECKING, Type, TypeVar, Union\n'), ((84836, 84875), 'typing.cast', 'c...
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # This is a data-parallelized Neural Network # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ############################################################################################################ #############################...
[ "numpy.zeros_like", "warnings.filterwarnings", "pandas.read_csv", "numpy.power", "numpy.zeros", "functools.reduce", "time.time", "numpy.split", "numpy.where", "numpy.array", "pandas.Series", "numpy.exp", "numpy.random.rand", "numpy.dot", "pandas.concat" ]
[((3562, 3584), 'numpy.dot', 'np.dot', (['inputs', 'theta1'], {}), '(inputs, theta1)\n', (3568, 3584), True, 'import numpy as np\n'), ((3617, 3635), 'numpy.dot', 'np.dot', (['a2', 'theta2'], {}), '(a2, theta2)\n', (3623, 3635), True, 'import numpy as np\n'), ((3702, 3728), 'numpy.where', 'np.where', (['(a3 >= 0.5)', '(...
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-11-29 03:12 from __future__ import unicode_literals from django.conf import settings import django.contrib.auth.validators from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import oauth2_backend.models.use...
[ "django.db.models.OneToOneField", "django.db.models.TextField", "django.db.models.ManyToManyField", "django.db.models.UUIDField", "django.db.models.BigIntegerField", "django.db.models.ForeignKey", "django.db.models.CharField", "django.db.models.BooleanField", "django.db.models.EmailField", "django...
[((13032, 13164), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""hierarchy_set"""', 'to': '"""oauth2_backend.HierarchyType"""'}), "(on_delete=django.db.models.deletion.CASCADE, related_name\n ='hierarchy_set', to='oauth2_backend.Hierarc...
# Auto generated by generator.py. Delete this line if you make modification. from scrapy.spiders import Rule from scrapy.linkextractors import LinkExtractor XPATH = { 'name' : "//div[@class='tensp']/h2", 'price' : "//div[@class='pd-right fr']/p[@class='p-price']", 'category' : "//ul[@class='breadcrumb all'...
[ "scrapy.linkextractors.LinkExtractor" ]
[((756, 808), 'scrapy.linkextractors.LinkExtractor', 'LinkExtractor', ([], {'allow': "['/[a-zA-Z0-9-]+\\\\d.*\\\\.html$']"}), "(allow=['/[a-zA-Z0-9-]+\\\\d.*\\\\.html$'])\n", (769, 808), False, 'from scrapy.linkextractors import LinkExtractor\n'), ((832, 892), 'scrapy.linkextractors.LinkExtractor', 'LinkExtractor', ([]...
from cgbind.log import logger from copy import deepcopy import numpy as np from cgbind.constants import Constants from rdkit.Chem import AllChem from scipy.optimize import minimize, Bounds from scipy.spatial import distance_matrix from cgbind import geom from cgbind.atoms import get_vdw_radii from cgbind.geom import ro...
[ "copy.deepcopy", "numpy.outer", "numpy.sum", "cgbind.log.logger.info", "cgbind.geom.rotation_matrix", "rdkit.Chem.AllChem.ComputeMolVolume", "cgbind.utils.copy_func", "numpy.identity", "numpy.zeros", "scipy.spatial.distance_matrix", "scipy.optimize.Bounds", "numpy.array", "numpy.exp", "num...
[((8114, 8168), 'cgbind.utils.copy_func', 'copy_func', (['cage_subst_repulsion_and_electrostatic_func'], {}), '(cage_subst_repulsion_and_electrostatic_func)\n', (8123, 8168), False, 'from cgbind.utils import copy_func\n'), ((1265, 1307), 'scipy.spatial.distance_matrix', 'distance_matrix', (['cage_coords', 'subst_coords...
import tensorflow as tf def fixed(global_step, params): assert 'base_lr' in params, 'base_lr must in params' lr = tf.constant(params['base_lr']) tf.summary.scalar('learining_rate', lr) return lr def exponential_decay(global_step, params): assert 'base_lr' in params, 'base_lr must in params' ...
[ "tensorflow.summary.scalar", "tensorflow.train.exponential_decay", "tensorflow.constant" ]
[((124, 154), 'tensorflow.constant', 'tf.constant', (["params['base_lr']"], {}), "(params['base_lr'])\n", (135, 154), True, 'import tensorflow as tf\n'), ((159, 198), 'tensorflow.summary.scalar', 'tf.summary.scalar', (['"""learining_rate"""', 'lr'], {}), "('learining_rate', lr)\n", (176, 198), True, 'import tensorflow ...
import os from pythongettext import msgfmt LOCALE_PATH = os.path.join('..', 'discord_birthday_bot', 'locale') for subdir, dirs, files in os.walk(LOCALE_PATH): for filename in files: if filename.endswith('.po'): path = os.path.join(subdir, filename) mo_str = msgfmt.Msgfmt(path).get...
[ "pythongettext.msgfmt.Msgfmt", "os.walk", "os.path.join", "os.path.splitext" ]
[((59, 111), 'os.path.join', 'os.path.join', (['""".."""', '"""discord_birthday_bot"""', '"""locale"""'], {}), "('..', 'discord_birthday_bot', 'locale')\n", (71, 111), False, 'import os\n'), ((140, 160), 'os.walk', 'os.walk', (['LOCALE_PATH'], {}), '(LOCALE_PATH)\n', (147, 160), False, 'import os\n'), ((245, 275), 'os....
from rdkit import Chem import pandas as pd import numpy as np from tqdm import tqdm from sklearn.preprocessing import MinMaxScaler from sklearn.preprocessing import RobustScaler tqdm.pandas() GLOBAL_SCALE = ['partial_charge', 'fukui_neu', 'fukui_elec'] ATOM_SCALE = ['NMR'] def check_chemprop_out(df): invalid = ...
[ "pandas.DataFrame", "sklearn.preprocessing.MinMaxScaler", "tqdm.tqdm.pandas", "numpy.finfo", "numpy.array", "rdkit.Chem.AddHs", "pandas.isna", "rdkit.Chem.MolFromSmiles" ]
[((179, 192), 'tqdm.tqdm.pandas', 'tqdm.pandas', ([], {}), '()\n', (190, 192), False, 'from tqdm import tqdm\n'), ((4407, 4433), 'rdkit.Chem.MolFromSmiles', 'Chem.MolFromSmiles', (['smiles'], {}), '(smiles)\n', (4425, 4433), False, 'from rdkit import Chem\n'), ((4443, 4456), 'rdkit.Chem.AddHs', 'Chem.AddHs', (['m'], {}...
# -*- coding:utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # This program is free software; you can redistribute it and/or modify # it under the terms of the MIT License. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the ...
[ "tensorflow.random_uniform", "vega.is_torch_backend", "vega.core.common.class_factory.ClassFactory.register", "tensorflow.reset_default_graph", "torch.FloatTensor", "vega.core.metrics.calc_model_flops_params", "vega.is_tf_backend", "logging.getLogger" ]
[((681, 704), 'vega.is_torch_backend', 'vega.is_torch_backend', ([], {}), '()\n', (702, 704), False, 'import vega\n'), ((788, 815), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (805, 815), False, 'import logging\n'), ((819, 860), 'vega.core.common.class_factory.ClassFactory.register', '...
import os import re from flask import g, jsonify, request from flask_httpauth import HTTPTokenAuth # HTTPBasicAuth from app.models import User from app.v1 import api from app.v1.errors import forbidden, unauthorized from config import config auth = HTTPTokenAuth() @auth.verify_token def verify_token(token): g...
[ "flask.request.form.get", "re.match", "app.v1.errors.unauthorized", "flask.jsonify", "app.v1.api.route", "app.models.User.query.filter_by", "app.v1.errors.forbidden", "flask_httpauth.HTTPTokenAuth", "app.models.User.verify_auth_token", "os.getenv" ]
[((253, 268), 'flask_httpauth.HTTPTokenAuth', 'HTTPTokenAuth', ([], {}), '()\n', (266, 268), False, 'from flask_httpauth import HTTPTokenAuth\n'), ((613, 650), 'app.v1.api.route', 'api.route', (['"""/login"""'], {'methods': "['POST']"}), "('/login', methods=['POST'])\n", (622, 650), False, 'from app.v1 import api\n'), ...
"""to be run from root directory """ import os import django os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings") django.setup() from django.db.models.functions import Cast from django.db.models.fields import DateField from zoo_checks.models import AnimalCount, Enclosure, GroupCount, SpeciesCount from...
[ "os.environ.setdefault", "django.setup", "django.utils.timezone.localtime", "django.db.models.functions.TruncDate", "zoo_checks.models.Enclosure.objects.filter", "django.utils.timezone.timedelta", "zoo_checks.helpers.today_time" ]
[((64, 130), 'os.environ.setdefault', 'os.environ.setdefault', (['"""DJANGO_SETTINGS_MODULE"""', '"""mysite.settings"""'], {}), "('DJANGO_SETTINGS_MODULE', 'mysite.settings')\n", (85, 130), False, 'import os\n'), ((131, 145), 'django.setup', 'django.setup', ([], {}), '()\n', (143, 145), False, 'import django\n'), ((455...
# AUTOGENERATED! DO NOT EDIT! File to edit: 01_model.ipynb (unless otherwise specified). __all__ = ['DownSampler', 'TemporalEncoder', 'condition_time', 'ConditionTime', 'feat2image', 'MetNet', 'metnet_splitter'] # Cell from .layers import * from fastai.vision.all import * # Cell def DownSampler(in_channel...
[ "axial_attention.AxialAttention" ]
[((2831, 2901), 'axial_attention.AxialAttention', 'AxialAttention', ([], {'dim': 'hidden_dim', 'dim_index': '(1)', 'heads': '(8)', 'num_dimensions': '(2)'}), '(dim=hidden_dim, dim_index=1, heads=8, num_dimensions=2)\n', (2845, 2901), False, 'from axial_attention import AxialAttention\n')]
import logging logger = logging.getLogger("__name__") logger.setLevel(logging.DEBUG) console = logging.StreamHandler() console.setLevel(logging.DEBUG) formatter = logging.Formatter( "{asctime} - {name} - {levelname} - {message}", datefmt="%H:%M:%S", style="{" ) console.setFormatter(formatter) logger.addHandler(c...
[ "logging.Formatter", "logging.StreamHandler", "logging.getLogger" ]
[((25, 54), 'logging.getLogger', 'logging.getLogger', (['"""__name__"""'], {}), "('__name__')\n", (42, 54), False, 'import logging\n'), ((97, 120), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (118, 120), False, 'import logging\n'), ((165, 266), 'logging.Formatter', 'logging.Formatter', (['"""{as...